Git Product home page Git Product logo

game-of-life-om's Introduction

An Om/React client of the game of life

Based on Christophe Grand's solution in the book Clojure Programming

The visualisation is inspired by the excellent presentation of React.js by steveluscher at react-supervanjs-2013

The purpose of this app is to help people discover and understand Om/React.js

It has been presented at the Paris Clojure Meetup.

Getting starter

Based on David Nolen's template : mies-om

To build the project :

clone the repository

cd game-of-life-om

lein cljsbuild auto game-of-life-om

When the ClojureScript is compiled, open index.html

Alternativevly you can compile the project in advanced mode :

lein cljsbuild once release

When finished open : release.html

How to use the app

You are presented en empty world, free of any cell.

Possible actions are

  • Create new cells by the mouse actions : click, hover, click

  • Create non contiguous cells by pressing esc key before the second click.

  • Choose predefined cells configuration from the drop down list.

  • kill all cells by clicking on "Wipe board" button or hitting space bar.

  • Vary the next generation speed by using the slider

  • Click on the "Mark" button to color in grey each location with direct DOM manipulation. This should help understand the concept behind React.js : it reveals the fact that React.js re-render only the cells that change at each generation.

Resources

Watch this instructive and fun presentation of React.js by steveluscher at react-supervanjs-2013

I warmly recommand you to study this article, it contribute greatly to understand the organisation of a React.js app and helps you to build your own app : Thinking in React By Pete Hunt

There is a nice introduction of Om in theses slides by Sean Grove

game-of-life-om's People

Contributors

hiram-madelaine avatar

Stargazers

Skylar Givens avatar

Watchers

James Cloos avatar  avatar

Forkers

obarbeau

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.