Generates a random aquarium using JavaScript and HTML.
Used a multilayered canvas approach to draw and animate multiple elements.
- Local Servers with Python and JavaScript Developer Console.
python3 -m http.server
- Accessing elements from Layout such as Canvas and Context.
<canvas id="layer1" width=1100px height=600px style="position: absolute; left: 0; top: 0; z-index: 0;"></canvas>
const canvas = document.getElementById('layer1');
const context = canvas.getContext('2d');
- Create different scripts and how to make exports and imports.
export {seabed_species}
import {seabed_species} from "./elements/seabed.js"
- Animation frames.
window.requestAnimationFrame(canvasDraw);