Safari supports importmap as of 16.4 (March 26, 2023) 🎉
<label for="auto-rotate">Auto Rotate</label>
</div>
- <script async src="https://cdn.jsdelivr.net/npm/es-module-shims@1.6.3/dist/es-module-shims.min.js"></script>
-
<script type="importmap">
{
"imports": {
<script type="module">
// Importing three.js from direct CDN URL is broken after v0.127.0. Instead, importmap is required.
- // importmap is not supported on Safari (January 2023). So es-module-shims polyfill is required
- // to support Safari.
+ // importmap is supported on all modern web browsers as of March 26, 2023.
import * as THREE from 'three';
import { OrbitControls } from 'OrbitControls';
import { FontLoader } from 'FontLoader';