如视 Five SDK
    Preparing search index...

    Class PrefabBufferGeometry

    Hierarchy

    • BufferGeometry
      • PrefabBufferGeometry
    Index

    Constructors

    • A BufferGeometry where a 'prefab' geometry is repeated a number of times.

      Parameters

      • prefab: Geometry | BufferGeometry

        The Geometry instance to repeat.

      • count: number

        The number of times to repeat the geometry.

      Returns PrefabBufferGeometry

    Properties

    isPrefabBufferGeometry: boolean
    prefabCount: number
    prefabGeometry: Geometry | BufferGeometry
    prefabVertexCount: number

    Methods

    • Returns void

    • Returns void

    • Returns void

    • Returns void

    • Creates a BufferAttribute on this geometry instance.

      Parameters

      • name: string

        Name of the attribute.

      • itemSize: number

        Number of floats per vertex (typically 1, 2, 3 or 4).

      • Optionalfactory: (data: any[], index: number, prefabCount: number) => void

        Function that will be called for each prefab upon creation. Accepts 3 arguments: data[], index and prefabCount. Calls setPrefabData.

      Returns BufferAttribute

    • Sets data for all vertices of a prefab at a given index. Usually called in a loop.

      Parameters

      • attribute: string | BufferAttribute

        The attribute or attribute name where the data is to be stored.

      • prefabIndex: number

        Index of the prefab in the buffer geometry.

      • data: any[]

        Array of data. Length should be equal to item size of the attribute.

      Returns void