https://github.com/qingyangmoke/tinyjs-plugin-p2
tinyjs 中 引入 P2 物理引擎
https://github.com/qingyangmoke/tinyjs-plugin-p2
ant-tinyjs p2
Last synced: about 2 months ago
JSON representation
tinyjs 中 引入 P2 物理引擎
- Host: GitHub
- URL: https://github.com/qingyangmoke/tinyjs-plugin-p2
- Owner: qingyangmoke
- Created: 2017-07-17T12:11:23.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2022-08-30T06:19:12.000Z (almost 4 years ago)
- Last Synced: 2025-02-20T04:33:59.787Z (over 1 year ago)
- Topics: ant-tinyjs, p2
- Language: JavaScript
- Size: 710 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# tinyjs-plugin-p2
> tiny P2物理引擎
## 查看demo
http://tinyjs.net/#/plugins/tinyjs-plugin-p2/demo
## P2
> P2 物理引擎
## 引用方法
- 推荐作为依赖使用
- `npm install tinyjs-plugin-p2 --save`
- 也可以直接引用线上cdn地址,注意要使用最新的版本号,例如:
- https://gw.alipayobjects.com/as/g/tiny-plugins/tinyjs-plugin-p2/0.1.4/index.debug.js
- https://gw.alipayobjects.com/as/g/tiny-plugins/tinyjs-plugin-p2/0.1.4/index.js
## 起步
首先当然是要引入,推荐`NPM`方式,当然你也可以使用`CDN`或下载独立版本,先从几个例子入手吧!
##### 1、最简单的例子
引用 Tiny.js 源码
``` html
```
``` js
var p2 = require('tinyjs-plugin-p2');
```
## 依赖
- `Tiny.js`: [Link](http://tinyjs.net/#/docs/api)
## 相关文档
- [Tiny.js](http://tinyjs.net/#/docs/api)
- [phaser](https://github.com/photonstorm/phaser)
- [p2](https://github.com/schteppe/p2.js)
## API文档
http://tinyjs.net/#/plugins/tinyjs-plugin-p2/docs