PMVLedBulbEditorImg
by murgiaMarco
HTML
<html lang="en">
<head>
<title>pmvEditor</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<link type="text/css" rel="stylesheet" href="https://threejs.org/files/main.css">
</head>
<body oncontextmenu="return false;">
<script type="module">
import * as THREE from 'https://threejs.org//build/three.module.js';
import Stats from 'https://threejs.org/examples/jsm/libs/stats.module.js';
let camera, scene, renderer, stats, group, raycaster;
let buttonMouse;
let INTERSECTED;
let mouseX = 0, mouseY = 0;
let windowHalfX = window.innerWidth / 2;
let windowHalfY = window.innerHeight / 2;
let materialLedOff = new THREE.MeshBasicMaterial( {color: 0x000000} );
let materialLedOn = new THREE.MeshBasicMaterial( {color: 0xffffff} );
let ledArray = [];
let mouseDown = false;
let mouseDrag = false;
let zDistance = 10;
let hMax = 64;
let lMax = 64;
let MAXIMUM_WIDTH;
let MAXIMUM_HEIGHT;
let space = 10;
let margin = 10;
init();
animate();
function init() {
MAXIMUM_WIDTH = lMax;
MAXIMUM_HEIGHT = hMax;
var mnuItem = document.createElement("button");
mnuItem.name = name;
mnuItem.innerHTML = "ExportData";
mnuItem.addEventListener("click", readArray);
mnuItem.style.position = "absolute";
mnuItem.style.right = "0px";
document.body.appendChild(mnuItem);
var mnunput = document.createElement("input");
mnunput.type = "file";
mnunput.innerHTML = "ExportData";
/* mnunput.addEventListener("click", readArray);
*/
mnunput.style.position = "absolute";
mnunput.style.right = "90px";
...