Optimize handling of attached objects and Tree creations
Calamari opened this issue · comments
I think the best way to create a Tree would be something like this:
const instance = new BTree.Instance({
name: 'Maybe a name',
object: { /* the object that is passed through everything */,
tree: tree // any instance of a node
})
This also makes it possible to register different nodes to different trees and we get rid of the awkward setObject method.