Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Fork of Blank Slate with Hot nice

Public visualization

Viewing a saved revision (read-only)

eff7560936cd4124bef0a2edddeb37a8

Fork of Fork of Blank Slate with Hot nice

0 stars0🌍 Public
NNita
Last edited Mar 1, 2025
Created on Feb 28, 2025

This D3.js visualization renders a three-tiered birthday cake with distinct pastel layers, frosting scallops, candles with gradient flames, and decorative toppings like sprinkles and strawberries. The SVG is created dynamically using `d3.select().append()` to build shapes, while `d3.path()` constructs the curved frosting paths. Randomly positioned line elements generate the sprinkles, and radial gradients define the candle flames. The cake sits on an elliptical stand, with a bold text title anchoring the composition. The code explicitly sets the SVG dimensions and viewBox, with all elements drawn procedurally rather than from an external dataset.

AI-generated description

Interactive House Visualization

This visualization renders a colorful house scene with a sky background, sun, and surrounding elements. The visualization is now interactive - you can click on various elements to see them change!

Interactive Features

  • Click on the sun to make it glow brighter
  • Click on the door to change its color
  • Click on the windows to turn the lights on/off

How It Works

The visualization creates several elements with specific styles:

  • A gradient blue background representing the sky
  • A bright yellow sun with a glowing effect
  • Multiple fluffy white clouds of different sizes
  • A detailed house with:
    • Wooden walls and a sloped roof
    • A chimney with animated smoke puffs
    • Windows with cross frames (that can be clicked)
    • A wooden door with a golden doorknob (that can be clicked)
  • A dirt path leading to the house
  • A green grassy ground/horizon at the bottom

The clouds have simple animations that make them float across the sky, and the chimney produces animated smoke puffs that drift upward.

Code Structure

The code has been refactored into three main files:

  • index.js: Main entry point that sets up the container
  • house.js: Contains functions to create and set up the house and its elements
  • animations.js: Manages CSS animations and interactive behaviors

Customization

You can modify the colors, sizes, and positions of the elements in the code to create different house scenes, such as:

  • Change the house color and style for different architectural types
  • Adjust the sky colors to create different times of day
  • Add more details like trees, a fence, or garden elements
  • Change the animations for different weather effects