Explorar o código

Fix assignement about smoothPosition and declare variable with default as false

Tristan Valcke %!s(int64=8) %!d(string=hai) anos
pai
achega
b2925e5292
Modificáronse 1 ficheiros con 3 adicións e 2 borrados
  1. 3 2
      examples/js/GPUParticleSystem.js

+ 3 - 2
examples/js/GPUParticleSystem.js

@@ -388,6 +388,7 @@ THREE.GPUParticleContainer = function(maxParticles, particleSystem) {
 		lifetime = 0.,
 		size = 0.,
 		sizeRandomness = 0.,
+		smoothPosition = false,
 		i;
 
 	var maxVel = 2;
@@ -409,8 +410,8 @@ THREE.GPUParticleContainer = function(maxParticles, particleSystem) {
 		turbulence = options.turbulence !== undefined ? options.turbulence : 1.0;
 		lifetime = options.lifetime !== undefined ? options.lifetime : 5.0;
 		size = options.size !== undefined ? options.size : 10;
-		sizeRandomness = options.sizeRandomness !== undefined ? options.sizeRandomness : 0.0,
-			smoothPosition = options.smoothPosition !== undefined ? options.smoothPosition : false;
+		sizeRandomness = options.sizeRandomness !== undefined ? options.sizeRandomness : 0.0;
+		smoothPosition = options.smoothPosition !== undefined ? options.smoothPosition : false;
 
 		if (self.DPR !== undefined) size *= self.DPR;