فهرست منبع

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.
alteredq 12 سال پیش
والد
کامیت
9d0dfbc566
4فایلهای تغییر یافته به همراه34276 افزوده شده و 34260 حذف شده
  1. 34132 34124
      build/three.js
  2. 135 135
      build/three.min.js
  3. 8 0
      src/core/BufferGeometry.js
  4. 1 1
      src/renderers/WebGLRenderer.js

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 34132 - 34124
build/three.js


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 135 - 135
build/three.min.js


+ 8 - 0
src/core/BufferGeometry.js

@@ -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' } );
+
 	}
 
 };

+ 1 - 1
src/renderers/WebGLRenderer.js

@@ -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;

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است