mirror of
https://github.com/lubosz/overte.git
synced 2025-04-19 17:03:43 +02:00
reset stuffs
This commit is contained in:
parent
265e1f0643
commit
6f06c0ca7f
5 changed files with 1 additions and 169 deletions
|
@ -1,36 +0,0 @@
|
|||
//v1.0
|
||||
var center = Vec3.sum(Vec3.sum(MyAvatar.position, {
|
||||
x: 0,
|
||||
y: 0.5,
|
||||
z: 0
|
||||
}), Vec3.multiply(2, Quat.getFront(Camera.getOrientation())));
|
||||
|
||||
var SCRIPT_URL = Script.resolvePath('reset.js?' + Math.random());
|
||||
|
||||
function createTidyGuy() {
|
||||
var properties = {
|
||||
type: 'Model',
|
||||
modelURL: 'http://hifi-content.s3.amazonaws.com/DomainContent/Home/tidyGuy/Tidyguy-6.fbx',
|
||||
dimensions: {
|
||||
x: 0.32,
|
||||
y: 0.96,
|
||||
z: 0.6844
|
||||
},
|
||||
position: center,
|
||||
script: SCRIPT_URL,
|
||||
dynamic:false,
|
||||
userData:JSON.stringify({
|
||||
grabbableKey:{
|
||||
wantsTrigger:true
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
return Entities.addEntity(properties);
|
||||
}
|
||||
|
||||
var tidyGuy = createTidyGuy();
|
||||
|
||||
Script.scriptEnding.connect(function() {
|
||||
Entities.deleteEntity(tidyGuy);
|
||||
})
|
|
@ -1,36 +0,0 @@
|
|||
{
|
||||
"Entities": [{
|
||||
"name":"hifi_home_model_desk_drawer_left",
|
||||
"compoundShapeURL": "http://hifi-content.s3.amazonaws.com/alan/dev/desk-drawer-1.obj",
|
||||
"created": "2016-03-15T21:26:11Z",
|
||||
"dimensions": {
|
||||
"x": 0.87835502624511719,
|
||||
"y": 0.32454308867454529,
|
||||
"z": 0.71838575601577759
|
||||
},
|
||||
"gravity": {
|
||||
"x": 0,
|
||||
"y": -1,
|
||||
"z": 0
|
||||
},
|
||||
"dynamic": 1,
|
||||
"id": "{a87cc972-aaf5-48a4-b720-d79ee7bd68d9}",
|
||||
"modelURL": "http://hifi-content.s3.amazonaws.com/alan/dev/desk-drawer-1.fbx",
|
||||
"queryAACube": {
|
||||
"scale": 1.1802177429199219,
|
||||
"x": -0.59010887145996094,
|
||||
"y": -0.59010887145996094,
|
||||
"z": -0.59010887145996094
|
||||
},
|
||||
"rotation": {
|
||||
"w": 0.9542534351348877,
|
||||
"x": -4.57763671875e-05,
|
||||
"y": 0.29893946647644043,
|
||||
"z": -1.52587890625e-05
|
||||
},
|
||||
"shapeType": "compound",
|
||||
"type": "Model",
|
||||
"userData": "{\"hifiHomeKey\":{\"reset\":true}}"
|
||||
}],
|
||||
"Version": 57
|
||||
}
|
|
@ -1,36 +0,0 @@
|
|||
{
|
||||
"Entities": [{
|
||||
"name": "hifi_home_model_desk_drawer_right",
|
||||
"compoundShapeURL": "http://hifi-content.s3.amazonaws.com/alan/dev/desk-drawer-2.obj",
|
||||
"created": "2016-03-15T21:26:11Z",
|
||||
"dimensions": {
|
||||
"x": 0.8697468638420105,
|
||||
"y": 0.31825172901153564,
|
||||
"z": 1.1220188140869141
|
||||
},
|
||||
"gravity": {
|
||||
"x": 0,
|
||||
"y": -1,
|
||||
"z": 0
|
||||
},
|
||||
"dynamic": 1,
|
||||
"id": "{ae1fa8dd-1167-40c1-8fa7-aeb12ee7b12c}",
|
||||
"modelURL": "http://hifi-content.s3.amazonaws.com/alan/dev/desk-drawer-2.fbx",
|
||||
"queryAACube": {
|
||||
"scale": 1.4548780918121338,
|
||||
"x": -0.72743904590606689,
|
||||
"y": -0.72743904590606689,
|
||||
"z": -0.72743904590606689
|
||||
},
|
||||
"rotation": {
|
||||
"w": 0.9539787769317627,
|
||||
"x": -7.62939453125e-05,
|
||||
"y": 0.29982447624206543,
|
||||
"z": -1.52587890625e-05
|
||||
},
|
||||
"shapeType": "compound",
|
||||
"type": "Model",
|
||||
"userData": "{\"hifiHomeKey\":{\"reset\":true}}"
|
||||
}],
|
||||
"Version": 57
|
||||
}
|
|
@ -3,8 +3,7 @@ print('KINETIC INCLUDING WRAPPER')
|
|||
var BOOKS_URL = "atp:/kineticObjects/books.json"
|
||||
var UPPER_BOOKSHELF_URL = "atp:/kineticObjects/upperBookShelf.json"
|
||||
var LOWER_BOOKSHELF_URL = "atp:/kineticObjects/lowerBookShelf.json"
|
||||
var RIGHT_DESK_DRAWER_URL = "atp:/kineticObjects/rightDeskDrawer.json"
|
||||
var LEFT_DESK_DRAWER_URL = "atp:/kineticObjects/leftDeskDrawer.json"
|
||||
|
||||
var CHAIR_URL = 'atp:/JSON/chair.json';
|
||||
|
||||
var FRUIT_BOWL_URL = "atp:/kineticObjects/fruit.json"
|
||||
|
@ -109,53 +108,6 @@ LowerBookShelf = function(spawnLocation, spawnRotation) {
|
|||
this.cleanup = cleanup;
|
||||
}
|
||||
|
||||
RightDeskDrawer = function(spawnLocation, spawnRotation) {
|
||||
print('CREATE RIGHT DRAWER')
|
||||
|
||||
var created = [];
|
||||
|
||||
function create() {
|
||||
var success = Clipboard.importEntities(RIGHT_DESK_DRAWER_URL);
|
||||
if (success === true) {
|
||||
created = Clipboard.pasteEntities(spawnLocation)
|
||||
print('created ' + created);
|
||||
}
|
||||
};
|
||||
|
||||
function cleanup() {
|
||||
created.forEach(function(obj) {
|
||||
Entities.deleteEntity(obj);
|
||||
})
|
||||
};
|
||||
|
||||
create();
|
||||
|
||||
this.cleanup = cleanup;
|
||||
}
|
||||
|
||||
LeftDeskDrawer = function(spawnLocation, spawnRotation) {
|
||||
print('CREATE LEFT DRAWER')
|
||||
var created = [];
|
||||
|
||||
function create() {
|
||||
var success = Clipboard.importEntities(LEFT_DESK_DRAWER_URL);
|
||||
if (success === true) {
|
||||
created = Clipboard.pasteEntities(spawnLocation)
|
||||
print('created ' + created);
|
||||
}
|
||||
};
|
||||
|
||||
function cleanup() {
|
||||
created.forEach(function(obj) {
|
||||
Entities.deleteEntity(obj);
|
||||
})
|
||||
};
|
||||
|
||||
create();
|
||||
|
||||
this.cleanup = cleanup;
|
||||
}
|
||||
|
||||
Chair = function(spawnLocation, spawnRotation) {
|
||||
print('CREATE CHAIR')
|
||||
var created = [];
|
||||
|
|
|
@ -236,18 +236,6 @@
|
|||
z: -80.2837
|
||||
});
|
||||
|
||||
var rightDeskDrawer = new RightDeskDrawer({
|
||||
x: 1105.1735,
|
||||
y: 460.0446,
|
||||
z: -81.3612
|
||||
});
|
||||
|
||||
var leftDeskDrawer = new LeftDeskDrawer({
|
||||
x: 1104.6478,
|
||||
y: 460.0463,
|
||||
z: -82.1095
|
||||
});
|
||||
|
||||
var chair = new Chair({
|
||||
x: 1105.2716,
|
||||
y: 459.7251,
|
||||
|
|
Loading…
Reference in a new issue