mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 10:47:11 +02:00
MORE RANDOM YAHH
This commit is contained in:
parent
208096f2e0
commit
fdb5d33866
1 changed files with 9 additions and 7 deletions
|
@ -19,9 +19,9 @@
|
||||||
_this.explosionSound = SoundCache.getSound("https://s3-us-west-1.amazonaws.com/hifi-content/eric/Sounds/fireworksExplosion.wav");
|
_this.explosionSound = SoundCache.getSound("https://s3-us-west-1.amazonaws.com/hifi-content/eric/Sounds/fireworksExplosion.wav");
|
||||||
_this.timeToExplosionRange = {
|
_this.timeToExplosionRange = {
|
||||||
min: 2000,
|
min: 2000,
|
||||||
max: 3000
|
max: 4000
|
||||||
};
|
};
|
||||||
_this.explodeTime = 500;
|
_this.explodeTime = randInt(500, 1000);
|
||||||
};
|
};
|
||||||
|
|
||||||
Fireworks.prototype = {
|
Fireworks.prototype = {
|
||||||
|
@ -59,14 +59,16 @@
|
||||||
dynamic: true,
|
dynamic: true,
|
||||||
velocity: {
|
velocity: {
|
||||||
x: 0.0,
|
x: 0.0,
|
||||||
y: 0.1,
|
y: randFloat(0.4, 1.0),
|
||||||
z: 0
|
z: 0
|
||||||
},
|
},
|
||||||
acceleration: {
|
acceleration: {
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 1,
|
y: randFloat(1.0, 2.0),
|
||||||
z: 0
|
z: 0
|
||||||
}
|
},
|
||||||
|
angularVelocity: {x: 0, y: randInt(0, 10), z: 0},
|
||||||
|
angularDamping: 0
|
||||||
});
|
});
|
||||||
|
|
||||||
var smokeTrailPosition = Vec3.sum(rocketPosition, {
|
var smokeTrailPosition = Vec3.sum(rocketPosition, {
|
||||||
|
@ -113,7 +115,7 @@
|
||||||
alphaFinish: 0,
|
alphaFinish: 0,
|
||||||
textures: "https://hifi-public.s3.amazonaws.com/alan/Particles/Particle-Sprite-Smoke-1.png",
|
textures: "https://hifi-public.s3.amazonaws.com/alan/Particles/Particle-Sprite-Smoke-1.png",
|
||||||
emitterShouldTrail: true,
|
emitterShouldTrail: true,
|
||||||
parentID: _this.missle
|
parentID: missle
|
||||||
};
|
};
|
||||||
|
|
||||||
var smoke = Entities.addEntity(smokeSettings);
|
var smoke = Entities.addEntity(smokeSettings);
|
||||||
|
@ -133,7 +135,7 @@
|
||||||
green: 132,
|
green: 132,
|
||||||
blue: 21
|
blue: 21
|
||||||
};
|
};
|
||||||
smokeSettings.lifespan = 0.7;
|
smokeSettings.lifespan = 1;
|
||||||
smokeSettings.emitAcceleration.y = -1;;
|
smokeSettings.emitAcceleration.y = -1;;
|
||||||
smokeSettings.alphaStart = 0.7;
|
smokeSettings.alphaStart = 0.7;
|
||||||
smokeSettings.alphaFinish = 0.1;
|
smokeSettings.alphaFinish = 0.1;
|
||||||
|
|
Loading…
Reference in a new issue