---
title: "MeshOptions | 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.

# Type Alias MeshOptions

MeshOptions: [GenericObject3DOptions](https://docs.maptiler.com/sdk-js/modules/3d/api/types/GenericObject3DOptions/) & {  
    animationMode?: [AnimationMode](https://docs.maptiler.com/sdk-js/modules/3d/api/types/AnimationMode/);  
    heading?: number;  
    opacity?: number;  
    pitch?: number;  
    pointSize?: number;  
    roll?: number;  
    scale?: number | \[number, number, number\];  
    sourceOrientation?: [SourceOrientation](https://docs.maptiler.com/sdk-js/modules/3d/api/enums/SourceOrientation/);  
    states?: [Item3DMeshUIStates](https://docs.maptiler.com/sdk-js/modules/3d/api/types/Item3DMeshUIStates/);  
    userData?: Record<string, any\>;  
    wireframe?: boolean;  
}

Options to add or modify a mesh

#### Type Declaration

-   ##### `Optional`animationMode?: [AnimationMode](https://docs.maptiler.com/sdk-js/modules/3d/api/types/AnimationMode/)
    
    Animation mode. Default: `continuous`
    
-   ##### `Optional`heading?: number
    
    Heading measured in degrees clockwise from true north.
    
-   ##### `Optional`opacity?: number
    
    Opacity of the mesh
    
-   ##### `Optional`pitch?: number
    
    Pitch measured in degrees.
    
-   ##### `Optional`pointSize?: number
    
    Point size, applicable only to point clouds. Default: 1
    
-   ##### `Optional`roll?: number
    
    Roll measured in degrees.
    
-   ##### `Optional`scale?: number | \[number, number, number\]
    
    Scale the mesh by a factor. Default: no scaling added
    
-   ##### `Optional`sourceOrientation?: [SourceOrientation](https://docs.maptiler.com/sdk-js/modules/3d/api/enums/SourceOrientation/)
    
    Rotation to apply to the model to add, as a Quaternion. Default: a rotation of PI/2 around the x axis, to adjust from the default ThreeJS space (right-hand, Y up) to the Maplibre space (right-hand, Z up)
    
-   ##### `Optional`states?: [Item3DMeshUIStates](https://docs.maptiler.com/sdk-js/modules/3d/api/types/Item3DMeshUIStates/)
    
-   ##### `Optional`userData?: Record<string, any\>
    
-   ##### `Optional`wireframe?: boolean
    
    Displays a mesh as wireframe if true (does not apply to point cloud) Default: `false`
    

-   Defined in [src/types.ts:77](https://github.com/maptiler/maptiler-3d-js/blob/d1455de4164bd626ae604b498181010b0ec9ac4b/src/types.ts#L77)
