Selaa lähdekoodia

Merge remote-tracking branch 'BabylonJS/master'

MackeyK24 8 vuotta sitten
vanhempi
commit
bb7e023366

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 21 - 21
dist/preview release/babylon.core.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1554 - 1555
dist/preview release/babylon.d.ts


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 31 - 31
dist/preview release/babylon.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 168 - 233
dist/preview release/babylon.max.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1554 - 1555
dist/preview release/babylon.module.d.ts


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 30 - 30
dist/preview release/babylon.noworker.js


+ 4 - 0
dist/preview release/what's new.md

@@ -25,7 +25,11 @@
 - GroundMesh : `getHeightAtCoordinates()`, `getNormalAtCoordinates()` and `getNormalAtCoordinatesToRef()` can now work with rotated grounds ([jerome](https://github.com/jbousquie))  
 - `GroundMesh`, `facetData` and `SolidParticleSystem` improvement in normal computations ([jerome](https://github.com/jbousquie))   
 - Added `AbstractMesh.addRotation()` ([jerome](https://github.com/jbousquie))  
+- Added `Quaternion.QuaternionRotationFromAxis()` and `Quaternion.QuaternionRotationFromAxisToRef()` ([jerome](https://github.com/jbousquie), thanks to [abow](https://github.com/abow))   
+- Added `Curve3.CreateCatmullRomSpline()` ([jerome](https://github.com/jbousquie) and [BitOfGold](https://github.com/BitOfGold))  
 - Added the optional parameter`colorFilter` to `CreateGroundFromHeightMap()` ([jerome](https://github.com/jbousquie))  
+- Improved the internal code of `Vector3.RotationFromAxisToRef()` ([jerome](https://github.com/jbousquie), thanks to [abow](https://github.com/abow))   
+
  
 ### Bug fixes
 - Fixed a bug with spotlight direction ([deltakosh](https://github.com/deltakosh)) 

+ 12 - 0
src/Materials/Textures/babylon.renderTargetTexture.ts

@@ -288,6 +288,18 @@
                 }
             }
 
+            for (var particleIndex = 0; particleIndex < scene.particleSystems.length; particleIndex++) {
+                    var particleSystem = scene.particleSystems[particleIndex];
+
+                    if (!particleSystem.isStarted() || !particleSystem.emitter || !particleSystem.emitter.position || !particleSystem.emitter.isEnabled()) {
+                        continue;
+                    }
+
+                    if (this.renderList.indexOf(particleSystem.emitter) >= 0) {
+                        this._renderingManager.dispatchParticles(particleSystem);
+                    }
+                }
+
             if (this.isCube) {
                 for (var face = 0; face < 6; face++) {
                     this.renderToTarget(face, currentRenderList, currentRenderListLength, useCameraPostProcess, dumpForDebug);

+ 24 - 0
src/Math/babylon.math.ts

@@ -4725,6 +4725,30 @@
         }
 
         /**
+         * Returns a Curve3 object along a CatmullRom Spline curve : 
+         * @param points (array of Vector3) the points the spline must pass through. At least, four points required.  
+         * @param nbPoints (integer) the wanted number of points between each curve control points.
+         */
+        public static CreateCatmullRomSpline(points: Vector3[], nbPoints: number): Curve3 {
+            var totalPoints = new Array<Vector3>();
+            totalPoints.push(points[0].clone());
+            Array.prototype.push.apply(totalPoints, points);
+            totalPoints.push(points[points.length - 1].clone());
+            var catmullRom = new Array<Vector3>();
+            var step = 1.0 / nbPoints;
+            for (var i = 0; i < totalPoints.length - 3; i++) {
+                var amount = 0.0;
+                for (var c = 0; c < nbPoints; c++) {
+                    catmullRom.push( Vector3.CatmullRom(totalPoints[i], totalPoints[i + 1], totalPoints[i + 2], totalPoints[i + 3], amount) );
+                    amount += step
+                }
+            }
+            i--;
+            catmullRom.push( Vector3.CatmullRom(totalPoints[i], totalPoints[i + 1], totalPoints[i + 2], totalPoints[i + 3], amount) );
+            return new Curve3(catmullRom);
+        }
+
+        /**
          * A Curve3 object is a logical object, so not a mesh, to handle curves in the 3D geometric space.  
          * A Curve3 is designed from a series of successive Vector3.  
          * Tuto : http://doc.babylonjs.com/tutorials/How_to_use_Curve3#curve3-object