Phun-js is a bundle of utilities revolving around the sandbox "games" Phun and Algodoo. The greater goal of this project is to create a HTML Web player for Algodoo & Phun scenes.
As of now it currently consists of:
- Scene & ThymeScript parser
- ThymeScript to JavaScript Transpiler
- Small runtime for Thyme in javascript (polyfills for thyme specific language features)
- WIP Web player for Algodoo scenes
The plan for the web player is to use LiquidFun by Google for the Physics calculations and possibly THREE.js for the rendering. LiquidFun is an extension of the Box2D physics engine and comes in an EmScripten compiled version for javascript.
Go to the phun-js-webplayer drag and drop your algodoo scene into the browser. Thats it!
- Drag & drop .phz files to load (Client side)
- Hinges, springs (wip)
- water
- Complex polygons
- Circles, rectangles
- Hinges, Motors (Controlled)
- Fixate joins (wip)
- Camera follow
- Car (Control car with A, D)
- Tramboline
- Trebuchet (Press keys 1, 2, 3)
- Raining men
- Brick wall
- Gears (Broken because of polygon handling... To be fixed)
- Water
- Water glass
- Water bottle rocket
For info on using the Thyme parser and transpiler, take a look at the unit tests provided. and also reference the documentation for PEG.js
- Fix complex polygons (Earclipping!)
- Fix emscripten compilation (enable optimizations and fix particles!)
- (Proper) Springs
- Thrusters
- Breakables
- Events & Thyme Scripting
- Textured and solid rendering mode
- Sky & cloud
- Killers and Immortalss
- Air friction
- Wind (Probably never going to do this!)
- Controls (wip)
- Phun drag&drop support in player
- Scene to HTML converter tool (CLI)
- THREE.js+liquidfun template with phz scene support.