passing whiteboard in to marker

This commit is contained in:
ericrius1 2016-02-19 10:38:13 -08:00
parent 6765973a4a
commit 8e9cd3ae2a
2 changed files with 12 additions and 0 deletions

View file

@ -43,12 +43,20 @@
if (intersection.intersects) {
var name = Entities.getEntityProperties(intersection.entityID);
this.paint()
}
},
preload: function(entityID) {
this.entityID = entityID;
print("EBL PRELOAD");
},
setWhiteboard: function(myId, data) {
_this.whiteboard = JSON.parse(data[0]);
var props = Entities.getEntityProperties(_this.whiteboard, ["rotation"]);
Entities.editEntity(_this.whiteboard, {position: {x: 0, y: 1, z: 0}});
}
};

View file

@ -94,6 +94,10 @@ var marker = Entities.addEntity({
})
});
Script.setTimeout(function() {
Entities.callEntityMethod(marker, "setWhiteboard", [JSON.stringify(whiteboard)]);
}, 1000)
function cleanup() {