修改场景材质光照
This commit is contained in:
+7
-2
@@ -16,6 +16,7 @@ const ENTRIES = [
|
||||
['three', 'examples/jsm/environments/RoomEnvironment.js'],
|
||||
['three', 'examples/jsm/loaders/GLTFLoader.js'],
|
||||
['three', 'examples/jsm/loaders/DRACOLoader.js'],
|
||||
['three', 'examples/jsm/loaders/RGBELoader.js'],
|
||||
['three', 'examples/jsm/loaders/OBJLoader.js'],
|
||||
['three', 'examples/jsm/loaders/STLLoader.js'],
|
||||
['three', 'examples/jsm/loaders/ColladaLoader.js'],
|
||||
@@ -25,7 +26,10 @@ const ENTRIES = [
|
||||
['dompurify', 'dist/purify.es.mjs'],
|
||||
];
|
||||
// Draco 解码器(GLB 模型压缩用),不是 import 进来的,单独列出
|
||||
const EXTRA = ['draco_decoder.js', 'draco_decoder.wasm', 'draco_wasm_wrapper.js'].map((f) => ['three', `examples/jsm/libs/draco/gltf/${f}`]);
|
||||
const EXTRA = [
|
||||
...['draco_decoder.js', 'draco_decoder.wasm', 'draco_wasm_wrapper.js'].map((f) => ['three', `examples/jsm/libs/draco/gltf/${f}`]),
|
||||
['three', 'LICENSE'],
|
||||
];
|
||||
|
||||
const done = new Set();
|
||||
async function get(pkg, path) {
|
||||
@@ -71,7 +75,8 @@ async function fonts() {
|
||||
return n;
|
||||
}
|
||||
|
||||
rmSync(OUT, { recursive: true, force: true });
|
||||
// Only replace downloaded packages; retain notices for locally adapted code.
|
||||
for (const pkg of [...Object.keys(PKGS), 'fonts']) rmSync(join(OUT, pkg), { recursive: true, force: true });
|
||||
for (const [pkg, path] of [...ENTRIES, ...EXTRA]) await get(pkg, path);
|
||||
const n = await fonts();
|
||||
console.log(`已下载 ${done.size} 个库文件、${n} 个字体文件到 vendor/`);
|
||||
|
||||
Reference in New Issue
Block a user