mirror of
https://github.com/overte-org/overte.git
synced 2025-08-04 20:29:10 +02:00
updated ravestick model
This commit is contained in:
parent
f19d1a3067
commit
8d80c06f02
2 changed files with 5 additions and 50 deletions
|
@ -77,61 +77,13 @@ RaveStick = function(spawnPosition) {
|
|||
green: 200,
|
||||
blue: 40
|
||||
};
|
||||
var props = {
|
||||
type: "ParticleEffect",
|
||||
position: position,
|
||||
parentID: stick,
|
||||
isEmitting: true,
|
||||
name: "raveBeam",
|
||||
colorStart: color,
|
||||
colorSpread: {
|
||||
red: 200,
|
||||
green: 10,
|
||||
blue: 10
|
||||
},
|
||||
color: {
|
||||
red: 200,
|
||||
green: 200,
|
||||
blue: 255
|
||||
},
|
||||
colorFinish: color,
|
||||
maxParticles: 100000,
|
||||
lifespan: 1,
|
||||
emitRate: 1000,
|
||||
emitOrientation: forwardQuat,
|
||||
emitSpeed: 0.2,
|
||||
speedSpread: 0.0,
|
||||
polarStart: 0,
|
||||
polarFinish: 0.0,
|
||||
azimuthStart: .1,
|
||||
azimuthFinish: 0.01,
|
||||
emitAcceleration: {
|
||||
x: 0,
|
||||
y: 0,
|
||||
z: 0
|
||||
},
|
||||
accelerationSpread: {
|
||||
x: .00,
|
||||
y: .00,
|
||||
z: .00
|
||||
},
|
||||
radiusStart: 0.03,
|
||||
radiusFinish: 0.025,
|
||||
alpha: 0.7,
|
||||
alphaSpread: 0.1,
|
||||
alphaStart: 0.5,
|
||||
alphaFinish: 0.5,
|
||||
textures: "https://s3-us-west-1.amazonaws.com/hifi-content/eric/textures/beamParticle.png",
|
||||
emitterShouldTrail: false,
|
||||
}
|
||||
var beam = Entities.addEntity(props);
|
||||
|
||||
|
||||
|
||||
|
||||
function cleanup() {
|
||||
Entities.deleteEntity(stick);
|
||||
Entities.deleteEntity(light);
|
||||
Entities.deleteEntity(beam);
|
||||
}
|
||||
|
||||
this.cleanup = cleanup;
|
||||
|
|
|
@ -73,7 +73,7 @@
|
|||
var forwardVec = Quat.getFront(Quat.multiply(props.rotation, Quat.fromPitchYawRollDegrees(-90, 0, 0)));
|
||||
forwardVec = Vec3.normalize(forwardVec);
|
||||
var forwardQuat = orientationOf(forwardVec);
|
||||
var position = Vec3.sum(props.position, Vec3.multiply(Quat.getFront(props.rotation), 0.2));
|
||||
var position = Vec3.sum(props.position, Vec3.multiply(Quat.getFront(props.rotation), 0.04));
|
||||
var localPoint = Vec3.subtract(position, this.trailBasePosition);
|
||||
if (this.points.length >= 1 && Vec3.distance(localPoint, this.points[this.points.length - 1]) < MIN_POINT_DISTANCE) {
|
||||
//Need a minimum distance to avoid binormal NANs
|
||||
|
@ -114,6 +114,9 @@
|
|||
},
|
||||
|
||||
releaseGrab: function() {
|
||||
if(!this.trailEraseInterval) {
|
||||
return;
|
||||
}
|
||||
Script.setTimeout(function() {
|
||||
Script.clearInterval(_this.trailEraseInterval);
|
||||
_this.trailEraseInterval = null;
|
||||
|
|
Loading…
Reference in a new issue