|
@@ -138,8 +138,62 @@ define(["module", "vwf/view"], function (module, view) {
|
|
|
|
|
|
lerpTick ();
|
|
|
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
+ gotProperty: function (nodeId, propertyName, propertyValue) {
|
|
|
+ var selfs = this;
|
|
|
+
|
|
|
+ var node = this.state.nodes[nodeId];
|
|
|
+
|
|
|
+ if (!(node && node.aframeObj)) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ // if (this.nodes[nodeId].extends == "http://vwf.example.com/aframe/a-sound-component.vwf"){
|
|
|
+ // if (propertyName == "currentTime"){
|
|
|
+ // console.log(node.aframeObj.el.components.sound.listener.context.currentTime);
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+
|
|
|
+ },
|
|
|
+
|
|
|
+ calledMethod: function( nodeID, methodName, methodParameters, methodValue ) {
|
|
|
+
|
|
|
+ var node = this.state.nodes[nodeID];
|
|
|
+
|
|
|
+ if (!(node && node.aframeObj)) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ if (this.nodes[nodeID].extends == "http://vwf.example.com/aframe/a-sound-component.vwf"){
|
|
|
+ if (methodName == "stopSound"){
|
|
|
+
|
|
|
+ console.log("stop sound");
|
|
|
+ node.aframeObj.el.components.sound.stopSound();
|
|
|
+ //node.aframeObj.stopSound();
|
|
|
+ }
|
|
|
+
|
|
|
+ if (methodName == "playSound"){
|
|
|
+
|
|
|
+ console.log("play sound");
|
|
|
+ node.aframeObj.el.components.sound.playSound();
|
|
|
+ //node.aframeObj.stopSound();
|
|
|
+ }
|
|
|
+
|
|
|
+ if (methodName == "pauseSound"){
|
|
|
+
|
|
|
+ console.log("pause sound");
|
|
|
+ node.aframeObj.el.components.sound.pauseSound();
|
|
|
+ //node.aframeObj.stopSound();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
+
|
|
|
});
|
|
|
|
|
|
function lerpTick () {
|