GithubHelp home page GithubHelp logo

wenx0826 / birch-san-liquidfun-play-2 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from birch-san/liquidfun-play-2

0.0 0.0 0.0 14.08 MB

JavaScript 2.12% TypeScript 68.58% CSS 0.38% HTML 1.48% GLSL 19.23% Svelte 8.21%

birch-san-liquidfun-play-2's Introduction

liquidfun-play-2

Note: Requires Chrome/Chromium-based browser in development. Firefox and Safari supported after production bundle.

Demo

Demonstrates functionality of box2d-wasm's liquidfun release.

Iterates on my previous liquidfun-play repository with the following changes:

  • introduces WebAssembly SIMD optimization from newer box2d-wasm release
  • no longer delegates physics to a Web Worker; workers have disadvantages:
    • more difficult to develop
    • various features either unsupported or complex to bundle for some browsers
    • the main thread had no work to do anyway! better to have fewer cores active, so CPU can boost to higher clock speeds
  • implements water shaders from Liquidfun's EyeCandy demo

Achieves high framerate by:

  • avoiding allocations in main loop
    • no new
    • no []
    • no {}
    • pre-allocate structures
    • fewer allocations = (fewer?) (shorter?) GC pauses
  • minimize JS->wasm calls in favour of accessing Emscripten heap directly
  • physics via WebAssembly with SIMD acceleration
  • rendering in WebGL

Usage

npm start

Runs the app in the development mode. Open http://localhost:8080 to view it in the browser.

License

This repository is Zlib-licensed (full text in LICENSE.zlib.txt).
Additionally, contributions ported or adapted from the liquidfun repository are licensed as described in LICENSE.liquidfun.txt.

birch-san-liquidfun-play-2's People

Contributors

birch-san avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.