Queryable transformation stack
Increasing access
This would make it easier to get previous and current transformations for things like layer transformations (previously only possible with undocumented methods) on top of one another, which would be great for things like editing programs that could use multiple transformations (e.g. 2d models, 3d art), and it would also help with debugging.
Most appropriate sub-area of p5.js?
- [ ] Accessibility
- [ ] Color
- [X] Core/Environment/Rendering
- [ ] Data
- [ ] DOM
- [ ] Events
- [ ] Image
- [ ] IO
- [ ] Math
- [ ] Typography
- [ ] Utilities
- [X] WebGL
- [ ] Build process
- [ ] Unit testing
- [ ] Internationalization
- [ ] Friendly errors
- [ ] Other (specify if possible)
Feature request details
Create a function that returns a list containing transformation data (could be a list containing the data in any format it shouldn't really make a difference) for each transformation in order (preferrably so that the first/base transformation is at index 0).
Hello @RandomGamingDev and maintainers,
I'm very interested in the proposed feature of creating a Queryable transformation stack. I recognize this feature touches the core rendering architecture and would require significant design decisions.
Before proposing a technical implementation, I'd like to collaborate on the API design and architectural approach.
Specifically, I’d like to get consensus on:
-
Return Format: Should the stack return raw transformation matrices (e.g.,
p5.Renderer.matrixStack) or a simplified object array (e.g.,{ type: 'translate', x: 10 })? - Performance: As this is a performance-driven feature, should the implementation prioritize WEBGL mode first?
- Scope: Should this feature be developed against the main branch or the dev-2.0 branch, given the current refactoring efforts?
I am ready to research the existing transformation stack implementation and draft an architectural proposal based on your guidance. Could you please assign this issue to me for initial investigation and design collaboration?