Represents the data source of a texture. Constructor Source( data : Any ) data — The data definition of a texture. Default is null. Properties .data : Any The actual data of a texture. The type of this property depends on the texture that uses this instance. .isSource : Boolean Read-only flag to check if a given object is of type Source. .needsUpdate : Boolean… Continue reading Source
Author: Krishnaprasad C P
Video Texture
Creates a texture for use with a video. Note: After the initial use of a texture, the video cannot be changed. Instead, call .dispose() on the texture and instantiate a new one. Code Example // assuming you have created a HTML video element with id=”video” const video = document.getElementById( ‘video’ ); const texture = new THREE.VideoTexture(… Continue reading Video Texture
Lut
Represents a lookup table for colormaps. It is used to determine the color values from a range of data values. Import Lut is an add-on, and must be imported explicitly. See Installation / Addons. import { Lut } from ‘three/addons/math/Lut.js’; Code Example const lut = new Lut( ‘rainbow’, 512 ); const color = lut.getColor( 0.5 );… Continue reading Lut
MeshSurfaceSampler
Utility class for sampling weighted random points on the surface of a mesh. Weighted sampling is useful for effects like heavier foliage growth in certain areas of terrain, or concentrated particle emissions from specific parts of a mesh. Vertex weights may be written programmatically, or painted by hand as vertex colors in 3D tools like… Continue reading MeshSurfaceSampler
OBB
Represents an oriented bounding box (OBB) in 3D space. Import OBB is an add-on, and must be imported explicitly. See Installation / Addons. import { OBB } from ‘three/addons/math/OBB.js’; Constructor OBB( center : Vector3, halfSize : Vector3, rotation : Matrix3 ) center — The center of the OBB. (optional) halfSize — Positive halfwidth extents of the OBB along each axis. (optional) rotation —… Continue reading OBB
EdgeSplitModifier
EdgeSplitModifier is intended to modify the geometry “dissolving” the edges to give a smoother look. Import EdgeSplitModifier is an add-on, and therefore must be imported explicitly. See Installation / Addons. import { EdgeSplitModifier } from ‘three/addons/modifiers/EdgeSplitModifier.js’; Code Example const geometry = new THREE.IcosahedronGeometry( 10, 3 ); const modifier = new EdgeSplitModifier(); const cutOffAngle = 0.5; const… Continue reading EdgeSplitModifier
HalfEdge
The basis for a half-edge data structure, also known as doubly connected edge list (DCEL). Import HalfEdge is an add-on, and must be imported explicitly. See Installation / Addons. import { HalfEdge } from ‘three/addons/math/ConvexHull.js’; Constructor HalfEdge( vertex : VertexNode, face : Face ) vertex – VertexNode A reference to its destination vertex. face – Face A reference to its face. Creates a new instance… Continue reading HalfEdge
ConvexHull
A convex hull class. Implements the Quickhull algorithm by: Dirk Gregorius. March 2014, Game Developers Conference: Implementing QuickHull. Import ConvexHull is an add-on, and must be imported explicitly. See Installation / Addons. import { ConvexHull } from ‘three/addons/math/ConvexHull.js’; Constructor ConvexHull() Creates a new instance of ConvexHull. Properties .assigned : VertexList This vertex list holds all vertices that are assigned to a… Continue reading ConvexHull
VertexNode
A vertex as a double linked list node. Import VertexNode is an add-on, and must be imported explicitly. See Installation / Addons. import { VertexNode } from ‘three/addons/math/ConvexHull.js’; Constructor VertexNode( point : Vector3 ) point – Vector3 A point (x, y, z) in 3D space. Creates a new instance of VertexNode. Properties .point : Vector3 A point (x, y, z) in 3D space.… Continue reading VertexNode
VertexList
A doubly linked list of vertices. Import VertexList is an add-on, and must be imported explicitly. See Installation / Addons. import { VertexList } from ‘three/addons/math/ConvexHull.js’; Constructor VertexList() Creates a new instance of VertexList. Properties .head : VertexNode Reference to the first vertex of the linked list. Default is null. .tail : VertexNode Reference to the last vertex of the… Continue reading VertexList