Fire Doodle
by RFi
Check out "Fire Doodle" by RFi - featuring Canvas API, Sprite Manager, Sprite Store and more. 114.6k views. Try this Snapchat Lens on Easy Lens.
114.6k views
Features
- Canvas API: Procedurally renders the live nose-drawing strokes onto a full-screen 2D on-screen canvas texture (the drawing surface) and draws the UI overlay canvas (Clear button). Updated to render a fire-trail stroke style (yellow/orange core + red glow) and a fire-proof metal Clear button UI.
- Sprite Manager: Displays and manages 2D UI sprites (palette swatches and draw toggle) and performs hit testing for taps on those UI elements. Also used to convert touch unit coords to pixel coords for Clear All hit testing.
- Sprite Store: Provides the textures for the UI: 7 color swatches and draw toggle states. Swatch textures are regenerated to be small flame icons in the corresponding colors (red/orange/yellow/green/cyan/blue/purple).
- Touch Events: Captures screen touches to select colors, toggle drawing mode, and tap the Clear All button.
- FaceLandmarks: Tracks the user’s nose position in 2D each frame to drive the brush position for drawing.
- Text On Screen: Small on-screen helper text showing current mode (DRAW / PAUSED) plus brief hints (tap color, toggle, clear).