ThreePipe
    Preparing search index...

    Interface IGeometry<Attributes, TE>

    interface IGeometry<
        Attributes extends NormalOrGLBufferAttributes = NormalBufferAttributes,
        TE extends IGeometryEventMap = IGeometryEventMap,
    > {
        _uiConfig?: UiObjectConfig<any, string, any>;
        appliedMeshes: Set<
            IObject3D<
                IObject3DEventMap,
                undefined
                | IGeometry<NormalBufferAttributes, BufferGeometryEventMap>,
                undefined | IMaterial<IMaterialEventMap> | IMaterial<IMaterialEventMap>[],
            >,
        >;
        assetType: "geometry";
        isBufferGeometry: true;
        uiConfig?: UiObjectConfig<any, string, any>;
        userData: IGeometryUserData;
        center(
            offset?: Vector3,
            keepWorldPosition?: boolean,
            setDirty?: boolean,
        ): BufferGeometry;
        center2(offset?: Vector3, keepWorldPosition?: boolean): () => void;
        dispose(force?: boolean): void;
        refreshUi(): void;
        setDirty(options?: IGeometrySetDirtyOptions): void;
    }

    Type Parameters

    Hierarchy

    Implemented by

    Index

    Properties

    _uiConfig?: UiObjectConfig<any, string, any>
    appliedMeshes: Set<
        IObject3D<
            IObject3DEventMap,
            undefined
            | IGeometry<NormalBufferAttributes, BufferGeometryEventMap>,
            undefined | IMaterial<IMaterialEventMap> | IMaterial<IMaterialEventMap>[],
        >,
    >

    Objects in the scene that are using this geometry. This is set in the Object3DManager when the objects are added/removed from the scene. Do not modify this set directly.

    assetType: "geometry"
    isBufferGeometry: true

    Read-only flag to check if a given object is of type BufferGeometry.

    This is a constant value

    true

    uiConfig?: UiObjectConfig<any, string, any>

    An object that can be used to store custom data about the BufferGeometry. It should not hold references to functions as these will not be cloned.

    {}

    Methods

    • Centers the geometry.

      Parameters

      • Optionaloffset: Vector3

        returns the offset applied to the geometry

      • OptionalkeepWorldPosition: boolean

        Updates the attached meshes, so that the world position of the geometry remains the same.

      • OptionalsetDirty: boolean

      Returns BufferGeometry

    • Same as center but returns a function to undo the centering

      Parameters

      • Optionaloffset: Vector3
      • OptionalkeepWorldPosition: boolean

      Returns () => void

    • Disposes the geometry from the GPU. Set force to false if not sure the geometry is used by any object in the scene. // todo add check for visible in scene also? or is that overkill

      Parameters

      • Optionalforce: boolean

        when true, same as three.js dispose. when false, only disposes if disposeOnIdle not false and not used by any object in the scene. default: true

      Returns void