Skip to content

Latest commit

 

History

History
47 lines (35 loc) · 890 Bytes

README.md

File metadata and controls

47 lines (35 loc) · 890 Bytes

ToyBot Scenegraph

Join the chat at https://gitter.im/shoebot/toybot-scenegraph

This repository is the testing ground for the Shoebot 2 scene graph implementation.

Developer info: DEVELOPERS.md

Scene graph specification

A scene graph is a simple collection of nodes, which can be

  • Drawable shapes to be rendered
  • State changes that affect other nodes after them

Shape nodes

{
  "type": "path",
  "coords": [
    [0, 0],
    [0, 100],
    [100, 100],
    [100, 0]
  ]
}

State nodes

{
  "type": "state",
  "target": "fill",
  "value": [0.3, 0.2, 0.1, 0.7]
}
{
  "type": "state",
  "target": "size",
  "value": [800, 600]
}