update method
Implementation
BufferGeometry update(Object3D object) {
num frame = info.render["frame"]!;
var geometry = object.geometry;
var buffergeometry = geometries.get(object, geometry!);
// Update once per frame
if (updateMap.get(buffergeometry) != frame) {
geometries.update(buffergeometry);
updateMap.add(key: buffergeometry, value: frame);
}
// print(" WebGLObjects update object: ${object} ${object.type} ");
if (object is InstancedMesh) {
if (object.hasEventListener('dispose', onInstancedMeshDispose) == false) {
object.addEventListener('dispose', onInstancedMeshDispose);
}
// print(" WebGLObjects update 2 object: ${object} ${object.instanceMatrix} ");
attributes.update(object.instanceMatrix, gl.ARRAY_BUFFER);
if (object.instanceColor != null) {
attributes.update(object.instanceColor, gl.ARRAY_BUFFER);
}
}
return buffergeometry;
}