mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 17:10:41 +02:00
create beams at start
This commit is contained in:
parent
1134d12ea0
commit
31526091d3
1 changed files with 13 additions and 6 deletions
|
@ -425,6 +425,7 @@ function MyController(hand) {
|
||||||
type: "ParticleEffect",
|
type: "ParticleEffect",
|
||||||
isEmitting: true,
|
isEmitting: true,
|
||||||
position: position,
|
position: position,
|
||||||
|
visible: false,
|
||||||
//rotation:Quat.fromPitchYawRollDegrees(-90.0, 0.0, 0.0),
|
//rotation:Quat.fromPitchYawRollDegrees(-90.0, 0.0, 0.0),
|
||||||
"name": "Particle Beam",
|
"name": "Particle Beam",
|
||||||
"color": {
|
"color": {
|
||||||
|
@ -436,12 +437,12 @@ function MyController(hand) {
|
||||||
"lifespan": 3,
|
"lifespan": 3,
|
||||||
"emitRate": 50,
|
"emitRate": 50,
|
||||||
"emitSpeed": 2,
|
"emitSpeed": 2,
|
||||||
"speedSpread": 0.1,
|
"speedSpread": 0,
|
||||||
"emitOrientation": {
|
"emitOrientation": {
|
||||||
"x": -0.7000000000000001,
|
"x": -1,
|
||||||
"y": 0,
|
"y": 0,
|
||||||
"z": 0,
|
"z": 0,
|
||||||
"w": 0.7071068286895752
|
"w": 1
|
||||||
},
|
},
|
||||||
"emitDimensions": {
|
"emitDimensions": {
|
||||||
"x": 0,
|
"x": 0,
|
||||||
|
@ -486,7 +487,7 @@ function MyController(hand) {
|
||||||
"alphaSpread": 0,
|
"alphaSpread": 0,
|
||||||
"alphaStart": 1,
|
"alphaStart": 1,
|
||||||
"alphaFinish": 1,
|
"alphaFinish": 1,
|
||||||
"additiveBlending": 0,
|
"additiveBlending": 1,
|
||||||
"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"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -502,6 +503,7 @@ function MyController(hand) {
|
||||||
//rotation:rotation,
|
//rotation:rotation,
|
||||||
rotation: orientation,
|
rotation: orientation,
|
||||||
position: position,
|
position: position,
|
||||||
|
visible: true
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -525,10 +527,12 @@ function MyController(hand) {
|
||||||
|
|
||||||
this.particleBeamOff = function() {
|
this.particleBeamOff = function() {
|
||||||
if (this.particleBeam !== null) {
|
if (this.particleBeam !== null) {
|
||||||
Entities.deleteEntity(this.particleBeam)
|
Entities.editEntity(this.particleBeam, {
|
||||||
|
visible: false
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
this.particleBeam = null;
|
//this.particleBeam = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.triggerPress = function(value) {
|
this.triggerPress = function(value) {
|
||||||
|
@ -1314,6 +1318,7 @@ function MyController(hand) {
|
||||||
this.cleanup = function() {
|
this.cleanup = function() {
|
||||||
this.release();
|
this.release();
|
||||||
this.endHandGrasp();
|
this.endHandGrasp();
|
||||||
|
Entities.deleteEntity(this.particleBeam);
|
||||||
};
|
};
|
||||||
|
|
||||||
this.activateEntity = function(entityID, grabbedProperties) {
|
this.activateEntity = function(entityID, grabbedProperties) {
|
||||||
|
@ -1404,6 +1409,8 @@ function MyController(hand) {
|
||||||
|
|
||||||
var rightController = new MyController(RIGHT_HAND);
|
var rightController = new MyController(RIGHT_HAND);
|
||||||
var leftController = new MyController(LEFT_HAND);
|
var leftController = new MyController(LEFT_HAND);
|
||||||
|
rightController.createParticleBeam();
|
||||||
|
leftController.createParticleBeam();
|
||||||
|
|
||||||
var MAPPING_NAME = "com.highfidelity.handControllerGrab";
|
var MAPPING_NAME = "com.highfidelity.handControllerGrab";
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue