Created
February 27, 2010 03:23
-
-
Save tmpvar/316442 to your computer and use it in GitHub Desktop.
performer data structures
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// performance (simplified) | |
{ | |
name : "hello" | |
nodes : [ | |
{ | |
name : "constant" | |
value : "hello" | |
/* | |
in code: | |
ports: { | |
input: { | |
init : function() {} // event handler (for pipe reader) | |
} | |
output: { | |
value : function() {} // event handler (for pipe writer) | |
} | |
} | |
*/ | |
}, | |
{ | |
name : "output" | |
/* | |
in code: | |
ports: { | |
input: { | |
value : function() {} // event handler (for pipe reader) | |
} | |
} | |
*/ | |
} | |
], | |
pipes : { | |
"ports/input/ports/init" : ["nodes/0/ports/init"], | |
"nodes/0/ports/output/value" : ["nodes/1/ports/input/value"] | |
} | |
ports : { | |
input : { | |
init : false // virtual port | |
} | |
} | |
} | |
/** | |
So I'm trying to figure out what the difference should be between a one time | |
performane and a reusable component (composite node below) | |
**/ | |
// composite node (simplified) | |
{ | |
name : "composite" | |
nodes : [ | |
{ | |
name : "constant" | |
value : "hello" | |
/* | |
in code: | |
ports: { | |
input: { | |
init : function() {} // event handler (for pipe reader) | |
} | |
output: { | |
value : function() {} // event handler (for pipe writer) | |
} | |
} | |
*/ | |
}, | |
{ | |
name : "output" | |
/* | |
in code: | |
ports: { | |
input: { | |
value : function() {} // event handler (for pipe reader) | |
} | |
} | |
*/ | |
} | |
], | |
pipes : { | |
"ports/input/init" : ["nodes/0/ports/input/init"], | |
"nodes/0/ports/output/value" : ["nodes/1/ports/input/value"] | |
} | |
ports : { | |
input : { | |
init : false // virtual port | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment