Bridges scene/view state changes into GPU-ready render state for the renderer.

  • MeshManager is owned by a ViewManager, which manages all Views for a single Viewer (not one ViewManager per View).
  • It acts as the central bridge between the scene graph (models, objects, meshes) and the renderer's GPU memory and batching subsystems.
  • Owns the renderer-side representation of:
  • Coordinates with GPUMemoryManager to allocate, update, and release GPU memory for mesh, geometry, and attribute data.
  • Maintains mesh batches for efficient rendering, minimizing draw calls and optimizing memory usage.
  • Handles registration and lifecycle of models, objects, and meshes in response to scene/view events.
  • Forwards per-frame and per-event updates (matrix, color, opacity, visibility, etc.) to the relevant renderer objects/meshes and/or GPUMemoryManager.
  • Used internally by the renderer; not accessed directly by application code.
  • The WebGLRenderer owns a single ViewManager for each renderer instance.
  • The ViewManager manages all Views for the Viewer.
  • The MeshManager is owned by the ViewManager and manages all renderer objects and meshes for all views.
  • MeshManager ensures that changes in the scene or any view are efficiently reflected in GPU state, supporting high-performance, multi-view rendering.

Constructors

Accessors

Methods

  • Returns the parameters required for a WebGL drawArrays call for a mesh within a batch.

    Parameters

    • batchIndex: number

      GPU memory batch index.

    • meshIndex: number

      Mesh index within the batch.

    Returns { count: number; first: number }

    {first, count} if available, otherwise null.

  • Handles changes to a ViewObject's opacity override.

    Updates the per-view opacity value on the owning RendererObject.

    Mirrors the colorize bridge's null-or-value contract: when the ViewObject's OPACITY_UPDATED flag is off (the caller passed null/undefined to clear the override), forward undefined so the renderer-side RendererMesh.setOpacityInView falls back to the SceneMesh's effectiveOpacity and clears the per-mesh ColoringOpacity flag — without this, a cleared override leaks to the renderer as an explicit opacity = 1 write, forces glass and curtain-wall meshes into the opaque bin, and produces uniform-dark rendering for affected models.

    The ViewObject.opacity getter itself can't return null because the field has type number for backwards compatibility — so the gating happens here, at the bridge, not in the getter.

    Parameters

    Returns void