API reference

Every public class, method, and event in @codexo/exojs. Generated from source.

T

typeCanvasAlphaMode

@codexo/exojs / core / stable

How the finished frame composites against the page behind the canvas. - `'opaque'`: the canvas has no alpha channel. Whatever is behind it in the document never shows through, no matter what alpha the frame ends on. - `'premultiplied'`: the canvas keeps its alpha channel and the browser composites the frame over the page with it. Combine with a ApplicationOptions.clearColor whose alpha is below `1` to let the page show through. This is purely about the *browser-side* composite step. It says nothing about how the engine stores or blends colour internally: ExoJS renders premultiplied end to end - textures, render targets and blend modes alike - under both modes.

0
props
0
methods
0
events
Import
import { CanvasAlphaMode } from '@codexo/exojs'

How the finished frame composites against the page behind the canvas.

- `'opaque'`: the canvas has no alpha channel. Whatever is behind it in the document never shows through, no matter what alpha the frame ends on. - `'premultiplied'`: the canvas keeps its alpha channel and the browser composites the frame over the page with it. Combine with a ApplicationOptions.clearColor whose alpha is below `1` to let the page show through.

This is purely about the *browser-side* composite step. It says nothing about how the engine stores or blends colour internally: ExoJS renders premultiplied end to end - textures, render targets and blend modes alike - under both modes.

Definition1
"opaque" | "premultiplied"
Source