mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 04:27:57 +02:00
teleport sparkles, dressing room switch
This commit is contained in:
parent
266dfcd8e9
commit
7cf56401f5
5 changed files with 255 additions and 14 deletions
|
@ -147,6 +147,16 @@
|
||||||
setEntityCustomData('home-switch', _this.entityID, {
|
setEntityCustomData('home-switch', _this.entityID, {
|
||||||
state: 'on'
|
state: 'on'
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Entities.editEntity(this.entityID, {
|
||||||
|
"animation": {
|
||||||
|
"currentFrame": 1,
|
||||||
|
"firstFrame": 1,
|
||||||
|
"hold": 1,
|
||||||
|
"lastFrame": 2,
|
||||||
|
"url": "atp:/switches/lightswitch.fbx"
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
glowLights.forEach(function(glowLight) {
|
glowLights.forEach(function(glowLight) {
|
||||||
|
@ -161,9 +171,18 @@
|
||||||
setEntityCustomData('home-switch', this.entityID, {
|
setEntityCustomData('home-switch', this.entityID, {
|
||||||
state: 'off'
|
state: 'off'
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Entities.editEntity(this.entityID, {
|
||||||
|
"animation": {
|
||||||
|
"currentFrame": 3,
|
||||||
|
"firstFrame": 3,
|
||||||
|
"hold": 1,
|
||||||
|
"lastFrame": 4,
|
||||||
|
"url": "atp:/switches/lightswitch.fbx"
|
||||||
|
},
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
this.flipSwitch();
|
|
||||||
Audio.playSound(this.switchSound, {
|
Audio.playSound(this.switchSound, {
|
||||||
volume: 0.5,
|
volume: 0.5,
|
||||||
position: this.position
|
position: this.position
|
||||||
|
@ -171,20 +190,7 @@
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
flipSwitch: function() {
|
|
||||||
var rotation = Entities.getEntityProperties(this.entityID, "rotation").rotation;
|
|
||||||
var axis = {
|
|
||||||
x: 0,
|
|
||||||
y: 1,
|
|
||||||
z: 0
|
|
||||||
};
|
|
||||||
var dQ = Quat.angleAxis(180, axis);
|
|
||||||
rotation = Quat.multiply(rotation, dQ);
|
|
||||||
|
|
||||||
Entities.editEntity(this.entityID, {
|
|
||||||
rotation: rotation
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
preload: function(entityID) {
|
preload: function(entityID) {
|
||||||
this.entityID = entityID;
|
this.entityID = entityID;
|
|
@ -0,0 +1,65 @@
|
||||||
|
down sparkle
|
||||||
|
|
||||||
|
{
|
||||||
|
"color": {
|
||||||
|
"red": "#",
|
||||||
|
"green": "c",
|
||||||
|
"blue": "f"
|
||||||
|
},
|
||||||
|
"isEmitting": 1,
|
||||||
|
"maxParticles": 1000,
|
||||||
|
"lifespan": 2,
|
||||||
|
"emitRate": 10,
|
||||||
|
"emitSpeed": 0.1,
|
||||||
|
"speedSpread": 0.6,
|
||||||
|
"emitOrientation": {
|
||||||
|
"x": 0.8,
|
||||||
|
"y": 0,
|
||||||
|
"z": 0,
|
||||||
|
"w": 0.7071068286895752
|
||||||
|
},
|
||||||
|
"emitDimensions": {
|
||||||
|
"x": 0,
|
||||||
|
"y": 0,
|
||||||
|
"z": 0
|
||||||
|
},
|
||||||
|
"polarStart": 0,
|
||||||
|
"polarFinish": 0,
|
||||||
|
"azimuthStart": -3.1415927410125732,
|
||||||
|
"azimuthFinish": 3.1415927410125732,
|
||||||
|
"emitAcceleration": {
|
||||||
|
"x": 0,
|
||||||
|
"y": -1,
|
||||||
|
"z": 0
|
||||||
|
},
|
||||||
|
"accelerationSpread": {
|
||||||
|
"x": 0,
|
||||||
|
"y": 1,
|
||||||
|
"z": 0
|
||||||
|
},
|
||||||
|
"particleRadius": 0.02500000037252903,
|
||||||
|
"radiusSpread": 0,
|
||||||
|
"radiusStart": 0.079,
|
||||||
|
"radiusFinish": 0.053,
|
||||||
|
"colorSpread": {
|
||||||
|
"red": "#",
|
||||||
|
"green": "e",
|
||||||
|
"blue": "8"
|
||||||
|
},
|
||||||
|
"colorStart": {
|
||||||
|
"red": 255,
|
||||||
|
"green": 255,
|
||||||
|
"blue": 255
|
||||||
|
},
|
||||||
|
"colorFinish": {
|
||||||
|
"red": "#",
|
||||||
|
"green": "d",
|
||||||
|
"blue": "4"
|
||||||
|
},
|
||||||
|
"alpha": 1,
|
||||||
|
"alphaSpread": 0,
|
||||||
|
"alphaStart": 1,
|
||||||
|
"alphaFinish": 0,
|
||||||
|
"emitterShouldTrail": 1,
|
||||||
|
"textures": "atp:/teleport/sparkle1.png"
|
||||||
|
}
|
|
@ -0,0 +1,63 @@
|
||||||
|
{
|
||||||
|
"Entities": [
|
||||||
|
{
|
||||||
|
"accelerationSpread": {
|
||||||
|
"x": 0,
|
||||||
|
"y": 1,
|
||||||
|
"z": 0
|
||||||
|
},
|
||||||
|
"color": {
|
||||||
|
"blue": 207,
|
||||||
|
"green": 207,
|
||||||
|
"red": 207
|
||||||
|
},
|
||||||
|
"colorFinish": {
|
||||||
|
"blue": 207,
|
||||||
|
"green": 207,
|
||||||
|
"red": 207
|
||||||
|
},
|
||||||
|
"colorSpread": {
|
||||||
|
"blue": 125,
|
||||||
|
"green": 125,
|
||||||
|
"red": 232
|
||||||
|
},
|
||||||
|
"colorStart": {
|
||||||
|
"blue": 207,
|
||||||
|
"green": 207,
|
||||||
|
"red": 207
|
||||||
|
},
|
||||||
|
"created": "2016-05-23T20:41:38Z",
|
||||||
|
"dimensions": {
|
||||||
|
"x": 2.6566545963287354,
|
||||||
|
"y": 2.6566545963287354,
|
||||||
|
"z": 2.6566545963287354
|
||||||
|
},
|
||||||
|
"emitAcceleration": {
|
||||||
|
"x": 0,
|
||||||
|
"y": -1,
|
||||||
|
"z": 0
|
||||||
|
},
|
||||||
|
"emitOrientation": {
|
||||||
|
"w": 0.66226339340209961,
|
||||||
|
"x": 0.74927115440368652,
|
||||||
|
"y": -1.5258940038620494e-05,
|
||||||
|
"z": -1.5258940038620494e-05
|
||||||
|
},
|
||||||
|
"emitRate": 10,
|
||||||
|
"emitSpeed": 0.10000000149011612,
|
||||||
|
"id": "{e700e0a1-026a-4ebd-8609-6068b32df14e}",
|
||||||
|
"lifespan": 2,
|
||||||
|
"name": "home_particle_teleport_sparkle_down",
|
||||||
|
"queryAACube": {
|
||||||
|
"scale": 4.6014609336853027,
|
||||||
|
"x": -2.3007304668426514,
|
||||||
|
"y": -2.3007304668426514,
|
||||||
|
"z": -2.3007304668426514
|
||||||
|
},
|
||||||
|
"speedSpread": 0.60000002384185791,
|
||||||
|
"textures": "atp:/teleport/sparkle1.png",
|
||||||
|
"type": "ParticleEffect"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"Version": 57
|
||||||
|
}
|
|
@ -0,0 +1,63 @@
|
||||||
|
{
|
||||||
|
"color": {
|
||||||
|
"red": 255,
|
||||||
|
"green": 255,
|
||||||
|
"blue": 255
|
||||||
|
},
|
||||||
|
"isEmitting": 1,
|
||||||
|
"maxParticles": 210,
|
||||||
|
"lifespan": 3.6,
|
||||||
|
"emitRate": 11,
|
||||||
|
"emitSpeed": 0.5,
|
||||||
|
"speedSpread": 0.8,
|
||||||
|
"emitOrientation": {
|
||||||
|
"x": -1,
|
||||||
|
"y": -0.0000152587890625,
|
||||||
|
"z": -0.0000152587890625,
|
||||||
|
"w": 1
|
||||||
|
},
|
||||||
|
"emitDimensions": {
|
||||||
|
"x": 0,
|
||||||
|
"y": 0,
|
||||||
|
"z": 0
|
||||||
|
},
|
||||||
|
"polarStart": 0,
|
||||||
|
"polarFinish": 0,
|
||||||
|
"azimuthStart": -3.1415927410125732,
|
||||||
|
"azimuthFinish": 3.1415927410125732,
|
||||||
|
"emitAcceleration": {
|
||||||
|
"x": 0,
|
||||||
|
"y": 0.2,
|
||||||
|
"z": 0
|
||||||
|
},
|
||||||
|
"accelerationSpread": {
|
||||||
|
"x": 0,
|
||||||
|
"y": 0.30000000000000004,
|
||||||
|
"z": 0
|
||||||
|
},
|
||||||
|
"particleRadius": 0.02500000037252903,
|
||||||
|
"radiusSpread": 0,
|
||||||
|
"radiusStart": 0.013,
|
||||||
|
"radiusFinish": 0.014,
|
||||||
|
"colorSpread": {
|
||||||
|
"red": 0,
|
||||||
|
"green": 0,
|
||||||
|
"blue": 0
|
||||||
|
},
|
||||||
|
"colorStart": {
|
||||||
|
"red": 255,
|
||||||
|
"green": 255,
|
||||||
|
"blue": 255
|
||||||
|
},
|
||||||
|
"colorFinish": {
|
||||||
|
"red": 255,
|
||||||
|
"green": 255,
|
||||||
|
"blue": 255
|
||||||
|
},
|
||||||
|
"alpha": 1,
|
||||||
|
"alphaSpread": 0,
|
||||||
|
"alphaStart": 1,
|
||||||
|
"alphaFinish": 0,
|
||||||
|
"emitterShouldTrail": 0,
|
||||||
|
"textures": "atp:/teleport/sparkle2.png"
|
||||||
|
}
|
|
@ -0,0 +1,44 @@
|
||||||
|
{
|
||||||
|
"Entities": [
|
||||||
|
{
|
||||||
|
"accelerationSpread": {
|
||||||
|
"x": 0,
|
||||||
|
"y": 0.30000001192092896,
|
||||||
|
"z": 0
|
||||||
|
},
|
||||||
|
"created": "2016-05-23T20:56:55Z",
|
||||||
|
"dimensions": {
|
||||||
|
"x": 15.000479698181152,
|
||||||
|
"y": 15.000479698181152,
|
||||||
|
"z": 15.000479698181152
|
||||||
|
},
|
||||||
|
"emitAcceleration": {
|
||||||
|
"x": 0,
|
||||||
|
"y": 0.20000000298023224,
|
||||||
|
"z": 0
|
||||||
|
},
|
||||||
|
"emitOrientation": {
|
||||||
|
"w": 0.7070763111114502,
|
||||||
|
"x": -0.70713728666305542,
|
||||||
|
"y": -1.5258539860951714e-05,
|
||||||
|
"z": -1.5258539860951714e-05
|
||||||
|
},
|
||||||
|
"emitRate": 11,
|
||||||
|
"emitSpeed": 0.5,
|
||||||
|
"id": "{57104b1c-01a9-4f2b-b7bf-9eb406e8d78b}",
|
||||||
|
"lifespan": 3.5999999046325684,
|
||||||
|
"maxParticles": 210,
|
||||||
|
"name": "home_teleport_sparkler_up",
|
||||||
|
"queryAACube": {
|
||||||
|
"scale": 25.981592178344727,
|
||||||
|
"x": -12.990796089172363,
|
||||||
|
"y": -12.990796089172363,
|
||||||
|
"z": -12.990796089172363
|
||||||
|
},
|
||||||
|
"speedSpread": 0.80000001192092896,
|
||||||
|
"textures": "atp:/teleport/sparkle2.png",
|
||||||
|
"type": "ParticleEffect"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"Version": 57
|
||||||
|
}
|
Loading…
Reference in a new issue