Package-level declarations

Types

Link copied to clipboard
interface AttributeLike

A source of per-vertex vector components. Methods such as fromBufferAttribute and Box3.setFromBufferAttribute read from it.

Link copied to clipboard
class Box2(val min: Vector2 = Vector2(Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY), val max: Vector2 = Vector2(Double.NEGATIVE_INFINITY, Double.NEGATIVE_INFINITY))

An axis-aligned bounding box (AABB) in 2D space.

Link copied to clipboard
class Box3(val min: Vector3 = Vector3(Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY), val max: Vector3 = Vector3(Double.NEGATIVE_INFINITY, Double.NEGATIVE_INFINITY, Double.NEGATIVE_INFINITY))

An axis-aligned bounding box (AABB) in 3D space.

Link copied to clipboard
class Camera

A view matrix and a projection matrix, used to project world points to the screen.

Link copied to clipboard

A color represented by RGB components in the linear working color space, which defaults to ColorSpace.LinearSRGB. Inputs conventionally using ColorSpace.SRGB (such as hexadecimals) are converted to the working color space automatically. If ColorManagement.enabled is false, no conversions occur.

Link copied to clipboard

Manages the working color space and conversions between color spaces.

Link copied to clipboard

A color space identifier. three.js uses plain strings for these, such as 'srgb'. Each member below names its string.

Link copied to clipboard
class ColorSpaceDefinition(val primaries: DoubleArray, val whitePoint: DoubleArray, val transfer: ColorTransfer, val toXYZ: Matrix3, val fromXYZ: Matrix3, val luminanceCoefficients: DoubleArray)

Describes a single color space: its primaries, transfer function and the RGB<->XYZ conversion matrices. Corresponds to one entry of three.js's ColorManagement.spaces map.

Link copied to clipboard

A color transfer function identifier.

Link copied to clipboard

The storage type of a buffer component, used by MathUtils.normalize and MathUtils.denormalize. three.js reads it from the typed array. Here you pass it in.

Link copied to clipboard

The clip-space coordinate convention a projection matrix targets.

Link copied to clipboard
class Cylindrical(var radius: Double = 1.0, var theta: Double = 0.0, var y: Double = 0.0)

Represents points in 3D space as cylindrical coordinates.

Link copied to clipboard
class Euler(x: Double = 0.0, y: Double = 0.0, z: Double = 0.0, order: EulerOrder = EulerOrder.XYZ) : Iterable<Any>

A class representing Euler angles.

Link copied to clipboard

The rotation order applied by an Euler instance.

Link copied to clipboard
class Frustum(p0: Plane = Plane(), p1: Plane = Plane(), p2: Plane = Plane(), p3: Plane = Plane(), p4: Plane = Plane(), p5: Plane = Plane())

Frustums are used to determine what is inside the camera's field of view. They help speed up the rendering process. Objects which lie outside a camera's frustum can safely be excluded from rendering.

Link copied to clipboard

Holds a clip-space coordinateSystem. In three.js this class tests objects against several cameras at once.

Link copied to clipboard
class HSL(var h: Double = 0.0, var s: Double = 0.0, var l: Double = 0.0)

The result of Color.getHSL: hue, saturation and lightness, each in [0, 1]. Mirrors the { h, s, l } target object three.js writes into.

Link copied to clipboard
abstract class Interpolant(val parameterPositions: DoubleArray, val sampleValues: DoubleArray, sampleSize: Int, val resultBuffer: DoubleArray = DoubleArray(sampleSize))

Abstract base class of interpolants over parametric samples.

Link copied to clipboard

How a CubicInterpolant shapes the curve at its first and last sample. Replaces three.js's ZeroCurvatureEnding, ZeroSlopeEnding and WrapAroundEnding numbers.

Link copied to clipboard
class InterpolantSettings(var endingStart: InterpolantEnding = InterpolantEnding.ZeroCurvature, var endingEnd: InterpolantEnding = InterpolantEnding.ZeroCurvature, var inTangents: DoubleArray? = null, var outTangents: DoubleArray? = null)

Settings that an interpolant may read.

Link copied to clipboard
class Line3(val start: Vector3 = Vector3(), val end: Vector3 = Vector3())

An analytical line segment in 3D space represented by a start and end point.

Link copied to clipboard
object MathUtils

A collection of math utility functions.

Link copied to clipboard
class Matrix2

Represents a 2x2 matrix.

Link copied to clipboard
class Matrix3

Represents a 3x3 matrix.

Link copied to clipboard
class Matrix4

Represents a 4x4 matrix.

Link copied to clipboard
class Plane(val normal: Vector3 = Vector3(1.0, 0.0, 0.0), var constant: Double = 0.0)

A two dimensional surface that extends infinitely in 3D space, represented in Hessian normal form by a unit length normal vector and a constant.

Link copied to clipboard
class Quaternion(x: Double = 0.0, y: Double = 0.0, z: Double = 0.0, w: Double = 1.0) : Iterable<Double>

A quaternion, used to represent rotations.

Link copied to clipboard
class Ray(val origin: Vector3 = Vector3(), val direction: Vector3 = Vector3(0.0, 0.0, -1.0))

A ray that starts at an origin and goes in one direction. Use it for picking, for example to find which objects are under the mouse pointer.

Link copied to clipboard
class Sphere(val center: Vector3 = Vector3(), var radius: Double = -1.0)

An analytical 3D sphere defined by a center and radius. This class is mainly used as a Bounding Sphere for 3D objects.

Link copied to clipboard
class Spherical(var radius: Double = 1.0, var phi: Double = 0.0, var theta: Double = 0.0)

Represents points in 3D space as spherical coordinates.

Link copied to clipboard

Represents a third-order spherical harmonics (SH). Light probes use this class to encode lighting information.

Link copied to clipboard
class Triangle(var a: Vector3 = Vector3(), var b: Vector3 = Vector3(), var c: Vector3 = Vector3())

A geometric triangle as defined by three vectors representing its three corners.

Link copied to clipboard
class Vector2(var x: Double = 0.0, var y: Double = 0.0) : Iterable<Double>

A 2D vector: an ordered pair of numbers (x, y).

Link copied to clipboard
class Vector3(var x: Double = 0.0, var y: Double = 0.0, var z: Double = 0.0) : Iterable<Double>

A 3D vector: an ordered triplet of numbers (x, y, z).

Link copied to clipboard
class Vector4(var x: Double = 0.0, var y: Double = 0.0, var z: Double = 0.0, var w: Double = 1.0) : Iterable<Double>

A 4D vector: an ordered quadruplet of numbers (x, y, z, w).

Properties

Link copied to clipboard

The default Euler angle order (XYZ). Also exposed as Euler.DEFAULT_ORDER; both refer to the same value.

Functions

Link copied to clipboard

Converts a single linear channel value c to sRGB (gamma).

Link copied to clipboard

Converts a single sRGB (gamma) channel value c to linear.