svelte-whiteboard Svelte Themes

Svelte Whiteboard

๐Ÿ–ผ๏ธ Virtual whiteboard with reactive canvas rendering

๐ŸŽจ Virtual Whiteboard

I'm passionate about the low-level rendering technologies used by graphic editors, design tools, geo-maps, and virtual whiteboards. This is my implementation of a virtual whiteboard built with a homegrown 2D rendering engine.

image

โœจ Features

  • ๐ŸŽจ Infinite, canvas-based whiteboard.
  • ๐Ÿ” Zoom and panning support.
  • โš’๏ธ Movable and resizable stickers with in-place text editing and formatting.
  • โžก๏ธ Arrow-binding.
  • โ˜‘๏ธ Multiple selection.
  • ๐Ÿ“‹ Copy-paste support.

๐Ÿ› ๏ธ Engineering

  • Layer System: Declarative layer management with hit detection.
  • Hit Detection: Uses getImageData() to read pixel data from an offscreen canvas and convert it to unique layer ID.

Performance Optimizations

  • ๐Ÿ’พ Text snapshot caching to avoid re-rendering of unchanged content.

Graphics Primitives

  • โœจ Shapes: Rectangles, rounded rectangles, circles, curves.
  • โžก๏ธ Highly interactive arrows to create aesthetically pleasing connections between canvas objects.
  • ๐Ÿ”ค Text rendering with alignment, decorations, font styles, and snapshot caching.
  • ๐ŸŽฏ Selection handles with interactive corner markers.

Interaction & Navigation

  • ๐ŸŽฎ Camera system with pan, zoom, and smooth navigation.
  • ๐Ÿ–ฑ๏ธ Mouse/touch input with proper coordinate transformation.
  • ๐ŸŽฏ Layer picking and selection based on pixel data picked from offscreen canvas.
  • โŒจ๏ธ Keyboard shortcuts for enhanced productivity.

๐Ÿš€ Next steps

  • Text-on-curve rendering with interactive Bรฉzier curve manipulation.
  • Support for custom fonts with OpenType.js integration.

Top categories

Loading Svelte Themes