draw() function of Processing in Javascript
draw() function of Processing in Javascript
是否可以在Javascript中翻译Processing中的自动调用函数draw()?如何在JS中模拟这种行为?
Javascript本身是没有办法的,但如果您下载jQuery(https://jquery.com/)您可以在处理过程中执行与draw函数非常相似的操作。
通过使用类似的代码,你应该能够得到一个非常好的结果:
setInterval(function() {
draw();
}, 1); //So it waits one millisecond untill calling the draw function
function draw() {
//Your code goes in here
}
我希望这对你有用!
相关文章:
- Node.js's Buffer.writeFloatBE in Javascript
- Setting default onclick behavior for <img> tag in gene
- Lucene Search in Alfresco
- grep in JQuery to C#
- write HTML in JavaScript
- jQuery setTimeOut: in for-loop
- SetTimeout and clearTimeout in Javascript
- lightbox in html 5 and javascript
- HTMLInputElement in IE7
- Mongodb$in以与数组中相同的顺序获取结果
- element.dataset in Internet Explorer
- jQuery parent() in table
- Instagram oauth flow in angularjs
- In循环的In运算符前后
- 如何使用for in循环在javascript中显示对象中的对象
- Jquery change onchange in onload
- 重构 jQuery in JS 问题
- strongloop script.js run find in before delete方法:如何同步运行异步方法
- TicTacToe minimax AI in Javascript
- draw() function of Processing in Javascript