Interface IGeometry<Attributes>

interface IGeometry<
    Attributes extends NormalOrGLBufferAttributes = NormalBufferAttributes,
> {
    _uiConfig?: UiObjectConfig;
    appliedMeshes: Set<IObject3D>;
    assetType: "geometry";
    uiConfig?: UiObjectConfig;
    userData: IGeometryUserData;
    center(
        offset?: Vector3,
        keepWorldPosition?: boolean,
        setDirty?: boolean,
    ): this;
    center2(offset?: Vector3, keepWorldPosition?: boolean): () => void;
    dispose(force?: boolean): void;
    refreshUi(): void;
    setDirty(options?: IGeometrySetDirtyOptions): void;
}

Type Parameters

Hierarchy

Implemented by

Properties

_uiConfig?: UiObjectConfig
appliedMeshes: Set<IObject3D>
assetType: "geometry"
uiConfig?: UiObjectConfig

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 this

  • 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