English
Interface: SSSurfaceOptions
Defined in: ssplayer-webgl/src/SSSurface.ts:7
Properties
antialias?
optionalantialias?:boolean
Defined in: ssplayer-webgl/src/SSSurface.ts:10
autoStart?
optionalautoStart?:boolean
Defined in: ssplayer-webgl/src/SSSurface.ts:14
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.
flipY?
optionalflipY?:boolean
Defined in: ssplayer-webgl/src/SSSurface.ts:37
Invert the vertical axis. Needed for borrowed contexts whose framebuffer Y convention is opposite a standalone canvas's default framebuffer — RPG Maker MZ's shared context, where SS otherwise draws upside-down. Owned surfaces leave this off.
maxDPR?
optionalmaxDPR?:number
Defined in: ssplayer-webgl/src/SSSurface.ts:11
pauseWhenHidden?
optionalpauseWhenHidden?:boolean
Defined in: ssplayer-webgl/src/SSSurface.ts:13
powerPreference?
optionalpowerPreference?:"default"|"low-power"|"high-performance"
Defined in: ssplayer-webgl/src/SSSurface.ts:12
premultipliedAlpha?
optionalpremultipliedAlpha?:boolean
Defined in: ssplayer-webgl/src/SSSurface.ts:8
stencil?
optionalstencil?:boolean
Defined in: ssplayer-webgl/src/SSSurface.ts:9