From 9776a1286097c1e1e7022ccb4b677353cc2e2873 Mon Sep 17 00:00:00 2001 From: Amamiya Miu Date: Tue, 24 Feb 2026 13:09:33 +0800 Subject: [PATCH] fix: repair 3d life module imports --- public/demo/game-of-life/3d-life/index.html | 8 ++++++++ public/demo/game-of-life/3d-life/life3d.js | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/public/demo/game-of-life/3d-life/index.html b/public/demo/game-of-life/3d-life/index.html index 1fca3d2..7acae8f 100644 --- a/public/demo/game-of-life/3d-life/index.html +++ b/public/demo/game-of-life/3d-life/index.html @@ -29,6 +29,14 @@

关于这个实验

+ diff --git a/public/demo/game-of-life/3d-life/life3d.js b/public/demo/game-of-life/3d-life/life3d.js index dd1d8f7..bbb4f25 100644 --- a/public/demo/game-of-life/3d-life/life3d.js +++ b/public/demo/game-of-life/3d-life/life3d.js @@ -1,5 +1,5 @@ -import * as THREE from 'https://cdn.jsdelivr.net/npm/three@0.159/build/three.module.js'; -import { OrbitControls } from 'https://cdn.jsdelivr.net/npm/three@0.159/examples/jsm/controls/OrbitControls.js'; +import * as THREE from 'three'; +import { OrbitControls } from 'three/addons/controls/OrbitControls.js'; const canvas = document.getElementById('life-3d'); const renderer = new THREE.WebGLRenderer({ canvas, antialias: true, alpha: true });