All objects by default automatically update their matrices if the have been added to the scene with
var object = new THREE.Object3D;
scene.add( object );
or if they are the child of another object that has been added to the scene:
var object1 = new THREE.Object3D;
var object2 = new THREE.Object3D;
object1.add( object2 );
scene.add( object1 ); //object1 and object2 will automatically update their matrices
However, if you know object will be static, you can disable this and update the transform matrix manually just when needed.
object.matrixAutoUpdate = false;
object.updateMatrix();
You can only update the content of buffers, you cannot resize buffers (this is very costly, basically equivalent to creating new geometry).
You can emulate resizing by pre-allocating a larger buffer and then keeping unneeded vertices collapsed / hidden.
The following flag control updating of various geometry attributes. Set flags only for attributes that you need to update, updates are costly. Once buffers change, these flags reset automatically back to false. You need to keep setting them to true if you wanna keep updating buffers. Note that this applies only to [page:Geometry] and not to [page:BufferGeometry].
var geometry = new THREE.Geometry();
geometry.verticesNeedUpdate = true;
geometry.elementsNeedUpdate = true;
geometry.morphTargetsNeedUpdate = true;
geometry.uvsNeedUpdate = true;
geometry.normalsNeedUpdate = true;
geometry.colorsNeedUpdate = true;
geometry.tangentsNeedUpdate = true;
In versions prior to [link:https://github.com/mrdoob/three.js/releases/tag/r66 r66] meshes additionally need the dynamic flag enabled (to keep internal typed arrays):
//removed after r66
geometry.dynamic = true;
All uniforms values can be changed freely (e.g. colors, textures, opacity, etc), values are sent to the shader every frame.
Also GLstate related parameters can change any time (depthTest, blending, polygonOffset, etc).
Flat / smooth shading is baked into normals. You need to reset normals buffer (see above).
The following properties can't be easily changed at runtime (once the material is rendered at least once):
Changes in these require building of new shader program. You'll need to set
material.needsUpdate = true
Bear in mind this might be quite slow and induce jerkiness in framerate (especially on Windows, as shader compilation is slower in DirectX than OpenGL).
For smoother experience you can emulate changes in these features to some degree by having "dummy" values like zero intensity lights, white textures, or zero density fog.
You can freely change the material used for geometry chunks, however you cannot change how an object is divided into chunks (according to face materials).
If the number of materials / chunks is small, you could pre-divide the object beforehand (e.g. hair / face / body / upper clothes / trousers for a human, front / sides / top / glass / tire / interior for a car).
If the number is large (e.g. each face could be potentially different), consider a different solution, such as using attributes / textures to drive different per-face look.
Image, canvas, video and data textures need to have the following flag set if they are changed:
texture.needsUpdate = true;
Render targets update automatically.
A camera's position and target is updated automatically. If you need to change
then you'll need to recompute the projection matrix:
camera.aspect = window.innerWidth / window.innerHeight;
camera.updateProjectionMatrix();