mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-07-22 18:13:52 +02:00
better water effect
This commit is contained in:
parent
cdd4fdb03e
commit
b9bd4cae93
1 changed files with 24 additions and 19 deletions
|
@ -98,10 +98,11 @@
|
||||||
|
|
||||||
|
|
||||||
createWaterEffect: function() {
|
createWaterEffect: function() {
|
||||||
|
var waterEffectPosition = Vec3.sum(_this.waterSpoutPosition, Vec3.multiply(Quat.getFront(_this.waterSpoutRotation), -0.04));
|
||||||
_this.waterEffect = Entities.addEntity({
|
_this.waterEffect = Entities.addEntity({
|
||||||
type: "ParticleEffect",
|
type: "ParticleEffect",
|
||||||
name: "water particle effect",
|
name: "water particle effect",
|
||||||
position: _this.waterSpoutPosition,
|
position: waterEffectPosition,
|
||||||
isEmitting: false,
|
isEmitting: false,
|
||||||
parentID: _this.waterSpout,
|
parentID: _this.waterSpout,
|
||||||
colorStart: {
|
colorStart: {
|
||||||
|
@ -115,41 +116,41 @@
|
||||||
blue: 130
|
blue: 130
|
||||||
},
|
},
|
||||||
colorFinish: {
|
colorFinish: {
|
||||||
red: 60,
|
red: 23,
|
||||||
green: 30,
|
green: 195,
|
||||||
blue: 140
|
blue: 206
|
||||||
},
|
},
|
||||||
maxParticles: 20000,
|
maxParticles: 20000,
|
||||||
lifespan: 2,
|
lifespan: 2,
|
||||||
emitRate: 1000,
|
emitRate: 2000,
|
||||||
emitSpeed: .2,
|
emitSpeed: .2,
|
||||||
speedSpread: 0.0,
|
speedSpread: 0.0,
|
||||||
emitDimensions: {
|
emitDimensions: {
|
||||||
x: 0,
|
x: 0.0,
|
||||||
y: 0,
|
y: 0.0,
|
||||||
z: 0
|
z: 0.0
|
||||||
},
|
},
|
||||||
emitAcceleration: {
|
emitAcceleration: {
|
||||||
x: 0.0,
|
x: 0.0,
|
||||||
y: 0,
|
y: 0,
|
||||||
z: 0
|
z: 0
|
||||||
},
|
},
|
||||||
polarStart: 0,
|
polarStart: 0.0,
|
||||||
polarFinish: .1,
|
polarFinish: 0.1,
|
||||||
accelerationSpread: {
|
accelerationSpread: {
|
||||||
x: 0.01,
|
x: 0.01,
|
||||||
y: 0.0,
|
y: 0.0,
|
||||||
z: 0.01
|
z: 0.01
|
||||||
},
|
},
|
||||||
emitOrientation: Quat.fromPitchYawRollDegrees(0, 180, 0),
|
emitOrientation: Quat.fromPitchYawRollDegrees(0, 0, 0),
|
||||||
particleRadius: 0.01,
|
radiusSpread: 0.0001,
|
||||||
radiusSpread: 0.001,
|
radiusStart: 0.005,
|
||||||
radiusStart: 0.01,
|
particleRadius: 0.003,
|
||||||
radiusFinish: 0.01,
|
radiusFinish: 0.001,
|
||||||
alpha: 0.9,
|
alphaSpread: 0,
|
||||||
alphaSpread: .1,
|
alphaStart: 0.1,
|
||||||
alphaStart: 0.7,
|
alpha: 1.0,
|
||||||
alphaFinish: 0.5,
|
alphaFinish: 1.0,
|
||||||
emitterShouldTrail: true,
|
emitterShouldTrail: true,
|
||||||
textures: "https://s3-us-west-1.amazonaws.com/hifi-content/eric/images/raindrop.png?v2",
|
textures: "https://s3-us-west-1.amazonaws.com/hifi-content/eric/images/raindrop.png?v2",
|
||||||
});
|
});
|
||||||
|
@ -207,6 +208,10 @@
|
||||||
unload: function() {
|
unload: function() {
|
||||||
Overlays.deleteOverlay(_this.rayCastLine);
|
Overlays.deleteOverlay(_this.rayCastLine);
|
||||||
Entities.deleteEntity(_this.waterEffect);
|
Entities.deleteEntity(_this.waterEffect);
|
||||||
|
if (_this.waterInjector) {
|
||||||
|
_this.waterInjector.stop();
|
||||||
|
delete _this.waterInjector;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue