Fudge Core
    Preparing search index...

    Class RenderAbstract

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

    Hierarchy (View Summary)

    Index

    Properties

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

    Methods

    • Add an event listener to targetStatic.

      Parameters

      • _type: string
      • _handler: EventListener
      • Optional_options: boolean | AddEventListenerOptions

      Returns void

    • 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

    • Clear the offscreen renderbuffer with the given Color

      Parameters

      • Optional_color: Color
      • _colors: boolean = true
      • _depth: boolean = true
      • _stencil: boolean = true

      Returns void

    • 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

    • Remove an event listener from targetStatic.

      Parameters

      • _type: string
      • _handler: EventListener
      • Optional_options: boolean | AddEventListenerOptions

      Returns void

    • Enable / Disable WebGLs scissor test.

      Parameters

      • _test: boolean
      • Optional_x: number
      • Optional_y: number
      • Optional_width: number
      • Optional_height: number

      Returns void