Giter VIP home page Giter VIP logo

dice_js's Introduction

Premise

This is a practice Ruby Haxe Haxe + OpenFL JavaScript / CSS3 project. To simulate... DICE. What can a die do? Well. It can roll. What properties are of it? It has 6 sides (typically, though some DnD ones have more). What happens when a die is rolled? It lands! One one of the six sides. The die then shows the result. And the roll is complete. So we have a begin state. A rolling state. Rolls typically take a few seconds. And the final result state. In which the roll is complete, and the result is displayed for us all to see.


Execution Flow / Design pattern

Application's execution goes something like this:

---> Ai ---> Display --> Input --- (and repeat)

Ai() does the heavy lifting and logic.

Display() renders stuff to the screen.

Input() accepts user input, translates it for Ai.

Organizing & separating code into these three paradigms, then enforcing consistent flow between them - seems to help one keep a good mental model of the app's execution flow. Or maybe it's just CRA-ZAY.


Links & reference

For the homescreen UI animations:
daneden.me/animate/

For an excellent primer on 3D CSS:
desandro.github.io/3dtransforms/

Handy way to auto-prefix CSS:
github.com/ai/autoprefixer/


Compatibility

Works in Firefox, Chrome/Safari

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.