# Bunnymark a sprite-renderer stress test ```{raw} html ▶ Run in browser ``` **Tags:** `2d` `sprites` `performance` `stress-test` Thousands of Sprite2D instances bounce under gravity, all sharing one procedural bunny texture generated with numpy at startup. The motion loop is numpy-vectorised (one position array, one velocity array, then a thin write-back to the nodes) so the Python-side cost stays low and the count on screen measures the renderer. A HUD shows the live count and a rolling FPS. ## What it demonstrates - Many Sprite2D instances sharing a single `Texture` resource (one GPU upload, one bindless slot, however many bunnies). - Vectorised movement: integrate and bounce whole numpy arrays, then write each row back through `sprite.position[:] = row` (in-place mutation notifies the transform cache, so the renderer re-collects the moved sprites). - A live HUD with Text2D: bunny count plus an FPS figure averaged over a quarter-second window rather than a single jittery frame. Controls: SPACE / left click - add 1000 bunnies ESC - quit Run: uv run python examples/features/2d/bunnymark.py Headless self-check: uv run python examples/features/2d/bunnymark.py --test ## Source ```{literalinclude} ../../examples/features/2d/bunnymark.py :language: python :linenos: ```