Skip to content

Instantly share code, notes, and snippets.

@nqthqn
Created September 10, 2014 22:38
Show Gist options
  • Save nqthqn/5bd036527df81be883c1 to your computer and use it in GitHub Desktop.
Save nqthqn/5bd036527df81be883c1 to your computer and use it in GitHub Desktop.
an idea
function Leaf(){
this.type; // 'active', 'seen', 'unseen'
this.position; // [300,2311,45] (x,y,degree) degree in range 0...360
this.link; // '/program/page/13'
this.num; // 4
}
var l1 = new Leaf();
l1.type = 'active';
l1.position = [200,400,45];
l1.link = '/program/page/12'
l1.num = 2;
// or....
leaf1 = {
type: 'active', // active, seen, unseen leaves render different
position: [12,13,45],
link: 'program/page/1',
num: '3',
function render(){
// get the right svg leaf: active (bright green w/ level number), seen (dim green w/ level number), or unseen (dim green w/o number).
// position it.
// apply a link to active or seen leaves.
// apply a number to active and seen leaves.
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment