Cosmos Journeyer API Documentation - v1.10.1
    Preparing search index...
    interface IPatch {
        clearInstances(): void;
        createInstances(
            baseMesh: { distance: number; mesh: TransformNode }[],
        ): void;
        getCurrentMesh(): TransformNode;
        getLodMeshes(): TransformNode[];
        getNbInstances(): number;
        handleLod(distance: number): void;
        isEnabled(): boolean;
        setEnabled(enabled: boolean): void;
    }

    Hierarchy

    • IDisposable
      • IPatch

    Implemented by

    Index

    Methods

    • Creates instances of a copy of the given base mesh (or transform node in the case of HierarchyInstancePatch). The instances will be positioned according to the matrix buffer given in the constructor.

      Parameters

      • baseMesh: { distance: number; mesh: TransformNode }[]

        The mesh to create instances from.

      Returns void

      Error if baseMesh is not a Mesh in the case of InstancePatch and ThinInstancePatch.