mv3d.createFog = function () {
var fountain = BABYLON.Mesh.CreateBox("foutain", .01, mv3d.scene);
fountain.visibility = 0;
fountain.x = $gamePlayer.x;
fountain.y = $gamePlayer.y;
fountain.z = $gamePlayer.z;
particleSystem = new BABYLON.GPUParticleSystem("particles", { capacity: 50000 }, mv3d.scene);
particleSystem.manualEmitCount = particleSystem.activeParticleCount;
particleSystem.minEmitBox = new BABYLON.Vector3(-50, 0, -50); // Starting all from
particleSystem.maxEmitBox = new BABYLON.Vector3(50, 1, 50); // To..
particleSystem.particleTexture = new BABYLON.Texture("/img/MV3D/Fog.png", mv3d.scene);
particleSystem.emitter = fountain;
particleSystem.color1 = new BABYLON.Color4(0.8, 0.8, 0.8, 0.1);
particleSystem.color2 = new BABYLON.Color4(.95, .95, .95, 0.15);
particleSystem.colorDead = new BABYLON.Color4(0.9, 0.9, 0.9, 0.1);
particleSystem.minSize = 3.5;
particleSystem.maxSize = 5.0;
particleSystem.minLifeTime = Number.MAX_SAFE_INTEGER;
particleSystem.emitRate = 50000;
particleSystem.blendMode = BABYLON.ParticleSystem.BLENDMODE_STANDARD;
particleSystem.gravity = new BABYLON.Vector3(0, 0, 0);
particleSystem.direction1 = new BABYLON.Vector3(0, 0, 0);
particleSystem.direction2 = new BABYLON.Vector3(0, 0, 0);
particleSystem.minAngularSpeed = -2;
particleSystem.maxAngularSpeed = 2;
particleSystem.minEmitPower = .5;
particleSystem.maxEmitPower = 1;
particleSystem.updateSpeed = 0.005;
particleSystem.start();
mv3d.fog = fountain;
mv3d.fogParticle = particleSystem;
};
--------------------------------------
sitll no fog...
var fountain = BABYLON.Mesh.CreateBox("foutain", .01, mv3d.scene);
fountain.visibility = 0;
fountain.x = $gamePlayer.x;
fountain.y = $gamePlayer.y;
fountain.z = $gamePlayer.z;
particleSystem = new BABYLON.GPUParticleSystem("particles", { capacity: 50000 }, mv3d.scene);
particleSystem.manualEmitCount = particleSystem.activeParticleCount;
particleSystem.minEmitBox = new BABYLON.Vector3(-50, 0, -50); // Starting all from
particleSystem.maxEmitBox = new BABYLON.Vector3(50, 1, 50); // To..
particleSystem.particleTexture = new BABYLON.Texture("/img/MV3D/Fog.png", mv3d.scene);
particleSystem.emitter = fountain;
particleSystem.color1 = new BABYLON.Color4(0.8, 0.8, 0.8, 0.1);
particleSystem.color2 = new BABYLON.Color4(.95, .95, .95, 0.15);
particleSystem.colorDead = new BABYLON.Color4(0.9, 0.9, 0.9, 0.1);
particleSystem.minSize = 3.5;
particleSystem.maxSize = 5.0;
particleSystem.minLifeTime = Number.MAX_SAFE_INTEGER;
particleSystem.emitRate = 50000;
particleSystem.blendMode = BABYLON.ParticleSystem.BLENDMODE_STANDARD;
particleSystem.gravity = new BABYLON.Vector3(0, 0, 0);
particleSystem.direction1 = new BABYLON.Vector3(0, 0, 0);
particleSystem.direction2 = new BABYLON.Vector3(0, 0, 0);
particleSystem.minAngularSpeed = -2;
particleSystem.maxAngularSpeed = 2;
particleSystem.minEmitPower = .5;
particleSystem.maxEmitPower = 1;
particleSystem.updateSpeed = 0.005;
particleSystem.start();
mv3d.fog = fountain;
mv3d.fogParticle = particleSystem;
};
--------------------------------------
sitll no fog...