Map height node constructor.
The parent node of this node.
Map view object where this node is placed.
Position in the node tree relative to the parent.
Zoom level in the tile tree of the node.
X position of the node in the tile tree.
Y position of the node in the tile tree.
Geometry used to render this height node.
Material used to render this height node.
Array with animation clips.
[]
Gets rendered into shadow map.
false
Array with object's children.
[]
Cache with the children objects created from subdivision.
Used to avoid recreate object after simplification and subdivision.
The default value is null. Only used if "cacheTiles" is set to true.
Custom depth material to be used when rendering to the depth map. Can only be used in context of meshes. When shadow-casting with a DirectionalLight or SpotLight, if you are (a) modifying vertex positions in the vertex shader, (b) using a displacement map, (c) using an alpha map with alphaTest, or (d) using a transparent texture with alphaTest, you must specify a customDepthMaterial for proper shadows.
Same as customDepthMaterial, but used with PointLight.
Flag to indicate if the map node was disposed.
When a map node is disposed its resources are dealocated to save memory.
When this is set, it checks every frame if the object is in the frustum of the camera before rendering the object. If set to false the object gets rendered every frame even if it is not in the frustum of the camera.
true
If true the tiles will compute their normals.
Size of the grid of the geometry displayed on the scene for each tile.
Flag indicating if the tile height data was loaded.
Unique number of this object instance.
Flag to check if the node is a mesh by the renderer.
Used to toggle the visibility of the node. The renderer skips the node rendering if this is set false.
Readonly
isUsed to check whether this or derived classes are Object3Ds. Default is true. You should not change this, as it is used internally for optimisation.
new THREE.Layers()
Tile level of this node.
Index of the map node in the quad-tree parent node.
Position in the tree parent, can be topLeft, topRight, bottomLeft or bottomRight.
The map view object where the node is placed.
Local transform.
new THREE.Matrix4()
When this is set, it calculates the matrix of position, (rotation or quaternion) and scale every frame and also recalculates the matrixWorld property.
THREE.Object3D.DefaultMatrixAutoUpdate
The global transform of the object. If the Object3d has no parent, then it's identical to the local transform.
new THREE.Matrix4()
When this is set, the renderer checks every frame if the object and its children need matrix updates. Otherwise, you have to maintain all matrices in the object and its children yourself.
THREE.Object3D.DefaultMatrixWorldAutoUpdate
When this is set, it calculates the matrixWorld in that frame and resets this property to false.
false
Readonly
modelnew THREE.Matrix4()
Optional
morphOptional
morphOptional name of the object (doesn't need to be unique).
''
Indicates how many children nodes are loaded.
The child on become visible once all of them are loaded.
Readonly
normalnew THREE.Matrix3()
Calls after rendering object
Calls before rendering object
Object's parent in the scene graph.
null
Parent node (from an upper tile level).
Readonly
positionObject's local position.
new THREE.Vector3()
Readonly
quaternionObject's local rotation as a Quaternion.
new THREE.Quaternion()
Material gets baked in shadow receiving.
false
Overrides the default rendering order of scene graph objects, from lowest to highest renderOrder. Opaque and transparent objects remain sorted independently though. When this property is set for an instance of Group, all descendants objects will be sorted and rendered together.
0
Readonly
rotationObject's local rotation (Euler angles), in radians.
new THREE.Euler()
Readonly
scaleObject's local scale.
new THREE.Vector3()
Variable to check if the node is subdivided.
To avoid bad visibility changes on node load.
Flag indicating if the tile texture was loaded.
Up direction.
THREE.Object3D.DefaultUp.clone()
An object that can be used to store custom data about the Object3d. It should not hold references to functions as these will not be cloned.
Object gets rendered if true.
true
Tile x position.
Tile y position.
Static
DefaultStatic
DefaultStatic
DefaultStatic
baseBase geometry shared across all the nodes.
Static
baseScale to apply to each node.
Static
childrensHow many children each branch of the tree has.
For a quad-tree this value is 4.
Static
defaultDefault texture used when texture fails to load.
Static
geometryMap node plane geometry.
Static
tileOriginal tile size of the images retrieved from the height provider.
Adds object as child of this object.
Rest
...object: Object3D<Event>[]Adds a listener to an event type.
The type of event to listen to.
The function that gets called when the event is fired.
Applies the rotation represented by the quaternion to the object.
Adds object as a child of this, while maintaining the object's world transform.
Removes all child objects.
Optional
recursive: booleanOptional
recursive: booleanChecks if listener is added to an event type.
The type of event to listen to.
The function that gets called when the event is fired.
Optionally, the x, y and z components of the world space position. Rotates the object to face a point in world space. This method does not support objects having non-uniformly-scaled parent(s).
A world vector to look at.
Removes object as child of this object.
Rest
...object: Object3D<Event>[]Removes a listener from an event type.
The type of the listener that gets removed.
The listener function that gets removed.
Removes this object from its current parent.
Rotate an object along an axis in object space. The axis is assumed to be normalized.
A normalized vector in object space.
The angle in radians.
Rotate an object along an axis in world space. The axis is assumed to be normalized. Method Assumes no rotated parent.
A normalized vector in object space.
The angle in radians.
Rotates the object around x axis in local space.
the angle to rotate in radians.
Rotates the object around y axis in local space.
the angle to rotate in radians.
Rotates the object around z axis in local space.
the angle to rotate in radians.
Optional
meta: { Translate an object by distance along an axis in object space. The axis is assumed to be normalized.
A normalized vector in object space.
The distance to translate.
Translates object along x axis by distance.
Distance.
Translates object along y axis by distance.
Distance.
Translates object along z axis by distance.
Distance.
Generated using TypeDoc
Represents a height map tile node that can be subdivided into other height nodes.
Its important to update match the height of the tile with the neighbors nodes edge heights to ensure proper continuity of the surface.
The height node is designed to use MapBox elevation tile encoded data as described in https://www.mapbox.com/help/access-elevation-data/