mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 04:53:25 +02:00
Merge branch 'homereset' of github.com:imgntn/hifi into homereset
This commit is contained in:
commit
cb8adf6c2f
8 changed files with 59 additions and 88 deletions
|
@ -21,7 +21,7 @@
|
||||||
},
|
},
|
||||||
"id": "{5371218c-e05b-49da-ac70-81f1f76c55ea}",
|
"id": "{5371218c-e05b-49da-ac70-81f1f76c55ea}",
|
||||||
"modelURL": "atp:/kineticObjects/blocks/planky_natural.fbx",
|
"modelURL": "atp:/kineticObjects/blocks/planky_natural.fbx",
|
||||||
"name": "hifi-home-model-block",
|
"name": "home_model_block",
|
||||||
"position": {
|
"position": {
|
||||||
"x": 0.69732666015625,
|
"x": 0.69732666015625,
|
||||||
"y": 0.1600341796875,
|
"y": 0.1600341796875,
|
||||||
|
@ -64,7 +64,7 @@
|
||||||
},
|
},
|
||||||
"id": "{ccc1198a-a501-48b8-959a-68297258aea7}",
|
"id": "{ccc1198a-a501-48b8-959a-68297258aea7}",
|
||||||
"modelURL": "atp:/kineticObjects/blocks/planky_natural.fbx",
|
"modelURL": "atp:/kineticObjects/blocks/planky_natural.fbx",
|
||||||
"name": "hifi-home-model-block",
|
"name": "home_model_block",
|
||||||
"position": {
|
"position": {
|
||||||
"x": 0.47344970703125,
|
"x": 0.47344970703125,
|
||||||
"y": 0.06005859375,
|
"y": 0.06005859375,
|
||||||
|
@ -107,7 +107,7 @@
|
||||||
},
|
},
|
||||||
"id": "{3aaf5dd5-16d8-4852-880d-8256de68de19}",
|
"id": "{3aaf5dd5-16d8-4852-880d-8256de68de19}",
|
||||||
"modelURL": "atp:/kineticObjects/blocks/planky_red.fbx",
|
"modelURL": "atp:/kineticObjects/blocks/planky_red.fbx",
|
||||||
"name": "hifi-home-model-block",
|
"name": "home_model_block",
|
||||||
"position": {
|
"position": {
|
||||||
"x": 0.2613525390625,
|
"x": 0.2613525390625,
|
||||||
"y": 0.01007080078125,
|
"y": 0.01007080078125,
|
||||||
|
@ -150,7 +150,7 @@
|
||||||
},
|
},
|
||||||
"id": "{0474a29f-c45b-4d42-ae95-0c0bd1e6c501}",
|
"id": "{0474a29f-c45b-4d42-ae95-0c0bd1e6c501}",
|
||||||
"modelURL": "atp:/kineticObjects/blocks/planky_yellow.fbx",
|
"modelURL": "atp:/kineticObjects/blocks/planky_yellow.fbx",
|
||||||
"name": "hifi-home-model-block",
|
"name": "home_model_block",
|
||||||
"position": {
|
"position": {
|
||||||
"x": 0.30487060546875,
|
"x": 0.30487060546875,
|
||||||
"y": 0.01007080078125,
|
"y": 0.01007080078125,
|
||||||
|
@ -193,7 +193,7 @@
|
||||||
},
|
},
|
||||||
"id": "{53e06851-8346-45ac-bdb5-0a74c99b5bd5}",
|
"id": "{53e06851-8346-45ac-bdb5-0a74c99b5bd5}",
|
||||||
"modelURL": "atp:/kineticObjects/blocks/planky_green.fbx",
|
"modelURL": "atp:/kineticObjects/blocks/planky_green.fbx",
|
||||||
"name": "hifi-home-model-block",
|
"name": "home_model_block",
|
||||||
"position": {
|
"position": {
|
||||||
"x": 0.40277099609375,
|
"x": 0.40277099609375,
|
||||||
"y": 0.035064697265625,
|
"y": 0.035064697265625,
|
||||||
|
@ -236,7 +236,7 @@
|
||||||
},
|
},
|
||||||
"id": "{38bcb70d-e384-4b60-878a-e34d4830f045}",
|
"id": "{38bcb70d-e384-4b60-878a-e34d4830f045}",
|
||||||
"modelURL": "atp:/kineticObjects/blocks/planky_yellow.fbx",
|
"modelURL": "atp:/kineticObjects/blocks/planky_yellow.fbx",
|
||||||
"name": "hifi-home-model-block",
|
"name": "home_model_block",
|
||||||
"position": {
|
"position": {
|
||||||
"x": 0.54962158203125,
|
"x": 0.54962158203125,
|
||||||
"y": 0.010040283203125,
|
"y": 0.010040283203125,
|
||||||
|
@ -279,7 +279,7 @@
|
||||||
},
|
},
|
||||||
"id": "{fa8f8bbc-5bd0-4121-985d-75ce2f68eba1}",
|
"id": "{fa8f8bbc-5bd0-4121-985d-75ce2f68eba1}",
|
||||||
"modelURL": "atp:/kineticObjects/blocks/planky_red.fbx",
|
"modelURL": "atp:/kineticObjects/blocks/planky_red.fbx",
|
||||||
"name": "hifi-home-model-block",
|
"name": "home_model_block",
|
||||||
"position": {
|
"position": {
|
||||||
"x": 0.52001953125,
|
"x": 0.52001953125,
|
||||||
"y": 0.01007080078125,
|
"y": 0.01007080078125,
|
||||||
|
@ -322,7 +322,7 @@
|
||||||
},
|
},
|
||||||
"id": "{d4b8582b-b707-453c-89c6-65e358da5cd7}",
|
"id": "{d4b8582b-b707-453c-89c6-65e358da5cd7}",
|
||||||
"modelURL": "atp:/kineticObjects/blocks/planky_yellow.fbx",
|
"modelURL": "atp:/kineticObjects/blocks/planky_yellow.fbx",
|
||||||
"name": "hifi-home-model-block",
|
"name": "home_model_block",
|
||||||
"position": {
|
"position": {
|
||||||
"x": 0.66876220703125,
|
"x": 0.66876220703125,
|
||||||
"y": 0,
|
"y": 0,
|
||||||
|
@ -365,7 +365,7 @@
|
||||||
},
|
},
|
||||||
"id": "{3b5b53fb-7ee5-44eb-9b81-8de8a525c433}",
|
"id": "{3b5b53fb-7ee5-44eb-9b81-8de8a525c433}",
|
||||||
"modelURL": "atp:/kineticObjects/blocks/planky_red.fbx",
|
"modelURL": "atp:/kineticObjects/blocks/planky_red.fbx",
|
||||||
"name": "hifi-home-model-block",
|
"name": "home_model_block",
|
||||||
"position": {
|
"position": {
|
||||||
"x": 0.83819580078125,
|
"x": 0.83819580078125,
|
||||||
"y": 0.135040283203125,
|
"y": 0.135040283203125,
|
||||||
|
@ -408,7 +408,7 @@
|
||||||
},
|
},
|
||||||
"id": "{0d1f27e9-7e74-4263-9428-8c8f7aac94a6}",
|
"id": "{0d1f27e9-7e74-4263-9428-8c8f7aac94a6}",
|
||||||
"modelURL": "atp:/kineticObjects/blocks/planky_green.fbx",
|
"modelURL": "atp:/kineticObjects/blocks/planky_green.fbx",
|
||||||
"name": "hifi-home-model-block",
|
"name": "home_model_block",
|
||||||
"position": {
|
"position": {
|
||||||
"x": 0.61773681640625,
|
"x": 0.61773681640625,
|
||||||
"y": 0.0350341796875,
|
"y": 0.0350341796875,
|
||||||
|
@ -451,7 +451,7 @@
|
||||||
},
|
},
|
||||||
"id": "{79ea518f-aac3-45ff-b22d-6d295b3c9e87}",
|
"id": "{79ea518f-aac3-45ff-b22d-6d295b3c9e87}",
|
||||||
"modelURL": "atp:/kineticObjects/blocks/planky_green.fbx",
|
"modelURL": "atp:/kineticObjects/blocks/planky_green.fbx",
|
||||||
"name": "hifi-home-model-block",
|
"name": "home_model_block",
|
||||||
"position": {
|
"position": {
|
||||||
"x": 0.7188720703125,
|
"x": 0.7188720703125,
|
||||||
"y": 0.08502197265625,
|
"y": 0.08502197265625,
|
||||||
|
@ -494,7 +494,7 @@
|
||||||
},
|
},
|
||||||
"id": "{ff470ff9-c889-4893-a25f-80895bff0e9a}",
|
"id": "{ff470ff9-c889-4893-a25f-80895bff0e9a}",
|
||||||
"modelURL": "atp:/kineticObjects/blocks/planky_blue.fbx",
|
"modelURL": "atp:/kineticObjects/blocks/planky_blue.fbx",
|
||||||
"name": "hifi-home-model-block",
|
"name": "home_model_block",
|
||||||
"position": {
|
"position": {
|
||||||
"x": 0.74981689453125,
|
"x": 0.74981689453125,
|
||||||
"y": 0.010040283203125,
|
"y": 0.010040283203125,
|
||||||
|
@ -537,7 +537,7 @@
|
||||||
},
|
},
|
||||||
"id": "{b5319f85-603d-436b-8bbe-fc9f798ca738}",
|
"id": "{b5319f85-603d-436b-8bbe-fc9f798ca738}",
|
||||||
"modelURL": "atp:/kineticObjects/blocks/planky_green.fbx",
|
"modelURL": "atp:/kineticObjects/blocks/planky_green.fbx",
|
||||||
"name": "hifi-home-model-block",
|
"name": "home_model_block",
|
||||||
"position": {
|
"position": {
|
||||||
"x": 0.8824462890625,
|
"x": 0.8824462890625,
|
||||||
"y": 0.0350341796875,
|
"y": 0.0350341796875,
|
||||||
|
@ -580,7 +580,7 @@
|
||||||
},
|
},
|
||||||
"id": "{944a4616-8dac-4d6a-a92b-49fa98514416}",
|
"id": "{944a4616-8dac-4d6a-a92b-49fa98514416}",
|
||||||
"modelURL": "atp:/kineticObjects/blocks/planky_blue.fbx",
|
"modelURL": "atp:/kineticObjects/blocks/planky_blue.fbx",
|
||||||
"name": "hifi-home-model-block",
|
"name": "home_model_block",
|
||||||
"position": {
|
"position": {
|
||||||
"x": 0.963623046875,
|
"x": 0.963623046875,
|
||||||
"y": 0.010009765625,
|
"y": 0.010009765625,
|
||||||
|
@ -623,7 +623,7 @@
|
||||||
},
|
},
|
||||||
"id": "{ea6a1038-7047-4a1e-bdbd-076d6e41508c}",
|
"id": "{ea6a1038-7047-4a1e-bdbd-076d6e41508c}",
|
||||||
"modelURL": "atp:/kineticObjects/blocks/planky_blue.fbx",
|
"modelURL": "atp:/kineticObjects/blocks/planky_blue.fbx",
|
||||||
"name": "hifi-home-model-block",
|
"name": "home_model_block",
|
||||||
"position": {
|
"position": {
|
||||||
"x": 0.49188232421875,
|
"x": 0.49188232421875,
|
||||||
"y": 0.010040283203125,
|
"y": 0.010040283203125,
|
||||||
|
@ -666,7 +666,7 @@
|
||||||
},
|
},
|
||||||
"id": "{ff65f5dd-2d53-4127-86da-05156a42946d}",
|
"id": "{ff65f5dd-2d53-4127-86da-05156a42946d}",
|
||||||
"modelURL": "atp:/kineticObjects/blocks/planky_natural.fbx",
|
"modelURL": "atp:/kineticObjects/blocks/planky_natural.fbx",
|
||||||
"name": "hifi-home-model-block",
|
"name": "home_model_block",
|
||||||
"position": {
|
"position": {
|
||||||
"x": 0,
|
"x": 0,
|
||||||
"y": 0.010101318359375,
|
"y": 0.010101318359375,
|
||||||
|
@ -709,7 +709,7 @@
|
||||||
},
|
},
|
||||||
"id": "{3a9acd14-f754-4c70-b294-9f622c000785}",
|
"id": "{3a9acd14-f754-4c70-b294-9f622c000785}",
|
||||||
"modelURL": "atp:/kineticObjects/blocks/planky_red.fbx",
|
"modelURL": "atp:/kineticObjects/blocks/planky_red.fbx",
|
||||||
"name": "hifi-home-model-block",
|
"name": "home_model_block",
|
||||||
"position": {
|
"position": {
|
||||||
"x": 0.88006591796875,
|
"x": 0.88006591796875,
|
||||||
"y": 0.010040283203125,
|
"y": 0.010040283203125,
|
||||||
|
@ -752,7 +752,7 @@
|
||||||
},
|
},
|
||||||
"id": "{bb014301-247b-44d0-8b09-b830fea4439e}",
|
"id": "{bb014301-247b-44d0-8b09-b830fea4439e}",
|
||||||
"modelURL": "atp:/kineticObjects/blocks/planky_natural.fbx",
|
"modelURL": "atp:/kineticObjects/blocks/planky_natural.fbx",
|
||||||
"name": "hifi-home-model-block",
|
"name": "home_model_block",
|
||||||
"position": {
|
"position": {
|
||||||
"x": 0.80487060546875,
|
"x": 0.80487060546875,
|
||||||
"y": 0.010040283203125,
|
"y": 0.010040283203125,
|
||||||
|
|
|
@ -1,46 +1,5 @@
|
||||||
{
|
{
|
||||||
"Entities": [{
|
"Entities": [{
|
||||||
"collisionless": 1,
|
|
||||||
"color": {
|
|
||||||
"blue": 0,
|
|
||||||
"green": 0,
|
|
||||||
"red": 255
|
|
||||||
},
|
|
||||||
"created": "2016-03-24T22:17:16Z",
|
|
||||||
"dimensions": {
|
|
||||||
"x": 0.2776367485523224,
|
|
||||||
"y": 0.27723021268844604,
|
|
||||||
"z": 0.2535492241382599
|
|
||||||
},
|
|
||||||
"id": "{c7c6108b-4c60-4735-b2bf-5559d7e30e7d}",
|
|
||||||
"collisionless": 1,
|
|
||||||
"dynamic": 1,
|
|
||||||
"shapeType": "box",
|
|
||||||
"name": "home_box_livingRoomDeskLampTrigger",
|
|
||||||
"parentID": "{f59b50d8-13fb-4ceb-b80a-62cd03428a7c}",
|
|
||||||
"position": {
|
|
||||||
"x": 0.0062166899442672729,
|
|
||||||
"y": -0.1577162891626358,
|
|
||||||
"z": -0.0018789069727063179
|
|
||||||
},
|
|
||||||
"queryAACube": {
|
|
||||||
"scale": 6.92822265625,
|
|
||||||
"x": 1101.2117919921875,
|
|
||||||
"y": 456.86856079101562,
|
|
||||||
"z": -84.708488464355469
|
|
||||||
},
|
|
||||||
"rotation": {
|
|
||||||
"w": 0.84585332870483398,
|
|
||||||
"x": 1.52587890625e-05,
|
|
||||||
"y": 0.53337907791137695,
|
|
||||||
"z": -0.0001373291015625
|
|
||||||
},
|
|
||||||
"script": "atp:/switches/livingRoomDeskLamp.js",
|
|
||||||
"scriptTimestamp": 1458860464095,
|
|
||||||
"type": "Box",
|
|
||||||
"userData": "{\"hifiHomeKey\":{\"reset\":true},\"home-switch\":{\"state\":\"off\"}}",
|
|
||||||
"visible": 0
|
|
||||||
}, {
|
|
||||||
"color": {
|
"color": {
|
||||||
"blue": 68,
|
"blue": 68,
|
||||||
"green": 252,
|
"green": 252,
|
||||||
|
@ -56,9 +15,9 @@
|
||||||
"falloffRadius": 0.30000001192092896,
|
"falloffRadius": 0.30000001192092896,
|
||||||
"id": "{47e2c415-854c-4b6a-b71e-06c760675afd}",
|
"id": "{47e2c415-854c-4b6a-b71e-06c760675afd}",
|
||||||
"intensity": 20,
|
"intensity": 20,
|
||||||
"isSpotlight": 1,
|
"isSpotlight": 0,
|
||||||
"name": "home_light_livingRoomLight",
|
"name": "home_light_livingRoomLight",
|
||||||
"parentID": "{c7c6108b-4c60-4735-b2bf-5559d7e30e7d}",
|
"parentID": "{f59b50d8-13fb-4ceb-b80a-62cd03428a7c}",
|
||||||
"position": {
|
"position": {
|
||||||
"x": 0,
|
"x": 0,
|
||||||
"y": -0.14917388558387756,
|
"y": -0.14917388558387756,
|
||||||
|
@ -133,6 +92,7 @@
|
||||||
"z": 0.26436954736709595
|
"z": 0.26436954736709595
|
||||||
},
|
},
|
||||||
"dynamic": 1,
|
"dynamic": 1,
|
||||||
|
"script": "atp:/switches/livingRoomDeskLamp.js",
|
||||||
"gravity": {
|
"gravity": {
|
||||||
"x": 0,
|
"x": 0,
|
||||||
"y": -10,
|
"y": -10,
|
||||||
|
@ -160,7 +120,7 @@
|
||||||
},
|
},
|
||||||
"shapeType": "compound",
|
"shapeType": "compound",
|
||||||
"type": "Model",
|
"type": "Model",
|
||||||
"userData": "{\"hifiHomeKey\":{\"reset\":true}}",
|
"userData": "{\"hifiHomeKey\":{\"reset\":true},\"home-switch\":{\"state\":\"off\"}}",
|
||||||
"velocity": {
|
"velocity": {
|
||||||
"x": -0.0026286719366908073,
|
"x": -0.0026286719366908073,
|
||||||
"y": 0.0016162246465682983,
|
"y": 0.0016162246465682983,
|
||||||
|
|
|
@ -17,6 +17,7 @@ var COLLISION_HULL_URL = 'atp:/pingPongGun/Pingpong-Gun-New.obj';
|
||||||
HomePingPongGun = function(spawnPosition, spawnRotation) {
|
HomePingPongGun = function(spawnPosition, spawnRotation) {
|
||||||
var pingPongGun = Entities.addEntity({
|
var pingPongGun = Entities.addEntity({
|
||||||
type: "Model",
|
type: "Model",
|
||||||
|
name: "home_model_pingPongGun"
|
||||||
modelURL: MODEL_URL,
|
modelURL: MODEL_URL,
|
||||||
shapeType: 'compound',
|
shapeType: 'compound',
|
||||||
compoundShapeURL: COLLISION_HULL_URL,
|
compoundShapeURL: COLLISION_HULL_URL,
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
this.toggleLights();
|
this.toggleLights();
|
||||||
},
|
},
|
||||||
|
|
||||||
startNearTrigger: function() {
|
startNearGrab: function() {
|
||||||
this.toggleLights();
|
this.toggleLights();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -67,8 +67,6 @@
|
||||||
if (properties.name === _this.lightName) {
|
if (properties.name === _this.lightName) {
|
||||||
print("EBL FOUND THE LIGHT!");
|
print("EBL FOUND THE LIGHT!");
|
||||||
found.push(result);
|
found.push(result);
|
||||||
} else {
|
|
||||||
print("EBL DID NOT FIND THE LIGHT!");
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return found;
|
return found;
|
||||||
|
@ -132,10 +130,6 @@
|
||||||
preload: function(entityID) {
|
preload: function(entityID) {
|
||||||
print("EBL PRELOAD LIGHT SWITCH SCRIPT");
|
print("EBL PRELOAD LIGHT SWITCH SCRIPT");
|
||||||
this.entityID = entityID;
|
this.entityID = entityID;
|
||||||
setEntityCustomData('grabbableKey', this.entityID, {
|
|
||||||
wantsTrigger: true
|
|
||||||
});
|
|
||||||
|
|
||||||
var properties = Entities.getEntityProperties(this.entityID);
|
var properties = Entities.getEntityProperties(this.entityID);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -84,15 +84,20 @@
|
||||||
var otherProps = Entities.getEntityProperties(otherID);
|
var otherProps = Entities.getEntityProperties(otherID);
|
||||||
if (otherProps.name === 'home_model_homeset') {
|
if (otherProps.name === 'home_model_homeset') {
|
||||||
var userData = getEntityUserData(_this.entityID);
|
var userData = getEntityUserData(_this.entityID);
|
||||||
Entities.editEntity(_this.entityID) {
|
Entities.editEntity(_this.entityID, {
|
||||||
position: userData.originalPosition,
|
position: userData.originalPosition,
|
||||||
rotation: userData.originalRotation,
|
rotation: userData.originalRotation,
|
||||||
velocity: {
|
velocity: {
|
||||||
x: 0,
|
x: 0,
|
||||||
y: -0.01,
|
y: -0.01,
|
||||||
z: 0
|
z: 0
|
||||||
|
},
|
||||||
|
angularVelocity: {
|
||||||
|
x: 0,
|
||||||
|
y: 0,
|
||||||
|
z: 0
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -67,34 +67,22 @@
|
||||||
visible: false
|
visible: false
|
||||||
});
|
});
|
||||||
|
|
||||||
// Once user releases marker, wait a bit then put marker back to its original position and rotation
|
|
||||||
// Script.setTimeout(function() {
|
|
||||||
// var userData = getEntityUserData(_this.entityID);
|
|
||||||
// Entities.editEntity(_this.entityID, {
|
|
||||||
// position: userData.originalPosition,
|
|
||||||
// rotation: userData.originalRotation,
|
|
||||||
// velocity: {
|
|
||||||
// x: 0,
|
|
||||||
// y: -0.01,
|
|
||||||
// z: 0
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
// }, _this.MARKER_RESET_WAIT_TIME);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
collisionWithEntity: function(myID, otherID, collision) {
|
collisionWithEntity: function(myID, otherID, collision) {
|
||||||
var otherProps = Entities.getEntityProperties(otherID);
|
var otherProps = Entities.getEntityProperties(otherID);
|
||||||
if (otherProps.name === 'home_model_homeset') {
|
if (otherProps.name === 'home_model_homeset') {
|
||||||
var userData = getEntityUserData(_this.entityID);
|
var userData = getEntityUserData(_this.entityID);
|
||||||
Entities.editEntity(_this.entityID) {
|
Entities.editEntity(_this.entityID, {
|
||||||
position: userData.originalPosition,
|
position: userData.originalPosition,
|
||||||
rotation: userData.originalRotation,
|
rotation: userData.originalRotation,
|
||||||
velocity: {
|
velocity: {
|
||||||
x: 0,
|
x: 0,
|
||||||
y: -0.01,
|
y: -0.01,
|
||||||
z: 0
|
z: 0
|
||||||
}
|
},
|
||||||
}
|
angularVelocity: {x: 0, y: 0, z: 0}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
continueEquip: function() {
|
continueEquip: function() {
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
var whiteboardPath = Script.resolvePath('wrapper.js');
|
||||||
|
Script.include(whiteboardPath);
|
||||||
|
|
||||||
|
var whiteboard = new Whiteboard({
|
||||||
|
x: 1104,
|
||||||
|
y: 460.5,
|
||||||
|
z: -77
|
||||||
|
}, {
|
||||||
|
x: 0,
|
||||||
|
y: -133,
|
||||||
|
z: 0
|
||||||
|
});
|
|
@ -25,8 +25,10 @@ Whiteboard = function(spawnPosition, spawnRotation) {
|
||||||
});
|
});
|
||||||
var whiteboardPosition = spawnPosition;
|
var whiteboardPosition = spawnPosition;
|
||||||
var whiteboardRotation = orientation;
|
var whiteboardRotation = orientation;
|
||||||
|
|
||||||
var WHITEBOARD_MODEL_URL = "atp:/whiteboard/Whiteboard-4.fbx";
|
var WHITEBOARD_MODEL_URL = "atp:/whiteboard/Whiteboard-4.fbx";
|
||||||
var WHITEBOARD_COLLISION_HULL_URL = "atp:/whiteboard/whiteboardCollisionHull.obj";
|
var WHITEBOARD_COLLISION_HULL_URL = "atp:/whiteboard/whiteboardCollisionHull.obj";
|
||||||
|
|
||||||
var whiteboard = Entities.addEntity({
|
var whiteboard = Entities.addEntity({
|
||||||
type: "Model",
|
type: "Model",
|
||||||
name: "home_model_whiteboard",
|
name: "home_model_whiteboard",
|
||||||
|
@ -92,8 +94,13 @@ Whiteboard = function(spawnPosition, spawnRotation) {
|
||||||
|
|
||||||
var WHITEBOARD_RACK_DEPTH = 1.9;
|
var WHITEBOARD_RACK_DEPTH = 1.9;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// ************ ERASER ************************************************
|
||||||
var ERASER_MODEL_URL = "atp:/whiteboard/eraser-2.fbx";
|
var ERASER_MODEL_URL = "atp:/whiteboard/eraser-2.fbx";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var eraserPosition = Vec3.sum(spawnPosition, Vec3.multiply(Quat.getFront(whiteboardRotation), -0.1));
|
var eraserPosition = Vec3.sum(spawnPosition, Vec3.multiply(Quat.getFront(whiteboardRotation), -0.1));
|
||||||
eraserPosition = Vec3.sum(eraserPosition, Vec3.multiply(-0.5, Quat.getRight(whiteboardRotation)));
|
eraserPosition = Vec3.sum(eraserPosition, Vec3.multiply(-0.5, Quat.getRight(whiteboardRotation)));
|
||||||
var eraserRotation = markerRotation;
|
var eraserRotation = markerRotation;
|
||||||
|
@ -156,12 +163,16 @@ Whiteboard = function(spawnPosition, spawnRotation) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// *************************************************************************************************
|
||||||
|
|
||||||
function createMarkers() {
|
function createMarkers() {
|
||||||
var modelURLS = [
|
var modelURLS = [
|
||||||
"atp:/whiteboard/marker-blue.fbx",
|
"atp:/whiteboard/marker-blue.fbx",
|
||||||
"atp:/whiteboard/marker-red.fbx",
|
"atp:/whiteboard/marker-red.fbx",
|
||||||
"atp:/whiteboard/marker-black.fbx",
|
"atp:/whiteboard/marker-black.fbx",
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
var markerPosition = Vec3.sum(spawnPosition, Vec3.multiply(Quat.getFront(whiteboardRotation), -0.1));
|
var markerPosition = Vec3.sum(spawnPosition, Vec3.multiply(Quat.getFront(whiteboardRotation), -0.1));
|
||||||
|
|
||||||
createMarker(modelURLS[0], markerPosition, {
|
createMarker(modelURLS[0], markerPosition, {
|
||||||
|
@ -196,7 +207,7 @@ Whiteboard = function(spawnPosition, spawnRotation) {
|
||||||
dynamic: true,
|
dynamic: true,
|
||||||
gravity: {
|
gravity: {
|
||||||
x: 0,
|
x: 0,
|
||||||
y: -10,
|
y: -5,
|
||||||
z: 0
|
z: 0
|
||||||
},
|
},
|
||||||
velocity: {
|
velocity: {
|
||||||
|
|
Loading…
Reference in a new issue