Merge pull request #17 from ericrius1/atpHomeReset

made plant bowl static and tweaked lamp properties
This commit is contained in:
James B. Pollack 2016-04-01 15:03:11 -07:00
commit 2e7d20cb03
5 changed files with 19 additions and 10 deletions

View file

@ -33,7 +33,6 @@ Plant = function(spawnPosition, spawnRotation) {
type: "Model", type: "Model",
modelURL: BOWL_MODEL_URL, modelURL: BOWL_MODEL_URL,
dimensions: bowlDimensions, dimensions: bowlDimensions,
dynamic: true,
shapeType: 'compound', shapeType: 'compound',
compoundShapeURL: BOWL_COLLISION_HULL_URL, compoundShapeURL: BOWL_COLLISION_HULL_URL,
name: "home_model_plantBowl", name: "home_model_plantBowl",

View file

@ -14,7 +14,7 @@
}, },
"id": "{c7c6108b-4c60-4735-b2bf-5559d7e30e7d}", "id": "{c7c6108b-4c60-4735-b2bf-5559d7e30e7d}",
"ignoreForCollisions": 1, "ignoreForCollisions": 1,
"name": "hifi-home-living-room-desk-lamp-trigger", "name": "home_box_livingRoomDeskLampTrigger",
"parentID": "{f59b50d8-13fb-4ceb-b80a-62cd03428a7c}", "parentID": "{f59b50d8-13fb-4ceb-b80a-62cd03428a7c}",
"position": { "position": {
"x": 0.0062166899442672729, "x": 0.0062166899442672729,
@ -55,12 +55,12 @@
"id": "{47e2c415-854c-4b6a-b71e-06c760675afd}", "id": "{47e2c415-854c-4b6a-b71e-06c760675afd}",
"intensity": 20, "intensity": 20,
"isSpotlight": 1, "isSpotlight": 1,
"name": "hifi-home-living-room-desk-lamp-spotlight", "name": "home_light_livingRoomLight",
"parentID": "{c7c6108b-4c60-4735-b2bf-5559d7e30e7d}", "parentID": "{c7c6108b-4c60-4735-b2bf-5559d7e30e7d}",
"position": { "position": {
"x": -0.10525670647621155, "x": 0,
"y": -0.14917388558387756, "y": -0.14917388558387756,
"z": 0.71759903430938721 "z": 0
}, },
"queryAACube": { "queryAACube": {
"scale": 20.784608840942383, "scale": 20.784608840942383,
@ -94,7 +94,7 @@
}, },
"id": "{6c59ca6f-e3f6-42c1-ae4d-1549b5bdaee1}", "id": "{6c59ca6f-e3f6-42c1-ae4d-1549b5bdaee1}",
"modelURL": "atp:/kineticObjects/lamp/Lamp-Bulldog-Shade.fbx", "modelURL": "atp:/kineticObjects/lamp/Lamp-Bulldog-Shade.fbx",
"name": "hifi-home-model-bulldog-shade", "name": "home_model_bulldogShade",
"position": { "position": {
"x": 0.085205078125, "x": 0.085205078125,
"y": 0.5194091796875, "y": 0.5194091796875,
@ -138,7 +138,7 @@
}, },
"id": "{f59b50d8-13fb-4ceb-b80a-62cd03428a7c}", "id": "{f59b50d8-13fb-4ceb-b80a-62cd03428a7c}",
"modelURL": "atp:/kineticObjects/lamp/Lamp-Bulldog-Base.fbx", "modelURL": "atp:/kineticObjects/lamp/Lamp-Bulldog-Base.fbx",
"name": "hifi-home-model-bulldog-base", "name": "home_model_BulldogBase",
"position": { "position": {
"x": 0.08642578125, "x": 0.08642578125,
"y": 0.306884765625, "y": 0.306884765625,

View file

@ -1,6 +1,7 @@
{ {
"Entities": [{ "Entities": [{
"userData": "{\"hifiHomeKey\":{\"reset\":true}}", "userData": "{\"hifiHomeKey\":{\"reset\":true}}",
"name": "home_model_fruitBowl",
"collisionsWillMove": 1, "collisionsWillMove": 1,
"compoundShapeURL": "atp:/kineticObjects/fruit/Fruit-Bowl.obj", "compoundShapeURL": "atp:/kineticObjects/fruit/Fruit-Bowl.obj",
"created": "2016-03-15T23:11:03Z", "created": "2016-03-15T23:11:03Z",
@ -38,6 +39,7 @@
"type": "Model" "type": "Model"
}, { }, {
"userData": "{\"hifiHomeKey\":{\"reset\":true}}", "userData": "{\"hifiHomeKey\":{\"reset\":true}}",
"name": "home_model_apple",
"collisionsWillMove": 1, "collisionsWillMove": 1,
"created": "2016-03-15T21:26:11Z", "created": "2016-03-15T21:26:11Z",
"dimensions": { "dimensions": {
@ -76,6 +78,7 @@
"type": "Model" "type": "Model"
}, { }, {
"userData": "{\"hifiHomeKey\":{\"reset\":true}}", "userData": "{\"hifiHomeKey\":{\"reset\":true}}",
"name": "home_model_apple",
"collisionsWillMove": 1, "collisionsWillMove": 1,
"created": "2016-03-15T21:26:11Z", "created": "2016-03-15T21:26:11Z",
"dimensions": { "dimensions": {
@ -114,6 +117,7 @@
"type": "Model" "type": "Model"
}, { }, {
"userData": "{\"hifiHomeKey\":{\"reset\":true}}", "userData": "{\"hifiHomeKey\":{\"reset\":true}}",
"name": "home_model_apple",
"collisionsWillMove": 1, "collisionsWillMove": 1,
"created": "2016-03-16T00:27:30Z", "created": "2016-03-16T00:27:30Z",
"dimensions": { "dimensions": {
@ -152,6 +156,7 @@
"type": "Model" "type": "Model"
}, { }, {
"userData": "{\"hifiHomeKey\":{\"reset\":true}}", "userData": "{\"hifiHomeKey\":{\"reset\":true}}",
"name": "home_model_apple",
"collisionsWillMove": 1, "collisionsWillMove": 1,
"created": "2016-03-16T00:27:30Z", "created": "2016-03-16T00:27:30Z",
"dimensions": { "dimensions": {
@ -190,6 +195,7 @@
"type": "Model" "type": "Model"
}, { }, {
"userData": "{\"hifiHomeKey\":{\"reset\":true}}", "userData": "{\"hifiHomeKey\":{\"reset\":true}}",
"name": "home_model_apple",
"collisionsWillMove": 1, "collisionsWillMove": 1,
"created": "2016-03-16T00:27:30Z", "created": "2016-03-16T00:27:30Z",
"dimensions": { "dimensions": {
@ -228,6 +234,7 @@
"type": "Model" "type": "Model"
}, { }, {
"userData": "{\"hifiHomeKey\":{\"reset\":true}}", "userData": "{\"hifiHomeKey\":{\"reset\":true}}",
"name": "home_model_apple",
"collisionsWillMove": 1, "collisionsWillMove": 1,
"created": "2016-03-16T00:27:30Z", "created": "2016-03-16T00:27:30Z",
"dimensions": { "dimensions": {

View file

@ -206,7 +206,7 @@ Books = function(spawnLocation, spawnRotation) {
} }
Blocks = function(spawnLocation, spawnRotation) { Blocks = function(spawnLocation, spawnRotation) {
print('CREATE BLOCKS') print('EBL CREATE BLOCKS')
var created = []; var created = [];
function create() { function create() {

View file

@ -11,6 +11,7 @@
Switch.prototype = { Switch.prototype = {
prefix: 'hifi-home-living-room-desk-lamp-', prefix: 'hifi-home-living-room-desk-lamp-',
lightName: 'home_light_livingRoomLight',
clickReleaseOnEntity: function(entityID, mouseEvent) { clickReleaseOnEntity: function(entityID, mouseEvent) {
if (!mouseEvent.isLeftButton) { if (!mouseEvent.isLeftButton) {
return; return;
@ -63,9 +64,11 @@
var results = Entities.findEntities(_this.position, SEARCH_RADIUS); var results = Entities.findEntities(_this.position, SEARCH_RADIUS);
results.forEach(function(result) { results.forEach(function(result) {
var properties = Entities.getEntityProperties(result); var properties = Entities.getEntityProperties(result);
if (properties.name === _this.prefix + "spotlight") { if (properties.name === _this.lightName) {
print("EBL FOUND THE SPOTLIGHT!"); print("EBL FOUND THE LIGHT!");
found.push(result); found.push(result);
} else {
print("EBL DID NOT FIND THE LIGHT!");
} }
}); });
return found; return found;