mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-04 03:13:09 +02:00
Lights should now only be created once at start of running reset master script, no matter how many people there are in the room
This commit is contained in:
parent
4b62048fb1
commit
e6e60e5e7a
4 changed files with 89 additions and 416 deletions
|
@ -16,12 +16,12 @@
|
||||||
/*global LightSwitch */
|
/*global LightSwitch */
|
||||||
|
|
||||||
(function () {
|
(function () {
|
||||||
|
var utilitiesScript = Script.resolvePath("../libraries/utils.js");
|
||||||
|
Script.include(utilitiesScript);
|
||||||
|
|
||||||
var LightSwitch = function () {
|
LightSwitch = function () {
|
||||||
this.switchSound = SoundCache.getSound("https://hifi-public.s3.amazonaws.com/sounds/Switches%20and%20sliders/lamp_switch_2.wav");
|
this.switchSound = SoundCache.getSound("https://hifi-public.s3.amazonaws.com/sounds/Switches%20and%20sliders/lamp_switch_2.wav");
|
||||||
print("SHNUUUUR")
|
}
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
LightSwitch.prototype = {
|
LightSwitch.prototype = {
|
||||||
|
|
||||||
|
@ -32,21 +32,57 @@
|
||||||
this.toggleLights();
|
this.toggleLights();
|
||||||
},
|
},
|
||||||
|
|
||||||
toggleLights: function () {
|
|
||||||
print("TOGGLE LIGHTS");
|
|
||||||
},
|
|
||||||
|
|
||||||
startNearGrabNonColliding: function () {
|
startNearGrabNonColliding: function () {
|
||||||
this.toggleLights();
|
this.toggleLights();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
toggleLights: function () {
|
||||||
|
var lightData = getEntityCustomData(this.resetKey, this.entityID, {});
|
||||||
|
var on = lightData.on;
|
||||||
|
var lightType = lightData.type;
|
||||||
|
|
||||||
|
var lights = Entities.findEntities(this.position, 20);
|
||||||
|
lights.forEach(function (light) {
|
||||||
|
var type = getEntityCustomData(this.resetKey, light, {}).type;
|
||||||
|
if (type === lightType) {
|
||||||
|
Entities.editEntity(light, {
|
||||||
|
visible: on
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
this.flipSwitch();
|
||||||
|
|
||||||
|
setEntityCustomData(this.resetKey, this.entityID, {
|
||||||
|
on: !on
|
||||||
|
type: lightType,
|
||||||
|
resetMe: true
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
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;
|
||||||
|
this.resetKey = "resetMe";
|
||||||
//The light switch is static, so just cache its position once
|
//The light switch is static, so just cache its position once
|
||||||
this.position = Entities.getEntityProperties(this.entityID, "position").position;
|
this.position = Entities.getEntityProperties(this.entityID, "position").position;
|
||||||
},
|
this.lightType = getEntityCustomData(this.resetKey, this.entityID, {}).type;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// entity scripts always need to return a newly constructed object of our type
|
// entity scripts always need to return a newly constructed object of our type
|
||||||
return new LightSwitch();
|
return new LightSwitch();
|
||||||
}());
|
});
|
|
@ -1,202 +0,0 @@
|
||||||
//
|
|
||||||
// lightSwitchGarage.js.js
|
|
||||||
// examples/entityScripts
|
|
||||||
//
|
|
||||||
// Created by Eric Levin on 9/21/15.
|
|
||||||
// Copyright 2015 High Fidelity, Inc.
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// Distributed under the Apache License, Version 2.0.
|
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
|
||||||
//
|
|
||||||
|
|
||||||
(function() {
|
|
||||||
|
|
||||||
var _this;
|
|
||||||
|
|
||||||
// this is the "constructor" for the entity as a JS object we don't do much here, but we do want to remember
|
|
||||||
// our this object, so we can access it in cases where we're called without a this (like in the case of various global signals)
|
|
||||||
LightSwitchGarage = function() {
|
|
||||||
_this = this;
|
|
||||||
|
|
||||||
this.lightStateKey = "lightStateKey";
|
|
||||||
this.resetKey = "resetMe";
|
|
||||||
|
|
||||||
this.switchSound = SoundCache.getSound("https://hifi-public.s3.amazonaws.com/sounds/Switches%20and%20sliders/lamp_switch_2.wav");
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
LightSwitchGarage.prototype = {
|
|
||||||
|
|
||||||
clickReleaseOnEntity: function(entityID, mouseEvent) {
|
|
||||||
if (!mouseEvent.isLeftButton) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.toggleLights();
|
|
||||||
},
|
|
||||||
|
|
||||||
startNearGrabNonColliding: function() {
|
|
||||||
this.toggleLights();
|
|
||||||
},
|
|
||||||
|
|
||||||
toggleLights: function() {
|
|
||||||
var defaultLightData = {
|
|
||||||
on: false
|
|
||||||
};
|
|
||||||
var lightState = getEntityCustomData(this.lightStateKey, this.entityID, defaultLightData);
|
|
||||||
if (lightState.on === true) {
|
|
||||||
this.clearLights();
|
|
||||||
} else if (lightState.on === false) {
|
|
||||||
this.createLights();
|
|
||||||
}
|
|
||||||
|
|
||||||
this.flipLights();
|
|
||||||
|
|
||||||
Audio.playSound(this.switchSound, {
|
|
||||||
volume: 0.5,
|
|
||||||
position: this.position
|
|
||||||
});
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
clearLights: function() {
|
|
||||||
var entities = Entities.findEntities(MyAvatar.position, 100);
|
|
||||||
var self = this;
|
|
||||||
entities.forEach(function(entity) {
|
|
||||||
var resetData = getEntityCustomData(self.resetKey, entity, {})
|
|
||||||
if (resetData.resetMe === true && resetData.lightType === "Sconce Light Garage") {
|
|
||||||
Entities.deleteEntity(entity);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
setEntityCustomData(this.lightStateKey, this.entityID, {
|
|
||||||
on: false
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
createLights: function() {
|
|
||||||
|
|
||||||
var sconceLight3 = Entities.addEntity({
|
|
||||||
type: "Light",
|
|
||||||
position: {
|
|
||||||
x: 545.49468994140625,
|
|
||||||
y: 496.24026489257812,
|
|
||||||
z: 500.63516235351562
|
|
||||||
},
|
|
||||||
|
|
||||||
name: "Sconce 3 Light",
|
|
||||||
dimensions: {
|
|
||||||
x: 2.545,
|
|
||||||
y: 2.545,
|
|
||||||
z: 2.545
|
|
||||||
},
|
|
||||||
cutoff: 90,
|
|
||||||
color: {
|
|
||||||
red: 217,
|
|
||||||
green: 146,
|
|
||||||
blue: 24
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
setEntityCustomData(this.resetKey, sconceLight3, {
|
|
||||||
resetMe: true,
|
|
||||||
lightType: "Sconce Light Garage"
|
|
||||||
});
|
|
||||||
|
|
||||||
var sconceLight4 = Entities.addEntity({
|
|
||||||
type: "Light",
|
|
||||||
position: {
|
|
||||||
x: 550.90399169921875,
|
|
||||||
y: 496.24026489257812,
|
|
||||||
z: 507.90237426757812
|
|
||||||
},
|
|
||||||
name: "Sconce 4 Light",
|
|
||||||
dimensions: {
|
|
||||||
x: 2.545,
|
|
||||||
y: 2.545,
|
|
||||||
z: 2.545
|
|
||||||
},
|
|
||||||
cutoff: 90,
|
|
||||||
color: {
|
|
||||||
red: 217,
|
|
||||||
green: 146,
|
|
||||||
blue: 24
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
setEntityCustomData(this.resetKey, sconceLight4, {
|
|
||||||
resetMe: true,
|
|
||||||
lightType: "Sconce Light Garage"
|
|
||||||
});
|
|
||||||
|
|
||||||
var sconceLight5 = Entities.addEntity({
|
|
||||||
type: "Light",
|
|
||||||
position: {
|
|
||||||
x: 548.407958984375,
|
|
||||||
y: 496.24026489257812,
|
|
||||||
z: 509.5504150390625
|
|
||||||
},
|
|
||||||
name: "Sconce 5 Light",
|
|
||||||
dimensions: {
|
|
||||||
x: 2.545,
|
|
||||||
y: 2.545,
|
|
||||||
z: 2.545
|
|
||||||
},
|
|
||||||
cutoff: 90,
|
|
||||||
color: {
|
|
||||||
red: 217,
|
|
||||||
green: 146,
|
|
||||||
blue: 24
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
setEntityCustomData(this.resetKey, sconceLight5, {
|
|
||||||
resetMe: true,
|
|
||||||
lightType: "Sconce Light Garage"
|
|
||||||
});
|
|
||||||
|
|
||||||
setEntityCustomData(this.lightStateKey, this.entityID, {
|
|
||||||
on: true
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
flipLights: function() {
|
|
||||||
// flip model to give illusion of light switch being flicked
|
|
||||||
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) {
|
|
||||||
this.entityID = entityID;
|
|
||||||
|
|
||||||
//The light switch is static, so just cache its position once
|
|
||||||
this.position = Entities.getEntityProperties(this.entityID, "position").position;
|
|
||||||
var defaultLightData = {
|
|
||||||
on: false
|
|
||||||
};
|
|
||||||
var lightState = getEntityCustomData(this.lightStateKey, this.entityID, defaultLightData);
|
|
||||||
|
|
||||||
//If light is off, then we create two new lights- at the position of the sconces
|
|
||||||
if (lightState.on === false) {
|
|
||||||
this.createLights();
|
|
||||||
this.flipLights();
|
|
||||||
}
|
|
||||||
//If lights are on, do nothing!
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
// entity scripts always need to return a newly constructed object of our type
|
|
||||||
return new LightSwitchGarage();
|
|
||||||
})
|
|
|
@ -1,179 +0,0 @@
|
||||||
//
|
|
||||||
// lightSwitchHall.js
|
|
||||||
// examples/entityScripts
|
|
||||||
//
|
|
||||||
// Created by Eric Levin on 9/21/15.
|
|
||||||
// Copyright 2015 High Fidelity, Inc.
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// Distributed under the Apache License, Version 2.0.
|
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
|
||||||
//
|
|
||||||
|
|
||||||
(function() {
|
|
||||||
|
|
||||||
var _this;
|
|
||||||
|
|
||||||
|
|
||||||
// this is the "constructor" for the entity as a JS object we don't do much here, but we do want to remember
|
|
||||||
// our this object, so we can access it in cases where we're called without a this (like in the case of various global signals)
|
|
||||||
LightSwitchHall = function() {
|
|
||||||
_this = this;
|
|
||||||
|
|
||||||
this.lightStateKey = "lightStateKey";
|
|
||||||
this.resetKey = "resetMe";
|
|
||||||
|
|
||||||
this.switchSound = SoundCache.getSound("https://hifi-public.s3.amazonaws.com/sounds/Switches%20and%20sliders/lamp_switch_2.wav");
|
|
||||||
};
|
|
||||||
|
|
||||||
LightSwitchHall.prototype = {
|
|
||||||
|
|
||||||
clickReleaseOnEntity: function(entityId, mouseEvent) {
|
|
||||||
if (!mouseEvent.isLeftButton) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.toggleLights();
|
|
||||||
},
|
|
||||||
|
|
||||||
startNearGrabNonColliding: function() {
|
|
||||||
this.toggleLights();
|
|
||||||
},
|
|
||||||
|
|
||||||
toggleLights: function() {
|
|
||||||
var defaultLightData = {
|
|
||||||
on: false
|
|
||||||
};
|
|
||||||
var lightState = getEntityCustomData(this.lightStateKey, this.entityID, defaultLightData);
|
|
||||||
if (lightState.on === true) {
|
|
||||||
this.clearLights();
|
|
||||||
} else if (lightState.on === false) {
|
|
||||||
this.createLights();
|
|
||||||
}
|
|
||||||
|
|
||||||
// flip model to give illusion of light switch being flicked
|
|
||||||
this.flipLights();
|
|
||||||
|
|
||||||
Audio.playSound(this.switchSound, {
|
|
||||||
volume: 0.5,
|
|
||||||
position: this.position
|
|
||||||
});
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
clearLights: function() {
|
|
||||||
var entities = Entities.findEntities(MyAvatar.position, 100);
|
|
||||||
var self = this;
|
|
||||||
entities.forEach(function(entity) {
|
|
||||||
var resetData = getEntityCustomData(self.resetKey, entity, {})
|
|
||||||
if (resetData.resetMe === true && resetData.lightType === "Sconce Light Hall") {
|
|
||||||
Entities.deleteEntity(entity);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
setEntityCustomData(this.lightStateKey, this.entityID, {
|
|
||||||
on: false
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
createLights: function() {
|
|
||||||
var sconceLight1 = Entities.addEntity({
|
|
||||||
type: "Light",
|
|
||||||
position: {
|
|
||||||
x: 543.75,
|
|
||||||
y: 496.24,
|
|
||||||
z: 511.13
|
|
||||||
},
|
|
||||||
name: "Sconce 1 Light",
|
|
||||||
dimensions: {
|
|
||||||
x: 2.545,
|
|
||||||
y: 2.545,
|
|
||||||
z: 2.545
|
|
||||||
},
|
|
||||||
cutoff: 90,
|
|
||||||
color: {
|
|
||||||
red: 217,
|
|
||||||
green: 146,
|
|
||||||
blue: 24
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
setEntityCustomData(this.resetKey, sconceLight1, {
|
|
||||||
resetMe: true,
|
|
||||||
lightType: "Sconce Light Hall"
|
|
||||||
});
|
|
||||||
|
|
||||||
var sconceLight2 = Entities.addEntity({
|
|
||||||
type: "Light",
|
|
||||||
position: {
|
|
||||||
x: 540.1,
|
|
||||||
y: 496.24,
|
|
||||||
z: 505.57
|
|
||||||
},
|
|
||||||
name: "Sconce 2 Light",
|
|
||||||
dimensions: {
|
|
||||||
x: 2.545,
|
|
||||||
y: 2.545,
|
|
||||||
z: 2.545
|
|
||||||
},
|
|
||||||
cutoff: 90,
|
|
||||||
color: {
|
|
||||||
red: 217,
|
|
||||||
green: 146,
|
|
||||||
blue: 24
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
setEntityCustomData(this.resetKey, sconceLight2, {
|
|
||||||
resetMe: true,
|
|
||||||
lightType: "Sconce Light Hall"
|
|
||||||
});
|
|
||||||
|
|
||||||
setEntityCustomData(this.lightStateKey, this.entityID, {
|
|
||||||
on: true
|
|
||||||
});
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
flipLights: function() {
|
|
||||||
// flip model to give illusion of light switch being flicked
|
|
||||||
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() will be called when the entity has become visible (or known) to the interface
|
|
||||||
// it gives us a chance to set our local JavaScript object up. In this case it means:
|
|
||||||
preload: function(entityID) {
|
|
||||||
this.entityID = entityID;
|
|
||||||
|
|
||||||
//The light switch is static, so just cache its position once
|
|
||||||
this.position = Entities.getEntityProperties(this.entityID, "position").position;
|
|
||||||
var defaultLightData = {
|
|
||||||
on: false
|
|
||||||
};
|
|
||||||
var lightState = getEntityCustomData(this.lightStateKey, this.entityID, defaultLightData);
|
|
||||||
|
|
||||||
//If light is off, then we create two new lights- at the position of the sconces
|
|
||||||
if (lightState.on === false) {
|
|
||||||
this.createLights();
|
|
||||||
this.flipLights();
|
|
||||||
|
|
||||||
}
|
|
||||||
//If lights are on, do nothing!
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
// entity scripts always need to return a newly constructed object of our type
|
|
||||||
return new LightSwitchHall();
|
|
||||||
})
|
|
|
@ -111,6 +111,20 @@ function createLights() {
|
||||||
|
|
||||||
var scriptURL = Script.resolvePath("../examples/toys/lightSwitch.js");
|
var scriptURL = Script.resolvePath("../examples/toys/lightSwitch.js");
|
||||||
|
|
||||||
|
var rotation = {
|
||||||
|
w: 0.63280689716339111,
|
||||||
|
x: 0.63280689716339111,
|
||||||
|
y: -0.31551080942153931,
|
||||||
|
z: 0.31548023223876953
|
||||||
|
};
|
||||||
|
var axis = {
|
||||||
|
x: 0,
|
||||||
|
y: 1,
|
||||||
|
z: 0
|
||||||
|
};
|
||||||
|
var dQ = Quat.angleAxis(180, axis);
|
||||||
|
rotation = Quat.multiply(rotation, dQ);
|
||||||
|
|
||||||
var lightSwitchHall = Entities.addEntity({
|
var lightSwitchHall = Entities.addEntity({
|
||||||
type: "Model",
|
type: "Model",
|
||||||
modelURL: modelURL,
|
modelURL: modelURL,
|
||||||
|
@ -121,12 +135,7 @@ function createLights() {
|
||||||
y: 495.67999267578125,
|
y: 495.67999267578125,
|
||||||
z: 511.00564575195312
|
z: 511.00564575195312
|
||||||
},
|
},
|
||||||
rotation: {
|
rotation: rotation,
|
||||||
w: 0.63280689716339111,
|
|
||||||
x: 0.63280689716339111,
|
|
||||||
y: -0.31551080942153931,
|
|
||||||
z: 0.31548023223876953
|
|
||||||
},
|
|
||||||
dimensions: {
|
dimensions: {
|
||||||
x: 0.10546875,
|
x: 0.10546875,
|
||||||
y: 0.032372996211051941,
|
y: 0.032372996211051941,
|
||||||
|
@ -134,7 +143,9 @@ function createLights() {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
setEntityCustomData(resetKey, lightSwitchHall, {
|
setEntityCustomData(resetKey, lightSwitchHall, {
|
||||||
resetMe: true
|
resetMe: true,
|
||||||
|
on: true,
|
||||||
|
type: "Hall Light"
|
||||||
});
|
});
|
||||||
|
|
||||||
var sconceLight1 = Entities.addEntity({
|
var sconceLight1 = Entities.addEntity({
|
||||||
|
@ -160,8 +171,7 @@ function createLights() {
|
||||||
|
|
||||||
setEntityCustomData(resetKey, sconceLight1, {
|
setEntityCustomData(resetKey, sconceLight1, {
|
||||||
resetMe: true,
|
resetMe: true,
|
||||||
lightType: "Sconce Light",
|
type: "Hall Light",
|
||||||
on: true
|
|
||||||
});
|
});
|
||||||
|
|
||||||
var sconceLight2 = Entities.addEntity({
|
var sconceLight2 = Entities.addEntity({
|
||||||
|
@ -187,26 +197,35 @@ function createLights() {
|
||||||
|
|
||||||
setEntityCustomData(resetKey, sconceLight2, {
|
setEntityCustomData(resetKey, sconceLight2, {
|
||||||
resetMe: true,
|
resetMe: true,
|
||||||
lightType: "Sconce Light",
|
type: "Hall Light",
|
||||||
state: true
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
rotation = {
|
||||||
|
w: 0.20082402229309082,
|
||||||
|
x: 0.20082402229309082,
|
||||||
|
y: -0.67800414562225342,
|
||||||
|
z: 0.67797362804412842
|
||||||
|
};
|
||||||
|
axis = {
|
||||||
|
x: 0,
|
||||||
|
y: 1,
|
||||||
|
z: 0
|
||||||
|
};
|
||||||
|
dQ = Quat.angleAxis(180, axis);
|
||||||
|
rotation = Quat.multiply(rotation, dQ);
|
||||||
|
|
||||||
var lightSwitchGarage = Entities.addEntity({
|
var lightSwitchGarage = Entities.addEntity({
|
||||||
type: "Model",
|
type: "Model",
|
||||||
modelURL: modelURL,
|
modelURL: modelURL,
|
||||||
name: "Light Switch Garage",
|
name: "Garage",
|
||||||
script: scriptURL,
|
script: scriptURL,
|
||||||
position: {
|
position: {
|
||||||
x: 545.62,
|
x: 545.62,
|
||||||
y: 495.68,
|
y: 495.68,
|
||||||
z: 500.21
|
z: 500.21
|
||||||
},
|
},
|
||||||
rotation: {
|
rotation: rotation,
|
||||||
w: 0.20082402229309082,
|
|
||||||
x: 0.20082402229309082,
|
|
||||||
y: -0.67800414562225342,
|
|
||||||
z: 0.67797362804412842
|
|
||||||
},
|
|
||||||
dimensions: {
|
dimensions: {
|
||||||
x: 0.10546875,
|
x: 0.10546875,
|
||||||
y: 0.032372996211051941,
|
y: 0.032372996211051941,
|
||||||
|
@ -215,7 +234,9 @@ function createLights() {
|
||||||
});
|
});
|
||||||
|
|
||||||
setEntityCustomData(resetKey, lightSwitchGarage, {
|
setEntityCustomData(resetKey, lightSwitchGarage, {
|
||||||
resetMe: true
|
resetMe: true,
|
||||||
|
on: true,
|
||||||
|
type: "Garage Light"
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
@ -245,8 +266,7 @@ function createLights() {
|
||||||
|
|
||||||
setEntityCustomData(resetKey, sconceLight3, {
|
setEntityCustomData(resetKey, sconceLight3, {
|
||||||
resetMe: true,
|
resetMe: true,
|
||||||
lightType: "Sconce Light",
|
type: "Garage Light",
|
||||||
on: true
|
|
||||||
});
|
});
|
||||||
|
|
||||||
var sconceLight4 = Entities.addEntity({
|
var sconceLight4 = Entities.addEntity({
|
||||||
|
@ -272,8 +292,7 @@ function createLights() {
|
||||||
|
|
||||||
setEntityCustomData(resetKey, sconceLight4, {
|
setEntityCustomData(resetKey, sconceLight4, {
|
||||||
resetMe: true,
|
resetMe: true,
|
||||||
lightType: "Sconce Light",
|
type: "Garage Light",
|
||||||
on: true
|
|
||||||
});
|
});
|
||||||
|
|
||||||
var sconceLight5 = Entities.addEntity({
|
var sconceLight5 = Entities.addEntity({
|
||||||
|
@ -299,8 +318,7 @@ function createLights() {
|
||||||
|
|
||||||
setEntityCustomData(resetKey, sconceLight5, {
|
setEntityCustomData(resetKey, sconceLight5, {
|
||||||
resetMe: true,
|
resetMe: true,
|
||||||
lightType: "Sconce Light",
|
type: "Garage Light",
|
||||||
on: true
|
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue