Repository navigation
Bevy's own Text2d in a Canvas3D, TextureAtlasBuilder; parity for 2d/text2d, texture_atlas, rotation - #63
Merged
Conversation
…ity for 2d/text2d (exact), 2d/texture_atlas and 2d/rotation A <Text2d> inside a <Canvas3D> is now Bevy's Text2d (raea-sys-sprite text2d.rs, sent as a Shape2D row with its `text` spec): bevy_text lays it out and rasterises it and bevy_sprite_render orders it with the sprites by z, so TextBounds (`bounds`), FontSmoothing::None (`font_smoothing`), Text2dShadow (`shadow`), LineBreak, its <TextSpan>s, a z under a sprite and a scaled quad's pixelated look are Bevy's. After the Canvas3D it is the page's Text, as before; the page refuses bounds, shadow and "None", which it can't draw. 2d/text2d is exact at frames 10 and 60 (SSIM 1.000000, tile 0); with FontSmoothing::None taken out it fails (tile 40, 5308 px off in that block). TextureAtlasBuilder (raea/sprite, raea/image): pictures packed by Bevy's own builder in the order added (padding, sampler), a sprite showing the whole atlas or one picture (sources.handle(texture), the row's atlas_pick, which sync_2d no longer resets to a sheet's cell). 2d/texture_atlas lists textures/rpg in load_folder's order and passes at 0.998551; its packed atlases match Bevy's. 2d/rotation: the port took the direction to the ship as -at, so the enemy straight above had x = -0 and copysign turned it the other way; player - enemy (0 - 0 = +0) as Bevy subtracts. Passes at 0.999751, its turning enemies within 8 grey of Bevy's at frames 10 and 60 (the bar alone passed a 10 degree a second error). All 2D ports and shader/pipeline_constants rerun: 155 ported, 155 passing. skills/ pins raea-skills f81678f (#9), whose generated sdk.md lists TextureAtlasBuilder.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A inside a is now Bevy's own Text2d (TextBounds, FontSmoothing::None, Text2dShadow, spans, z among sprites). TextureAtlasBuilder packs pictures with Bevy's own builder. 2d/text2d is exact; 2d/texture_atlas and 2d/rotation pass. 155 of 155 ported examples pass. skills/ pins raea-skills f81678f (#9).