@@ -23,6 +23,18 @@
</head>
<body>
+ <!-- Import maps polyfill -->
+ <!-- Remove this when import maps will be widely supported -->
+ <script async src="https://unpkg.com/[email protected]/dist/es-module-shims.js"></script>
+
+ <script type="importmap">
+ {
+ "imports": {
+ "three": "../../build/three.module.js"
+ }
+ </script>
<a id='newWindow' href='./bones-browser.html' target='_blank'>Open in New Window</a>
<script type="module">
@@ -42,7 +54,7 @@
Vector3,
Uint16BufferAttribute,
WebGLRenderer
- } from '../../build/three.module.js';
+ } from 'three';
import { GUI } from '../../examples/jsm/libs/lil-gui.module.min.js';
import { OrbitControls } from '../../examples/jsm/controls/OrbitControls.js';
@@ -52,7 +64,6 @@
const state = {
animateBones: false
};
-
function initScene() {
<a id='newWindow' href='./geometry-browser.html' target='_blank'>Open in New Window</a>
@@ -62,7 +74,7 @@
WireframeGeometry,
@@ -696,7 +708,7 @@
}
//
const selectedGeometry = window.location.hash.substring( 1 );
if ( guis[ selectedGeometry ] !== undefined ) {
@@ -23,11 +23,23 @@
<a id='newWindow' href='./material-browser.html' target='_blank'>Open in New Window</a>
- import * as THREE from '../../build/three.module.js';
+ import * as THREE from 'three';
import { RoomEnvironment } from '../../examples/jsm/environments/RoomEnvironment.js';
@@ -45,9 +45,21 @@
<script src="js/libs/tern-threejs/threejs.js"></script>
<script src="js/libs/signals.min.js"></script>
+ "three": "../build/three.module.js"
- import * as THREE from '../build/three.module.js';
import { Editor } from './js/Editor.js';
import { Viewport } from './js/Viewport.js';
@@ -1,4 +1,4 @@
-import * as THREE from '../../build/three.module.js';
+import * as THREE from 'three';
import { Config } from './Config.js';
import { Loader } from './Loader.js';
function EditorControls( object, domElement ) {
import { TGALoader } from '../../examples/jsm/loaders/TGALoader.js';
import { UIPanel, UIRow, UIHorizontalRule } from './libs/ui.js';
-import { Box3, Vector3 } from '../../build/three.module.js';
+import { Box3, Vector3 } from 'three';
import { UIPanel, UIRow } from './libs/ui.js';
import { zipSync, strToU8 } from '../../examples/jsm/libs/fflate.module.js';
import { UIPanel, UIText } from './libs/ui.js';
import { UIBoolean } from './libs/ui.three.js';
import { UIRow, UIText, UINumber, UIInteger } from './libs/ui.js';
import { UIRow, UIText, UIInteger, UINumber } from './libs/ui.js';
import { UIRow, UIText, UIInteger, UICheckbox, UINumber } from './libs/ui.js';
import { UIRow, UIText, UIInteger, UICheckbox, UIButton, UINumber } from './libs/ui.js';
import { UIPoints2 } from './libs/ui.three.js';
import { UIRow, UIText, UIInteger, UIButton } from './libs/ui.js';
import { UIRow, UIText, UIInteger, UISelect, UICheckbox, UINumber } from './libs/ui.js';
import { UIPoints3 } from './libs/ui.three.js';
import { UIPanel, UIRow, UIText, UIInput, UIButton, UISpan } from './libs/ui.js';
import { UICheckbox, UINumber, UIRow, UIText } from './libs/ui.js';
import { UITexture } from './libs/ui.three.js';
import { UIButton, UIInput, UIPanel, UIRow, UISelect, UIText } from './libs/ui.js';
import { UIPanel, UIRow, UIInput, UIButton, UIColor, UICheckbox, UIInteger, UITextArea, UIText, UINumber } from './libs/ui.js';
import { UINumber, UIPanel, UIRow, UISelect, UIText } from './libs/ui.js';
import { UIPanel, UIBreak, UIRow, UIColor, UISelect, UIText, UINumber } from './libs/ui.js';
import { UIOutliner, UITexture } from './libs/ui.three.js';
import { HTMLMesh } from '../../examples/jsm/interactive/HTMLMesh.js';
import { InteractiveGroup } from '../../examples/jsm/interactive/InteractiveGroup.js';
@@ -1,6 +1,6 @@
import { UIPanel } from './libs/ui.js';
class ViewHelper extends THREE.Object3D {
import { TransformControls } from '../../examples/jsm/controls/TransformControls.js';
@@ -1,5 +1,5 @@
import { Command } from '../Command.js';
-import { ObjectLoader } from '../../../build/three.module.js';
+import { ObjectLoader } from 'three';
/**
* @param editor Editor
-import { Vector3 } from '../../../build/three.module.js';
+import { Vector3 } from 'three';
-import { Euler } from '../../../build/three.module.js';
+import { Euler } from 'three';
-import * as THREE from '../../../build/three.module.js';
import { RGBELoader } from '../../../examples/jsm/loaders/RGBELoader.js';
import { TGALoader } from '../../../examples/jsm/loaders/TGALoader.js';