Merge remote-tracking branch 'james/homereset' into dressingRoomFix

This commit is contained in:
ericrius1 2016-03-18 11:58:29 -07:00
commit 4eb31c9459
23 changed files with 1405 additions and 967 deletions

View file

@ -12,7 +12,7 @@
//
(function() {
Script.include('../utils.js');
Script.include('../../../../examples/libraries/virtualBaton.js');
//only one person should simulate the tank at a time -- we pass around a virtual baton
@ -32,6 +32,22 @@
blue: 255
}
var TANK_DIMENSIONS = {
x: 0.8212,
y: 0.8116,
z: 2.1404
};
var LOWER_CORNER_VERTICAL_OFFSET = -TANK_DIMENSIONS.y / 2;
var LOWER_CORNER_FORWARD_OFFSET = TANK_DIMENSIONS.x;
var LOWER_CORNER_LATERAL_OFFSET = -TANK_DIMENSIONS.z / 8;
var UPPER_CORNER_VERTICAL_OFFSET = TANK_DIMENSIONS.y / 2;;
var UPPER_CORNER_FORWARD_OFFSET = -TANK_DIMENSIONS.x;
var UPPER_CORNER_LATERAL_OFFSET = TANK_DIMENSIONS.z / 8;
function FishTank() {
_this = this;
}
@ -172,7 +188,12 @@
},
color: INTERSECT_COLOR,
position: position,
collisionless: true
collisionless: true,
userData: JSON.stringify({
'hifiHomeKey': {
'reset': true
}
}),
}
_this.debugSphere = Entities.addEntity(sphereProperties);
},
@ -238,11 +259,10 @@
_this.overlayLineOn(pickRay.origin, Vec3.sum(pickRay.origin, Vec3.multiply(front, _this.overlayLineDistance)), INTERSECT_COLOR);
};
var brn = _this.userData['hifi-home-fishtank']['corners'].brn;
var tfl = _this.userData['hifi-home-fishtank']['corners'].tfl;
var innerContainer = _this.userData['hifi-home-fishtank'].innerContainer;
var intersection = Entities.findRayIntersection(pickRay, true, [innerContainer], [_this.entityID, brn, tfl]);
var intersection = Entities.findRayIntersection(pickRay, true, [innerContainer], [_this.entityID]);
if (intersection.intersects && intersection.entityID === innerContainer) {
//print('intersecting a tank')
@ -306,16 +326,16 @@
};
//
// flockOfFish.js
// examples
//
// Philip Rosedale
// Copyright 2016 High Fidelity, Inc.
// Fish smimming around in a space in front of you
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
// flockOfFish.js
// examples
//
// Philip Rosedale
// Copyright 2016 High Fidelity, Inc.
// Fish smimming around in a space in front of you
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
var FISHTANK_USERDATA_KEY = 'hifi-home-fishtank'
@ -359,6 +379,8 @@
var FISH_MODEL_TWO_URL = "http://hifi-content.s3.amazonaws.com/DomainContent/Home/fishTank/goodfish5.fbx";
var fishLoaded = false;
var lowerCorner, upperCorner;
function randomVector(scale) {
return {
x: Math.random() * scale - scale / 2.0,
@ -377,7 +399,6 @@
return;
}
if (THROTTLE === true) {
sinceLastUpdate = sinceLastUpdate + deltaTime * 100;
if (sinceLastUpdate > THROTTLE_RATE) {
@ -388,7 +409,6 @@
}
// print('has userdata fish??' + _this.userData['hifi-home-fishtank'].fishLoaded)
if (_this.userData['hifi-home-fishtank'].fishLoaded === false) {
//no fish in the user data
@ -399,10 +419,6 @@
fishLoaded: true,
bubbleSystem: _this.userData['hifi-home-fishtank'].bubbleSystem,
bubbleSound: _this.userData['hifi-home-fishtank'].bubbleSound,
corners: {
brn: _this.userData['hifi-home-fishtank'].lowerCorner,
tfl: _this.userData['hifi-home-fishtank'].upperCorner
},
innerContainer: _this.userData['hifi-home-fishtank'].innerContainer,
}
@ -421,7 +437,6 @@
}
var fish = _this.fish;
// print('how many fish do i find?' + fish.length)
@ -442,13 +457,6 @@
z: 0
};
var userData = JSON.parse(_this.currentProperties.userData);
var innerContainer = userData['hifi-home-fishtank']['innerContainer'];
var bounds = Entities.getEntityProperties(innerContainer, "boundingBox").boundingBox;
lowerCorner = bounds.brn;
upperCorner = bounds.tfl;
// First pre-load an array with properties on all the other fish so our per-fish loop
// isn't doing it.
var flockProperties = [];
@ -519,8 +527,6 @@
//attractors
//[position, radius, force]
}
if (_this.hasLookAttractor === true) {
@ -594,20 +600,12 @@
var STARTING_FRACTION = 0.25;
function loadFish(howMany) {
// print('LOADING FISH: ' + howMany)
print('LOADING FISH: ' + howMany)
var center = _this.currentProperties.position;
lowerCorner = {
x: center.x - (_this.currentProperties.dimensions.z / 2),
y: center.y,
z: center.z - (_this.currentProperties.dimensions.z / 2)
};
upperCorner = {
x: center.x + (_this.currentProperties.dimensions.z / 2),
y: center.y + _this.currentProperties.dimensions.y,
z: center.z + (_this.currentProperties.dimensions.z / 2)
};
upperCorner = getOffsetFromTankCenter(LOWER_CORNER_VERTICAL_OFFSET, LOWER_CORNER_FORWARD_OFFSET, LOWER_CORNER_LATERAL_OFFSET);
lowerCorner = getOffsetFromTankCenter(UPPER_CORNER_VERTICAL_OFFSET, UPPER_CORNER_FORWARD_OFFSET, UPPER_CORNER_LATERAL_OFFSET);
var fish = [];
@ -647,7 +645,12 @@
red: 0,
green: 255,
blue: 255
}
},
userData: JSON.stringify({
'hifiHomeKey': {
'reset': true
}
}),
})
);
@ -662,6 +665,24 @@
})
function getOffsetFromTankCenter(VERTICAL_OFFSET, FORWARD_OFFSET, LATERAL_OFFSET) {
var tankProperties = Entities.getEntityProperties(_this.entityID);
var upVector = Quat.getUp(tankProperties.rotation);
var frontVector = Quat.getFront(tankProperties.rotation);
var rightVector = Quat.getRight(tankProperties.rotation);
var upOffset = Vec3.multiply(upVector, VERTICAL_OFFSET);
var frontOffset = Vec3.multiply(frontVector, FORWARD_OFFSET);
var rightOffset = Vec3.multiply(rightVector, LATERAL_OFFSET);
var finalOffset = Vec3.sum(tankProperties.position, upOffset);
finalOffset = Vec3.sum(finalOffset, frontOffset);
finalOffset = Vec3.sum(finalOffset, rightOffset);
return finalOffset
}
function setEntityUserData(id, data) {
var json = JSON.stringify(data)
Entities.editEntity(id, {
@ -706,4 +727,4 @@
}
return new FishTank();
});
});

View file

@ -11,6 +11,8 @@
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
var TANK_SCRIPT = Script.resolvePath('tank.js?' + Math.random());
FishTank = function(spawnPosition, spawnRotation) {
@ -38,8 +40,6 @@ FishTank = function(spawnPosition, spawnRotation) {
var TANK_POSITION = spawnPosition;
var TANK_MODEL_URL = "http://hifi-content.s3.amazonaws.com/DomainContent/Home/fishTank/aquariumTank.fbx";
var TANK_BASE_MODEL_URL = 'http://hifi-content.s3.amazonaws.com/DomainContent/Home/fishTank/aquariumBase.fbx';
@ -105,6 +105,13 @@ FishTank = function(spawnPosition, spawnRotation) {
z: 0.1020
}
var LOWER_CORNER_VERTICAL_OFFSET = -TANK_DIMENSIONS.y / 2;
var LOWER_CORNER_FORWARD_OFFSET = TANK_DIMENSIONS.x;
var LOWER_CORNER_LATERAL_OFFSET = -TANK_DIMENSIONS.z / 8;
var UPPER_CORNER_VERTICAL_OFFSET = TANK_DIMENSIONS.y / 2;;
var UPPER_CORNER_FORWARD_OFFSET = -TANK_DIMENSIONS.x;
var UPPER_CORNER_LATERAL_OFFSET = TANK_DIMENSIONS.z / 8;
function createFishTank() {
var tankProperties = {
@ -113,14 +120,20 @@ FishTank = function(spawnPosition, spawnRotation) {
modelURL: TANK_MODEL_URL,
dimensions: TANK_DIMENSIONS,
position: TANK_POSITION,
rotation: spawnRotation,
color: DEBUG_COLOR,
collisionless: true,
script: TANK_SCRIPT,
visible: true
visible: true,
userData: JSON.stringify({
'hifiHomeKey': {
'reset': true
}
}),
}
if (spawnRotation !== undefined) {
tankProperties.rotation = spawnRotation
tankProperties.rotation = Quat.fromPitchYawRollDegrees(spawnRotation.x, spawnRotation.y, spawnRotation.z)
}
fishTank = Entities.addEntity(tankProperties);
@ -171,13 +184,20 @@ FishTank = function(spawnPosition, spawnRotation) {
"alphaStart": 0.3,
"alphaFinish": 0,
"emitterShouldTrail": 0,
"textures": "http://hifi-content.s3.amazonaws.com/DomainContent/Home/fishTank/bubble-white.png"
"textures": "http://hifi-content.s3.amazonaws.com/DomainContent/Home/fishTank/bubble-white.png",
userData: JSON.stringify({
'hifiHomeKey': {
'reset': true
}
}),
};
bubbleProperties.type = "ParticleEffect";
bubbleProperties.parentID = fishTank;
bubbleProperties.dimensions = BUBBLE_SYSTEM_DIMENSIONS;
var finalOffset = getOffsetFromTankCenter(BUBBLE_SYSTEM_VERTICAL_OFFSET, BUBBLE_SYSTEM_FORWARD_OFFSET, BUBBLE_SYSTEM_LATERAL_OFFSET);
bubbleProperties.position = finalOffset;
@ -238,7 +258,12 @@ FishTank = function(spawnPosition, spawnRotation) {
position: tankProperties.position,
visible: false,
collisionless: true,
dynamic: false
dynamic: false,
userData: JSON.stringify({
'hifiHomeKey': {
'reset': true
}
}),
};
innerContainer = Entities.addEntity(containerProps);
@ -246,7 +271,6 @@ FishTank = function(spawnPosition, spawnRotation) {
function createEntitiesAtCorners() {
var bounds = Entities.getEntityProperties(innerContainer, "boundingBox").boundingBox;
var lowerProps = {
name: 'hifi-home-fishtank-lower-corner',
@ -263,8 +287,13 @@ FishTank = function(spawnPosition, spawnRotation) {
blue: 0
},
collisionless: true,
position: bounds.brn,
visible: false
position: getOffsetFromTankCenter(LOWER_CORNER_VERTICAL_OFFSET, LOWER_CORNER_FORWARD_OFFSET, LOWER_CORNER_LATERAL_OFFSET),
visible: true,
userData: JSON.stringify({
'hifiHomeKey': {
'reset': true
}
}),
}
var upperProps = {
@ -282,8 +311,13 @@ FishTank = function(spawnPosition, spawnRotation) {
blue: 0
},
collisionless: true,
position: bounds.tfl,
visible: false
position: getOffsetFromTankCenter(UPPER_CORNER_VERTICAL_OFFSET, UPPER_CORNER_FORWARD_OFFSET, UPPER_CORNER_LATERAL_OFFSET),
visible: true,
userData: JSON.stringify({
'hifiHomeKey': {
'reset': true
}
}),
}
lowerCorner = Entities.addEntity(lowerProps);
@ -300,7 +334,12 @@ FishTank = function(spawnPosition, spawnRotation) {
parentID: fishTank,
modelURL: ROCK_MODEL_URL,
position: finalPosition,
dimensions: ROCK_DIMENSIONS
dimensions: ROCK_DIMENSIONS,
userData: JSON.stringify({
'hifiHomeKey': {
'reset': true
}
}),
}
rocks = Entities.addEntity(properties);
@ -316,7 +355,12 @@ FishTank = function(spawnPosition, spawnRotation) {
modelURL: URCHIN_MODEL_URL,
position: finalPosition,
shapeType: 'Sphere',
dimensions: URCHIN_DIMENSIONS
dimensions: URCHIN_DIMENSIONS,
userData: JSON.stringify({
'hifiHomeKey': {
'reset': true
}
}),
}
urchin = Entities.addEntity(properties);
@ -333,7 +377,12 @@ FishTank = function(spawnPosition, spawnRotation) {
modelURL: TREASURE_MODEL_URL,
position: finalPosition,
dimensions: TREASURE_DIMENSIONS,
rotation: Quat.fromPitchYawRollDegrees(10, -45, 10)
rotation: Quat.fromPitchYawRollDegrees(10, -45, 10),
userData: JSON.stringify({
'hifiHomeKey': {
'reset': true
}
}),
}
treasure = Entities.addEntity(properties);
@ -352,7 +401,12 @@ FishTank = function(spawnPosition, spawnRotation) {
y: TANK_POSITION.y - BASE_VERTICAL_OFFSET,
z: TANK_POSITION.z
},
dimensions: TANK_BASE_DIMENSIONS
dimensions: TANK_BASE_DIMENSIONS,
userData: JSON.stringify({
'hifiHomeKey': {
'reset': true
}
}),
}
tankBase = Entities.addEntity(properties);
@ -379,13 +433,8 @@ FishTank = function(spawnPosition, spawnRotation) {
var data = {
fishLoaded: false,
bubbleSystem: bubbleSystem,
bubbleSound: bubbleSound,
corners: {
brn: lowerCorner,
tfl: upperCorner
},
// bubbleSound: bubbleSound,
innerContainer: innerContainer,
}
Script.setTimeout(function() {
@ -394,6 +443,7 @@ FishTank = function(spawnPosition, spawnRotation) {
function cleanup() {
print('TANK CLEANUP!')
Entities.deleteEntity(fishTank);
Entities.deleteEntity(tankBase);
Entities.deleteEntity(bubbleSystem);
@ -404,8 +454,8 @@ FishTank = function(spawnPosition, spawnRotation) {
Entities.deleteEntity(upperCorner);
Entities.deleteEntity(urchin);
Entities.deleteEntity(rocks);
bubbleInjector.stop();
bubbleInjector = null;
// bubbleInjector.stop();
// bubbleInjector = null;
}
@ -453,5 +503,5 @@ FishTank = function(spawnPosition, spawnRotation) {
}
this.cleanup = cleanup;
return this;
print('CREATED FISH!');
}

View file

@ -12,7 +12,7 @@
(function() {
Script.include('../../../../libraries/utils.js');
Script.include('../utils.js');
var _this;
@ -105,7 +105,11 @@
hslColor: Math.random() < 0.5 ? _this.flowerHSLColors[0] : _this.flowerHSLColors[1],
growthRate: growthRate
};
flower.userData = {
'hifiHomeKey': {
'reset': true
}
ProceduralEntity: {
shaderUrl: _this.SHADER_URL,
uniforms: {

View file

@ -12,9 +12,10 @@
(function() {
Script.include('../../../../libraries/utils.js');
Script.include('../utils.js');
var _this;
function WaterSpout() {
_this = this;
_this.waterSound = SoundCache.getSound("https://s3-us-west-1.amazonaws.com/hifi-content/eric/Sounds/shower.wav");
@ -58,7 +59,7 @@
_this.waterPouring = false;
//water no longer pouring...
if (_this.waterInjector) {
_this.waterInjector.stop();
_this.waterInjector.stop();
}
Entities.callEntityMethod(_this.mostRecentIntersectedGrowableEntity, 'stopWatering');
},
@ -187,6 +188,11 @@
alphaFinish: 1.0,
emitterShouldTrail: true,
textures: "https://s3-us-west-1.amazonaws.com/hifi-content/eric/images/raindrop.png",
userData: JSON.stringify({
'hifiHomeKey': {
'reset': true
}
}),
});
},

View file

@ -8,6 +8,7 @@
// This entity script handles the logic for growing a plant when it has water poured on it
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
var PLANT_SCRIPT_URL = Script.resolvePath("growingPlantEntityScript.js?v1" + Math.random().toFixed(2));
var WATER_CAN_SCRIPT_URL = Script.resolvePath("waterCanEntityScript.js?v2" + Math.random().toFixed());
Plant = function(spawnPosition, spawnRotation) {
@ -31,7 +32,12 @@ Plant = function(spawnPosition, spawnRotation) {
modelURL: BOWL_MODEL_URL,
dimensions: bowlDimensions,
name: "plant bowl",
position: bowlPosition
position: bowlPosition,
userData: JSON.stringify({
'hifiHomeKey': {
'reset': true
}
}),
});
@ -54,9 +60,15 @@ Plant = function(spawnPosition, spawnRotation) {
dimensions: plantDimensions,
position: plantPosition,
script: PLANT_SCRIPT_URL,
parentID: bowl
parentID: bowl,
userData: JSON.stringify({
'hifiHomeKey': {
'reset': true
}
}),
});
var WATER_CAN_MODEL_URL = "https://s3-us-west-1.amazonaws.com/hifi-content/eric/models/waterCan.fbx?v1" + Math.random();
var waterCanPosition = Vec3.sum(plantPosition, Vec3.multiply(0.6, Quat.getRight(orientation)));
@ -82,6 +94,9 @@ Plant = function(spawnPosition, spawnRotation) {
},
rotation: waterCanRotation,
userData: JSON.stringify({
'hifiHomeKey': {
'reset': true
},
wearable: {
joints: {
RightHand: [{
@ -128,10 +143,16 @@ Plant = function(spawnPosition, spawnRotation) {
position: waterSpoutPosition,
rotation: waterSpoutRotation,
parentID: waterCan,
visible: false
visible: false,
userData: JSON.stringify({
'hifiHomeKey': {
'reset': true
}
}),
});
function cleanup() {
print('PLANT CLEANUP!')
Entities.deleteEntity(plant);
Entities.deleteEntity(bowl);
Entities.deleteEntity(waterCan);
@ -140,4 +161,7 @@ Plant = function(spawnPosition, spawnRotation) {
this.cleanup = cleanup;
print('CREATED PLANT:: ' + plant)
}

View file

@ -1,248 +1,296 @@
{
"Entities": [
{
"collisionSoundURL": "http://hifi-content.s3.amazonaws.com/DomainContent/Home/Sounds/book_fall.L.wav",
"created": "2016-03-15T21:26:11Z",
"dimensions": {
"x": 0.25794500112533569,
"y": 0.3533988893032074,
"z": 0.03479468822479248
},
"id": "{896373aa-9ed0-4be5-865b-a474448ea67b}",
"modelURL": "http://hifi-content.s3.amazonaws.com/alan/dev/Book-SC-NS.fbx",
"name": "home_model_book1",
"position": {
"x": 0,
"y": 0.0357666015625,
"z": 0
},
"queryAACube": {
"scale": 0.43890440464019775,
"x": -0.21945220232009888,
"y": -0.18368560075759888,
"z": -0.21945220232009888
},
"rotation": {
"w": -0.31764703989028931,
"x": -4.57763671875e-05,
"y": 0.94818031787872314,
"z": -1.52587890625e-05
},
"type": "Model"
"Entities": [{
"gravity": {
"x": 0,
"y": -7,
"z": 0
},
{
"collisionSoundURL": "http://hifi-content.s3.amazonaws.com/DomainContent/Home/Sounds/book_fall.L.wav",
"created": "2016-03-07T21:07:29Z",
"dimensions": {
"x": 0.25794500112533569,
"y": 0.36685666441917419,
"z": 0.046798638999462128
},
"id": "{e48fd6a5-ff0f-4ba6-92c7-fd972eba53c6}",
"locked": 1,
"modelURL": "http://hifi-content.s3.amazonaws.com/alan/dev/Book-RPO-EC.fbx",
"name": "home_model_book_readyplayerone",
"position": {
"x": 0.031494140625,
"y": 0.052947998046875,
"z": 0.04192352294921875
},
"queryAACube": {
"scale": 0.45089861750602722,
"x": -0.19395516812801361,
"y": -0.17250131070613861,
"z": -0.18352578580379486
},
"rotation": {
"w": -0.2843213677406311,
"x": -4.57763671875e-05,
"y": 0.95870912075042725,
"z": 1.52587890625e-05
},
"shapeType": "box",
"type": "Model"
"userData": "{\"hifiHomeKey\":{\"reset\":true}}",
"collisionSoundURL": "http://hifi-content.s3.amazonaws.com/DomainContent/Home/Sounds/book_fall.L.wav",
"created": "2016-03-15T21:26:11Z",
"dimensions": {
"x": 0.25794500112533569,
"y": 0.3533988893032074,
"z": 0.03479468822479248
},
{
"created": "2016-03-15T21:26:11Z",
"dimensions": {
"x": 0.23445942997932434,
"y": 0.33540505170822144,
"z": 0.036211937665939331
},
"id": "{e0790afc-6c62-4891-a933-7904b6cbc7cc}",
"modelURL": "http://hifi-content.s3.amazonaws.com/alan/dev/Book-DADOES-PD.fbx",
"name": "home_model_book_DoAndroids",
"position": {
"x": 0.031005859375,
"y": 0.0430908203125,
"z": 0.10480499267578125
},
"queryAACube": {
"scale": 0.41082730889320374,
"x": -0.17440779507160187,
"y": -0.16232283413410187,
"z": -0.10060866177082062
},
"rotation": {
"w": -0.2843824028968811,
"x": -4.57763671875e-05,
"y": 0.95870912075042725,
"z": 1.52587890625e-05
},
"shapeType": "box",
"type": "Model"
"dynamic": 1,
"id": "{896373aa-9ed0-4be5-865b-a474448ea67b}",
"modelURL": "http://hifi-content.s3.amazonaws.com/alan/dev/Book-SC-NS.fbx",
"name": "home_model_book1",
"position": {
"x": 0,
"y": 0.0357666015625,
"z": 0
},
{
"collisionSoundURL": "http://hifi-content.s3.amazonaws.com/DomainContent/Home/Sounds/book_fall.L.wav",
"created": "2016-03-07T21:07:29Z",
"dimensions": {
"x": 0.19239270687103271,
"y": 0.27543020248413086,
"z": 0.042817402631044388
},
"id": "{5120bfbb-66bf-493c-8c1a-ed883f39c054}",
"modelURL": "http://hifi-content.s3.amazonaws.com/alan/dev/Book-F1-IA.fbx",
"name": "home_model_book_Foundation1",
"position": {
"x": 0.04150390625,
"y": 0.005096435546875,
"z": 0.15532684326171875
},
"queryAACube": {
"scale": 0.33868876099586487,
"x": -0.12784047424793243,
"y": -0.16424794495105743,
"z": -0.014017537236213684
},
"rotation": {
"w": -0.2843213677406311,
"x": -4.57763671875e-05,
"y": 0.95870912075042725,
"z": 1.52587890625e-05
},
"shapeType": "box",
"type": "Model"
"queryAACube": {
"scale": 0.43890440464019775,
"x": -0.21945220232009888,
"y": -0.18368560075759888,
"z": -0.21945220232009888
},
{
"collisionSoundURL": "http://hifi-content.s3.amazonaws.com/DomainContent/Home/Sounds/book_fall.L.wav",
"created": "2016-03-07T21:07:29Z",
"dimensions": {
"x": 0.19239270687103271,
"y": 0.27289187908172607,
"z": 0.037494994699954987
},
"id": "{f9af3a1e-dbd5-4fb3-ad38-dc818592e4c6}",
"modelURL": "http://hifi-content.s3.amazonaws.com/alan/dev/Book-F2-IA.fbx",
"position": {
"x": 0.056884765625,
"y": 0.00262451171875,
"z": 0.20074462890625
},
"queryAACube": {
"scale": 0.33599227666854858,
"x": -0.11111137270927429,
"y": -0.16537162661552429,
"z": 0.032748490571975708
},
"rotation": {
"w": -0.2843213677406311,
"x": -4.57763671875e-05,
"y": 0.95870912075042725,
"z": 1.52587890625e-05
},
"shapeType": "box",
"type": "Model"
"rotation": {
"w": -0.31764703989028931,
"x": -4.57763671875e-05,
"y": 0.94818031787872314,
"z": -1.52587890625e-05
},
{
"collisionSoundURL": "http://hifi-content.s3.amazonaws.com/DomainContent/Home/Sounds/book_fall.L.wav",
"created": "2016-03-07T21:07:29Z",
"dimensions": {
"x": 0.19239270687103271,
"y": 0.27362632751464844,
"z": 0.04995863139629364
},
"id": "{6af6bf06-05c9-427c-8ff5-d10072ffc293}",
"locked": 1,
"modelURL": "http://hifi-content.s3.amazonaws.com/alan/dev/Book-F3-IA.fbx",
"name": "home_model_book_Foundation3",
"position": {
"x": 0.0919189453125,
"y": 0,
"z": 0.24033355712890625
},
"queryAACube": {
"scale": 0.33820435404777527,
"x": -0.077183231711387634,
"y": -0.16910217702388763,
"z": 0.071231380105018616
},
"rotation": {
"w": -0.2843213677406311,
"x": -4.57763671875e-05,
"y": 0.95870912075042725,
"z": 1.52587890625e-05
},
"shapeType": "box",
"type": "Model"
"shapeType": "box",
"type": "Model"
}, {
"gravity": {
"x": 0,
"y": -7,
"z": 0
},
{
"collisionSoundURL": "http://hifi-content.s3.amazonaws.com/DomainContent/Home/Sounds/book_fall.L.wav",
"created": "2016-03-15T21:26:11Z",
"dimensions": {
"x": 0.20406116545200348,
"y": 0.29261711239814758,
"z": 0.014823859557509422
},
"id": "{4982da58-d573-4582-b627-f08312cc0d07}",
"modelURL": "http://hifi-content.s3.amazonaws.com/alan/dev/Book-LPP-ASE.fbx",
"position": {
"x": 0.1171875,
"y": 0.01153564453125,
"z": 0.26572418212890625
},
"queryAACube": {
"scale": 0.35705110430717468,
"x": -0.061338052153587341,
"y": -0.16698990762233734,
"z": 0.087198629975318909
},
"rotation": {
"w": -0.27602046728134155,
"x": -4.57763671875e-05,
"y": 0.96115052700042725,
"z": -1.52587890625e-05
},
"type": "Model"
"userData": "{\"hifiHomeKey\":{\"reset\":true}}",
"collisionSoundURL": "http://hifi-content.s3.amazonaws.com/DomainContent/Home/Sounds/book_fall.L.wav",
"created": "2016-03-07T21:07:29Z",
"dimensions": {
"x": 0.25794500112533569,
"y": 0.36685666441917419,
"z": 0.046798638999462128
},
{
"collisionSoundURL": "http://hifi-content.s3.amazonaws.com/DomainContent/Home/Sounds/book_fall.L.wav",
"created": "2016-03-07T21:07:29Z",
"dimensions": {
"x": 0.23497477173805237,
"y": 0.28377044200897217,
"z": 0.033324316143989563
},
"id": "{178b1cef-f76b-4cda-b834-42080208d502}",
"modelURL": "http://hifi-content.s3.amazonaws.com/alan/dev/Book-N-WG.fbx",
"position": {
"x": 0.1429443359375,
"y": 0.00970458984375,
"z": 0.2823486328125
},
"queryAACube": {
"scale": 0.36993148922920227,
"x": -0.042021408677101135,
"y": -0.17526115477085114,
"z": 0.097382888197898865
},
"rotation": {
"w": -0.30934613943099976,
"x": -4.57763671875e-05,
"y": 0.9509575366973877,
"z": -1.52587890625e-05
},
"type": "Model"
}
],
"dynamic": 1,
"id": "{e48fd6a5-ff0f-4ba6-92c7-fd972eba53c6}",
"modelURL": "http://hifi-content.s3.amazonaws.com/alan/dev/Book-RPO-EC.fbx",
"name": "home_model_book_readyplayerone",
"position": {
"x": 0.031494140625,
"y": 0.052947998046875,
"z": 0.04192352294921875
},
"queryAACube": {
"scale": 0.45089861750602722,
"x": -0.19395516812801361,
"y": -0.17250131070613861,
"z": -0.18352578580379486
},
"rotation": {
"w": -0.2843213677406311,
"x": -4.57763671875e-05,
"y": 0.95870912075042725,
"z": 1.52587890625e-05
},
"shapeType": "box",
"type": "Model"
}, {
"gravity": {
"x": 0,
"y": -7,
"z": 0
},
"userData": "{\"hifiHomeKey\":{\"reset\":true}}",
"created": "2016-03-15T21:26:11Z",
"dimensions": {
"x": 0.23445942997932434,
"y": 0.33540505170822144,
"z": 0.036211937665939331
},
"id": "{e0790afc-6c62-4891-a933-7904b6cbc7cc}",
"modelURL": "http://hifi-content.s3.amazonaws.com/alan/dev/Book-DADOES-PD.fbx",
"name": "home_model_book_DoAndroids",
"position": {
"x": 0.031005859375,
"y": 0.0430908203125,
"z": 0.10480499267578125
},
"dynamic": 1,
"queryAACube": {
"scale": 0.41082730889320374,
"x": -0.17440779507160187,
"y": -0.16232283413410187,
"z": -0.10060866177082062
},
"rotation": {
"w": -0.2843824028968811,
"x": -4.57763671875e-05,
"y": 0.95870912075042725,
"z": 1.52587890625e-05
},
"shapeType": "box",
"type": "Model"
}, {
"gravity": {
"x": 0,
"y": -7,
"z": 0
},
"userData": "{\"hifiHomeKey\":{\"reset\":true}}",
"collisionSoundURL": "http://hifi-content.s3.amazonaws.com/DomainContent/Home/Sounds/book_fall.L.wav",
"created": "2016-03-07T21:07:29Z",
"dimensions": {
"x": 0.19239270687103271,
"y": 0.27543020248413086,
"z": 0.042817402631044388
},
"id": "{5120bfbb-66bf-493c-8c1a-ed883f39c054}",
"modelURL": "http://hifi-content.s3.amazonaws.com/alan/dev/Book-F1-IA.fbx",
"name": "home_model_book_Foundation1",
"position": {
"x": 0.04150390625,
"y": 0.005096435546875,
"z": 0.15532684326171875
},
"dynamic": 1,
"queryAACube": {
"scale": 0.33868876099586487,
"x": -0.12784047424793243,
"y": -0.16424794495105743,
"z": -0.014017537236213684
},
"rotation": {
"w": -0.2843213677406311,
"x": -4.57763671875e-05,
"y": 0.95870912075042725,
"z": 1.52587890625e-05
},
"shapeType": "box",
"type": "Model"
}, {
"gravity": {
"x": 0,
"y": -7,
"z": 0
},
"userData": "{\"hifiHomeKey\":{\"reset\":true}}",
"collisionSoundURL": "http://hifi-content.s3.amazonaws.com/DomainContent/Home/Sounds/book_fall.L.wav",
"created": "2016-03-07T21:07:29Z",
"dimensions": {
"x": 0.19239270687103271,
"y": 0.27289187908172607,
"z": 0.037494994699954987
},
"id": "{f9af3a1e-dbd5-4fb3-ad38-dc818592e4c6}",
"modelURL": "http://hifi-content.s3.amazonaws.com/alan/dev/Book-F2-IA.fbx",
"position": {
"x": 0.056884765625,
"y": 0.00262451171875,
"z": 0.20074462890625
},
"dynamic": 1,
"queryAACube": {
"scale": 0.33599227666854858,
"x": -0.11111137270927429,
"y": -0.16537162661552429,
"z": 0.032748490571975708
},
"rotation": {
"w": -0.2843213677406311,
"x": -4.57763671875e-05,
"y": 0.95870912075042725,
"z": 1.52587890625e-05
},
"shapeType": "box",
"type": "Model"
}, {
"gravity": {
"x": 0,
"y": -7,
"z": 0
},
"userData": "{\"hifiHomeKey\":{\"reset\":true}}",
"collisionSoundURL": "http://hifi-content.s3.amazonaws.com/DomainContent/Home/Sounds/book_fall.L.wav",
"created": "2016-03-07T21:07:29Z",
"dimensions": {
"x": 0.19239270687103271,
"y": 0.27362632751464844,
"z": 0.04995863139629364
},
"id": "{6af6bf06-05c9-427c-8ff5-d10072ffc293}",
"modelURL": "http://hifi-content.s3.amazonaws.com/alan/dev/Book-F3-IA.fbx",
"name": "home_model_book_Foundation3",
"position": {
"x": 0.0919189453125,
"y": 0,
"z": 0.24033355712890625
},
"dynamic": 1,
"queryAACube": {
"scale": 0.33820435404777527,
"x": -0.077183231711387634,
"y": -0.16910217702388763,
"z": 0.071231380105018616
},
"rotation": {
"w": -0.2843213677406311,
"x": -4.57763671875e-05,
"y": 0.95870912075042725,
"z": 1.52587890625e-05
},
"shapeType": "box",
"type": "Model"
}, {
"gravity": {
"x": 0,
"y": -7,
"z": 0
},
"userData": "{\"hifiHomeKey\":{\"reset\":true}}",
"collisionSoundURL": "http://hifi-content.s3.amazonaws.com/DomainContent/Home/Sounds/book_fall.L.wav",
"created": "2016-03-15T21:26:11Z",
"dimensions": {
"x": 0.20406116545200348,
"y": 0.29261711239814758,
"z": 0.014823859557509422
},
"id": "{4982da58-d573-4582-b627-f08312cc0d07}",
"modelURL": "http://hifi-content.s3.amazonaws.com/alan/dev/Book-LPP-ASE.fbx",
"position": {
"x": 0.1171875,
"y": 0.01153564453125,
"z": 0.26572418212890625
},
"dynamic": 1,
"queryAACube": {
"scale": 0.35705110430717468,
"x": -0.061338052153587341,
"y": -0.16698990762233734,
"z": 0.087198629975318909
},
"rotation": {
"w": -0.27602046728134155,
"x": -4.57763671875e-05,
"y": 0.96115052700042725,
"z": -1.52587890625e-05
},
"shapeType": "box",
"type": "Model"
}, {
"gravity": {
"x": 0,
"y": -7,
"z": 0
},
"userData": "{\"hifiHomeKey\":{\"reset\":true}}",
"collisionSoundURL": "http://hifi-content.s3.amazonaws.com/DomainContent/Home/Sounds/book_fall.L.wav",
"created": "2016-03-07T21:07:29Z",
"dimensions": {
"x": 0.23497477173805237,
"y": 0.28377044200897217,
"z": 0.033324316143989563
},
"id": "{178b1cef-f76b-4cda-b834-42080208d502}",
"modelURL": "http://hifi-content.s3.amazonaws.com/alan/dev/Book-N-WG.fbx",
"position": {
"x": 0.1429443359375,
"y": 0.00970458984375,
"z": 0.2823486328125
},
"dynamic": 1,
"queryAACube": {
"scale": 0.36993148922920227,
"x": -0.042021408677101135,
"y": -0.17526115477085114,
"z": 0.097382888197898865
},
"rotation": {
"w": -0.30934613943099976,
"x": -4.57763671875e-05,
"y": 0.9509575366973877,
"z": -1.52587890625e-05
},
"shapeType": "box",
"type": "Model"
}],
"Version": 57
}
}

View file

@ -1,36 +1,35 @@
{
"Entities": [
{
"compoundShapeURL": "http://hifi-content.s3.amazonaws.com/alan/dev/simple-chair2.obj",
"created": "2016-03-07T21:07:29Z",
"dimensions": {
"x": 0.66077238321304321,
"y": 1.058124303817749,
"z": 0.7188611626625061
},
"gravity": {
"x": 0,
"y": -6,
"z": 0
},
"id": "{d97c8a4e-9b95-448c-a729-5da9e22b6adc}",
"modelURL": "http://hifi-content.s3.amazonaws.com/alan/dev/simple-chair2.fbx",
"queryAACube": {
"scale": 1.439794659614563,
"x": -0.71989732980728149,
"y": -0.71989732980728149,
"z": -0.71989732980728149
},
"rotation": {
"w": 0.63176929950714111,
"x": -0.0003204345703125,
"y": 0.77511250972747803,
"z": 0.0002593994140625
},
"shapeType": "compound",
"type": "Model",
"userData": "{}"
}
],
"Entities": [{
"userData": "{\"hifiHomeKey\":{\"reset\":true}}",
"compoundShapeURL": "http://hifi-content.s3.amazonaws.com/alan/dev/simple-chair2.obj",
"created": "2016-03-07T21:07:29Z",
"dimensions": {
"x": 0.66077238321304321,
"y": 1.058124303817749,
"z": 0.7188611626625061
},
"dynamic": 1,
"gravity": {
"x": 0,
"y": -6,
"z": 0
},
"id": "{d97c8a4e-9b95-448c-a729-5da9e22b6adc}",
"modelURL": "http://hifi-content.s3.amazonaws.com/alan/dev/simple-chair2.fbx",
"queryAACube": {
"scale": 1.439794659614563,
"x": -0.71989732980728149,
"y": -0.71989732980728149,
"z": -0.71989732980728149
},
"rotation": {
"w": 0.63176929950714111,
"x": -0.0003204345703125,
"y": 0.77511250972747803,
"z": 0.0002593994140625
},
"shapeType": "compound",
"type": "Model"
}],
"Version": 57
}
}

View file

@ -1,277 +1,269 @@
{
"Entities": [
{
"collisionsWillMove": 1,
"compoundShapeURL": "http://hifi-content.s3.amazonaws.com/alan/dev/Fruit-Bowl.obj",
"created": "2016-03-15T23:11:03Z",
"dimensions": {
"x": 0.35241550207138062,
"y": 0.08979363739490509,
"z": 0.35241544246673584
},
"dynamic": 1,
"gravity": {
"x": 0,
"y": -7,
"z": 0
},
"id": "{fa981882-c38f-4413-88f2-255a06aacf08}",
"modelURL": "http://hifi-content.s3.amazonaws.com/alan/dev/Fruit-Bowl.fbx",
"position": {
"x": 0.1168212890625,
"y": 0,
"z": 0.11590576171875
},
"queryAACube": {
"scale": 0.50641506910324097,
"x": -0.13638624548912048,
"y": -0.25320753455162048,
"z": -0.13730177283287048
},
"rotation": {
"w": 0.49941253662109375,
"x": -4.57763671875e-05,
"y": 0.86633098125457764,
"z": -0.0001068115234375
},
"shapeType": "compound",
"type": "Model",
"userData": "{}"
"Entities": [{
"userData": "{\"hifiHomeKey\":{\"reset\":true}}",
"collisionsWillMove": 1,
"compoundShapeURL": "http://hifi-content.s3.amazonaws.com/alan/dev/Fruit-Bowl.obj",
"created": "2016-03-15T23:11:03Z",
"dimensions": {
"x": 0.35241550207138062,
"y": 0.08979363739490509,
"z": 0.35241544246673584
},
{
"collisionsWillMove": 1,
"created": "2016-03-15T21:26:11Z",
"dimensions": {
"x": 0.083729811012744904,
"y": 0.092105500400066376,
"z": 0.08111707866191864
},
"dynamic": 1,
"friction": 0.33000001311302185,
"gravity": {
"x": 0,
"y": -9,
"z": 0
},
"id": "{ed04b516-3c66-42d9-99af-c4425765df27}",
"modelURL": "http://hifi-content.s3.amazonaws.com/alan/dev/Fruit-Apple-2.fbx",
"position": {
"x": 0.1728515625,
"y": 0.040313720703125,
"z": 0.08847808837890625
},
"queryAACube": {
"scale": 0.14857350289821625,
"x": 0.098564811050891876,
"y": -0.033973030745983124,
"z": 0.014191336929798126
},
"restitution": 0.33000001311302185,
"rotation": {
"w": 0.74630355834960938,
"x": -0.5419546365737915,
"y": 0.080125093460083008,
"z": -0.37801176309585571
},
"shapeType": "sphere",
"type": "Model",
"userData": "{}"
"dynamic": 1,
"gravity": {
"x": 0,
"y": -7,
"z": 0
},
{
"collisionsWillMove": 1,
"created": "2016-03-15T21:26:11Z",
"dimensions": {
"x": 0.089192003011703491,
"y": 0.098114080727100372,
"z": 0.086408823728561401
},
"dynamic": 1,
"friction": 0.33000001311302185,
"gravity": {
"x": 0,
"y": -8,
"z": 0
},
"id": "{031f883a-6d7f-447a-96b1-c3ea75f938e1}",
"modelURL": "http://hifi-content.s3.amazonaws.com/alan/dev/Fruit-Apple.fbx",
"position": {
"x": 0.146240234375,
"y": 0.083740234375,
"z": 0
},
"queryAACube": {
"scale": 0.15826581418514252,
"x": 0.067107327282428741,
"y": 0.0046073272824287415,
"z": -0.079132907092571259
},
"restitution": 0.30000001192092896,
"rotation": {
"w": -0.2233462929725647,
"x": 0.81002521514892578,
"y": -0.071244359016418457,
"z": 0.5374685525894165
},
"shapeType": "sphere",
"type": "Model",
"userData": "{\"grabbableKey\":{\"grabbable\":true}}"
"id": "{fa981882-c38f-4413-88f2-255a06aacf08}",
"modelURL": "http://hifi-content.s3.amazonaws.com/alan/dev/Fruit-Bowl.fbx",
"position": {
"x": 0.1168212890625,
"y": 0,
"z": 0.11590576171875
},
{
"collisionsWillMove": 1,
"created": "2016-03-16T00:27:30Z",
"dimensions": {
"x": 0.083729811012744904,
"y": 0.092105500400066376,
"z": 0.08111707866191864
},
"dynamic": 1,
"friction": 0.33000001311302185,
"gravity": {
"x": 0,
"y": -9,
"z": 0
},
"id": "{e3d77c1e-1fcf-4dc2-8799-001046934df8}",
"modelURL": "http://hifi-content.s3.amazonaws.com/alan/dev/Fruit-Apple-2.fbx",
"position": {
"x": 0.08203125,
"y": 0.042266845703125,
"z": 0.05945587158203125
},
"queryAACube": {
"scale": 0.14857350289821625,
"x": 0.0077444985508918762,
"y": -0.032019905745983124,
"z": -0.014830879867076874
},
"restitution": 0.33000001311302185,
"rotation": {
"w": 0.82665753364562988,
"x": -0.32744336128234863,
"y": 0.10566878318786621,
"z": 0.44527351856231689
},
"shapeType": "sphere",
"type": "Model",
"userData": "{}"
"queryAACube": {
"scale": 0.50641506910324097,
"x": -0.13638624548912048,
"y": -0.25320753455162048,
"z": -0.13730177283287048
},
{
"collisionsWillMove": 1,
"created": "2016-03-16T00:27:30Z",
"dimensions": {
"x": 0.089192003011703491,
"y": 0.098114080727100372,
"z": 0.086408823728561401
},
"dynamic": 1,
"friction": 0.33000001311302185,
"gravity": {
"x": 0,
"y": -8,
"z": 0
},
"id": "{34c224cf-d5f5-4cf3-9bf6-55857bf08e43}",
"modelURL": "http://hifi-content.s3.amazonaws.com/alan/dev/Fruit-Apple.fbx",
"position": {
"x": 0,
"y": 0.082916259765625,
"z": 0.0829925537109375
},
"queryAACube": {
"scale": 0.15826581418514252,
"x": -0.079132907092571259,
"y": 0.0037833526730537415,
"z": 0.0038596466183662415
},
"restitution": 0.30000001192092896,
"rotation": {
"w": 0.075150728225708008,
"x": 0.60289919376373291,
"y": 0.78295564651489258,
"z": -0.13344013690948486
},
"shapeType": "sphere",
"type": "Model",
"userData": "{\"grabbableKey\":{\"grabbable\":true}}"
"rotation": {
"w": 0.49941253662109375,
"x": -4.57763671875e-05,
"y": 0.86633098125457764,
"z": -0.0001068115234375
},
{
"collisionsWillMove": 1,
"created": "2016-03-16T00:27:30Z",
"dimensions": {
"x": 0.083729811012744904,
"y": 0.092105500400066376,
"z": 0.08111707866191864
},
"dynamic": 1,
"friction": 0.33000001311302185,
"gravity": {
"x": 0,
"y": -9,
"z": 0
},
"id": "{0eab5380-2358-4bcd-b53e-a071d50e1475}",
"modelURL": "http://hifi-content.s3.amazonaws.com/alan/dev/Fruit-Apple-2.fbx",
"position": {
"x": 0.0596923828125,
"y": 0.04351806640625,
"z": 0.15406036376953125
},
"queryAACube": {
"scale": 0.14857350289821625,
"x": -0.014594368636608124,
"y": -0.030768685042858124,
"z": 0.079773612320423126
},
"restitution": 0.33000001311302185,
"rotation": {
"w": -0.047714948654174805,
"x": 0.91860842704772949,
"y": -0.33046466112136841,
"z": -0.21126115322113037
},
"shapeType": "sphere",
"type": "Model",
"userData": "{}"
"shapeType": "compound",
"type": "Model"
}, {
"userData": "{\"hifiHomeKey\":{\"reset\":true}}",
"collisionsWillMove": 1,
"created": "2016-03-15T21:26:11Z",
"dimensions": {
"x": 0.083729811012744904,
"y": 0.092105500400066376,
"z": 0.08111707866191864
},
{
"collisionsWillMove": 1,
"created": "2016-03-16T00:27:30Z",
"dimensions": {
"x": 0.089192003011703491,
"y": 0.098114080727100372,
"z": 0.086408823728561401
},
"dynamic": 1,
"friction": 0.33000001311302185,
"gravity": {
"x": 0,
"y": -8,
"z": 0
},
"id": "{c8140643-23fb-4827-b708-e87103f9e438}",
"modelURL": "http://hifi-content.s3.amazonaws.com/alan/dev/Fruit-Apple.fbx",
"position": {
"x": 0.1519775390625,
"y": 0.046356201171875,
"z": 0.16817474365234375
},
"queryAACube": {
"scale": 0.15826581418514252,
"x": 0.072844631969928741,
"y": -0.032776705920696259,
"z": 0.089041836559772491
},
"restitution": 0.30000001192092896,
"rotation": {
"w": 0.59276723861694336,
"x": 0.56038761138916016,
"y": 0.10734724998474121,
"z": -0.56835281848907471
},
"shapeType": "sphere",
"type": "Model",
"userData": "{\"grabbableKey\":{\"grabbable\":true}}"
}
],
"dynamic": 1,
"friction": 0.33000001311302185,
"gravity": {
"x": 0,
"y": -9,
"z": 0
},
"id": "{ed04b516-3c66-42d9-99af-c4425765df27}",
"modelURL": "http://hifi-content.s3.amazonaws.com/alan/dev/Fruit-Apple-2.fbx",
"position": {
"x": 0.1728515625,
"y": 0.040313720703125,
"z": 0.08847808837890625
},
"queryAACube": {
"scale": 0.14857350289821625,
"x": 0.098564811050891876,
"y": -0.033973030745983124,
"z": 0.014191336929798126
},
"restitution": 0.33000001311302185,
"rotation": {
"w": 0.74630355834960938,
"x": -0.5419546365737915,
"y": 0.080125093460083008,
"z": -0.37801176309585571
},
"shapeType": "sphere",
"type": "Model"
}, {
"userData": "{\"hifiHomeKey\":{\"reset\":true}}",
"collisionsWillMove": 1,
"created": "2016-03-15T21:26:11Z",
"dimensions": {
"x": 0.089192003011703491,
"y": 0.098114080727100372,
"z": 0.086408823728561401
},
"dynamic": 1,
"friction": 0.33000001311302185,
"gravity": {
"x": 0,
"y": -8,
"z": 0
},
"id": "{031f883a-6d7f-447a-96b1-c3ea75f938e1}",
"modelURL": "http://hifi-content.s3.amazonaws.com/alan/dev/Fruit-Apple.fbx",
"position": {
"x": 0.146240234375,
"y": 0.083740234375,
"z": 0
},
"queryAACube": {
"scale": 0.15826581418514252,
"x": 0.067107327282428741,
"y": 0.0046073272824287415,
"z": -0.079132907092571259
},
"restitution": 0.30000001192092896,
"rotation": {
"w": -0.2233462929725647,
"x": 0.81002521514892578,
"y": -0.071244359016418457,
"z": 0.5374685525894165
},
"shapeType": "sphere",
"type": "Model"
}, {
"userData": "{\"hifiHomeKey\":{\"reset\":true}}",
"collisionsWillMove": 1,
"created": "2016-03-16T00:27:30Z",
"dimensions": {
"x": 0.083729811012744904,
"y": 0.092105500400066376,
"z": 0.08111707866191864
},
"dynamic": 1,
"friction": 0.33000001311302185,
"gravity": {
"x": 0,
"y": -9,
"z": 0
},
"id": "{e3d77c1e-1fcf-4dc2-8799-001046934df8}",
"modelURL": "http://hifi-content.s3.amazonaws.com/alan/dev/Fruit-Apple-2.fbx",
"position": {
"x": 0.08203125,
"y": 0.042266845703125,
"z": 0.05945587158203125
},
"queryAACube": {
"scale": 0.14857350289821625,
"x": 0.0077444985508918762,
"y": -0.032019905745983124,
"z": -0.014830879867076874
},
"restitution": 0.33000001311302185,
"rotation": {
"w": 0.82665753364562988,
"x": -0.32744336128234863,
"y": 0.10566878318786621,
"z": 0.44527351856231689
},
"shapeType": "sphere",
"type": "Model"
}, {
"userData": "{\"hifiHomeKey\":{\"reset\":true}}",
"collisionsWillMove": 1,
"created": "2016-03-16T00:27:30Z",
"dimensions": {
"x": 0.089192003011703491,
"y": 0.098114080727100372,
"z": 0.086408823728561401
},
"dynamic": 1,
"friction": 0.33000001311302185,
"gravity": {
"x": 0,
"y": -8,
"z": 0
},
"id": "{34c224cf-d5f5-4cf3-9bf6-55857bf08e43}",
"modelURL": "http://hifi-content.s3.amazonaws.com/alan/dev/Fruit-Apple.fbx",
"position": {
"x": 0,
"y": 0.082916259765625,
"z": 0.0829925537109375
},
"queryAACube": {
"scale": 0.15826581418514252,
"x": -0.079132907092571259,
"y": 0.0037833526730537415,
"z": 0.0038596466183662415
},
"restitution": 0.30000001192092896,
"rotation": {
"w": 0.075150728225708008,
"x": 0.60289919376373291,
"y": 0.78295564651489258,
"z": -0.13344013690948486
},
"shapeType": "sphere",
"type": "Model"
}, {
"userData": "{\"hifiHomeKey\":{\"reset\":true}}",
"collisionsWillMove": 1,
"created": "2016-03-16T00:27:30Z",
"dimensions": {
"x": 0.083729811012744904,
"y": 0.092105500400066376,
"z": 0.08111707866191864
},
"dynamic": 1,
"friction": 0.33000001311302185,
"gravity": {
"x": 0,
"y": -9,
"z": 0
},
"id": "{0eab5380-2358-4bcd-b53e-a071d50e1475}",
"modelURL": "http://hifi-content.s3.amazonaws.com/alan/dev/Fruit-Apple-2.fbx",
"position": {
"x": 0.0596923828125,
"y": 0.04351806640625,
"z": 0.15406036376953125
},
"queryAACube": {
"scale": 0.14857350289821625,
"x": -0.014594368636608124,
"y": -0.030768685042858124,
"z": 0.079773612320423126
},
"restitution": 0.33000001311302185,
"rotation": {
"w": -0.047714948654174805,
"x": 0.91860842704772949,
"y": -0.33046466112136841,
"z": -0.21126115322113037
},
"shapeType": "sphere",
"type": "Model"
}, {
"userData": "{\"hifiHomeKey\":{\"reset\":true}}",
"collisionsWillMove": 1,
"created": "2016-03-16T00:27:30Z",
"dimensions": {
"x": 0.089192003011703491,
"y": 0.098114080727100372,
"z": 0.086408823728561401
},
"dynamic": 1,
"friction": 0.33000001311302185,
"gravity": {
"x": 0,
"y": -8,
"z": 0
},
"id": "{c8140643-23fb-4827-b708-e87103f9e438}",
"modelURL": "http://hifi-content.s3.amazonaws.com/alan/dev/Fruit-Apple.fbx",
"position": {
"x": 0.1519775390625,
"y": 0.046356201171875,
"z": 0.16817474365234375
},
"queryAACube": {
"scale": 0.15826581418514252,
"x": 0.072844631969928741,
"y": -0.032776705920696259,
"z": 0.089041836559772491
},
"restitution": 0.30000001192092896,
"rotation": {
"w": 0.59276723861694336,
"x": 0.56038761138916016,
"y": 0.10734724998474121,
"z": -0.56835281848907471
},
"shapeType": "sphere",
"type": "Model"
}],
"Version": 57
}
}

View file

@ -1,36 +1,35 @@
{
"Entities": [
{
"compoundShapeURL": "http://hifi-content.s3.amazonaws.com/alan/dev/Little-Lamp.obj",
"created": "2016-03-16T01:00:16Z",
"dimensions": {
"x": 0.63867169618606567,
"y": 0.75600343942642212,
"z": 0.22696791589260101
},
"id": "{533c2da8-ea8c-4ae8-9c1c-3a18c7d91f46}",
"modelURL": "http://hifi-content.s3.amazonaws.com/alan/dev/Little-Lamp-White-4.fbx",
"position": {
"x": 1103.28564453125,
"y": 460.89242553710938,
"z": 0
},
"queryAACube": {
"scale": 1.0153605937957764,
"x": 1102.7779541015625,
"y": 460.38473510742188,
"z": -0.50768029689788818
},
"rotation": {
"w": -0.36089110374450684,
"x": -0.014938592910766602,
"y": -0.93249410390853882,
"z": -0.0007476806640625
},
"shapeType": "compound",
"type": "Model",
"userData": "{\"grabbableKey\":{\"grabbable\":true,\"wantsTrigger\":true}}"
}
],
"Entities": [{
"userData": "{\"hifiHomeKey\":{\"reset\":true}}",
"compoundShapeURL": "http://hifi-content.s3.amazonaws.com/alan/dev/Little-Lamp.obj",
"created": "2016-03-16T01:00:16Z",
"dimensions": {
"x": 0.63867169618606567,
"y": 0.75600343942642212,
"z": 0.22696791589260101
},
"id": "{533c2da8-ea8c-4ae8-9c1c-3a18c7d91f46}",
"modelURL": "http://hifi-content.s3.amazonaws.com/alan/dev/Little-Lamp-White-4.fbx",
"position": {
"x": 1103.28564453125,
"y": 460.89242553710938,
"z": 0
},
"dynamic": 1,
"queryAACube": {
"scale": 1.0153605937957764,
"x": 1102.7779541015625,
"y": 460.38473510742188,
"z": -0.50768029689788818
},
"rotation": {
"w": -0.36089110374450684,
"x": -0.014938592910766602,
"y": -0.93249410390853882,
"z": -0.0007476806640625
},
"shapeType": "compound",
"type": "Model",
}],
"Version": 57
}
}

View file

@ -1,36 +1,35 @@
{
"Entities": [
{
"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
},
"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": "{}"
}
],
"Entities": [{
"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
}
}

View file

@ -1,36 +1,35 @@
{
"Entities": [
{
"compoundShapeURL": "http://hifi-content.s3.amazonaws.com/alan/dev/Little-Lamp.obj",
"created": "2016-03-16T01:04:38Z",
"dimensions": {
"x": 0.63867169618606567,
"y": 0.75600343942642212,
"z": 0.22696791589260101
},
"id": "{ee167d6d-3901-469a-86df-baf787691997}",
"modelURL": "http://hifi-content.s3.amazonaws.com/alan/dev/Little-Lamp-White-4.fbx",
"position": {
"x": 1104.701171875,
"y": 460.98452758789062,
"z": 0
},
"queryAACube": {
"scale": 1.0153605937957764,
"x": 1104.1934814453125,
"y": 460.47683715820312,
"z": -0.50768029689788818
},
"rotation": {
"w": 0.69259178638458252,
"x": -0.0070344209671020508,
"y": -0.72118711471557617,
"z": 0.013168573379516602
},
"shapeType": "compound",
"type": "Model",
"userData": "{\"grabbableKey\":{\"grabbable\":true,\"wantsTrigger\":true}}"
}
],
"Entities": [{
"compoundShapeURL": "http://hifi-content.s3.amazonaws.com/alan/dev/Little-Lamp.obj",
"created": "2016-03-16T01:04:38Z",
"dimensions": {
"x": 0.63867169618606567,
"y": 0.75600343942642212,
"z": 0.22696791589260101
},
"id": "{ee167d6d-3901-469a-86df-baf787691997}",
"modelURL": "http://hifi-content.s3.amazonaws.com/alan/dev/Little-Lamp-White-4.fbx",
"position": {
"x": 1104.701171875,
"y": 460.98452758789062,
"z": 0
},
"dynamic": 1,
"queryAACube": {
"scale": 1.0153605937957764,
"x": 1104.1934814453125,
"y": 460.47683715820312,
"z": -0.50768029689788818
},
"rotation": {
"w": 0.69259178638458252,
"x": -0.0070344209671020508,
"y": -0.72118711471557617,
"z": 0.013168573379516602
},
"shapeType": "compound",
"type": "Model",
"userData": "{\"hifiHomeKey\":{\"reset\":true}}"
}],
"Version": 57
}
}

View file

@ -1,33 +1,32 @@
{
"Entities": [
{
"created": "2016-03-07T21:07:29Z",
"dimensions": {
"x": 2.0069153308868408,
"y": 0.0160951167345047,
"z": 0.45006880164146423
},
"gravity": {
"x": 0,
"y": -2,
"z": 0
},
"id": "{9745b51e-7816-4de0-85d0-82432a0b8175}",
"queryAACube": {
"scale": 2.0568251609802246,
"x": -1.0284125804901123,
"y": -1.0284125804901123,
"z": -1.0284125804901123
},
"rotation": {
"w": -0.0063019990921020508,
"x": 0.46935224533081055,
"y": -0.011947810649871826,
"z": -0.88293278217315674
},
"type": "Box",
"userData": "{}"
}
],
"Entities": [{
"created": "2016-03-07T21:07:29Z",
"dimensions": {
"x": 2.0069153308868408,
"y": 0.0160951167345047,
"z": 0.45006880164146423
},
"gravity": {
"x": 0,
"y": -2,
"z": 0
},
"dynamic": 1,
"id": "{9745b51e-7816-4de0-85d0-82432a0b8175}",
"queryAACube": {
"scale": 2.0568251609802246,
"x": -1.0284125804901123,
"y": -1.0284125804901123,
"z": -1.0284125804901123
},
"rotation": {
"w": -0.0063019990921020508,
"x": 0.46935224533081055,
"y": -0.011947810649871826,
"z": -0.88293278217315674
},
"type": "Box",
"userData": "{\"hifiHomeKey\":{\"reset\":true}}"
}],
"Version": 57
}
}

View file

@ -1,36 +1,35 @@
{
"Entities": [
{
"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
},
"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": "{}"
}
],
"Entities": [{
"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
}
}

View file

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

View file

@ -1,33 +1,32 @@
{
"Entities": [
{
"created": "2016-03-15T21:26:11Z",
"dimensions": {
"x": 2.0069153308868408,
"y": 0.0160951167345047,
"z": 0.45006880164146423
},
"gravity": {
"x": 0,
"y": -1,
"z": 0
},
"id": "{ef35ce2a-fddb-44bf-bb1b-30d9fac70563}",
"queryAACube": {
"scale": 2.0568251609802246,
"x": -1.0284125804901123,
"y": -1.0284125804901123,
"z": -1.0284125804901123
},
"rotation": {
"w": -0.0064851045608520508,
"x": 0.46929121017456055,
"y": -0.012191951274871826,
"z": -0.88293278217315674
},
"type": "Box",
"userData": "{}"
}
],
"Entities": [{
"created": "2016-03-15T21:26:11Z",
"dimensions": {
"x": 2.0069153308868408,
"y": 0.0160951167345047,
"z": 0.45006880164146423
},
"gravity": {
"x": 0,
"y": -1,
"z": 0
},
"dynamic": 1,
"id": "{ef35ce2a-fddb-44bf-bb1b-30d9fac70563}",
"queryAACube": {
"scale": 2.0568251609802246,
"x": -1.0284125804901123,
"y": -1.0284125804901123,
"z": -1.0284125804901123
},
"rotation": {
"w": -0.0064851045608520508,
"x": 0.46929121017456055,
"y": -0.012191951274871826,
"z": -0.88293278217315674
},
"type": "Box",
"userData": "{\"hifiHomeKey\":{\"reset\":true}}"
}],
"Version": 57
}
}

View file

@ -1,16 +1,16 @@
print('KINETIC INCLUDING WRAPPER')
var BOOKS_URL = 'http://hifi-content.s3.amazonaws.com/DomainContent/Home/kineticObjects/books.json'
var UPPER_BOOKSHELF_URL = 'http://hifi-content.s3.amazonaws.com/DomainContent/Home/kineticObjects/upperBookShelf.json';
var LOWER_BOOKSHELF_URL = 'http://hifi-content.s3.amazonaws.com/DomainContent/Home/kineticObjects/lowerBookShelf.json';
var RIGHT_DESK_DRAWER_URL = 'http://hifi-content.s3.amazonaws.com/DomainContent/Home/kineticObjects/rightDeskDrawer.json';
var LEFT_DESK_DRAWER_URL = 'http://hifi-content.s3.amazonaws.com/DomainContent/Home/kineticObjects/leftDeskDrawer.json';
var CHAIR_URL = 'http://hifi-content.s3.amazonaws.com/DomainContent/Home/kineticObjects/chair.json'
var DESK_DRAWERS_URL = 'http://hifi-content.s3.amazonaws.com/DomainContent/Home/kineticObjects/deskDrawers.json'
var FRUIT_BOWL_URL = 'http://hifi-content.s3.amazonaws.com/DomainContent/Home/kineticObjects/fruit.json'
var LAB_LAMP_URL = 'http://hifi-content.s3.amazonaws.com/DomainContent/Home/kineticObjects/labLamp.json'
var LIVING_ROOM_LAMP_URL = 'http://hifi-content.s3.amazonaws.com/DomainContent/Home/kineticObjects/livingRoomLamp.json'
var TRASHCAN_URL = 'http://hifi-content.s3.amazonaws.com/DomainContent/Home/kineticObjects/trashcan.json'
var BOOKS_URL = 'http://hifi-content.s3.amazonaws.com/DomainContent/Home/kineticObjects/books.json' + "?" + Math.random();
var UPPER_BOOKSHELF_URL = 'http://hifi-content.s3.amazonaws.com/DomainContent/Home/kineticObjects/upperBookShelf.json' + "?" + Math.random();
var LOWER_BOOKSHELF_URL = 'http://hifi-content.s3.amazonaws.com/DomainContent/Home/kineticObjects/lowerBookShelf.json' + "?" + Math.random();
var RIGHT_DESK_DRAWER_URL = 'http://hifi-content.s3.amazonaws.com/DomainContent/Home/kineticObjects/rightDeskDrawer.json' + "?" + Math.random();
var LEFT_DESK_DRAWER_URL = 'http://hifi-content.s3.amazonaws.com/DomainContent/Home/kineticObjects/leftDeskDrawer.json' + "?" + Math.random();
var CHAIR_URL = 'http://hifi-content.s3.amazonaws.com/DomainContent/Home/kineticObjects/chair.json' + "?" + Math.random();
var DESK_DRAWERS_URL = 'http://hifi-content.s3.amazonaws.com/DomainContent/Home/kineticObjects/deskDrawers.json' + "?" + Math.random();
var FRUIT_BOWL_URL = 'http://hifi-content.s3.amazonaws.com/DomainContent/Home/kineticObjects/fruit.json' + "?" + Math.random()
var LAB_LAMP_URL = 'http://hifi-content.s3.amazonaws.com/DomainContent/Home/kineticObjects/labLamp.json' + "?" + Math.random();
var LIVING_ROOM_LAMP_URL = 'http://hifi-content.s3.amazonaws.com/DomainContent/Home/kineticObjects/livingRoomLamp.json' + "?" + Math.random();
var TRASHCAN_URL = 'http://hifi-content.s3.amazonaws.com/DomainContent/Home/kineticObjects/trashcan.json' + "?" + Math.random();
FruitBowl = function(spawnLocation, spawnRotation) {
print('CREATE FRUIT BOWL')
@ -38,10 +38,14 @@ FruitBowl = function(spawnLocation, spawnRotation) {
}
LabLamp = function(spawnLocation, spawnRotation) {
print('CREATE LAB LAMP')
var created = [];
function create() {
var success = Clipboard.importEntities(FRUIT_BOWL_URL);
var success = Clipboard.importEntities(LAB_LAMP_URL);
if (success === true) {
hasBow = true;
created = Clipboard.pasteEntities(spawnLocation)
@ -61,12 +65,12 @@ LabLamp = function(spawnLocation, spawnRotation) {
}
LivingRoomLamp = function(spawnLocation, spawnRotation) {
print('CREATE LIVING ROOM LAMP')
var created = [];
function create() {
var success = Clipboard.importEntities(FRUIT_BOWL_URL);
var success = Clipboard.importEntities(LIVING_ROOM_LAMP_URL);
if (success === true) {
hasBow = true;
created = Clipboard.pasteEntities(spawnLocation)
print('created ' + created);
}
@ -84,13 +88,12 @@ LivingRoomLamp = function(spawnLocation, spawnRotation) {
}
UpperBookShelf = function(spawnLocation, spawnRotation) {
print('CREATE Bookshelves')
print('CREATE UPPER SHELF')
var created = [];
function create() {
var success = Clipboard.importEntities(UPPER_BOOKSHELF_URL);
if (success === true) {
hasBow = true;
created = Clipboard.pasteEntities(spawnLocation)
print('created ' + created);
}
@ -109,13 +112,12 @@ UpperBookShelf = function(spawnLocation, spawnRotation) {
LowerBookShelf = function(spawnLocation, spawnRotation) {
print('CREATE Bookshelves')
print('CREATE LOWER SHELF')
var created = [];
function create() {
var success = Clipboard.importEntities(LOWER_BOOKSHELF_URL);
if (success === true) {
hasBow = true;
created = Clipboard.pasteEntities(spawnLocation)
print('created ' + created);
}
@ -133,12 +135,13 @@ LowerBookShelf = function(spawnLocation, spawnRotation) {
}
RightDeskDrawer = function(spawnLocation, spawnRotation) {
print('CREATE RIGHT DRAWER')
var created = [];
function create() {
var success = Clipboard.importEntities(RIGHT_DESK_DRAWER_URL);
if (success === true) {
hasBow = true;
created = Clipboard.pasteEntities(spawnLocation)
print('created ' + created);
}
@ -156,13 +159,12 @@ RightDeskDrawer = function(spawnLocation, spawnRotation) {
}
LeftDeskDrawer = function(spawnLocation, spawnRotation) {
print('CREATE Bookshelves')
print('CREATE LEFT DRAWER')
var created = [];
function create() {
var success = Clipboard.importEntities(LEFT_DESK_DRAWER_URL);
if (success === true) {
hasBow = true;
created = Clipboard.pasteEntities(spawnLocation)
print('created ' + created);
}
@ -180,12 +182,12 @@ LeftDeskDrawer = function(spawnLocation, spawnRotation) {
}
Chair = function(spawnLocation, spawnRotation) {
print('CREATE CHAIR')
var created = [];
function create() {
var success = Clipboard.importEntities(CHAIR_URL);
if (success === true) {
hasBow = true;
created = Clipboard.pasteEntities(spawnLocation)
print('created ' + created);
}
@ -203,12 +205,12 @@ Chair = function(spawnLocation, spawnRotation) {
}
Trashcan = function(spawnLocation, spawnRotation) {
print('CREATE TRASHCAN')
var created = [];
function create() {
var success = Clipboard.importEntities(TRASHCAN_URL);
if (success === true) {
hasBow = true;
created = Clipboard.pasteEntities(spawnLocation)
print('created ' + created);
}
@ -227,12 +229,12 @@ Trashcan = function(spawnLocation, spawnRotation) {
}
Books = function(spawnLocation, spawnRotation) {
print('CREATE BOOKS')
var created = [];
function create() {
var success = Clipboard.importEntities(BOOKS_URL);
if (success === true) {
hasBow = true;
created = Clipboard.pasteEntities(spawnLocation)
print('created ' + created);
}

View file

@ -0,0 +1,156 @@
// pingPongGun.js
//
// Script Type: Entity
// Created by James B. Pollack @imgntn on 9/21/2015
// Copyright 2015 High Fidelity, Inc.
//
// This script shoots a ping pong ball.
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
/*global print, MyAvatar, Entities, AnimationCache, SoundCache, Scene, Camera, Overlays, Audio, HMD, AvatarList, AvatarManager, Controller, UndoStack, Window, Account, GlobalServices, Script, ScriptDiscoveryService, LODManager, Menu, Vec3, Quat, AudioDevice, Paths, Clipboard, Settings, XMLHttpRequest, randFloat, randInt */
(function() {
Script.include("../utils.js");
var SHOOTING_SOUND_URL = 'http://hifi-public.s3.amazonaws.com/sounds/ping_pong_gun/pong_sound.wav';
var PING_PONG_BALL_URL = 'http://hifi-public.s3.amazonaws.com/models/ping_pong_gun/ping_pong_ball.fbx';
function PingPongGun() {
return;
}
//if the trigger value goes below this value, reload the gun.
var RELOAD_THRESHOLD = 0.95;
var GUN_TIP_FWD_OFFSET = -0.35;
var GUN_TIP_UP_OFFSET = 0.12;
var GUN_FORCE = 9;
var BALL_RESTITUTION = 0.6;
var BALL_LINEAR_DAMPING = 0.4;
var BALL_GRAVITY = {
x: 0,
y: -4.8,
z: 0
};
var BALL_DIMENSIONS = {
x: 0.04,
y: 0.04,
z: 0.04
};
var BALL_COLOR = {
red: 255,
green: 255,
blue: 255
};
var TRIGGER_CONTROLS = [
Controller.Standard.LT,
Controller.Standard.RT,
];
PingPongGun.prototype = {
hand: null,
gunTipPosition: null,
canShoot: false,
canShootTimeout: null,
startEquip: function(entityID, args) {
this.hand = args[0] == "left" ? 0 : 1;
},
continueEquip: function(entityID, args) {
if (this.canShootTimeout !== null) {
Script.clearTimeout(this.canShootTimeout);
}
this.checkTriggerPressure(this.hand);
},
releaseEquip: function(entityID, args) {
var _this = this;
this.canShootTimeout = Script.setTimeout(function() {
_this.canShoot = false;
}, 250);
},
checkTriggerPressure: function(gunHand) {
this.triggerValue = Controller.getValue(TRIGGER_CONTROLS[gunHand]);
if (this.triggerValue < RELOAD_THRESHOLD) {
// print('RELOAD');
this.canShoot = true;
} else if (this.triggerValue >= RELOAD_THRESHOLD && this.canShoot === true) {
var gunProperties = Entities.getEntityProperties(this.entityID, ["position", "rotation"]);
this.shootBall(gunProperties);
this.canShoot = false;
}
return;
},
shootBall: function(gunProperties) {
var forwardVec = Quat.getFront(Quat.multiply(gunProperties.rotation, Quat.fromPitchYawRollDegrees(0, 180, 0)));
forwardVec = Vec3.normalize(forwardVec);
forwardVec = Vec3.multiply(forwardVec, GUN_FORCE);
var properties = {
// type: 'Model',
// modelURL:PING_PONG_BALL_URL,
shapeType: 'sphere',
type: 'Sphere',
color: BALL_COLOR,
dimensions: BALL_DIMENSIONS,
damping: BALL_LINEAR_DAMPING,
gravity: BALL_GRAVITY,
restitution: BALL_RESTITUTION,
dynamic: true,
rotation: gunProperties.rotation,
position: this.getGunTipPosition(gunProperties),
velocity: forwardVec,
lifetime: 10,
userData: JSON.stringify({
'hifiHomeKey': {
'reset': true
}
}),
};
Entities.addEntity(properties);
this.playSoundAtCurrentPosition(gunProperties.position);
},
playSoundAtCurrentPosition: function(position) {
var audioProperties = {
volume: 0.2,
position: position
};
Audio.playSound(this.SHOOTING_SOUND, audioProperties);
},
getGunTipPosition: function(properties) {
//the tip of the gun is going to be in a different place than the center, so we move in space relative to the model to find that position
var frontVector = Quat.getFront(properties.rotation);
var frontOffset = Vec3.multiply(frontVector, GUN_TIP_FWD_OFFSET);
var upVector = Quat.getUp(properties.rotation);
var upOffset = Vec3.multiply(upVector, GUN_TIP_UP_OFFSET);
var gunTipPosition = Vec3.sum(properties.position, frontOffset);
gunTipPosition = Vec3.sum(gunTipPosition, upOffset);
return gunTipPosition;
},
preload: function(entityID) {
this.entityID = entityID;
this.SHOOTING_SOUND = SoundCache.getSound(SHOOTING_SOUND_URL);
}
};
// entity scripts always need to return a newly constructed object of our type
return new PingPongGun();
});

View file

@ -0,0 +1,77 @@
// createPingPongGun.js
//
// Script Type: Entity Spawner
// Created by James B. Pollack on 9/30/2015
// Copyright 2015 High Fidelity, Inc.
//
// This script creates a gun that shoots ping pong balls when you pull the trigger on a hand controller.
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
Script.include("../utils.js");
var scriptURL = Script.resolvePath('pingPongGun.js');
var MODEL_URL = 'http://hifi-content.s3.amazonaws.com/alan/dev/Pingpong-Gun-New.fbx'
var COLLISION_HULL_URL = 'http://hifi-content.s3.amazonaws.com/alan/dev/Pingpong-Gun-New.obj';
var COLLISION_SOUND_URL = 'http://hifi-public.s3.amazonaws.com/sounds/Collisions-otherorganic/plastic_impact.L.wav';
_PingPongGun = function(spawnPosition, spawnRotation) {
var pingPongGun = Entities.addEntity({
type: "Model",
modelURL: MODEL_URL,
shapeType: 'compound',
compoundShapeURL: COLLISION_HULL_URL,
script: scriptURL,
position: spawnPosition,
dimensions: {
x: 0.125,
y: 0.3875,
z: 0.9931
},
rotation: Quat.fromPitchYawRollDegrees(spawnRotation.x, spawnRotation.y, spawnRotation.z),
dynamic: true,
collisionSoundURL: COLLISION_SOUND_URL,
userData: JSON.stringify({
grabbableKey: {
invertSolidWhileHeld: true
},
'hifiHomeKey': {
'reset': true
},
wearable: {
joints: {
RightHand: [{
x: 0.1177130937576294,
y: 0.12922893464565277,
z: 0.08307232707738876
}, {
x: 0.4934672713279724,
y: 0.3605862259864807,
z: 0.6394805908203125,
w: -0.4664038419723511
}],
LeftHand: [{
x: 0.09151676297187805,
y: 0.13639454543590546,
z: 0.09354984760284424
}, {
x: -0.19628101587295532,
y: 0.6418180465698242,
z: 0.2830369472503662,
w: 0.6851521730422974
}]
}
}
})
});
function cleanup() {
print('PING PONG CLEANUP!')
Entities.deleteEntity(pingPongGun);
}
this.cleanup = cleanup;
print('CREATED PING PONG GUN')
}

View file

@ -14,9 +14,6 @@
(function() {
var _this;
var dynamicEntities = [];
var kineticEntities = [];
function Reset() {
_this = this;
}
@ -31,18 +28,31 @@
var plantPath = Script.resolvePath("growingPlant/wrapper.js?" + Math.random());
var kineticPath = Script.resolvePath("kineticObjects/wrapper.js?" + Math.random());
Script.include(kineticPath);
var pingPongGunPath = Script.resolvePath("pingPongGun/wrapper.js?" + Math.random());
var kineticPath = Script.resolvePath("kineticObjects/wrapper.js?" + Math.random());
Script.include(kineticPath);
Script.include(utilsPath);
// Script.include(fishTankPath);
Script.include(tiltMazePath);
Script.include(whiteboardPath);
Script.include(plantPath);
Script.include(pingPongGunPath);
var center = Vec3.sum(Vec3.sum(MyAvatar.position, {
x: 0,
y: 0.5,
z: 0
}), Vec3.multiply(1, Quat.getFront(Camera.getOrientation())));
Reset.prototype = {
tidying: false,
preload: function(entityID) {
_this.entityID = entityID;
},
unload: function() {
this.cleanupDynamicEntities();
},
tidying: false,
showTidyingButton: function() {
var textureString =
'Texture.001:"http://hifi-content.s3.amazonaws.com/DomainContent/Home/tidyGuy/Tidyguy-6.fbx/Tidyguy-6.fbm/Head-Housing-Texture.png",\ntex.face.screen.emit:"http://hifi-content.s3.amazonaws.com/DomainContent/Home/tidyGuy/Tidyguy-6.fbx/Tidyguy-6.fbm/tidy-guy-face-Emit.png",\ntex.face.sceen:"http://hifi-content.s3.amazonaws.com/DomainContent/Home/tidyGuy/Tidyguy-6.fbx/Tidyguy-6.fbm/tidy-guy-face.png",\ntex.button.blanks:"http://hifi-content.s3.amazonaws.com/DomainContent/Home/tidyGuy/Tidyguy-6.fbx/Tidyguy-6.fbm/Button-Blanks.png",\ntex.button.blanks.normal:"http://hifi-content.s3.amazonaws.com/DomainContent/Home/tidyGuy/Tidyguy-6.fbx/Tidyguy-6.fbm/Button-Blanks-Normal.png",\nbutton.tidy.emit:"http://hifi-content.s3.amazonaws.com/DomainContent/Home/tidyGuy/Tidy-Up-Button-Orange-Emit.png",\nbutton.tidy:"http://hifi-content.s3.amazonaws.com/DomainContent/Home/tidyGuy/Tidy-Up-Button-Orange.png"'
@ -51,6 +61,7 @@
textures: textureString
});
},
showTidyButton: function() {
var textureString =
'Texture.001:"http://hifi-content.s3.amazonaws.com/DomainContent/Home/tidyGuy/Tidyguy-6.fbx/Tidyguy-6.fbm/Head-Housing-Texture.png",\ntex.face.screen.emit:"http://hifi-content.s3.amazonaws.com/DomainContent/Home/tidyGuy/Tidyguy-6.fbx/Tidyguy-6.fbm/tidy-guy-face-Emit.png",\ntex.face.sceen:"http://hifi-content.s3.amazonaws.com/DomainContent/Home/tidyGuy/Tidyguy-6.fbx/Tidyguy-6.fbm/tidy-guy-face.png",\ntex.button.blanks:"http://hifi-content.s3.amazonaws.com/DomainContent/Home/tidyGuy/Tidyguy-6.fbx/Tidyguy-6.fbm/Button-Blanks.png",\ntex.button.blanks.normal:"http://hifi-content.s3.amazonaws.com/DomainContent/Home/tidyGuy/Tidyguy-6.fbx/Tidyguy-6.fbm/Button-Blanks-Normal.png",\nbutton.tidy.emit:"http://hifi-content.s3.amazonaws.com/DomainContent/Home/tidyGuy/Tidyguy-6.fbx/Tidyguy-6.fbm/Tidy-Up-Button-Green-Emit.png",\nbutton.tidy:"http://hifi-content.s3.amazonaws.com/DomainContent/Home/tidyGuy/Tidyguy-6.fbx/Tidyguy-6.fbm/Tidy-Up-Button-Green.png"'
@ -59,9 +70,11 @@
textures: textureString
});
},
playTidyingSound: function() {
},
toggleButton: function() {
if (_this.tidying === true) {
return;
@ -69,14 +82,18 @@
_this.tidying = true;
_this.showTidyingButton();
_this.playTidyingSound();
_this.findAndDeleteHomeEntities();
Script.setTimeout(function() {
_this.showTidyButton();
_this.tidying = false;
}, 2500);
_this.cleanupDynamicEntities();
_this.cleanupKineticEntities();
_this.createKineticEntities();
_this.createDynamicEntities();
Script.setTimeout(function() {
_this.createKineticEntities();
_this.createDynamicEntities();
}, 750)
}
},
@ -94,83 +111,72 @@
},
createDynamicEntities: function() {
var center = Vec3.sum(Vec3.sum(MyAvatar.position, {
x: 0,
y: 0.5,
z: 0
}), Vec3.multiply(1, Quat.getFront(Camera.getOrientation())));
Script.include(utilsPath);
Script.include(fishTankPath);
Script.include(tiltMazePath);
Script.include(whiteboardPath);
Script.include(plantPath);
// var fishTank = new FishTank({
// x: 1098.9254,
// y: 460.5814,
// z: -79.1103
// }, {
// x: 0,
// y: 152,
// z: 0
// });
// var tiltMaze = new TiltMaze({
// x: 1105.5768,
// y: 460.3298,
// z: -80.4891
// });
// var whiteboard = new Whiteboard({
// x: 1104,
// y: 450,
// z: -77
// });
// var myPlant = new Plant(center);
var tiltMaze = new TiltMaze({
x: 1105.5768,
y: 460.3298,
z: -80.4891
});
// dynamicEntities.push(fishTank);
// dynamicEntities.push(tiltMaze);
// dynamicEntities.push(whiteboard);
//dynamicEntities.push(myPlant);
var whiteboard = new Whiteboard({
x: 1104,
y: 460.5,
z: -77
}, {
x: 0,
y: -133,
z: 0
});
var myPlant = new Plant({
x: 1099.8785,
y: 460.3115,
z: -84.7736
});
var pingPongGun = new _PingPongGun({
x: 1101.2123,
y: 460.2328,
z: -65.8513
}, {
x: 97.3683,
y: 179.0293,
z: 89.9698
});
//v2.0
// var musicBox = new MusicBox();
// var cuckooClock = new CuckooClock();
// var doppelganger = new Doppelganger();
//var pingPongGun = new PingPongGun({
// x:1101.2123, y:460.2328, z:-65.8513
// });
//dynamicEntities.push(pingPongGun);
},
cleanupDynamicEntities: function() {
if (dynamicEntities.length === 0) {
return;
}
dynamicEntities.forEach(function(dynamicEntity) {
dynamicEntity.cleanup();
})
},
createKineticEntities: function() {
var center = Vec3.sum(Vec3.sum(MyAvatar.position, {
x: 0,
y: 0.5,
z: 0
}), Vec3.multiply(1, Quat.getFront(Camera.getOrientation())));
// var fruitBowl = new FruitBowl();
// var fruitBowl = new FruitBowl({
// x: 1105.3185,
// y: 460.3221,
// z: 81.1803
// });
var fruitBowl = new FruitBowl({
x: 1105.3185,
y: 460.3221,
z: -81.2452
});
var livingRoomLamp = new LivingRoomLamp({
x: 1104.6732,
y: 460.3326,
z: 81.9710
z: -81.9710
});
var upperBookShelf = new UpperBookshelf({
var upperBookShelf = new UpperBookShelf({
x: 1106.2649,
y: 461.5352,
z: -80.3018
@ -182,8 +188,8 @@
z: -80.2837
});
var rightDeskDrawer= new RightDeskDrawer({
x:1105.1735,
var rightDeskDrawer = new RightDeskDrawer({
x: 1105.1735,
y: 460.0446,
z: -81.3612
});
@ -194,39 +200,53 @@
z: -82.1095
});
// var chair = new Chair({
// x: 1105.2716,
// y: 459.7251,
// z: 79.8097
// });
// var trashcan = new Trashcan({
// x: 1104.0031,
// y: 459.4355,
// z: -82.7294
// });
// var books = new Books({
// x: 1101.2123,
// y: 460.2328,
// z: -65.8513
// });
var chair = new Chair({
x: 1105.2716,
y: 459.7251,
z: -79.8097
});
var trashcan = new Trashcan({
x: 1103.9034,
y: 459.4355,
z: -82.3619
});
var books = new Books({
x: 1106.1553,
y: 461.1,
z: -80.4890
});
// kineticEntities.push(fruitBowl);
// kineticEntities.push(livingRoomLamp);
kineticEntities.push(upperBookShelf);
kineticEntities.push(lowerBookShelf);
kineticEntities.push(rightDeskDrawer);
kineticEntities.push(leftDeskDrawer);
// kineticEntities.push(chair);
// kineticEntities.push(trashcan);
// kineticEntities.push(books);
},
cleanupKineticEntities: function() {
if (kineticEntities.length === 0) {
return;
}
kineticEntities.forEach(function(kineticEntity) {
kineticEntity.cleanup();
findAndDeleteHomeEntities: function() {
print('JBP trying to find home entities to delete')
var resetProperties = Entities.getEntityProperties(_this.entityID);
var results = Entities.findEntities(resetProperties.position, 1000);
var found = [];
results.forEach(function(result) {
var properties = Entities.getEntityProperties(result);
var userData = null;
try {
userData = JSON.parse(properties.userData);
} catch (err) {
// print('error parsing json');
// print('properties are:' + properties.userData);
return;
}
if (userData.hasOwnProperty('hifiHomeKey')) {
if (userData.hifiHomeKey.reset === true) {
Entities.deleteEntity(result);
}
}
})
print('JBP after deleting home entities')
},
unload: function() {
this.findAndDeleteHomeEntities();
}
}

View file

@ -13,7 +13,7 @@
(function() {
Script.include('../utils.js');
// Script.include('../utils.js');
var SCALE = 0.5;
var VICTORY_SOUND;
@ -96,7 +96,7 @@
if (this.ballLocked === true) {
return;
}
if(this.ball!==null){
if (this.ball !== null) {
Entities.deleteEntity(this.ball);
}
@ -113,7 +113,12 @@
gravity: BALL_GRAVITY,
density: BALL_DENSITY,
color: BALL_COLOR,
dimensions: BALL_DIMENSIONS
dimensions: BALL_DIMENSIONS,
userData: JSON.stringify({
'hifiHomeKey': {
'reset': true
}
}),
};
this.ball = Entities.addEntity(properties);
@ -197,7 +202,7 @@
_this.ballLocked = false;
_this.createBall();
}, 1500)
}
}
},
playVictorySound: function() {
var position = Entities.getEntityProperties(this.entityID, "position").position;

View file

@ -83,9 +83,9 @@ TiltMaze = function(spawnPosition, spawnRotation) {
var MAZE_DAMPING = 0.6;
var MAZE_ANGULAR_DAMPING = 0.6;
var MAZE_GRAVITY = {
x:0,
y:-3,
z:0
x: 0,
y: -3,
z: 0
};
var DETECTOR_VERTICAL_OFFSET = 0.0 * SCALE;
@ -154,6 +154,9 @@ TiltMaze = function(spawnPosition, spawnRotation) {
color: BALL_COLOR,
dimensions: BALL_DIMENSIONS,
userData: JSON.stringify({
'hifiHomeKey': {
'reset': true
},
grabbableKey: {
grabbable: false
}
@ -175,6 +178,11 @@ TiltMaze = function(spawnPosition, spawnRotation) {
position: getBallStartLocation(),
collisionless: true,
visible: false,
userData: JSON.stringify({
'hifiHomeKey': {
'reset': true
}
}),
};
ballSpawningAnchor = Entities.addEntity(properties);
@ -194,6 +202,12 @@ TiltMaze = function(spawnPosition, spawnRotation) {
collisionless: true,
dynamic: false,
visible: false,
userData: JSON.stringify({
'hifiHomeKey': {
'reset': true
}
}),
};
ballDetector = Entities.addEntity(properties);
@ -205,7 +219,7 @@ TiltMaze = function(spawnPosition, spawnRotation) {
name: 'Hifi Tilt Maze',
type: 'Model',
modelURL: MAZE_MODEL_URL,
gravity:MAZE_GRAVITY,
gravity: MAZE_GRAVITY,
compoundShapeURL: MAZE_COLLISION_HULL,
dimensions: MAZE_DIMENSIONS,
position: position,
@ -214,7 +228,12 @@ TiltMaze = function(spawnPosition, spawnRotation) {
angularDamping: MAZE_ANGULAR_DAMPING,
dynamic: true,
density: MAZE_DENSITY,
script: MAZE_SCRIPT
script: MAZE_SCRIPT,
userData: JSON.stringify({
'hifiHomeKey': {
'reset': true
}
}),
}
if (spawnRotation !== undefined) {
@ -246,7 +265,12 @@ TiltMaze = function(spawnPosition, spawnRotation) {
cutoff: END_LIGHT_CUTOFF,
lifetime: -1,
position: position,
rotation: emitOrientation
rotation: emitOrientation,
userData: JSON.stringify({
'hifiHomeKey': {
'reset': true
}
}),
};
lightAtTheEnd = Entities.addEntity(lightProperties);
@ -260,6 +284,9 @@ TiltMaze = function(spawnPosition, spawnRotation) {
createLightAtTheEnd();
Entities.editEntity(tiltMaze, {
userData: JSON.stringify({
'hifiHomeKey': {
'reset': true
},
tiltMaze: {
firstBall: ball,
ballSpawner: ballSpawningAnchor,
@ -273,6 +300,7 @@ TiltMaze = function(spawnPosition, spawnRotation) {
createAll();
function cleanup() {
print('MAZE CLEANUP')
Entities.deleteEntity(tiltMaze);
Entities.deleteEntity(ball);
Entities.deleteEntity(ballSpawningAnchor);
@ -280,5 +308,6 @@ TiltMaze = function(spawnPosition, spawnRotation) {
}
this.cleanup = cleanup;
print('CREATED TILTMAZE')
}

View file

@ -142,6 +142,11 @@
textures: _this.MARKER_TEXTURE_URL,
color: _this.markerColor,
lifetime: 5000,
userData: JSON.stringify({
'hifiHomeKey': {
'reset': true
}
}),
});
_this.linePoints = [];

View file

@ -16,24 +16,11 @@ var MARKER_SCRIPT_URL = Script.resolvePath("markerEntityScript.js?" + Math.rando
Whiteboard = function(spawnPosition, spawnRotation) {
var orientation = MyAvatar.orientation;
orientation = Quat.safeEulerAngles(orientation);
var markerRotation = Quat.fromVec3Degrees({
x: orientation.x + 10,
y: orientation.y - 90,
z: orientation.z
})
orientation.x = 0;
var whiteboardRotation = Quat.fromVec3Degrees({
x: 0,
y: orientation.y,
z: 0
});
orientation = Quat.fromVec3Degrees(orientation);
var orientation = Quat.fromPitchYawRollDegrees(spawnRotation.x, spawnRotation.y, spawnRotation.z);
var markers = [];
var whiteboardPosition = Vec3.sum(MyAvatar.position, Vec3.multiply(2, Quat.getFront(orientation)));
var markerRotation = orientation;
var whiteboardPosition = spawnPosition;
var whiteboardRotation = orientation;
var WHITEBOARD_MODEL_URL = "https://s3-us-west-1.amazonaws.com/hifi-content/eric/models/Whiteboard-4.fbx";
var WHITEBOARD_COLLISION_HULL_URL = "https://s3-us-west-1.amazonaws.com/hifi-content/eric/models/whiteboardCollisionHull.obj";
var whiteboard = Entities.addEntity({
@ -49,9 +36,14 @@ Whiteboard = function(spawnPosition, spawnRotation) {
y: 2.7,
z: 0.4636
},
userData: JSON.stringify({
'hifiHomeKey': {
'reset': true
}
}),
});
print('whiteboard:' + whiteboard)
var whiteboardSurfacePosition = Vec3.sum(whiteboardPosition, {
x: 0.0,
@ -77,7 +69,12 @@ Whiteboard = function(spawnPosition, spawnRotation) {
position: whiteboardFrontSurfacePosition,
rotation: whiteboardRotation,
visible: false,
parentID: whiteboard
parentID: whiteboard,
userData: JSON.stringify({
'hifiHomeKey': {
'reset': true
}
}),
}
var whiteboardFrontDrawingSurface = Entities.addEntity(whiteboardSurfaceSettings);
@ -92,7 +89,7 @@ Whiteboard = function(spawnPosition, spawnRotation) {
var ERASER_MODEL_URL = "http://hifi-content.s3.amazonaws.com/alan/dev/eraser-2.fbx";
var eraserPosition = Vec3.sum(MyAvatar.position, Vec3.multiply(WHITEBOARD_RACK_DEPTH, Quat.getFront(whiteboardRotation)));
var eraserPosition = Vec3.sum(spawnPosition, Vec3.multiply(WHITEBOARD_RACK_DEPTH, Quat.getFront(whiteboardRotation)));
eraserPosition = Vec3.sum(eraserPosition, Vec3.multiply(-0.5, Quat.getRight(whiteboardRotation)));
var eraserRotation = markerRotation;
@ -120,6 +117,9 @@ Whiteboard = function(spawnPosition, spawnRotation) {
z: 0
},
userData: JSON.stringify({
'hifiHomeKey': {
'reset': true
},
originalPosition: eraserPosition,
originalRotation: eraserRotation,
wearable: {
@ -158,7 +158,7 @@ Whiteboard = function(spawnPosition, spawnRotation) {
"https://s3-us-west-1.amazonaws.com/hifi-content/eric/models/marker-black.fbx",
];
var markerPosition = Vec3.sum(MyAvatar.position, Vec3.multiply(WHITEBOARD_RACK_DEPTH, Quat.getFront(orientation)));
var markerPosition = Vec3.sum(spawnPosition, Vec3.multiply(WHITEBOARD_RACK_DEPTH, Quat.getFront(orientation)));
createMarker(modelURLS[0], markerPosition, {
red: 10,
@ -209,6 +209,9 @@ Whiteboard = function(spawnPosition, spawnRotation) {
name: "marker",
script: MARKER_SCRIPT_URL,
userData: JSON.stringify({
'hifiHomeKey': {
'reset': true
},
originalPosition: markerPosition,
originalRotation: markerRotation,
markerColor: markerColor,
@ -244,6 +247,7 @@ Whiteboard = function(spawnPosition, spawnRotation) {
}
function cleanup() {
print('WHITEBOARD CLEANUP')
Entities.deleteEntity(whiteboard);
Entities.deleteEntity(whiteboardFrontDrawingSurface);
Entities.deleteEntity(whiteboardBackDrawingSurface);
@ -254,4 +258,6 @@ Whiteboard = function(spawnPosition, spawnRotation) {
}
this.cleanup = cleanup;
print('CREATED WHITEBOARD')
}