移除纹理缓存
你可以通过 Texture
或 BaseTexture
的静态方法 removeFromCache
来移除纹理缓存。
var url = 'https://gw.alipayobjects.com/as/g/tiny/resources/1.0.0/images/logo.png';
var baseTexture = Tiny.BaseTexture.fromImage(url);
var texture = new Tiny.Texture(baseTexture);
var sprite = new Tiny.Sprite(texture);
Tiny.BaseTexture.removeFromCache(baseTexture);
texture.on('update', function() {
console.log('render');
});