compressed texture works fine when used as image or sprite, but throw an error when used as tileSprite:
phaser.min.js:1 Uncaught TypeError: Failed to execute 'drawImage' on 'CanvasRenderingContext2D': The provided value is not of type '(CSSImageValue or HTMLCanvasElement or HTMLImageElement or HTMLVideoElement or ImageBitmap or OffscreenCanvas or SVGImageElement or VideoFrame)'
Example Test Code
Here is an example with a dxt5 texture (for desktop, but same errors with ASTC on mobile), i uploaded one on a cdn, but you can try with any compressed texture:
In preload:
this.load.texture("dxt5_test", { S3TC: { type: "PVR", textureURL: "https://cdn-121.anonfiles.com/V8I97as4y2/09fa227c-1656244249/test.pvr", }, IMG: { textureURL: "test.png", }, });
In create:
this.add.sprite(0, 0, 'dxt5_test') // worksthis.add.image(0, 0, 'dxt5_test') // worksthis.add.tileSprite(0, 0,100,100 'dxt5_test') // Throws an error
Version
3.60 beta 9
Description
compressed texture works fine when used as image or sprite, but throw an error when used as tileSprite:
phaser.min.js:1 Uncaught TypeError: Failed to execute 'drawImage' on 'CanvasRenderingContext2D': The provided value is not of type '(CSSImageValue or HTMLCanvasElement or HTMLImageElement or HTMLVideoElement or ImageBitmap or OffscreenCanvas or SVGImageElement or VideoFrame)'
Example Test Code
Here is an example with a dxt5 texture (for desktop, but same errors with ASTC on mobile), i uploaded one on a cdn, but you can try with any compressed texture: In preload:
this.load.texture("dxt5_test", { S3TC: { type: "PVR", textureURL: "https://cdn-121.anonfiles.com/V8I97as4y2/09fa227c-1656244249/test.pvr", }, IMG: { textureURL: "test.png", }, });
In create:
this.add.sprite(0, 0, 'dxt5_test') // works
this.add.image(0, 0, 'dxt5_test') // works
this.add.tileSprite(0, 0,100,100 'dxt5_test') // Throws an error