---
title: "Item3D | 3D JS | JavaScript maps SDK"
description: "Documentation for 3D objects"
---

> For AI agents: a documentation index is available at [/llms.txt](https://docs.maptiler.com/llms.txt). Markdown versions of all pages are available by appending .md to any URL.

# Interface Item3D

interface Item3D {  
    [\_eventedParent](#_eventedparent): Evented;  
    [\_eventedParentData](#_eventedparentdata): any;  
    [\_listeners](#_listeners): Listeners;  
    [\_oneTimeListeners](#_onetimelisteners): Listeners;  
    [additionalTransformationMatrix](#additionaltransformationmatrix): Matrix4;  
    [altitude](#altitude): number;  
    [altitudeReference](#altitudereference): [AltitudeReference](https://docs.maptiler.com/sdk-js/modules/3d/api/enums/AltitudeReference/);  
    [animationClips](#animationclips): AnimationClip\[\] | null;  
    [animationMode](#animationmode): [AnimationMode](https://docs.maptiler.com/sdk-js/modules/3d/api/types/AnimationMode/);  
    [bounds](#bounds): { box: Box3; sphere: Sphere };  
    [elevation](#elevation): number;  
    [heading](#heading): number;  
    [id](#id): string;  
    [lngLat](#lnglat): LngLat;  
    [mesh](#mesh):  
        | Object3D<Object3DEventMap\>  
        | Mesh<  
            BufferGeometry<NormalBufferAttributes\>,  
            Material | Material\[\],  
            Object3DEventMap,  
        \>  
        | Group<Object3DEventMap\>  
        | null;  
    [opacity](#opacity): number;  
    [pitch](#pitch): number;  
    [pointSize](#pointsize): number;  
    [roll](#roll): number;  
    [scale](#scale): \[number, number, number\];  
    [sourceOrientation](#sourceorientation): [SourceOrientation](https://docs.maptiler.com/sdk-js/modules/3d/api/enums/SourceOrientation/);  
    [transform](#transform): [Item3DTransform](https://docs.maptiler.com/sdk-js/modules/3d/api/types/Item3DTransform/);  
    [url](#url): string | null;  
    [userData](#userdata): Record<string, any\>;  
    [wireframe](#wireframe): boolean;  
    get [debug](#debugdebug)(): boolean;  
    set [debug](#debugdebug-1)(value: boolean): void;  
    ["\[getItem3DDollySymbol\]"](#getitem3ddollysymbol-1)(): Object3D<Object3DEventMap\> | null;  
    [addState](#addstate-1)(  
        name: [Item3DMeshUIStateName](https://docs.maptiler.com/sdk-js/modules/3d/api/types/Item3DMeshUIStateName/),  
        state: [Item3DMeshUIStateProperties](https://docs.maptiler.com/sdk-js/modules/3d/api/types/Item3DMeshUIStateProperties/),  
    ): Item3D;  
    [clone](#clone-1)(newId?: string, options?: [AddMeshFromURLOptions](https://docs.maptiler.com/sdk-js/modules/3d/api/types/AddMeshFromURLOptions/)): Item3D;  
    [fire](#fire-1)(event: string | Event$1, properties?: any): this;  
    [getAnimation](#getanimation-1)(animationName: string): AnimationAction | null;  
    [getAnimationNames](#getanimationnames-1)(): string\[\];  
    [intersects](#intersects-1)(item3D: Item3D, precision?: "low" | "medium"): boolean;  
    [listens](#listens-1)(type: string): boolean;  
    [modify](#modify-1)(options: Omit<Partial<[MeshOptions](https://docs.maptiler.com/sdk-js/modules/3d/api/types/MeshOptions/)\>, "states" | "userData"\>): Item3D;  
    [moveBy](#moveby-1)(  
        offset: { x: number; y: number; z: number },  
        units?: "meters" | "feet" | "km" | "miles",  
        cueRepaint?: boolean,  
    ): Item3D;  
    [off](#off-1)(event: [Item3DEventTypes](https://docs.maptiler.com/sdk-js/modules/3d/api/types/Item3DEventTypes/), callback: (event: any) \=> void): Item3D;  
    [on](#on-1)(event: [Item3DEventTypes](https://docs.maptiler.com/sdk-js/modules/3d/api/types/Item3DEventTypes/), callback: (event: any) \=> void): Subscription;  
    [once](#once-1)(type: string, listener?: Listener): Item3D | Promise<any\>;  
    [pauseAnimation](#pauseanimation-1)(animationName: string): Item3D | undefined;  
    [playAnimation](#playanimation-1)(  
        animationName: string,  
        loop?: "once" | "loop" | "pingPong",  
    ): Item3D | undefined;  
    [remove](#remove-1)(): void;  
    [removeState](#removestate-1)(name: [Item3DMeshUIStateName](https://docs.maptiler.com/sdk-js/modules/3d/api/types/Item3DMeshUIStateName/)): Item3D;  
    [setAltitude](#setaltitude-1)(altitude: number, cueRepaint?: boolean): Item3D;  
    [setAltitudeReference](#setaltitudereference-1)(  
        altitudeReference: [AltitudeReference](https://docs.maptiler.com/sdk-js/modules/3d/api/enums/AltitudeReference/),  
        cueRepaint?: boolean,  
    ): Item3D;  
    [setAnimationTime](#setanimationtime-1)(time: number): void;  
    [setElevation](#setelevation-1)(elevation: number, cueRepaint?: boolean): Item3D;  
    [setEventedParent](#seteventedparent-1)(parent?: Evented | null, data?: any): this;  
    [setHeading](#setheading-1)(heading: number, cueRepaint?: boolean): Item3D;  
    [setLngLat](#setlnglat-1)(lngLat: LngLat, cueRepaint?: boolean): Item3D;  
    [setOpacity](#setopacity-1)(opacity: number, cueRepaint?: boolean): Item3D;  
    [setPitch](#setpitch-1)(pitchInDegrees: number, cueRepaint?: boolean): Item3D;  
    [setPointSize](#setpointsize-1)(size: number, cueRepaint?: boolean): Item3D;  
    [setPositionRelativeTo](#setpositionrelativeto-1)(  
        item: Item3D | Position3D,  
        offset: { x: number; y: number; z: number },  
        units?: "meters" | "feet" | "km" | "miles",  
        cueRepaint?: boolean,  
    ): Item3D;  
    [setRelativeScale](#setrelativescale-1)(  
        scale: number | \[number, number, number\],  
        cueRepaint?: boolean,  
    ): Item3D;  
    [setRoll](#setroll-1)(rollInDegrees: number, cueRepaint?: boolean): Item3D;  
    [setScale](#setscale-1)(  
        scale: number | \[number, number, number\],  
        cueRepaint?: boolean,  
    ): Item3D;  
    [setSourceOrientation](#setsourceorientation-1)(  
        sourceOrientation: [SourceOrientation](https://docs.maptiler.com/sdk-js/modules/3d/api/enums/SourceOrientation/),  
        cueRepaint?: boolean,  
    ): Item3D;  
    [setStates](#setstates-1)(  
        stateUpdate:  
            | [Item3DMeshUIStates](https://docs.maptiler.com/sdk-js/modules/3d/api/types/Item3DMeshUIStates/)  
            | ((currentState: [Item3DMeshUIStates](https://docs.maptiler.com/sdk-js/modules/3d/api/types/Item3DMeshUIStates/)) \=> [Item3DMeshUIStates](https://docs.maptiler.com/sdk-js/modules/3d/api/types/Item3DMeshUIStates/)),  
    ): Item3D;  
    [setTransform](#settransform-1)(transform?: Partial<[Item3DTransform](https://docs.maptiler.com/sdk-js/modules/3d/api/types/Item3DTransform/)\>): Item3D;  
    [setWireframe](#setwireframe-1)(wireframe?: boolean, cueRepaint?: boolean): Item3D;  
    [stopAnimation](#stopanimation-1)(animationName: string): Item3D | undefined;  
    [updateAnimation](#updateanimation-1)(delta?: number): void;  
}

#### Hierarchy

-   Evented
    -   Item3D

-   Defined in [src/Item3D.ts:166](https://github.com/maptiler/maptiler-3d-js/blob/d1455de4164bd626ae604b498181010b0ec9ac4b/src/Item3D.ts#L166)

##### Index

### Properties

[\_eventedParent](#_eventedparent) [\_eventedParentData](#_eventedparentdata) [\_listeners](#_listeners) [\_oneTimeListeners](#_onetimelisteners) [additionalTransformationMatrix](#additionaltransformationmatrix) [altitude](#altitude) [altitudeReference](#altitudereference) [animationClips](#animationclips) [animationMode](#animationmode) [bounds](#bounds) [elevation](#elevation) [heading](#heading) [id](#id) [lngLat](#lnglat) [mesh](#mesh) [opacity](#opacity) [pitch](#pitch) [pointSize](#pointsize) [roll](#roll) [scale](#scale) [sourceOrientation](#sourceorientation) [transform](#transform) [url](#url) [userData](#userdata) [wireframe](#wireframe)

### Accessors

[debug](#debug)

### Methods

[\[getItem3DDollySymbol\]](#getitem3ddollysymbol) [addState](#addstate) [clone](#clone) [fire](#fire) [getAnimation](#getanimation) [getAnimationNames](#getanimationnames) [intersects](#intersects) [listens](#listens) [modify](#modify) [moveBy](#moveby) [off](#off) [on](#on) [once](#once) [pauseAnimation](#pauseanimation) [playAnimation](#playanimation) [remove](#remove) [removeState](#removestate) [setAltitude](#setaltitude) [setAltitudeReference](#setaltitudereference) [setAnimationTime](#setanimationtime) [setElevation](#setelevation) [setEventedParent](#seteventedparent) [setHeading](#setheading) [setLngLat](#setlnglat) [setOpacity](#setopacity) [setPitch](#setpitch) [setPointSize](#setpointsize) [setPositionRelativeTo](#setpositionrelativeto) [setRelativeScale](#setrelativescale) [setRoll](#setroll) [setScale](#setscale) [setSourceOrientation](#setsourceorientation) [setStates](#setstates) [setTransform](#settransform) [setWireframe](#setwireframe) [stopAnimation](#stopanimation) [updateAnimation](#updateanimation)

## Properties

### \_eventedParent[](#_eventedparent)

\_eventedParent: Evented

Inherited from Evented.\_eventedParent

-   Defined in node\_modules/maplibre-gl/dist/maplibre-gl.d.ts:827

### \_eventedParentData[](#_eventedparentdata)

\_eventedParentData: any

Inherited from Evented.\_eventedParentData

-   Defined in node\_modules/maplibre-gl/dist/maplibre-gl.d.ts:828

### \_listeners[](#_listeners)

\_listeners: Listeners

Inherited from Evented.\_listeners

-   Defined in node\_modules/maplibre-gl/dist/maplibre-gl.d.ts:825

### \_oneTimeListeners[](#_onetimelisteners)

\_oneTimeListeners: Listeners

Inherited from Evented.\_oneTimeListeners

-   Defined in node\_modules/maplibre-gl/dist/maplibre-gl.d.ts:826

### additionalTransformationMatrix[](#additionaltransformationmatrix)

additionalTransformationMatrix: Matrix4

The additional transformation matrix of the item, this is used to apply additional transformations to the item

-   Defined in [src/Item3D.ts:309](https://github.com/maptiler/maptiler-3d-js/blob/d1455de4164bd626ae604b498181010b0ec9ac4b/src/Item3D.ts#L309)

### altitude[](#altitude)

altitude: number = 0

The altitude of the item, altitude is the height of the model above the ground

-   Defined in [src/Item3D.ts:209](https://github.com/maptiler/maptiler-3d-js/blob/d1455de4164bd626ae604b498181010b0ec9ac4b/src/Item3D.ts#L209)

### altitudeReference[](#altitudereference)

altitudeReference: [AltitudeReference](https://docs.maptiler.com/sdk-js/modules/3d/api/enums/AltitudeReference/) = AltitudeReference.GROUND

The altitude reference of the item, can be "ground" or "sea"

-   Defined in [src/Item3D.ts:240](https://github.com/maptiler/maptiler-3d-js/blob/d1455de4164bd626ae604b498181010b0ec9ac4b/src/Item3D.ts#L240)

### animationClips[](#animationclips)

animationClips: AnimationClip\[\] | null = null

The animation clips of the item

#### See[](#see)

[https://threejs.org/docs/#api/en/animation/AnimationClip](https://threejs.org/docs/#api/en/animation/AnimationClip)

-   Defined in [src/Item3D.ts:277](https://github.com/maptiler/maptiler-3d-js/blob/d1455de4164bd626ae604b498181010b0ec9ac4b/src/Item3D.ts#L277)

### animationMode[](#animationmode)

animationMode: [AnimationMode](https://docs.maptiler.com/sdk-js/modules/3d/api/types/AnimationMode/) = "continuous"

The animation mode of the item, can be "continuous" or "manual" if "continuous", the animation will play continuously if "manual", the animation needs to be manually updated by calling the `updateAnimation` method

-   Defined in [src/Item3D.ts:283](https://github.com/maptiler/maptiler-3d-js/blob/d1455de4164bd626ae604b498181010b0ec9ac4b/src/Item3D.ts#L283)

### `Protected`bounds[](#bounds)

bounds: { box: Box3; sphere: Sphere } = ...

-   Defined in [src/Item3D.ts:1331](https://github.com/maptiler/maptiler-3d-js/blob/d1455de4164bd626ae604b498181010b0ec9ac4b/src/Item3D.ts#L1331)

### elevation[](#elevation)

elevation: number = 0

Elevation is the height of the model at ground level, this is used to calculate the altitude / transform of the item

-   Defined in [src/Item3D.ts:205](https://github.com/maptiler/maptiler-3d-js/blob/d1455de4164bd626ae604b498181010b0ec9ac4b/src/Item3D.ts#L205)

### heading[](#heading)

heading: number = 0

The heading of the item, in degrees

-   Defined in [src/Item3D.ts:223](https://github.com/maptiler/maptiler-3d-js/blob/d1455de4164bd626ae604b498181010b0ec9ac4b/src/Item3D.ts#L223)

### `Readonly`id[](#id)

id: string

The id of the item, this is used to identify the item in the layer and set in the constructor when the item is created in the Layer3D class

#### See[](#see-1)

-   Defined in [src/Item3D.ts:174](https://github.com/maptiler/maptiler-3d-js/blob/d1455de4164bd626ae604b498181010b0ec9ac4b/src/Item3D.ts#L174)

### lngLat[](#lnglat)

lngLat: LngLat

The lngLat of the item

#### See[](#see-2)

[https://docs.maptiler.com/sdk-js/api/geography/#lnglat](https://docs.maptiler.com/sdk-js/api/geography/#lnglat)

-   Defined in [src/Item3D.ts:201](https://github.com/maptiler/maptiler-3d-js/blob/d1455de4164bd626ae604b498181010b0ec9ac4b/src/Item3D.ts#L201)

### `Readonly`mesh[](#mesh)

mesh:  
    | Object3D<Object3DEventMap\>  
    | Mesh<  
        BufferGeometry<NormalBufferAttributes\>,  
        Material | Material\[\],  
        Object3DEventMap,  
    \>  
    | Group<Object3DEventMap\>  
    | null = null

The Three.js mesh, group or object3d that is being rendered

#### See[](#see-3)

-   [https://threejs.org/docs/#api/en/objects/Mesh](https://threejs.org/docs/#api/en/objects/Mesh)
-   [https://threejs.org/docs/#api/en/objects/Group](https://threejs.org/docs/#api/en/objects/Group)
-   [https://threejs.org/docs/#api/en/core/Object3D](https://threejs.org/docs/#api/en/core/Object3D)

-   Defined in [src/Item3D.ts:181](https://github.com/maptiler/maptiler-3d-js/blob/d1455de4164bd626ae604b498181010b0ec9ac4b/src/Item3D.ts#L181)

### opacity[](#opacity)

opacity: number = 1

The opacity of the item

-   Defined in [src/Item3D.ts:248](https://github.com/maptiler/maptiler-3d-js/blob/d1455de4164bd626ae604b498181010b0ec9ac4b/src/Item3D.ts#L248)

### pitch[](#pitch)

pitch: number = 0

The pitch of the item, in degrees

-   Defined in [src/Item3D.ts:227](https://github.com/maptiler/maptiler-3d-js/blob/d1455de4164bd626ae604b498181010b0ec9ac4b/src/Item3D.ts#L227)

### pointSize[](#pointsize)

pointSize: number = 1

The point size of the item (if drawing points)

-   Defined in [src/Item3D.ts:256](https://github.com/maptiler/maptiler-3d-js/blob/d1455de4164bd626ae604b498181010b0ec9ac4b/src/Item3D.ts#L256)

### roll[](#roll)

roll: number = 0

The roll of the item, in degrees

-   Defined in [src/Item3D.ts:232](https://github.com/maptiler/maptiler-3d-js/blob/d1455de4164bd626ae604b498181010b0ec9ac4b/src/Item3D.ts#L232)

### scale[](#scale)

scale: \[number, number, number\] = ...

The scale of the item \[x, y, z\].

-   Defined in [src/Item3D.ts:213](https://github.com/maptiler/maptiler-3d-js/blob/d1455de4164bd626ae604b498181010b0ec9ac4b/src/Item3D.ts#L213)

### sourceOrientation[](#sourceorientation)

sourceOrientation: [SourceOrientation](https://docs.maptiler.com/sdk-js/modules/3d/api/enums/SourceOrientation/) = SourceOrientation.Y\_UP

The source orientation of the item, can be "y-up" or "z-up"

-   Defined in [src/Item3D.ts:236](https://github.com/maptiler/maptiler-3d-js/blob/d1455de4164bd626ae604b498181010b0ec9ac4b/src/Item3D.ts#L236)

### transform[](#transform)

transform: [Item3DTransform](https://docs.maptiler.com/sdk-js/modules/3d/api/types/Item3DTransform/) = ...

The default state of the item, used for UI states

-   Defined in [src/Item3D.ts:262](https://github.com/maptiler/maptiler-3d-js/blob/d1455de4164bd626ae604b498181010b0ec9ac4b/src/Item3D.ts#L262)

### `Readonly`url[](#url)

url: string | null

The url of the item, if the item is a model, this is the url of the model

-   Defined in [src/Item3D.ts:244](https://github.com/maptiler/maptiler-3d-js/blob/d1455de4164bd626ae604b498181010b0ec9ac4b/src/Item3D.ts#L244)

### userData[](#userdata)

userData: Record<string, any\> = {}

Custom user data of the item This can be used to store any custom data that the user wants

-   Defined in [src/Item3D.ts:330](https://github.com/maptiler/maptiler-3d-js/blob/d1455de4164bd626ae604b498181010b0ec9ac4b/src/Item3D.ts#L330)

### wireframe[](#wireframe)

wireframe: boolean = false

Whether the item is rendering as a wireframe

-   Defined in [src/Item3D.ts:252](https://github.com/maptiler/maptiler-3d-js/blob/d1455de4164bd626ae604b498181010b0ec9ac4b/src/Item3D.ts#L252)

## Accessors

### debug[](#debug)

-   get debug(): boolean
    
    When true, renders bounding boxes and bounding spheres for each internal mesh (for debugging).
    
    #### Returns boolean
    
    -   Defined in [src/Item3D.ts:288](https://github.com/maptiler/maptiler-3d-js/blob/d1455de4164bd626ae604b498181010b0ec9ac4b/src/Item3D.ts#L288)
    
-   set debug(value: boolean): void
    
    #### Parameters
    
    -   value: boolean
    
    #### Returns void
    
    -   Defined in [src/Item3D.ts:291](https://github.com/maptiler/maptiler-3d-js/blob/d1455de4164bd626ae604b498181010b0ec9ac4b/src/Item3D.ts#L291)
    

## Methods

### \[getItem3DDollySymbol\][](#getitem3ddollysymbol)

-   "\[getItem3DDollySymbol\]"(): Object3D<Object3DEventMap\> | null[](#getitem3ddollysymbol-1)
    
    Get the dolly of the item
    
    #### Returns Object3D<Object3DEventMap\> | null
    
    The dolly
    
    -   Defined in [src/Item3D.ts:193](https://github.com/maptiler/maptiler-3d-js/blob/d1455de4164bd626ae604b498181010b0ec9ac4b/src/Item3D.ts#L193)
    

### addState[](#addstate)

-   addState(  
        name: [Item3DMeshUIStateName](https://docs.maptiler.com/sdk-js/modules/3d/api/types/Item3DMeshUIStateName/),  
        state: [Item3DMeshUIStateProperties](https://docs.maptiler.com/sdk-js/modules/3d/api/types/Item3DMeshUIStateProperties/),  
    ): Item3D[](#addstate-1)
    
    Add a state to the item.
    
    #### Parameters
    
    -   name: [Item3DMeshUIStateName](https://docs.maptiler.com/sdk-js/modules/3d/api/types/Item3DMeshUIStateName/)
        
        The name of the state to add
        
    -   state: [Item3DMeshUIStateProperties](https://docs.maptiler.com/sdk-js/modules/3d/api/types/Item3DMeshUIStateProperties/)
        
        The state to add
        
    
    #### Returns Item3D
    
    The item
    
    -   Defined in [src/Item3D.ts:743](https://github.com/maptiler/maptiler-3d-js/blob/d1455de4164bd626ae604b498181010b0ec9ac4b/src/Item3D.ts#L743)
    

### clone[](#clone)

-   clone(newId?: string, options?: [AddMeshFromURLOptions](https://docs.maptiler.com/sdk-js/modules/3d/api/types/AddMeshFromURLOptions/)): Item3D[](#clone-1)
    
    Clone this item and add it to the layer. The cloned item shares the same mesh geometry and animations but has its own materials and transform.
    
    #### Parameters
    
    -   `Optional`newId: string
        
        The ID for the cloned item. If omitted, defaults to `${this.id}-clone`.
        
    -   options: [AddMeshFromURLOptions](https://docs.maptiler.com/sdk-js/modules/3d/api/types/AddMeshFromURLOptions/) = {}
        
        Options to override properties on the clone (e.g. lngLat, altitude, transform).
        
    
    #### Returns Item3D
    
    The new Item3D instance.
    
    -   Defined in [src/Item3D.ts:508](https://github.com/maptiler/maptiler-3d-js/blob/d1455de4164bd626ae604b498181010b0ec9ac4b/src/Item3D.ts#L508)
    

### fire[](#fire)

-   fire(event: string | Event$1, properties?: any): this[](#fire-1)
    
    #### Parameters
    
    -   event: string | Event$1
    -   `Optional`properties: any
    
    #### Returns this
    
    Inherited from Evented.fire
    
    -   Defined in node\_modules/maplibre-gl/dist/maplibre-gl.d.ts:855
    

### getAnimation[](#getanimation)

-   getAnimation(animationName: string): AnimationAction | null[](#getanimation-1)
    
    Get an animation by name
    
    #### Parameters
    
    -   animationName: string
        
        The name of the animation to get
        
    
    #### Returns AnimationAction | null
    
    The animation action or null if not found
    
    -   Defined in [src/Item3D.ts:1223](https://github.com/maptiler/maptiler-3d-js/blob/d1455de4164bd626ae604b498181010b0ec9ac4b/src/Item3D.ts#L1223)
    

### getAnimationNames[](#getanimationnames)

-   getAnimationNames(): string\[\][](#getanimationnames-1)
    
    Get the names of the animations of a mesh
    
    #### Returns string\[\]
    
    The names of all the animations of the mesh
    
    -   Defined in [src/Item3D.ts:1264](https://github.com/maptiler/maptiler-3d-js/blob/d1455de4164bd626ae604b498181010b0ec9ac4b/src/Item3D.ts#L1264)
    

### intersects[](#intersects)

-   intersects(item3D: Item3D, precision?: "low" | "medium"): boolean[](#intersects-1)
    
    Check if the item intersects with another item
    
    #### Parameters
    
    -   item3D: Item3D
        
        The item to check intersection with
        
    -   precision: "low" | "medium" = "medium"
        
        The precision of the intersection check, can be "low" or "medium". "high" is not supported currently. "low" is the fastest and least accurate check, it only checks the bounding sphere and AABB of the entire group. "medium" is the default check, it does a broad pass first, then checks the OBB of the individual meshes within the group. This is less and less performant as the number of meshes in the group increases.
        
    
    #### Returns boolean
    
    True if the items intersect, false otherwise
    
    -   Defined in [src/Item3D.ts:1344](https://github.com/maptiler/maptiler-3d-js/blob/d1455de4164bd626ae604b498181010b0ec9ac4b/src/Item3D.ts#L1344)
    

### listens[](#listens)

-   listens(type: string): boolean[](#listens-1)
    
    Returns a true if this instance of Evented or any forwardeed instances of Evented have a listener for the specified type.
    
    #### Parameters
    
    -   type: string
        
        The event type
        
    
    #### Returns boolean
    
    `true` if there is at least one registered listener for specified event type, `false` otherwise
    
    Inherited from Evented.listens
    
    -   Defined in node\_modules/maplibre-gl/dist/maplibre-gl.d.ts:862
    

### modify[](#modify)

-   modify(options: Omit<Partial<[MeshOptions](https://docs.maptiler.com/sdk-js/modules/3d/api/types/MeshOptions/)\>, "states" | "userData"\>): Item3D[](#modify-1)
    
    Modify the item with a set of options
    
    #### Parameters
    
    -   options: Omit<Partial<[MeshOptions](https://docs.maptiler.com/sdk-js/modules/3d/api/types/MeshOptions/)\>, "states" | "userData"\>
        
        The options to modify the item with
        
    
    #### Returns Item3D
    
    The item
    
    -   Defined in [src/Item3D.ts:787](https://github.com/maptiler/maptiler-3d-js/blob/d1455de4164bd626ae604b498181010b0ec9ac4b/src/Item3D.ts#L787)
    

### moveBy[](#moveby)

-   moveBy(  
        offset: { x: number; y: number; z: number },  
        units?: "meters" | "feet" | "km" | "miles",  
        cueRepaint?: boolean,  
    ): Item3D[](#moveby-1)
    
    Move the item by a given offset
    
    #### Parameters
    
    -   offset: { x: number; y: number; z: number }
        
        The offset to move the item by, can be "x", "y" or "z". where "y" is the altitude offset, "x" is the longitude offset and "z" is the latitude offset
        
    -   units: "meters" | "feet" | "km" | "miles" = "meters"
        
        The units of the offset, can be "meters", "feet", "km" or "miles", defaults to "meters"
        
    -   cueRepaint: boolean = true
        
        Whether to cue a repaint, if false, the repaint will be triggered only when the map is updated
        
    
    #### Returns Item3D
    
    The current instance of Item3D
    
    -   Defined in [src/Item3D.ts:945](https://github.com/maptiler/maptiler-3d-js/blob/d1455de4164bd626ae604b498181010b0ec9ac4b/src/Item3D.ts#L945)
    

### off[](#off)

-   off(event: [Item3DEventTypes](https://docs.maptiler.com/sdk-js/modules/3d/api/types/Item3DEventTypes/), callback: (event: any) \=> void): Item3D[](#off-1)
    
    Unregister an event listener for the item
    
    #### Parameters
    
    -   event: [Item3DEventTypes](https://docs.maptiler.com/sdk-js/modules/3d/api/types/Item3DEventTypes/)
        
        The event to unregister
        
    -   callback: (event: any) \=> void
        
        The callback to unregister
        
    
    #### Returns Item3D
    
    The item
    
    Overrides Evented.off
    
    -   Defined in [src/Item3D.ts:497](https://github.com/maptiler/maptiler-3d-js/blob/d1455de4164bd626ae604b498181010b0ec9ac4b/src/Item3D.ts#L497)
    

### on[](#on)

-   on(event: [Item3DEventTypes](https://docs.maptiler.com/sdk-js/modules/3d/api/types/Item3DEventTypes/), callback: (event: any) \=> void): Subscription[](#on-1)
    
    Register an event listener for the item
    
    #### Parameters
    
    -   event: [Item3DEventTypes](https://docs.maptiler.com/sdk-js/modules/3d/api/types/Item3DEventTypes/)
        
        The event to listen for
        
    -   callback: (event: any) \=> void
        
        The callback to call when the event is triggered
        
    
    #### Returns Subscription
    
    The item
    
    Overrides Evented.on
    
    -   Defined in [src/Item3D.ts:486](https://github.com/maptiler/maptiler-3d-js/blob/d1455de4164bd626ae604b498181010b0ec9ac4b/src/Item3D.ts#L486)
    

### once[](#once)

-   once(type: string, listener?: Listener): Item3D | Promise<any\>[](#once-1)
    
    Adds a listener that will be called only once to a specified event type.
    
    The listener will be called first time the event fires after the listener is registered.
    
    #### Parameters
    
    -   type: string
        
        The event type to listen for.
        
    -   `Optional`listener: Listener
        
        The function to be called when the event is fired the first time.
        
    
    #### Returns Item3D | Promise<any\>
    
    `this` or a promise if a listener is not provided
    
    Inherited from Evented.once
    
    -   Defined in node\_modules/maplibre-gl/dist/maplibre-gl.d.ts:854
    

### pauseAnimation[](#pauseanimation)

-   pauseAnimation(animationName: string): Item3D | undefined[](#pauseanimation-1)
    
    Pause an animation
    
    #### Parameters
    
    -   animationName: string
        
        The name of the animation to pause
        
    
    #### Returns Item3D | undefined
    
    -   Defined in [src/Item3D.ts:1232](https://github.com/maptiler/maptiler-3d-js/blob/d1455de4164bd626ae604b498181010b0ec9ac4b/src/Item3D.ts#L1232)
    

### playAnimation[](#playanimation)

-   playAnimation(  
        animationName: string,  
        loop?: "once" | "loop" | "pingPong",  
    ): Item3D | undefined[](#playanimation-1)
    
    Play an animation
    
    #### Parameters
    
    -   animationName: string
        
        The name of the animation to play
        
    -   `Optional`loop: "once" | "loop" | "pingPong"
        
        The loop type of the animation, can either be "loop", "once" or "pingPong"
        
    
    #### Returns Item3D | undefined
    
    -   Defined in [src/Item3D.ts:1196](https://github.com/maptiler/maptiler-3d-js/blob/d1455de4164bd626ae604b498181010b0ec9ac4b/src/Item3D.ts#L1196)
    

### remove[](#remove)

-   remove(): void[](#remove-1)
    
    #### Returns void
    
    -   Defined in [src/Item3D.ts:860](https://github.com/maptiler/maptiler-3d-js/blob/d1455de4164bd626ae604b498181010b0ec9ac4b/src/Item3D.ts#L860)
    

### removeState[](#removestate)

-   removeState(name: [Item3DMeshUIStateName](https://docs.maptiler.com/sdk-js/modules/3d/api/types/Item3DMeshUIStateName/)): Item3D[](#removestate-1)
    
    Remove a state from the item and calls the cleanup function.
    
    #### Parameters
    
    -   name: [Item3DMeshUIStateName](https://docs.maptiler.com/sdk-js/modules/3d/api/types/Item3DMeshUIStateName/)
        
        The name of the state to remove
        
    
    #### Returns Item3D
    
    The item
    
    -   Defined in [src/Item3D.ts:754](https://github.com/maptiler/maptiler-3d-js/blob/d1455de4164bd626ae604b498181010b0ec9ac4b/src/Item3D.ts#L754)
    

### setAltitude[](#setaltitude)

-   setAltitude(altitude: number, cueRepaint?: boolean): Item3D[](#setaltitude-1)
    
    Set the altitude of the item
    
    #### Parameters
    
    -   altitude: number
        
        The altitude to set
        
    -   cueRepaint: boolean = true
        
        Whether to cue a repaint, if false, the repaint will be triggered only when the map is updated
        
    
    #### Returns Item3D
    
    The item
    
    -   Defined in [src/Item3D.ts:907](https://github.com/maptiler/maptiler-3d-js/blob/d1455de4164bd626ae604b498181010b0ec9ac4b/src/Item3D.ts#L907)
    

### setAltitudeReference[](#setaltitudereference)

-   setAltitudeReference(  
        altitudeReference: [AltitudeReference](https://docs.maptiler.com/sdk-js/modules/3d/api/enums/AltitudeReference/),  
        cueRepaint?: boolean,  
    ): Item3D[](#setaltitudereference-1)
    
    Set the altitude reference of the item
    
    #### Parameters
    
    -   altitudeReference: [AltitudeReference](https://docs.maptiler.com/sdk-js/modules/3d/api/enums/AltitudeReference/)
        
        The altitude reference to set
        
    -   cueRepaint: boolean = true
        
        Whether to cue a repaint, if false, the repaint will be triggered only when the map is updated
        
    
    #### Returns Item3D
    
    The item
    
    -   Defined in [src/Item3D.ts:1097](https://github.com/maptiler/maptiler-3d-js/blob/d1455de4164bd626ae604b498181010b0ec9ac4b/src/Item3D.ts#L1097)
    

### setAnimationTime[](#setanimationtime)

-   setAnimationTime(time: number): void[](#setanimationtime-1)
    
    Set the time of an animation to a specific time
    
    #### Parameters
    
    -   time: number
        
        The time to set the animation to
        
    
    #### Returns void
    
    -   Defined in [src/Item3D.ts:1289](https://github.com/maptiler/maptiler-3d-js/blob/d1455de4164bd626ae604b498181010b0ec9ac4b/src/Item3D.ts#L1289)
    

### setElevation[](#setelevation)

-   setElevation(elevation: number, cueRepaint?: boolean): Item3D[](#setelevation-1)
    
    Set the elevation of the item
    
    #### Parameters
    
    -   elevation: number
        
        The elevation to set
        
    -   cueRepaint: boolean = true
        
        Whether to cue a repaint, if false, the repaint will be triggered only when the map is updated
        
    
    #### Returns Item3D
    
    The item
    
    -   Defined in [src/Item3D.ts:972](https://github.com/maptiler/maptiler-3d-js/blob/d1455de4164bd626ae604b498181010b0ec9ac4b/src/Item3D.ts#L972)
    

### setEventedParent[](#seteventedparent)

-   setEventedParent(parent?: Evented | null, data?: any): this[](#seteventedparent-1)
    
    Bubble all events fired by this instance of Evented to this parent instance of Evented.
    
    #### Parameters
    
    -   `Optional`parent: Evented | null
    -   `Optional`data: any
    
    #### Returns this
    
    Inherited from Evented.setEventedParent
    
    -   Defined in node\_modules/maplibre-gl/dist/maplibre-gl.d.ts:866
    

### setHeading[](#setheading)

-   setHeading(heading: number, cueRepaint?: boolean): Item3D[](#setheading-1)
    
    Set the heading of the item
    
    #### Parameters
    
    -   heading: number
        
        The heading to set
        
    -   cueRepaint: boolean = true
        
        Whether to cue a repaint, if false, the repaint will be triggered only when the map is updated
        
    
    #### Returns Item3D
    
    The item
    
    -   Defined in [src/Item3D.ts:1029](https://github.com/maptiler/maptiler-3d-js/blob/d1455de4164bd626ae604b498181010b0ec9ac4b/src/Item3D.ts#L1029)
    

### setLngLat[](#setlnglat)

-   setLngLat(lngLat: LngLat, cueRepaint?: boolean): Item3D[](#setlnglat-1)
    
    Set the lngLat of the item
    
    #### Parameters
    
    -   lngLat: LngLat
        
        The lngLat to set
        
    -   cueRepaint: boolean = true
        
        Whether to cue a repaint, if false, the repaint will be triggered when only the map is updated
        
    
    #### Returns Item3D
    
    The item
    
    -   Defined in [src/Item3D.ts:893](https://github.com/maptiler/maptiler-3d-js/blob/d1455de4164bd626ae604b498181010b0ec9ac4b/src/Item3D.ts#L893)
    

### setOpacity[](#setopacity)

-   setOpacity(opacity: number, cueRepaint?: boolean): Item3D[](#setopacity-1)
    
    Traverse a Mesh/Group/Object3D to modify the opacities of the all the materials it finds
    
    #### Parameters
    
    -   opacity: number
        
        The opacity to set
        
    -   cueRepaint: boolean = true
        
        whether to cue a repaint, if false, the repaint will be triggered only when the map is updated
        
    
    #### Returns Item3D
    
    The layer
    
    -   Defined in [src/Item3D.ts:1149](https://github.com/maptiler/maptiler-3d-js/blob/d1455de4164bd626ae604b498181010b0ec9ac4b/src/Item3D.ts#L1149)
    

### setPitch[](#setpitch)

-   setPitch(pitchInDegrees: number, cueRepaint?: boolean): Item3D[](#setpitch-1)
    
    Set the pitch of the item
    
    #### Parameters
    
    -   pitchInDegrees: number
    -   cueRepaint: boolean = true
        
        Whether to cue a repaint, if false, the repaint will be triggered only when the map is updated
        
    
    #### Returns Item3D
    
    The item
    
    -   Defined in [src/Item3D.ts:1045](https://github.com/maptiler/maptiler-3d-js/blob/d1455de4164bd626ae604b498181010b0ec9ac4b/src/Item3D.ts#L1045)
    

### setPointSize[](#setpointsize)

-   setPointSize(size: number, cueRepaint?: boolean): Item3D[](#setpointsize-1)
    
    If a mesh is a point cloud, it defines the size of the points
    
    #### Parameters
    
    -   size: number
        
        The size to set
        
    -   cueRepaint: boolean = true
        
        whether to cue a repaint, if false, the repaint will be triggered when only the map is updated
        
    
    #### Returns Item3D
    
    The layer
    
    -   Defined in [src/Item3D.ts:1173](https://github.com/maptiler/maptiler-3d-js/blob/d1455de4164bd626ae604b498181010b0ec9ac4b/src/Item3D.ts#L1173)
    

### setPositionRelativeTo[](#setpositionrelativeto)

-   setPositionRelativeTo(  
        item: Item3D | Position3D,  
        offset: { x: number; y: number; z: number },  
        units?: "meters" | "feet" | "km" | "miles",  
        cueRepaint?: boolean,  
    ): Item3D[](#setpositionrelativeto-1)
    
    Set the position of the item relative to another Item3D
    
    #### Parameters
    
    -   item: Item3D | Position3D
        
        {Item3D | Position3D} - The item to set the position relative to can either be another Item3D or an object representing a 3D position.
        
    -   offset: { x: number; y: number; z: number }
        
        The offset to set the position relative to, can be "x", "y" or "z". where "y" is the altitude offset, "x" is the longitude offset and "z" is the latitude offset
        
    -   units: "meters" | "feet" | "km" | "miles" = "meters"
        
        The units of the offset, can be "meters", "feet", "km" or "miles", defaults to "meters"
        
    -   cueRepaint: boolean = true
        
        Whether to cue a repaint, if false, the repaint will be triggered only when the map is updated
        
    
    #### Returns Item3D
    
    The item
    
    -   Defined in [src/Item3D.ts:924](https://github.com/maptiler/maptiler-3d-js/blob/d1455de4164bd626ae604b498181010b0ec9ac4b/src/Item3D.ts#L924)
    

### setRelativeScale[](#setrelativescale)

-   setRelativeScale(  
        scale: number | \[number, number, number\],  
        cueRepaint?: boolean,  
    ): Item3D[](#setrelativescale-1)
    
    Set the relative scale of the item. The relative scale is the scale of the item relative to it's original scale. This is used internally to scale the item up or down from a state, but can also be called publicly to scale the item.
    
    #### Parameters
    
    -   scale: number | \[number, number, number\]
        
        The scale to set
        
    -   cueRepaint: boolean = true
        
        Whether to cue a repaint, if false, the repaint will be triggered only when the map is updated
        
    
    #### Returns Item3D
    
    The item
    
    -   Defined in [src/Item3D.ts:990](https://github.com/maptiler/maptiler-3d-js/blob/d1455de4164bd626ae604b498181010b0ec9ac4b/src/Item3D.ts#L990)
    

### setRoll[](#setroll)

-   setRoll(rollInDegrees: number, cueRepaint?: boolean): Item3D[](#setroll-1)
    
    Set the roll of the item
    
    #### Parameters
    
    -   rollInDegrees: number
    -   cueRepaint: boolean = true
        
        Whether to cue a repaint, if false, the repaint will be triggered only when the map is updated
        
    
    #### Returns Item3D
    
    The item
    
    -   Defined in [src/Item3D.ts:1064](https://github.com/maptiler/maptiler-3d-js/blob/d1455de4164bd626ae604b498181010b0ec9ac4b/src/Item3D.ts#L1064)
    

### setScale[](#setscale)

-   setScale(scale: number | \[number, number, number\], cueRepaint?: boolean): Item3D[](#setscale-1)
    
    Set the absolute scale of the item. The absolute scale is the scale of the item relative to the map.
    
    #### Parameters
    
    -   scale: number | \[number, number, number\]
        
        The scale to set
        
    -   cueRepaint: boolean = true
        
        Whether to cue a repaint, if false, the repaint will be triggered only when the map is updated
        
    
    #### Returns Item3D
    
    The item
    
    -   Defined in [src/Item3D.ts:1008](https://github.com/maptiler/maptiler-3d-js/blob/d1455de4164bd626ae604b498181010b0ec9ac4b/src/Item3D.ts#L1008)
    

### setSourceOrientation[](#setsourceorientation)

-   setSourceOrientation(  
        sourceOrientation: [SourceOrientation](https://docs.maptiler.com/sdk-js/modules/3d/api/enums/SourceOrientation/),  
        cueRepaint?: boolean,  
    ): Item3D[](#setsourceorientation-1)
    
    Set the source orientation of the item
    
    #### Parameters
    
    -   sourceOrientation: [SourceOrientation](https://docs.maptiler.com/sdk-js/modules/3d/api/enums/SourceOrientation/)
        
        The source orientation to set
        
    -   cueRepaint: boolean = true
        
        Whether to cue a repaint, if false, the repaint will be triggered only when the map is updated
        
    
    #### Returns Item3D
    
    The item
    
    -   Defined in [src/Item3D.ts:1083](https://github.com/maptiler/maptiler-3d-js/blob/d1455de4164bd626ae604b498181010b0ec9ac4b/src/Item3D.ts#L1083)
    

### setStates[](#setstates)

-   setStates(  
        stateUpdate:  
            | [Item3DMeshUIStates](https://docs.maptiler.com/sdk-js/modules/3d/api/types/Item3DMeshUIStates/)  
            | ((currentState: [Item3DMeshUIStates](https://docs.maptiler.com/sdk-js/modules/3d/api/types/Item3DMeshUIStates/)) \=> [Item3DMeshUIStates](https://docs.maptiler.com/sdk-js/modules/3d/api/types/Item3DMeshUIStates/)),  
    ): Item3D[](#setstates-1)
    
    Maps the state config to the internal state Map, set up handlers and store the state and cleanup function. This is only used on Item3D construction to set the initial states but can be called publicly.
    
    #### Parameters
    
    -   stateUpdate: [Item3DMeshUIStates](https://docs.maptiler.com/sdk-js/modules/3d/api/types/Item3DMeshUIStates/) | ((currentState: [Item3DMeshUIStates](https://docs.maptiler.com/sdk-js/modules/3d/api/types/Item3DMeshUIStates/)) \=> [Item3DMeshUIStates](https://docs.maptiler.com/sdk-js/modules/3d/api/types/Item3DMeshUIStates/))
        
        The states to set
        
    
    #### Returns Item3D
    
    The item
    
    -   Defined in [src/Item3D.ts:703](https://github.com/maptiler/maptiler-3d-js/blob/d1455de4164bd626ae604b498181010b0ec9ac4b/src/Item3D.ts#L703)
    

### setTransform[](#settransform)

-   setTransform(transform?: Partial<[Item3DTransform](https://docs.maptiler.com/sdk-js/modules/3d/api/types/Item3DTransform/)\>): Item3D[](#settransform-1)
    
    Set the transform of the item
    
    #### Parameters
    
    -   `Optional`transform: Partial<[Item3DTransform](https://docs.maptiler.com/sdk-js/modules/3d/api/types/Item3DTransform/)\>
        
        The transform to set
        
    
    #### Returns Item3D
    
    The item
    
    -   Defined in [src/Item3D.ts:766](https://github.com/maptiler/maptiler-3d-js/blob/d1455de4164bd626ae604b498181010b0ec9ac4b/src/Item3D.ts#L766)
    

### setWireframe[](#setwireframe)

-   setWireframe(wireframe?: boolean, cueRepaint?: boolean): Item3D[](#setwireframe-1)
    
    Set the wireframe of the item
    
    #### Parameters
    
    -   `Optional`wireframe: boolean
        
        whether to set the wireframe of the item
        
    -   cueRepaint: boolean = true
        
        Whether to cue a repaint, if false, the repaint will be triggered only when the map is updated
        
    
    #### Returns Item3D
    
    The item
    
    -   Defined in [src/Item3D.ts:1111](https://github.com/maptiler/maptiler-3d-js/blob/d1455de4164bd626ae604b498181010b0ec9ac4b/src/Item3D.ts#L1111)
    

### stopAnimation[](#stopanimation)

-   stopAnimation(animationName: string): Item3D | undefined[](#stopanimation-1)
    
    Stop an animation
    
    #### Parameters
    
    -   animationName: string
        
        The name of the animation to stop
        
    
    #### Returns Item3D | undefined
    
    -   Defined in [src/Item3D.ts:1248](https://github.com/maptiler/maptiler-3d-js/blob/d1455de4164bd626ae604b498181010b0ec9ac4b/src/Item3D.ts#L1248)
    

### updateAnimation[](#updateanimation)

-   updateAnimation(delta?: number): void[](#updateanimation-1)
    
    Update the animation of a mesh by a delta time
    
    #### Parameters
    
    -   delta: number = 0.02
        
        The delta time to update the animation by
        
    
    #### Returns void
    
    -   Defined in [src/Item3D.ts:1274](https://github.com/maptiler/maptiler-3d-js/blob/d1455de4164bd626ae604b498181010b0ec9ac4b/src/Item3D.ts#L1274)
