feat: branding furni image position + scale (MPU background editor)

Renderer support for the in-client image position editor:
- FurnitureBrandedImageVisualization applies offsetX/Y to the branded image
  layer only (offsetZ stays as z-index/depth), so the image can be moved
  without shifting the furni frame
- new `scale` branding key + FURNITURE_BRANDING_SCALE: zooms the image via a
  real per-sprite scale (RoomObjectSprite.scale, default 1, applied in
  RoomSpriteCanvas) — NOT by writing the read-only width/height
- AssetManager loads external raster images (png/jpg/…) via a CORS <img> +
  Texture.from instead of Assets.load (which didn't load cross-origin images);
  branding image download failures are now surfaced instead of swallowed
This commit is contained in:
medievalshell
2026-05-28 15:29:42 +02:00
parent 238592cd72
commit 9ece87240e
7 changed files with 142 additions and 8 deletions
@@ -76,6 +76,7 @@ export class RoomObjectVariable
public static FURNITURE_BRANDING_OFFSET_X: string = 'furniture_branding_offset_x';
public static FURNITURE_BRANDING_OFFSET_Y: string = 'furniture_branding_offset_y';
public static FURNITURE_BRANDING_OFFSET_Z: string = 'furniture_branding_offset_z';
public static FURNITURE_BRANDING_SCALE: string = 'furniture_branding_scale';
public static FURNITURE_BADGE_IMAGE_STATUS: string = 'furniture_badge_image_status';
public static FURNITURE_BADGE_ASSET_NAME: string = 'furniture_badge_asset_name';
public static FURNITURE_BADGE_VISIBLE_IN_STATE: string = 'furniture_badge_visible_in_state';
@@ -11,6 +11,7 @@ export interface IRoomObjectSprite
texture: Texture;
width: number;
height: number;
scale: number;
offsetX: number;
offsetY: number;
flipH: boolean;