NEOLearn

2D rendering examples

The engine's 2D rendering examples: what each one shows, whether it runs in a browser and the command that runs it.

Updated October 20, 2026

On this page

Sprites, 2D meshes and shapes, 2D cameras, text in the world and 2D post-processing. There are 29 examples on this page. For the concepts behind them, see 2D.

Run any of them from the engine core's workspace (the folder of the engine source that holds the neo crate's Cargo.toml); see Run an example.

Examples#

ExampleWhat it showsWebRun
2D BloomIllustrates bloom post-processing in 2dYescargo run --example bloom_2d
2D Rotation to CursorDemonstrates rotating entities in 2D to follow the cursorYescargo run --example rotate_to_cursor
2D ShapesRenders simple 2D primitive shapes like circles and polygonsYescargo run --example 2d_shapes --features neo_feathers
2D Viewport To WorldDemonstrates how to use the Camera::viewport_to_world_2d method with a dynamic viewport and camera.Yescargo run --example 2d_viewport_to_world
2D WireframeShowcases wireframes for 2d meshesNocargo run --example wireframe_2d --features neo_feathers
Arc 2D MeshesDemonstrates UV-mapping of the circular segment and sector primitivesYescargo run --example mesh2d_arcs
CPU DrawingManually read/write the pixels of a textureYescargo run --example cpu_draw
Dynamic Mipmap GenerationDemonstrates use of the mipmap generation plugin to generate mipmaps for a textureNocargo run --example dynamic_mip_generation --features neo_feathers
Generic 2D RotationDemonstrates rotating entities in 2D with quaternionsYescargo run --example rotation
Manual Mesh 2DRenders a custom mesh "manually" with "mid-level" renderer apisYescargo run --example mesh2d_manual
Mesh 2DRenders a 2d meshYescargo run --example mesh2d
Mesh 2D With Vertex ColorsRenders a 2d mesh with vertex color attributesYescargo run --example mesh2d_vertex_color_texture
Mesh2d Alpha ModeUsed to test alpha modes with mesh2dYescargo run --example mesh2d_alpha_mode
Mesh2d Repeated TextureShowcase of using uv_transform on the ColorMaterial of a Mesh2dYescargo run --example mesh2d_repeated_texture
Move SpriteChanges the transform of a spriteYescargo run --example move_sprite
Multi-Window TextRenders text to multiple windows with different scale factors using both Text and Text2dYescargo run --example multi_window_text
Pixel Grid SnappingShows how to create graphics that snap to the pixel grid by rendering to a texture in 2DYescargo run --example pixel_grid_snap
SpriteRenders a spriteYescargo run --example sprite
Sprite AnimationAnimates a sprite in response to an eventYescargo run --example sprite_animation
Sprite FlippingRenders a sprite flipped along an axisYescargo run --example sprite_flipping
Sprite ScaleShows how a sprite can be scaled into a rectangle while keeping the aspect ratioYescargo run --example sprite_scale
Sprite SheetRenders an animated spriteYescargo run --example sprite_sheet
Sprite SliceShowcases slicing sprites into sections that can be scaled independently via the 9-patch techniqueYescargo run --example sprite_slice
Sprite TileRenders a sprite tiled in a gridYescargo run --example sprite_tile
Text 2DGenerates text in 2DYescargo run --example text2d
Texture AtlasGenerates a texture atlas (sprite sheet) from individual spritesNocargo run --example texture_atlas
Tilemap ChunkRenders a tilemap chunkYescargo run --example tilemap_chunk
Tilemap Chunk with OrientationsRenders a tilemap chunk using tile orientations (mirrored, rotated)Yescargo run --example tilemap_chunk_orientation
Transparency in 2DDemonstrates transparency in 2dYescargo run --example transparency_2d

See also#