three.js dev template - module

CSS

body {
	background-color: #000;
	margin: 0px;
	overflow: hidden;
}

JavaScript

import * as THREE from "https://cdn.jsdelivr.net/npm/three@0.119.1/build/three.module.js";
import { OrbitControls } from "https://cdn.jsdelivr.net/npm/three@0.119.1/examples/jsm/controls/OrbitControls.js";

var mesh, mesh2, renderer, scene, camera, controls;

init();
animate();

var count = 0;

function init() {

    // renderer
    renderer = new THREE.WebGLRenderer();
    renderer.setSize( window.innerWidth, window.innerHeight );
    renderer.setPixelRatio( window.devicePixelRatio );
    document.body.appendChild( renderer.domElement );

    // scene
    scene = new THREE.Scene();
    
    // camera
		const frustumSize = 25;
		const aspect = window.innerWidth / window.innerHeight;
		
    camera = new THREE.OrthographicCamera( frustumSize * aspect / - 2, frustumSize * aspect / 2, frustumSize / 2, frustumSize / - 2, 0, 100);
    camera.up.set(0,1,0);
    camera.position.set(5,0,10);
 
    // controls
    controls = new OrbitControls( camera, renderer.domElement );
		controls.touches.ONE = THREE.TOUCH.PAN;
		controls.touches.TWO = THREE.TOUCH.DOLLY_ROTATE;
    controls.target.set(5,0,0);
		controls.update();
    
    // ambient
    scene.add( new THREE.AmbientLight( 0x222222 ) );
    
    // light
    var light = new THREE.DirectionalLight( 0xffffff, 1 );
    light.position.set( 0, 2, 2 );
    scene.add( light );
    
    // axes
    scene.add( new THREE.AxesHelper( 20 ) );

    // geometry
    var geometry = new THREE.PlaneGeometry( 5, 5);
    
    // material
    var material = new THREE.MeshPhongMaterial( {
        color: 0x00ffff, 
        side: THREE.DoubleSide
    } );
    
    
    // mesh
    mesh = new THREE.Mesh( geometry, material );
    scene.add( mesh );
    
    var geometry2 = new THREE.PlaneGeometry( 3, 3);
    var material2 = new THREE.MeshPhongMaterial( {
        color: 0x00ffff, 
        side: THREE.DoubleSide
    } );
    mesh2 = new THREE.Mesh( geometry2, material2 );
    mesh2.position.x = 5;
    scene.add( mesh2 );
    
}

function animate()...