Ver Fonte

WebGLRenderer: Frustum cull everything.

Mr.doob há 11 anos atrás
pai
commit
db9693c57d
2 ficheiros alterados com 1 adições e 2 exclusões
  1. 0 1
      src/objects/ParticleSystem.js
  2. 1 1
      src/renderers/WebGLRenderer.js

+ 0 - 1
src/objects/ParticleSystem.js

@@ -10,7 +10,6 @@ THREE.ParticleSystem = function ( geometry, material ) {
 	this.material = material !== undefined ? material : new THREE.ParticleSystemMaterial( { color: Math.random() * 0xffffff } );
 
 	this.sortParticles = false;
-	this.frustumCulled = false;
 
 };
 

+ 1 - 1
src/renderers/WebGLRenderer.js

@@ -3297,7 +3297,7 @@ THREE.WebGLRenderer = function ( parameters ) {
 
 			if ( object.visible ) {
 
-				if ( ! ( object instanceof THREE.Mesh || object instanceof THREE.ParticleSystem ) || ! ( object.frustumCulled ) || _frustum.intersectsObject( object ) ) {
+				if ( object.frustumCulled === false || _frustum.intersectsObject( object ) === true ) {
 
 					setupMatrices( object, camera );