content/hifi-content/liv/3DModels/SantaHat.js
2022-02-14 02:04:11 +01:00

23 lines
No EOL
551 B
JavaScript

(function(){
var snowEffectEntity;
var isSnowFalling = false;
var SantaHat = function() {
};
var LetItSnow = function() {
isSnowFalling = !isSnowFalling;
Entities.editEntity(snowEffectEntity, {"isEmitting" : isSnowFalling});
};
SantaHat.prototype = {
preload : function(entityID) {
snowEffectEntity = Entities.getChildrenIDs(entityID)[0];
},
clickDownOnEntity: function() {
LetItSnow();
}
};
return new SantaHat();
})