Open aaronholsonege opened 11 years ago
After deep contemplation and discussion with you, I think you're right. Let's take the append/prepend route. Its just more environment friendly considering we're in JS & DOM.
Since Stage.addChild
is now a proxy for Stage.appendLayer
, should it be removed? If so, what is the best way to deprecate a method?
Ready for merge: https://github.com/adamRenny/LayerJS/tree/feature/%2359
To answer your question way late... deprecation within our API should simply stop using the functionality after a certain point. As far as other developers using it, it should include an @deprecated tag inside the docblock.
Not yet ready for merge - the APIs in the scene will still be inconsistent. Update the methods in the scene to follow the same naming patterns and we'll push those last changes through.
Stage has the following methods for adding children:
appendLayer
prependLayer
insertLayerAtIndex
RenderableGroup has:
addChild
insertChildAtIndex
- just addedFor API consistency, I think RenderableGroup should have
prependChild
added andaddChild
should be renamed toappendChild
.