项目
在 GitHub 查看
cloud9c/taro
关于
面向 Web 的轻量级 3D 游戏引擎。
游戏与模拟器实测星标增长
- 24小时
- 0
- 7天
- +2
- 15天
- +3
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文Taro

A lightweight 3D game engine for the web. Built with three.js and cannon-es.
- ⚛️ Physics - Full integration with a 3D rigid-body physics engine.
- 🔌 Entity Component System - Write efficent and extendable code.
- 🔊 Sound - 3D positional sounds built on the Web Audio API.
- 📜 Scripts - Design game behaviors in JavaScript.
- ⚡ Performance - Taro is a thin framework on top of three.js.
Documentation
You can find the Taro documentation on the website.
Usage
There are several examples on the website. Here is an example to get started:
var app = new TARO.App();
document.body.appendChild( app.domElement );
var scene = new TARO.Scene();
app.setScene(scene);
class CubeController {
init() {
// fires when the component is attached to an entity
this.rotation = this.entity.rotation;
}
update() {
// fires once per frame
this.rotation.x += 0.01;
this.rotation.y += 0.01;
}
}
TARO.registerComponent('cubeController', CubeController);
var cube = new TARO.Entity('cube');
cube.addComponent('material', { color: 0x00ff00 });
cube.addComponent('geometry', { type: 'box' });
cube.addComponent('cubeController');
var camera = new TARO.Entity('camera');
camera.position.z = 5;
camera.addComponent('camera');
app.start();
This example will display a spinning cube on the canvas.
Builds
- https://www.echou.xyz/taro/build/taro.module.js (ESM)
- https://www.echou.xyz/taro/build/taro.js (UMD)
- https://www.echou.xyz/taro/build/taro.min.js (UMD minified)
Editor
In addition to the engine, there is a visual editor available to get a taste of Taro.
License
探索相关项目
加载中…