1 line
1.4 KiB
Plaintext
1 line
1.4 KiB
Plaintext
{"version":3,"file":"getRenderableBounds.mjs","sources":["../../../../src/scene/container/bounds/getRenderableBounds.ts"],"sourcesContent":["import type { Renderable } from '../../../rendering/renderers/shared/Renderable';\nimport type { Bounds } from './Bounds';\n\nexport function getGlobalRenderableBounds(renderables: Renderable[], bounds: Bounds): Bounds\n{\n bounds.clear();\n\n // instead of copying the matrix each time we are assigning it in bounds\n // this is a performance hack :D\n // so we need to restore the matrix after we are done\n\n const tempMatrix = bounds.matrix;\n\n for (let i = 0; i < renderables.length; i++)\n {\n const renderable = renderables[i];\n\n if (renderable.globalDisplayStatus < 0b111)\n {\n continue;\n }\n\n bounds.matrix = renderable.worldTransform;\n renderable.addBounds(bounds);\n }\n\n bounds.matrix = tempMatrix;\n\n return bounds;\n}\n"],"names":[],"mappings":";AAGgB,SAAA,yBAAA,CAA0B,aAA2B,MACrE,EAAA;AACI,EAAA,MAAA,CAAO,KAAM,EAAA,CAAA;AAMb,EAAA,MAAM,aAAa,MAAO,CAAA,MAAA,CAAA;AAE1B,EAAA,KAAA,IAAS,CAAI,GAAA,CAAA,EAAG,CAAI,GAAA,WAAA,CAAY,QAAQ,CACxC,EAAA,EAAA;AACI,IAAM,MAAA,UAAA,GAAa,YAAY,CAAC,CAAA,CAAA;AAEhC,IAAI,IAAA,UAAA,CAAW,sBAAsB,CACrC,EAAA;AACI,MAAA,SAAA;AAAA,KACJ;AAEA,IAAA,MAAA,CAAO,SAAS,UAAW,CAAA,cAAA,CAAA;AAC3B,IAAA,UAAA,CAAW,UAAU,MAAM,CAAA,CAAA;AAAA,GAC/B;AAEA,EAAA,MAAA,CAAO,MAAS,GAAA,UAAA,CAAA;AAEhB,EAAO,OAAA,MAAA,CAAA;AACX;;;;"} |