Skip navigation
Astra built me a pirate cove in one HTML file🏴‍☠️
0:00 / 0:29

Astra built me a pirate cove in one HTML file🏴‍☠️

153 likesDownloadOriginal post

10,980 views

Astra built me a pirate cove in one HTML file🏴‍☠️ Three.js + WebGL, procedural 3D models, shader-driven waves, and transparent cutaway water. A sailing ship, a shark, cannon fire, and music synthesized with Web Audio All running right in your browser

18 Comments

Comments from the original post on X (Twitter)

  • Mark's profile picture

    @Updownupupright

    Ooooooooo 🍻

    1 like

  • Vib3Coded's profile picture

    @vib3coded

    😀

    1 like

  • Samuel's profile picture

    @10xETHx

    Beautiful 🤩

    1 like

  • Vib3Coded's profile picture

    @vib3coded

    thank you

  • Synthetic Beef's profile picture

    @SyntheticBeef

    Very nice.

  • Vib3Coded's profile picture

    @vib3coded

    thanks

  • Brian Hadu's profile picture

    @BrianHaDu

    the combination of procedural models and Web Audio must create a rich experience

  • Vib3Coded's profile picture

    @vib3coded

    yeah, i added the music on top myself. the work itself already has sound effects and all that

  • Kaitlyn Olivah's profile picture

    @KaitlynOliviah

    This cove looks so fun to move around in.

  • Vib3Coded's profile picture

    @vib3coded

    Yeah, it really does! I’d love to explore it

    1 like

  • Tomáš Řemínek's profile picture

    @ReminekT

    Your models look great! Could you share the exact workflow and prompt you used to make them, please?

  • Vib3Coded's profile picture

    @vib3coded

    Create “Blacktide - Pirate Cove,” a beautiful, interactive 3D island diorama using Three.js + WebGL. Deliver the entire experience in one standalone HTML file, with ES modules loaded from a CDN. ART DIRECTION Design a miniature pirate world with stylized low-poly geometry, rich colors, warm lanterns, turquoise water, and cinematic lighting. Aim for a polished interactive artwork. Use a clean, compact interface with English labels. ISLAND AND WATER CUTAWAY Build a rounded island surrounded by a thick volume of transparent ocean water. The exposed sides must reveal an underwater world beneath the surface, like a miniature aquarium. Above water, include: A pirate ship with wooden hull, sails, ropes, and a Jolly Roger. A weathered tavern, wooden dock, barrels, crates, and lanterns. Palm trees, rocky cliffs, sandy paths, and a hidden treasure cave. Small details such as bottles, ropes, scattered coins, and beach vegetation. Below water, include: A sunken shipwreck, coral, seaweed, rocks, and a treasure chest. Schools of fish and a patrolling shark. Animated light patterns across the seabed, bubbles, and suspended particles. Keep the water transparent enough to appreciate the underwater details. Add animated waves, shoreline foam, and subtle reflections. INTERACTIONS Implement working controls for: Launching the pirate ship on a smooth sailing route. Firing its cannons with recoil, smoke, splashes, and sound. Feeding fish so they gather around the feeding point. Revealing the treasure with an animated chest and warm golden glow. Adjusting the tide and wind strength. Switching between day, sunset, and night. At night, illuminate the tavern, dock, and ship with warm lantern light. ANIMATION Animate the ship’s buoyancy, sails, palm leaves, fish, shark, and underwater plants. Fish and the shark must face their actual direction of travel, including during turns and feeding. Prevent visible intersections with the island, seabed, and structures. CAMERA Enable mouse and touch orbit controls immediately. Users must be able to rotate, zoom, and inspect the entire diorama freely. Include smooth camera presets: Island overview Pirate ship Treasure cave Underwater exploration Manual camera input must cancel any automatic camera transition. AUDIO Add original, procedurally generated pirate-inspired ambient music using the Web Audio API, plus ocean, wind, and cannon effects. Include a clearly visible music on/off button and volume slider. Start audio only after user interaction. TECHNICAL REQUIREMENTS Construct models procedurally with Three.js geometry; no external model files. Use shader-driven water and efficient particles. Add soft shadows, atmospheric fog, restrained bloom, and attractive tone mapping. Support desktop and mobile layouts. Handle resizing and cap pixel density for performance. Organize the code into clear functions for scene construction, animation, interactions, camera, and audio. Make every button functional and avoid placeholder features. The final result should feel like a detailed, living pirate world that invites exploration both above and below the water.

    2 likes

  • Tomáš Řemínek's profile picture

    @ReminekT

    Thank you!

  • NinjaCodex's profile picture

    @N1njaCodex

    Wow, that’s wonderful😎

  • Vib3Coded's profile picture

    @vib3coded

    ty

  • M1shacle's profile picture

    @Jackeline362114

    this turned out so good

  • Ryan Sael's profile picture

    @RyanSael

    Nice! You can fix that flicker at the islands’ side by prompting: “Fix the z-fighting problem where the water touched the island”

  • Vib3Coded's profile picture

    @vib3coded

    Yeah, I can try that! Thanks for the tip

    1 like