You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Scene can be a standalone thing that contains a single root Node within it, which is the top level Node of the world that the scene contains. Scene does not need transforms applied to it.
(This will also simplify module dependencies, reducing potential circular dependency problems.)
Refactor so that Scene does not extend from Node (possibly both Node and Scene might extend from a base class if any functionality should be shared, possibly not if that shared API surface area is small enough and would merit individual implementation for each class).
Do the same with motor-node/scene elements.
Work for #40 is waiting for this to be done first.
The text was updated successfully, but these errors were encountered:
Make multiple() a multi-inheritance tool so that we can avoid making classes extend each other for no reason (i.e. when classes are not related and don't need to extend from each other). Used class-factory-style mixins for now
Nodes (the current Node class) will extend from ImperativeBase, TreeNode, and Transformable. (Node's name might possibly change, not sure yet). f.e.
Scene will extend from ImperativeBase and TreeNode, and Sizeable (a subset of Transformable which Transformable also extends). To move a scene around within another scene, simply mount the scene inside a MotorHTMLNode with scene.mount then transform the Node.
Transformable is what it sounds like, a class that handles the transformation matrix aspects, housing the getters and setters for position, rotation, etc.
ImperativeBase is the class that contain the imperative APIs stuff, relating to how the API ties with the HTML API, plus might contain some logic not yet categorized into a new class. MotorHTMLBase is the reciprocal class on the HTML side.
The TreeNode class makes it easy to construct a tree structure (and considers only how that tree structure is created).The root of our "scene graph" tree will be a Scene TreeNode and all other nodes will be Node TreeNodes.
These class names are all subject to change at the moment.
Completed in bf3a487 (for now, will revisit in the future with a better multiple-inheritance scheme when Proxy is widely supported, and am using a mixin pattern for now)
Scene can be a standalone thing that contains a single root
Node
within it, which is the top level Node of the world that the scene contains. Scene does not need transforms applied to it.(This will also simplify module dependencies, reducing potential circular dependency problems.)
Scene
does not extend fromNode
(possibly both Node and Scene might extend from a base class if any functionality should be shared, possibly not if that shared API surface area is small enough and would merit individual implementation for each class).Work for #40 is waiting for this to be done first.
The text was updated successfully, but these errors were encountered: