-
Notifications
You must be signed in to change notification settings - Fork 480
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
demo: Update three.js dependencies to r154
Since examples switched to import maps this requires an import map shim so that we still support older Safari versions. Eventually the shim can go away.
- Loading branch information
Showing
2 changed files
with
25 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,16 @@ | |
} | ||
#info a, .button { color: #f00; font-weight: bold; text-decoration: underline; cursor: pointer } | ||
</style> | ||
|
||
<script async src="https://unpkg.com/[email protected]/dist/es-module-shims.js"></script> | ||
<script type="importmap"> | ||
{ | ||
"imports": { | ||
"three": "https://unpkg.com/[email protected]/build/three.module.js", | ||
"three-examples/": "https://unpkg.com/[email protected]/examples/jsm/" | ||
} | ||
} | ||
</script> | ||
</head> | ||
|
||
<body> | ||
|
@@ -31,8 +41,8 @@ | |
</div> | ||
|
||
<script type="module"> | ||
import * as THREE from 'https://unpkg.com/three@0.122.0/build/three.module.js'; | ||
import { GLTFLoader } from 'https://unpkg.com/three@0.122.0/examples/jsm/loaders/GLTFLoader.js'; | ||
import * as THREE from 'three'; | ||
import { GLTFLoader } from 'three-examples/loaders/GLTFLoader.js'; | ||
import { MeshoptDecoder } from '../js/meshopt_decoder.module.js'; | ||
|
||
var container; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,16 @@ | |
} | ||
#info a, .button { color: #f00; font-weight: bold; text-decoration: underline; cursor: pointer } | ||
</style> | ||
|
||
<script async src="https://unpkg.com/[email protected]/dist/es-module-shims.js"></script> | ||
<script type="importmap"> | ||
{ | ||
"imports": { | ||
"three": "https://unpkg.com/[email protected]/build/three.module.js", | ||
"three-examples/": "https://unpkg.com/[email protected]/examples/jsm/" | ||
} | ||
} | ||
</script> | ||
</head> | ||
|
||
<body> | ||
|
@@ -31,9 +41,9 @@ | |
</div> | ||
|
||
<script type="module"> | ||
import * as THREE from 'https://unpkg.com/three@0.122.0/build/three.module.js'; | ||
import { GLTFLoader } from 'https://unpkg.com/three@0.122.0/examples/jsm/loaders/GLTFLoader.js'; | ||
import { OrbitControls } from 'https://unpkg.com/three@0.122.0/examples/jsm/controls/OrbitControls.js'; | ||
import * as THREE from 'three'; | ||
import { GLTFLoader } from 'three-examples/loaders/GLTFLoader.js'; | ||
import { OrbitControls } from 'three-examples/controls/OrbitControls.js'; | ||
import { MeshoptDecoder } from '../js/meshopt_decoder.module.js'; | ||
import { MeshoptSimplifier } from '../js/meshopt_simplifier.module.js'; | ||
import { GUI } from 'https://unpkg.com/[email protected]/dist/lil-gui.esm.js'; | ||
|