Just starting out in JavaScript and experimenting with animations using three.js library.
I'm trying to grasp the meaning behind: const scene = new THREE.Scene();
Why is the "THREE" necessary in THREE.Scene? Could we not simply write const scene = new Scene(); instead?
Where does "THREE" originate from within the library itself?
Below is my HTML file:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script src="./three.js"></script>
<script src="./script.js"></script>
</body>
</html>
My JS file only includes console.log(THREE) which returns an object in the console log.
If anyone could explain where THREE originates from, I would greatly appreciate it.
Thank you for your assistance.