Interface IScene<E, ET>

interface IScene<E, ET> {
    _currentGeometry?: null | IGeometry<NormalBufferAttributes>;
    _currentMaterial?: null | IMaterial<IMaterialEvent<IMaterialEventTypes>, IMaterialEventTypes> | IMaterial<IMaterialEvent<IMaterialEventTypes>, IMaterialEventTypes>[];
    _onGeometryUpdate?: ((e) => void);
    activeCamera: ICamera<ICameraEvent, ICameraEventTypes>;
    assetType: "model" | "light" | "camera" | "widget";
    background: null | "environment" | Color | ITexture;
    backgroundColor: null | Color;
    backgroundIntensity: number;
    children: IObject3D<IObject3DEvent<IObject3DEventTypes>, IObject3DEventTypes>[];
    defaultCamera: ICamera<ICameraEvent, ICameraEventTypes>;
    envMapIntensity: number;
    environment: null | ITexture;
    fixedEnvMapDirection: boolean;
    geometry?: IGeometry<NormalBufferAttributes>;
    isCamera?: boolean;
    isLight?: boolean;
    isLine?: boolean;
    isLineSegments?: boolean;
    isMesh?: boolean;
    isScene: true;
    isWidget?: boolean;
    mainCamera: ICamera<ICameraEvent, ICameraEventTypes>;
    material?: IMaterial<IMaterialEvent<IMaterialEventTypes>, IMaterialEventTypes> | IMaterial<IMaterialEvent<IMaterialEventTypes>, IMaterialEventTypes>[];
    materials?: IMaterial<IMaterialEvent<IMaterialEventTypes>, IMaterialEventTypes>[];
    modelObject: IScene<E, ET>;
    modelRoot: IObject3D<IObject3DEvent<IObject3DEventTypes>, IObject3DEventTypes>;
    morphTargetDictionary?: Record<string, number>;
    morphTargetInfluences?: number[];
    objectProcessor?: IObjectProcessor;
    parent: null | IObject3D<IObject3DEvent<IObject3DEventTypes>, IObject3DEventTypes>;
    parentRoot?: null | IObject3D<IObject3DEvent<IObject3DEventTypes>, IObject3DEventTypes>;
    renderCamera: ICamera<ICameraEvent, ICameraEventTypes>;
    type: "Scene";
    uiConfig?: UiObjectConfig<any, string, any>;
    userData: IObject3DUserData;
    visible: boolean;
    add(...object): this;
    addObject<T>(imported, options?): T & IObject3D<IObject3DEvent<IObject3DEventTypes>, IObject3DEventTypes>;
    autoCenter?(setDirty?): this;
    autoScale?(autoScaleRadius?, isCentered?, setDirty?): this;
    clone(recursive?): this;
    copy(source, recursive?): this;
    dispose(removeFromParent?): void;
    findObjectsByName(name, parent?): any[];
    getBounds(precise?, ignoreInvisible?): Box3B;
    getObjectById<T>(id): undefined | T;
    getObjectByName<T>(name): undefined | T;
    getObjectByProperty<T>(name, value): undefined | T;
    refreshUi(): void;
    remove(...object): this;
    setDirty(e?): void;
    toJSON(): any;
    traverse(callback): void;
    traverseAncestors(callback): void;
    traverseVisible(callback): void;
    updateMorphTargets?(): void;
    updateShaderProperties(material): this;
}

Type Parameters

Hierarchy (view full)

Implemented by

Properties

_currentGeometry?: null | IGeometry<NormalBufferAttributes>
_onGeometryUpdate?: ((e) => void)

Type declaration

Deprecated

renamed to mainCamera

assetType: "model" | "light" | "camera" | "widget"
background: null | "environment" | Color | ITexture
backgroundColor: null | Color
backgroundIntensity: number
envMapIntensity: number
environment: null | ITexture
fixedEnvMapDirection: boolean
isCamera?: boolean
isLight?: boolean
isLine?: boolean
isLineSegments?: boolean
isMesh?: boolean
isScene: true
isWidget?: boolean

Main camera that the user controls

Same as material but always returns an array.

modelObject: IScene<E, ET>

Deprecated

use object directly

morphTargetDictionary?: Record<string, number>
morphTargetInfluences?: number[]
objectProcessor?: IObjectProcessor

Parent/Ancestor of this object to bubble events to. This is set internally by setupObject3D.

Camera that in currently being rendered.

type: "Scene"
uiConfig?: UiObjectConfig<any, string, any>
visible: boolean

Methods

  • Parameters

    • Optional autoScaleRadius: number

      optional (taken from userData.autoScaleRadius by default)

    • Optional isCentered: boolean

      optional (taken from userData.isCentered by default)

    • Optional setDirty: boolean

      true by default

    Returns this

Generated using TypeDoc