Update 3 IGetImageListener.imageReady call sites to v8 single-arg signature

IGetImageListener.imageReady(result: IImageResult) takes a single
IImageResult object (with .id, .data, .image), but three call sites in
the client still used the old 3-arg destructure '(id, texture, image)
=> ...'. The renderer's RoomEngine.ts already passes
'new ImageResult(...)' to the listener, so the runtime payload matches
the new contract; the old call-site shape just type-errored.

Migrated:
- LayoutPetImageView (pet thumbnail loader)
- LayoutRoomObjectImageView (furniture thumbnail loader)
- useFurniturePresentWidget (gift box image generator)

Also tightened imageFailed handlers from 'imageFailed: null' to a
proper no-op arrow — the interface requires a callback.
This commit is contained in:
simoleo89
2026-05-11 21:34:08 +02:00
parent a39aa37231
commit f57266af03
3 changed files with 21 additions and 11 deletions
@@ -53,19 +53,24 @@ const useFurniturePresentWidgetState = () =>
{
// async fix image
return {
imageReady: (id, texture, image) =>
imageReady: (result) =>
{
(async () =>
{
if(!image && texture)
let image = result.image;
if(!image && result.data)
{
image = await TextureUtils.generateImage(texture);
image = await TextureUtils.generateImage(result.data);
}
setImageUrl(image.src);
if(image) setImageUrl(image.src);
})();
},
imageFailed: null
imageFailed: () =>
{
// no-op
}
};
}, []);