Class RenderAbstract

The main interface to the render engine, here WebGL (see superclass RenderWebGL and the RenderInjectors

Hierarchy (view full)

Properties

componentsPick: RecycableArray<ComponentPick> = ...
nodesPhysics: RecycableArray<Node> = ...
pickBuffer: Int32Array
rectClip: Rectangle = ...
texColor: WebGLTexture
texDepthStencil: WebGLTexture
texNormal: WebGLTexture
texPosition: WebGLTexture

Methods

  • Checks the first parameter and throws an exception with the WebGL-errorcode if the value is null

    Type Parameters

    • T

    Parameters

    • _value: T

      value to check against null

    • _message: string = ""

      optional, additional message for the exception

    Returns T

  • Initializes offscreen-canvas, renderingcontext and hardware viewport. Call once before creating any resources like meshes or shaders

    Parameters

    • Optional _antialias: boolean
    • Optional _alpha: boolean

    Returns WebGL2RenderingContext

  • Recursively iterates over the branch starting with the node given, recalculates all world transforms, collects all lights and feeds the renderbuffers with the neccessary node and component data to draw a frame. Sorts nodes for different render passes.

    Parameters

    • _branch: Node
    • _options: RenderPrepareOptions = Render.#defaultOptions
    • _recalculate: boolean = false

      set true to force recalculation of all world transforms in the given branch, even if their local transforms haven't changed

    Returns void