import { three } from "https://deno.land/x/remapper@2.1.0/src/deps.ts";
const { Object3D } = three;
Base class for scene graph objects
Properties
Custom depth material to be used when rendering to the depth map. Can only be used in context of meshes. When shadow-casting with a DirectionalLight or SpotLight, if you are (a) modifying vertex positions in the vertex shader, (b) using a displacement map, (c) using an alpha map with alphaTest, or (d) using a transparent texture with alphaTest, you must specify a customDepthMaterial for proper shadows.
When this is set, it checks every frame if the object is in the frustum of the camera before rendering the object. If set to false the object gets rendered every frame even if it is not in the frustum of the camera.
Used to check whether this or derived classes are Object3Ds. Default is true. You should not change this, as it is used internally for optimisation.
When this is set, it calculates the matrix of position, (rotation or quaternion) and scale every frame and also recalculates the matrixWorld property.
The global transform of the object. If the Object3d has no parent, then it's identical to the local transform.
Calls after rendering object
Calls before rendering object
Overrides the default rendering order of scene graph objects, from lowest to highest renderOrder. Opaque and transparent objects remain sorted independently though. When this property is set for an instance of Group, all descendants objects will be sorted and rendered together.
Methods
Applies the matrix transform to the object and updates the object's position, rotation and scale.
Applies the rotation represented by the quaternion to the object.
Searches through the object's children and returns the first with a matching id.
Searches through the object's children and returns the first with a matching name.
Optionally, the x, y and z components of the world space position. Rotates the object to face a point in world space. This method does not support objects having non-uniformly-scaled parent(s).
Rotate an object along an axis in object space. The axis is assumed to be normalized.
Rotate an object along an axis in world space. The axis is assumed to be normalized. Method Assumes no rotated parent.
axis -- A normalized vector in object space. angle -- angle in radians
Calls setFromRotationMatrix(m) on the .quaternion.
Note that this assumes that the upper 3x3 of m is a pure rotation matrix (i.e, unscaled).
Translate an object by distance along an axis in object space. The axis is assumed to be normalized.
Updates the global transform of the object.