I’m partial to the term ‘Node’ for objects on the Scene Graph. Everyone is using the word Component
these days to mean a lot of things. Angular 2 has a Component Decorator, Polymer is leading the charge with Web Components, React has Components. It may be prudent to give our Components a different name, so talking about them is easier when speaking in context with other frameworks. @oldschooljarvis I like the terminology of Decorating a Node.
Should we maintain a baseline DOMComponent? If so, does that mean we need to maintain a baseline GLComponent? I’m afraid of going down the same path as Famous with the latter and think that an integration with Three.js or Babylon.js is the way to go there. Maybe if we do maintain a DOMComponent (which I predict ~99% of developers will use), it would serve as an example for other Components. SVGComponent, WebComponent, etc.
We can make a Component that receives updates from a Node and then extend that Component to make others with ES6 Classes. For instance, all a DOMComponent would really need is the transform data from a Node converted to a 4x4 Matrix. IMHO its no use decorating a DOMElement any further than that, just let developers use the Element.prototype they are familiar with. Whatever is handling the updates can just extend the Element.prototype.
var ulNode = new Node({
position: [0, window.innerHeight-20,0]
});
var ul = new DOMComponent('ul', ulNode); //add ul to DOM
var liNode = ulNode.addChild(); // retains position of parent node
var li = new DOMComponent('li', liNode); // create an li
li.classList.add('class1','class2'); // add classes to it