Skip to content

Instantly share code, notes, and snippets.

@Sean-Bradley
Created September 25, 2021 11:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Sean-Bradley/1ad4184edca352e643d7a269f878a571 to your computer and use it in GitHub Desktop.
Save Sean-Bradley/1ad4184edca352e643d7a269f878a571 to your computer and use it in GitHub Desktop.
HTML for a basic Three.js boilerplate that uses import maps.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Three.js Tutorials by Sean Bradley : https://sbcode.net/threejs/</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body {
overflow: hidden;
margin: 0px;
}
</style>
<script type="importmap">
{
"imports": {
"three": "./build/three.module.js",
"three/examples/jsm/controls/OrbitControls":"./jsm/controls/OrbitControls.js",
"three/examples/jsm/libs/stats.module":"./jsm/libs/stats.module.js",
"three/examples/jsm/libs/dat.gui.module":"./jsm/libs/dat.gui.module.js"
}
}
</script>
</head>
<body>
<script type="module" src="client.js"></script>
</body>
</html>
@Sean-Bradley
Copy link
Author

This is the HTML from one of my Three.js boilerplates at https://github.com/Sean-Bradley/Threejs-Boilerplate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment