Skip to content

Raynos/graphics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

graphics

Efficient data structures that represent renderable scenes

This is a direct port of Elm to a commonJS JavaScript library. The purpose is exploration of FRP in plain JavaScript and maybe rewriting Elm's rendering core in more efficient JavaScript.

Example

var MousePosition = require("graphics/mouse").Position
var map = require("graphics/signal/map")
var plainText = require("graphics/element").plainText
var render = require("graphics/render")

// Lift the stream of mouse positions through the plainText
// function
var main = map(MousePosition(), plainText)

// render the stream of mouse position as text
render(main)

Development

npm i

# Either use example
npm run example
open localhost:9966

# Or use tryme
npm run tryme
open localhost:8080

Installation

npm install graphics

Contributors

  • Raynos

MIT Licenced

About

Efficient data structures that represent renderable scenes

Resources

License

Stars

Watchers

Forks

Packages

No packages published