fast-mesh-wasm
    Preparing search index...

    Interface SceneLike

    What the adapters need from a scene: render buffers, placements, section results, change notification and drags. All methods are synchronous.

    interface SceneLike {
        bounds?(mesh: MeshHandle): Bounds | null;
        coloring?(mesh: MeshHandle): ColorRule | null;
        commitFrame(): MeshChange[];
        drag(mesh: MeshHandle): DragSession;
        matrix4(mesh: MeshHandle): Float64Array;
        onChanges(listener: (c: MeshChange[]) => void): () => void;
        placement(mesh: MeshHandle): Placement;
        section(s: SectionHandle, mesh: MeshHandle): SectionResult;
        sectionPlane(s: SectionHandle): SectionPlane;
        views(mesh: MeshHandle): MeshViews;
    }

    Implemented by

    Index
    • Views of the mesh's render buffers. Slot counts follow from them, so positions() must be exactly 3 × vertex slots long and indices() exactly 3 × triangle slots long (normals 3, colours 4 and UVs 2 per vertex slot, when present): positions().length / 3 vertex slots and indices().length / 3 triangle slots.

      Parameters

      Returns MeshViews