Constructs a new Rapid
instance with the given options.
Options for initializing the Rapid
instance.
Readonly
deviceReadonly
maxEnds the mask drawing process. This method configures the WebGL context to use the defined mask for subsequent rendering.
Renders a circle
The X coordinate of the circle's center
The Y coordinate of the circle's center
The radius of the circle
The color of the circle
The number of segments to use when rendering the circle, default is 32
Renders graphics based on the provided options or array of Vec2 points.
The X offset to apply when rendering the graphics. Defaults to 0.
The Y offset to apply when rendering the graphics. Defaults to 0.
Either an object containing graphic options or an array of Vec2 points.
Renders a line with the specified options.
The X offset to apply when rendering the line. Defaults to 0.
The Y offset to apply when rendering the line. Defaults to 0.
The options for rendering the line, including points and color.
Renders a rectangle
The X coordinate of the top-left corner of the rectangle
The Y coordinate of the top-left corner of the rectangle
The width of the rectangle
The height of the rectangle
The color of the rectangle
Renders a sprite with the specified texture, offset, and options.
The texture to render.
The X offset for the sprite. Defaults to 0.
The Y offset for the sprite. Defaults to 0.
Optional
options: Color | IRenderSpriteOptionsRendering options including color and custom shader.
Sets the mask type for rendering
The type of mask to apply
Sets the current render region by name and optionally a custom shader.
The name of the region to set as current.
Optional
customShader: GLShaderAn optional custom shader to use with the region.
The
Rapid
class provides a WebGL-based rendering engine.