I want to remove a piece of code inside a .tick handler in AFRAME using js.
This is what I have:
AFRAME.registerComponent('foo', {
schema: {},
init: function () {},
update: function () {},
tick: function() {
myObject.position.y += 0.009;//this is what I want to remove on the fly
},
remove: function () {},
pause: function () {},
play: function () {}
});
I expect to trigger the add or removal of that piece of code on the fly using js.