|
@@ -12085,7 +12085,7 @@ var BABYLON;
|
|
|
* Returns the current version of the framework
|
|
|
*/
|
|
|
get: function () {
|
|
|
- return "3.3.0-alpha.4";
|
|
|
+ return "3.3.0-alpha.5";
|
|
|
},
|
|
|
enumerable: true,
|
|
|
configurable: true
|
|
@@ -18540,6 +18540,18 @@ var BABYLON;
|
|
|
_this._rotation = BABYLON.Vector3.Zero();
|
|
|
_this._scaling = BABYLON.Vector3.One();
|
|
|
_this._isDirty = false;
|
|
|
+ /**
|
|
|
+ * Set the billboard mode. Default is 0.
|
|
|
+ *
|
|
|
+ * | Value | Type | Description |
|
|
|
+ * | --- | --- | --- |
|
|
|
+ * | 0 | BILLBOARDMODE_NONE | |
|
|
|
+ * | 1 | BILLBOARDMODE_X | |
|
|
|
+ * | 2 | BILLBOARDMODE_Y | |
|
|
|
+ * | 4 | BILLBOARDMODE_Z | |
|
|
|
+ * | 7 | BILLBOARDMODE_ALL | |
|
|
|
+ *
|
|
|
+ */
|
|
|
_this.billboardMode = TransformNode.BILLBOARDMODE_NONE;
|
|
|
_this.scalingDeterminant = 1;
|
|
|
_this.infiniteDistance = false;
|
|
@@ -57710,46 +57722,54 @@ var BABYLON;
|
|
|
* Creates a new instance ConeParticleEmitter
|
|
|
* @param radius the radius of the emission cone (1 by default)
|
|
|
* @param angles the cone base angle (PI by default)
|
|
|
- * @param directionRandomizer defines how much to randomize the particle direction [0-1]
|
|
|
- */
|
|
|
- function ConeParticleEmitter(radius,
|
|
|
- /**
|
|
|
- * The radius of the emission cone.
|
|
|
- */
|
|
|
- angle,
|
|
|
- /**
|
|
|
- * The cone base angle.
|
|
|
+ * @param directionRandomizer defines how much to randomize the particle direction [0-1] (default is 0)
|
|
|
*/
|
|
|
+ function ConeParticleEmitter(radius, angle,
|
|
|
+ /** defines how much to randomize the particle direction [0-1] (default is 0) */
|
|
|
directionRandomizer) {
|
|
|
if (radius === void 0) { radius = 1; }
|
|
|
if (angle === void 0) { angle = Math.PI; }
|
|
|
if (directionRandomizer === void 0) { directionRandomizer = 0; }
|
|
|
- this.angle = angle;
|
|
|
this.directionRandomizer = directionRandomizer;
|
|
|
+ this.angle = angle;
|
|
|
this.radius = radius;
|
|
|
}
|
|
|
Object.defineProperty(ConeParticleEmitter.prototype, "radius", {
|
|
|
/**
|
|
|
- * Gets the radius of the emission cone.
|
|
|
+ * Gets or sets the radius of the emission cone
|
|
|
*/
|
|
|
get: function () {
|
|
|
return this._radius;
|
|
|
},
|
|
|
+ set: function (value) {
|
|
|
+ this._radius = value;
|
|
|
+ this._buildHeight();
|
|
|
+ },
|
|
|
+ enumerable: true,
|
|
|
+ configurable: true
|
|
|
+ });
|
|
|
+ Object.defineProperty(ConeParticleEmitter.prototype, "angle", {
|
|
|
/**
|
|
|
- * Sets the radius of the emission cone.
|
|
|
+ * Gets or sets the angle of the emission cone
|
|
|
*/
|
|
|
+ get: function () {
|
|
|
+ return this._angle;
|
|
|
+ },
|
|
|
set: function (value) {
|
|
|
- this._radius = value;
|
|
|
- if (this.angle !== 0) {
|
|
|
- this._height = value / Math.tan(this.angle / 2);
|
|
|
- }
|
|
|
- else {
|
|
|
- this._height = 1;
|
|
|
- }
|
|
|
+ this._angle = value;
|
|
|
+ this._buildHeight();
|
|
|
},
|
|
|
enumerable: true,
|
|
|
configurable: true
|
|
|
});
|
|
|
+ ConeParticleEmitter.prototype._buildHeight = function () {
|
|
|
+ if (this._angle !== 0) {
|
|
|
+ this._height = this._radius / Math.tan(this._angle / 2);
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ this._height = 1;
|
|
|
+ }
|
|
|
+ };
|
|
|
/**
|
|
|
* Called by the particle System when the direction is computed for the created particle.
|
|
|
* @param emitPower is the power of the particle (speed)
|
|
@@ -57758,7 +57778,7 @@ var BABYLON;
|
|
|
* @param particle is the particle we are computed the direction for
|
|
|
*/
|
|
|
ConeParticleEmitter.prototype.startDirectionFunction = function (emitPower, worldMatrix, directionToUpdate, particle) {
|
|
|
- if (this.angle === 0) {
|
|
|
+ if (this._angle === 0) {
|
|
|
BABYLON.Vector3.TransformNormalFromFloatsToRef(0, emitPower, 0, worldMatrix, directionToUpdate);
|
|
|
}
|
|
|
else {
|
|
@@ -57797,7 +57817,7 @@ var BABYLON;
|
|
|
* @returns the new emitter
|
|
|
*/
|
|
|
ConeParticleEmitter.prototype.clone = function () {
|
|
|
- var newOne = new ConeParticleEmitter(this.radius, this.angle, this.directionRandomizer);
|
|
|
+ var newOne = new ConeParticleEmitter(this._radius, this._angle, this.directionRandomizer);
|
|
|
BABYLON.Tools.DeepCopy(this, newOne);
|
|
|
return newOne;
|
|
|
};
|
|
@@ -57806,8 +57826,8 @@ var BABYLON;
|
|
|
* @param effect defines the update shader
|
|
|
*/
|
|
|
ConeParticleEmitter.prototype.applyToShader = function (effect) {
|
|
|
- effect.setFloat("radius", this.radius);
|
|
|
- effect.setFloat("coneAngle", this.angle);
|
|
|
+ effect.setFloat("radius", this._radius);
|
|
|
+ effect.setFloat("coneAngle", this._angle);
|
|
|
effect.setFloat("height", this._height);
|
|
|
effect.setFloat("directionRandomizer", this.directionRandomizer);
|
|
|
};
|
|
@@ -57832,8 +57852,8 @@ var BABYLON;
|
|
|
ConeParticleEmitter.prototype.serialize = function () {
|
|
|
var serializationObject = {};
|
|
|
serializationObject.type = this.getClassName();
|
|
|
- serializationObject.radius = this.radius;
|
|
|
- serializationObject.angle = this.angle;
|
|
|
+ serializationObject.radius = this._radius;
|
|
|
+ serializationObject.angle = this._angle;
|
|
|
serializationObject.directionRandomizer = this.directionRandomizer;
|
|
|
return serializationObject;
|
|
|
};
|
|
@@ -59152,7 +59172,7 @@ var BABYLON;
|
|
|
this._particlesIntersect = options ? options.particleIntersection : false;
|
|
|
this._bSphereOnly = options ? options.boundingSphereOnly : false;
|
|
|
this._bSphereRadiusFactor = (options && options.bSphereRadiusFactor) ? options.bSphereRadiusFactor : 1.0;
|
|
|
- if (options && options.updatable) {
|
|
|
+ if (options && options.updatable !== undefined) {
|
|
|
this._updatable = options.updatable;
|
|
|
}
|
|
|
else {
|
|
@@ -85872,10 +85892,10 @@ var BABYLON;
|
|
|
return lastShape;
|
|
|
}*/
|
|
|
OimoJSPlugin.prototype.setLinearVelocity = function (impostor, velocity) {
|
|
|
- impostor.physicsBody.linearVelocity.init(velocity.x, velocity.y, velocity.z);
|
|
|
+ impostor.physicsBody.linearVelocity.copy(velocity);
|
|
|
};
|
|
|
OimoJSPlugin.prototype.setAngularVelocity = function (impostor, velocity) {
|
|
|
- impostor.physicsBody.angularVelocity.init(velocity.x, velocity.y, velocity.z);
|
|
|
+ impostor.physicsBody.angularVelocity.copy(velocity);
|
|
|
};
|
|
|
OimoJSPlugin.prototype.getLinearVelocity = function (impostor) {
|
|
|
var v = impostor.physicsBody.linearVelocity;
|