Thanks Sean; here is my full html file: not working as the console.log is not honored:
<!--
Threejs Boilerplate : https://github.com/Sean-Bradley/Three.js-TypeScript-Boilerplate
Threejs Course : https://sbcode.net/threejs/
Discount Coupons : https://sbcode.net/coupons#threejs
-->
<!-- Import maps polyfill -->
<!-- Remove this when import maps will be widely supported -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Test</title>
<style>
body {
margin: 0;
}
#instructions {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
text-align: center;
font-size: 14px;
cursor: pointer;
}
</style>
</head>
<body>
<div id="blocker">
<div id="instructions">
<p style="font-size:36px">
Click to play
</p>
<p>
Hello
</p>
</div>
</div>
<script async src="https://unpkg.com/es-module-shims@1.3.6/dist/es-module-shims.js"></script>
<script type="importmap">
{
"imports": {
"three": "https://cdn.skypack.dev/three@0.138.0/build/three.module",
"three/examples/jsm/controls/PointerLockControls.js": "https://cdn.skypack.dev/three@0.138.2/examples/jsm/controls/PointerLockControls.js",
"three/examples/jsm/loaders/EXRLoader.js": "https://cdn.skypack.dev/three@0.138.2/examples/jsm/loaders/EXRLoader.js",
"three/examples/jsm/postprocessing/LUTPass.js": "https://cdn.skypack.dev/three@0.138.2/examples/jsm/postprocessing/LUTPass.js",
"three/examples/jsm/loaders/LUTCubeLoader.js": "https://cdn.skypack.dev/three@0.138.2/examples/jsm/loaders/LUTCubeLoader.js",
"three/examples/jsm/shaders/GammaCorrectionShader.js": "https://cdn.skypack.dev/three@0.138.2/examples/jsm/shaders/GammaCorrectionShader.js",
"three/examples/jsm/postprocessing/EffectComposer.js": "https://cdn.skypack.dev/three@0.138.2/examples/jsm/postprocessing/EffectComposer.js",
"three/examples/jsm/postprocessing/RenderPass.js": "https://cdn.skypack.dev/three@0.138.2/examples/jsm/postprocessing/RenderPass.js",
"three/examples/jsm/postprocessing/ShaderPass.js": "https://cdn.skypack.dev/three@0.138.2/examples/jsm/postprocessing/ShaderPass.js",
"three/examples/jsm/nodes/Nodes.js": "https://cdn.skypack.dev/three@0.138.2/examples/jsm/nodes/Nodes.js"
}
}
</script>
<script type="module">
import {
Color,
Camera,
Material,
Texture,
ShaderMaterial,
UniformsUtils,
BackSide,
FrontSide,
DoubleSide,
BoxGeometry,
PlaneGeometry,
Vector3,
Mesh,
InstancedMesh,
Math,
MeshStandardMaterial,
MathUtils,
Clock,
Raycaster,
Scene,
PerspectiveCamera,
WebGLRenderer,
WebGLRenderTarget,
RGBAFormat,
LinearFilter,
sRGBEncoding,
ACESFilmicToneMapping,
GridHelper,
AxesHelper,
AmbientLight,
DirectionalLight,
BufferAttribute,
Matrix4,
BufferGeometry,
Object3D,
TextureLoader,
RepeatWrapping,
Shape,
MeshPhongMaterial,
ExtrudeGeometry,
Vector2,
Path,
EquirectangularReflectionMapping,
} from 'three';
import { PointerLockControls } from "three/examples/jsm/controls/PointerLockControls.js";
import { EXRLoader } from "three/examples/jsm/loaders/EXRLoader.js";
import { LUTPass } from 'three/examples/jsm/postprocessing/LUTPass.js';
import { LUTCubeLoader } from 'three/examples/jsm/loaders/LUTCubeLoader.js';
import { GammaCorrectionShader } from 'three/examples/jsm/shaders/GammaCorrectionShader.js';
import { EffectComposer } from 'three/examples/jsm/postprocessing/EffectComposer.js';
import { RenderPass } from 'three/examples/jsm/postprocessing/RenderPass.js';
import { ShaderPass } from 'three/examples/jsm/postprocessing/ShaderPass.js';
import * as Nodes from 'three/examples/jsm/nodes/Nodes.js';
console.log("Can you read it in your console?")
</script>
</body>
</html>
Nothing is thrown in the console, meaning the code as issue executing. Why?
Now, it is PointerLock not having a default error…
For your info, I use the latest Firefox. And tested in the latest Chromium.
Same result if I create a separate js file and import in the import map as:
“launcher”: “./bundle.js”