Validation workaround `wait-for-import`: snippets don't await mesh/NodeMaterial loads

Đang mở
#2,009 0 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@bkaradzic-microsoft đang làm issue này rồi.

Từ ngày 3/11/2026.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

Affected tests (7)

  • NME Glow Manual
  • OpenPBR Transmission Color glTF - Analytic Lights
  • OpenPBR Transmission Roughness vs IOR - Analytic Lights
  • OpenPBR Transmission Scatter Anisotropy Reflect - Analytic Lights
  • OpenPBR Subsurface Radius vs Anisotropy - Analytic Lights
  • OpenPBR Thin Walled Anisotropic Transmission - Analytic Lights
  • OpenPBR Thin Walled Subsurface Anisotropy - Analytic Lights

What the workaround does

Waits for pending ImportMeshAsync / NodeMaterial.ParseFromSnippetAsync / ParseFromFileAsync calls before capture. The snippets fire these without awaiting and NodeMaterial loads don't register scene pending data, so executeWhenReady can fire before the content exists. Introduced in #1872.

Recommended fix

Fix in Babylon.js: NodeMaterial snippet/file loading (and any other async loaders used here) should call scene.addPendingData / removePendingData so scene readiness waits for them. Alternatively fix the snippets to await their loads (update both Babylon.js and BN config.json; references stay valid).


Workaround implementations live in Apps/Playground/Scripts/validation_native.js (WORKAROUNDS map); tests opt in via the workarounds array in Apps/Playground/Scripts/config.json. See Documentation/AddingNewValidationTests.md.

Ngôn ngữ chính
C++
Star
931
Fork
169
Merge trung bình
2 ngày 17 giờ
Pull request đã merge (30 ngày)
66

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của BabylonJS/BabylonNative

Tất cả issue của BabylonJS/BabylonNative

Issue tương tự

Thêm issue về C++

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.