[W/A/S/D] to move; [+/-] or [mousewheel] to zoom at cursor position; [R] to reset view; [P] to show/hide debug info
xxxxxxxxxx
import Mandelbrot from './Mandelbrot';
var mandelbrot = new Mandelbrot();
function keyReleased() {
if (keyCode === 80)
mandelbrot.printDebug = !mandelbrot.printDebug;
}
function mouseWheel() {
mandelbrot.zoomAt(mouseX, mouseY, 0.85, event.delta < 0);
}
function setup() {
createCanvas(500, 500);
}
function draw() {
mandelbrot.update();
mandelbrot.draw();
}
Main, line 1:Uncaught SyntaxError: Cannot use import statement outside a module
Mandelbrot, line 90:Uncaught SyntaxError: Unexpected token 'export'