{ "extends": "proxy/aframe/ascene.vwf", "properties": { "transparent": true }, "methods": { "initialize": { "body": " this.globalTransport.init();\n console.log(\"INIT TRANSPORT!!!\");\n", "type": "application/javascript" } }, "children": { "assetBG": { "extends": "proxy/aframe/a-asset-image-item.vwf", "properties": { "itemID": "bg", "itemSrc": "/defaults/assets/bg.jpg" } }, "assetSky": { "extends": "proxy/aframe/a-asset-image-item.vwf", "properties": { "itemID": "sky", "itemSrc": "/defaults/assets/skyes/sky3.jpg" } }, "assetBG2": { "extends": "proxy/aframe/a-asset-image-item.vwf", "properties": { "itemID": "bg2", "itemSrc": "/defaults/assets/checker.jpg" } }, "myLight": { "extends": "proxy/aframe/alight.vwf", "properties": { "type": "spot", "position": [ -2.5, 1, 1.5 ], "rotation": [ 0, -40, 0 ] } }, "myLight2": { "extends": "proxy/aframe/alight.vwf", "properties": { "type": "spot", "position": [ 2, 1.7999999523162842, 6.5 ], "rotation": [ 25, 25, -40 ] } }, "spaceText": { "extends": "proxy/aframe/atext.vwf", "properties": { "value": "Collaborative Orchestra", "color": "#ddd", "position": [ -2, 2.5, -2 ] } }, "spaceText2": { "extends": "proxy/aframe/atext.vwf", "properties": { "value": "Project by LiveCoding.space", "color": "#aaa", "position": [ 1, 3, -4 ] } }, "globalTransport": { "extends": "proxy/aframe/transport.vwf", "properties": { "position": [ 2, 2, -3 ], "beat": 0, "animationLoop": true, "animationDuration": 1, "animationDurationSIM": 1, "animationRate": 1, "animationTPS": 30 }, "children": { "vis": { "extends": "proxy/aframe/abox.vwf", "properties": { "height": "0.3", "width": "0.3", "depth": "0.3", "class": "clickable" }, "methods": { "clickEventMethod": { "body": " if (this.parent.animationPlaying) {\n this.parent.stop();\n } else {\n this.parent.play();\n }\n", "type": "application/javascript" } }, "children": { "material": { "extends": "proxy/aframe/aMaterialComponent.vwf", "type": "component", "properties": { "color": "red" } }, "cursor-listener": { "extends": "proxy/aframe/app-cursor-listener-component.vwf", "type": "component" } } } } }, "bdrum": { "extends": "proxy/aframe/abox.vwf", "properties": { "position": [ 0, 0, -3 ], "rotation": [ 0, 0, 0 ], "depth": "1", "height": "1", "width": "1", "class": "hit clickable", "globalBeat": true }, "methods": { "changeVisual": { "body": " this.material.color = \"white\";\n this.scale = \"1.1 1.1 1.1\";\n this.future(0.1).resetVisual();\n", "type": "application/javascript" }, "resetVisual": { "body": " this.material.color = \"red\";\n this.scale = \"1 1 1\";\n", "type": "application/javascript" }, "onGlobalBeat": { "parameters": [ "obj" ], "body": " let transportNode = this.find('//' + obj.name)[0];\n let rate = transportNode.animationRate; // 1 by default\n let drumSeq = [\n {beat:0, msg: 0},\n {beat:15, msg: 0}\n ];\n drumSeq.forEach(el=>{\n if(el.beat/rate == obj.beat){\n let msg = {\n address: \"/trigger/sample01\",\n args: [this.time, 'bd_haus', 2]\n };\n this.sendOSC(msg); \n this.changeVisual();\n }\n })\n", "type": "application/javascript" }, "hitstartEventMethod": { "body": " this.material.opacity = 0.7\n", "type": "application/javascript" }, "hitendEventMethod": { "body": " this.material.opacity = 1.0\n", "type": "application/javascript" }, "clickEventMethod": { "body": " this.globalBeat = !this.globalBeat\n", "type": "application/javascript" } }, "children": { "aabb-collider-listener": { "extends": "proxy/aframe/app-aabb-collider-listener-component.vwf", "type": "component" }, "cursor-listener": { "extends": "proxy/aframe/app-cursor-listener-component.vwf", "type": "component" }, "material": { "extends": "proxy/aframe/aMaterialComponent.vwf", "properties": { "color": "red" } } } }, "hatt": { "extends": "proxy/aframe/acone.vwf", "properties": { "position": [ -2, 0, -3 ], "rotation": [ 0, 0, 0 ], "radius": 0.5, "height": "1", "class": "hit clickable", "globalBeat": true }, "methods": { "changeVisual": { "body": " this.material.color = \"white\";\n this.scale = \"1.1 1.1 1.1\";\n this.future(0.1).resetVisual();\n", "type": "application/javascript" }, "resetVisual": { "body": " this.material.color = \"blue\";\n this.scale = \"1 1 1\";\n", "type": "application/javascript" }, "onGlobalBeat": { "parameters": [ "obj" ], "body": " let transportNode = this.find('//' + obj.name)[0];\n let rate = transportNode.animationRate; // 1 by default\n let drumSeq = [\n {beat:10, msg: 0},\n {beat:20, msg: 0}\n ];\n drumSeq.forEach(el=>{\n if(el.beat/rate == obj.beat){\n let msg = {\n address: \"/trigger/sample02\",\n args: [this.time, 'bass_hit_c', 1]\n };\n this.sendOSC(msg); \n this.changeVisual();\n }\n })\n", "type": "application/javascript" }, "hitstartEventMethod": { "body": " this.material.opacity = 0.7\n", "type": "application/javascript" }, "hitendEventMethod": { "body": " this.material.opacity = 1.0\n", "type": "application/javascript" }, "clickEventMethod": { "body": " this.globalBeat = !this.globalBeat\n", "type": "application/javascript" } }, "children": { "aabb-collider-listener": { "extends": "proxy/aframe/app-aabb-collider-listener-component.vwf", "type": "component" }, "cursor-listener": { "extends": "proxy/aframe/app-cursor-listener-component.vwf", "type": "component" }, "material": { "extends": "proxy/aframe/aMaterialComponent.vwf", "properties": { "color": "red" } } } }, "synth": { "extends": "proxy/aframe/asphere.vwf", "properties": { "position": [ 2, 0, -3 ], "rotation": [ 0, 0, 0 ], "radius": "0.5", "class": "hit clickable", "globalBeat": true }, "methods": { "changeVisual": { "body": " this.material.color = \"white\";\n this.scale = \"1.1 1.1 1.1\";\n this.future(0.1).resetVisual();\n", "type": "application/javascript" }, "resetVisual": { "body": " this.material.color = \"green\";\n this.scale = \"1 1 1\";\n", "type": "application/javascript" }, "onGlobalBeat": { "parameters": [ "obj" ], "body": " let transportNode = this.find('//' + obj.name)[0];\n let rate = transportNode.animationRate; // 1 by default\n let drumSeq = [\n {beat:0, msg: \"C3\"},\n {beat:5, msg: \"D3\"},\n {beat:10, msg: \"E3\"},\n {beat:15, msg: \"G3\"},\n {beat:20, msg: \"A3\"},\n {beat:25, msg: \"B3\"}\n ];\n drumSeq.forEach(el=>{\n if(el.beat/rate == obj.beat){\n let msg = {\n address: \"/trigger/synth01\",\n args: [this.time, 'pluck', el.msg, 0.1, 0.01, 0.6]\n };\n this.sendOSC(msg); \n this.changeVisual();\n }\n })\n", "type": "application/javascript" }, "hitstartEventMethod": { "body": " this.material.opacity = 0.7\n", "type": "application/javascript" }, "hitendEventMethod": { "body": " this.material.opacity = 1.0\n", "type": "application/javascript" }, "clickEventMethod": { "body": " this.globalBeat = !this.globalBeat\n", "type": "application/javascript" } }, "children": { "aabb-collider-listener": { "extends": "proxy/aframe/app-aabb-collider-listener-component.vwf", "type": "component" }, "cursor-listener": { "extends": "proxy/aframe/app-cursor-listener-component.vwf", "type": "component" }, "material": { "extends": "proxy/aframe/aMaterialComponent.vwf", "properties": { "color": "#e0e014", "wireframe": true } } } }, "sky": { "extends": "proxy/aframe/asky.vwf", "children": { "material": { "extends": "proxy/aframe/aMaterialComponent.vwf", "properties": { "src": "#sky", "side": "back", "fog": false, "shader": "flat" } } } }, "groundPlane": { "extends": "proxy/aframe/aplane.vwf", "properties": { "height": "50", "width": "50", "rotation": [ -90, 0, 0 ] }, "children": { "material": { "extends": "proxy/aframe/aMaterialComponent.vwf", "properties": { "repeat": "10 10", "color": "white", "src": "#bg2" } }, "shadow": { "extends": "proxy/aframe/shadowComponent.vwf", "properties": { "receive": true } } } } } }