From 218f4f31f08c903d5c8c04442a789a7cd9413c65 Mon Sep 17 00:00:00 2001 From: ErSan Date: Thu, 5 Mar 2026 11:11:02 +0800 Subject: [PATCH] =?UTF-8?q?fix(sdk):=20=E7=A1=AE=E4=BF=9D=E6=89=80?= =?UTF-8?q?=E6=9C=89Object3D=E5=AF=B9=E8=B1=A1=E5=8E=9F=E5=9E=8B=E9=93=BE?= =?UTF-8?q?=E4=B8=80=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 - packages/sdk/lib/core/app/App.ts | 232 +++++------ packages/sdk/lib/core/expansion/Object3D.ts | 40 +- pnpm-lock.yaml | 401 ++++++++++++-------- 4 files changed, 393 insertions(+), 282 deletions(-) diff --git a/.gitignore b/.gitignore index e9f80d8..54f07af 100644 --- a/.gitignore +++ b/.gitignore @@ -12,8 +12,6 @@ dist dist-ssr *.local -packages/examples - # Editor directories and files .vscode/* !.vscode/extensions.json diff --git a/packages/sdk/lib/core/app/App.ts b/packages/sdk/lib/core/app/App.ts index 329c41d..4353529 100644 --- a/packages/sdk/lib/core/app/App.ts +++ b/packages/sdk/lib/core/app/App.ts @@ -8,11 +8,11 @@ import * as THREE from 'three'; // 原生three的扩展 import '../expansion'; import Logger from "@/utils/log/Logger"; -import {Config,Storage,Project,Selector,History as _History,Resource,CSM} from "./modules"; +import { Config, Storage, Project, Selector, History as _History, Resource, CSM } from "./modules"; import { AnimationManager } from "../animation/AnimationManager"; -import {useAddSignal, useDispatchSignal, useSetSignalActive} from '@/hooks'; +import { useAddSignal, useDispatchSignal, useSetSignalActive } from '@/hooks'; import Loader from "@/core/loader/Loader.ts"; -import {AddScriptCommand,RemoveScriptCommand} from "@/core/commands/Commands.ts"; +import { AddScriptCommand, RemoveScriptCommand } from "@/core/commands/Commands.ts"; import Viewer from "@/core/viewer/Viewer.ts"; const _DEFAULT_CAMERA = new THREE.PerspectiveCamera(45, 1, 0.01, 100 * 1000); @@ -49,27 +49,27 @@ export class App { /** * 场景中的几何数据集合 */ - public geometries:{[uuid:string]:THREE.BufferGeometry}= {}; + public geometries: { [uuid: string]: THREE.BufferGeometry } = {}; /** * 场景中的材质集合 */ - public materials:{[uuid:string]:THREE.Material} = {}; + public materials: { [uuid: string]: THREE.Material } = {}; /** * 场景中的贴图集合 */ - public textures:{[uuid:string]:THREE.Texture} = {}; + public textures: { [uuid: string]: THREE.Texture } = {}; /** * 场景中的脚本集合 */ - public scripts:ISceneJson['scripts'] = {}; + public scripts: ISceneJson['scripts'] = {}; /** * 场景中的辅助集合 */ - public helpers:Record = {}; + public helpers: Record = {}; /** * 场景中的相机集合 @@ -89,12 +89,12 @@ export class App { /** * 场景选中的模型 */ - public selected:THREE.Object3D | null = null; + public selected: THREE.Object3D | null = null; /** * 场景锁定的模型 */ - public locked:THREE.Object3D | null = null; + public locked: THREE.Object3D | null = null; /** * 日志记录 @@ -144,14 +144,14 @@ export class App { /** * 间隔多长时间渲染渲染一次,用于固定fps上限(单位秒) */ - public singleFrameTime:number = 1 / this.FPS; + public singleFrameTime: number = 1 / this.FPS; /** * 当前视口示例,实例化视口时赋值 */ - public viewer:Viewer | null = null; + public viewer: Viewer | null = null; - constructor(){ + constructor() { this.scene.name = "默认场景"; this.addCamera(this.camera); @@ -162,7 +162,7 @@ export class App { /** * 获取渲染帧率上限 */ - get FPS():number{ + get FPS(): number { return this.project.getKey("renderer.fps"); } @@ -170,8 +170,8 @@ export class App { * 设置渲染帧率上限 * @param fps */ - set FPS(fps:number){ - this.project.setKey("renderer.fps",fps,false); + set FPS(fps: number) { + this.project.setKey("renderer.fps", fps, false); this.singleFrameTime = fps ? (1 / fps) : 0; } @@ -179,7 +179,7 @@ export class App { /** * 设置初始配置 */ - setConfig(_config:Record){ + setConfig(_config: Record) { this.config.setConfig(_config); } @@ -187,8 +187,8 @@ export class App { * 生成场景 * @param scene */ - setScene(scene:THREE.Scene) { - this.scene.copy(scene,false) + setScene(scene: THREE.Scene) { + this.scene.copy(scene, false) // copy方法不会复制uuid,需要手动赋值 this.scene.uuid = scene.uuid; if (this.scene.animations && this.scene.animations.length > 0) this.clipAction(this.scene); @@ -210,24 +210,24 @@ export class App { * 剪辑动画 * @param object */ - clipAction(object:THREE.Object3D){ + clipAction(object: THREE.Object3D) { if (!object.animations || !object.animations.length) return; // 每个包含动画的模型都会有自己的混合器,因为如果采用共用scene混合器方案会造成全场景动画播放进度统一的情况 let mixer = this.animationManager.mixerMap.get(object.uuid); - if(!mixer){ + if (!mixer) { mixer = new THREE.AnimationMixer(object); this.animationManager.mixerMap.set(object.uuid, mixer); } - object.animations.forEach((animation,index) => { + object.animations.forEach((animation, index) => { if ((animation instanceof THREE.AnimationAction) && animation.getClip()) { this.animationManager.actionMap.set(animation.getClip().uuid, animation) return; } - if(!(animation instanceof THREE.AnimationClip)) return; + if (!(animation instanceof THREE.AnimationClip)) return; const action = (mixer).clipAction(animation, object); // @ts-ignore @@ -243,7 +243,17 @@ export class App { * @param parent * @param index */ - addObject(object:THREE.Object3D, parent?:THREE.Object3D, index?:number) { + addObject(object: THREE.Object3D, parent?: THREE.Object3D, index?: number) { + // 使用自己版本threejs(比如插件)创建的物体调用此方法时需要递归修复原型链 + const fixPrototypeChain = (obj: THREE.Object3D) => { + if (!obj.traverseByCondition) { + Object.setPrototypeOf(obj, THREE.Object3D.prototype); + } + obj.children.forEach(child => child.traverse(c => fixPrototypeChain(c))); + }; + + fixPrototypeChain(object); + object.traverseByCondition((child) => { if (child.animations && child.animations.length > 0) this.clipAction(child); if (child.geometry !== undefined) this.addGeometry(child.geometry); @@ -275,7 +285,7 @@ export class App { * @param parent * @param before */ - moveObject(object:THREE.Object3D, parent:THREE.Object3D, before:THREE.Object3D) { + moveObject(object: THREE.Object3D, parent: THREE.Object3D, before: THREE.Object3D) { if (parent === undefined) { parent = this.scene; } @@ -297,7 +307,7 @@ export class App { * @param object * @param name */ - nameObject(object:THREE.Object3D, name:string) { + nameObject(object: THREE.Object3D, name: string) { object.name = name; useDispatchSignal('sceneGraphChanged'); } @@ -306,16 +316,16 @@ export class App { * 移除模型 * @param object */ - removeObject(object:THREE.Object3D) { + removeObject(object: THREE.Object3D) { // 由于含有ignore属性的对象与业务关联,不受scene管控 // object.parent === null避免删除相机或场景 if (object.parent === null || object.ignore) return; - object.traverseByCondition((child:THREE.Object3D) => { + object.traverseByCondition((child: THREE.Object3D) => { this.removeCamera(child); this.removeHelper(child); if (child.material !== undefined) this.removeMaterial(child.material); - }, (child:THREE.Object3D) => !child.ignore); + }, (child: THREE.Object3D) => !child.ignore); object.parent.remove(object); @@ -327,7 +337,7 @@ export class App { * 添加几何数据 * @param geometry */ - addGeometry(geometry:THREE.BufferGeometry) { + addGeometry(geometry: THREE.BufferGeometry) { this.geometries[geometry.uuid] = geometry; } @@ -336,7 +346,7 @@ export class App { * @param geometry * @param name */ - setGeometryName(geometry:THREE.BufferGeometry, name:string) { + setGeometryName(geometry: THREE.BufferGeometry, name: string) { geometry.name = name; useDispatchSignal('sceneGraphChanged'); } @@ -345,7 +355,7 @@ export class App { * 场景中新增材质 * @param material */ - addMaterial(material:THREE.Material | THREE.Material[]) { + addMaterial(material: THREE.Material | THREE.Material[]) { if (Array.isArray(material)) { for (let i = 0, l = material.length; i < l; i++) { this.addMaterialToRefCounter(material[i]); @@ -361,7 +371,7 @@ export class App { * 新增材质的使用计数 * @param material */ - addMaterialToRefCounter(material:THREE.Material) { + addMaterialToRefCounter(material: THREE.Material) { let materialsRefCounter = this.materialsRefCounter; let count = materialsRefCounter.get(material); @@ -382,7 +392,7 @@ export class App { * 场景中移除材质 * @param material */ - removeMaterial(material:THREE.Material | THREE.Material[]) { + removeMaterial(material: THREE.Material | THREE.Material[]) { if (Array.isArray(material)) { for (let i = 0, l = material.length; i < l; i++) { this.removeMaterialFromRefCounter(material[i]); @@ -398,7 +408,7 @@ export class App { * 移除材质时减少对应材质使用计数 * @param material */ - removeMaterialFromRefCounter(material:THREE.Material) { + removeMaterialFromRefCounter(material: THREE.Material) { let materialsRefCounter = this.materialsRefCounter; let count = materialsRefCounter.get(material) as number; count--; @@ -415,7 +425,7 @@ export class App { * 通过材质uuid获取材质 * @param uuid */ - getMaterialByUuid(uuid:string) { + getMaterialByUuid(uuid: string) { return this.materials[uuid]; } @@ -424,7 +434,7 @@ export class App { * @param material * @param name */ - setMaterialName(material:THREE.Material, name:string) { + setMaterialName(material: THREE.Material, name: string) { material.name = name; useDispatchSignal('sceneGraphChanged'); } @@ -433,7 +443,7 @@ export class App { * 场景中新增贴图 * @param texture */ - addTexture(texture:THREE.Texture) { + addTexture(texture: THREE.Texture) { this.textures[texture.uuid] = texture; } @@ -441,7 +451,7 @@ export class App { * 场景中新增相机 * @param camera */ - addCamera(camera:THREE.Camera) { + addCamera(camera: THREE.Camera) { if (camera.isCamera) { this.cameras[camera.uuid] = camera; useDispatchSignal('cameraAdded', camera); @@ -452,7 +462,7 @@ export class App { * 场景中移除相机 * @param camera */ - removeCamera(camera:THREE.Camera | THREE.Object3D) { + removeCamera(camera: THREE.Camera | THREE.Object3D) { if (this.cameras[camera.uuid] !== undefined) { delete this.cameras[camera.uuid]; useDispatchSignal('cameraRemoved', camera); @@ -464,7 +474,7 @@ export class App { * @param object * @param helper */ - addHelper(object:any, helper?:THREE.Object3D) { + addHelper(object: any, helper?: THREE.Object3D) { if (helper === undefined) { if (object.isCamera) { helper = new THREE.CameraHelper(object); @@ -486,7 +496,7 @@ export class App { } let geometry = new THREE.SphereGeometry(2, 4, 2); - let material = new THREE.MeshBasicMaterial({color: 0xff0000, visible: false}); + let material = new THREE.MeshBasicMaterial({ color: 0xff0000, visible: false }); const picker = new THREE.Mesh(geometry, material); picker.name = 'picker'; picker.proxy = object; @@ -501,7 +511,7 @@ export class App { * 移除某个模型上的三维辅助工具 * @param object */ - removeHelper(object:THREE.Object3D) { + removeHelper(object: THREE.Object3D) { if (this.helpers[object.id] !== undefined) { const helper = this.helpers[object.id]; helper.parent?.remove(helper); @@ -514,8 +524,8 @@ export class App { * @param object * @param script */ - addScript(object:THREE.Object3D, script:ISceneScript) { - this.execute(new AddScriptCommand(object,script)); + addScript(object: THREE.Object3D, script: ISceneScript) { + this.execute(new AddScriptCommand(object, script)); } /** @@ -523,8 +533,8 @@ export class App { * @param object * @param script */ - removeScript(object:THREE.Object3D, script:ISceneScript) { - this.execute(new RemoveScriptCommand(object,script)); + removeScript(object: THREE.Object3D, script: ISceneScript) { + this.execute(new RemoveScriptCommand(object, script)); } /** @@ -532,7 +542,7 @@ export class App { * @param object * @param slot */ - getObjectMaterial(object:THREE.Object3D, slot:number) { + getObjectMaterial(object: THREE.Object3D, slot: number) { let material = object.material; if (Array.isArray(material) && slot !== undefined) { @@ -547,7 +557,7 @@ export class App { * @param slot * @param newMaterial */ - setObjectMaterial(object:THREE.Object3D, slot:number | undefined, newMaterial:THREE.Material) { + setObjectMaterial(object: THREE.Object3D, slot: number | undefined, newMaterial: THREE.Material) { if (Array.isArray(object.material) && slot !== undefined) { object.material[slot] = newMaterial; } else { @@ -577,7 +587,7 @@ export class App { * 选中模型 * @param object */ - select(object:THREE.Object3D) { + select(object: THREE.Object3D) { this.selector.select(object); } @@ -585,7 +595,7 @@ export class App { * 通过模型id选中模型 * @param id */ - selectById(id:number) { + selectById(id: number) { if (id === this.camera.id) { this.select(this.camera); return; @@ -600,9 +610,9 @@ export class App { * 通过模型uuid选中模型 * @param uuid */ - selectByUuid(uuid:string) { + selectByUuid(uuid: string) { const scope = this; - this.scene.traverse(function (child:THREE.Object3D) { + this.scene.traverse(function (child: THREE.Object3D) { if (child.uuid === uuid) { scope.select(child); } @@ -620,8 +630,8 @@ export class App { * 锁定模型 * @param object */ - lock(object?:THREE.Object3D | null){ - if(!object){ + lock(object?: THREE.Object3D | null) { + if (!object) { object = this.selected; } @@ -634,7 +644,7 @@ export class App { /** * 取消模型锁定状态 */ - unlock(){ + unlock() { this.locked = null; useDispatchSignal('objectUnlocked'); } @@ -643,7 +653,7 @@ export class App { * 相机聚焦模型 * @param object */ - focus(object:THREE.Object3D) { + focus(object: THREE.Object3D) { if (object !== undefined) { useDispatchSignal('objectFocused', object); } @@ -653,7 +663,7 @@ export class App { * 通过id聚焦模型 * @param id */ - focusById(id:number) { + focusById(id: number) { const obj = this.scene.getObjectById(id); obj && this.focus(obj); @@ -663,7 +673,7 @@ export class App { * 通过uuid聚焦模型 * @param uuid */ - focusByUuid(uuid:string) { + focusByUuid(uuid: string) { if (uuid === undefined) { this.deselect(); return; @@ -677,7 +687,7 @@ export class App { * 通过uuid获取模型 * @param uuid */ - getObjectByUuid(uuid:string) { + getObjectByUuid(uuid: string) { return this.scene.getObjectByProperty('uuid', uuid); } @@ -685,7 +695,7 @@ export class App { * 遍历平铺所有子级mesh * @param object */ - traverseMeshToArr(object:THREE.Object3D) { + traverseMeshToArr(object: THREE.Object3D) { if (object.isMesh) return [object]; const arr: THREE.Mesh[] = []; @@ -720,7 +730,7 @@ export class App { * @param textures * @param properties */ - createPBRMaterial(textures: { [type: string]:string | THREE.Texture } = {},properties:any = {}):Promise { + createPBRMaterial(textures: { [type: string]: string | THREE.Texture } = {}, properties: any = {}): Promise { return new Promise((resolve, reject) => { const material = new THREE.MeshStandardMaterial({ // 位移贴图对网格的影响程度默认设置为0 @@ -731,10 +741,10 @@ export class App { material[key] = properties[key]; }); - const num = new Proxy({value: 10},{ + const num = new Proxy({ value: 10 }, { set(target: { value: number }, p: string | symbol, newValue: any): boolean { target[p] = newValue; - if(p === 'value' && newValue === 0){ + if (p === 'value' && newValue === 0) { resolve(material); } @@ -743,141 +753,141 @@ export class App { }) // 基础颜色贴图(高光反射/光泽度工作流:diffuse, 金属/粗糙度工作流:baseColor) - if(textures.baseColor){ - this.resource.loadURLTexture(textures.baseColor,(texture => { + if (textures.baseColor) { + this.resource.loadURLTexture(textures.baseColor, (texture => { material.map = texture; num.value--; - }),err => { + }), err => { reject(err); }); - }else{ + } else { num.value--; } // 法线贴图 - if(textures.normal){ - this.resource.loadURLTexture(textures.normal,(texture => { + if (textures.normal) { + this.resource.loadURLTexture(textures.normal, (texture => { material.normalMap = texture; num.value--; - }),err => { + }), err => { reject(err); }); - }else if(textures.bump){ + } else if (textures.bump) { // 凹凸贴图(如果定义了法线贴图,则将忽略该贴图) - this.resource.loadURLTexture(textures.bump,(texture => { + this.resource.loadURLTexture(textures.bump, (texture => { material.bumpMap = texture; num.value--; - }),err => { + }), err => { reject(err); }); - }else{ + } else { num.value--; } // 置换贴图(位移贴图) - if(textures.displacement){ - this.resource.loadURLTexture(textures.displacement,(texture => { + if (textures.displacement) { + this.resource.loadURLTexture(textures.displacement, (texture => { material.displacementMap = texture; num.value--; - }),err => { + }), err => { reject(err); }); - }else{ + } else { num.value--; } // 粗糙度贴图 - if(textures.roughness){ - this.resource.loadURLTexture(textures.roughness,(texture => { + if (textures.roughness) { + this.resource.loadURLTexture(textures.roughness, (texture => { material.roughnessMap = texture; num.value--; - }),err => { + }), err => { reject(err); }); - }else{ + } else { num.value--; } // 金属度贴图 - if(textures.metalness){ - this.resource.loadURLTexture(textures.metalness,(texture => { + if (textures.metalness) { + this.resource.loadURLTexture(textures.metalness, (texture => { material.metalnessMap = texture; num.value--; - }),err => { + }), err => { reject(err); }); - }else{ + } else { num.value--; } // 环境遮挡贴图 - if(textures.ao){ - this.resource.loadURLTexture(textures.ao,(texture => { + if (textures.ao) { + this.resource.loadURLTexture(textures.ao, (texture => { material.aoMap = texture; num.value--; - }),err => { + }), err => { reject(err); }); - }else{ + } else { num.value--; } // 自发光贴图 - if(textures.emissive){ - this.resource.loadURLTexture(textures.emissive,(texture => { + if (textures.emissive) { + this.resource.loadURLTexture(textures.emissive, (texture => { material.emissiveMap = texture; num.value--; - }),err => { + }), err => { reject(err); }); - }else{ + } else { num.value--; } // 透明贴图 - if(textures.alpha){ - this.resource.loadURLTexture(textures.alpha,(texture => { + if (textures.alpha) { + this.resource.loadURLTexture(textures.alpha, (texture => { material.alphaMap = texture; num.value--; - }),err => { + }), err => { reject(err); }); - }else{ + } else { num.value--; } // 环境贴图(一般不会设置,因为会使用scene.environment) - if(textures.env){ - this.resource.loadURLTexture(textures.env,(texture => { + if (textures.env) { + this.resource.loadURLTexture(textures.env, (texture => { material.envMap = texture; num.value--; - }),err => { + }), err => { reject(err); }); - }else{ + } else { num.value--; } // 光照贴图 - if(textures.light){ - this.resource.loadURLTexture(textures.light,(texture => { + if (textures.light) { + this.resource.loadURLTexture(textures.light, (texture => { material.lightMap = texture; num.value--; - }),err => { + }), err => { reject(err); }); - }else{ + } else { num.value--; } }) @@ -898,7 +908,7 @@ export class App { this.scene.environment = null; this.scene.fog = null; - for(let i = this.scene.children.length - 1; i >= 0; i--){ + for (let i = this.scene.children.length - 1; i >= 0; i--) { this.removeObject(this.scene.children[i]); } @@ -942,9 +952,9 @@ export class App { const scene = this.setScene(await loader.parseAsync(sceneJson.scene) as THREE.Scene); // 20250718: 环境类型是ModelViewer时需要手动设置,因为scene.toJSON()不会处理renderTargetTexture - switch(sceneJson.scene.object.environmentType){ + switch (sceneJson.scene.object.environmentType) { case "ModelViewer": - useDispatchSignal("sceneEnvironmentChanged",'ModelViewer'); + useDispatchSignal("sceneEnvironmentChanged", 'ModelViewer'); useDispatchSignal("sceneGraphChanged"); break } @@ -990,7 +1000,7 @@ export class App { * @param cmd * @param optionalName */ - execute(cmd, optionalName?:string) { + execute(cmd, optionalName?: string) { this.history.execute(cmd, optionalName); } diff --git a/packages/sdk/lib/core/expansion/Object3D.ts b/packages/sdk/lib/core/expansion/Object3D.ts index 0f9c4ce..8f1d705 100644 --- a/packages/sdk/lib/core/expansion/Object3D.ts +++ b/packages/sdk/lib/core/expansion/Object3D.ts @@ -5,15 +5,29 @@ import * as THREE from "three"; * @param callback - 以一个object3D对象作为第一个参数的函数。 * @param condition - 需要满足该条件才继续后续回调的条件函数 */ -THREE.Object3D.prototype.traverseByCondition = function(callback, condition){ +THREE.Object3D.prototype.traverseByCondition = function (callback, condition) { if (!condition(this)) return; callback(this); const children = this.children; + // 优先使用子对象的traverseByCondition方法,如果没有则降级兜底 + const fallbackFn = (child) => { + if (condition(child)) { + callback(child); + } + child.children.forEach(grandChild => fallbackFn(grandChild)); + } + for (let i = 0, l = children.length; i < l; i++) { - children[i].traverseByCondition(callback, condition); + // @ts-ignore + if (children[i].traverseByCondition) { + children[i].traverseByCondition(callback, condition); + } else { + // 降级兜底 + fallbackFn(children[i]); + } } } @@ -21,8 +35,8 @@ THREE.Object3D.prototype.traverseByCondition = function(callback, condition){ * 判断 parentObj 是否是 当前对象 的任意层级祖先(包括祖父、曾祖父等) * @param parentObj - 可能是祖先的对象 */ -THREE.Object3D.prototype.isAncestor = function(parentObj) { - let current:THREE.Object3D | null = this; +THREE.Object3D.prototype.isAncestor = function (parentObj) { + let current: THREE.Object3D | null = this; while (current) { if (current === parentObj) return true; current = current.parent; @@ -33,7 +47,7 @@ THREE.Object3D.prototype.isAncestor = function(parentObj) { /** * 重写toJSON方法 */ -THREE.Object3D.prototype.toJSON = function(meta:any) { +THREE.Object3D.prototype.toJSON = function (meta: any) { // 当从JSON.stringify调用时,meta是一个字符串 const isRootObject = (meta === undefined || typeof meta === 'string'); @@ -60,7 +74,7 @@ THREE.Object3D.prototype.toJSON = function(meta:any) { } // 标准Object3D序列化 - const object:any = { + const object: any = { uuid: this.uuid, type: this.type }; @@ -184,14 +198,14 @@ THREE.Object3D.prototype.toJSON = function(meta:any) { // 判断元数据是否含有材质 // 创建新变量替代,不然正在使用的材质被还原回this.metaData.material会造成播放异常 let _material = this.material; - if(this.metaData?.material){ - if (this.metaData.material instanceof THREE.Material){ + if (this.metaData?.material) { + if (this.metaData.material instanceof THREE.Material) { _material = this.metaData.material; } } if (Array.isArray(_material)) { - const uuids:string[] = []; + const uuids: string[] = []; for (let i = 0, l = _material.length; i < l; i++) { uuids.push(serialize(meta.materials, _material[i])); @@ -217,10 +231,10 @@ THREE.Object3D.prototype.toJSON = function(meta:any) { for (let i = 0; i < this.animations.length; i++) { let animation = this.animations[i]; // 20250306 修复动画导出问题(代码中处理了object3D.animations,此属性下是AnimationAction数组) - if(animation instanceof THREE.AnimationAction){ + if (animation instanceof THREE.AnimationAction) { animation = animation.getClip(); } - if(!animation) continue; + if (!animation) continue; object.animations.push(serialize(meta.animations, animation)); } @@ -244,7 +258,7 @@ THREE.Object3D.prototype.toJSON = function(meta:any) { if (skeletons.length > 0) output.skeletons = skeletons; if (animations.length > 0) output.animations = animations.map(animation => { animation.tracks = animation.tracks.map(track => { - if(!track.type){ + if (!track.type) { track.type = 'vector'; } return track; @@ -261,7 +275,7 @@ THREE.Object3D.prototype.toJSON = function(meta:any) { // 从缓存哈希中提取数据,删除每个项目上的元数据并作为数组返回 function extractFromCache(cache) { - const values:any = []; + const values: any = []; for (const key in cache) { const data = cache[key]; delete data.metadata; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d4c2333..bc1c162 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -39,7 +39,11 @@ catalogs: importers: - .: {} + .: + devDependencies: + prettier: + specifier: ^3.7.4 + version: 3.8.1 common/build: devDependencies: @@ -107,14 +111,14 @@ importers: specifier: workspace:^ version: link:../sdk '@gltf-transform/core': - specifier: ^4.0.8 - version: 4.1.3 + specifier: ^4.2.1 + version: 4.3.0 '@gltf-transform/extensions': - specifier: ^4.0.8 - version: 4.1.3 + specifier: ^4.2.1 + version: 4.3.0 '@gltf-transform/functions': - specifier: ^4.0.8 - version: 4.1.3 + specifier: ^4.2.1 + version: 4.3.0 '@vicons/carbon': specifier: ^0.12.0 version: 0.12.0 @@ -1044,8 +1048,8 @@ packages: '@dxfom/mtext@0.3.2': resolution: {integrity: sha512-QL2XYBiAidjKYe0W04Icz051P9V0EBh6H7R0rcrvcUEPGr7PzLBYRt+f9X4WOnBGuoGlTKJ/7NKPRYUCCSkVYg==} - '@emnapi/runtime@1.4.3': - resolution: {integrity: sha512-pBPWdu6MLKROBX05wSNKcNb++m5Er+KQ9QkB+WVM+pW2Kx9hoSrVTnu3BdkI5eBLZoKu/J6mW/B6i6bJB2ytXQ==} + '@emnapi/runtime@1.8.1': + resolution: {integrity: sha512-mehfKSMWjjNol8659Z8KxEMrdSJDDot5SXMq00dM8BN4o+CLNXQ0xH2V7EchNHV4RmbZLmmPdEaXZc5H2FXmDg==} '@emotion/hash@0.8.0': resolution: {integrity: sha512-kBJtf7PH6aWwZ6fka3zQ0p6SBYzx4fl1LoZXE2RrnYST9Xljm7WfKJrU4g/Xr3Beg72MLrp1AWNUmuYJTL7Cow==} @@ -1206,14 +1210,14 @@ packages: cpu: [x64] os: [win32] - '@gltf-transform/core@4.1.3': - resolution: {integrity: sha512-N+73Vo9DTXV2QmsnetLRY4q3z0Q0oyH0i/ymvzEkgpgNEAq+RP73ZLY0HK+Ia0rTUMgFwQHFNyHDyFiENToBZA==} + '@gltf-transform/core@4.3.0': + resolution: {integrity: sha512-ZeaQfszGJ9LYwELszu45CuDQCsE26lJNNe36FVmN8xclaT6WDdCj7fwGpQXo0/l/YgAVAHX+uO7YNBW75/SRYw==} - '@gltf-transform/extensions@4.1.3': - resolution: {integrity: sha512-RcjA6UfBqOQPMqYhY/ftHAjrO1mnGLxUIXwErrH8qBoMprgkfLmi3fZuNL1tgZXlSPTjYdMCd7zEOc707F8Ekg==} + '@gltf-transform/extensions@4.3.0': + resolution: {integrity: sha512-XDAjQPYVMHa/VDpSbfCBwI+/1muwRJCaXhUpLgnUzAjn0D//PgvIAcbNm1EwBl3LIWBSwjDUCn2LiMAjp+aXVw==} - '@gltf-transform/functions@4.1.3': - resolution: {integrity: sha512-SS0WH43lA/ttysXB0DovwhKF5yuAXOW/BWUqFlQPCX/NDqt+7qMDqGYL7zCB24NdUh43ipd4k/7QRVMwyrBZUA==} + '@gltf-transform/functions@4.3.0': + resolution: {integrity: sha512-FZggHVgt3DHOezgESBrf2vDzuD2FYQYaNT2sT/aP316SIwhuiIwby3z7rhV9joDvWqqUaPkf1UmkjlOaY9riSQ==} '@iconify/types@2.0.0': resolution: {integrity: sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==} @@ -1229,107 +1233,155 @@ packages: peerDependencies: vue: '>=3' - '@img/sharp-darwin-arm64@0.33.5': - resolution: {integrity: sha512-UT4p+iz/2H4twwAoLCqfA9UH5pI6DggwKEGuaPy7nCVQ8ZsiY5PIcrRvD1DzuY3qYL07NtIQcWnBSY/heikIFQ==} + '@img/colour@1.1.0': + resolution: {integrity: sha512-Td76q7j57o/tLVdgS746cYARfSyxk8iEfRxewL9h4OMzYhbW4TAcppl0mT4eyqXddh6L/jwoM75mo7ixa/pCeQ==} + engines: {node: '>=18'} + + '@img/sharp-darwin-arm64@0.34.5': + resolution: {integrity: sha512-imtQ3WMJXbMY4fxb/Ndp6HBTNVtWCUI0WdobyheGf5+ad6xX8VIDO8u2xE4qc/fr08CKG/7dDseFtn6M6g/r3w==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [arm64] os: [darwin] - '@img/sharp-darwin-x64@0.33.5': - resolution: {integrity: sha512-fyHac4jIc1ANYGRDxtiqelIbdWkIuQaI84Mv45KvGRRxSAa7o7d1ZKAOBaYbnepLC1WqxfpimdeWfvqqSGwR2Q==} + '@img/sharp-darwin-x64@0.34.5': + resolution: {integrity: sha512-YNEFAF/4KQ/PeW0N+r+aVVsoIY0/qxxikF2SWdp+NRkmMB7y9LBZAVqQ4yhGCm/H3H270OSykqmQMKLBhBJDEw==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [x64] os: [darwin] - '@img/sharp-libvips-darwin-arm64@1.0.4': - resolution: {integrity: sha512-XblONe153h0O2zuFfTAbQYAX2JhYmDHeWikp1LM9Hul9gVPjFY427k6dFEcOL72O01QxQsWi761svJ/ev9xEDg==} + '@img/sharp-libvips-darwin-arm64@1.2.4': + resolution: {integrity: sha512-zqjjo7RatFfFoP0MkQ51jfuFZBnVE2pRiaydKJ1G/rHZvnsrHAOcQALIi9sA5co5xenQdTugCvtb1cuf78Vf4g==} cpu: [arm64] os: [darwin] - '@img/sharp-libvips-darwin-x64@1.0.4': - resolution: {integrity: sha512-xnGR8YuZYfJGmWPvmlunFaWJsb9T/AO2ykoP3Fz/0X5XV2aoYBPkX6xqCQvUTKKiLddarLaxpzNe+b1hjeWHAQ==} + '@img/sharp-libvips-darwin-x64@1.2.4': + resolution: {integrity: sha512-1IOd5xfVhlGwX+zXv2N93k0yMONvUlANylbJw1eTah8K/Jtpi15KC+WSiaX/nBmbm2HxRM1gZ0nSdjSsrZbGKg==} cpu: [x64] os: [darwin] - '@img/sharp-libvips-linux-arm64@1.0.4': - resolution: {integrity: sha512-9B+taZ8DlyyqzZQnoeIvDVR/2F4EbMepXMc/NdVbkzsJbzkUjhXv/70GQJ7tdLA4YJgNP25zukcxpX2/SueNrA==} + '@img/sharp-libvips-linux-arm64@1.2.4': + resolution: {integrity: sha512-excjX8DfsIcJ10x1Kzr4RcWe1edC9PquDRRPx3YVCvQv+U5p7Yin2s32ftzikXojb1PIFc/9Mt28/y+iRklkrw==} cpu: [arm64] os: [linux] + libc: [glibc] - '@img/sharp-libvips-linux-arm@1.0.5': - resolution: {integrity: sha512-gvcC4ACAOPRNATg/ov8/MnbxFDJqf/pDePbBnuBDcjsI8PssmjoKMAz4LtLaVi+OnSb5FK/yIOamqDwGmXW32g==} + '@img/sharp-libvips-linux-arm@1.2.4': + resolution: {integrity: sha512-bFI7xcKFELdiNCVov8e44Ia4u2byA+l3XtsAj+Q8tfCwO6BQ8iDojYdvoPMqsKDkuoOo+X6HZA0s0q11ANMQ8A==} cpu: [arm] os: [linux] + libc: [glibc] - '@img/sharp-libvips-linux-s390x@1.0.4': - resolution: {integrity: sha512-u7Wz6ntiSSgGSGcjZ55im6uvTrOxSIS8/dgoVMoiGE9I6JAfU50yH5BoDlYA1tcuGS7g/QNtetJnxA6QEsCVTA==} + '@img/sharp-libvips-linux-ppc64@1.2.4': + resolution: {integrity: sha512-FMuvGijLDYG6lW+b/UvyilUWu5Ayu+3r2d1S8notiGCIyYU/76eig1UfMmkZ7vwgOrzKzlQbFSuQfgm7GYUPpA==} + cpu: [ppc64] + os: [linux] + libc: [glibc] + + '@img/sharp-libvips-linux-riscv64@1.2.4': + resolution: {integrity: sha512-oVDbcR4zUC0ce82teubSm+x6ETixtKZBh/qbREIOcI3cULzDyb18Sr/Wcyx7NRQeQzOiHTNbZFF1UwPS2scyGA==} + cpu: [riscv64] + os: [linux] + libc: [glibc] + + '@img/sharp-libvips-linux-s390x@1.2.4': + resolution: {integrity: sha512-qmp9VrzgPgMoGZyPvrQHqk02uyjA0/QrTO26Tqk6l4ZV0MPWIW6LTkqOIov+J1yEu7MbFQaDpwdwJKhbJvuRxQ==} cpu: [s390x] os: [linux] + libc: [glibc] - '@img/sharp-libvips-linux-x64@1.0.4': - resolution: {integrity: sha512-MmWmQ3iPFZr0Iev+BAgVMb3ZyC4KeFc3jFxnNbEPas60e1cIfevbtuyf9nDGIzOaW9PdnDciJm+wFFaTlj5xYw==} + '@img/sharp-libvips-linux-x64@1.2.4': + resolution: {integrity: sha512-tJxiiLsmHc9Ax1bz3oaOYBURTXGIRDODBqhveVHonrHJ9/+k89qbLl0bcJns+e4t4rvaNBxaEZsFtSfAdquPrw==} cpu: [x64] os: [linux] + libc: [glibc] - '@img/sharp-libvips-linuxmusl-arm64@1.0.4': - resolution: {integrity: sha512-9Ti+BbTYDcsbp4wfYib8Ctm1ilkugkA/uscUn6UXK1ldpC1JjiXbLfFZtRlBhjPZ5o1NCLiDbg8fhUPKStHoTA==} + '@img/sharp-libvips-linuxmusl-arm64@1.2.4': + resolution: {integrity: sha512-FVQHuwx1IIuNow9QAbYUzJ+En8KcVm9Lk5+uGUQJHaZmMECZmOlix9HnH7n1TRkXMS0pGxIJokIVB9SuqZGGXw==} cpu: [arm64] os: [linux] + libc: [musl] - '@img/sharp-libvips-linuxmusl-x64@1.0.4': - resolution: {integrity: sha512-viYN1KX9m+/hGkJtvYYp+CCLgnJXwiQB39damAO7WMdKWlIhmYTfHjwSbQeUK/20vY154mwezd9HflVFM1wVSw==} + '@img/sharp-libvips-linuxmusl-x64@1.2.4': + resolution: {integrity: sha512-+LpyBk7L44ZIXwz/VYfglaX/okxezESc6UxDSoyo2Ks6Jxc4Y7sGjpgU9s4PMgqgjj1gZCylTieNamqA1MF7Dg==} cpu: [x64] os: [linux] + libc: [musl] - '@img/sharp-linux-arm64@0.33.5': - resolution: {integrity: sha512-JMVv+AMRyGOHtO1RFBiJy/MBsgz0x4AWrT6QoEVVTyh1E39TrCUpTRI7mx9VksGX4awWASxqCYLCV4wBZHAYxA==} + '@img/sharp-linux-arm64@0.34.5': + resolution: {integrity: sha512-bKQzaJRY/bkPOXyKx5EVup7qkaojECG6NLYswgktOZjaXecSAeCWiZwwiFf3/Y+O1HrauiE3FVsGxFg8c24rZg==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [arm64] os: [linux] + libc: [glibc] - '@img/sharp-linux-arm@0.33.5': - resolution: {integrity: sha512-JTS1eldqZbJxjvKaAkxhZmBqPRGmxgu+qFKSInv8moZ2AmT5Yib3EQ1c6gp493HvrvV8QgdOXdyaIBrhvFhBMQ==} + '@img/sharp-linux-arm@0.34.5': + resolution: {integrity: sha512-9dLqsvwtg1uuXBGZKsxem9595+ujv0sJ6Vi8wcTANSFpwV/GONat5eCkzQo/1O6zRIkh0m/8+5BjrRr7jDUSZw==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [arm] os: [linux] + libc: [glibc] - '@img/sharp-linux-s390x@0.33.5': - resolution: {integrity: sha512-y/5PCd+mP4CA/sPDKl2961b+C9d+vPAveS33s6Z3zfASk2j5upL6fXVPZi7ztePZ5CuH+1kW8JtvxgbuXHRa4Q==} + '@img/sharp-linux-ppc64@0.34.5': + resolution: {integrity: sha512-7zznwNaqW6YtsfrGGDA6BRkISKAAE1Jo0QdpNYXNMHu2+0dTrPflTLNkpc8l7MUP5M16ZJcUvysVWWrMefZquA==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [ppc64] + os: [linux] + libc: [glibc] + + '@img/sharp-linux-riscv64@0.34.5': + resolution: {integrity: sha512-51gJuLPTKa7piYPaVs8GmByo7/U7/7TZOq+cnXJIHZKavIRHAP77e3N2HEl3dgiqdD/w0yUfiJnII77PuDDFdw==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [riscv64] + os: [linux] + libc: [glibc] + + '@img/sharp-linux-s390x@0.34.5': + resolution: {integrity: sha512-nQtCk0PdKfho3eC5MrbQoigJ2gd1CgddUMkabUj+rBevs8tZ2cULOx46E7oyX+04WGfABgIwmMC0VqieTiR4jg==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [s390x] os: [linux] + libc: [glibc] - '@img/sharp-linux-x64@0.33.5': - resolution: {integrity: sha512-opC+Ok5pRNAzuvq1AG0ar+1owsu842/Ab+4qvU879ippJBHvyY5n2mxF1izXqkPYlGuP/M556uh53jRLJmzTWA==} + '@img/sharp-linux-x64@0.34.5': + resolution: {integrity: sha512-MEzd8HPKxVxVenwAa+JRPwEC7QFjoPWuS5NZnBt6B3pu7EG2Ge0id1oLHZpPJdn3OQK+BQDiw9zStiHBTJQQQQ==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [x64] os: [linux] + libc: [glibc] - '@img/sharp-linuxmusl-arm64@0.33.5': - resolution: {integrity: sha512-XrHMZwGQGvJg2V/oRSUfSAfjfPxO+4DkiRh6p2AFjLQztWUuY/o8Mq0eMQVIY7HJ1CDQUJlxGGZRw1a5bqmd1g==} + '@img/sharp-linuxmusl-arm64@0.34.5': + resolution: {integrity: sha512-fprJR6GtRsMt6Kyfq44IsChVZeGN97gTD331weR1ex1c1rypDEABN6Tm2xa1wE6lYb5DdEnk03NZPqA7Id21yg==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [arm64] os: [linux] + libc: [musl] - '@img/sharp-linuxmusl-x64@0.33.5': - resolution: {integrity: sha512-WT+d/cgqKkkKySYmqoZ8y3pxx7lx9vVejxW/W4DOFMYVSkErR+w7mf2u8m/y4+xHe7yY9DAXQMWQhpnMuFfScw==} + '@img/sharp-linuxmusl-x64@0.34.5': + resolution: {integrity: sha512-Jg8wNT1MUzIvhBFxViqrEhWDGzqymo3sV7z7ZsaWbZNDLXRJZoRGrjulp60YYtV4wfY8VIKcWidjojlLcWrd8Q==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [x64] os: [linux] + libc: [musl] - '@img/sharp-wasm32@0.33.5': - resolution: {integrity: sha512-ykUW4LVGaMcU9lu9thv85CbRMAwfeadCJHRsg2GmeRa/cJxsVY9Rbd57JcMxBkKHag5U/x7TSBpScF4U8ElVzg==} + '@img/sharp-wasm32@0.34.5': + resolution: {integrity: sha512-OdWTEiVkY2PHwqkbBI8frFxQQFekHaSSkUIJkwzclWZe64O1X4UlUjqqqLaPbUpMOQk6FBu/HtlGXNblIs0huw==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [wasm32] - '@img/sharp-win32-ia32@0.33.5': - resolution: {integrity: sha512-T36PblLaTwuVJ/zw/LaH0PdZkRz5rd3SmMHX8GSmR7vtNSP5Z6bQkExdSK7xGWyxLw4sUknBuugTelgw2faBbQ==} + '@img/sharp-win32-arm64@0.34.5': + resolution: {integrity: sha512-WQ3AgWCWYSb2yt+IG8mnC6Jdk9Whs7O0gxphblsLvdhSpSTtmu69ZG1Gkb6NuvxsNACwiPV6cNSZNzt0KPsw7g==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [arm64] + os: [win32] + + '@img/sharp-win32-ia32@0.34.5': + resolution: {integrity: sha512-FV9m/7NmeCmSHDD5j4+4pNI8Cp3aW+JvLoXcTUo0IqyjSfAZJ8dIUmijx1qaJsIiU+Hosw6xM5KijAWRJCSgNg==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [ia32] os: [win32] - '@img/sharp-win32-x64@0.33.5': - resolution: {integrity: sha512-MpY/o8/8kj+EcnxwvrP4aTJSWw/aZ7JIGR4aBeZkZw5B7/Jn+tY9/VNwtcoGmdT7GfggGIU4kygOMSbYnOrAbg==} + '@img/sharp-win32-x64@0.34.5': + resolution: {integrity: sha512-+29YMsqY2/9eFEiW93eqWnuLcWcufowXewwSNIT6UwZdUUCrM3oFjMWH/Z6/TMmb4hlFenmfAVbpWeup2jryCw==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [x64] os: [win32] @@ -1683,36 +1735,42 @@ packages: engines: {node: '>= 10.0.0'} cpu: [arm] os: [linux] + libc: [glibc] '@parcel/watcher-linux-arm-musl@2.5.1': resolution: {integrity: sha512-6E+m/Mm1t1yhB8X412stiKFG3XykmgdIOqhjWj+VL8oHkKABfu/gjFj8DvLrYVHSBNC+/u5PeNrujiSQ1zwd1Q==} engines: {node: '>= 10.0.0'} cpu: [arm] os: [linux] + libc: [musl] '@parcel/watcher-linux-arm64-glibc@2.5.1': resolution: {integrity: sha512-LrGp+f02yU3BN9A+DGuY3v3bmnFUggAITBGriZHUREfNEzZh/GO06FF5u2kx8x+GBEUYfyTGamol4j3m9ANe8w==} engines: {node: '>= 10.0.0'} cpu: [arm64] os: [linux] + libc: [glibc] '@parcel/watcher-linux-arm64-musl@2.5.1': resolution: {integrity: sha512-cFOjABi92pMYRXS7AcQv9/M1YuKRw8SZniCDw0ssQb/noPkRzA+HBDkwmyOJYp5wXcsTrhxO0zq1U11cK9jsFg==} engines: {node: '>= 10.0.0'} cpu: [arm64] os: [linux] + libc: [musl] '@parcel/watcher-linux-x64-glibc@2.5.1': resolution: {integrity: sha512-GcESn8NZySmfwlTsIur+49yDqSny2IhPeZfXunQi48DMugKeZ7uy1FX83pO0X22sHntJ4Ub+9k34XQCX+oHt2A==} engines: {node: '>= 10.0.0'} cpu: [x64] os: [linux] + libc: [glibc] '@parcel/watcher-linux-x64-musl@2.5.1': resolution: {integrity: sha512-n0E2EQbatQ3bXhcH2D1XIAANAcTZkQICBPVaxMeaCVBtOpBZpWJuf7LwyWPSBDITb7In8mqQgJ7gH8CILCURXg==} engines: {node: '>= 10.0.0'} cpu: [x64] os: [linux] + libc: [musl] '@parcel/watcher-win32-arm64@2.5.1': resolution: {integrity: sha512-RFzklRvmc3PkjKjry3hLF9wD7ppR4AKcWNzH7kXR7GUe0Igb3Nz8fyPwtZCSquGrhU5HhUNDr/mKBqj7tqA2Vw==} @@ -1911,56 +1969,67 @@ packages: resolution: {integrity: sha512-+xmiDGGaSfIIOXMzkhJ++Oa0Gwvl9oXUeIiwarsdRXSe27HUIvjbSIpPxvnNsRebsNdUo7uAiQVgBD1hVriwSQ==} cpu: [arm] os: [linux] + libc: [glibc] '@rollup/rollup-linux-arm-musleabihf@4.44.2': resolution: {integrity: sha512-bDHvhzOfORk3wt8yxIra8N4k/N0MnKInCW5OGZaeDYa/hMrdPaJzo7CSkjKZqX4JFUWjUGm88lI6QJLCM7lDrA==} cpu: [arm] os: [linux] + libc: [musl] '@rollup/rollup-linux-arm64-gnu@4.44.2': resolution: {integrity: sha512-NMsDEsDiYghTbeZWEGnNi4F0hSbGnsuOG+VnNvxkKg0IGDvFh7UVpM/14mnMwxRxUf9AdAVJgHPvKXf6FpMB7A==} cpu: [arm64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-arm64-musl@4.44.2': resolution: {integrity: sha512-lb5bxXnxXglVq+7imxykIp5xMq+idehfl+wOgiiix0191av84OqbjUED+PRC5OA8eFJYj5xAGcpAZ0pF2MnW+A==} cpu: [arm64] os: [linux] + libc: [musl] '@rollup/rollup-linux-loongarch64-gnu@4.44.2': resolution: {integrity: sha512-Yl5Rdpf9pIc4GW1PmkUGHdMtbx0fBLE1//SxDmuf3X0dUC57+zMepow2LK0V21661cjXdTn8hO2tXDdAWAqE5g==} cpu: [loong64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-powerpc64le-gnu@4.44.2': resolution: {integrity: sha512-03vUDH+w55s680YYryyr78jsO1RWU9ocRMaeV2vMniJJW/6HhoTBwyyiiTPVHNWLnhsnwcQ0oH3S9JSBEKuyqw==} cpu: [ppc64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-riscv64-gnu@4.44.2': resolution: {integrity: sha512-iYtAqBg5eEMG4dEfVlkqo05xMOk6y/JXIToRca2bAWuqjrJYJlx/I7+Z+4hSrsWU8GdJDFPL4ktV3dy4yBSrzg==} cpu: [riscv64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-riscv64-musl@4.44.2': resolution: {integrity: sha512-e6vEbgaaqz2yEHqtkPXa28fFuBGmUJ0N2dOJK8YUfijejInt9gfCSA7YDdJ4nYlv67JfP3+PSWFX4IVw/xRIPg==} cpu: [riscv64] os: [linux] + libc: [musl] '@rollup/rollup-linux-s390x-gnu@4.44.2': resolution: {integrity: sha512-evFOtkmVdY3udE+0QKrV5wBx7bKI0iHz5yEVx5WqDJkxp9YQefy4Mpx3RajIVcM6o7jxTvVd/qpC1IXUhGc1Mw==} cpu: [s390x] os: [linux] + libc: [glibc] '@rollup/rollup-linux-x64-gnu@4.44.2': resolution: {integrity: sha512-/bXb0bEsWMyEkIsUL2Yt5nFB5naLAwyOWMEviQfQY1x3l5WsLKgvZf66TM7UTfED6erckUVUJQ/jJ1FSpm3pRQ==} cpu: [x64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-x64-musl@4.44.2': resolution: {integrity: sha512-3D3OB1vSSBXmkGEZR27uiMRNiwN08/RVAcBKwhUYPaiZ8bcvdeEwWPvbnXvvXHY+A/7xluzcN+kaiOFNiOZwWg==} cpu: [x64] os: [linux] + libc: [musl] '@rollup/rollup-win32-arm64-msvc@4.44.2': resolution: {integrity: sha512-VfU0fsMK+rwdK8mwODqYeM2hDrF2WiHaSmCBrS7gColkQft95/8tphyzv2EupVxn3iE0FI78wzffoULH1G+dkw==} @@ -2053,24 +2122,28 @@ packages: engines: {node: '>=10'} cpu: [arm64] os: [linux] + libc: [glibc] '@swc/core-linux-arm64-musl@1.11.21': resolution: {integrity: sha512-y1L49+snt1a1gLTYPY641slqy55QotPdtRK9Y6jMi4JBQyZwxC8swWYlQWb+MyILwxA614fi62SCNZNznB3XSA==} engines: {node: '>=10'} cpu: [arm64] os: [linux] + libc: [musl] '@swc/core-linux-x64-gnu@1.11.21': resolution: {integrity: sha512-NesdBXv4CvVEaFUlqKj+GA4jJMNUzK2NtKOrUNEtTbXaVyNiXjFCSaDajMTedEB0jTAd9ybB0aBvwhgkJUWkWA==} engines: {node: '>=10'} cpu: [x64] os: [linux] + libc: [glibc] '@swc/core-linux-x64-musl@1.11.21': resolution: {integrity: sha512-qFV60pwpKVOdmX67wqQzgtSrUGWX9Cibnp1CXyqZ9Mmt8UyYGvmGu7p6PMbTyX7vdpVUvWVRf8DzrW2//wmVHg==} engines: {node: '>=10'} cpu: [x64] os: [linux] + libc: [musl] '@swc/core-win32-arm64-msvc@1.11.21': resolution: {integrity: sha512-DJJe9k6gXR/15ZZVLv1SKhXkFst8lYCeZRNHH99SlBodvu4slhh/MKQ6YCixINRhCwliHrpXPym8/5fOq8b7Ig==} @@ -2974,13 +3047,6 @@ packages: color-name@1.1.4: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} - color-string@1.9.1: - resolution: {integrity: sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==} - - color@4.2.3: - resolution: {integrity: sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==} - engines: {node: '>=12.5.0'} - colorette@2.0.20: resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==} @@ -3188,8 +3254,8 @@ packages: engines: {node: '>=0.10'} hasBin: true - detect-libc@2.0.3: - resolution: {integrity: sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==} + detect-libc@2.1.2: + resolution: {integrity: sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==} engines: {node: '>=8'} devlop@1.1.0: @@ -3699,9 +3765,6 @@ packages: resolution: {integrity: sha512-DDfANUiiG2wC1qawP66qlTugJeL5HyzMpfr8lLK+jMQirGzNod0B12cFB/9q838Ru27sBwfw78/rdoU7RERz6A==} engines: {node: '>= 0.4'} - is-arrayish@0.3.2: - resolution: {integrity: sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==} - is-async-function@2.1.1: resolution: {integrity: sha512-9dgM/cZBnNvjzaMYHVoxxfPj2QXt22Ev7SuuPrs+xav0ukGB0S6d4ydZdEiM48kLx5kDV+QBPrpVnFyefL8kkQ==} engines: {node: '>= 0.4'} @@ -3972,6 +4035,9 @@ packages: ktx-parse@1.0.0: resolution: {integrity: sha512-Z31kVizz4DF/6vo9YiSYVBhuXAfyQy9bGxlW3+mB5OELoZjfXVZQpRoctsx8IEDKxBd6SagXKo7qRvu38i8Jfg==} + ktx-parse@1.1.0: + resolution: {integrity: sha512-mKp3y+FaYgR7mXWAbyyzpa/r1zDWeaunH+INJO4fou3hb45XuNSwar+7llrRyvpMWafxSIi99RNFJ05MHedaJQ==} + lerc@2.0.0: resolution: {integrity: sha512-7qo1Mq8ZNmaR4USHHm615nEW2lPeeWJ3bTyoqFbd35DLx0LUH7C6ptt5FDCTAlbIzs3+WKrk5SkJvw8AFDE2hg==} @@ -4223,8 +4289,8 @@ packages: ndarray-ops@1.2.2: resolution: {integrity: sha512-BppWAFRjMYF7N/r6Ie51q6D4fs0iiGmeXIACKY66fLpnwIui3Wc3CXiD/30mgLbDjPpSLrsqcp3Z62+IcHZsDw==} - ndarray-pixels@4.1.0: - resolution: {integrity: sha512-xKPI4zXJ2pkUcVX24zIN1AWqqPWvRWWhRuO6PlY4EdB2VNRauNwA6rDdsAQG/ldQp0sU7nTXgPR/io1duy3Zyg==} + ndarray-pixels@5.0.1: + resolution: {integrity: sha512-IBtrpefpqlI8SPDCGjXk4v5NV5z7r3JSuCbfuEEXaM0vrOJtNGgYUa4C3Lt5H+qWdYF4BCPVFsnXhNC7QvZwkw==} ndarray@1.0.19: resolution: {integrity: sha512-B4JHA4vdyZU30ELBw3g7/p9bZupyew5a7tX1Y/gGeF2hafrPaQZhgrGQfsvgfYbgdFZjYwuEcnaobeM/WMW+HQ==} @@ -4455,6 +4521,11 @@ packages: preact@10.26.5: resolution: {integrity: sha512-fmpDkgfGU6JYux9teDWLhj9mKN55tyepwYbxHgQuIxbWQzgFg5vk7Mrrtfx7xRxq798ynkY4DDDxZr235Kk+4w==} + prettier@3.8.1: + resolution: {integrity: sha512-UOnG6LftzbdaHZcKoPFtOcCKztrQ57WkHDeRD9t/PTQtmT0NHSeWWepj6pS0z/N7+08BHFDQVUrfmfMRcZwbMg==} + engines: {node: '>=14'} + hasBin: true + pretty-bytes@5.6.0: resolution: {integrity: sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==} engines: {node: '>=6'} @@ -4466,8 +4537,8 @@ packages: process-nextick-args@2.0.1: resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==} - property-graph@3.0.0: - resolution: {integrity: sha512-TnzxUsttmGtw+OiU0LDw+0FlMbJ8vV8pOjyDI7+Kdni4Tj0hW5BFh7TatQu7Y68hcvvFmiFOHilKShsA4R82fA==} + property-graph@4.0.0: + resolution: {integrity: sha512-I0hojAJfTbSCZy3y6xyK29eayxo14v1bj1VPiDkHjTdz33SV6RdfMz2AHnf4ai62Vng2mN5GkaKahkooBIo9gA==} property-information@7.0.0: resolution: {integrity: sha512-7D/qOz/+Y4X/rzSB6jKxKUsQnphO046ei8qxG59mtM3RG3DHgTK81HrxrmoDVINJb8NKT5ZsRbwHvQ6B68Iyhg==} @@ -4869,6 +4940,11 @@ packages: engines: {node: '>=10'} hasBin: true + semver@7.7.4: + resolution: {integrity: sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==} + engines: {node: '>=10'} + hasBin: true + send@0.19.0: resolution: {integrity: sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==} engines: {node: '>= 0.8.0'} @@ -4898,8 +4974,8 @@ packages: setprototypeof@1.2.0: resolution: {integrity: sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==} - sharp@0.33.5: - resolution: {integrity: sha512-haPVm1EkS9pgvHrQ/F3Xy+hgcuMV0Wm9vfIBSiwZ05k+xgb0PkBQpGsAA/oWdDobNaZTH5ppvHtzCFbnSEwHVw==} + sharp@0.34.5: + resolution: {integrity: sha512-Ou9I5Ft9WNcCbXrU9cMgPBcCK8LiwLqcbywW3t4oDV37n1pzpuNLsYiAV8eODnjbtQlSDwZ2cUEeQz4E54Hltg==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} shebang-command@2.0.0: @@ -4936,9 +5012,6 @@ packages: signals@1.0.0: resolution: {integrity: sha512-dE3lBiqgrgIvpGHYBy6/kiYKfh0HXRmbg0ocakBKiOefbal6ZeTtNlQlxsu9ADkNzv5OmRwRKu+IaTPSqJdZDg==} - simple-swizzle@0.2.2: - resolution: {integrity: sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==} - sirv@3.0.1: resolution: {integrity: sha512-FoqMu0NCGBLCcAkS1qA+XJIQTR6/JHfQXl+uGteNCQ76T91DMUjPa9xfmeqMY3z80nLSg9yQmNjK0Px6RWsH/A==} engines: {node: '>=18'} @@ -6814,7 +6887,7 @@ snapshots: '@dxfom/mtext@0.3.2': {} - '@emnapi/runtime@1.4.3': + '@emnapi/runtime@1.8.1': dependencies: tslib: 2.8.1 optional: true @@ -6899,23 +6972,23 @@ snapshots: '@esbuild/win32-x64@0.25.10': optional: true - '@gltf-transform/core@4.1.3': + '@gltf-transform/core@4.3.0': dependencies: - property-graph: 3.0.0 + property-graph: 4.0.0 - '@gltf-transform/extensions@4.1.3': + '@gltf-transform/extensions@4.3.0': dependencies: - '@gltf-transform/core': 4.1.3 - ktx-parse: 1.0.0 + '@gltf-transform/core': 4.3.0 + ktx-parse: 1.1.0 - '@gltf-transform/functions@4.1.3': + '@gltf-transform/functions@4.3.0': dependencies: - '@gltf-transform/core': 4.1.3 - '@gltf-transform/extensions': 4.1.3 - ktx-parse: 1.0.0 + '@gltf-transform/core': 4.3.0 + '@gltf-transform/extensions': 4.3.0 + ktx-parse: 1.1.0 ndarray: 1.0.19 ndarray-lanczos: 0.3.0 - ndarray-pixels: 4.1.0 + ndarray-pixels: 5.0.1 '@iconify/types@2.0.0': {} @@ -6950,79 +7023,100 @@ snapshots: '@iconify/types': 2.0.0 vue: 3.5.22(typescript@5.8.3) - '@img/sharp-darwin-arm64@0.33.5': + '@img/colour@1.1.0': {} + + '@img/sharp-darwin-arm64@0.34.5': optionalDependencies: - '@img/sharp-libvips-darwin-arm64': 1.0.4 + '@img/sharp-libvips-darwin-arm64': 1.2.4 optional: true - '@img/sharp-darwin-x64@0.33.5': + '@img/sharp-darwin-x64@0.34.5': optionalDependencies: - '@img/sharp-libvips-darwin-x64': 1.0.4 + '@img/sharp-libvips-darwin-x64': 1.2.4 optional: true - '@img/sharp-libvips-darwin-arm64@1.0.4': + '@img/sharp-libvips-darwin-arm64@1.2.4': optional: true - '@img/sharp-libvips-darwin-x64@1.0.4': + '@img/sharp-libvips-darwin-x64@1.2.4': optional: true - '@img/sharp-libvips-linux-arm64@1.0.4': + '@img/sharp-libvips-linux-arm64@1.2.4': optional: true - '@img/sharp-libvips-linux-arm@1.0.5': + '@img/sharp-libvips-linux-arm@1.2.4': optional: true - '@img/sharp-libvips-linux-s390x@1.0.4': + '@img/sharp-libvips-linux-ppc64@1.2.4': optional: true - '@img/sharp-libvips-linux-x64@1.0.4': + '@img/sharp-libvips-linux-riscv64@1.2.4': optional: true - '@img/sharp-libvips-linuxmusl-arm64@1.0.4': + '@img/sharp-libvips-linux-s390x@1.2.4': optional: true - '@img/sharp-libvips-linuxmusl-x64@1.0.4': + '@img/sharp-libvips-linux-x64@1.2.4': optional: true - '@img/sharp-linux-arm64@0.33.5': + '@img/sharp-libvips-linuxmusl-arm64@1.2.4': + optional: true + + '@img/sharp-libvips-linuxmusl-x64@1.2.4': + optional: true + + '@img/sharp-linux-arm64@0.34.5': optionalDependencies: - '@img/sharp-libvips-linux-arm64': 1.0.4 + '@img/sharp-libvips-linux-arm64': 1.2.4 optional: true - '@img/sharp-linux-arm@0.33.5': + '@img/sharp-linux-arm@0.34.5': optionalDependencies: - '@img/sharp-libvips-linux-arm': 1.0.5 + '@img/sharp-libvips-linux-arm': 1.2.4 optional: true - '@img/sharp-linux-s390x@0.33.5': + '@img/sharp-linux-ppc64@0.34.5': optionalDependencies: - '@img/sharp-libvips-linux-s390x': 1.0.4 + '@img/sharp-libvips-linux-ppc64': 1.2.4 optional: true - '@img/sharp-linux-x64@0.33.5': + '@img/sharp-linux-riscv64@0.34.5': optionalDependencies: - '@img/sharp-libvips-linux-x64': 1.0.4 + '@img/sharp-libvips-linux-riscv64': 1.2.4 optional: true - '@img/sharp-linuxmusl-arm64@0.33.5': + '@img/sharp-linux-s390x@0.34.5': optionalDependencies: - '@img/sharp-libvips-linuxmusl-arm64': 1.0.4 + '@img/sharp-libvips-linux-s390x': 1.2.4 optional: true - '@img/sharp-linuxmusl-x64@0.33.5': + '@img/sharp-linux-x64@0.34.5': optionalDependencies: - '@img/sharp-libvips-linuxmusl-x64': 1.0.4 + '@img/sharp-libvips-linux-x64': 1.2.4 optional: true - '@img/sharp-wasm32@0.33.5': + '@img/sharp-linuxmusl-arm64@0.34.5': + optionalDependencies: + '@img/sharp-libvips-linuxmusl-arm64': 1.2.4 + optional: true + + '@img/sharp-linuxmusl-x64@0.34.5': + optionalDependencies: + '@img/sharp-libvips-linuxmusl-x64': 1.2.4 + optional: true + + '@img/sharp-wasm32@0.34.5': dependencies: - '@emnapi/runtime': 1.4.3 + '@emnapi/runtime': 1.8.1 optional: true - '@img/sharp-win32-ia32@0.33.5': + '@img/sharp-win32-arm64@0.34.5': optional: true - '@img/sharp-win32-x64@0.33.5': + '@img/sharp-win32-ia32@0.34.5': + optional: true + + '@img/sharp-win32-x64@0.34.5': optional: true '@intlify/core-base@11.1.3': @@ -8949,16 +9043,6 @@ snapshots: color-name@1.1.4: {} - color-string@1.9.1: - dependencies: - color-name: 1.1.4 - simple-swizzle: 0.2.2 - - color@4.2.3: - dependencies: - color-convert: 2.0.1 - color-string: 1.9.1 - colorette@2.0.20: {} colorjs.io@0.5.2: {} @@ -9131,7 +9215,7 @@ snapshots: detect-libc@1.0.3: optional: true - detect-libc@2.0.3: {} + detect-libc@2.1.2: {} devlop@1.1.0: dependencies: @@ -9752,8 +9836,6 @@ snapshots: call-bound: 1.0.4 get-intrinsic: 1.3.0 - is-arrayish@0.3.2: {} - is-async-function@2.1.1: dependencies: async-function: 1.0.0 @@ -10014,6 +10096,8 @@ snapshots: ktx-parse@1.0.0: {} + ktx-parse@1.1.0: {} + lerc@2.0.0: {} less@4.3.0: @@ -10291,12 +10375,12 @@ snapshots: dependencies: cwise-compiler: 1.1.3 - ndarray-pixels@4.1.0: + ndarray-pixels@5.0.1: dependencies: '@types/ndarray': 1.0.14 ndarray: 1.0.19 ndarray-ops: 1.2.2 - sharp: 0.33.5 + sharp: 0.34.5 ndarray@1.0.19: dependencies: @@ -10519,13 +10603,15 @@ snapshots: preact@10.26.5: {} + prettier@3.8.1: {} + pretty-bytes@5.6.0: {} pretty-bytes@6.1.1: {} process-nextick-args@2.0.1: {} - property-graph@3.0.0: {} + property-graph@4.0.0: {} property-information@7.0.0: {} @@ -10941,6 +11027,8 @@ snapshots: semver@7.7.1: {} + semver@7.7.4: {} + send@0.19.0: dependencies: debug: 2.6.9 @@ -10998,31 +11086,36 @@ snapshots: setprototypeof@1.2.0: {} - sharp@0.33.5: + sharp@0.34.5: dependencies: - color: 4.2.3 - detect-libc: 2.0.3 - semver: 7.7.1 + '@img/colour': 1.1.0 + detect-libc: 2.1.2 + semver: 7.7.4 optionalDependencies: - '@img/sharp-darwin-arm64': 0.33.5 - '@img/sharp-darwin-x64': 0.33.5 - '@img/sharp-libvips-darwin-arm64': 1.0.4 - '@img/sharp-libvips-darwin-x64': 1.0.4 - '@img/sharp-libvips-linux-arm': 1.0.5 - '@img/sharp-libvips-linux-arm64': 1.0.4 - '@img/sharp-libvips-linux-s390x': 1.0.4 - '@img/sharp-libvips-linux-x64': 1.0.4 - '@img/sharp-libvips-linuxmusl-arm64': 1.0.4 - '@img/sharp-libvips-linuxmusl-x64': 1.0.4 - '@img/sharp-linux-arm': 0.33.5 - '@img/sharp-linux-arm64': 0.33.5 - '@img/sharp-linux-s390x': 0.33.5 - '@img/sharp-linux-x64': 0.33.5 - '@img/sharp-linuxmusl-arm64': 0.33.5 - '@img/sharp-linuxmusl-x64': 0.33.5 - '@img/sharp-wasm32': 0.33.5 - '@img/sharp-win32-ia32': 0.33.5 - '@img/sharp-win32-x64': 0.33.5 + '@img/sharp-darwin-arm64': 0.34.5 + '@img/sharp-darwin-x64': 0.34.5 + '@img/sharp-libvips-darwin-arm64': 1.2.4 + '@img/sharp-libvips-darwin-x64': 1.2.4 + '@img/sharp-libvips-linux-arm': 1.2.4 + '@img/sharp-libvips-linux-arm64': 1.2.4 + '@img/sharp-libvips-linux-ppc64': 1.2.4 + '@img/sharp-libvips-linux-riscv64': 1.2.4 + '@img/sharp-libvips-linux-s390x': 1.2.4 + '@img/sharp-libvips-linux-x64': 1.2.4 + '@img/sharp-libvips-linuxmusl-arm64': 1.2.4 + '@img/sharp-libvips-linuxmusl-x64': 1.2.4 + '@img/sharp-linux-arm': 0.34.5 + '@img/sharp-linux-arm64': 0.34.5 + '@img/sharp-linux-ppc64': 0.34.5 + '@img/sharp-linux-riscv64': 0.34.5 + '@img/sharp-linux-s390x': 0.34.5 + '@img/sharp-linux-x64': 0.34.5 + '@img/sharp-linuxmusl-arm64': 0.34.5 + '@img/sharp-linuxmusl-x64': 0.34.5 + '@img/sharp-wasm32': 0.34.5 + '@img/sharp-win32-arm64': 0.34.5 + '@img/sharp-win32-ia32': 0.34.5 + '@img/sharp-win32-x64': 0.34.5 shebang-command@2.0.0: dependencies: @@ -11075,10 +11168,6 @@ snapshots: signals@1.0.0: {} - simple-swizzle@0.2.2: - dependencies: - is-arrayish: 0.3.2 - sirv@3.0.1: dependencies: '@polka/url': 1.0.0-next.29