You either need to create a reference or wrap the function call in another function like so:
mainFunc: function(x) {
anim.update(x);
anim.redraw(x);
window.requestAnimationFrame(function() {
anim.mainFunc(x);
});
}
More Related Contents:
- Controlling fps with requestAnimationFrame?
- Exact time of display: requestAnimationFrame usage and timeline
- Calculate FPS in Canvas using requestAnimationFrame
- requestAnimationFrame garbage collection
- How to use requestAnimationFrame?
- Asynchronous Process inside a javascript for loop [duplicate]
- Use JavaScript to place cursor at end of text in text input element
- How to disable HTML links
- Converting user input string to regular expression
- What is the cleanest way to get the progress of JQuery ajax request?
- ECMAScript 6 features available in Node.js 0.12
- Return positions of a regex match() in Javascript?
- How to force reloading a page when using browser back button?
- ES6: Conditional & Dynamic Import Statements
- TypeError: Router.use() requires middleware function but got a Object
- How to fix the error; ‘Error: Bootstrap tooltips require Tether (http://github.hubspot.com/tether/)’
- Check if user has a third party Chrome extension installed
- AngularJS abort all pending $http requests on route change
- Javascript onHover event
- Javascript to check whether a checkbox is being checked or unchecked
- Lazy getter doesn’t work in classes
- URL encode sees “&” (ampersand) as “&” HTML entity
- Populate nested object from array?
- When passing variable to function I get ‘Invalid argument’, but when I hard code it works in Apps Script
- Chrome violation : [Violation] Handler took 83ms of runtime
- multiple pages in Vue.js CLI
- Function is not defined – Uncaught ReferenceError
- Using Crypto-JS in Google Apps Script – What is C.lib?
- Error: Cannot find module ‘../lib/cli’
- Using non-ASCII character as JavaScript object key [duplicate]