{"version":3,"file":"isRenderingToScreen.mjs","sources":["../../../../../src/rendering/renderers/shared/renderTarget/isRenderingToScreen.ts"],"sourcesContent":["/* eslint-disable no-restricted-globals */\nimport type { RenderTarget } from './RenderTarget';\n\n/**\n * Checks if the render target is viewable on the screen\n * Basically, is it a canvas element and is that canvas element in the DOM\n * @param renderTarget - the render target to check\n * @returns true if the render target is viewable on the screen\n * @internal\n */\nexport function isRenderingToScreen(renderTarget: RenderTarget): boolean\n{\n    const resource = renderTarget.colorTexture.source.resource;\n\n    return ((globalThis.HTMLCanvasElement && resource instanceof HTMLCanvasElement) && document.body.contains(resource));\n}\n"],"names":[],"mappings":";AAUO,SAAS,oBAAoB,YAAA,EACpC;AACI,EAAA,MAAM,QAAA,GAAW,YAAA,CAAa,YAAA,CAAa,MAAA,CAAO,QAAA;AAElD,EAAA,OAAS,WAAW,iBAAA,IAAqB,QAAA,YAAoB,qBAAsB,QAAA,CAAS,IAAA,CAAK,SAAS,QAAQ,CAAA;AACtH;;;;"}