mirror of
https://github.com/shinyobjectz/raea.git
synced 2026-12-01 06:53:19 -10:00
A composition's Image (sdk/raea frame-globals.ts, installed where the runtime has none) fired load but kept width, height, naturalWidth and naturalHeight at 0, so code sizing a canvas from it made a 0-high canvas, and a CanvasTexture made from that was refused as an undetermined image format. Now, when its load fires, naturalWidth and naturalHeight are the picture's size: a data: URL's from its header (@raea/ui's sniffSize), any other src's from the host's asset.load, which finds staticFile's /media/ paths as <Img> does (media/, assets/, public/) and fetches http URLs through raea's cache. width and height are the ones given (the constructor's, or set) else the natural size, as in a browser. A file the host can't find fires error and onerror instead of load, and only the last src set fires. The manual's web-components guide says so. Co-authored-by: shinyobjectz <[email protected]>