Closed Ali-RS closed 1 year ago
Hello,
Is it a good idea to add a link to the upper layer in the AnimLayer class? So by accessing an AnimLayer, we can walk through all its above layers.
Linking should be done automatically by AnimComposer whenever a new layer is added or an existing layer is removed.
Required methods:
AnimLayer.setNextLayer()/getNextLayer()
What is the use case?
An example use case would be in this PR https://github.com/jMonkeyEngine/jmonkeyengine/pull/2043 where we need to find all the above layers from a specific layer.
something like
while((layer = layer.getNextLayer() != null) { // do stuff }
what do you think?
Moved it into discussions: https://github.com/orgs/jMonkeyEngine/discussions/2048 Closing this one.
Hello,
Is it a good idea to add a link to the upper layer in the AnimLayer class? So by accessing an AnimLayer, we can walk through all its above layers.
Linking should be done automatically by AnimComposer whenever a new layer is added or an existing layer is removed.
Required methods:
AnimLayer.setNextLayer()/getNextLayer()
What is the use case?
An example use case would be in this PR https://github.com/jMonkeyEngine/jmonkeyengine/pull/2043 where we need to find all the above layers from a specific layer.
something like
what do you think?