Code: Select all
Create a cinematic pirate ship sailing across a miniature ocean using Three.js in a single HTML file.
Build a wooden ship with sails, a mast, cannons, and a pirate flag.
Animate the ship gently rocking with the ocean waves while clouds drift across the sky.
Add a “Fire Cannons” button that shoots glowing cannonballs with smoke and splash effects.
Allow camera orbit and zoom.
Use simple geometry, animated water, and dramatic sunset lighting to make the scene visually impressive.
Deliver the complete working HTML file.