From 01938896905764f87cd74e1c428037b21108a4a3 Mon Sep 17 00:00:00 2001 From: "James B. Pollack" Date: Wed, 16 Mar 2016 17:49:20 -0700 Subject: [PATCH] line endings --- .../Home/kineticObjects/books.json | 248 ++++++++++++++++ .../Home/kineticObjects/chair.json | 36 +++ .../Home/kineticObjects/fruit.json | 277 ++++++++++++++++++ .../Home/kineticObjects/labLamp.json | 36 +++ .../Home/kineticObjects/leftDeskDrawer.json | 36 +++ .../Home/kineticObjects/livingRoomLamp.json | 36 +++ .../Home/kineticObjects/lowerBookShelf.json | 33 +++ .../Home/kineticObjects/rightDeskDrawer.json | 36 +++ .../Home/kineticObjects/trashcan.json | 38 +++ .../Home/kineticObjects/upperBookShelf.json | 33 +++ .../Home/kineticObjects/wrapper.js | 247 +++++++++++++++- .../DomainContent/Home/reset.js | 94 ++++-- 12 files changed, 1105 insertions(+), 45 deletions(-) create mode 100644 unpublishedScripts/DomainContent/Home/kineticObjects/books.json create mode 100644 unpublishedScripts/DomainContent/Home/kineticObjects/chair.json create mode 100644 unpublishedScripts/DomainContent/Home/kineticObjects/fruit.json create mode 100644 unpublishedScripts/DomainContent/Home/kineticObjects/labLamp.json create mode 100644 unpublishedScripts/DomainContent/Home/kineticObjects/leftDeskDrawer.json create mode 100644 unpublishedScripts/DomainContent/Home/kineticObjects/livingRoomLamp.json create mode 100644 unpublishedScripts/DomainContent/Home/kineticObjects/lowerBookShelf.json create mode 100644 unpublishedScripts/DomainContent/Home/kineticObjects/rightDeskDrawer.json create mode 100644 unpublishedScripts/DomainContent/Home/kineticObjects/trashcan.json create mode 100644 unpublishedScripts/DomainContent/Home/kineticObjects/upperBookShelf.json diff --git a/unpublishedScripts/DomainContent/Home/kineticObjects/books.json b/unpublishedScripts/DomainContent/Home/kineticObjects/books.json new file mode 100644 index 0000000000..bda225a8d8 --- /dev/null +++ b/unpublishedScripts/DomainContent/Home/kineticObjects/books.json @@ -0,0 +1,248 @@ +{ + "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" + }, + { + "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" + }, + { + "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" + }, + { + "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" + }, + { + "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" + }, + { + "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" + }, + { + "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" + }, + { + "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" + } + ], + "Version": 57 +} diff --git a/unpublishedScripts/DomainContent/Home/kineticObjects/chair.json b/unpublishedScripts/DomainContent/Home/kineticObjects/chair.json new file mode 100644 index 0000000000..573537bfe5 --- /dev/null +++ b/unpublishedScripts/DomainContent/Home/kineticObjects/chair.json @@ -0,0 +1,36 @@ +{ + "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": "{}" + } + ], + "Version": 57 +} diff --git a/unpublishedScripts/DomainContent/Home/kineticObjects/fruit.json b/unpublishedScripts/DomainContent/Home/kineticObjects/fruit.json new file mode 100644 index 0000000000..7f7a409efb --- /dev/null +++ b/unpublishedScripts/DomainContent/Home/kineticObjects/fruit.json @@ -0,0 +1,277 @@ +{ + "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": "{}" + }, + { + "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": "{}" + }, + { + "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}}" + }, + { + "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": "{}" + }, + { + "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}}" + }, + { + "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": "{}" + }, + { + "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}}" + } + ], + "Version": 57 +} diff --git a/unpublishedScripts/DomainContent/Home/kineticObjects/labLamp.json b/unpublishedScripts/DomainContent/Home/kineticObjects/labLamp.json new file mode 100644 index 0000000000..42b613412e --- /dev/null +++ b/unpublishedScripts/DomainContent/Home/kineticObjects/labLamp.json @@ -0,0 +1,36 @@ +{ + "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}}" + } + ], + "Version": 57 +} diff --git a/unpublishedScripts/DomainContent/Home/kineticObjects/leftDeskDrawer.json b/unpublishedScripts/DomainContent/Home/kineticObjects/leftDeskDrawer.json new file mode 100644 index 0000000000..3e1b603b51 --- /dev/null +++ b/unpublishedScripts/DomainContent/Home/kineticObjects/leftDeskDrawer.json @@ -0,0 +1,36 @@ +{ + "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": "{}" + } + ], + "Version": 57 +} diff --git a/unpublishedScripts/DomainContent/Home/kineticObjects/livingRoomLamp.json b/unpublishedScripts/DomainContent/Home/kineticObjects/livingRoomLamp.json new file mode 100644 index 0000000000..b4ff729f54 --- /dev/null +++ b/unpublishedScripts/DomainContent/Home/kineticObjects/livingRoomLamp.json @@ -0,0 +1,36 @@ +{ + "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}}" + } + ], + "Version": 57 +} diff --git a/unpublishedScripts/DomainContent/Home/kineticObjects/lowerBookShelf.json b/unpublishedScripts/DomainContent/Home/kineticObjects/lowerBookShelf.json new file mode 100644 index 0000000000..3e2bb45e7f --- /dev/null +++ b/unpublishedScripts/DomainContent/Home/kineticObjects/lowerBookShelf.json @@ -0,0 +1,33 @@ +{ + "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": "{}" + } + ], + "Version": 57 +} diff --git a/unpublishedScripts/DomainContent/Home/kineticObjects/rightDeskDrawer.json b/unpublishedScripts/DomainContent/Home/kineticObjects/rightDeskDrawer.json new file mode 100644 index 0000000000..23a7b9c77e --- /dev/null +++ b/unpublishedScripts/DomainContent/Home/kineticObjects/rightDeskDrawer.json @@ -0,0 +1,36 @@ +{ + "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": "{}" + } + ], + "Version": 57 +} diff --git a/unpublishedScripts/DomainContent/Home/kineticObjects/trashcan.json b/unpublishedScripts/DomainContent/Home/kineticObjects/trashcan.json new file mode 100644 index 0000000000..03785ce8e1 --- /dev/null +++ b/unpublishedScripts/DomainContent/Home/kineticObjects/trashcan.json @@ -0,0 +1,38 @@ +{ + "Entities": [ + { + "collisionsWillMove": 1, + "compoundShapeURL": "http://hifi-content.s3.amazonaws.com/alan/dev/Trash-Can-4.obj", + "created": "2016-03-15T23:06:41Z", + "dimensions": { + "x": 0.4264354407787323, + "y": 0.50489801168441772, + "z": 0.42643532156944275 + }, + "dynamic": 1, + "gravity": { + "x": 0, + "y": -5, + "z": 0 + }, + "id": "{e9693784-4264-4dd5-baa7-fd165b2645c8}", + "modelURL": "http://hifi-content.s3.amazonaws.com/alan/dev/Trach-Can-3.fbx", + "queryAACube": { + "scale": 0.78652161359786987, + "x": -0.39326080679893494, + "y": -0.39326080679893494, + "z": -0.39326080679893494 + }, + "rotation": { + "w": -0.46858930587768555, + "x": 7.62939453125e-05, + "y": 0.88342106342315674, + "z": -4.57763671875e-05 + }, + "shapeType": "compound", + "type": "Model", + "userData": "{}" + } + ], + "Version": 57 +} diff --git a/unpublishedScripts/DomainContent/Home/kineticObjects/upperBookShelf.json b/unpublishedScripts/DomainContent/Home/kineticObjects/upperBookShelf.json new file mode 100644 index 0000000000..3d2f56da7a --- /dev/null +++ b/unpublishedScripts/DomainContent/Home/kineticObjects/upperBookShelf.json @@ -0,0 +1,33 @@ +{ + "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": "{}" + } + ], + "Version": 57 +} diff --git a/unpublishedScripts/DomainContent/Home/kineticObjects/wrapper.js b/unpublishedScripts/DomainContent/Home/kineticObjects/wrapper.js index a6da7b3877..aa2e63e13c 100644 --- a/unpublishedScripts/DomainContent/Home/kineticObjects/wrapper.js +++ b/unpublishedScripts/DomainContent/Home/kineticObjects/wrapper.js @@ -1,35 +1,250 @@ -var fruitBowl, livingRoomLamp, labLamp, upperBookshelf, lowerBookshelf, chair, trash can, book; +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' FruitBowl = function(spawnLocation, spawnRotation) { + print('CREATE FRUIT BOWL') + var created = []; + + function create() { + var success = Clipboard.importEntities(FRUIT_BOWL_URL); + if (success === true) { + hasBow = true; + created = Clipboard.pasteEntities(spawnLocation) + print('created ' + created); + } + }; + + function cleanup() { + created.forEach(function(obj) { + Entities.deleteEntity(obj); + }) + }; + + create(); + + this.cleanup = cleanup; } LabLamp = function(spawnLocation, spawnRotation) { + var created = []; + function create() { + var success = Clipboard.importEntities(FRUIT_BOWL_URL); + if (success === true) { + hasBow = true; + created = Clipboard.pasteEntities(spawnLocation) + print('created ' + created); + } + }; + + function cleanup() { + created.forEach(function(obj) { + Entities.deleteEntity(obj); + }) + }; + + create(); + + this.cleanup = cleanup; } LivingRoomLamp = function(spawnLocation, spawnRotation) { + var created = []; + + function create() { + var success = Clipboard.importEntities(FRUIT_BOWL_URL); + if (success === true) { + hasBow = true; + created = Clipboard.pasteEntities(spawnLocation) + print('created ' + created); + } + }; + + function cleanup() { + created.forEach(function(obj) { + Entities.deleteEntity(obj); + }) + }; + + create(); + + this.cleanup = cleanup; +} + +UpperBookShelf = function(spawnLocation, spawnRotation) { + print('CREATE Bookshelves') + var created = []; + + function create() { + var success = Clipboard.importEntities(UPPER_BOOKSHELF_URL); + if (success === true) { + hasBow = true; + created = Clipboard.pasteEntities(spawnLocation) + print('created ' + created); + } + }; + + function cleanup() { + created.forEach(function(obj) { + Entities.deleteEntity(obj); + }) + }; + + create(); + + this.cleanup = cleanup; +} + + +LowerBookShelf = function(spawnLocation, spawnRotation) { + print('CREATE Bookshelves') + var created = []; + + function create() { + var success = Clipboard.importEntities(LOWER_BOOKSHELF_URL); + if (success === true) { + hasBow = true; + created = Clipboard.pasteEntities(spawnLocation) + print('created ' + created); + } + }; + + function cleanup() { + created.forEach(function(obj) { + Entities.deleteEntity(obj); + }) + }; + + create(); + + this.cleanup = cleanup; +} + +RightDeskDrawer = function(spawnLocation, spawnRotation) { + var created = []; + + function create() { + var success = Clipboard.importEntities(RIGHT_DESK_DRAWER_URL); + if (success === true) { + hasBow = true; + created = Clipboard.pasteEntities(spawnLocation) + print('created ' + created); + } + }; + + function cleanup() { + created.forEach(function(obj) { + Entities.deleteEntity(obj); + }) + }; + + create(); + + this.cleanup = cleanup; +} + +LeftDeskDrawer = function(spawnLocation, spawnRotation) { + print('CREATE Bookshelves') + var created = []; + + function create() { + var success = Clipboard.importEntities(LEFT_DESK_DRAWER_URL); + if (success === true) { + hasBow = true; + created = Clipboard.pasteEntities(spawnLocation) + print('created ' + created); + } + }; + + function cleanup() { + created.forEach(function(obj) { + Entities.deleteEntity(obj); + }) + }; + + create(); + + this.cleanup = cleanup; +} + +Chair = function(spawnLocation, spawnRotation) { + var created = []; + + function create() { + var success = Clipboard.importEntities(CHAIR_URL); + if (success === true) { + hasBow = true; + created = Clipboard.pasteEntities(spawnLocation) + print('created ' + created); + } + }; + + function cleanup() { + created.forEach(function(obj) { + Entities.deleteEntity(obj); + }) + }; + + create(); + + this.cleanup = cleanup; +} + +Trashcan = function(spawnLocation, spawnRotation) { + var created = []; + + function create() { + var success = Clipboard.importEntities(TRASHCAN_URL); + if (success === true) { + hasBow = true; + created = Clipboard.pasteEntities(spawnLocation) + print('created ' + created); + } + }; + + function cleanup() { + created.forEach(function(obj) { + Entities.deleteEntity(obj); + }) + }; + + create(); + + this.cleanup = cleanup; } -UpperBookshelf = function(spawnLocation, spawnRotation) { +Books = function(spawnLocation, spawnRotation) { + var created = []; -} + function create() { + var success = Clipboard.importEntities(BOOKS_URL); + if (success === true) { + hasBow = true; + created = Clipboard.pasteEntities(spawnLocation) + print('created ' + created); + } + }; -LowerBookshelf = function(spawnLocation, spawnRotation) { + function cleanup() { + created.forEach(function(obj) { + Entities.deleteEntity(obj); + }) + }; -} + create(); -Chair = function(spawnLocation, spawnRotation){ - -} - -Trashcan = function(){ - - -} - -Books = function(){ - + this.cleanup = cleanup; } \ No newline at end of file diff --git a/unpublishedScripts/DomainContent/Home/reset.js b/unpublishedScripts/DomainContent/Home/reset.js index ead62c3370..369f736a8c 100644 --- a/unpublishedScripts/DomainContent/Home/reset.js +++ b/unpublishedScripts/DomainContent/Home/reset.js @@ -19,7 +19,7 @@ function Reset() { _this = this; - }; + } var utilsPath = Script.resolvePath('utils.js'); @@ -32,6 +32,8 @@ var plantPath = Script.resolvePath("growingPlant/wrapper.js?" + Math.random()); var kineticPath = Script.resolvePath("kineticObjects/wrapper.js?" + Math.random()); + Script.include(kineticPath); + Reset.prototype = { preload: function(entityID) { @@ -72,7 +74,10 @@ _this.tidying = false; }, 2500); _this.cleanupDynamicEntities(); + _this.cleanupKineticEntities(); + _this.createKineticEntities(); _this.createDynamicEntities(); + } }, @@ -145,52 +150,83 @@ }, createKineticEntities: function() { - var fruitBowl = new FruitBowl({ - x: 1105.3185, - y: 460.3221, - z: 81.1803 - }); - //var labLamp = new LabLamp(); + + 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 livingRoomLamp = new LivingRoomLamp({ x: 1104.6732, y: 460.3326, z: 81.9710 }); + var upperBookShelf = new UpperBookshelf({ x: 1106.2649, y: 461.5352, z: -80.3018 }); + var lowerBookShelf = new LowerBookShelf({ x: 1106.2725, y: 460.9600, - z: 80.2837 - }); - 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 + z: -80.2837 }); - kineticEntities.push(fruitBowl); - kineticEntities.push(livingRoomLamp); + var rightDeskDrawer= new RightDeskDrawer({ + x:1105.1735, + y: 460.0446, + z: -81.3612 + }); + + var leftDeskDrawer = new LeftDeskDrawer({ + x: 1104.6478, + y: 460.0463, + z: -82.1095 + }); + + // var chair = new Chair({ + // x: 1105.2716, + // y: 459.7251, + // 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 + // }); + + // kineticEntities.push(fruitBowl); + // kineticEntities.push(livingRoomLamp); kineticEntities.push(upperBookShelf); - kineticEntities.push(chair); - kineticEntities.push(trashcan); - kineticEntities.push(books); + 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(); + }) } }