|
@@ -55454,7 +55454,7 @@ var BABYLON;
|
|
|
this._isAnimationSheetEnabled = isAnimationSheetEnabled;
|
|
|
this._scene = scene || BABYLON.Engine.LastCreatedScene;
|
|
|
this._customEffect = customEffect;
|
|
|
- scene.particleSystems.push(this);
|
|
|
+ this._scene.particleSystems.push(this);
|
|
|
this._useInstancing = this._scene.getEngine().getCaps().instancedArrays;
|
|
|
this._createIndexBuffer();
|
|
|
this._createVertexBuffers();
|
|
@@ -56889,6 +56889,21 @@ 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;
|