phaser-jsx
    Preparing search index...

    Variable CustomContextConst

    CustomContext: FC<GameObjectProps<CustomContext>> = ...

    The Custom Context is a game object that allows you to modify the drawing context before it is used.

    The Custom Context is an extended Container Game Object. Before game objects are rendered, it clones the current DrawingContext and passes it to a callback. You can configure this callback to set options on the DrawingContext.

    See the Phaser.Renderer.WebGL.DrawingContext documentation for more details on DrawingContext settings. This is an advanced rendering system and should be used carefully. You should mostly only use the setter methods on the DrawingContext object. Methods that don't begin with set are typically for internal use.

    If you modify the DrawingContext to create a new framebuffer, it will not render to the canvas. It is your responsibility to use the texture from the DrawingContext. It is very inefficient to create a new framebuffer every frame, though, so you should use a DynamicTexture with a retained framebuffer instead.