Skip to main content
Module

x/threejs_4_deno/src/Three.js

A simple transformation of three.js for use within a Deno workflow
Go to Latest
import * as threejs4Deno from "https://deno.land/x/threejs_4_deno@v121/src/Three.js";

Classes

This light's color gets applied to all the objects in the scene globally.

This is a superefficent class for geometries because it saves all data in buffers. It reduces memory costs and cpu cycles. But it is not as easy to work with because of all the necessary buffer calculations. It is mainly interesting when working with static objects.

Abstract base class for cameras. This class should always be inherited when you build a new camera.

Object for keeping track of time.

Represents a color. See also ColorUtils.

An extensible curve object which contains methods for interpolation class Curve

JavaScript events for custom objects

Triangle face.

c
Float32Attribute
deprecated
c
Float64Attribute
deprecated

This class contains the parameters that define linear fog, i.e., that grows linearly denser with the distance.

This class contains the parameters that define linear fog, i.e., that grows exponentially denser with the distance.

Frustums are used to determine what is inside the camera's field of view. They help speed up the rendering process.

Base class for geometries

A loader for loading an image. Unlike other loaders, this one emits events instead of using predefined callbacks. So if you're interested in getting notified when things happen, you need to add listeners to the object.

c
Int16Attribute
deprecated
c
Int32Attribute
deprecated
c
Int8Attribute
deprecated
c
Interpolant
abstract

Abstract base class for lights.

Base class for implementing loaders.

Handles and keeps track of loaded and pending data.

Materials describe the appearance of objects. They are defined in a (mostly) renderer-independent way, so you don't have to rewrite materials if you decide to use a different renderer.

( class Matrix3 implements Matrix )

A 4x4 Matrix.

c
MultiMaterial
deprecated

Base class for scene graph objects

Camera with orthographic projection

a 2d path representation, comprising of points, lines, and cubes, similar to the html5 2d canvas api. It extends CurvePath.

Camera with perspective projection.

A class for displaying points. The points are rendered by the WebGLRenderer using gl.POINTS.

Implementation of a quaternion. This is used for rotating things without incurring in the dreaded gimbal lock issue, amongst other advantages.

Scenes allow you to set up what and where is to be rendered by three.js. This is where you place objects, lights and cameras.

Defines a 2d shape plane using paths.

A point light that can cast shadow in one direction.

Class for loading a texture. Unlike other loaders, this one emits events instead of using predefined callbacks. So if you're interested in getting notified when things happen, you need to add listeners to the object.

c
Uint16Attribute
deprecated
c
Uint32Attribute
deprecated
c
Uint8Attribute
deprecated

2D vector.

3D vector.

4D vector.

An object with a series of statistical information about the graphics board memory and the rendering process.

The WebGL renderer displays your beautifully crafted scenes using WebGL, if your device supports it. This renderer has way better performance than CanvasRenderer.

Variables

v
LinePieces
deprecated
v
LineStrip
deprecated

Functions

Clamps the x to be between a and b.

Returns a value linearly interpolated from two known points based on the given interval - t = 0 will return x and t = 1 will return y.

Linear mapping of x from range [a1, a2] to range [b1, b2].

Random float from low to high interval.

Random float from - range / 2 to range / 2 interval.

Random integer from low to high interval.

Random float from 0 to 1 with 16 bits of randomness. Standard Math.random() creates repetitive patterns when applied over larger space.

Deterministic pseudo-random float in the interval [ 0, 1 ].

Interfaces

Event object.

( interface Matrix )

parameters is an object with one or more properties defining the material's appearance.

I
MorphTarget
deprecated

( interface Vector )