content/hifi-content/lincoln/drum/js/SnareScript.js
2022-02-14 02:04:11 +01:00

34 lines
No EOL
685 B
JavaScript

(function() {
var _this;
var animationProperties = {
"url":"https://hifi-content.s3.amazonaws.com/lincoln/drum/snare-3-anim.fbx",
"fps":30,
"currentFrame":0,
"running":true,
"loop":false,
"firstFrame":0,
"lastFrame":10,
"hold":0
};
var Snare = function() {
_this = this;
}
Snare.prototype = {
entityID: null,
preload: function() {
print("snare script loaded")
},
clickReleaseOnEntity: function(entityID, mouseEvent) {
if(mouseEvent.isLeftButton) {
Entities.editEntity(_this.entityID, {
animation: animationProperties
})
}
}
}
return new Snare();
})