Сначала убедитесь, что вы упомянули Three.js.
<title>3D Montageanalysetool</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="#" />
<link href="index.css" rel="stylesheet" type="text/css"/>
<script src="index.js" type="text/javascript"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r79/three.min.js"></script>
<script src="threejs-viewer-master/lib/threejs/three.js" type="text/javascript"></script>
<!-- links to create a new anchor-->
<script src="threejs-viewer-master/lib/threejs/Detector.js" type="text/javascript"></script>
<script src="threejs-viewer-master/lib/threejs/MTLLoader.js" type="text/javascript"></script>
<script src="threejs-viewer-master/lib/threejs/OBJLoader.js" type="text/javascript"></script>
<script src="threejs-viewer-master/lib/threejs/OrbitControls.js" type="text/javascript"></script>
<!-- ZURBFundation links-->
<link href="ZURBF
undation / css / foundation.css "rel =" stylesheet "type =" text / css "/>
</head>
<body>
<div id="div1">
<div id="upperDiv">
<h1 id="varhead">3D-Montageanalysetool</h1>
<div id="buttonsDiv" >
<!-- Button to get send a request to the server and get the coordinates as answer and draws them-->
<button id="butLoad" class = "secondary button" onclick="onButtonLadeClick" >Lade Daten</button>
<!-- Button to set the AvarageHigh visible form the server-->
<button id="setAvarageHighVisible" class="button secondary" onclick=""> Durchschnittshöhe anzeigen</button>
<!-- Button to show reach of anchor-->
<button id="anchorReach" class="button secondary" onclick="">Reichweite Anchor
</button>
</div>
</div>
</div>
<!--show Fullscreen-->
<div id="fullscreen">
<a id="fullscr"> Fullscreen</a>
</div>
<!--canvas div-->
<div id="drawingSpace" align="center" > </div>
<!--show no Fullscreen-->
<div id="noFullscreen">
<a id="noFullscr">No Fullscreen</a>
</div>
<script>
//Detctor shows a warning if the current browser do not support WebGL.
var renderer = new THREE.WebGLRenderer();
if (renderer.isWebGLAvailable()) {
// Initiate function or other initializations here
animate();
} else {
var warning = renderer.getWebGLErrorMessage();
document.getElementById('container').appendChild(warning);
}
//renderer = new THREE.WebGLRenderer();
controls = new THREE.OrbitControls(camera, renderer.domElement);
render();
function render() {
//Renderer -> because till jet nothing is rendered onto the canvas
renderer.setPixelRatio(window.devicePixelRatio);
renderer.setSize(CANVAS_WIDTH, CANVAS_HEIGHT);
container.appendChild(renderer.domElement);
}
animate();
function animate() {
//show in browser
requestAnimationFrame(animate); //browser has to request the function animate
renderer.render(scene, camera);
}
render();
}
</script>
</body>