Skip to content

Commit 843f25c

Browse files
bkaradzicCopilot
authored andcommitted
Fix native build: wrap loadCubeTexture resolve/reject for the SH-typed onSuccess
The six-file path passed the Promise resolve directly, which is not assignable to the widened onSuccess signature (sphericalPolynomial?: Float32Array). Wrap with () => resolve() / () => reject(new Error(...)). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 7627150 commit 843f25c

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

packages/dev/core/src/Engines/Native/Extensions/nativeEngine.cubeTexture.pure.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,15 @@ export function RegisterNativeEngineCubeTexture(): void {
127127
// eslint-disable-next-line github/no-then
128128
.then(async (data) => {
129129
return await new Promise<void>((resolve, reject) => {
130-
this._engine.loadCubeTexture(texture._hardwareTexture!.underlyingResource, data, !noMipmap, true, texture._useSRGBBuffer, resolve, reject);
130+
this._engine.loadCubeTexture(
131+
texture._hardwareTexture!.underlyingResource,
132+
data,
133+
!noMipmap,
134+
true,
135+
texture._useSRGBBuffer,
136+
() => resolve(),
137+
() => reject(new Error("Failed to load native cubemap"))
138+
);
131139
});
132140
})
133141
// eslint-disable-next-line github/no-then

0 commit comments

Comments
 (0)