David Catuhe 8 years ago
parent
commit
b25adf88f5

File diff suppressed because it is too large
+ 15 - 15
dist/preview release/babylon.core.js


File diff suppressed because it is too large
+ 1247 - 1221
dist/preview release/babylon.d.ts


File diff suppressed because it is too large
+ 26 - 26
dist/preview release/babylon.js


File diff suppressed because it is too large
+ 35 - 7
dist/preview release/babylon.max.js


File diff suppressed because it is too large
+ 25 - 25
dist/preview release/babylon.noworker.js


+ 1 - 1
src/Math/babylon.math.js

@@ -1113,7 +1113,7 @@ var BABYLON;
             this.w = w;
         }
         Vector4.prototype.toString = function () {
-            return "{X: " + this.x + " Y:" + this.y + " Z:" + this.z + "W:" + this.w + "}";
+            return "{X: " + this.x + " Y:" + this.y + " Z:" + this.z + " W:" + this.w + "}";
         };
         Vector4.prototype.getClassName = function () {
             return "Vector4";

+ 25 - 5
src/Particles/babylon.solidParticle.js

@@ -1,6 +1,16 @@
 var BABYLON;
 (function (BABYLON) {
     var SolidParticle = (function () {
+        /**
+         * Creates a Solid Particle object.
+         * Don't create particles manually, use instead the Solid Particle System internal tools like _addParticle()
+         * `particleIndex` (integer) is the particle index in the Solid Particle System pool. It's also the particle identifier.
+         * `positionIndex` (integer) is the starting index of the particle vertices in the SPS "positions" array.
+         *  `model` (ModelShape) is a reference to the model shape on what the particle is designed.
+         * `shapeId` (integer) is the model shape identifier in the SPS.
+         * `idxInShape` (integer) is the index of the particle in the current model (ex: the 10th box of addShape(box, 30))
+         * `modelBoundingInfo` is the reference to the model BoundingInfo used for intersection computations.
+         */
         function SolidParticle(particleIndex, positionIndex, model, shapeId, idxInShape, modelBoundingInfo) {
             this.idx = 0; // particle global index
             this.color = new BABYLON.Color4(1.0, 1.0, 1.0, 1.0); // color
@@ -25,7 +35,9 @@ var BABYLON;
             }
         }
         Object.defineProperty(SolidParticle.prototype, "scale", {
-            //legacy support, changed scale to scaling
+            /**
+             * legacy support, changed scale to scaling
+             */
             get: function () {
                 return this.scaling;
             },
@@ -36,7 +48,9 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(SolidParticle.prototype, "quaternion", {
-            //legacy support, changed quaternion to rotationQuaternion
+            /**
+             * legacy support, changed quaternion to rotationQuaternion
+             */
             get: function () {
                 return this.rotationQuaternion;
             },
@@ -46,10 +60,12 @@ var BABYLON;
             enumerable: true,
             configurable: true
         });
+        /**
+         * Returns a boolean. True if the particle intersects another particle or another mesh, else false.
+         * The intersection is computed on the particle bounding sphere and Axis Aligned Bounding Box (AABB)
+         * `target` is the object (solid particle or mesh) what the intersection is computed against.
+         */
         SolidParticle.prototype.intersectsMesh = function (target) {
-            if (!(this.isVisible && target.isVisible)) {
-                return false; // only visible particle and target can intersect
-            }
             if (!this._boundingInfo || !target._boundingInfo) {
                 return false;
             }
@@ -59,6 +75,10 @@ var BABYLON;
     }());
     BABYLON.SolidParticle = SolidParticle;
     var ModelShape = (function () {
+        /**
+         * Creates a ModelShape object. This is an internal simplified reference to a mesh used as for a model to replicate particles from by the SPS.
+         * SPS internal tool, don't use it manually.
+         */
         function ModelShape(id, shape, shapeUV, posFunction, vtxFunction) {
             this.shapeID = id;
             this._shape = shape;

+ 1 - 0
src/Physics/Plugins/babylon.oimoJSPlugin.js

@@ -6,6 +6,7 @@ var BABYLON;
             this._tmpImpostorsArray = [];
             this._tmpPositionVector = BABYLON.Vector3.Zero();
             this.world = new OIMO.World(1 / 60, 2, iterations, true);
+            this.world.worldscale(1);
             this.world.clear();
             //making sure no stats are calculated
             this.world.isNoStat = true;