English
Interface: SSOverlayOptions
Defined in: ssplayer-webgl/src/SSOverlay.ts:4
Extends
Omit<SSSurfaceOptions,"autoStart"|"flipY">
Properties
antialias?
optionalantialias?:boolean
Defined in: ssplayer-webgl/src/SSSurface.ts:10
Inherited from
backgroundColor?
optionalbackgroundColor?:number
Defined in: ssplayer-webgl/src/SSSurface.ts:30
Opaque backdrop colour (0xRRGGBB) to clear each frame to. When omitted the surface is cleared TRANSPARENT (0,0,0,0) for overlay use.
Set this when an animation uses additive / backdrop-reading blend modes (Add, Screen, Mul, …): those composite against the framebuffer, so they are only correct when a real opaque backdrop is present. On a transparent surface an additive sprite whose texture is a glow baked on an opaque black background renders that black as an opaque block (it has nothing to add onto). This is inherent to premultiplied-alpha compositing — ssplayer-pixi avoids it the same way, by rendering on an opaque backgroundColor.
For a single player that needs its own backdrop on a shared surface, use SSPlayer.backdrop instead.
Inherited from
SSSurfaceOptions.backgroundColor
container?
optionalcontainer?:HTMLElement
Defined in: ssplayer-webgl/src/SSOverlay.ts:25
Where to mount the overlay canvas. Defaults to document.body, which makes it viewport-sized. Pass a positioned element to scope an overlay to a scroll container instead — note that costs another WebGL context.
followOpacity?
optionalfollowOpacity?:boolean
Defined in: ssplayer-webgl/src/SSOverlay.ts:19
Also read each host element's computed opacity into its player's alpha (default off).
Off, an element is only a position. On, it is a position and a fade — which is what lets a host engine keep animating these elements with its own tooling and have the animation follow. ssplayer-tyranoscript turns it on so TyranoScript's [anim opacity=] / [kanim] still fade an SS character after the character stopped being a canvas.
Costs a getComputedStyle per tracked element per frame, so it is opt-in.
maxDPR?
optionalmaxDPR?:number
Defined in: ssplayer-webgl/src/SSSurface.ts:11
Inherited from
pauseWhenHidden?
optionalpauseWhenHidden?:boolean
Defined in: ssplayer-webgl/src/SSSurface.ts:13
Inherited from
SSSurfaceOptions.pauseWhenHidden
powerPreference?
optionalpowerPreference?:"default"|"low-power"|"high-performance"
Defined in: ssplayer-webgl/src/SSSurface.ts:12
Inherited from
SSSurfaceOptions.powerPreference
premultipliedAlpha?
optionalpremultipliedAlpha?:boolean
Defined in: ssplayer-webgl/src/SSSurface.ts:8
Inherited from
SSSurfaceOptions.premultipliedAlpha
stencil?
optionalstencil?:boolean
Defined in: ssplayer-webgl/src/SSSurface.ts:9
Inherited from
zIndex?
optionalzIndex?:number
Defined in: ssplayer-webgl/src/SSOverlay.ts:6
Stacking order of the overlay canvas. Default 0 — behind positioned UI.