planck.js 介绍
Planck.js: Box 2D物理引擎的JavaScript重写,主要针对跨平台html5游戏开发。planck.js优化了web/移动浏览器的引擎, 提供了开源的JavaScript 代码 基础和API。 这个方式开发人员将会更加舒服的创建2D游戏和其它物理相关体验。
要尝试Planck.js,只需将planck-with-test bed .js脚本 添加 到 HTML代码 中,然后planck.test bed (callback)使用回调 代码调用 。例如:
<html><body>
<script src="https://cdn.jsdelivr.net/npm/planck-js@0.2/ dis t/planck-with-test bed .js"></script>
<script>
planck.test bed (function(test bed ) {
var world = planck.World();
// rest of your code
return world; // make sure you return the world
});
</script>
</body></html>
?
网站地址 : http://piqnt.com/planck.js/
GitHub: https://github.com/shakiba/planck.js
网站描述: 开发创建跨平台 HTML5 游戏的 2D JavaScript 物理引擎
planck.js官方网站
官方网站: http://piqnt.com/planck.js/
如果觉得 网站内容还不错,欢迎将 网站 推荐给程序员好友。
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://www.haodehen.cn/did174348