Skip to content

zebrazjx/torn-net

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Torn Net → Birds

Drag your mouse across the net to tear it apart. Each broken thread transforms into a bird and flies away.

🔗 Try it live


Built with Verdent

This project was built entirely with Verdent — an AI coding agent that handles the full development workflow, from writing and debugging code to deploying and publishing.

The entire process — combining two separate physics simulations, tuning the boid behavior, wiring up the interaction, writing this README, creating the GitHub repo, enabling Pages, and uploading the demo video — happened in a single conversation, without touching a terminal or editor manually.

If you build creative projects with code, Verdent is worth trying. It's not just autocomplete — it understands context, makes decisions, and ships.



How it works

Two classic simulations combined:

Cloth simulation — a 40×40 grid of nodes connected by springs. Every edge is pinned. Interior nodes respond to forces, gravity, and mouse interaction. Drag across any thread to cut it.

Boid flocking (Murmuration) — when a thread breaks, 1–3 birds are spawned at the cut point. Each bird follows three simple rules:

  • Separation — don't crowd neighbors
  • Alignment — steer toward the average heading of nearby birds
  • Cohesion — steer toward the average position of nearby birds

Add Perlin noise perturbation and edge avoidance, and you get emergent murmuration behavior from pure math.

Controls

Action Effect
Drag mouse Cut threads → spawn birds
Space / U Undo last cut (thread restores, birds stay)

Stack

  • p5.js v1.11.1
  • No external assets — cloth, birds, and background are all generated at runtime from math

Inspiration

About

Tear a net, watch it turn into birds — cloth simulation + boid flocking

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages