mirror of
https://github.com/overte-org/overte.git
synced 2025-08-18 14:12:33 +02:00
light ball
This commit is contained in:
parent
3d782f1307
commit
8d691f2132
3 changed files with 53 additions and 2 deletions
0
examples/flowArts/lightBall/lightBall.js
Normal file
0
examples/flowArts/lightBall/lightBall.js
Normal file
51
examples/flowArts/lightBall/lightBallSpawner.js
Normal file
51
examples/flowArts/lightBall/lightBallSpawner.js
Normal file
|
@ -0,0 +1,51 @@
|
|||
var center = Vec3.sum(MyAvatar.position, Vec3.multiply(3, Quat.getFront(Camera.getOrientation())));
|
||||
|
||||
var lightBall = Entities.addEntity({
|
||||
position: center,
|
||||
type: "ParticleEffect",
|
||||
isEmitting: true,
|
||||
"name": "ParticlesTest Emitter",
|
||||
"colorStart": {red: 20, green: 20, blue: 255},
|
||||
color: {red: 10, green: 0, blue: 255},
|
||||
"colorFinish": {red: 250, green: 200, blue:255},
|
||||
// "maxParticles": 100000,
|
||||
"lifespan": 1,
|
||||
"emitRate": 1000,
|
||||
"emitSpeed": .1,
|
||||
"speedSpread": .01,
|
||||
"emitDimensions": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"polarStart": 0,
|
||||
"polarFinish": 3,
|
||||
"azimuthStart": -3.1415927410125732,
|
||||
"azimuthFinish": 3.1415927410125732,
|
||||
"emitAcceleration": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"accelerationSpread": {
|
||||
"x": .01,
|
||||
"y": .01,
|
||||
"z": .01
|
||||
},
|
||||
"particleRadius": 0.04,
|
||||
"radiusSpread": 0,
|
||||
"radiusStart": 0.05,
|
||||
"radiusFinish": 0.0003,
|
||||
"alpha": 0,
|
||||
"alphaSpread": .5,
|
||||
"alphaStart": 0,
|
||||
"alphaFinish": 0.5,
|
||||
"additiveBlending": 0,
|
||||
"textures": "https://hifi-public.s3.amazonaws.com/alan/Particles/Particle-Sprite-Smoke-1.png"
|
||||
})
|
||||
|
||||
function cleanup() {
|
||||
Entities.deleteEntity(lightBall);
|
||||
}
|
||||
|
||||
Script.scriptEnding.connect(cleanup);
|
|
@ -52,13 +52,13 @@ const float ParticleEffectEntityItem::MINIMUM_ALPHA = 0.0f;
|
|||
const float ParticleEffectEntityItem::MAXIMUM_ALPHA = 1.0f;
|
||||
const quint32 ParticleEffectEntityItem::DEFAULT_MAX_PARTICLES = 1000;
|
||||
const quint32 ParticleEffectEntityItem::MINIMUM_MAX_PARTICLES = 1;
|
||||
const quint32 ParticleEffectEntityItem::MAXIMUM_MAX_PARTICLES = 10000;
|
||||
const quint32 ParticleEffectEntityItem::MAXIMUM_MAX_PARTICLES = 100000;
|
||||
const float ParticleEffectEntityItem::DEFAULT_LIFESPAN = 3.0f;
|
||||
const float ParticleEffectEntityItem::MINIMUM_LIFESPAN = 0.0f;
|
||||
const float ParticleEffectEntityItem::MAXIMUM_LIFESPAN = 86400.0f; // 1 day
|
||||
const float ParticleEffectEntityItem::DEFAULT_EMIT_RATE = 15.0f;
|
||||
const float ParticleEffectEntityItem::MINIMUM_EMIT_RATE = 0.0f;
|
||||
const float ParticleEffectEntityItem::MAXIMUM_EMIT_RATE = 1000.0f;
|
||||
const float ParticleEffectEntityItem::MAXIMUM_EMIT_RATE = 100000.0f;
|
||||
const float ParticleEffectEntityItem::DEFAULT_EMIT_SPEED = 5.0f;
|
||||
const float ParticleEffectEntityItem::MINIMUM_EMIT_SPEED = 0.0f;
|
||||
const float ParticleEffectEntityItem::MAXIMUM_EMIT_SPEED = 1000.0f; // Approx mach 3
|
||||
|
|
Loading…
Reference in a new issue