Commit Graph

8 Commits

Author SHA1 Message Date
simoleo89 5ea3201e31 Align with Pixi v8: Filter[] union, WebGLRenderer narrow, ImageLike
Four sites where Pixi v8's stricter typing tripped tsgo:

- AvatarImage: container.filters is typed as 'readonly Filter[] | null'
  in v8 (no longer a single-Filter union). The old fallback branch
  'else container.filters = [container.filters, …]' tried to treat a
  readonly array as a single Filter; collapsed to the array-spread
  path which now covers both undefined and non-empty cases. Added
  Filter to the pixi.js import.
- FurnitureBadgeDisplayVisualization.updateSprite() had a 4-arg
  override (sprite, asset, scale, layerId) of the parent's 2-arg
  signature (scale, layerId). The sprite/asset were never used from
  the parameters — the body only mutated 'sprite'. Refactored to
  fetch the sprite via this.getSprite(layerId) inside the override
  body so the signature matches the base.
- ExtendedSprite: 'renderer.gl' / 'glRenderTarget.resolveTargetFramebuffer'
  exist only on WebGLRenderer / GlRenderTarget (not the WebGPU
  variants). The runtime check 'renderer.type === RendererType.WEBGL'
  guarantees this; cast at the boundary to satisfy the typechecker.
- TextureUtils.generateImage: Pixi v8's Extractor.image() returns the
  union ImageLike (HTMLCanvasElement | HTMLImageElement); the public
  signature promises HTMLImageElement. Cast at return — the Pixi
  default backend returns HTMLImageElement here.
2026-05-11 21:09:59 +02:00
duckietm fd74fd323b 🆙 Some minor mem tweaks 2026-03-31 16:03:21 +02:00
duckietm 44cb722f54 📝 Fixed some memory problems
RenderTexture leak in IsometricImageFurniVisualization, every direction change or thumbnail update leaked a GPU RenderTexture.
Image object leak in FurnitureDynamicThumbnailVisualization, now clears callbacks and src after use.
Image object leak in FurnitureBadgeDisplayVisualization, image objects never cleaned up
2026-03-31 15:20:28 +02:00
DuckieTM bd059d739d 🆙 foto's 100% in renderer as in habbo 2026-02-01 15:13:30 +01:00
DuckieTM 1fe48bcda7 🆙 Update Furniture Badge
- Better performance - PixiJS handles animation
- GPU acceleration - Textures are uploaded to GPU instead of CPU canvas operations
2026-01-31 20:54:42 +01:00
duckietm e263ce59bf 🆙 Added animated gif to badge_display
Display Container
├── Furniture Container (renders 1st - back)
│   └── All furniture sprites sorted by z-depth
├── Avatar Container (renders 2nd - middle)
│   └── All avatar sprites sorted by z-depth
└── Badge Container (renders 3rd - front)
    └── All badge sprites sorted by z-depth

 Badges render on top of their furniture
 Avatars respect proper 3D depth (in front when in front, behind when behind)
 Animated GIFs work beautifully
 Clean, maintainable code with just a tiny z-offset
2026-01-30 09:59:04 +01:00
duckietm 53c6ecfbc3 :fix Furniture Badges & update pixijs 2026-01-29 11:02:58 +01:00
duckietm b3134ce50b Move to Renderer V2 2024-04-03 09:27:56 +02:00