A Track of vector keyframe values. Constructor VectorKeyframeTrack( name : String, times : Array, values : Array, interpolation : Constant ) name – (required) identifier for the KeyframeTrack. times – (required) array of keyframe times. values – values for the keyframes at the times specified, a flat array of vector components. interpolation – the type of interpolation to use. See Animation Constants for possible values. Default… Continue reading VectorKeyframeTrack
Author: Krishnaprasad C P
EffectComposer
Used to implement post-processing effects in three.js. The class manages a chain of post-processing passes to produce the final visual result. Post-processing passes are executed in order of their addition/insertion. The last pass is automatically rendered to screen. Import EffectComposer is an add-on, and must be imported explicitly. See Installation / Addons. import { EffectComposer }… Continue reading EffectComposer
VectorKeyframeTrack
A Track of vector keyframe values. Constructor VectorKeyframeTrack( name : String, times : Array, values : Array, interpolation : Constant ) name – (required) identifier for the KeyframeTrack. times – (required) array of keyframe times. values – values for the keyframes at the times specified, a flat array of vector components. interpolation – the type of interpolation to use. See Animation Constants for possible values. Default… Continue reading VectorKeyframeTrack
AnimationAction
AnimationActions schedule the performance of the animations which are stored in AnimationClips. Note: Most of AnimationAction’s methods can be chained. For an overview of the different elements of the three.js animation system see the “Animation System” article in the “Next Steps” section of the manual. Constructor AnimationAction( mixer : AnimationMixer, clip : AnimationClip, localRoot : Object3D ) mixer – the AnimationMixer that is… Continue reading AnimationAction
Animation System
Within the three.js animation system you can animate various properties of your models: the bones of a skinned and rigged model, morph targets, different material properties (colors, opacity, booleans), visibility and transforms. The animated properties can be faded in, faded out, crossfaded and warped. The weight and time scales of different simultaneous animations on the… Continue reading Animation System
Drawing Lines
Let’s say you want to draw a line or a circle, not a wireframe Mesh. First we need to set up the renderer, scene and camera (see the Creating a scene page). Here is the code that we will use: const renderer = new THREE.WebGLRenderer(); renderer.setSize( window.innerWidth, window.innerHeight ); document.body.appendChild( renderer.domElement ); const camera = new… Continue reading Drawing Lines
Lensflare
Creates a simulated lens flare that tracks a light. Lensflare can only be used when setting the alpha context parameter of WebGLRenderer to true. Import Lensflare is an add-on, and must be imported explicitly. See Installation / Addons. import { Lensflare, LensflareElement } from ‘three/addons/objects/Lensflare.js’; Code Example const light = new THREE.PointLight( 0xffffff, 1.5, 2000 ); const textureLoader = new THREE.TextureLoader();… Continue reading Lensflare
Sky
Sky creates a ready to go sky environment for your scenes. Import Sky is an add-on, and therefore must be imported explicitly. See Installation / Addons. import { Sky } from ‘three/addons/objects/Sky.js’; Code Example const sky = new Sky(); sky.scale.setScalar( 450000 ); const phi = MathUtils.degToRad( 90 ); const theta = MathUtils.degToRad( 180 ); const sunPosition… Continue reading Sky
EffectComposer
Used to implement post-processing effects in three.js. The class manages a chain of post-processing passes to produce the final visual result. Post-processing passes are executed in order of their addition/insertion. The last pass is automatically rendered to screen. Import EffectComposer is an add-on, and must be imported explicitly. See Installation / Addons. import { EffectComposer }… Continue reading EffectComposer
DRACOExporter
An exporter to compress geometry with the Draco library. Draco is an open source library for compressing and decompressing 3D meshes and point clouds. Compressed geometry can be significantly smaller, at the cost of additional decoding time on the client device. Standalone Draco files have a .drc extension, and contain vertex positions, normals, colors, and other attributes. Draco… Continue reading DRACOExporter