Package-level declarations

Types

Link copied to clipboard
interface AttributeLike

The read seam that fromBufferAttribute methods pull vector components through.

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

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.

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. In three.js the corresponding information is carried by the JavaScript TypedArray constructor; common Kotlin has no equivalent, so the type is passed explicitly.

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

FrustumArray is used to determine if an object is visible in at least one camera from an array of cameras. This is particularly useful for multi-view renderers.

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

The ending mode of a CubicInterpolant at a curve boundary.

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

The interpolation settings that a derived 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 in three.js 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 emits from an origin in a certain direction. The class is used by Raycaster to assist with raycasting (e.g. mouse picking, finding which objects in 3D space the pointer is over).

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.