Promote sprite depth examples from experimental to main#2434
Promote sprite depth examples from experimental to main#2434pushfoo merged 21 commits intodevelopmentfrom
Conversation
* Stop trying to set the window's read-only clock value * Fix annoying indent on list at top of comments
DragonMoffon
left a comment
There was a problem hiding this comment.
The window has a depth buffer by default, and spritelists innately support depth testing so this should be moved to examples
* Make the example subclass view * Use the same style found in other examples * Grab the context locally
|
Seems like this line is wrong:
You moved
Anyway I don't understand why you moved that attribute to the window. Just leave it in the view...no? |
I think this is what's wrong:
|
* Convert to View style * Make bg / clear color a Color defined at the top of the file * Use WINDOW_TITLE, WINDOW_WIDTH, and WINDOW_HEIGHT constants
* Add a screenshot for the example page and example gallery * Add an .rst file to reference the code and example * Add the .rst file to the examples gallery
* Add a screenshot for the page and gallery * Add an example .rst file for it * Add an entry in the examples page
|
@alejcas fixed |
|
The reason it wasn't moved into examples was a lingering issue related to the depth range. As far as I know the depth range set in the ortho projection is We could possibly change to to Including a new reasonable depth range would make things a bit more cleaner? |
|
It seems @DragonMoffon changed the range to The default depth range in arcade is -100 (near plane) / 100 (far plane). Higher value is further away from the camera. |
|
Can we add default near and far constants to make this more legible? |
|
For now I think it's enough to just mention the default range. |
|
I didn't actually choose this range myself. There was definitely a code snippet in Arcade that I based it on. I feel like it was the internal matrix gen, but it might have been one of the gl tutorials. In any case, in the depth example, it should probably be mentioned since it's directly settable in Camer2D's init |
DragonMoffon
left a comment
There was a problem hiding this comment.
One last, very pedantic, change. Im otherwise happy for it to be merged.
|
|
Viewexample style