pixi.js
Version:
<p align="center"> <a href="https://pixijs.com" target="_blank" rel="noopener noreferrer"> <img height="150" src="https://files.pixijs.download/branding/pixijs-logo-transparent-dark.svg?v=1" alt="PixiJS logo"> </a> </p> <br/> <p align="center">
30 lines (27 loc) • 805 B
JavaScript
import { deprecation } from '../../../utils/logging/deprecation.mjs';
;
const cacheAsTextureMixin = {
get isCachedAsTexture() {
return !!this.renderGroup?.isCachedAsTexture;
},
cacheAsTexture(val) {
if (typeof val === "boolean" && val === false) {
this.disableRenderGroup();
} else {
this.enableRenderGroup();
this.renderGroup.enableCacheAsTexture(val === true ? {} : val);
}
},
updateCacheTexture() {
this.renderGroup?.updateCacheTexture();
},
get cacheAsBitmap() {
return this.isCachedAsTexture;
},
set cacheAsBitmap(val) {
deprecation("v8.6.0", "cacheAsBitmap is deprecated, use cacheAsTexture instead.");
this.cacheAsTexture(val);
}
};
export { cacheAsTextureMixin };
//# sourceMappingURL=cacheAsTextureMixin.mjs.map