sprunk-engine
    Preparing search index...

    An object that can be rendered to the WebGPU screen. Create the pipeline for rendering and set up the bind group layout.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    _bindGroupLayouts: null | GPUBindGroupLayout[] = null
    _mvpUniformBuffer: null | GPUBuffer = null
    _pipeline: null | GPURenderPipeline = null
    _renderEngine: Renderer

    Accessors

    Methods

    • Detach this behavior from the GameObject it is attached to.

      Parameters

      • from: GameObject

        The GameObject to detach this behavior from.

      Returns void

      Error if the behavior is not attached to the GameObject.

    • Protected

      Observe a LogicBehavior and call the observer function when the data changes.

      Type Parameters

      Parameters

      • BehaviorClass: new (...args: any[]) => T

        The specific LogicBehavior class type to observe.

      • observer: (data: U) => void

        The function to call when the data changes.

      Returns void

    • Like onEnable, but should only be for internal use, so some non-abstact direct behaviors could expose attachedOn to the user.

      Parameters

      • attachedOn: GameObject

        The GameObject this behavior is attached to.

      Returns void

      Error if the behavior is already attached to a GameObject.

    • Protected

      Called every frame. Override this method to add custom behavior.

      Parameters

      • _deltaTime: number

        The time in seconds since the last frame.

        • This method should not be called directly except by the GameEngineWindowComponent.

      Returns void