Simple transitioning slides with SVG and D3
This example demonstrates a slide-based presentation system built with D3.js and SVG, where each slide is defined by a rectangle with an ID like "slide_1" or "slide_2.5" in an Inkscape-created SVG file. The script sorts slides by their numeric IDs and transitions between them by animating the SVG viewBox with a 1.5-second duration, using keyboard controls (arrow keys, Home, End) or touch gestures. Each slide exposes scale_x and scale_y functions that map a normalized [0,1000] domain to the slide's pixel boundaries, enabling easy placement of interactive elements—here a bouncing steelblue circle on slide 3. The visualization also supports panning and zooming via mouse drag and mousewheel, with zoom anchored to the cursor position. This example demonstrates a simple, flexible approach to building slide-based presentations from SVG files.
AI-generated description