threejs-testing

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

3D Testing and Visual QA

3D测试和视觉QA

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.
Translate the requested behavior into observable checks: visible subject, correct framing, interaction outcomes, load failure/retry, resize, teardown, and any explicit performance target. Keep test scope proportional to the change.
Use unit tests for pure coordinate transforms, selection mapping, timestep policies, and reducers where these are meaningful. A mocked renderer cannot prove pixels render correctly. Run the production build and a browser fixture for GPU integration.
Make visual fixtures reproducible: seed randomness, fix camera/viewport/pixel ratio, stop or seek animation to a known time, and wait for asset readiness plus a rendered frame. Use a semantic readiness signal, not an arbitrary sleep. Capture console and network failures along with screenshots.
Use tolerant comparisons for GPU-dependent pixels; avoid treating exact image equality across unrelated drivers as a portable contract. Inspect screenshots for cropping, contrast, shadow defects, text/overlay occlusion, and loading remnants. Scope browser feature expectations to the tested backend.
Exercise repeated navigation, rapid asset changes, hidden-to-visible sizing, touch interaction, reduced motion, unsupported rendering, and the relevant real device/browser. Headless software rendering is not a mobile GPU benchmark.
Report checks as passed, failed, or not run with reasons. Do not claim performance, XR hardware support, or assistive-technology behavior from compilation alone.
使用项目已安装的版本和现有架构。这些说明是对用户任务的补充;不授权无关更改或外部操作。
将请求的行为转化为可观察的检查:可见主体、正确的取景、交互结果、加载失败/重试、调整大小、拆卸以及任何明确的性能目标。保持测试范围与变更成比例。
对于纯坐标变换、选择映射、时间步策略和reducers,在有意义的地方使用单元测试。模拟渲染器无法证明像素正确渲染。运行生产构建和浏览器fixture进行GPU集成。
使视觉fixture可复现:固定随机种子,固定相机/视口/像素比,将动画停止或跳转到已知时间,并等待资源就绪加上一帧渲染。使用语义就绪信号,而不是随意睡眠。捕获控制台和网络故障以及截图。
对于GPU相关像素使用宽容比较;避免将不相关驱动间的精确图像相等视为可移植契约。检查截图是否有裁剪、对比度、阴影缺陷、文本/叠加遮挡和加载残留。将浏览器功能期望限制在测试的后端。
执行重复导航、快速资产更改、隐藏到可见的大小调整、触摸交互、减少运动、不支持渲染以及相关的真实设备/浏览器。无头软件渲染不是移动GPU基准。
将检查报告为通过、失败或未运行并附原因。不要仅凭编译就声称性能、XR硬件支持或辅助技术行为。

API reference

API参考

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.
查阅官方文档获取精确签名和版本特定行为。如果文档访问不可用,检查已安装的类型/源代码并说明任何剩余的不确定性。