|
@@ -55718,6 +55718,13 @@ var BABYLON;
|
|
|
enumerable: true,
|
|
|
configurable: true
|
|
|
});
|
|
|
+ /**
|
|
|
+ * Get hosting scene
|
|
|
+ * @returns the scene
|
|
|
+ */
|
|
|
+ ParticleSystem.prototype.getScene = function () {
|
|
|
+ return this._scene;
|
|
|
+ };
|
|
|
Object.defineProperty(ParticleSystem.prototype, "particles", {
|
|
|
//end of Sub-emitter
|
|
|
/**
|
|
@@ -56889,21 +56896,6 @@ var BABYLON;
|
|
|
return particleSystem;
|
|
|
};
|
|
|
/**
|
|
|
- * Create a default particle system that you can tweak
|
|
|
- * @param emitter defines the emitter to use
|
|
|
- * @param scene defines the hosting scene
|
|
|
- * @returns the new Particle system
|
|
|
- */
|
|
|
- ParticleSystem.CreateDefault = function (emitter, scene) {
|
|
|
- var system = new ParticleSystem("default system", 1000, scene);
|
|
|
- system.emitter = emitter;
|
|
|
- system.particleTexture = new BABYLON.Texture("https://www.babylonjs.com/assets/Flare.png", system._scene);
|
|
|
- system.minSize = 0.1;
|
|
|
- system.maxSize = 0.5;
|
|
|
- system.emitRate = 200;
|
|
|
- return system;
|
|
|
- };
|
|
|
- /**
|
|
|
* Source color is added to the destination color without alpha affecting the result.
|
|
|
*/
|
|
|
ParticleSystem.BLENDMODE_ONEONE = 0;
|
|
@@ -104939,6 +104931,21 @@ var BABYLON;
|
|
|
function ParticleHelper() {
|
|
|
}
|
|
|
/**
|
|
|
+ * Create a default particle system that you can tweak
|
|
|
+ * @param emitter defines the emitter to use
|
|
|
+ * @param scene defines the hosting scene
|
|
|
+ * @returns the new Particle system
|
|
|
+ */
|
|
|
+ ParticleHelper.CreateDefault = function (emitter, scene) {
|
|
|
+ var system = new BABYLON.ParticleSystem("default system", 1000, scene);
|
|
|
+ system.emitter = emitter;
|
|
|
+ system.particleTexture = new BABYLON.Texture("https://www.babylonjs.com/assets/Flare.png", system.getScene());
|
|
|
+ system.minSize = 0.1;
|
|
|
+ system.maxSize = 0.5;
|
|
|
+ system.emitRate = 200;
|
|
|
+ return system;
|
|
|
+ };
|
|
|
+ /**
|
|
|
* This is the main static method (one-liner) of this helper to create different particle systems
|
|
|
* @param type This string represents the type to the particle system to create
|
|
|
* @param scene The scene where the particle system should live
|