提交 9d0dfbc5 编写于 作者: A alteredq

Quick fix to make Editor and examples using BufferGeometry working again after EventTarget changes.

This will need some more thought, before we didn't really do anything about BufferGeometry deallocation.
上级 e759ed70
此差异已折叠。
此差异已折叠。
......@@ -4,6 +4,8 @@
THREE.BufferGeometry = function () {
THREE.EventTarget.call( this );
this.id = THREE.GeometryIdCount ++;
// attributes
......@@ -540,6 +542,12 @@ THREE.BufferGeometry.prototype = {
this.hasTangents = true;
this.tangentsNeedUpdate = true;
},
deallocate: function () {
this.dispatchEvent( { type: 'deallocate' } );
}
};
......
......@@ -5240,7 +5240,7 @@ THREE.WebGLRenderer = function ( parameters ) {
if ( material.needsUpdate ) {
if ( material.program ) _this.deallocateMaterial( material );
if ( material.program ) deallocateMaterial( material );
_this.initMaterial( material, lights, fog, object );
material.needsUpdate = false;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册