sej
    Preparing search index...

    Type Alias Renderer

    Renderer: {
        domElement: HTMLCanvasElement;
        freeze: boolean;
        dispose(): void;
        render(): void;
        setCamera(camera: Camera): void;
        setSize(width: number, height: number, updateStyle?: boolean): void;
    } & Test

    The renderer is class that handles the rendering of the scene. This is a low-level class that features the actual rendering logic.

    Write your own render method to change the look and feel of the scene.

    Type declaration

    • domElement: HTMLCanvasElement

      A canvas where the renderer draws its output.

    • freeze: boolean

      If true, the renderer will not render any new frames.

      false
      
    • dispose: function
      • Frees the GPU-related resources allocated by this instance. Call this method whenever this instance is no longer used in your app.

        Returns void

    • render: function
      • Render a single frame. Use this inside the requestAnimationFrame.

        Returns void

    • setCamera: function
      • Set the camera to be used by this renderer.

        Parameters

        • camera: Camera

          New camera to be used.

        Returns void

    • setSize: function
      • Resizes the output canvas to (width, height), and also sets the viewport to fit that size, starting in (0, 0).

        Parameters

        • width: number
        • height: number
        • OptionalupdateStyle: boolean

        Returns void