I found this interesting code on
<!DOCTYPE html>
<!-- saved from url=(0056)https://www.benzedrine.ch/vistaprint/webgl-template.html -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<style>
body {
margin: 0px;
background-color: #000000;
overflow: hidden;
}
canvas {
position: fixed;
top: 0;
left: 0;
}
</style>
</head>
<body>
<div id="container"></div>
<div id="info">info</div>
...
</script>
</body>
</html>
After running the code, I encountered an error message:
webgl-template.html:69 Uncaught TypeError: Cannot read property 'domElement' of undefined at init (webgl-template.html:69) at webgl-template.html:154
The problematic line in the code is Line 69:
controls = new THREE.TrackballControls(camera, renderer.domElement);
If anyone can assist me with resolving this issue, I would greatly appreciate it. Thank you!