diff --git a/build/three.js b/build/three.js index cb9f64c04c37a753f6ecd390c130a23ac00ccba6..2f88aeacc3d7d7e2d2f6bdce914c25b0865df0e3 100644 --- a/build/three.js +++ b/build/three.js @@ -23608,24 +23608,9 @@ THREE.WebGLObjects = function ( gl, properties, info ) { } - function removeInstances( objlist, object ) { - - for ( var o = objlist.length - 1; o >= 0; o -- ) { - - if ( objlist[ o ].object === object ) { - - objlist.splice( o, 1 ); - - } - - } - - } - // this.objects = objects; - this.geometries = geometries; this.init = function ( object ) { @@ -23670,7 +23655,7 @@ THREE.WebGLObjects = function ( gl, properties, info ) { var geometry = geometries.get( object ); - if ( object.geometry.dynamic === true ) { + if ( object.geometry instanceof THREE.Geometry ) { geometry.updateFromObject( object ); @@ -23790,7 +23775,7 @@ THREE.WebGLObjects = function ( gl, properties, info ) { } else if ( data.updateRange.count === 0 ) { - console.error( 'THREE.WebGLRenderer.updateObject: using updateRange for THREE.DynamicBufferAttribute and marked as needsUpdate but count is 0, ensure you are using set methods or updating manually.' ); + console.error( 'THREE.WebGLObjects.updateBuffer: using updateRange for THREE.DynamicBufferAttribute and marked as needsUpdate but count is 0, ensure you are using set methods or updating manually.' ); } else { diff --git a/build/three.min.js b/build/three.min.js index 507051ad2863e07688ce7ace7b3672c1fc51cc71..78caa46b716741098f8ac00a890114752b2770d7 100644 --- a/build/three.min.js +++ b/build/three.min.js @@ -589,10 +589,10 @@ break;case "WEBGL_compressed_texture_pvrtc":d=a.getExtension("WEBGL_compressed_t THREE.WebGLGeometries=function(a,b){function c(e){e=e.target;var g=d[e.id],f;for(f in g.attributes){var h=g.attributes[f];void 0!==h.buffer&&(a.deleteBuffer(h.buffer),delete h.buffer)}e.removeEventListener("dispose",c);delete d[e.id];b.memory.geometries--}var d={};this.get=function(a){var g=a.geometry;if(void 0!==d[g.id])return d[g.id];g.addEventListener("dispose",c);d[g.id]=g instanceof THREE.BufferGeometry?g:(new THREE.BufferGeometry).setFromObject(a);b.memory.geometries++;return d[g.id]}}; THREE.WebGLObjects=function(a,b,c){function d(a){a.target.traverse(function(a){a.removeEventListener("remove",d);(a instanceof THREE.Mesh||a instanceof THREE.PointCloud||a instanceof THREE.Line)&&delete g[a.id];delete a._modelViewMatrix;delete a._normalMatrix;b.delete(a)})}function e(a,b){return b[0]-a[0]}var g={},f=new Float32Array(8),h=new THREE.WebGLGeometries(a,c);this.objects=g;this.geometries=h;this.init=function(a){var c=b.get(a);void 0===c.__webglInit&&(c.__webglInit=!0,a._modelViewMatrix= new THREE.Matrix4,a._normalMatrix=new THREE.Matrix3,a.addEventListener("removed",d));void 0===c.__webglActive&&(c.__webglActive=!0,a instanceof THREE.Mesh||a instanceof THREE.Line||a instanceof THREE.PointCloud)&&(g[a.id]={id:a.id,object:a,z:0})};this.getAttributeBuffer=function(a){return a instanceof THREE.InterleavedBufferAttribute?b.get(a.data).__webglBuffer:b.get(a).__webglBuffer};this.update=function(c){for(var d=0,g=c.length;d