Skip to main content
100%

My Home

✓ Published1🌍 Public
SSai Krishna Doultabad
Last edited Feb 21, 2025
Created on Feb 12, 2025

This example draws a night-time scene of a house with a roof, door, windows, streetlight, and bushes, rendered as SVG shapes. It demonstrates fundamental DOM manipulation with D3.js by appending rectangles, circles, lines, and paths to a pre-selected SVG element. The code uses d3.select and .attr methods to position and style elements, and creates a reusable window-building function to simplify repeated structure. The scene is composed entirely with hard-coded coordinates and scale factors, with no external data source.

AI-generated description

Demonstrates fundamental DOM manipulation using D3.js by making a smiley face whose eyebrows move.

MIT Licensed

Similar vizzes