小游戏开发之五:为three.js添加物理引擎Physijs"/>
微信小游戏开发之五:为three.js添加物理引擎Physijs
一、前言
The primary goal in developing Physijs is to keep it as simple and user-friendly as possible. Physics engines can be daunting and difficult to set up, with so many options and configurations it is easy to feel overwhelmed. Physijs abstracts all of that extra logic out so you can focus on the rest of your project.
简单的来说,physijs这个名字看起来拼写错误的东西,是一套把ammo.js中的底层接口,抽象出来,针对three.js封装好之后,便于使用的物理引擎。
二、必读
本文不开发源码,如有需要可以自行在GitHub搜索相关工程。
三、兼容经历
1、物理引擎基于worker来进行模拟,而微信开发工具中worker却有bug,无法创建,在最新版本中以修复。
2、Physijs中包含physi.js、ammo.js、physijs_worker.js,除了ammo这个基础物理库以外,另外两个都有部分源码需要修改,主要是对wx的适配。
3、worker文件需要放在worker目录中,并在
更多推荐
微信小游戏开发之五:为three.js添加物理引擎Physijs
发布评论