Giter Site home page Giter Site logo

watmough / jswire Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 0.0 360 KB

Javascript wireworld code, designed to run primes.wi as fast as possible. primes.wi downloaded from http://www.quinapalus.com/wires11.html

License: Apache License 2.0

HTML 0.98% JavaScript 99.02%

jswire's Introduction

jsWire

Javascript wireworld engine, designed to run primes.wi as fast as possible. primes.wi downloaded from http://www.quinapalus.com/wires11.html

In principle it should run or be extensible to run any .wi file.

Description

Loading a File

The engine should be pointed at a file, and it will be loaded, displayed and run automatically.

Generation Engine

I did some experiments with asm.js and it did work but is currently disabled. Generations are stored in two 1 MByte areas in a 3 MByte heap allocated by the main program.

Wire world values are stored in the heap as unsigned 8 bit values.

Rendering

Currently there's three renderers:

  1. wwRender

    This renderer simply copies a generation to a Javascript canvas. Rect by painful rect.

  2. wwRenderChanged

    Renders only changed cells. This doesn't buy that much speed.

  3. tjRender

    This is the incomplete as yet three js renderer. It works very very fast, but just renders bare luminance values directly from the byte heap.

Current Things to Work On

  1. Fixing up the Three.js Renderer

    This needs to use a fragment shader that translates the Wire world values into colors passed as uniforms.

  2. Generation Counter

    Need to add a generation counter and logic to estimate how many generations can be calculated between 60 fps updates.

  3. Texture-based Simulation

    It should be simple to ping-pong generations between two textures for really fast performance.

jswire's People

Contributors

watmough avatar

Watchers

 avatar James Cloos avatar  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.