junk and shelf stuff

This commit is contained in:
James B. Pollack 2016-04-01 11:49:30 -07:00
parent 1302ea80d4
commit 619a724eb8
4 changed files with 227 additions and 7 deletions

View file

@ -32,7 +32,7 @@
},
"shapeType": "compound",
"type": "Model",
"userData": "{\"hifiHomeKey\":{\"reset\":true}}",
"userData": "{\"hifiHomeKey\":{\"reset\":true}}"
}
],
"Version": 57

View file

@ -0,0 +1,186 @@
{
"Entities": [{
"collisionsWillMove": 1,
"created": "2016-04-01T18:13:50Z",
"dimensions": {
"x": 0.31800505518913269,
"y": 0.31800499558448792,
"z": 0.0033226886298507452
},
"dynamic": 1,
"gravity": {
"x": 0,
"y": -10,
"z": 0
},
"userData": "{\"hifiHomeKey\":{\"reset\":true}}",
"id": "{e9edc4d0-ecef-42de-88de-a652087f8a18}",
"modelURL": "atp:/tutorialContent/Junk-Album-3.fbx",
"name": "Junk-Album-3.fbx",
"queryAACube": {
"scale": 0.44973927736282349,
"x": -0.22486963868141174,
"y": -0.22486963868141174,
"z": -0.22486963868141174
},
"restitution": 0.10000000149011612,
"rotation": {
"w": 0.66469824314117432,
"x": -0.66491186618804932,
"y": 0.24086368083953857,
"z": 0.24098575115203857
},
"shapeType": "box",
"type": "Model"
}, {
"collisionsWillMove": 1,
"created": "2016-04-01T18:13:50Z",
"dimensions": {
"x": 0.2365347146987915,
"y": 0.32964301109313965,
"z": 0.34057953953742981
},
"dynamic": 1,
"gravity": {
"x": 0,
"y": -10,
"z": 0
},
"userData": "{\"hifiHomeKey\":{\"reset\":true}}",
"id": "{cc75df45-0caf-41ff-8c05-29c771cc63d9}",
"modelURL": "atp:/tutorialContent/Hideous-Knick-Knack1.fbx",
"name": "Junk-Doll",
"position": {
"x": 0.3363037109375,
"y": 0.1844482421875,
"z": 0.3884124755859375
},
"queryAACube": {
"scale": 0.52972406148910522,
"x": 0.071441680192947388,
"y": -0.080413788557052612,
"z": 0.12355044484138489
},
"rotation": {
"w": 0.24678421020507812,
"x": -7.62939453125e-05,
"y": 0.9690546989440918,
"z": -7.62939453125e-05
},
"shapeType": "box",
"type": "Model"
}, {
"collisionsWillMove": 1,
"created": "2016-04-01T18:11:39Z",
"dimensions": {
"x": 0.31800505518913269,
"y": 0.31800499558448792,
"z": 0.0033226886298507452
},
"dynamic": 1,
"friction": 0.75,
"gravity": {
"x": 0,
"y": -10,
"z": 0
},
"userData": "{\"hifiHomeKey\":{\"reset\":true}}",
"id": "{903543d7-4531-4532-997a-8176be9fc660}",
"modelURL": "atp:/tutorialContent/Junk-Album-1.fbx",
"name": "Junk-Album-1.fbx",
"position": {
"x": 0.10009765625,
"y": 0.087310791015625,
"z": 0.27129364013671875
},
"queryAACube": {
"scale": 0.44973927736282349,
"x": -0.12477198243141174,
"y": -0.13755884766578674,
"z": 0.046424001455307007
},
"rotation": {
"w": 0.31657898426055908,
"x": -0.024460196495056152,
"y": 0.63219654560089111,
"z": 0.70672154426574707
},
"shapeType": "box",
"type": "Model"
}, {
"collisionsWillMove": 1,
"created": "2016-04-01T18:13:50Z",
"dimensions": {
"x": 0.29665771126747131,
"y": 0.50835514068603516,
"z": 0.26848328113555908
},
"dynamic": 1,
"gravity": {
"x": 0,
"y": -10,
"z": 0
},
"userData": "{\"hifiHomeKey\":{\"reset\":true}}",
"id": "{d99aeed0-9d38-4b82-8ae0-630cdfcd32cb}",
"marketplaceID": "268b7d13-d3f6-4e03-a252-3e5bde1d145e",
"modelURL": "https://s3.amazonaws.com/hifi-public/marketplace/hificontent/ozan/Lamp.fbx",
"name": "Junk - lamp",
"position": {
"x": 0.61279296875,
"y": 0.2528076171875,
"z": 0.91259002685546875
},
"queryAACube": {
"scale": 0.64692658185958862,
"x": 0.28932967782020569,
"y": -0.070655673742294312,
"z": 0.58912670612335205
},
"rotation": {
"w": 0.999969482421875,
"x": -7.62939453125e-05,
"y": -0.0066376924514770508,
"z": 4.57763671875e-05
},
"shapeType": "box",
"type": "Model"
}, {
"compoundShapeURL": "atp:/static_objects/Junk-Crate.obj",
"created": "2016-04-01T18:13:50Z",
"dimensions": {
"x": 0.39995807409286499,
"y": 0.11108967661857605,
"z": 0.71549224853515625
},
"gravity": {
"x": 0,
"y": -10,
"z": 0
},
"userData": "{\"hifiHomeKey\":{\"reset\":true}}",
"id": "{51a01cc1-15cf-4265-9d33-261c96e0e1ed}",
"modelURL": "atp:/models/Junk-Crate.fbx",
"name": "home_model_junk_holder",
"position": {
"x": 0.369384765625,
"y": 0.0540771484375,
"z": 0.39377593994140625
},
"queryAACube": {
"scale": 0.82718592882156372,
"x": -0.04420819878578186,
"y": -0.35951581597328186,
"z": -0.01981702446937561
},
"rotation": {
"w": 0.85989165306091309,
"x": -0.0001373291015625,
"y": 0.5104600191116333,
"z": 4.57763671875e-05
},
"shapeType": "compound",
"type": "Model"
}],
"Version": 57
}

View file

@ -14,7 +14,8 @@ var TRASHCAN_URL = "atp:/kineticObjects/trashcan.json"
var BLOCKS_URL = "atp:/kineticObjects/blocks.json";
var PLAYA_POSTER_URL = "atp:/kineticObjects/postersPlaya.json"
var CELL_POSTER_URL = "atp:/kineticObjects/postersCell.json"
var STUFF_ON_SHELVES_URL ="atp:/kineticObjects/stuff_on_shelves.json"
var STUFF_ON_SHELVES_URL = "atp:/kineticObjects/stuff_on_shelves.json"
var JUNK_URL = "atp:/kineticObjects/junk.json"
FruitBowl = function(spawnLocation, spawnRotation) {
print('CREATE FRUIT BOWL')
@ -139,6 +140,7 @@ BlueChair = function(spawnLocation, spawnRotation) {
function create() {
var success = Clipboard.importEntities(BLUE_CHAIR_URL);
if (success === true) {
created = Clipboard.pasteEntities(spawnLocation)
print('created ' + created);
@ -293,5 +295,28 @@ StuffOnShelves = function(spawnLocation, spawnRotation) {
create();
this.cleanup = cleanup;
}
HomeJunk = function(spawnLocation, spawnRotation) {
print('HOME CREATE JUNK')
var created = [];
function create() {
var success = Clipboard.importEntities(JUNK_URL);
if (success === true) {
created = Clipboard.pasteEntities(spawnLocation)
print('created ' + created);
}
};
function cleanup() {
created.forEach(function(obj) {
Entities.deleteEntity(obj);
})
};
create();
this.cleanup = cleanup;
}

View file

@ -241,15 +241,24 @@
z: -79.8097
});
print('HOME CREATE BLUE CHAIR')
var blueChair = new BlueChair({
var blueChair = new BlueChair({
x: 1100.4821,
y: 459.8161,
z:-75.9071
z: -75.9071
});
// var stuffOnShelf = new stuffOnShelf({});
var stuffOnShelves = new StuffOnShelves({
x: 1105.9432,
y: 461.1020,
z: -80.7894
});
var junk = new HomeJunk({
x: 1102.8754,
y: 460.2932,
z: -69.0222
});
var trashcan = new Trashcan({
x: 1103.9034,