import * as threejs4Deno from "https://deno.land/x/threejs_4_deno@v121/src/Three.d.ts";
Classes
This light's color gets applied to all the objects in the scene globally. | |
c Bone | |
c Box2 | |
c Box3 | |
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 Fog | 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. | |
c Font | |
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. | |
Abstract base class for lights. | |
c Line | |
Base class for implementing loaders. | |
Handles and keeps track of loaded and pending data. | |
c LOD | |
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 Mesh | |
Base class for scene graph objects | |
Camera with orthographic projection | |
c Path | 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. | |
c Ray | |
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. | |
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. | |
Functions
f log | |
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 ]. | |
f warn |
Interfaces
Event object. | |
I HSL | |
I IFog | |
( interface Matrix ) | |
parameters is an object with one or more properties defining the material's appearance. | |
( interface Vector ) | |
I XR | |