360 Secure SkillHub
360 安全技能中心

threejs-assets

该 Skill 提供 Three.js/glTF 资源管线指导,涵盖模型与纹理盘点、解码器配置、加载状态与竞态处理、GPU 内存预算、压缩方案比较、缓存克隆及上传资源清理;强调按项目现有版本和架构实施并验证异常场景。

cesartevisual
热度 0.00
最近更新 2026-10-19 06:48:00
分类:开发依赖:纯提示词应用场景:工作流 / 调试排错 / 文件转换 / 数据处理

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add cesartevisual/threejs-skills/threejs-assets
Metadata
name
threejs-assets
description
Load, validate, compress, cache, and release glTF models, textures, decoder assets, and user-supplied 3D files.

Asset Loading and Optimization

Use the project's installed versions and existing architecture. These instructions supplement the user's task; they do not authorize unrelated changes or external actions.

Inventory format, dimensions, units, animation clips, material features, texture sizes, provenance, and transfer size. Prefer a web-ready glTF/GLB pipeline when conversion is acceptable. Preserve source files and semantic names needed by application logic.

Configure GLTFLoader with the decoders the asset actually requires. Match decoder/transcoder binaries to the installed libraries, resolve their URLs through the build's asset conventions, and detect KTX2 support against the active renderer. Do not assume a compressed file needs only a single network request.

Represent loading, ready, failure, and retry explicitly. Unknown content length calls for indeterminate progress. On navigation or rapid selection, guard stale async completions with a generation token or supported cancellation; release late results that no longer have an owner. A manager's progress percentage is not necessarily download-byte percentage.

Budget decoded GPU texture memory as well as transfer bytes. Consider resizing, mesh simplification, Meshopt/Draco, and KTX2/Basis individually; compare decode time and visual quality before accepting a pipeline. Preserve required animation, skinning, morph targets, and metadata.

Cache immutable source assets and clone scene instances appropriately; skinned models need skeleton-aware cloning. Define cache eviction separately from component unmount. For user uploads, limit size/complexity, handle external URI policy and malformed files, and revoke object URLs after their consumers finish.

Verify missing decoder files, failed textures, rapid model switching, nested deployment paths, representative animation clips, and memory after repeated replacement.

API reference

Consult the official documentation for exact signatures and revision-specific behavior. If documentation access is unavailable, inspect installed types/source and state any remaining uncertainty.