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.
You can find the Taro documentation on the website.
There are several examples on the website. Here is an example to get started:
varapp=newTARO.App();document.body.appendChild(app.domElement);varscene=newTARO.Scene();app.setScene(scene);classCubeController{init(){// fires when the component is attached to an entitythis.rotation=this.entity.rotation;}update(){// fires once per framethis.rotation.x+=0.01;this.rotation.y+=0.01;}}TARO.registerComponent('cubeController',CubeController);varcube=newTARO.Entity('cube');cube.addComponent('material',{color: 0x00ff00});cube.addComponent('geometry',{type: 'box'});cube.addComponent('cubeController');varcamera=newTARO.Entity('camera');camera.position.z=5;camera.addComponent('camera');app.start();This example will display a spinning cube on the canvas.
- 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)
In addition to the engine, there is a visual editor available to get a taste of Taro.
