Skip to content

Commit

Permalink
Add missing iridescence textures to animation pointer data (#14945)
Browse files Browse the repository at this point in the history
Also fix exception when validating glTF
  • Loading branch information
bghgary committed Apr 4, 2024
1 parent a520e0c commit 81cd742
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,16 @@ const materialsTree = {
iridescenceIor: [new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, "iridescence.indexOfRefraction", getFloat, () => 1)],
iridescenceThicknessMinimum: [new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, "iridescence.minimumThickness", getFloat, () => 1)],
iridescenceThicknessMaximum: [new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, "iridescence.maximumThickness", getFloat, () => 1)],
iridescenceTexture: {
extensions: {
KHR_texture_transform: getTextureTransformTree("iridescence.texture"),
},
},
iridescenceThicknessTexture: {
extensions: {
KHR_texture_transform: getTextureTransformTree("iridescence.thicknessTexture"),
},
},
},
KHR_materials_sheen: {
sheenColorFactor: [new MaterialAnimationPropertyInfo(Animation.ANIMATIONTYPE_COLOR3, "sheen.color", getColor3, () => 3)],
Expand Down
2 changes: 1 addition & 1 deletion packages/dev/loaders/src/glTF/glTFValidation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export class GLTFValidation {
case "getExternalResource": {
getExternalResource(data.uri).then(
(value) => {
worker.postMessage({ id: "getExternalResource.resolve", index: data.index, value: value }, [value]);
worker.postMessage({ id: "getExternalResource.resolve", index: data.index, value: value }, [value.buffer]);
},
(reason) => {
worker.postMessage({ id: "getExternalResource.reject", index: data.index, reason: reason });
Expand Down

0 comments on commit 81cd742

Please sign in to comment.