agmon 0.1.1 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -0
- package/.next/app-path-routes-manifest.json +7 -0
- package/.next/build/chunks/[root-of-the-server]__05i36w1t4lzaf._.js +502 -0
- package/.next/build/chunks/[root-of-the-server]__05i36w1t4lzaf._.js.map +11 -0
- package/.next/build/chunks/[root-of-the-server]__1kki86fknkq7y._.js +190 -0
- package/.next/build/chunks/[root-of-the-server]__1kki86fknkq7y._.js.map +8 -0
- package/.next/build/chunks/[turbopack-node]_transforms_postcss_ts_1gfkiq9iz8yb8._.js +13 -0
- package/.next/build/chunks/[turbopack-node]_transforms_postcss_ts_1gfkiq9iz8yb8._.js.map +5 -0
- package/.next/build/chunks/[turbopack]_runtime.js +1056 -0
- package/.next/build/chunks/[turbopack]_runtime.js.map +11 -0
- package/.next/build/chunks/node_modules_20v-8wlfss9m1._.js +7314 -0
- package/.next/build/chunks/node_modules_20v-8wlfss9m1._.js.map +47 -0
- package/.next/build/chunks/pool_entry-[turbopack-node]_transforms_postcss_ts_0tp-k2vy8nj6i._.js +6 -0
- package/.next/build/chunks/pool_entry-[turbopack-node]_transforms_postcss_ts_0tp-k2vy8nj6i._.js.map +5 -0
- package/.next/build/package.json +1 -0
- package/.next/build-manifest.json +54 -0
- package/.next/export-marker.json +6 -0
- package/.next/fallback-build-manifest.json +15 -0
- package/.next/images-manifest.json +68 -0
- package/.next/next-minimal-server.js.nft.json +1 -0
- package/.next/next-server.js.nft.json +1 -0
- package/.next/package.json +1 -0
- package/.next/prerender-manifest.json +97 -0
- package/.next/required-server-files.js +366 -0
- package/.next/required-server-files.json +366 -0
- package/.next/routes-manifest.json +75 -0
- package/.next/server/app/_global-error/page/app-paths-manifest.json +3 -0
- package/.next/server/app/_global-error/page/build-manifest.json +21 -0
- package/.next/server/app/_global-error/page/next-font-manifest.json +6 -0
- package/.next/server/app/_global-error/page/react-loadable-manifest.json +1 -0
- package/.next/server/app/_global-error/page/server-reference-manifest.json +4 -0
- package/.next/server/app/_global-error/page.js +10 -0
- package/.next/server/app/_global-error/page.js.map +5 -0
- package/.next/server/app/_global-error/page.js.nft.json +1 -0
- package/.next/server/app/_global-error/page_client-reference-manifest.js +3 -0
- package/.next/server/app/_global-error.html +1 -0
- package/.next/server/app/_global-error.meta +30 -0
- package/.next/server/app/_global-error.rsc +18 -0
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +23 -0
- package/.next/server/app/_global-error.segments/_full.segment.rsc +18 -0
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +2 -0
- package/.next/server/app/_not-found/page/app-paths-manifest.json +3 -0
- package/.next/server/app/_not-found/page/build-manifest.json +21 -0
- package/.next/server/app/_not-found/page/next-font-manifest.json +6 -0
- package/.next/server/app/_not-found/page/react-loadable-manifest.json +1 -0
- package/.next/server/app/_not-found/page/server-reference-manifest.json +4 -0
- package/.next/server/app/_not-found/page.js +12 -0
- package/.next/server/app/_not-found/page.js.map +5 -0
- package/.next/server/app/_not-found/page.js.nft.json +1 -0
- package/.next/server/app/_not-found/page_client-reference-manifest.js +3 -0
- package/.next/server/app/_not-found.html +1 -0
- package/.next/server/app/_not-found.meta +35 -0
- package/.next/server/app/_not-found.rsc +22 -0
- package/.next/server/app/_not-found.segments/_full.segment.rsc +22 -0
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +28 -0
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +4 -0
- package/.next/server/app/api/traces/stream/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/traces/stream/route/build-manifest.json +12 -0
- package/.next/server/app/api/traces/stream/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/traces/stream/route.js +7 -0
- package/.next/server/app/api/traces/stream/route.js.map +5 -0
- package/.next/server/app/api/traces/stream/route.js.nft.json +1 -0
- package/.next/server/app/api/traces/stream/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/version/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/version/route/build-manifest.json +12 -0
- package/.next/server/app/api/version/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/version/route.js +7 -0
- package/.next/server/app/api/version/route.js.map +5 -0
- package/.next/server/app/api/version/route.js.nft.json +1 -0
- package/.next/server/app/api/version/route_client-reference-manifest.js +3 -0
- package/.next/server/app/index.html +1 -0
- package/.next/server/app/index.meta +29 -0
- package/.next/server/app/index.rsc +29 -0
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +34 -0
- package/.next/server/app/index.segments/_full.segment.rsc +29 -0
- package/.next/server/app/index.segments/_tree.segment.rsc +3 -0
- package/.next/server/app/page/app-paths-manifest.json +3 -0
- package/.next/server/app/page/build-manifest.json +21 -0
- package/.next/server/app/page/next-font-manifest.json +6 -0
- package/.next/server/app/page/react-loadable-manifest.json +1 -0
- package/.next/server/app/page/server-reference-manifest.json +4 -0
- package/.next/server/app/page.js +13 -0
- package/.next/server/app/page.js.map +5 -0
- package/.next/server/app/page.js.nft.json +1 -0
- package/.next/server/app/page_client-reference-manifest.js +3 -0
- package/.next/server/app-paths-manifest.json +7 -0
- package/.next/server/chunks/[externals]__0bwf06g0pqv3h._.js +3 -0
- package/.next/server/chunks/[externals]__0bwf06g0pqv3h._.js.map +1 -0
- package/.next/server/chunks/[externals]__1p2j9_5g429uh._.js +3 -0
- package/.next/server/chunks/[externals]__1p2j9_5g429uh._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__04an4kw4xcc5l._.js +5 -0
- package/.next/server/chunks/[root-of-the-server]__04an4kw4xcc5l._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__1s6v8mz-nanm-._.js +5 -0
- package/.next/server/chunks/[root-of-the-server]__1s6v8mz-nanm-._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__20xfs4y2ipcvv._.js +320 -0
- package/.next/server/chunks/[root-of-the-server]__20xfs4y2ipcvv._.js.map +1 -0
- package/.next/server/chunks/[turbopack]_runtime.js +937 -0
- package/.next/server/chunks/[turbopack]_runtime.js.map +10 -0
- package/.next/server/chunks/_next-internal_server_app_api_traces_stream_route_actions_07rmicxgds803.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_traces_stream_route_actions_07rmicxgds803.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_version_route_actions_0kbx30hro8e93.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_version_route_actions_0kbx30hro8e93.js.map +1 -0
- package/.next/server/chunks/ssr/1q96_modules_pixi_js_lib_rendering_renderers_canvas_CanvasRenderer_mjs_1xntzghggpb51._.js +3 -0
- package/.next/server/chunks/ssr/1q96_modules_pixi_js_lib_rendering_renderers_canvas_CanvasRenderer_mjs_1xntzghggpb51._.js.map +1 -0
- package/.next/server/chunks/ssr/1q96_modules_pixi_js_lib_rendering_renderers_gpu_WebGPURenderer_mjs_00tc9jrf-ft1_._.js +76 -0
- package/.next/server/chunks/ssr/1q96_modules_pixi_js_lib_rendering_renderers_gpu_WebGPURenderer_mjs_00tc9jrf-ft1_._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__08zgqq_38tv57._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__08zgqq_38tv57._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0aa2929udndo-._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0aa2929udndo-._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0ayw3c9e93kvf._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0ayw3c9e93kvf._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0ojpb-dtuk3-q._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0ojpb-dtuk3-q._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0py1t7q9ntzgc._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0py1t7q9ntzgc._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__1cf6qt9agg_9-._.js +14 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__1cf6qt9agg_9-._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__1e1_fmeab1ca7._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__1e1_fmeab1ca7._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__1w2vu9hh0h02y._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__1w2vu9hh0h02y._.js.map +1 -0
- package/.next/server/chunks/ssr/[turbopack]_runtime.js +937 -0
- package/.next/server/chunks/ssr/[turbopack]_runtime.js.map +10 -0
- package/.next/server/chunks/ssr/_next-internal_server_app__global-error_page_actions_0zi5s8-psc_d2.js +3 -0
- package/.next/server/chunks/ssr/_next-internal_server_app__global-error_page_actions_0zi5s8-psc_d2.js.map +1 -0
- package/.next/server/chunks/ssr/_next-internal_server_app__not-found_page_actions_0pt47yrisjoev.js +3 -0
- package/.next/server/chunks/ssr/_next-internal_server_app__not-found_page_actions_0pt47yrisjoev.js.map +1 -0
- package/.next/server/chunks/ssr/_next-internal_server_app_page_actions_0hhsz1jew5ls7.js +3 -0
- package/.next/server/chunks/ssr/_next-internal_server_app_page_actions_0hhsz1jew5ls7.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_01xbj_9zg44kw._.js +33 -0
- package/.next/server/chunks/ssr/node_modules_01xbj_9zg44kw._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_0a548_llmwce7._.js +23 -0
- package/.next/server/chunks/ssr/node_modules_0a548_llmwce7._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_0gxlxpuufujz9._.js +33 -0
- package/.next/server/chunks/ssr/node_modules_0gxlxpuufujz9._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_0janj0i6dqko7._.js +6 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_0janj0i6dqko7._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_1hgv5i-pr1hza._.js +3 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_1hgv5i-pr1hza._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_0wpq8j32_ibz4._.js +3 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_0wpq8j32_ibz4._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_forbidden_0symwr9mbf-fh.js +3 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_forbidden_0symwr9mbf-fh.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_global-error_0q-w892nagajq.js +3 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_global-error_0q-w892nagajq.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_unauthorized_0l_sp0xky89qu.js +3 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_unauthorized_0l_sp0xky89qu.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0aymk_x8-bu4q.js +3 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0aymk_x8-bu4q.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_19--w_z4y02i7.js +3 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_19--w_z4y02i7.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1qjycfedgh109.js +3 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1qjycfedgh109.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_pixi_js_lib_0hcyh9uzlz7ci._.js +3 -0
- package/.next/server/chunks/ssr/node_modules_pixi_js_lib_0hcyh9uzlz7ci._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_pixi_js_lib_0k3f3soanqdoq._.js +3 -0
- package/.next/server/chunks/ssr/node_modules_pixi_js_lib_0k3f3soanqdoq._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_pixi_js_lib_0ovgsftn-uvbz._.js +3 -0
- package/.next/server/chunks/ssr/node_modules_pixi_js_lib_0ovgsftn-uvbz._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_pixi_js_lib_0xa24fqr5c5qi._.js +5 -0
- package/.next/server/chunks/ssr/node_modules_pixi_js_lib_0xa24fqr5c5qi._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_pixi_js_lib_0zrftay3kjup7._.js +5 -0
- package/.next/server/chunks/ssr/node_modules_pixi_js_lib_0zrftay3kjup7._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_pixi_js_lib_1z4lgkg_w-7fr._.js +208 -0
- package/.next/server/chunks/ssr/node_modules_pixi_js_lib_1z4lgkg_w-7fr._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_pixi_js_lib_1zjkoj2kc4hm-._.js +3 -0
- package/.next/server/chunks/ssr/node_modules_pixi_js_lib_1zjkoj2kc4hm-._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_pixi_js_lib_environment-browser_browserAll_mjs_0xb_t3dj4ad1f._.js +16 -0
- package/.next/server/chunks/ssr/node_modules_pixi_js_lib_environment-browser_browserAll_mjs_0xb_t3dj4ad1f._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_pixi_js_lib_filters_Filter_mjs_0luksfw8ekifi._.js +3 -0
- package/.next/server/chunks/ssr/node_modules_pixi_js_lib_filters_Filter_mjs_0luksfw8ekifi._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_pixi_js_lib_filters_init_mjs_1o5fmm_m60v_s._.js +3 -0
- package/.next/server/chunks/ssr/node_modules_pixi_js_lib_filters_init_mjs_1o5fmm_m60v_s._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_pixi_js_lib_rendering_1fkio2phhfvow._.js +196 -0
- package/.next/server/chunks/ssr/node_modules_pixi_js_lib_rendering_1fkio2phhfvow._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_pixi_js_lib_rendering_1n1q7aum4i7zo._.js +196 -0
- package/.next/server/chunks/ssr/node_modules_pixi_js_lib_rendering_1n1q7aum4i7zo._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_pixi_js_lib_rendering_renderers_10vpvx1o7svnk._.js +3 -0
- package/.next/server/chunks/ssr/node_modules_pixi_js_lib_rendering_renderers_10vpvx1o7svnk._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_pixi_js_lib_rendering_renderers_gl_WebGLRenderer_mjs_1hlux44jh7dk-._.js +153 -0
- package/.next/server/chunks/ssr/node_modules_pixi_js_lib_rendering_renderers_gl_WebGLRenderer_mjs_1hlux44jh7dk-._.js.map +1 -0
- package/.next/server/chunks/ssr/src_app_page_1vqfk0-j72fp6.js +3 -0
- package/.next/server/chunks/ssr/src_app_page_1vqfk0-j72fp6.js.map +1 -0
- package/.next/server/functions-config-manifest.json +4 -0
- package/.next/server/interception-route-rewrite-manifest.js +1 -0
- package/.next/server/middleware-build-manifest.js +54 -0
- package/.next/server/middleware-manifest.json +6 -0
- package/.next/server/next-font-manifest.js +1 -0
- package/.next/server/next-font-manifest.json +6 -0
- package/.next/server/pages/404.html +1 -0
- package/.next/server/pages/500.html +1 -0
- package/.next/server/pages-manifest.json +4 -0
- package/.next/server/prefetch-hints.json +34 -0
- package/.next/server/preview-props.json +5 -0
- package/.next/server/server-reference-manifest.js +1 -0
- package/.next/server/server-reference-manifest.json +5 -0
- package/.next/static/chunks/0_9x2udu0iodw.js +1 -0
- package/.next/static/chunks/0cz1d0mv5g_q7.js +1 -0
- package/.next/static/chunks/0umf92h1sb77c.js +1 -0
- package/.next/static/chunks/10om7oix6wjze.js +1 -0
- package/.next/static/chunks/1780fh11o7pze.js +1 -0
- package/.next/static/chunks/1cldmiyw3ya18.js +21 -0
- package/.next/static/chunks/1unuqfq-vfqtp.js +1 -0
- package/.next/static/chunks/2-vsu_pt58kse.js +3 -0
- package/.next/static/chunks/2drjv1ti9t4pg.js +1 -0
- package/.next/static/chunks/2hgsvrrwu57--.css +1 -0
- package/.next/static/chunks/2ogvir8krwwhf.js +1 -0
- package/.next/static/chunks/2tc54fmsk8v8q.js +1 -0
- package/.next/static/chunks/304ue7hvto0o0.js +206 -0
- package/.next/static/chunks/31gve42sn75--.js +1 -0
- package/.next/static/chunks/32kizm_7q94vd.js +194 -0
- package/.next/static/chunks/33bap0u4zwgab.js +74 -0
- package/.next/static/chunks/3c4xol65z2da2.js +22 -0
- package/.next/static/chunks/3cfn99dbrcvvp.js +31 -0
- package/.next/static/chunks/3d6xc1eemxy82.js +1 -0
- package/.next/static/chunks/3ycr8gfnsg-xv.js +151 -0
- package/.next/static/chunks/3ytt3vrdhke9u.js +14 -0
- package/.next/static/chunks/turbopack-3-ry682tkyiqk.js +1 -0
- package/.next/static/cy2F4S28h_-YWqCOuE_ul/_buildManifest.js +11 -0
- package/.next/static/cy2F4S28h_-YWqCOuE_ul/_clientMiddlewareManifest.js +1 -0
- package/.next/static/cy2F4S28h_-YWqCOuE_ul/_ssgManifest.js +1 -0
- package/.next/trace +1 -0
- package/.next/trace-build +1 -0
- package/.next/types/cache-life.d.ts +114 -0
- package/.next/types/root-params.d.ts +3 -0
- package/.next/types/routes.d.ts +74 -0
- package/.next/types/validator.ts +17 -0
- package/bin/cli.js +24 -6
- package/package.json +6 -6
- package/src/app/api/traces/stream/route.js +2 -2
- package/src/app/layout.js +1 -1
- package/src/app/page.js +6 -19
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../node_modules/pixi.js/src/rendering/mask/color/ColorMaskPipe.ts","../../../../node_modules/pixi.js/src/rendering/renderers/shared/background/BackgroundSystem.ts","../../../../node_modules/pixi.js/src/rendering/mask/stencil/StencilMaskPipe.ts","../../../../node_modules/pixi.js/src/rendering/renderers/shared/blendModes/BlendModePipe.ts","../../../../node_modules/pixi.js/src/rendering/renderers/shared/renderTarget/isRenderingToScreen.ts","../../../../node_modules/pixi.js/src/utils/data/clean.ts","../../../../node_modules/pixi.js/src/rendering/renderers/gpu/renderTarget/calculateProjection.ts","../../../../node_modules/pixi.js/src/rendering/renderers/shared/texture/TextureGCSystem.ts","../../../../node_modules/pixi.js/src/rendering/renderers/shared/SchedulerSystem.ts","../../../../node_modules/pixi.js/src/utils/sayHello.ts","../../../../node_modules/pixi.js/src/rendering/renderers/shared/GCSystem.ts","../../../../node_modules/pixi.js/src/rendering/renderers/shared/texture/RenderableGCSystem.ts","../../../../node_modules/pixi.js/src/rendering/renderers/shared/texture/RenderTexture.ts","../../../../node_modules/pixi.js/src/rendering/renderers/shared/texture/utils/getCanvasTexture.ts","../../../../node_modules/pixi.js/src/rendering/renderers/shared/startup/HelloSystem.ts","../../../../node_modules/pixi.js/src/rendering/renderers/shared/renderTarget/RenderTarget.ts","../../../../node_modules/pixi.js/src/rendering/renderers/shared/extract/ExtractSystem.ts","../../../../node_modules/pixi.js/src/rendering/renderers/shared/view/ViewSystem.ts","../../../../node_modules/pixi.js/src/rendering/renderers/shared/renderTarget/GlobalUniformSystem.ts","../../../../node_modules/pixi.js/src/rendering/renderers/shared/extract/GenerateTextureSystem.ts","../../../../node_modules/pixi.js/src/rendering/renderers/shared/renderTarget/RenderTargetSystem.ts","../../../../node_modules/pixi.js/src/rendering/renderers/shared/system/SharedSystems.ts","../../../../node_modules/pixi.js/src/scene/container/utils/executeInstructions.ts","../../../../node_modules/pixi.js/src/scene/container/CustomRenderPipe.ts","../../../../node_modules/pixi.js/src/scene/container/RenderGroupPipe.ts","../../../../node_modules/pixi.js/src/scene/container/utils/clearList.ts","../../../../node_modules/pixi.js/src/scene/container/utils/validateRenderables.ts","../../../../node_modules/pixi.js/src/scene/container/utils/updateRenderGroupTransforms.ts","../../../../node_modules/pixi.js/src/scene/container/RenderGroupSystem.ts","../../../../node_modules/pixi.js/src/scene/sprite/SpritePipe.ts","../../../../node_modules/pixi.js/src/rendering/batcher/shared/BatcherPipe.ts","../../../../node_modules/pixi.js/src/rendering/mask/alpha/AlphaMaskPipe.ts","../../../../node_modules/pixi.js/src/filters/mask/MaskFilter.ts"],"sourcesContent":["import { ExtensionType } from '../../../extensions/Extensions';\n\nimport type { Container } from '../../../scene/container/Container';\nimport type { Effect } from '../../../scene/container/Effect';\nimport type { WebGLRenderer } from '../../renderers/gl/WebGLRenderer';\nimport type { WebGPURenderer } from '../../renderers/gpu/WebGPURenderer';\nimport type { InstructionSet } from '../../renderers/shared/instructions/InstructionSet';\nimport type { InstructionPipe } from '../../renderers/shared/instructions/RenderPipe';\nimport type { Renderer } from '../../renderers/types';\nimport type { ColorMask } from './ColorMask';\nimport type { ColorMaskInstruction } from './ColorMaskTypes';\n\n/** @internal */\nexport class ColorMaskPipe implements InstructionPipe<ColorMaskInstruction>\n{\n /** @ignore */\n public static extension = {\n type: [\n ExtensionType.WebGLPipes,\n ExtensionType.WebGPUPipes,\n ],\n name: 'colorMask',\n } as const;\n\n private readonly _renderer: Renderer;\n private _colorStack: number[] = [];\n private _colorStackIndex = 0;\n private _currentColor = 0;\n\n constructor(renderer: Renderer)\n {\n this._renderer = renderer;\n }\n\n public buildStart()\n {\n this._colorStack[0] = 0xF;\n this._colorStackIndex = 1;\n this._currentColor = 0xF;\n }\n\n public push(mask: Effect, _container: Container, instructionSet: InstructionSet): void\n {\n const renderer = this._renderer;\n\n renderer.renderPipes.batch.break(instructionSet);\n\n const colorStack = this._colorStack;\n\n colorStack[this._colorStackIndex] = colorStack[this._colorStackIndex - 1] & (mask as ColorMask).mask;\n\n const currentColor = this._colorStack[this._colorStackIndex];\n\n if (currentColor !== this._currentColor)\n {\n this._currentColor = currentColor;\n instructionSet.add({\n renderPipeId: 'colorMask',\n colorMask: currentColor,\n canBundle: false,\n } as ColorMaskInstruction);\n }\n\n this._colorStackIndex++;\n }\n\n public pop(_mask: Effect, _container: Container, instructionSet: InstructionSet): void\n {\n const renderer = this._renderer;\n\n renderer.renderPipes.batch.break(instructionSet);\n\n const colorStack = this._colorStack;\n\n this._colorStackIndex--;\n\n const currentColor = colorStack[this._colorStackIndex - 1];\n\n if (currentColor !== this._currentColor)\n {\n this._currentColor = currentColor;\n\n instructionSet.add({\n renderPipeId: 'colorMask',\n colorMask: currentColor,\n canBundle: false,\n } as ColorMaskInstruction);\n }\n }\n\n public execute(instruction: ColorMaskInstruction)\n {\n const renderer = this._renderer;\n\n (renderer as WebGLRenderer | WebGPURenderer).colorMask.setMask(instruction.colorMask);\n }\n\n public destroy()\n {\n (this._renderer as null) = null;\n this._colorStack = null;\n }\n}\n","import { Color } from '../../../../color/Color';\nimport { ExtensionType } from '../../../../extensions/Extensions';\nimport { warn } from '../../../../utils/logging/warn';\n\nimport type { ColorSource, RgbaArray } from '../../../../color/Color';\nimport type { System } from '../system/System';\n/**\n * Options for the background system.\n * @category rendering\n * @advanced\n */\nexport interface BackgroundSystemOptions\n{\n /**\n * The background color used to clear the canvas. See {@link ColorSource} for accepted color values.\n * @default 'black'\n */\n backgroundColor: ColorSource;\n /** Alias for `backgroundColor` */\n background?: ColorSource\n /**\n * Transparency of the background color, value from `0` (fully transparent) to `1` (fully opaque).\n * This value determines whether the canvas is initialized with alpha transparency support.\n * Note: This cannot be changed after initialization. If set to `1`, the canvas will remain opaque,\n * even if a transparent background color is set later.\n * @default 1\n */\n backgroundAlpha?: number;\n /**\n * Whether to clear the canvas before new render passes.\n * @default true\n */\n clearBeforeRender?: boolean;\n}\n\n/**\n * The background system manages the background color and alpha of the main view.\n * @category rendering\n * @advanced\n */\nexport class BackgroundSystem implements System<BackgroundSystemOptions>\n{\n /** @ignore */\n public static extension = {\n type: [\n ExtensionType.WebGLSystem,\n ExtensionType.WebGPUSystem,\n ExtensionType.CanvasSystem,\n ],\n name: 'background',\n priority: 0,\n } as const;\n\n /** default options used by the system */\n public static defaultOptions: BackgroundSystemOptions = {\n /**\n * {@link WebGLOptions.backgroundAlpha}\n * @default 1\n */\n backgroundAlpha: 1,\n /**\n * {@link WebGLOptions.backgroundColor}\n * @default 0x000000\n */\n backgroundColor: 0x0,\n /**\n * {@link WebGLOptions.clearBeforeRender}\n * @default true\n */\n clearBeforeRender: true,\n };\n\n /**\n * This sets if the CanvasRenderer will clear the canvas or not before the new render pass.\n * If the scene is NOT transparent PixiJS will use a canvas sized fillRect operation every\n * frame to set the canvas background color. If the scene is transparent PixiJS will use clearRect\n * to clear the canvas every frame. Disable this by setting this to false. For example, if\n * your game has a canvas filling background image you often don't need this set.\n */\n public clearBeforeRender: boolean;\n\n private readonly _backgroundColor: Color;\n\n constructor()\n {\n this.clearBeforeRender = true;\n\n this._backgroundColor = new Color(0x000000);\n\n this.color = this._backgroundColor; // run bg color setter\n this.alpha = 1;\n }\n\n /**\n * initiates the background system\n * @param options - the options for the background colors\n */\n public init(options: BackgroundSystemOptions): void\n {\n options = { ...BackgroundSystem.defaultOptions, ...options };\n\n this.clearBeforeRender = options.clearBeforeRender;\n this.color = options.background || options.backgroundColor || this._backgroundColor; // run bg color setter\n this.alpha = options.backgroundAlpha;\n\n this._backgroundColor.setAlpha(options.backgroundAlpha);\n }\n\n /** The background color to fill if not transparent */\n get color(): Color\n {\n return this._backgroundColor;\n }\n\n set color(value: ColorSource)\n {\n // #if _DEBUG\n\n const incoming = Color.shared.setValue(value);\n\n if (incoming.alpha < 1 && this._backgroundColor.alpha === 1)\n {\n warn(\n 'Cannot set a transparent background on an opaque canvas. '\n + 'To enable transparency, set backgroundAlpha < 1 when initializing your Application.'\n );\n }\n // #endif\n this._backgroundColor.setValue(value);\n }\n\n /** The background color alpha. Setting this to 0 will make the canvas transparent. */\n get alpha(): number\n {\n return this._backgroundColor.alpha;\n }\n\n set alpha(value: number)\n {\n this._backgroundColor.setAlpha(value);\n }\n\n /** The background color as an [R, G, B, A] array. */\n get colorRgba(): RgbaArray\n {\n return this._backgroundColor.toArray() as RgbaArray;\n }\n\n /**\n * destroys the background system\n * @internal\n */\n public destroy(): void\n {\n // No cleanup required\n }\n}\n","import { ExtensionType } from '../../../extensions/Extensions';\nimport { CLEAR } from '../../renderers/gl/const';\nimport { STENCIL_MODES } from '../../renderers/shared/state/const';\n\nimport type { Container } from '../../../scene/container/Container';\nimport type { Effect } from '../../../scene/container/Effect';\nimport type { WebGLRenderer } from '../../renderers/gl/WebGLRenderer';\nimport type { WebGPURenderer } from '../../renderers/gpu/WebGPURenderer';\nimport type { InstructionSet } from '../../renderers/shared/instructions/InstructionSet';\nimport type { InstructionPipe } from '../../renderers/shared/instructions/RenderPipe';\nimport type { Renderable } from '../../renderers/shared/Renderable';\nimport type { Renderer } from '../../renderers/types';\nimport type { StencilMask } from './StencilMask';\nimport type { StencilMaskInstruction } from './StencilMaskTypes';\n\n/** @internal */\nexport class StencilMaskPipe implements InstructionPipe<StencilMaskInstruction>\n{\n public static extension = {\n type: [\n ExtensionType.WebGLPipes,\n ExtensionType.WebGPUPipes,\n ],\n name: 'stencilMask',\n } as const;\n\n private _renderer: Renderer;\n\n private _maskHash = new WeakMap<StencilMask, {\n instructionsStart: number,\n instructionsLength: number,\n }>();\n\n constructor(renderer: Renderer)\n {\n this._renderer = renderer;\n }\n\n public push(mask: Effect, _container: Container, instructionSet: InstructionSet): void\n {\n const effect = mask as StencilMask;\n\n const renderer = this._renderer;\n\n renderer.renderPipes.batch.break(instructionSet);\n\n renderer.renderPipes.blendMode.setBlendMode(effect.mask as Renderable, 'none', instructionSet);\n\n instructionSet.add({\n renderPipeId: 'stencilMask',\n action: 'pushMaskBegin',\n mask,\n inverse: _container._maskOptions.inverse,\n canBundle: false,\n } as StencilMaskInstruction);\n\n const maskContainer = effect.mask;\n\n maskContainer.includeInBuild = true;\n\n if (!this._maskHash.has(effect))\n {\n this._maskHash.set(effect, {\n instructionsStart: 0,\n instructionsLength: 0,\n });\n }\n\n const maskData = this._maskHash.get(effect);\n\n maskData.instructionsStart = instructionSet.instructionSize;\n\n maskContainer.collectRenderables(\n instructionSet,\n renderer,\n null\n );\n\n maskContainer.includeInBuild = false;\n\n renderer.renderPipes.batch.break(instructionSet);\n\n instructionSet.add({\n renderPipeId: 'stencilMask',\n action: 'pushMaskEnd',\n mask,\n inverse: _container._maskOptions.inverse,\n canBundle: false,\n } as StencilMaskInstruction);\n\n const instructionsLength = instructionSet.instructionSize - maskData.instructionsStart - 1;\n\n maskData.instructionsLength = instructionsLength;\n }\n\n public pop(mask: Effect, _container: Container, instructionSet: InstructionSet): void\n {\n const effect = mask as StencilMask;\n\n const renderer = this._renderer;\n\n // stencil is stored based on current render target..\n renderer.renderPipes.batch.break(instructionSet);\n renderer.renderPipes.blendMode.setBlendMode(effect.mask as Renderable, 'none', instructionSet);\n\n instructionSet.add({\n renderPipeId: 'stencilMask',\n action: 'popMaskBegin',\n inverse: _container._maskOptions.inverse,\n canBundle: false,\n } as StencilMaskInstruction);\n\n const maskData = this._maskHash.get(mask as StencilMask);\n\n for (let i = 0; i < maskData.instructionsLength; i++)\n {\n // eslint-disable-next-line max-len\n instructionSet.instructions[instructionSet.instructionSize++] = instructionSet.instructions[maskData.instructionsStart++];\n }\n\n instructionSet.add({\n renderPipeId: 'stencilMask',\n action: 'popMaskEnd',\n canBundle: false,\n });\n }\n\n public execute(instruction: StencilMaskInstruction)\n {\n const renderer = this._renderer;\n\n const gpuRenderer = renderer as WebGLRenderer | WebGPURenderer;\n const gpuRenderTarget = gpuRenderer.renderTarget.getGpuRenderTarget(gpuRenderer.renderTarget.renderTarget);\n\n let maskStackIndex = gpuRenderTarget.maskStackIndex;\n\n if (instruction.action === 'pushMaskBegin')\n {\n // we create the depth and stencil buffers JIT\n // as no point allocating the memory if we don't use it\n gpuRenderer.renderTarget.ensureDepthStencil();\n\n gpuRenderer.stencil.setStencilMode(STENCIL_MODES.RENDERING_MASK_ADD, maskStackIndex);\n\n maskStackIndex++;\n\n gpuRenderer.colorMask.setMask(0);\n }\n else if (instruction.action === 'pushMaskEnd')\n {\n if (instruction.inverse)\n {\n gpuRenderer.stencil.setStencilMode(STENCIL_MODES.INVERSE_MASK_ACTIVE, maskStackIndex);\n }\n else\n {\n gpuRenderer.stencil.setStencilMode(STENCIL_MODES.MASK_ACTIVE, maskStackIndex);\n }\n\n gpuRenderer.colorMask.setMask(0xF);\n }\n else if (instruction.action === 'popMaskBegin')\n {\n gpuRenderer.colorMask.setMask(0);\n\n if (maskStackIndex !== 0)\n {\n gpuRenderer.stencil.setStencilMode(STENCIL_MODES.RENDERING_MASK_REMOVE, maskStackIndex);\n }\n else\n {\n gpuRenderer.renderTarget.clear(null, CLEAR.STENCIL);\n gpuRenderer.stencil.setStencilMode(STENCIL_MODES.DISABLED, maskStackIndex);\n }\n\n maskStackIndex--;\n }\n else if (instruction.action === 'popMaskEnd')\n {\n if (instruction.inverse)\n {\n gpuRenderer.stencil.setStencilMode(STENCIL_MODES.INVERSE_MASK_ACTIVE, maskStackIndex);\n }\n else\n {\n gpuRenderer.stencil.setStencilMode(STENCIL_MODES.MASK_ACTIVE, maskStackIndex);\n }\n\n gpuRenderer.colorMask.setMask(0xF);\n }\n\n gpuRenderTarget.maskStackIndex = maskStackIndex;\n }\n\n public destroy()\n {\n this._renderer = null;\n this._maskHash = null;\n }\n}\n","import { extensions, ExtensionType } from '../../../../extensions/Extensions';\nimport { FilterEffect } from '../../../../filters/FilterEffect';\nimport { RenderGroup } from '../../../../scene/container/RenderGroup';\nimport { warn } from '../../../../utils/logging/warn';\n\nimport type { BlendModeFilter } from '../../../../filters/blend-modes/BlendModeFilter';\nimport type { FilterInstruction } from '../../../../filters/FilterSystem';\nimport type { Renderer } from '../../types';\nimport type { Instruction } from '../instructions/Instruction';\nimport type { InstructionSet } from '../instructions/InstructionSet';\nimport type { InstructionPipe } from '../instructions/RenderPipe';\nimport type { Renderable } from '../Renderable';\nimport type { BLEND_MODES } from '../state/const';\n\ninterface AdvancedBlendInstruction extends Instruction\n{\n renderPipeId: 'blendMode',\n blendMode: BLEND_MODES,\n activeBlend: Renderable[],\n}\n\n// class map\nconst BLEND_MODE_FILTERS: Partial<Record<BLEND_MODES, new () => BlendModeFilter>> = {} as const;\n\nextensions.handle(ExtensionType.BlendMode, (value) =>\n{\n if (!value.name)\n {\n throw new Error('BlendMode extension must have a name property');\n }\n BLEND_MODE_FILTERS[value.name as BLEND_MODES] = value.ref;\n}, (value) =>\n{\n delete BLEND_MODE_FILTERS[value.name as BLEND_MODES];\n});\n\n/**\n * This Pipe handles the blend mode switching of the renderer.\n * It will insert instructions into the {@link InstructionSet} to switch the blend mode according to the\n * blend modes of the scene graph.\n *\n * This pipe is were wwe handle Advanced blend modes. Advanced blend modes essentially wrap the renderables\n * in a filter that applies the blend mode.\n *\n * You only need to use this class if you are building your own render instruction set rather than letting PixiJS build\n * the instruction set for you by traversing the scene graph\n * @category rendering\n * @internal\n */\nexport class BlendModePipe implements InstructionPipe<AdvancedBlendInstruction>\n{\n /** @ignore */\n public static extension = {\n type: [\n ExtensionType.WebGLPipes,\n ExtensionType.WebGPUPipes,\n ExtensionType.CanvasPipes,\n ],\n name: 'blendMode',\n } as const;\n\n private _renderer: Renderer;\n\n private _renderableList?: Renderable[];\n private _activeBlendMode: BLEND_MODES;\n private readonly _blendModeStack: BLEND_MODES[] = [];\n\n private _isAdvanced = false;\n\n private _filterHash: Partial<Record<BLEND_MODES, FilterEffect>> = Object.create(null);\n\n constructor(renderer: Renderer)\n {\n this._renderer = renderer;\n this._renderer.runners.prerender.add(this);\n }\n\n public prerender()\n {\n // make sure we reset the blend modes to normal\n // this way the next render will register any changes\n this._activeBlendMode = 'normal';\n this._isAdvanced = false;\n }\n\n /**\n * Push a blend mode onto the internal stack and apply it to the instruction set if needed.\n * @param renderable - The renderable or {@link RenderGroup} associated with the change.\n * @param blendMode - The blend mode to activate.\n * @param instructionSet - The instruction set being built.\n */\n public pushBlendMode(renderable: Renderable | RenderGroup, blendMode: BLEND_MODES, instructionSet: InstructionSet): void\n {\n this._blendModeStack.push(blendMode);\n\n this.setBlendMode(renderable, blendMode, instructionSet);\n }\n\n /**\n * Pop the last blend mode from the stack and apply the new top-of-stack mode.\n * @param instructionSet - The instruction set being built.\n */\n public popBlendMode(instructionSet: InstructionSet): void\n {\n this._blendModeStack.pop();\n const blendMode = this._blendModeStack[this._activeBlendMode.length - 1] ?? 'normal';\n\n this.setBlendMode(null, blendMode, instructionSet);\n }\n\n /**\n * Ensure a blend mode switch is added to the instruction set when the mode changes.\n * If an advanced blend mode is active, subsequent renderables will be collected so they can be\n * rendered within a single filter pass.\n * @param renderable - The renderable or {@link RenderGroup} to associate with the change, or null when unwinding.\n * @param blendMode - The target blend mode.\n * @param instructionSet - The instruction set being built.\n */\n public setBlendMode(\n renderable: Renderable | RenderGroup | null,\n blendMode: BLEND_MODES,\n instructionSet: InstructionSet\n )\n {\n const isRenderGroup = renderable instanceof RenderGroup;\n\n if (this._activeBlendMode === blendMode)\n {\n if (this._isAdvanced && renderable && !isRenderGroup)\n {\n this._renderableList?.push(renderable);\n }\n\n return;\n }\n\n if (this._isAdvanced) this._endAdvancedBlendMode(instructionSet);\n\n this._activeBlendMode = blendMode;\n\n if (!renderable) return;\n\n this._isAdvanced = !!BLEND_MODE_FILTERS[blendMode];\n\n if (this._isAdvanced) this._beginAdvancedBlendMode(renderable, instructionSet);\n }\n\n private _beginAdvancedBlendMode(renderable: Renderable | RenderGroup, instructionSet: InstructionSet)\n {\n this._renderer.renderPipes.batch.break(instructionSet);\n\n const blendMode = this._activeBlendMode;\n\n if (!BLEND_MODE_FILTERS[blendMode])\n {\n // #if _DEBUG\n warn(`Unable to assign BlendMode: '${blendMode}'. `\n + `You may want to include: import 'pixi.js/advanced-blend-modes'`);\n // #endif\n\n return;\n }\n\n const filterEffect = this._ensureFilterEffect(blendMode);\n const isRenderGroup = renderable instanceof RenderGroup;\n const instruction: FilterInstruction = {\n renderPipeId: 'filter',\n action: 'pushFilter',\n filterEffect,\n renderables: isRenderGroup ? null : [renderable],\n container: isRenderGroup ? renderable.root : null,\n canBundle: false\n };\n\n this._renderableList = instruction.renderables;\n\n instructionSet.add(instruction);\n }\n\n private _ensureFilterEffect(blendMode: BLEND_MODES): FilterEffect\n {\n let filterEffect: FilterEffect = this._filterHash[blendMode];\n\n if (!filterEffect)\n {\n filterEffect = this._filterHash[blendMode] = new FilterEffect();\n filterEffect.filters = [new BLEND_MODE_FILTERS[blendMode as keyof typeof BLEND_MODE_FILTERS]()];\n }\n\n return filterEffect;\n }\n\n private _endAdvancedBlendMode(instructionSet: InstructionSet)\n {\n this._isAdvanced = false;\n this._renderableList = null;\n this._renderer.renderPipes.batch.break(instructionSet);\n\n instructionSet.add({\n renderPipeId: 'filter',\n action: 'popFilter',\n canBundle: false,\n });\n }\n\n /**\n * called when the instruction build process is starting this will reset internally to the default blend mode\n * @internal\n */\n public buildStart()\n {\n this._isAdvanced = false;\n }\n\n /**\n * called when the instruction build process is finished, ensuring that if there is an advanced blend mode\n * active, we add the final render instructions added to the instruction set\n * @param instructionSet - The instruction set we are adding to\n * @internal\n */\n public buildEnd(instructionSet: InstructionSet)\n {\n if (!this._isAdvanced) return;\n\n this._endAdvancedBlendMode(instructionSet);\n }\n\n /** @internal */\n public destroy()\n {\n this._renderer = null;\n this._renderableList = null;\n\n for (const i in this._filterHash)\n {\n this._filterHash[i as BLEND_MODES].destroy();\n }\n\n this._filterHash = null;\n }\n}\n","/* 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 if (renderTarget.colorAttachments.length === 0) return false;\n\n const resource = renderTarget.colorTexture.resource;\n\n return ((globalThis.HTMLCanvasElement && resource instanceof HTMLCanvasElement) && document.body.contains(resource));\n}\n","/**\n * Takes a hash and removes all the `undefined`/`null` values from it.\n * In PixiJS, we tend to null properties instead of using 'delete' for performance reasons.\n * However, in some cases, this could be a problem if the hash grows too large over time,\n * this function can be used to clean a hash.\n * @param hash - The hash to clean.\n * @returns A new hash with all the `undefined`/`null` values removed.\n * @category utils\n * @internal\n */\nexport function cleanHash<T>(hash: Record<string, T>): Record<string, T>\n{\n let clean = false;\n\n for (const i in hash)\n {\n // eslint-disable-next-line eqeqeq\n if (hash[i] == undefined)\n {\n clean = true;\n break;\n }\n }\n\n if (!clean) return hash;\n\n const cleanHash = Object.create(null);\n\n for (const i in hash)\n {\n const value = hash[i];\n\n if (value)\n {\n cleanHash[i] = value;\n }\n }\n\n return cleanHash;\n}\n\n/**\n * Removes all `undefined`/`null` elements from the given array and compacts the array.\n *\n * This function iterates through the array, shifting non-undefined elements to the left\n * to fill gaps created by `undefined` elements. The length of the array is then adjusted\n * to remove the trailing `undefined` elements.\n * @param arr - The array to be cleaned.\n * @returns The cleaned array with all `undefined` elements removed.\n * @example\n * // Example usage:\n * const arr = [1, undefined, 2, undefined, 3];\n * const cleanedArr = cleanArray(arr);\n * console.log(cleanedArr); // Output: [1, 2, 3]\n * @category utils\n * @internal\n */\nexport function cleanArray<T>(arr: T[]): T[]\n{\n let offset = 0;\n\n for (let i = 0; i < arr.length; i++)\n {\n // eslint-disable-next-line eqeqeq\n if (arr[i] == undefined)\n {\n offset++;\n }\n else\n {\n arr[i - offset] = arr[i];\n }\n }\n\n arr.length -= offset;\n\n return arr;\n}\n","import type { Matrix } from '../../../../maths/matrix/Matrix';\n\n/**\n * @param pm\n * @param x\n * @param y\n * @param width\n * @param height\n * @param flipY\n * @internal\n */\nexport function calculateProjection(\n pm: Matrix,\n x: number,\n y: number,\n width: number,\n height: number,\n flipY: boolean\n): Matrix\n{\n const sign = flipY ? 1 : -1;\n\n pm.identity();\n\n pm.a = (1 / width * 2);\n pm.d = sign * (1 / height * 2);\n\n pm.tx = -1 - (x * pm.a);\n pm.ty = -sign - (y * pm.d);\n\n return pm;\n}\n","import { ExtensionType } from '../../../../extensions/Extensions';\nimport { deprecation } from '../../../../utils/logging/deprecation';\nimport { type Renderer } from '../../types';\n\nimport type { System } from '../system/System';\n\n/**\n * Options for the {@link TextureGCSystem}.\n * @category rendering\n * @advanced\n * @deprecated since 8.15.0\n * @see {@link GCSystem}\n */\nexport interface TextureGCSystemOptions\n{\n /**\n * If set to true, this will enable the garbage collector on the GPU.\n * @default true\n * @deprecated since 8.15.0\n */\n textureGCActive: boolean;\n /**\n * @deprecated since 8.3.0\n * @see {@link TextureGCSystemOptions.textureGCMaxIdle}\n */\n textureGCAMaxIdle: number;\n /**\n * The maximum idle frames before a texture is destroyed by garbage collection.\n * @default 60 * 60\n * @deprecated since 8.15.0\n */\n textureGCMaxIdle: number;\n /**\n * Frames between two garbage collections.\n * @default 600\n * @deprecated since 8.15.0\n */\n textureGCCheckCountMax: number;\n}\n/**\n * System plugin to the renderer to manage texture garbage collection on the GPU,\n * ensuring that it does not get clogged up with textures that are no longer being used.\n * @category rendering\n * @advanced\n * @deprecated since 8.15.0\n * @see {@link GCSystem}\n */\nexport class TextureGCSystem implements System<TextureGCSystemOptions>\n{\n /** @ignore */\n public static extension = {\n type: [\n ExtensionType.WebGLSystem,\n ExtensionType.WebGPUSystem,\n ],\n name: 'textureGC',\n } as const;\n\n /**\n * Default options for the TextureGCSystem\n * @deprecated since 8.15.0\n */\n public static defaultOptions: TextureGCSystemOptions = {\n /**\n * If set to true, this will enable the garbage collector on the GPU.\n * @default true\n */\n textureGCActive: true,\n /**\n * @deprecated since 8.3.0\n * @see {@link TextureGCSystemOptions.textureGCMaxIdle}\n */\n textureGCAMaxIdle: null,\n /**\n * The maximum idle frames before a texture is destroyed by garbage collection.\n * @default 60 * 60\n */\n textureGCMaxIdle: 60 * 60,\n /**\n * Frames between two garbage collections.\n * @default 600\n */\n textureGCCheckCountMax: 600,\n };\n\n /**\n * Frame count since started.\n * @readonly\n * @deprecated since 8.15.0\n */\n public get count() { return this._renderer.tick; }\n\n /**\n * Frame count since last garbage collection.\n * @readonly\n * @deprecated since 8.15.0\n */\n public get checkCount() { return this._checkCount; }\n public set checkCount(value: number)\n {\n // #if _DEBUG\n deprecation('8.15.0', 'TextureGCSystem.run is deprecated, please use the GCSystem instead.');\n // #endif\n this._checkCount = value;\n }\n private _checkCount: number;\n\n /**\n * Maximum idle frames before a texture is destroyed by garbage collection.\n * @see TextureGCSystem.defaultMaxIdle\n * @deprecated since 8.15.0\n */\n public get maxIdle() { return (this._renderer.gc.maxUnusedTime / 1000) * 60; }\n public set maxIdle(value: number)\n {\n // #if _DEBUG\n deprecation('8.15.0', 'TextureGCSystem.run is deprecated, please use the GCSystem instead.');\n // #endif\n this._renderer.gc.maxUnusedTime = (value / 60) * 1000;\n }\n\n /**\n * Frames between two garbage collections.\n * @see TextureGCSystem.defaultCheckCountMax\n * @deprecated since 8.15.0\n */\n // eslint-disable-next-line dot-notation\n public get checkCountMax() { return Math.floor(this._renderer.gc['_frequency'] / 1000); }\n public set checkCountMax(_value: number)\n {\n // #if _DEBUG\n deprecation('8.15.0', 'TextureGCSystem.run is deprecated, please use the GCSystem instead.');\n // #endif\n }\n\n /**\n * Current garbage collection mode.\n * @see TextureGCSystem.defaultMode\n * @deprecated since 8.15.0\n */\n public get active() { return this._renderer.gc.enabled; }\n public set active(value: boolean)\n {\n // #if _DEBUG\n deprecation('8.15.0', 'TextureGCSystem.run is deprecated, please use the GCSystem instead.');\n // #endif\n this._renderer.gc.enabled = value;\n }\n\n private _renderer: Renderer;\n\n /** @param renderer - The renderer this System works for. */\n constructor(renderer: Renderer)\n {\n this._renderer = renderer;\n this._checkCount = 0;\n }\n\n public init(options: TextureGCSystemOptions): void\n {\n if (options.textureGCActive !== TextureGCSystem.defaultOptions.textureGCActive)\n { this.active = options.textureGCActive; }\n if (options.textureGCMaxIdle !== TextureGCSystem.defaultOptions.textureGCMaxIdle)\n { this.maxIdle = options.textureGCMaxIdle; }\n if (options.textureGCCheckCountMax !== TextureGCSystem.defaultOptions.textureGCCheckCountMax)\n { this.checkCountMax = options.textureGCCheckCountMax; }\n }\n\n /**\n * Checks to see when the last time a texture was used.\n * If the texture has not been used for a specified amount of time, it will be removed from the GPU.\n * @deprecated since 8.15.0\n */\n public run(): void\n {\n // #if _DEBUG\n deprecation('8.15.0', 'TextureGCSystem.run is deprecated, please use the GCSystem instead.');\n // #endif\n this._renderer.gc.run();\n }\n\n public destroy(): void\n {\n this._renderer = null as any as Renderer;\n }\n}\n","import { ExtensionType } from '../../../extensions/Extensions';\nimport { Ticker } from '../../../ticker/Ticker';\n\nimport type { System } from './system/System';\n\n// start at one too keep it positive!\nlet uid = 1;\n\n/**\n * The SchedulerSystem manages scheduled tasks with specific intervals.\n * @category rendering\n * @advanced\n */\nexport class SchedulerSystem implements System<null>\n{\n /** @ignore */\n public static extension = {\n type: [\n ExtensionType.WebGLSystem,\n ExtensionType.WebGPUSystem,\n ExtensionType.CanvasSystem,\n ],\n name: 'scheduler',\n priority: 0,\n } as const;\n\n private readonly _tasks: {\n func: (elapsed: number) => void;\n duration: number;\n offset: number\n start: number;\n last: number;\n repeat: boolean;\n id: number;\n }[] = [];\n\n /** a small off set to apply to the repeat schedules. This is just to make sure they run at slightly different times */\n private _offset = 0;\n\n /** Initializes the scheduler system and starts the ticker. */\n public init(): void\n {\n Ticker.system.add(this._update, this);\n }\n\n /**\n * Schedules a repeating task.\n * @param func - The function to execute.\n * @param duration - The interval duration in milliseconds.\n * @param useOffset - this will spread out tasks so that they do not all run at the same time\n * @returns The unique identifier for the scheduled task.\n */\n public repeat(func: (elapsed: number) => void, duration: number, useOffset = true): number\n {\n const id = uid++;\n\n let offset = 0;\n\n if (useOffset)\n {\n this._offset += 1000;\n offset = this._offset;\n }\n\n this._tasks.push({\n func,\n duration,\n start: performance.now(),\n offset,\n last: performance.now(),\n repeat: true,\n id\n });\n\n return id;\n }\n\n /**\n * Cancels a scheduled task.\n * @param id - The unique identifier of the task to cancel.\n */\n public cancel(id: number): void\n {\n for (let i = 0; i < this._tasks.length; i++)\n {\n if (this._tasks[i].id === id)\n {\n this._tasks.splice(i, 1);\n\n return;\n }\n }\n }\n\n /**\n * Updates and executes the scheduled tasks.\n * @private\n */\n private _update(): void\n {\n const now = performance.now();\n\n for (let i = 0; i < this._tasks.length; i++)\n {\n const task = this._tasks[i];\n\n if ((now - task.offset) - task.last >= task.duration)\n {\n const elapsed = now - task.start;\n\n task.func(elapsed);\n task.last = now;\n }\n }\n }\n\n /**\n * Destroys the scheduler system and removes all tasks.\n * @internal\n */\n public destroy(): void\n {\n Ticker.system.remove(this._update, this);\n\n this._tasks.length = 0;\n }\n}\n","import { DOMAdapter } from '../environment/adapter';\nimport { VERSION } from './const';\n\nlet saidHello = false;\n\n/**\n * Prints out the version and renderer information for this running instance of PixiJS.\n * @param type - The name of the renderer this instance is using.\n * @returns {void}\n * @category utils\n * @advanced\n */\nexport function sayHello(type: string): void\n{\n if (saidHello)\n {\n return;\n }\n\n if (DOMAdapter.get().getNavigator().userAgent.toLowerCase().indexOf('chrome') > -1)\n {\n const args = [\n `%c %c %c %c %c PixiJS %c v${VERSION} (${type}) http://www.pixijs.com/\\n\\n`,\n 'background: #E72264; padding:5px 0;',\n 'background: #6CA2EA; padding:5px 0;',\n 'background: #B5D33D; padding:5px 0;',\n 'background: #FED23F; padding:5px 0;',\n 'color: #FFFFFF; background: #E72264; padding:5px 0;',\n 'color: #E72264; background: #FFFFFF; padding:5px 0;',\n ];\n\n globalThis.console.log(...args);\n }\n else if (globalThis.console)\n {\n globalThis.console.log(`PixiJS ${VERSION} - ${type} - http://www.pixijs.com/`);\n }\n\n saidHello = true;\n}\n","import { ExtensionType } from '../../../extensions/Extensions';\nimport { type RenderGroup } from '../../../scene/container/RenderGroup';\nimport { cleanArray, cleanHash } from '../../../utils/data/clean';\nimport { type GPUDataOwner, type Renderer } from '../types';\nimport { type Renderable } from './Renderable';\nimport { type RenderOptions } from './system/AbstractRenderer';\n\nimport type EventEmitter from 'eventemitter3';\nimport type { System } from './system/System';\n\n/**\n * Data stored on a GC-managed resource.\n * @category rendering\n * @advanced\n */\nexport interface GCData\n{\n /** Index in the managed resources array */\n index?: number;\n /** Type of the resource */\n type: 'resource' | 'renderable';\n}\n\n/**\n * Interface for resources that can be garbage collected.\n * @category rendering\n * @advanced\n */\nexport interface GCable extends GPUDataOwner\n{\n /** Timestamp of last use */\n _gcLastUsed: number;\n /** GC tracking data, null if not being tracked */\n _gcData?: GCData | null;\n /** If set to true, the resource will be garbage collected automatically when it is not used. */\n autoGarbageCollect?: boolean;\n /** An optional callback for when an item is touched */\n _onTouch?(now: number): void;\n}\n\ntype GCableEventEmitter = GCable & Pick<EventEmitter, 'once' | 'off'>;\n\ninterface GCResourceHashEntry\n{\n context: any;\n hash: string;\n type: GCData['type'];\n priority: number;\n}\n\n/**\n * Options for the {@link GCSystem}.\n * @category rendering\n * @advanced\n */\nexport interface GCSystemOptions\n{\n /**\n * If set to true, this will enable the garbage collector.\n * @default true\n */\n gcActive: boolean;\n /**\n * The maximum time in milliseconds a resource can be unused before being garbage collected.\n * @default 60000\n */\n gcMaxUnusedTime: number;\n /**\n * How frequently to run garbage collection in milliseconds.\n * @default 30000\n */\n gcFrequency: number;\n}\n\n/**\n * A unified garbage collection system for managing GPU resources.\n * Resources register themselves with a cleanup callback and are automatically\n * cleaned up when they haven't been used for a specified amount of time.\n * @example\n * ```ts\n * // Register a resource for GC\n * gc.addResource(myResource, () => {\n * // cleanup logic here\n * myResource.unload();\n * });\n *\n * // Touch the resource when used (resets idle timer)\n * gc.touch(myResource);\n *\n * // Remove from GC tracking (e.g., on manual destroy)\n * gc.removeResource(myResource);\n * ```\n * @category rendering\n * @advanced\n */\nexport class GCSystem implements System<GCSystemOptions>\n{\n /** @ignore */\n public static extension = {\n type: [\n ExtensionType.WebGLSystem,\n ExtensionType.WebGPUSystem,\n ExtensionType.CanvasSystem,\n ],\n name: 'gc',\n priority: 0,\n } as const;\n\n /** Default options for the GCSystem */\n public static defaultOptions: GCSystemOptions = {\n /** Enable/disable the garbage collector */\n gcActive: true,\n /** Time in ms before an unused resource is collected (default 1 minute) */\n gcMaxUnusedTime: 60000,\n /** How often to run garbage collection in ms (default 30 seconds) */\n gcFrequency: 30000,\n };\n\n /** Maximum time in ms a resource can be unused before being garbage collected */\n public maxUnusedTime: number;\n\n /** Reference to the renderer this system belongs to */\n private _renderer: Renderer;\n\n /** Array of resources being tracked for garbage collection */\n private readonly _managedResources: (GCableEventEmitter | null)[] = [];\n private readonly _managedResourceHashes: GCResourceHashEntry[] = [];\n private readonly _managedCollections: {context: any, collection: string, type: 'hash' | 'array'}[] = [];\n\n /** ID of the GC scheduler handler */\n private _handler: number;\n private _collectionsHandler: number;\n\n /** How frequently GC runs in ms */\n private _frequency: number;\n\n /** Current timestamp used for age calculations */\n public now: number;\n\n private _ready = false;\n private _running = false;\n\n /**\n * Creates a new GCSystem instance.\n * @param renderer - The renderer this garbage collection system works for\n */\n constructor(renderer: Renderer)\n {\n this._renderer = renderer;\n }\n\n /**\n * Initializes the garbage collection system with the provided options.\n * @param options - Configuration options\n */\n public init(options: GCSystemOptions): void\n {\n options = { ...GCSystem.defaultOptions, ...options };\n\n this.maxUnusedTime = options.gcMaxUnusedTime;\n this._frequency = options.gcFrequency;\n\n this.enabled = options.gcActive;\n this.now = performance.now();\n }\n\n /**\n * Gets whether the garbage collection system is currently enabled.\n * @returns True if GC is enabled, false otherwise\n */\n get enabled(): boolean\n {\n return !!this._handler;\n }\n\n /**\n * Enables or disables the garbage collection system.\n * When enabled, schedules periodic cleanup of resources.\n * When disabled, cancels all scheduled cleanups.\n */\n set enabled(value: boolean)\n {\n if (this.enabled === value) return;\n\n if (value)\n {\n this._handler = this._renderer.scheduler.repeat(\n () =>\n {\n this._ready = true;\n },\n this._frequency,\n false\n );\n // Schedule periodic hash table cleanup\n this._collectionsHandler = this._renderer.scheduler.repeat(\n () =>\n {\n for (const hash of this._managedCollections)\n {\n const { context, collection, type } = hash;\n\n if (type === 'hash')\n {\n context[collection] = cleanHash(context[collection]);\n }\n else\n {\n context[collection] = cleanArray(context[collection]);\n }\n }\n },\n this._frequency\n );\n }\n else\n {\n this._renderer.scheduler.cancel(this._handler);\n this._renderer.scheduler.cancel(this._collectionsHandler);\n this._handler = 0;\n this._collectionsHandler = 0;\n }\n }\n\n /**\n * Called before rendering. Updates the current timestamp.\n * @param options - The render options\n * @param options.container - The container to render\n */\n protected prerender({ container }: RenderOptions): void\n {\n this.now = performance.now();\n container.renderGroup.gcTick = this._renderer.tick++;\n\n this._updateInstructionGCTick(container.renderGroup, container.renderGroup.gcTick);\n }\n\n /** Performs garbage collection after rendering. */\n protected postrender(): void\n {\n if (!this._ready || !this.enabled) return;\n\n this.run();\n this._ready = false;\n }\n\n /**\n * Updates the GC tick counter for a render group and its children.\n * @param renderGroup - The render group to update\n * @param gcTick - The new tick value\n */\n private _updateInstructionGCTick(renderGroup: RenderGroup, gcTick: number): void\n {\n renderGroup.instructionSet.gcTick = gcTick;\n renderGroup.gcTick = gcTick;\n\n for (const child of renderGroup.renderGroupChildren)\n {\n this._updateInstructionGCTick(child, gcTick);\n }\n }\n\n /**\n * Registers a collection for garbage collection tracking.\n * @param context - The object containing the collection\n * @param collection - The property name on context that holds the collection\n * @param type - The type of collection to track ('hash' or 'array')\n */\n public addCollection(context: any, collection: string, type: 'hash' | 'array'): void\n {\n this._managedCollections.push({\n context,\n collection,\n type,\n });\n }\n\n /**\n * Registers a resource for garbage collection tracking.\n * @param resource - The resource to track\n * @param type - The type of resource to track\n */\n public addResource(resource: GCableEventEmitter, type: GCData['type']): void\n {\n // Already being tracked\n if (resource._gcLastUsed !== -1)\n {\n resource._gcLastUsed = this.now;\n resource._onTouch?.(this.now);\n\n return;\n }\n\n const index = this._managedResources.length;\n\n resource._gcData = {\n index,\n type,\n };\n resource._gcLastUsed = this.now;\n resource._onTouch?.(this.now);\n resource.once('unload', this.removeResource, this);\n\n this._managedResources.push(resource);\n }\n\n /**\n * Removes a resource from garbage collection tracking.\n * Call this when manually destroying a resource.\n * @param resource - The resource to stop tracking\n */\n public removeResource(resource: GCable): void\n {\n const gcData = resource._gcData;\n\n if (!gcData) return;\n\n const index = gcData.index;\n const last = this._managedResources.length - 1;\n\n if (this._running)\n {\n // Keep sweep indices stable when unload listeners remove other resources.\n this._managedResources[index] = null;\n }\n else\n {\n // Swap with last element for O(1) removal outside a sweep.\n if (index !== last)\n {\n const lastResource = this._managedResources[last];\n\n this._managedResources[index] = lastResource;\n lastResource._gcData.index = index;\n }\n\n this._managedResources.length--;\n }\n\n resource._gcData = null;\n resource._gcLastUsed = -1;\n }\n\n /**\n * Registers a hash-based resource collection for garbage collection tracking.\n * Resources in the hash will be automatically tracked and cleaned up when unused.\n * @param context - The object containing the hash property\n * @param hash - The property name on context that holds the resource hash\n * @param type - The type of resources in the hash ('resource' or 'renderable')\n * @param priority - Processing priority (lower values are processed first)\n */\n public addResourceHash(context: any, hash: string, type: GCData['type'], priority: number = 0): void\n {\n this._managedResourceHashes.push({\n context,\n hash,\n type,\n priority,\n });\n\n this._managedResourceHashes.sort((a, b) => a.priority - b.priority);\n }\n\n /**\n * Performs garbage collection by cleaning up unused resources.\n * Removes resources that haven't been used for longer than maxUnusedTime.\n */\n public run(): void\n {\n if (this._running) return;\n\n const now = performance.now();\n const managedResourceHashes = this._managedResourceHashes;\n const managedResources = this._managedResources;\n\n this._running = true;\n\n try\n {\n for (const hashEntry of managedResourceHashes)\n {\n this.runOnHash(hashEntry, now);\n }\n\n // Removals leave null slots until the sweep ends. Only visit the starting entries,\n // so resources registered by unload listeners wait until the next sweep.\n const length = managedResources.length;\n\n for (let i = 0; i < length; i++)\n {\n const resource = managedResources[i];\n\n if (resource) this.runOnResource(resource, now);\n }\n }\n finally\n {\n // Compact without allocating, including when an unload listener throws.\n let writeIndex = 0;\n\n for (let i = 0; i < managedResources.length; i++)\n {\n const resource = managedResources[i];\n\n if (!resource) continue;\n\n if (writeIndex !== i)\n {\n managedResources[writeIndex] = resource;\n resource._gcData.index = writeIndex;\n }\n\n writeIndex++;\n }\n\n managedResources.length = writeIndex;\n this._running = false;\n }\n }\n\n protected updateRenderableGCTick(renderable: Renderable & GCable, now: number): void\n {\n const renderGroup = renderable.renderGroup ?? renderable.parentRenderGroup;\n const currentTick = renderGroup?.instructionSet?.gcTick ?? -1;\n\n // Update last used time if the renderable's group was rendered this tick\n if ((renderGroup?.gcTick ?? 0) === currentTick)\n {\n renderable._gcLastUsed = now;\n renderable._onTouch?.(now);\n }\n }\n\n protected runOnResource(resource: GCableEventEmitter, now: number): void\n {\n // special case for renderables as we do not check every frame if they are being used\n if (resource._gcData.type === 'renderable')\n {\n this.updateRenderableGCTick(resource as Renderable, now);\n }\n\n const isRecentlyUsed = now - resource._gcLastUsed < this.maxUnusedTime;\n\n if (isRecentlyUsed || !resource.autoGarbageCollect) return;\n\n // Detach the GC's own listener so unload() cannot untrack the resource mid-unload, and untrack last:\n // a listener that stamps _gcLastUsed during unload() must not be able to block re-registration.\n resource.off('unload', this.removeResource, this);\n resource.unload();\n this.removeResource(resource);\n }\n\n /**\n * Creates a clone of the hash, copying all non-null entries up to (but not including) the stop key.\n * @param hashValue - The original hash to clone from\n * @param stopKey - The key to stop at (exclusive)\n * @returns A new hash object with copied entries\n */\n private _createHashClone(hashValue: Record<string, GCable>, stopKey: string): Record<string, GCable>\n {\n const hashClone: Record<string, GCable> = Object.create(null);\n\n for (const k in hashValue)\n {\n if (k === stopKey) break;\n if (hashValue[k] !== null) hashClone[k] = hashValue[k];\n }\n\n return hashClone;\n }\n\n protected runOnHash(hashEntry: GCResourceHashEntry, now: number): void\n {\n const { context, hash, type } = hashEntry;\n\n const hashValue = context[hash] as Record<string, GCable>;\n let hashClone: Record<string, GCable> | null = null;\n let nullCount = 0;\n\n for (const key in hashValue)\n {\n const resource = hashValue[key];\n\n // check if the value is null\n if (resource === null)\n {\n nullCount++;\n\n // Lazily create the clone to clean up null entries when threshold is reached\n if (nullCount === 10000 && !hashClone)\n {\n hashClone = this._createHashClone(hashValue, key);\n }\n\n continue;\n }\n\n // If no GC data, then the resource has been added since the last garbage collection\n if (resource._gcLastUsed === -1)\n {\n resource._gcLastUsed = now;\n resource._onTouch?.(now);\n\n if (hashClone) hashClone[key] = resource;\n\n continue;\n }\n\n // special case for renderables as we do not check every frame if they are being used\n if (type === 'renderable')\n {\n this.updateRenderableGCTick(resource as Renderable, now);\n }\n\n const isRecentlyUsed = now - resource._gcLastUsed < this.maxUnusedTime;\n\n if (!isRecentlyUsed && resource.autoGarbageCollect)\n {\n if (type === 'renderable')\n {\n const res = resource as Renderable;\n const renderGroup = res.renderGroup ?? res.parentRenderGroup;\n\n if (renderGroup) renderGroup.structureDidChange = true;\n }\n\n // Call the cleanup function\n resource.unload();\n resource._gcData = null;\n resource._gcLastUsed = -1;\n\n // Lazily create the clone only when we need to remove something\n if (!hashClone)\n {\n // we can set the value to null here to avoid having to create a new hash object\n // only when it crosses the 10000 threshold do we need to create a new hash object\n if (nullCount + 1 !== 10000)\n {\n hashValue[key] = null;\n nullCount++;\n }\n else\n {\n hashClone = this._createHashClone(hashValue, key);\n }\n }\n }\n else if (hashClone)\n {\n hashClone[key] = resource;\n }\n }\n\n // Only replace the hash if something was removed\n if (hashClone)\n {\n context[hash] = hashClone;\n }\n }\n\n /** Cleans up the garbage collection system. Disables GC and removes all tracked resources. */\n public destroy(): void\n {\n this.enabled = false;\n\n this._managedResources.forEach((resource) =>\n {\n resource?.off('unload', this.removeResource, this);\n });\n this._managedResources.length = 0;\n this._managedResourceHashes.length = 0;\n this._managedCollections.length = 0;\n this._renderer = null as any as Renderer;\n }\n}\n","import { ExtensionType } from '../../../../extensions/Extensions';\nimport { deprecation } from '../../../../utils/logging/deprecation';\n\nimport type { Renderer } from '../../types';\nimport type { Renderable } from '../Renderable';\nimport type { System } from '../system/System';\n\n/**\n * Options for the {@link RenderableGCSystem}.\n * @category rendering\n * @property {boolean} [renderableGCActive=true] - If set to true, this will enable the garbage collector on the renderables.\n * @property {number} [renderableGCAMaxIdle=60000] -\n * The maximum idle frames before a texture is destroyed by garbage collection.\n * @property {number} [renderableGCCheckCountMax=60000] - time between two garbage collections.\n * @advanced\n * @deprecated since 8.15.0\n */\nexport interface RenderableGCSystemOptions\n{\n /**\n * If set to true, this will enable the garbage collector on the GPU.\n * @default true\n */\n renderableGCActive: boolean;\n /**\n * The maximum idle frames before a texture is destroyed by garbage collection.\n * @default 60 * 60\n */\n renderableGCMaxUnusedTime: number;\n /**\n * Frames between two garbage collections.\n * @default 600\n */\n renderableGCFrequency: number;\n}\n\n/**\n * The RenderableGCSystem is responsible for cleaning up GPU resources that are no longer being used.\n *\n * When rendering objects like sprites, text, etc - GPU resources are created and managed by the renderer.\n * If these objects are no longer needed but not properly destroyed (via sprite.destroy()), their GPU resources\n * would normally leak. This system prevents that by automatically cleaning up unused GPU resources.\n *\n * Key features:\n * - Runs every 30 seconds by default to check for unused resources\n * - Cleans up resources not rendered for over 1 minute\n * - Works independently of rendering - will clean up even when not actively rendering\n * - When cleaned up resources are needed again, new GPU objects are quickly assigned from a pool\n * - Can be disabled with renderableGCActive:false for manual control\n *\n * Best practices:\n * - Always call destroy() explicitly when done with renderables (e.g. sprite.destroy())\n * - This system is a safety net, not a replacement for proper cleanup\n * - Adjust frequency and timeouts via options if needed\n * @example\n * ```js\n * // Sprite created but reference lost without destroy\n * let sprite = new Sprite(texture);\n *\n * // internally the renderer will assign a resource to the sprite\n * renderer.render(sprite);\n *\n * sprite = null; // Reference lost but GPU resources still exist\n *\n * // After 1 minute of not being rendered:\n * // - RenderableGC will clean up the sprite's GPU resources\n * // - JS garbage collector can then clean up the sprite itself\n * ```\n * @category rendering\n * @advanced\n * @deprecated since 8.15.0\n */\nexport class RenderableGCSystem implements System<RenderableGCSystemOptions>\n{\n /**\n * Extension metadata for registering this system with the renderer.\n * @ignore\n */\n public static extension = {\n type: [\n ExtensionType.WebGLSystem,\n ExtensionType.WebGPUSystem,\n ExtensionType.CanvasSystem,\n ],\n name: 'renderableGC',\n priority: 0\n } as const;\n\n /**\n * Default configuration options for the garbage collection system.\n * These can be overridden when initializing the renderer.\n * @deprecated since 8.15.0\n */\n public static defaultOptions: RenderableGCSystemOptions = {\n /** Enable/disable the garbage collector */\n renderableGCActive: true,\n /** Time in ms before an unused resource is collected (default 1 minute) */\n renderableGCMaxUnusedTime: 60000,\n /** How often to run garbage collection in ms (default 30 seconds) */\n renderableGCFrequency: 30000,\n };\n\n /** Maximum time in ms a resource can be unused before being garbage collected */\n public maxUnusedTime: number;\n\n /** Reference to the renderer this system belongs to */\n private _renderer: Renderer;\n\n /**\n * Creates a new RenderableGCSystem instance.\n * @param renderer - The renderer this garbage collection system works for\n */\n constructor(renderer: Renderer)\n {\n this._renderer = renderer;\n }\n\n /**\n * Initializes the garbage collection system with the provided options.\n * @param options - Configuration options for the renderer\n */\n public init(options: RenderableGCSystemOptions): void\n {\n options = { ...RenderableGCSystem.defaultOptions, ...options };\n\n this.maxUnusedTime = options.renderableGCMaxUnusedTime;\n }\n\n /**\n * Gets whether the garbage collection system is currently enabled.\n * @returns True if GC is enabled, false otherwise\n */\n get enabled(): boolean\n {\n // #if _DEBUG\n deprecation('8.15.0', 'RenderableGCSystem.enabled is deprecated, please use the GCSystem.enabled instead.');\n // #endif\n\n return this._renderer.gc.enabled;\n }\n\n /**\n * Enables or disables the garbage collection system.\n * When enabled, schedules periodic cleanup of resources.\n * When disabled, cancels all scheduled cleanups.\n */\n set enabled(value: boolean)\n {\n // #if _DEBUG\n deprecation('8.15.0', 'RenderableGCSystem.enabled is deprecated, please use the GCSystem.enabled instead.');\n // #endif\n this._renderer.gc.enabled = value;\n }\n\n /**\n * Adds a hash table to be managed by the garbage collector.\n * @param context - The object containing the hash table\n * @param hash - The property name of the hash table\n */\n public addManagedHash<T>(context: T, hash: string): void\n {\n // #if _DEBUG\n // eslint-disable-next-line max-len\n deprecation('8.15.0', 'RenderableGCSystem.addManagedHash is deprecated, please use the GCSystem.addCollection instead.');\n // #endif\n this._renderer.gc.addCollection(context, hash, 'hash');\n }\n\n /**\n * Adds an array to be managed by the garbage collector.\n * @param context - The object containing the array\n * @param hash - The property name of the array\n */\n public addManagedArray<T>(context: T, hash: string): void\n {\n // #if _DEBUG\n // eslint-disable-next-line max-len\n deprecation('8.15.0', 'RenderableGCSystem.addManagedArray is deprecated, please use the GCSystem.addCollection instead.');\n // #endif\n this._renderer.gc.addCollection(context, hash, 'array');\n }\n\n /**\n * Starts tracking a renderable for garbage collection.\n * @param _renderable - The renderable to track\n * @deprecated since 8.15.0\n */\n public addRenderable(_renderable: Renderable): void\n {\n // #if _DEBUG\n deprecation('8.15.0', 'RenderableGCSystem.addRenderable is deprecated, please use the GCSystem instead.');\n // #endif\n this._renderer.gc.addResource(_renderable, 'renderable');\n }\n\n /**\n * Performs garbage collection by cleaning up unused renderables.\n * Removes renderables that haven't been used for longer than maxUnusedTime.\n */\n public run(): void\n {\n // #if _DEBUG\n deprecation('8.15.0', 'RenderableGCSystem.run is deprecated, please use the GCSystem instead.');\n // #endif\n this._renderer.gc.run();\n }\n\n /** Cleans up the garbage collection system. Disables GC and removes all tracked resources. */\n public destroy(): void\n {\n this._renderer = null as any as Renderer;\n }\n}\n","import { TextureSource } from './sources/TextureSource';\nimport { Texture, type TextureOptions } from './Texture';\n\nimport type { TextureSourceOptions } from './sources/TextureSource';\n\n/**\n * The options that can be passed to a new RenderTexture\n * @category rendering\n * @advanced\n */\nexport interface RenderTextureOptions extends TextureSourceOptions\n{\n /** texture options {@link TextureOptions} */\n textureOptions?: Omit<TextureOptions, 'source' | 'dynamic'>\n}\n\n/**\n * A render texture, extends `Texture`.\n * @see {@link Texture}\n * @category rendering\n * @advanced\n */\nexport class RenderTexture extends Texture\n{\n /**\n * Creates a RenderTexture. Pass `dynamic: true` in options to allow resizing after creation.\n * @param options - Options for the RenderTexture, including width, height, textureOptions, and dynamic.\n * @returns A new RenderTexture instance.\n * @example\n * const textureOptions = { defaultAnchor: { x: 0.5, y: 0.5 } };\n * const rt = RenderTexture.create({ width: 100, height: 100, dynamic: true, textureOptions });\n * rt.resize(500, 500);\n */\n public static create(options: RenderTextureOptions): RenderTexture\n {\n // Pass dynamic to the RenderTexture constructor if present in options\n const { dynamic, textureOptions, ...rest } = options;\n\n return new RenderTexture({\n ...textureOptions,\n source: new TextureSource(rest),\n dynamic: dynamic ?? false,\n });\n }\n\n /**\n * Resizes the render texture.\n * @param width - The new width of the render texture.\n * @param height - The new height of the render texture.\n * @param resolution - The new resolution of the render texture.\n * @returns This texture.\n */\n public resize(width: number, height: number, resolution?: number): this\n {\n this.source.resize(width, height, resolution);\n\n return this;\n }\n}\n","import { GlobalResourceRegistry } from '../../../../../utils/pool/GlobalResourceRegistry';\nimport { CanvasSource } from '../sources/CanvasSource';\nimport { Texture } from '../Texture';\n\nimport type { ICanvas } from '../../../../../environment/canvas/ICanvas';\nimport type { CanvasSourceOptions } from '../sources/CanvasSource';\n\nconst canvasCache: Map<ICanvas, Texture<CanvasSource>> = new Map();\n\nGlobalResourceRegistry.register(canvasCache);\n\n/**\n * @param canvas\n * @param options\n * @internal\n */\nexport function getCanvasTexture(canvas: ICanvas, options?: CanvasSourceOptions): Texture<CanvasSource>\n{\n if (!canvasCache.has(canvas))\n {\n const texture = new Texture({\n source: new CanvasSource({\n resource: canvas,\n ...options,\n })\n });\n\n const onDestroy = () =>\n {\n if (canvasCache.get(canvas) === texture)\n {\n canvasCache.delete(canvas);\n }\n };\n\n texture.once('destroy', onDestroy);\n texture.source.once('destroy', onDestroy);\n\n canvasCache.set(canvas, texture);\n }\n\n return canvasCache.get(canvas);\n}\n\n/**\n * @param canvas\n * @internal\n */\nexport function hasCachedCanvasTexture(canvas: ICanvas): boolean\n{\n return canvasCache.has(canvas);\n}\n","import { ExtensionType } from '../../../../extensions/Extensions';\nimport { sayHello } from '../../../../utils/sayHello';\nimport { type Renderer, RendererType } from '../../types';\n\nimport type { WebGLRenderer } from '../../gl/WebGLRenderer';\nimport type { System } from '../system/System';\n\n/**\n * Options for the startup system.\n * @property {boolean} [hello=false] - Whether to log the version and type information of renderer to console.\n * @category rendering\n * @advanced\n */\nexport interface HelloSystemOptions\n{\n /**\n * Whether to log the version and type information of renderer to console.\n * @default false\n */\n hello: boolean;\n}\n\n/**\n * A simple system responsible for initiating the renderer.\n * @category rendering\n * @advanced\n */\nexport class HelloSystem implements System<HelloSystemOptions>\n{\n /** @ignore */\n public static extension = {\n type: [\n ExtensionType.WebGLSystem,\n ExtensionType.WebGPUSystem,\n ExtensionType.CanvasSystem,\n ],\n name: 'hello',\n priority: -2,\n } as const;\n\n /** The default options for the system. */\n public static defaultOptions: HelloSystemOptions = {\n /** {@link WebGLOptions.hello} */\n hello: false,\n };\n\n private readonly _renderer: Renderer;\n\n constructor(renderer: Renderer)\n {\n this._renderer = renderer;\n }\n\n /**\n * It all starts here! This initiates every system, passing in the options for any system by name.\n * @param options - the config for the renderer and all its systems\n */\n public init(options: HelloSystemOptions): void\n {\n if (options.hello)\n {\n let name = this._renderer.name;\n\n if (this._renderer.type === RendererType.WEBGL)\n {\n name += ` ${(this._renderer as WebGLRenderer).context.webGLVersion}`;\n }\n\n sayHello(name);\n }\n }\n}\n","// what we are building is a platform and a framework.\n// import { Matrix } from '../../shared/maths/Matrix';\nimport EventEmitter from 'eventemitter3';\nimport { uid } from '../../../../utils/data/uid';\nimport { TextureSource } from '../texture/sources/TextureSource';\nimport { Texture } from '../texture/Texture';\n\nimport type { BindableTexture } from '../texture/Texture';\n\n/**\n * Options for creating a render target.\n * @category rendering\n * @advanced\n */\nexport interface RenderTargetOptions\n{\n /** the width of the RenderTarget */\n width?: number;\n /** the height of the RenderTarget */\n height?: number;\n /** the resolution of the RenderTarget */\n resolution?: number;\n /** an array of textures, or a number indicating how many color textures there should be */\n colorTextures?: BindableTexture[] | number;\n /** should this render target have a stencil buffer? */\n stencil?: boolean;\n /** should this render target have a depth buffer? */\n depth?: boolean;\n /** a depth stencil texture that the depth and stencil outputs will be written to */\n depthStencilTexture?: BindableTexture | boolean;\n /** a label for debugging — shows up on the render pass in GPU debuggers (WebGPU) */\n label?: string;\n /** should this render target be antialiased? */\n antialias?: boolean;\n /** is this a root element, true if this is gl context owners render target */\n isRoot?: boolean;\n}\n\n/**\n * Descriptor for creating a RenderTarget from a WebGPU-flavored descriptor.\n * @category rendering\n * @advanced\n */\nexport interface RenderTargetDescriptor\n{\n /** The color attachments to use */\n colorAttachments: PixiColorAttachment[];\n /** The depth/stencil attachment to use */\n depthStencilAttachment?: PixiDepthStencilAttachment;\n /** Is this a root element, true if this is gl context owners render target */\n isRoot?: boolean;\n /** a label for debugging — shows up on the render pass in GPU debuggers (WebGPU) */\n label?: string;\n}\n\n/**\n * A Pixi-flavored Color Attachment that mirrors the WebGPU spec but replaces low-level JIT requirements\n * with high-level Pixi objects (like `texture`).\n * @example\n * ```typescript\n * import { RenderTarget, TextureSource } from 'pixi.js';\n *\n * const renderTarget = new RenderTarget({\n * colorAttachments: [{\n * texture: new TextureSource({ width: 100, height: 100 }),\n * loadOp: 'clear', // Clears the texture before rendering\n * clearValue: [1, 0, 0, 1], // Clears to red\n * }]\n * });\n * ```\n * @category rendering\n * @advanced\n */\nexport interface PixiColorAttachment extends Omit<GPURenderPassColorAttachment, 'view' | 'resolveTarget'>\n{\n /** The Pixi texture to render to. */\n texture: TextureSource;\n /**\n * Optional overrides for how the GPU views the texture (e.g., viewing a specific aspect or dimension).\n * Rarely needed for 2D, but incredibly powerful for 3D and advanced compute pipelines.\n */\n viewDescriptor?: GPUTextureViewDescriptor;\n}\n\n/**\n * A Pixi-flavored Depth/Stencil Attachment that mirrors the WebGPU spec but replaces low-level JIT requirements\n * with high-level Pixi objects (like `texture`).\n * @example\n * ```typescript\n * import { RenderTarget, TextureSource } from 'pixi.js';\n *\n * const renderTarget = new RenderTarget({\n * depthStencilAttachment: {\n * texture: new TextureSource({ format: 'depth24plus-stencil8', width: 100, height: 100 }),\n * depthLoadOp: 'clear',\n * depthClearValue: 1.0,\n * depthReadOnly: true, // Only test depth, don't write to it (advanced 3D trick)\n * }\n * });\n * ```\n * @category rendering\n * @advanced\n */\nexport interface PixiDepthStencilAttachment extends Omit<GPURenderPassDepthStencilAttachment, 'view'>\n{\n /** The Pixi depth/stencil texture to use for testing/writing. */\n texture: TextureSource;\n /**\n * Optional overrides. For example, if you want to perform depth testing while simultaneously\n * sampling the stencil data in a shader, you can pass `{ aspect: 'depth-only' }`.\n */\n viewDescriptor?: GPUTextureViewDescriptor;\n}\n\n/**\n * A class that describes what the renderers are rendering to.\n * This can be as simple as a Texture, or as complex as a multi-texture, multi-sampled render target.\n * Support for stencil and depth buffers is also included.\n *\n * If you need something more complex than a Texture to render to, you should use this class.\n * Under the hood, all textures you render to have a RenderTarget created on their behalf.\n * @category rendering\n * @advanced\n */\nexport class RenderTarget extends EventEmitter<{\n destroy: RenderTarget,\n}>\n{\n /**\n * emits when the render target is destroyed, before its attachments are released.\n * letting the renderer know that it needs to free the framebuffers and MSAA buffers it built for it\n * @event destroy\n */\n\n /** The default options for a render target */\n public static defaultOptions: RenderTargetOptions = {\n /** the width of the RenderTarget */\n width: 0,\n /** the height of the RenderTarget */\n height: 0,\n /** the resolution of the RenderTarget */\n resolution: 1,\n /** an array of textures, or a number indicating how many color textures there should be */\n colorTextures: 1,\n /** should this render target have a stencil buffer? */\n stencil: false,\n /** should this render target have a depth buffer? */\n depth: false,\n /** should this render target be antialiased? */\n antialias: false, // save on perf by default!\n /** is this a root element, true if this is gl context owners render target */\n isRoot: false\n };\n\n /** unique id for this render target */\n public readonly uid: number = uid('renderTarget');\n\n /**\n * An array of attachments that define exactly how the GPU should render to the color textures.\n * This includes the texture itself, as well as load/store operations and clear values.\n */\n public colorAttachments: PixiColorAttachment[] = [];\n /**\n * An attachment that defines exactly how the GPU should render to the depth/stencil texture.\n * Includes the texture, load/store operations, and depth/stencil specific clear values.\n */\n public depthStencilAttachment?: PixiDepthStencilAttachment;\n\n public dirtyId = 0;\n public isRoot = false;\n /**\n * Opt-in toggle that inverts this target's Y orientation, resolved at `bind` time.\n *\n * Defaults to `undefined`/`false` — a no-op, so rendering is exactly what it has always been\n * (texture targets flip so they sample upright in the 2D pipeline; the screen does not). Set `true`\n * to invert that automatic orientation — e.g. to store a capture in screen orientation for 3D, where\n * geometry UVs expect the un-flipped result.\n *\n * When `true`, the projection Y-flip and the winding/cull inversion flip together, so a front-facing\n * triangle stays front-facing — back-face culling of content rendered into the target stays correct.\n * @advanced\n */\n public flipY?: boolean;\n /** a label for debugging — shows up on the render pass in GPU debuggers (WebGPU) */\n public label?: string;\n\n private readonly _size = new Float32Array(2);\n /** if true, then when the render target is destroyed, it will destroy all the textures that were created for it. */\n private _managedColorTextures: boolean = false;\n\n /** depth capability requested for this target — via options, attachment format, or the mask system @internal */\n public _depth = false;\n /** stencil capability requested for this target — via options, attachment format, or the mask system @internal */\n public _stencil = false;\n\n /**\n * @param options - Options for creating a render target, or a WebGPU-flavored descriptor.\n */\n constructor(options: RenderTargetOptions | RenderTargetDescriptor = {})\n {\n super();\n\n const descriptor = 'colorAttachments' in options ? options : this._normalizeOptions(options);\n\n this.isRoot = descriptor.isRoot ?? false;\n this.label = descriptor.label;\n this.colorAttachments = descriptor.colorAttachments;\n this.depthStencilAttachment = descriptor.depthStencilAttachment;\n\n // an attachment implies the capabilities its format actually has — a depth-only\n // format (e.g. 'depth24plus') must not report stencil support\n if (this.depthStencilAttachment)\n {\n const format = this.depthStencilAttachment.texture.format;\n\n this._depth ||= format.includes('depth');\n this._stencil ||= format.includes('stencil');\n }\n\n if (this.colorAttachments.length === 0 && !this.depthStencilAttachment)\n {\n throw new Error('[RenderTarget] no color textures or depth textures were provided. '\n + 'Provide a depthStencilTexture or set depth/stencil to true when using colorTextures: 0.');\n }\n\n if (this.colorAttachments.length > 0)\n {\n const colorSource = this.colorTexture;\n\n this.resize(colorSource.width, colorSource.height, colorSource._resolution);\n }\n\n if (this.sizeSource)\n {\n this.sizeSource.on('resize', this.onSourceResize, this);\n }\n }\n\n private _normalizeOptions(options: RenderTargetOptions): RenderTargetDescriptor\n {\n const opts = { ...RenderTarget.defaultOptions, ...options };\n const colorAttachments: PixiColorAttachment[] = [];\n let depthStencilAttachment: PixiDepthStencilAttachment | undefined;\n\n if (typeof opts.colorTextures === 'number')\n {\n if (opts.colorTextures > 0)\n {\n this._managedColorTextures = true;\n\n for (let i = 0; i < opts.colorTextures; i++)\n {\n colorAttachments.push({\n texture: new TextureSource({\n width: opts.width,\n height: opts.height,\n resolution: opts.resolution,\n antialias: opts.antialias,\n }),\n loadOp: 'clear',\n storeOp: 'store',\n });\n }\n }\n }\n else\n {\n opts.colorTextures.forEach((texture) =>\n {\n colorAttachments.push({\n texture: texture.source,\n loadOp: 'clear',\n storeOp: 'store',\n });\n });\n }\n\n const wantsDepthStencilTexture = opts.depthStencilTexture === true;\n\n this._depth = !!(opts.depth || wantsDepthStencilTexture);\n this._stencil = !!(opts.stencil || wantsDepthStencilTexture);\n\n if (opts.depthStencilTexture instanceof Texture\n || opts.depthStencilTexture instanceof TextureSource)\n {\n if (opts.isRoot)\n {\n throw new Error('[RenderTarget] cannot attach a depth-stencil texture to the screen — '\n + 'the canvas owns its own depth/stencil buffers. Render to a texture target instead.');\n }\n\n depthStencilAttachment = {\n texture: opts.depthStencilTexture.source,\n };\n }\n else if ((wantsDepthStencilTexture && !opts.isRoot)\n || ((opts.stencil || opts.depth) && colorAttachments.length === 0))\n {\n // an explicit texture request (depthStencilTexture: true) or a depth-only target.\n // Plain depth/stencil flags create no texture — each backend picks the cheapest\n // resource (renderbuffer on WebGL, internal texture on WebGPU, context buffers\n // for the screen)\n depthStencilAttachment = this._createDepthStencilTexture(opts.width, opts.height, opts.resolution);\n }\n\n return {\n colorAttachments,\n depthStencilAttachment,\n isRoot: opts.isRoot,\n label: opts.label,\n };\n }\n\n get size(): [number, number]\n {\n const _size = this._size;\n\n _size[0] = this.pixelWidth;\n _size[1] = this.pixelHeight;\n\n return _size as any as [number, number];\n }\n\n get width(): number\n {\n return this.sizeSource.width;\n }\n\n get height(): number\n {\n return this.sizeSource.height;\n }\n get pixelWidth(): number\n {\n return this.sizeSource.pixelWidth;\n }\n\n get pixelHeight(): number\n {\n return this.sizeSource.pixelHeight;\n }\n\n get resolution(): number\n {\n return this.sizeSource._resolution;\n }\n\n private _colorTextures: TextureSource[] | null = null;\n /**\n * An array of textures that can be written to by the GPU - mostly this has one texture in Pixi, but you could\n * write to multiple if required! (eg deferred lighting).\n * This is a backwards-compatible getter that extracts the textures from `colorAttachments`.\n */\n get colorTextures(): TextureSource[]\n {\n this._colorTextures ||= this.colorAttachments.map((a) => a.texture);\n\n return this._colorTextures;\n }\n\n /** The stencil and depth buffer will write to this texture in WebGPU. */\n get depthStencilTexture(): TextureSource | null\n {\n return this.depthStencilAttachment?.texture ?? null;\n }\n\n /** Whether this target provides a depth buffer — requested via options or implied by its attachment's format. */\n get depth(): boolean\n {\n return this._depth;\n }\n\n /** Whether this target provides a stencil buffer — requested via options or implied by its attachment's format. */\n get stencil(): boolean\n {\n return this._stencil;\n }\n\n get colorTexture(): TextureSource\n {\n return this.colorAttachments[0]?.texture;\n }\n\n /**\n * The texture that drives size, resolution, and resize events.\n * For standard targets this is `colorAttachments[0].texture`;\n * for depth-only targets it is `depthStencilAttachment.texture`.\n */\n get sizeSource(): TextureSource\n {\n return this.colorAttachments[0]?.texture ?? this.depthStencilAttachment?.texture;\n }\n\n protected onSourceResize(source: TextureSource)\n {\n this.resize(source.width, source.height, source._resolution, true);\n }\n\n /**\n * This will ensure a depthStencil texture is created for this render target.\n * Most likely called by the mask system to make sure we have stencil buffer added.\n * @internal\n */\n public ensureDepthStencilTexture()\n {\n this._createDepthStencilTexture(this.sizeSource.width, this.sizeSource.height, this.sizeSource._resolution);\n\n this._depth = true;\n this._stencil = true;\n }\n\n public resize(width: number, height: number, resolution = this.resolution, skipColorTexture = false)\n {\n this.dirtyId++;\n\n this.colorAttachments.forEach((colorAttachment, i) =>\n {\n if (skipColorTexture && i === 0) return;\n\n colorAttachment.texture.resize(width, height, resolution);\n });\n\n if (this.depthStencilAttachment)\n {\n // For depth-only targets the depth texture IS the size source, so skip\n // when this resize was triggered by the size source's own resize event.\n if (skipColorTexture && this.colorAttachments.length === 0) return;\n\n this.depthStencilAttachment.texture.resize(width, height, resolution);\n }\n }\n\n public destroy()\n {\n // return if already destroyed\n if (!this.colorAttachments && !this.depthStencilAttachment) return;\n\n // announced before the attachments go, so listeners can still reach them\n this.emit('destroy', this);\n this.sizeSource.off('resize', this.onSourceResize, this);\n\n if (this._managedColorTextures)\n {\n this.colorAttachments.forEach((attachment) =>\n {\n attachment.texture.destroy();\n });\n }\n\n if (this.depthStencilAttachment)\n {\n this.depthStencilAttachment.texture.destroy();\n delete this.depthStencilAttachment;\n }\n\n this.colorAttachments = null;\n this._colorTextures = null;\n this.removeAllListeners();\n }\n\n /**\n * The single recipe for internally-created depth-stencil textures.\n * @param width\n * @param height\n * @param resolution\n */\n private _createDepthStencilTexture(width: number, height: number, resolution: number): PixiDepthStencilAttachment\n {\n this.depthStencilAttachment ??= {\n texture: new TextureSource({\n width,\n height,\n resolution,\n format: 'depth24plus-stencil8',\n autoGenerateMipmaps: false,\n antialias: false,\n mipLevelCount: 1,\n // sampleCount: handled by the render target system..\n }),\n };\n\n return this.depthStencilAttachment;\n }\n}\n","import { DOMAdapter } from '../../../../environment/adapter';\nimport { type ImageLike } from '../../../../environment/ImageLike';\nimport { ExtensionType } from '../../../../extensions/Extensions';\nimport { Container } from '../../../../scene/container/Container';\nimport { Texture } from '../texture/Texture';\n\nimport type { ColorSource } from '../../../../color/Color';\nimport type { ICanvas } from '../../../../environment/canvas/ICanvas';\nimport type { Rectangle } from '../../../../maths/shapes/Rectangle';\nimport type { Renderer } from '../../types';\nimport type { System } from '../system/System';\nimport type { GetPixelsOutput } from '../texture/GenerateCanvas';\nimport type { GenerateTextureOptions } from './GenerateTextureSystem';\n\nconst imageTypes = {\n png: 'image/png',\n jpg: 'image/jpeg',\n webp: 'image/webp',\n};\n\ntype Formats = keyof typeof imageTypes;\n\n/**\n * Options for creating an image from a renderer.\n * Controls the output format and quality of extracted images.\n * @example\n * ```ts\n * // Extract as PNG (default)\n * const pngImage = await renderer.extract.image({\n * target: sprite,\n * format: 'png'\n * });\n *\n * // Extract as JPEG with quality setting\n * const jpgImage = await renderer.extract.image({\n * target: sprite,\n * format: 'jpg',\n * quality: 0.8\n * });\n *\n * // Extract as WebP for better compression\n * const webpImage = await renderer.extract.image({\n * target: sprite,\n * format: 'webp',\n * quality: 0.9\n * });\n * ```\n * @category rendering\n * @advanced\n */\nexport interface ImageOptions\n{\n /**\n * The format of the extracted image.\n * - 'png': Lossless format, best for images with text or sharp edges\n * - 'jpg': Lossy format, smaller file size, good for photos\n * - 'webp': Modern format with better compression\n * @example\n * ```ts\n * // Extract as PNG\n * const pngImage = await renderer.extract.image({\n * target: sprite,\n * format: 'png'\n * });\n * // Extract as JPEG\n * const jpgImage = await renderer.extract.image({\n * target: sprite,\n * format: 'jpg',\n * });\n * ```\n * @default 'png'\n */\n format?: Formats;\n\n /**\n * The quality of the extracted image, between 0 and 1.\n * Only applies to lossy formats (jpg, webp).\n * - 1: Maximum quality\n * - 0: Maximum compression\n * @example\n * ```ts\n * // Extract as JPEG with 80% quality\n * const jpgImage = await renderer.extract.image({\n * target: sprite,\n * format: 'jpg',\n * quality: 0.8\n * });\n * // Extract as WebP with 90% quality\n * const webpImage = await renderer.extract.image({\n * target: sprite,\n * format: 'webp',\n * quality: 0.9\n * });\n * ```\n * @default 1\n */\n quality?: number;\n}\n\n/**\n * Options for extracting content from a renderer.\n * These options control how content is extracted and processed from the renderer.\n * @example\n * ```ts\n * // Basic extraction\n * const pixels = renderer.extract.pixels({\n * target: sprite,\n * });\n *\n * // Extract with custom region and resolution\n * const canvas = renderer.extract.canvas({\n * target: container,\n * frame: new Rectangle(0, 0, 100, 100),\n * resolution: 2,\n * });\n *\n * // Extract with background color and anti-aliasing\n * const image = await renderer.extract.image({\n * target: graphics,\n * clearColor: '#ff0000',\n * antialias: true\n * });\n * ```\n * @category rendering\n * @advanced\n */\nexport interface BaseExtractOptions\n{\n /**\n * The target to extract. Can be a Container or Texture.\n * @example\n * ```ts\n * // Extract from a sprite\n * const sprite = new Sprite(texture);\n * renderer.extract.pixels({ target: sprite });\n *\n * // Extract from a texture directly\n * renderer.extract.pixels({ target: texture });\n * ```\n */\n target: Container | Texture;\n\n /**\n * The region of the target to extract. If not specified, extracts the entire target.\n * @example\n * ```ts\n * // Extract a specific region\n * renderer.extract.canvas({\n * target: sprite,\n * frame: new Rectangle(10, 10, 100, 100)\n * });\n * ```\n */\n frame?: Rectangle;\n\n /**\n * The resolution of the extracted content. Higher values create sharper images.\n * @default 1\n * @example\n * ```ts\n * // Extract at 2x resolution for retina displays\n * renderer.extract.image({\n * target: sprite,\n * resolution: 2\n * });\n * ```\n */\n resolution?: number;\n\n /**\n * The color used to clear the extracted content before rendering.\n * Can be a hex number, string, or array of numbers.\n * @example\n * ```ts\n * // Clear with red background\n * renderer.extract.canvas({\n * target: sprite,\n * clearColor: '#ff0000'\n * });\n *\n * // Clear with semi-transparent black\n * renderer.extract.canvas({\n * target: sprite,\n * clearColor: [0, 0, 0, 0.5]\n * });\n * ```\n */\n clearColor?: ColorSource;\n\n /**\n * Whether to enable anti-aliasing during extraction.\n * Improves quality but may affect performance.\n * @default false\n * @example\n * ```ts\n * // Enable anti-aliasing for smoother edges\n * renderer.extract.image({\n * target: graphics,\n * antialias: true\n * });\n * ```\n */\n antialias?: boolean;\n}\n/**\n * Options for extracting an HTMLImage from the renderer.\n * Combines base extraction options with image-specific settings.\n * @example\n * ```ts\n * // Basic PNG extraction\n * const image = await renderer.extract.image({\n * target: sprite,\n * format: 'png'\n * });\n *\n * // High-quality JPEG with custom region\n * const image = await renderer.extract.image({\n * target: container,\n * format: 'jpg',\n * quality: 0.9,\n * frame: new Rectangle(0, 0, 100, 100),\n * resolution: 2\n * });\n *\n * // WebP with background and anti-aliasing\n * const image = await renderer.extract.image({\n * target: graphics,\n * format: 'webp',\n * quality: 0.8,\n * clearColor: '#ff0000',\n * antialias: true\n * });\n * ```\n *\n * Combines all options from:\n * - {@link BaseExtractOptions} for basic extraction settings\n * - {@link ImageOptions} for image format and quality settings\n *\n * Common use cases:\n * - Capturing game screenshots\n * - Saving rendered content\n * - Creating image thumbnails\n * - Exporting canvas content\n * @see {@link ExtractSystem.image} For the method that uses these options\n * @see {@link ExtractSystem.base64} For base64 encoding\n * @category rendering\n * @advanced\n * @interface\n */\nexport type ExtractImageOptions = BaseExtractOptions & ImageOptions;\n/**\n * Options for extracting and downloading content from a renderer.\n * Combines base extraction options with download-specific settings.\n * @example\n * ```ts\n * // Basic download with default filename\n * renderer.extract.download({\n * target: sprite\n * });\n *\n * // Download with custom filename and region\n * renderer.extract.download({\n * target: container,\n * filename: 'screenshot.png',\n * frame: new Rectangle(0, 0, 100, 100)\n * });\n *\n * // Download with high resolution and background\n * renderer.extract.download({\n * target: stage,\n * filename: 'hd-capture.png',\n * resolution: 2,\n * clearColor: '#ff0000'\n * });\n *\n * // Download with anti-aliasing\n * renderer.extract.download({\n * target: graphics,\n * filename: 'smooth.png',\n * antialias: true\n * });\n * ```\n *\n * Combines all options from:\n * - {@link BaseExtractOptions} for basic extraction settings\n * - Additional download-specific options\n *\n * Common use cases:\n * - Saving game screenshots\n * - Exporting rendered content\n * - Creating downloadable assets\n * - Saving canvas state\n * @see {@link ExtractSystem.download} For the method that uses these options\n * @see {@link ExtractSystem.image} For creating images without download\n * @category rendering\n * @advanced\n * @interface\n */\nexport type ExtractDownloadOptions = BaseExtractOptions & {\n /**\n * The filename to use when downloading the content.\n * Should include the desired file extension (e.g., .png).\n * @default 'image.png'\n * @example\n * ```ts\n * renderer.extract.download({\n * target: sprite,\n * filename: 'my-screenshot.png'\n * });\n * ```\n */\n filename: string;\n};\n/**\n * Options for extracting content from a renderer. Represents a union of all possible extraction option types.\n * Used by various extraction methods to support different output formats and configurations.\n * @example\n * ```ts\n * // Basic canvas extraction\n * const canvas = renderer.extract.canvas({\n * target: sprite\n * });\n *\n * // Image extraction with format\n * const image = await renderer.extract.image({\n * target: sprite,\n * format: 'png',\n * quality: 1\n * });\n *\n * // Download with filename\n * renderer.extract.download({\n * target: sprite,\n * filename: 'screenshot.png'\n * });\n *\n * // Advanced extraction with multiple options\n * const image = await renderer.extract.image({\n * target: container,\n * frame: new Rectangle(0, 0, 100, 100),\n * resolution: 2,\n * clearColor: '#ff0000',\n * antialias: true,\n * format: 'webp',\n * quality: 0.8\n * });\n * ```\n *\n * Supports three types of options:\n * - {@link BaseExtractOptions} - Basic extraction settings\n * - {@link ExtractImageOptions} - Image-specific settings with format and quality\n * - {@link ExtractDownloadOptions} - Download settings with filename\n *\n * Common use cases:\n * - Extracting raw pixels\n * - Creating canvas elements\n * - Generating downloadable images\n * - Taking screenshots\n * - Creating thumbnails\n * @see {@link ExtractSystem.canvas} For canvas extraction\n * @see {@link ExtractSystem.image} For image extraction\n * @see {@link ExtractSystem.download} For downloading content\n * @category rendering\n * @advanced\n */\nexport type ExtractOptions = BaseExtractOptions | ExtractImageOptions | ExtractDownloadOptions;\n\n/**\n * System for exporting content from a renderer. It provides methods to extract content as images,\n * canvases, or raw pixel data. Available through `renderer.extract`.\n * @example\n * ```ts\n * import { Application, Graphics } from 'pixi.js';\n *\n * // Create a new application\n * const app = new Application();\n * await app.init();\n *\n * // Draw something to extract\n * const graphics = new Graphics()\n * .circle(0, 0, 50)\n * .fill(0xFF0000);\n *\n * // Basic extraction examples\n * const image = await app.renderer.extract.image(graphics); // As IImage (HTMLImageElement)\n * const canvas = app.renderer.extract.canvas(graphics); // As Canvas\n * const pixels = app.renderer.extract.pixels(graphics); // As pixel data\n * const base64 = await app.renderer.extract.base64(graphics); // As base64 string\n *\n * // Advanced extraction with options\n * const customImage = await app.renderer.extract.image({\n * target: graphics,\n * format: 'png',\n * resolution: 2,\n * frame: new Rectangle(0, 0, 100, 100),\n * clearColor: '#00000000'\n * });\n *\n * // Download content\n * app.renderer.extract.download({\n * target: graphics,\n * filename: 'my-image.png'\n * });\n *\n * // Debug visualization\n * app.renderer.extract.log(graphics);\n * ```\n *\n * Features:\n * - Extract as various formats (PNG, JPEG, WebP)\n * - Control output quality and resolution\n * - Extract specific regions\n * - Download extracted content\n * - Debug visualization\n *\n * Common Use Cases:\n * - Creating thumbnails\n * - Saving game screenshots\n * - Processing visual content\n * - Debugging renders\n * - Creating textures from rendered content\n *\n * Performance Considerations:\n * - Extraction operations are relatively expensive\n * - Consider caching results for frequently used content\n * - Be mindful of resolution and format choices\n * - Large extractions may impact performance\n * @category rendering\n * @standard\n */\nexport class ExtractSystem implements System\n{\n /** @ignore */\n public static extension = {\n type: [\n ExtensionType.WebGLSystem,\n ExtensionType.WebGPUSystem,\n ExtensionType.CanvasSystem,\n ],\n name: 'extract',\n } as const;\n\n /**\n * Default options for image extraction.\n * @example\n * ```ts\n * // Customize default options\n * ExtractSystem.defaultImageOptions.format = 'webp';\n * ExtractSystem.defaultImageOptions.quality = 0.8;\n *\n * // Use defaults\n * const image = await renderer.extract.image(sprite);\n * ```\n */\n public static defaultImageOptions: ImageOptions = {\n format: 'png' as Formats,\n quality: 1,\n };\n\n private _renderer: Renderer;\n\n /** @param renderer - The renderer this System works for. */\n constructor(renderer: Renderer)\n {\n this._renderer = renderer;\n }\n\n private _normalizeOptions<T extends ExtractOptions>(\n options: ExtractImageOptions | Container | Texture,\n defaults: Partial<T> = {},\n ): T\n {\n if (options instanceof Container || options instanceof Texture)\n {\n return {\n target: options,\n ...defaults\n } as T;\n }\n\n return {\n ...defaults,\n ...options,\n } as T;\n }\n\n /**\n * Creates an IImage from a display object or texture.\n * @param options - Options for creating the image, or the target to extract\n * @returns Promise that resolves with the generated IImage\n * @example\n * ```ts\n * // Basic usage with a sprite\n * const sprite = new Sprite(texture);\n * const image = await renderer.extract.image(sprite);\n * document.body.appendChild(image);\n *\n * // Advanced usage with options\n * const image = await renderer.extract.image({\n * target: container,\n * format: 'webp',\n * quality: 0.8,\n * frame: new Rectangle(0, 0, 100, 100),\n * resolution: 2,\n * clearColor: '#ff0000',\n * antialias: true\n * });\n *\n * // Extract directly from a texture\n * const texture = Texture.from('myTexture.png');\n * const image = await renderer.extract.image(texture);\n * ```\n * @see {@link ExtractImageOptions} For detailed options\n * @see {@link ExtractSystem.base64} For base64 string output\n * @see {@link ExtractSystem.canvas} For canvas output\n * @see {@link ImageLike} For the image interface\n * @category rendering\n */\n public async image(options: ExtractImageOptions | Container | Texture): Promise<ImageLike>\n {\n const image = DOMAdapter.get().createImage();\n\n image.src = await this.base64(options);\n\n return image;\n }\n\n /**\n * Converts the target into a base64 encoded string.\n *\n * This method works by first creating\n * a canvas using `Extract.canvas` and then converting it to a base64 string.\n * @param options - The options for creating the base64 string, or the target to extract\n * @returns Promise that resolves with the base64 encoded string\n * @example\n * ```ts\n * // Basic usage with a sprite\n * const sprite = new Sprite(texture);\n * const base64 = await renderer.extract.base64(sprite);\n * console.log(base64); // data:image/png;base64,...\n *\n * // Advanced usage with options\n * const base64 = await renderer.extract.base64({\n * target: container,\n * format: 'webp',\n * quality: 0.8,\n * frame: new Rectangle(0, 0, 100, 100),\n * resolution: 2\n * });\n * ```\n * @throws Will throw an error if the platform doesn't support any of:\n * - ICanvas.toDataURL\n * - ICanvas.toBlob\n * - ICanvas.convertToBlob\n * @see {@link ExtractImageOptions} For detailed options\n * @see {@link ExtractSystem.canvas} For canvas output\n * @see {@link ExtractSystem.image} For HTMLImage output\n * @category rendering\n */\n public async base64(options: ExtractImageOptions | Container | Texture): Promise<string>\n {\n options = this._normalizeOptions<ExtractImageOptions>(\n options,\n ExtractSystem.defaultImageOptions\n );\n\n const { format, quality } = options;\n\n const canvas = this.canvas(options);\n\n if (canvas.toBlob !== undefined)\n {\n return new Promise<string>((resolve, reject) =>\n {\n canvas.toBlob!((blob) =>\n {\n if (!blob)\n {\n reject(new Error('ICanvas.toBlob failed!'));\n\n return;\n }\n\n const reader = new FileReader();\n\n reader.onload = () => resolve(reader.result as string);\n reader.onerror = reject;\n reader.readAsDataURL(blob);\n }, imageTypes[format], quality);\n });\n }\n if (canvas.toDataURL !== undefined)\n {\n return canvas.toDataURL(imageTypes[format], quality);\n }\n if (canvas.convertToBlob !== undefined)\n {\n const blob = await canvas.convertToBlob({ type: imageTypes[format], quality });\n\n return new Promise<string>((resolve, reject) =>\n {\n const reader = new FileReader();\n\n reader.onload = () => resolve(reader.result as string);\n reader.onerror = reject;\n reader.readAsDataURL(blob);\n });\n }\n\n throw new Error('Extract.base64() requires ICanvas.toDataURL, ICanvas.toBlob, '\n + 'or ICanvas.convertToBlob to be implemented');\n }\n\n /**\n * Creates a Canvas element, renders the target to it and returns it.\n * This method is useful for creating static images or when you need direct canvas access.\n * @param options - The options for creating the canvas, or the target to extract\n * @returns A Canvas element with the texture rendered on\n * @example\n * ```ts\n * // Basic canvas extraction from a sprite\n * const sprite = new Sprite(texture);\n * const canvas = renderer.extract.canvas(sprite);\n * document.body.appendChild(canvas);\n *\n * // Extract with custom region\n * const canvas = renderer.extract.canvas({\n * target: container,\n * frame: new Rectangle(0, 0, 100, 100)\n * });\n *\n * // Extract with high resolution\n * const canvas = renderer.extract.canvas({\n * target: sprite,\n * resolution: 2,\n * clearColor: '#ff0000'\n * });\n *\n * // Extract directly from a texture\n * const texture = Texture.from('myTexture.png');\n * const canvas = renderer.extract.canvas(texture);\n *\n * // Extract with anti-aliasing\n * const canvas = renderer.extract.canvas({\n * target: graphics,\n * antialias: true\n * });\n * ```\n * @see {@link ExtractOptions} For detailed options\n * @see {@link ExtractSystem.image} For HTMLImage output\n * @see {@link ExtractSystem.pixels} For raw pixel data\n * @category rendering\n */\n public canvas(options: ExtractOptions | Container | Texture): ICanvas\n {\n options = this._normalizeOptions(options);\n\n const target = options.target;\n\n const renderer = this._renderer;\n\n if (target instanceof Texture)\n {\n return renderer.texture.generateCanvas(target);\n }\n\n const texture = renderer.textureGenerator.generateTexture(options as GenerateTextureOptions);\n\n const canvas = renderer.texture.generateCanvas(texture);\n\n texture.destroy(true);\n\n return canvas;\n }\n\n /**\n * Returns a one-dimensional array containing the pixel data of the entire texture in RGBA order,\n * with integer values between 0 and 255 (inclusive).\n * > [!NOE] The returned array is a flat Uint8Array where every 4 values represent RGBA\n * @param options - The options for extracting the image, or the target to extract\n * @returns One-dimensional Uint8Array containing the pixel data in RGBA format\n * @example\n * ```ts\n * // Basic pixel extraction\n * const sprite = new Sprite(texture);\n * const pixels = renderer.extract.pixels(sprite);\n * console.log(pixels[0], pixels[1], pixels[2], pixels[3]); // R,G,B,A values\n *\n * // Extract with custom region\n * const pixels = renderer.extract.pixels({\n * target: sprite,\n * frame: new Rectangle(0, 0, 100, 100)\n * });\n *\n * // Extract with high resolution\n * const pixels = renderer.extract.pixels({\n * target: sprite,\n * resolution: 2\n * });\n * ```\n * @see {@link ExtractOptions} For detailed options\n * @see {@link ExtractSystem.canvas} For canvas output\n * @see {@link ExtractSystem.image} For image output\n * @category rendering\n */\n public pixels(options: ExtractOptions | Container | Texture): GetPixelsOutput\n {\n options = this._normalizeOptions(options);\n\n const target = options.target;\n\n const renderer = this._renderer;\n const texture = target instanceof Texture\n ? target\n : renderer.textureGenerator.generateTexture(options as GenerateTextureOptions);\n\n const pixelInfo = renderer.texture.getPixels(texture);\n\n if (target instanceof Container)\n {\n // destroy generated texture\n texture.destroy(true);\n }\n\n return pixelInfo;\n }\n\n /**\n * Creates a texture from a display object or existing texture.\n *\n * This is useful for creating\n * reusable textures from rendered content or making copies of existing textures.\n * > [!NOTE] The returned texture should be destroyed when no longer needed\n * @param options - The options for creating the texture, or the target to extract\n * @returns A new texture containing the extracted content\n * @example\n * ```ts\n * // Basic texture extraction from a sprite\n * const sprite = new Sprite(texture);\n * const extractedTexture = renderer.extract.texture(sprite);\n *\n * // Extract with custom region\n * const regionTexture = renderer.extract.texture({\n * target: container,\n * frame: new Rectangle(0, 0, 100, 100)\n * });\n *\n * // Extract with high resolution\n * const hiResTexture = renderer.extract.texture({\n * target: sprite,\n * resolution: 2,\n * clearColor: '#ff0000'\n * });\n *\n * // Create a new sprite from extracted texture\n * const newSprite = new Sprite(\n * renderer.extract.texture({\n * target: graphics,\n * antialias: true\n * })\n * );\n *\n * // Clean up when done\n * extractedTexture.destroy(true);\n * ```\n * @see {@link ExtractOptions} For detailed options\n * @see {@link Texture} For texture management\n * @see {@link GenerateTextureSystem} For texture generation\n * @category rendering\n */\n public texture(options: ExtractOptions | Container | Texture): Texture\n {\n options = this._normalizeOptions(options);\n\n if (options.target instanceof Texture) return options.target;\n\n return this._renderer.textureGenerator.generateTexture(options as GenerateTextureOptions);\n }\n\n /**\n * Extracts and downloads content from the renderer as an image file.\n * This is a convenient way to save screenshots or export rendered content.\n * > [!NOTE] The download will use PNG format regardless of the filename extension\n * @param options - The options for downloading and extracting the image, or the target to extract\n * @example\n * ```ts\n * // Basic download with default filename\n * const sprite = new Sprite(texture);\n * renderer.extract.download(sprite); // Downloads as 'image.png'\n *\n * // Download with custom filename\n * renderer.extract.download({\n * target: sprite,\n * filename: 'screenshot.png'\n * });\n *\n * // Download with custom region\n * renderer.extract.download({\n * target: container,\n * filename: 'region.png',\n * frame: new Rectangle(0, 0, 100, 100)\n * });\n *\n * // Download with high resolution and background\n * renderer.extract.download({\n * target: stage,\n * filename: 'hd-screenshot.png',\n * resolution: 2,\n * clearColor: '#ff0000'\n * });\n *\n * // Download with anti-aliasing\n * renderer.extract.download({\n * target: graphics,\n * filename: 'smooth.png',\n * antialias: true\n * });\n * ```\n * @see {@link ExtractDownloadOptions} For detailed options\n * @see {@link ExtractSystem.image} For creating images without download\n * @see {@link ExtractSystem.canvas} For canvas output\n * @category rendering\n */\n public download(options: ExtractDownloadOptions | Container | Texture)\n {\n /* eslint-disable no-restricted-globals */\n options = this._normalizeOptions<ExtractDownloadOptions>(options);\n\n const canvas = this.canvas(options);\n\n const link = document.createElement('a');\n\n link.download = options.filename ?? 'image.png';\n link.href = canvas.toDataURL('image/png');\n document.body.appendChild(link);\n link.click();\n document.body.removeChild(link);\n /* eslint-enable no-restricted-globals */\n }\n\n /**\n * Logs the target to the console as an image. This is a useful way to debug what's happening in the renderer.\n * The image will be displayed in the browser's console using CSS background images.\n * @param options - The options for logging the image, or the target to log\n * @param options.width - The width of the logged image preview in the console (in pixels)\n * @example\n * ```ts\n * // Basic usage\n * const sprite = new Sprite(texture);\n * renderer.extract.log(sprite);\n * ```\n * @see {@link ExtractSystem.canvas} For getting raw canvas output\n * @see {@link ExtractSystem.pixels} For raw pixel data\n * @category rendering\n * @advanced\n */\n public log(options: (ExtractOptions & {width?: number}) | Container | Texture)\n {\n const width = options.width ?? 200;\n\n options = this._normalizeOptions(options);\n\n const canvas = this.canvas(options);\n\n const base64 = canvas.toDataURL();\n\n // eslint-disable-next-line no-console\n console.log(`[Pixi Texture] ${canvas.width}px ${canvas.height}px`);\n\n const style = [\n 'font-size: 1px;',\n `padding: ${width}px ${300}px;`,\n `background: url(${base64}) no-repeat;`,\n 'background-size: contain;',\n ].join(' ');\n\n // eslint-disable-next-line no-console\n console.log('%c ', style);\n }\n\n public destroy(): void\n {\n this._renderer = null as any as Renderer;\n }\n}\n","import { DOMAdapter } from '../../../../environment/adapter';\nimport { ExtensionType } from '../../../../extensions/Extensions';\nimport { Rectangle } from '../../../../maths/shapes/Rectangle';\nimport { deprecation, v8_0_0 } from '../../../../utils/logging/deprecation';\nimport { type Renderer, type RendererOptions } from '../../types';\nimport { RenderTarget } from '../renderTarget/RenderTarget';\nimport { CanvasPool } from '../texture/CanvasPool';\nimport { TexturePool } from '../texture/TexturePool';\nimport { getCanvasTexture } from '../texture/utils/getCanvasTexture';\n\nimport type { ICanvas } from '../../../../environment/canvas/ICanvas';\nimport type { TypeOrBool } from '../../../../scene/container/destroyTypes';\nimport type { System } from '../system/System';\nimport type { CanvasSource } from '../texture/sources/CanvasSource';\nimport type { Texture } from '../texture/Texture';\n\n/**\n * Options passed to the ViewSystem\n * @category rendering\n * @advanced\n */\nexport interface ViewSystemOptions\n{\n /**\n * The width of the screen.\n * @default 800\n */\n width?: number;\n /**\n * The height of the screen.\n * @default 600\n */\n height?: number;\n /** The canvas to use as a view, optional. */\n canvas?: ICanvas;\n /**\n * Alias for `canvas`.\n * @deprecated since 8.0.0\n */\n view?: ICanvas;\n /**\n * Resizes renderer view in CSS pixels to allow for resolutions other than 1.\n *\n * This is only supported for HTMLCanvasElement\n * and will be ignored if the canvas is an OffscreenCanvas.\n */\n autoDensity?: boolean;\n /** The resolution / device pixel ratio of the renderer. */\n resolution?: number;\n /** Whether to enable anti-aliasing. This may affect performance. */\n antialias?: boolean;\n /** Whether to ensure the main view has can make use of the depth buffer. Always true for WebGL renderer. */\n depth?: boolean;\n /**\n * WebGPU only, with `antialias`. WebGL ignores it. Discards the canvas's multisample buffers at the end of each pass\n * instead of writing them to memory: depth/stencil, and colour on GPUs that aren't tile-based (tile-based GPUs\n * already discard colour). Only for apps that never reopen the canvas pass while still needing its depth or stencil:\n * no filters or masks popping back onto it, no second `render` with `clear: false`.\n * See {@link TextureSourceOptions.transient}.\n * @default false\n */\n transient?: boolean;\n}\n\n/**\n * Options for destroying the ViewSystem.\n * @category rendering\n * @advanced\n */\nexport interface ViewSystemDestroyOptions\n{\n /** Whether to remove the view element from the DOM. Defaults to `false`. */\n removeView?: boolean;\n}\n\n/**\n * The view system manages the main canvas that is attached to the DOM.\n * This main role is to deal with how the holding the view reference and dealing with how it is resized.\n * @category rendering\n * @advanced\n */\nexport class ViewSystem implements System<ViewSystemOptions, TypeOrBool<ViewSystemDestroyOptions> >\n{\n /** @ignore */\n public static extension = {\n type: [\n ExtensionType.WebGLSystem,\n ExtensionType.WebGPUSystem,\n ExtensionType.CanvasSystem,\n ],\n name: 'view',\n priority: 0,\n } as const;\n\n /** The default options for the view system. */\n public static defaultOptions: ViewSystemOptions = {\n /**\n * {@link WebGLOptions.width}\n * @default 800\n */\n width: 800,\n /**\n * {@link WebGLOptions.height}\n * @default 600\n */\n height: 600,\n /**\n * {@link WebGLOptions.autoDensity}\n * @default false\n */\n autoDensity: false,\n /**\n * {@link WebGLOptions.antialias}\n * @default false\n */\n antialias: false,\n };\n\n /** The canvas element that everything is drawn to. */\n public canvas!: ICanvas;\n\n /** The texture that is used to draw the canvas to the screen. */\n public texture: Texture<CanvasSource>;\n\n /**\n * Whether CSS dimensions of canvas view should be resized to screen dimensions automatically.\n * This is only supported for HTMLCanvasElement and will be ignored if the canvas is an OffscreenCanvas.\n * @type {boolean}\n */\n public get autoDensity(): boolean\n {\n return this.texture.source.autoDensity;\n }\n public set autoDensity(value: boolean)\n {\n this.texture.source.autoDensity = value;\n }\n\n /** Whether to enable anti-aliasing. This may affect performance. */\n public antialias: boolean;\n\n /**\n * Measurements of the screen. (0, 0, screenWidth, screenHeight).\n *\n * Its safe to use as filterArea or hitArea for the whole stage.\n */\n public screen: Rectangle;\n /** The render target that the view is drawn to. */\n public renderTarget: RenderTarget;\n\n private readonly _renderer: Renderer;\n\n /** The resolution / device pixel ratio of the renderer. */\n get resolution(): number\n {\n return this.texture.source._resolution;\n }\n\n set resolution(value: number)\n {\n this.texture.source.resize(\n this.texture.source.width,\n this.texture.source.height,\n value\n );\n }\n\n constructor(renderer: Renderer)\n {\n this._renderer = renderer;\n }\n\n /**\n * initiates the view system\n * @param options - the options for the view\n */\n public init(options: ViewSystemOptions): void\n {\n options = {\n ...ViewSystem.defaultOptions,\n ...options,\n };\n\n if (options.view)\n {\n // #if _DEBUG\n deprecation(v8_0_0, 'ViewSystem.view has been renamed to ViewSystem.canvas');\n // #endif\n\n options.canvas = options.view;\n }\n\n this.screen = new Rectangle(0, 0, options.width, options.height);\n this.canvas = options.canvas || DOMAdapter.get().createCanvas();\n this.antialias = !!options.antialias;\n\n // `depth` asks for a depth buffer here, but on a TextureSource it's a 3D texture's depth,\n // so it goes to the render target and not to the canvas source\n const { depth, ...canvasOptions } = options;\n\n this.texture = getCanvasTexture(this.canvas, canvasOptions);\n this.renderTarget = new RenderTarget({\n colorTextures: [this.texture],\n depth: !!depth,\n isRoot: true,\n });\n\n this.texture.source.transparent = (options as RendererOptions).backgroundAlpha < 1;\n\n // every change of screen size - the resolution set below, the resolution setter and\n // renderer.resize - ends in the source resizing, so this is the one place to hook the pools\n this.texture.source.on('resize', this._updateScreenSize, this);\n\n this.resolution = options.resolution;\n\n this._updateScreenSize();\n }\n\n /**\n * Resizes the screen and canvas to the specified dimensions.\n * @param desiredScreenWidth - The new width of the screen.\n * @param desiredScreenHeight - The new height of the screen.\n * @param resolution\n */\n public resize(desiredScreenWidth: number, desiredScreenHeight: number, resolution: number): void\n {\n this.texture.source.resize(desiredScreenWidth, desiredScreenHeight, resolution);\n\n this.screen.width = this.texture.frame.width;\n this.screen.height = this.texture.frame.height;\n }\n\n /**\n * Destroys this System and optionally removes the canvas from the dom.\n * @param {options | false} options - The options for destroying the view, or \"false\".\n * @example\n * viewSystem.destroy();\n * viewSystem.destroy(true);\n * viewSystem.destroy({ removeView: true });\n */\n public destroy(options: TypeOrBool<ViewSystemDestroyOptions> = false): void\n {\n const removeView = typeof options === 'boolean' ? options : !!options?.removeView;\n\n if (removeView && this.canvas.parentNode)\n {\n this.canvas.parentNode.removeChild(this.canvas);\n }\n\n this.texture.source.off('resize', this._updateScreenSize, this);\n\n TexturePool.removeScreen(this._renderer.uid);\n CanvasPool.removeScreen(this._renderer.uid);\n\n this.texture.destroy();\n\n // note: don't nullify the element\n // other systems may need to unbind from it during the destroy iteration (eg. GLContextSystem)\n }\n\n /**\n * Tells the texture and canvas pools how big this renderer's screen is, in physical pixels, so they\n * can hand out screen sized resources instead of rounding every request up to a power of two.\n */\n private _updateScreenSize(): void\n {\n const { pixelWidth, pixelHeight } = this.texture.source;\n const uid = this._renderer.uid;\n\n TexturePool.setScreenSize(uid, pixelWidth, pixelHeight);\n CanvasPool.setScreenSize(uid, pixelWidth, pixelHeight);\n }\n}\n","import { ExtensionType } from '../../../../extensions/Extensions';\nimport { Matrix } from '../../../../maths/matrix/Matrix';\nimport { Point } from '../../../../maths/point/Point';\nimport { color32BitToUniform } from '../../../../scene/graphics/gpu/colorToUniform';\nimport { BindGroup } from '../../gpu/shader/BindGroup';\nimport { type Renderer, RendererType } from '../../types';\nimport { UniformGroup } from '../shader/UniformGroup';\n\nimport type { PointData } from '../../../../maths/point/PointData';\nimport type { GlRenderTargetSystem } from '../../gl/renderTarget/GlRenderTargetSystem';\nimport type { GpuRenderTargetSystem } from '../../gpu/renderTarget/GpuRenderTargetSystem';\nimport type { WebGPURenderer } from '../../gpu/WebGPURenderer';\nimport type { UboSystem } from '../shader/UboSystem';\nimport type { System } from '../system/System';\n\n/**\n * Type definition for the global uniforms used in the renderer.\n * This includes projection matrix, world transform matrix, world color, and resolution.\n * @category rendering\n * @advanced\n */\nexport type GlobalUniformGroup = UniformGroup<{\n uProjectionMatrix: { value: Matrix; type: 'mat3x3<f32>' }\n uWorldTransformMatrix: { value: Matrix; type: 'mat3x3<f32>' }\n uWorldColorAlpha: { value: Float32Array; type: 'vec4<f32>' }\n uResolution: { value: number[]; type: 'vec2<f32>' }\n}>;\n\n/**\n * Options for the global uniforms system.\n * This includes size, projection matrix, world transform matrix, world color, and offset.\n * @category rendering\n * @advanced\n */\nexport interface GlobalUniformOptions\n{\n size?: number[],\n projectionMatrix?: Matrix,\n worldTransformMatrix?: Matrix\n worldColor?: number\n offset?: PointData\n}\n\n/**\n * Data structure for the global uniforms used in the renderer.\n * This includes the projection matrix, world transform matrix, world color, resolution, and bind group.\n * @category rendering\n * @advanced\n */\nexport interface GlobalUniformData\n{\n projectionMatrix: Matrix\n worldTransformMatrix: Matrix\n worldColor: number\n resolution: number[]\n offset: PointData\n bindGroup: BindGroup\n}\n\n/** @internal */\nexport interface GlobalUniformRenderer\n{\n renderTarget: GlRenderTargetSystem | GpuRenderTargetSystem\n renderPipes: Renderer['renderPipes'];\n ubo: UboSystem;\n type: RendererType;\n}\n\n/**\n * System plugin to the renderer to manage global uniforms for the renderer.\n * @category rendering\n * @advanced\n */\nexport class GlobalUniformSystem implements System\n{\n /** @ignore */\n public static extension = {\n type: [\n ExtensionType.WebGLSystem,\n ExtensionType.WebGPUSystem,\n ExtensionType.CanvasSystem,\n ],\n name: 'globalUniforms',\n } as const;\n\n private readonly _renderer: GlobalUniformRenderer;\n\n private _stackIndex = 0;\n private _globalUniformDataStack: GlobalUniformData[] = [];\n\n private readonly _uniformsPool: GlobalUniformGroup[] = [];\n private readonly _activeUniforms: GlobalUniformGroup[] = [];\n\n private readonly _bindGroupPool: BindGroup[] = [];\n private readonly _activeBindGroups: BindGroup[] = [];\n\n private _currentGlobalUniformData: GlobalUniformData;\n\n constructor(renderer: GlobalUniformRenderer)\n {\n this._renderer = renderer;\n }\n\n public reset()\n {\n this._stackIndex = 0;\n\n for (let i = 0; i < this._activeUniforms.length; i++)\n {\n this._uniformsPool.push(this._activeUniforms[i]);\n }\n\n for (let i = 0; i < this._activeBindGroups.length; i++)\n {\n this._bindGroupPool.push(this._activeBindGroups[i]);\n }\n\n this._activeUniforms.length = 0;\n this._activeBindGroups.length = 0;\n }\n\n public start(options: GlobalUniformOptions): void\n {\n this.reset();\n\n this.push(options);\n }\n\n public bind({\n size,\n projectionMatrix,\n worldTransformMatrix,\n worldColor,\n offset,\n }: GlobalUniformOptions)\n {\n const renderTarget = this._renderer.renderTarget.renderTarget;\n\n const currentGlobalUniformData = this._stackIndex ? this._globalUniformDataStack[this._stackIndex - 1] : {\n projectionData: renderTarget,\n worldTransformMatrix: new Matrix(),\n worldColor: 0xFFFFFFFF,\n offset: new Point(),\n };\n\n const globalUniformData: GlobalUniformData = {\n projectionMatrix: projectionMatrix || this._renderer.renderTarget.projectionMatrix,\n resolution: size || renderTarget.size,\n worldTransformMatrix: worldTransformMatrix || currentGlobalUniformData.worldTransformMatrix,\n worldColor: worldColor || currentGlobalUniformData.worldColor,\n offset: offset || currentGlobalUniformData.offset,\n bindGroup: null,\n };\n\n const uniformGroup = this._uniformsPool.pop() || this._createUniforms();\n\n this._activeUniforms.push(uniformGroup);\n\n const uniforms = uniformGroup.uniforms;\n\n uniforms.uProjectionMatrix = globalUniformData.projectionMatrix;\n\n uniforms.uResolution = globalUniformData.resolution;\n\n uniforms.uWorldTransformMatrix.copyFrom(globalUniformData.worldTransformMatrix);\n\n uniforms.uWorldTransformMatrix.tx -= globalUniformData.offset.x;\n uniforms.uWorldTransformMatrix.ty -= globalUniformData.offset.y;\n\n color32BitToUniform(\n globalUniformData.worldColor,\n uniforms.uWorldColorAlpha,\n 0\n );\n\n uniformGroup.update();\n\n let bindGroup: BindGroup;\n\n if ((this._renderer as WebGPURenderer).renderPipes.uniformBatch)\n {\n bindGroup = (this._renderer as WebGPURenderer).renderPipes.uniformBatch.getUniformBindGroup(uniformGroup, false);\n }\n else\n {\n bindGroup = this._bindGroupPool.pop() || new BindGroup();\n this._activeBindGroups.push(bindGroup);\n bindGroup.setResource(uniformGroup, 0);\n }\n\n globalUniformData.bindGroup = bindGroup;\n\n this._currentGlobalUniformData = globalUniformData;\n }\n\n public push(options: GlobalUniformOptions)\n {\n this.bind(options);\n\n this._globalUniformDataStack[this._stackIndex++] = this._currentGlobalUniformData;\n }\n\n public pop()\n {\n this._currentGlobalUniformData = this._globalUniformDataStack[--this._stackIndex - 1];\n\n // for webGL we need to update the uniform group here\n // as we are not using bind groups\n if (this._renderer.type === RendererType.WEBGL)\n {\n (this._currentGlobalUniformData.bindGroup.resources[0] as UniformGroup).update();\n }\n }\n\n get bindGroup(): BindGroup\n {\n return this._currentGlobalUniformData.bindGroup;\n }\n\n get globalUniformData()\n {\n return this._currentGlobalUniformData;\n }\n\n get uniformGroup()\n {\n return this._currentGlobalUniformData.bindGroup.resources[0] as UniformGroup;\n }\n\n private _createUniforms(): GlobalUniformGroup\n {\n const globalUniforms = new UniformGroup({\n uProjectionMatrix: { value: new Matrix(), type: 'mat3x3<f32>' },\n uWorldTransformMatrix: { value: new Matrix(), type: 'mat3x3<f32>' },\n // TODO - someone smart - set this to be a unorm8x4 rather than a vec4<f32>\n uWorldColorAlpha: { value: new Float32Array(4), type: 'vec4<f32>' },\n uResolution: { value: [0, 0], type: 'vec2<f32>' },\n }, {\n isStatic: true,\n });\n\n return globalUniforms;\n }\n\n public destroy()\n {\n (this._renderer as null) = null;\n this._globalUniformDataStack.length = 0;\n this._uniformsPool.length = 0;\n this._activeUniforms.length = 0;\n this._bindGroupPool.length = 0;\n this._activeBindGroups.length = 0;\n this._currentGlobalUniformData = null;\n }\n}\n","import { Color, type ColorSource } from '../../../../color/Color';\nimport { ExtensionType } from '../../../../extensions/Extensions';\nimport { Matrix } from '../../../../maths/matrix/Matrix';\nimport { Rectangle } from '../../../../maths/shapes/Rectangle';\nimport { Bounds } from '../../../../scene/container/bounds/Bounds';\nimport { getLocalBounds } from '../../../../scene/container/bounds/getLocalBounds';\nimport { Container } from '../../../../scene/container/Container';\nimport { RenderTexture } from '../texture/RenderTexture';\n\nimport type { Renderer } from '../../types';\nimport type { System } from '../system/System';\nimport type { TextureSourceOptions } from '../texture/sources/TextureSource';\n\n/**\n * Options for generating a texture source.\n * @category rendering\n * @advanced\n * @interface\n */\nexport type GenerateTextureSourceOptions = Omit<TextureSourceOptions, 'resource' | 'width' | 'height' | 'resolution'>;\n\n/**\n * Options for generating a texture from a container.\n * Used to create reusable textures from display objects, which can improve performance\n * when the same content needs to be rendered multiple times.\n * @example\n * ```ts\n * // Basic texture generation\n * const sprite = new Sprite(texture);\n * const generatedTexture = renderer.generateTexture({\n * target: sprite\n * });\n *\n * // Generate with custom region and resolution\n * const texture = renderer.generateTexture({\n * target: container,\n * frame: new Rectangle(0, 0, 100, 100),\n * resolution: 2\n * });\n *\n * // Generate with background color and anti-aliasing\n * const highQualityTexture = renderer.generateTexture({\n * target: graphics,\n * clearColor: '#ff0000',\n * antialias: true,\n * textureSourceOptions: {\n * scaleMode: 'linear'\n * }\n * });\n * ```\n * @category rendering\n * @advanced\n */\nexport type GenerateTextureOptions = {\n /**\n * The container to generate the texture from.\n * This can be any display object like Sprite, Container, or Graphics.\n * @example\n * ```ts\n * const graphics = new Graphics()\n * .circle(0, 0, 50)\n * .fill('red');\n *\n * const texture = renderer.generateTexture({\n * target: graphics\n * });\n * ```\n */\n target: Container;\n\n /**\n * The region of the container that should be rendered.\n * If not specified, defaults to the local bounds of the container.\n * @example\n * ```ts\n * // Extract only a portion of the container\n * const texture = renderer.generateTexture({\n * target: container,\n * frame: new Rectangle(10, 10, 100, 100)\n * });\n * ```\n */\n frame?: Rectangle;\n\n /**\n * The resolution of the texture being generated.\n * Higher values create sharper textures at the cost of memory.\n * @default renderer.resolution\n * @example\n * ```ts\n * // Generate a high-resolution texture\n * const hiResTexture = renderer.generateTexture({\n * target: sprite,\n * resolution: 2 // 2x resolution\n * });\n * ```\n */\n resolution?: number;\n\n /**\n * The color used to clear the texture before rendering.\n * Can be a hex number, string, or array of numbers.\n * @example\n * ```ts\n * // Clear with red background\n * const texture = renderer.generateTexture({\n * target: sprite,\n * clearColor: '#ff0000'\n * });\n *\n * // Clear with semi-transparent black\n * const texture = renderer.generateTexture({\n * target: sprite,\n * clearColor: [0, 0, 0, 0.5]\n * });\n * ```\n */\n clearColor?: ColorSource;\n\n /**\n * Whether to enable anti-aliasing. This may affect performance.\n * @default false\n * @example\n * ```ts\n * // Generate a smooth texture\n * const texture = renderer.generateTexture({\n * target: graphics,\n * antialias: true\n * });\n * ```\n */\n antialias?: boolean;\n\n /**\n * Default anchor point for the generated texture.\n * @example\n * ```ts\n * const texture = renderer.generateTexture({\n * target: sprite,\n * defaultAnchor: { x: 0.5, y: 0.5 } // Center the anchor\n * });\n * ```\n */\n defaultAnchor?: { x: number; y: number };\n\n /**\n * Advanced options for configuring the texture source.\n * Controls texture properties like scale mode and filtering.\n * @advanced\n * @example\n * ```ts\n * const texture = renderer.generateTexture({\n * target: sprite,\n * textureSourceOptions: {\n * scaleMode: 'linear',\n * }\n * });\n * ```\n */\n textureSourceOptions?: GenerateTextureSourceOptions;\n};\n\nconst tempRect = new Rectangle();\nconst tempBounds = new Bounds();\nconst noColor: ColorSource = [0, 0, 0, 0];\n\n/**\n * System that manages the generation of textures from display objects in the renderer.\n * This system is responsible for creating reusable textures from containers, sprites, and other display objects.\n * Available through `renderer.textureGenerator`.\n * @example\n * ```ts\n * import { Application, Sprite, Graphics } from 'pixi.js';\n *\n * const app = new Application();\n * await app.init();\n *\n * // Create a complex display object\n * const container = new Container();\n *\n * const graphics = new Graphics()\n * .circle(0, 0, 50)\n * .fill('red');\n *\n * const sprite = new Sprite(texture);\n * sprite.x = 100;\n *\n * container.addChild(graphics, sprite);\n *\n * // Generate a texture from the container\n * const generatedTexture = app.renderer.textureGenerator.generateTexture({\n * target: container,\n * resolution: 2,\n * antialias: true\n * });\n *\n * // Use the generated texture\n * const newSprite = new Sprite(generatedTexture);\n * app.stage.addChild(newSprite);\n *\n * // Clean up when done\n * generatedTexture.destroy(true);\n * ```\n *\n * Features:\n * - Convert any display object to a texture\n * - Support for custom regions and resolutions\n * - Anti-aliasing support\n * - Background color configuration\n * - Texture source options customization\n *\n * Common Use Cases:\n * - Creating texture atlases dynamically\n * - Caching complex container content\n * - Generating thumbnails\n * - Creating reusable textures from rendered content\n *\n * Performance Considerations:\n * - Generating textures is relatively expensive\n * - Cache results when possible\n * - Be mindful of resolution and size\n * - Clean up unused textures\n * @see {@link GenerateTextureOptions} For detailed texture generation options\n * @see {@link AbstractRenderer.generateTexture} For the main renderer method\n * @see {@link RenderTexture} For the resulting texture type\n * @category rendering\n * @standard\n */\nexport class GenerateTextureSystem implements System\n{\n /** @ignore */\n public static extension = {\n type: [\n ExtensionType.WebGLSystem,\n ExtensionType.WebGPUSystem,\n ExtensionType.CanvasSystem,\n ],\n name: 'textureGenerator',\n } as const;\n\n private readonly _renderer: Renderer;\n\n constructor(renderer: Renderer)\n {\n this._renderer = renderer;\n }\n\n /**\n * Creates a texture from a display object that can be used for creating sprites and other textures.\n * This is particularly useful for optimizing performance when a complex container needs to be reused.\n * @param options - Generate texture options or a container to convert to texture\n * @returns A new RenderTexture containing the rendered display object\n * @example\n * ```ts\n * // Basic usage with a container\n * const container = new Container();\n * container.addChild(\n * new Graphics()\n * .circle(0, 0, 50)\n * .fill('red')\n * );\n *\n * const texture = renderer.textureGenerator.generateTexture(container);\n *\n * // Advanced usage with options\n * const texture = renderer.textureGenerator.generateTexture({\n * target: container,\n * frame: new Rectangle(0, 0, 100, 100), // Specific region\n * resolution: 2, // High DPI\n * clearColor: '#ff0000', // Red background\n * antialias: true // Smooth edges\n * });\n *\n * // Create a sprite from the generated texture\n * const sprite = new Sprite(texture);\n *\n * // Clean up when done\n * texture.destroy(true);\n * ```\n * @see {@link GenerateTextureOptions} For detailed texture generation options\n * @see {@link RenderTexture} For the type of texture created\n * @category rendering\n */\n public generateTexture(options: GenerateTextureOptions | Container): RenderTexture\n {\n if (options instanceof Container)\n {\n options = {\n target: options,\n frame: undefined,\n textureSourceOptions: {},\n resolution: undefined,\n };\n }\n\n const resolution = options.resolution || this._renderer.resolution;\n const antialias = options.antialias || this._renderer.view.antialias;\n\n const container = options.target;\n\n let clearColor = options.clearColor;\n\n if (clearColor)\n {\n const isRGBAArray = Array.isArray(clearColor) && clearColor.length === 4;\n\n clearColor = isRGBAArray ? clearColor : Color.shared.setValue(clearColor).toArray();\n }\n else\n {\n clearColor = noColor;\n }\n\n const region = options.frame?.copyTo(tempRect)\n || getLocalBounds(container, tempBounds).rectangle;\n\n const textureOptions = options.defaultAnchor && {\n defaultAnchor: options.defaultAnchor\n };\n\n region.width = Math.max(region.width, 1 / resolution) | 0;\n region.height = Math.max(region.height, 1 / resolution) | 0;\n\n const target = RenderTexture.create({\n ...options.textureSourceOptions,\n width: region.width,\n height: region.height,\n resolution,\n antialias,\n textureOptions\n });\n\n const transform = Matrix.shared.translate(-region.x, -region.y);\n\n this._renderer.render({\n container,\n transform,\n target,\n clearColor,\n });\n\n target.source.updateMipmaps();\n\n return target;\n }\n\n public destroy(): void\n {\n (this._renderer as null) = null;\n }\n}\n","import { Matrix } from '../../../../maths/matrix/Matrix';\nimport { Rectangle } from '../../../../maths/shapes/Rectangle';\nimport { deprecation, v8_21_0 } from '../../../../utils/logging/deprecation';\nimport { warn } from '../../../../utils/logging/warn';\nimport { CLEAR } from '../../gl/const';\nimport { calculateProjection } from '../../gpu/renderTarget/calculateProjection';\nimport { type Renderer, RendererType } from '../../types';\nimport { SystemRunner } from '../system/SystemRunner';\nimport { CanvasSource } from '../texture/sources/CanvasSource';\nimport { TextureSource } from '../texture/sources/TextureSource';\nimport { Texture } from '../texture/Texture';\nimport { getCanvasTexture } from '../texture/utils/getCanvasTexture';\nimport { isRenderingToScreen } from './isRenderingToScreen';\nimport { RenderTarget } from './RenderTarget';\n\nimport type { RgbaArray } from '../../../../color/Color';\nimport type { ICanvas } from '../../../../environment/canvas/ICanvas';\nimport type { CanvasRenderTarget } from '../../canvas/renderTarget/CanvasRenderTargetAdaptor';\nimport type { CLEAR_OR_BOOL } from '../../gl/const';\nimport type { GlRenderTarget } from '../../gl/GlRenderTarget';\nimport type { GpuRenderTarget } from '../../gpu/renderTarget/GpuRenderTarget';\nimport type { System } from '../system/System';\nimport type { BindableTexture } from '../texture/Texture';\n\n/**\n * A render surface is a texture, canvas, or render target\n * @category rendering\n * @see environment.ICanvas\n * @see Texture\n * @see RenderTarget\n * @advanced\n */\nexport type RenderSurface = ICanvas | BindableTexture | RenderTarget;\n\n/**\n * The persistent description of a render-surface binding: the target plus the frame,\n * subresource, and orientation axes. Captured by {@link RenderTargetSystem.getBindState}.\n *\n * A clear is a per-call action, not part of the binding — see {@link BindOptions}.\n * @category rendering\n * @advanced\n */\nexport interface BindState\n{\n /** the render surface to bind: a texture, canvas, or render target */\n target: RenderSurface;\n /**\n * the frame to render to, in base mip (mip 0) pixel space. When omitted, a {@link Texture}\n * target falls back to its own frame and any other target binds in full.\n */\n frame?: Rectangle;\n /**\n * the mip level to render to (subresource)\n * @default 0\n */\n mipLevel?: number;\n /**\n * the array layer (or slice/face) of the render surface to render to (subresource)\n * @default 0\n */\n layer?: number;\n /**\n * opt-in Y-orientation toggle. `false`/omitted is a no-op (the historical `!isRoot`\n * behavior); `true` inverts the orientation, and the winding with it.\n */\n flipY?: boolean;\n}\n\n/**\n * Options for binding a render surface via {@link RenderTargetSystem.bind}: the persistent\n * {@link BindState} plus the per-call clear actions.\n * @category rendering\n * @advanced\n */\nexport interface BindOptions extends BindState\n{\n /**\n * the clear mode to use. Can be `true` or a CLEAR number 'COLOR | DEPTH | STENCIL' 0b111\n * @default true\n */\n clear?: CLEAR_OR_BOOL;\n /** the color to clear to */\n clearColor?: RgbaArray;\n}\n\n/**\n * An adaptor interface for RenderTargetSystem to support WebGL and WebGPU.\n * This is used internally by the renderer, and is not intended to be used directly.\n * @ignore\n */\ntype RendererRenderTarget = GlRenderTarget | GpuRenderTarget | CanvasRenderTarget;\n\n/**\n * An adaptor interface for RenderTargetSystem to support WebGL and WebGPU.\n * This is used internally by the renderer, and is not intended to be used directly.\n * @category rendering\n * @ignore\n */\nexport interface RenderTargetAdaptor<RENDER_TARGET extends RendererRenderTarget>\n{\n /**\n * Initializes the adaptor.\n * @param {Renderer} renderer - the renderer\n * @param {RenderTargetSystem} renderTargetSystem - the render target system\n */\n init(\n renderer: Renderer,\n renderTargetSystem: RenderTargetSystem<RENDER_TARGET>\n ): void\n\n /**\n * A function copies the contents of a render surface to a texture\n * @param {RenderTarget} sourceRenderSurfaceTexture - the render surface to copy from\n * @param {Texture} destinationTexture - the texture to copy to\n * @param {object} originSrc - the origin of the copy\n * @param {number} originSrc.x - the x origin of the copy\n * @param {number} originSrc.y - the y origin of the copy\n * @param {object} size - the size of the copy\n * @param {number} size.width - the width of the copy\n * @param {number} size.height - the height of the copy\n * @param {object} originDest - the destination origin (top left to paste from!)\n * @param {number} originDest.x - the x destination origin of the copy\n * @param {number} originDest.y - the y destination origin of the copy\n */\n copyToTexture(\n sourceRenderSurfaceTexture: RenderTarget,\n destinationTexture: Texture,\n originSrc: { x: number; y: number },\n size: { width: number; height: number },\n originDest?: { x: number; y: number },\n ): Texture\n\n /**\n * starts a render pass on the render target\n * @param {RenderTarget} renderTarget - the render target to start the render pass on\n * @param {CLEAR_OR_BOOL} clear - the clear mode to use. Can be true or a CLEAR number 'COLOR | DEPTH | STENCIL' 0b111*\n * @param {RgbaArray} [clearColor] - the color to clear to\n * @param {Rectangle} [viewport] - the viewport to use\n */\n startRenderPass(\n renderTarget: RenderTarget,\n clear: CLEAR_OR_BOOL,\n clearColor?: RgbaArray,\n /** the viewport to use */\n viewport?: Rectangle,\n /** mip level to render to (subresource) */\n mipLevel?: number,\n /** array layer to render to (subresource) */\n layer?: number\n ): void\n\n /**\n * clears the current render target to the specified color\n * @param {RenderTarget} renderTarget - the render target to clear\n * @param {CLEAR_OR_BOOL} clear - the clear mode to use. Can be true or a CLEAR number 'COLOR | DEPTH | STENCIL' 0b111*\n * @param {RgbaArray} [clearColor] - the color to clear to\n * @param {Rectangle} [viewport] - the viewport to use\n */\n clear(\n renderTarget: RenderTarget,\n clear: CLEAR_OR_BOOL,\n clearColor?: RgbaArray,\n /** the viewport to use */\n viewport?: Rectangle,\n /** mip level to clear (subresource) */\n mipLevel?: number,\n /** array layer to clear (subresource) */\n layer?: number\n ): void\n\n /**\n * finishes the current render pass\n * @param {RenderTarget} renderTarget - the render target to finish the render pass for\n */\n finishRenderPass(renderTarget: RenderTarget): void\n\n /**\n * called after the render pass is finished\n * @param {RenderTarget} renderTarget - the render target that was rendered to\n */\n postrender?(renderTarget: RenderTarget): void;\n\n /**\n * called before the render main pass is started\n * @param {RenderTarget} renderTarget - the render target that will be rendered to\n */\n prerender?(renderTarget: RenderTarget): void;\n\n /**\n * initializes a gpu render target\n * @param {RenderTarget} renderTarget - the render target to initialize\n */\n initGpuRenderTarget(\n renderTarget: RenderTarget\n ): RENDER_TARGET\n\n /**\n * resizes the gpu render target\n * @param {RenderTarget} renderTarget - the render target to resize\n */\n resizeGpuRenderTarget(\n renderTarget: RenderTarget\n ): void\n\n /**\n * destroys the gpu render target\n * @param {RendererRenderTarget} gpuRenderTarget - the gpu render target to destroy\n */\n destroyGpuRenderTarget(gpuRenderTarget: RENDER_TARGET): void\n\n /**\n * Copies the depth attachment of a render target into a depth/stencil texture.\n *\n * **Important Note:** When using the copied depth buffer in a subsequent render pass,\n * you must ensure you do not clear the depth buffer again. If you need to clear the color\n * buffer of the destination render target, use `clear: CLEAR.COLOR` to preserve the copied depth data.\n * @example\n * ```js\n * renderer.renderTarget.copyDepthTexture(\n * sourceRT, destDepthTexture, { x: 0, y: 0 }, { width: 200, height: 200 }, { x: 0, y: 0 }\n * );\n *\n * // In the subsequent render pass, clear ONLY the color buffer!\n * renderer.render({\n * target: destRT,\n * container: myMesh,\n * clear: CLEAR.COLOR, // Preserves the copied depth\n * clearColor: [0, 0, 0, 1]\n * });\n * ```\n * @param {RenderTarget} source - the render target to copy depth from\n * @param {Texture} destination - the depth/stencil texture to copy depth to\n * @param {object} originSrc - the origin of the copy\n * @param {number} originSrc.x - the x origin of the copy\n * @param {number} originSrc.y - the y origin of the copy\n * @param {object} size - the size of the copy\n * @param {number} size.width - the width of the copy\n * @param {number} size.height - the height of the copy\n * @param {object} originDest - the destination origin (top left to paste from!)\n * @param {number} originDest.x - the x destination origin of the copy\n * @param {number} originDest.y - the y destination origin of the copy\n */\n copyDepthTexture(\n source: RenderTarget,\n destination: Texture,\n originSrc: { x: number; y: number },\n size: { width: number; height: number },\n originDest?: { x: number; y: number },\n ): void\n}\n\n/**\n * A system that manages render targets. A render target is essentially a place where the shaders can color in the pixels.\n * The render target system is responsible for binding the render target to the renderer, and managing the viewport.\n * Render targets can be pushed and popped.\n *\n * To make it easier, you can also bind textures and canvases too. This will automatically create a render target for you.\n * The render target itself is a lot more powerful than just a texture or canvas,\n * as it can have multiple textures attached to it.\n * It will also give ou fine grain control over the stencil buffer / depth texture.\n * @example\n *\n * ```js\n *\n * // create a render target\n * const renderTarget = new RenderTarget({\n * colorTextures: [new TextureSource({ width: 100, height: 100 })],\n * });\n *\n * // bind the render target\n * renderer.renderTarget.bind({ target: renderTarget });\n *\n * // draw something!\n * ```\n * @category rendering\n * @advanced\n */\nexport class RenderTargetSystem<RENDER_TARGET extends RendererRenderTarget> implements System\n{\n /** When rendering of a scene begins, this is where the root render surface is stored */\n public rootRenderTarget: RenderTarget;\n /** This is the root viewport for the render pass */\n public rootViewPort = new Rectangle();\n /** A boolean that lets the dev know if the current render pass is rendering to the screen. Used by some plugins */\n public renderingToScreen: boolean;\n /** the current active render target */\n public renderTarget: RenderTarget;\n /** the current viewport that the gpu is using */\n public readonly viewport = new Rectangle();\n /**\n * a runner that lets systems know if the active render target has changed.\n * Eg the Stencil System needs to know so it can manage the stencil buffer\n */\n public readonly onRenderTargetChange = new SystemRunner('onRenderTargetChange');\n /** the projection matrix that is used by the shaders based on the active render target and the viewport */\n public readonly projectionMatrix = new Matrix();\n /** the default clear color for render targets */\n public readonly defaultClearColor: RgbaArray = [0, 0, 0, 0];\n /** a reference to the adaptor that interfaces with WebGL / WebGP */\n public readonly adaptor: RenderTargetAdaptor<RENDER_TARGET>;\n /**\n * a hash that stores the render target for a given render surface. When you pass in a texture source,\n * a render target is created for it. This map stores and makes it easy to retrieve the render target\n */\n private readonly _renderSurfaceToRenderTargetHash: Map<RenderSurface, RenderTarget>\n = new Map();\n /** A hash that stores a gpu render target for a given render target. */\n private _gpuRenderTargetHash: Record<number, RENDER_TARGET> = Object.create(null);\n /** the pushed bindings; each entry is a replayable BindOptions that pop() re-binds */\n private readonly _renderTargetStack: BindOptions[] = [];\n /**\n * the state of the current binding, written on every bind — backs the `renderSurface`,\n * `mipLevel` and `layer` getters and `getBindState`. Its `frame` aliases `_bindFrame`\n * and must never be handed out by reference.\n */\n private readonly _bindState: BindState = {\n target: null,\n frame: undefined,\n mipLevel: 0,\n layer: 0,\n flipY: false,\n };\n /** system-owned rect backing `_bindState.frame`; as-passed frames are copied into it */\n private readonly _bindFrame = new Rectangle();\n /** A reference to the renderer */\n private readonly _renderer: Renderer;\n\n constructor(renderer: Renderer)\n {\n this._renderer = renderer;\n renderer.gc.addCollection(this, '_gpuRenderTargetHash', 'hash');\n }\n\n /** the current active render surface that the render target is created from */\n public get renderSurface(): RenderSurface\n {\n return this._bindState.target;\n }\n\n /** the current mip level being rendered to (for texture subresources) */\n public get mipLevel(): number\n {\n return this._bindState.mipLevel;\n }\n\n /** the current array layer being rendered to (for array-backed targets) */\n public get layer(): number\n {\n return this._bindState.layer;\n }\n\n /** called when dev wants to finish a render pass */\n public finishRenderPass()\n {\n this.adaptor.finishRenderPass(this.renderTarget);\n }\n\n /**\n * called when the renderer starts to render a scene: resets the bind stack and binds the\n * root render surface\n * @param options - the {@link BindOptions} for the root binding\n */\n public renderStart(options: BindOptions): void\n {\n // TODO no need to reset this - use optimised index instead\n this._renderTargetStack.length = 0;\n\n this.push(options);\n\n this.rootViewPort.copyFrom(this.viewport);\n this.rootRenderTarget = this.renderTarget;\n this.renderingToScreen = isRenderingToScreen(this.rootRenderTarget);\n\n this.adaptor.prerender?.(this.rootRenderTarget);\n }\n\n public postrender()\n {\n this.adaptor.postrender?.(this.rootRenderTarget);\n }\n\n /**\n * Binding a render surface! This is the main function of the render target system.\n * It will take the RenderSurface (which can be a texture, canvas, or render target) and bind it to the renderer.\n * Once bound all draw calls will be rendered to the render surface.\n *\n * If a frame is not provided and the render surface is a {@link Texture}, the frame of the texture will be used.\n *\n * IDEMPOTENT BIND:\n * Binding is \"smart\" — the viewport/projection math is always recomputed, but the underlying render pass is\n * only torn down and re-begun when something that actually requires it changes. If you bind the render target\n * that the currently open pass is already on (same `mipLevel`/`layer`) and request **no clear**\n * (`clear` is `false` / `CLEAR.NONE`), the live pass is reused and only the viewport is updated. This makes\n * drawing N things into one target at N viewports a single pass with N `setViewport` calls, and makes a\n * redundant same-target `bind`/`pop` essentially free. Any clear (even a partial one like `CLEAR.DEPTH`), a\n * different target, or a different `mipLevel`/`layer` forces a real begin. The MSAA resolve is never skipped:\n * it is deferred to the genuine pass end, which still happens before any target switch or read-back.\n *\n * IMPORTANT:\n * - `frame` is treated as **base mip (mip 0) pixel space**.\n * - When `mipLevel > 0`, the viewport derived from `frame` is scaled by \\(2^{mipLevel}\\) and clamped to the\n * mip dimensions. This keeps \"render the same region\" semantics consistent across mip levels.\n * - When `renderSurface` is a {@link Texture}, `renderer.render({ container, target: texture, mipLevel })` will\n * render into\n * the underlying {@link TextureSource} (Pixi will create/use a {@link RenderTarget} for the source) using the\n * texture's frame to define the region (in mip 0 space).\n * @param options - the bind options: see {@link BindOptions}\n * @returns the render target that was bound\n */\n public bind(options: BindOptions): RenderTarget;\n /**\n * Binds a render surface using positional arguments.\n * @param renderSurface - the render surface to bind\n * @param clear - the clear mode to use. Can be true or a CLEAR number 'COLOR | DEPTH | STENCIL' 0b111\n * @param clearColor - the color to clear to\n * @param frame - the frame to render to\n * @param mipLevel - the mip level to render to\n * @param layer - the layer (or slice) of the render surface to render to\n * @param flipY - opt-in Y-orientation toggle\n * @returns the render target that was bound\n * @deprecated since 8.20.0 — use an options object instead:\n * `bind({ target, clear, clearColor, frame, mipLevel, layer, flipY })`\n */\n public bind(\n renderSurface: RenderSurface,\n clear?: CLEAR_OR_BOOL,\n clearColor?: RgbaArray,\n frame?: Rectangle,\n mipLevel?: number,\n layer?: number,\n flipY?: boolean\n ): RenderTarget;\n public bind(\n surfaceOrOptions: RenderSurface | BindOptions,\n clear: CLEAR_OR_BOOL = true,\n clearColor?: RgbaArray,\n frame?: Rectangle,\n mipLevel = 0,\n layer = 0,\n flipY?: boolean\n ): RenderTarget\n {\n let options: BindOptions;\n\n if ('target' in surfaceOrOptions)\n {\n options = surfaceOrOptions;\n }\n else\n {\n // legacy positional call: sanitise the arguments into a BindOptions and carry on\n // #if _DEBUG\n deprecation('8.20.0', 'RenderTargetSystem.bind: positional arguments are deprecated, '\n + 'please use an options object instead: '\n + 'bind({ target, clear, clearColor, frame, mipLevel, layer, flipY })');\n // #endif\n\n options = { target: surfaceOrOptions, clear, clearColor, frame, mipLevel, layer, flipY };\n }\n\n // the options object is caller-owned and read-only: read everything into locals here\n // and never write back into it (the frame fallback below reassigns the local)\n const renderSurface = options.target;\n\n clear = options.clear ?? true;\n clearColor = options.clearColor;\n mipLevel = (options.mipLevel ?? 0) | 0;\n layer = (options.layer ?? 0) | 0;\n flipY = options.flipY;\n frame = options.frame;\n\n const renderTarget = this.getRenderTarget(renderSurface);\n\n // a rebind counts as a change when the winding it resolves to changes, not only when the\n // target does: WebGL applies the front-face inversion from this signal, so rebinding the\n // same target with the other `flipY` must re-emit or the GL winding goes stale\n const didChange = this.renderTarget !== renderTarget || !!renderTarget.flipY !== !!flipY;\n\n this.renderTarget = renderTarget;\n\n const gpuRenderTarget = this.getGpuRenderTarget(renderTarget);\n\n if (renderTarget.pixelWidth !== gpuRenderTarget.width\n || renderTarget.pixelHeight !== gpuRenderTarget.height)\n {\n this.adaptor.resizeGpuRenderTarget(renderTarget);\n\n gpuRenderTarget.width = renderTarget.pixelWidth;\n gpuRenderTarget.height = renderTarget.pixelHeight;\n }\n\n const source = renderTarget.colorAttachments[0]?.texture || renderTarget.depthStencilAttachment?.texture;\n const viewport = this.viewport;\n\n const layerCount = source.dimension === '3d' ? Math.max(source.depth >> mipLevel, 1) : source.depthOrArrayLayers;\n\n if (layer < 0 || layer >= layerCount)\n {\n throw new Error(`[RenderTargetSystem] layer ${layer} is out of bounds (layer count=${layerCount}).`);\n }\n\n // retain the as-passed bind state for the getters and getBindState; the frame is\n // copied, not referenced — callers reuse their rects\n const bindState = this._bindState;\n\n bindState.target = renderSurface;\n bindState.frame = frame ? this._bindFrame.copyFrom(frame) : undefined;\n bindState.mipLevel = mipLevel;\n bindState.layer = layer;\n bindState.flipY = flipY;\n\n const pixelWidth = Math.max(source.pixelWidth >> mipLevel, 1);\n const pixelHeight = Math.max(source.pixelHeight >> mipLevel, 1);\n\n // If no explicit frame was provided, Texture targets default to their frame.\n // IMPORTANT: frame is treated as base-level (mip 0) coordinates; when rendering to mip N,\n // the viewport is scaled down by 2^N.\n if (!frame && renderSurface instanceof Texture)\n {\n frame = renderSurface.frame;\n }\n\n if (frame)\n {\n const resolution = source._resolution;\n const scale = 1 << Math.max(mipLevel, 0);\n\n // Convert frame to pixel units (mip 0), then scale to the requested mip level.\n const baseX = ((frame.x * resolution) + 0.5) | 0;\n const baseY = ((frame.y * resolution) + 0.5) | 0;\n const baseW = ((frame.width * resolution) + 0.5) | 0;\n const baseH = ((frame.height * resolution) + 0.5) | 0;\n\n // Use floor for origin and ceil for size to avoid collapsing to zero due to rounding.\n // (When mipLevel === 0, scale === 1 so this behaves like the base-level case.)\n let x = Math.floor(baseX / scale);\n let y = Math.floor(baseY / scale);\n let w = Math.ceil(baseW / scale);\n let h = Math.ceil(baseH / scale);\n\n // Clamp to mip dimensions.\n // We clamp the position first, then calculate the width/height based on the new position.\n // This ensures that we don't collapse the width/height if the position is clamped.\n if (x < 0)\n {\n w += x;\n x = 0;\n }\n\n if (y < 0)\n {\n h += y;\n y = 0;\n }\n\n // clamp position to the texture bounds\n x = Math.min(x, pixelWidth - 1);\n y = Math.min(y, pixelHeight - 1);\n\n // now clamp the width/height to the texture bounds\n w = Math.min(w, pixelWidth - x);\n h = Math.min(h, pixelHeight - y);\n\n // ensure we have at least 1 pixel\n w = Math.max(w, 1);\n h = Math.max(h, 1);\n\n viewport.x = x;\n viewport.y = y;\n viewport.width = w;\n viewport.height = h;\n }\n else\n {\n viewport.x = 0;\n viewport.y = 0;\n viewport.width = pixelWidth;\n viewport.height = pixelHeight;\n }\n\n // Store the raw `flipY` toggle on the target — always, even when `undefined`, so a pooled target\n // resets to the default. `flipY` is opt-in: off → the historical orientation (`!isRoot`), on →\n // that orientation inverted. Resolving it here keeps the projection (below) and the WebGL\n // front-face inversion (GlStateSystem.onRenderTargetChange) reading the same welded value.\n renderTarget.flipY = flipY;\n\n calculateProjection(\n this.projectionMatrix,\n 0, 0,\n viewport.width / source.resolution,\n viewport.height / source.resolution,\n !renderTarget.isRoot !== !!renderTarget.flipY\n );\n\n this.adaptor.startRenderPass(renderTarget, clear, clearColor, viewport, mipLevel, layer);\n\n if (didChange)\n {\n this.onRenderTargetChange.emit(renderTarget);\n }\n\n return renderTarget;\n }\n\n /**\n * Captures the current binding as a {@link BindOptions} that can be passed back to\n * {@link RenderTargetSystem.bind} to restore it. The capture replays non-destructively:\n * its `clear` is `CLEAR.NONE`, so restoring never wipes the target.\n *\n * ```js\n * const saved = renderer.renderTarget.getBindState();\n *\n * renderer.renderTarget.bind({ target: scratchTexture, clear: true });\n * // ... draw ...\n * renderer.renderTarget.bind(saved);\n *\n * // or compose: the saved binding, but into mip 1\n * renderer.renderTarget.bind({ ...saved, mipLevel: 1 });\n * ```\n *\n * The capture is a snapshot owned by the caller — later binds cannot change it — and holds\n * `target` and `frame` as they were passed, so a Texture bound without an explicit frame\n * replays through its frame fallback. It stays valid for as long as its target does.\n * Pass `out` to reuse one object across captures; every field of it is overwritten.\n * @param out - an optional object to write the bind state into; allocated when omitted\n * @returns the captured bind state (`out` when provided)\n */\n public getBindState(out?: BindOptions): BindOptions\n {\n if (!this.renderTarget)\n {\n throw new Error('[RenderTargetSystem] getBindState is only valid while a render surface is bound');\n }\n\n const bindState = this._bindState;\n\n out ??= {} as BindOptions;\n\n out.target = bindState.target;\n // pinned to NONE so replaying the capture never clears the restored target\n out.clear = CLEAR.NONE;\n out.clearColor = undefined;\n\n if (!bindState.frame)\n {\n out.frame = undefined;\n }\n else if (out.frame)\n {\n // reuse the out object's own rect in place\n out.frame.copyFrom(bindState.frame);\n }\n else\n {\n out.frame = bindState.frame.clone();\n }\n\n out.mipLevel = bindState.mipLevel;\n out.layer = bindState.layer;\n out.flipY = !!bindState.flipY;\n\n return out;\n }\n\n /**\n * Whether pixi inverts the front face for a bind — `true` when a front-facing triangle ends up\n * wound the opposite way on the surface, so the winding/cull has been inverted to compensate.\n *\n * With no arguments, answers for the current bind. With a target, answers for that target as if\n * it were bound with the given `flipY` (defaulting to `false`, exactly as {@link bind} would), so\n * a consumer can choose a projection or a `flipY` before binding.\n *\n * This is the requested `flipY` combined with the backend's inherent orientation, not the raw request:\n *\n * ```text\n * inverted = flipY XOR (isWebGL && !isRoot)\n * ```\n *\n * WebGL's non-root FBOs carry an inherent Y-flip vs the root (the classic render-texture flip), so the\n * same requested `flipY` lands with the opposite winding depending on `isRoot`. WebGPU has no such\n * inherent flip, so there it is simply `flipY`. This is the one spelling of the rule: the winding each\n * backend bakes at bind ({@link GlStateSystem} / {@link PipelineSystem}) comes from here too, so\n * consumers (e.g. 3D pipelines) read the resolved orientation instead of re-deriving it.\n * @param renderTarget - the target to ask about; omit for the current bind\n * @param flipY - the `flipY` the target would be bound with; ignored when `renderTarget` is omitted\n * @returns whether the front face is inverted\n */\n public isFrontFaceInverted(renderTarget?: RenderTarget, flipY?: boolean): boolean\n {\n if (!renderTarget)\n {\n renderTarget = this.renderTarget;\n\n if (!renderTarget) return false;\n\n flipY = renderTarget.flipY;\n }\n\n return !!flipY !== (this._renderer.type === RendererType.WEBGL && !renderTarget.isRoot);\n }\n\n /**\n * The effective front-face orientation of the current bind.\n * @deprecated since 8.21.0, use {@link isFrontFaceInverted} instead\n * @returns whether the current bind's front face is inverted\n */\n public get frontFaceInverted(): boolean\n {\n // #if _DEBUG\n deprecation(v8_21_0, 'RenderTargetSystem.frontFaceInverted is deprecated, use isFrontFaceInverted() instead');\n // #endif\n\n return this.isFrontFaceInverted();\n }\n\n public clear(\n target?: RenderSurface,\n clear: CLEAR_OR_BOOL = CLEAR.ALL,\n clearColor?: RgbaArray,\n mipLevel = this.mipLevel,\n layer = this.layer,\n )\n {\n if (!clear) return;\n\n if (target)\n {\n target = this.getRenderTarget(target);\n }\n\n this.adaptor.clear(\n (target as RenderTarget) || this.renderTarget,\n clear,\n clearColor,\n this.viewport,\n mipLevel,\n layer\n );\n }\n\n protected contextChange(): void\n {\n this._gpuRenderTargetHash = Object.create(null);\n }\n\n /**\n * Push a render surface to the renderer. This will bind the render surface to the renderer\n * and store the binding on a stack, so `pop()` can restore the previous binding.\n * @param options - the bind options: see {@link BindOptions}\n * @returns the render target that was bound\n */\n public push(options: BindOptions): RenderTarget;\n /**\n * Push a render surface using positional arguments.\n * @param renderSurface - the render surface to push\n * @param clear - the clear mode to use. Can be true or a CLEAR number 'COLOR | DEPTH | STENCIL' 0b111\n * @param clearColor - the color to clear to\n * @param frame - the frame to use when rendering to the render surface\n * @param mipLevel - the mip level to render to\n * @param layer - the layer of the render surface to render to\n * @param flipY - opt-in Y-orientation toggle; stored on the stack so it is restored on `pop`\n * @returns the render target that was bound\n * @deprecated since 8.20.0 — use an options object instead:\n * `push({ target, clear, clearColor, frame, mipLevel, layer, flipY })`\n */\n public push(\n renderSurface: RenderSurface,\n clear?: CLEAR | boolean,\n clearColor?: RgbaArray,\n frame?: Rectangle,\n mipLevel?: number,\n layer?: number,\n flipY?: boolean\n ): RenderTarget;\n public push(\n surfaceOrOptions: RenderSurface | BindOptions,\n clear: CLEAR | boolean = CLEAR.ALL,\n clearColor?: RgbaArray,\n frame?: Rectangle,\n mipLevel = 0,\n layer = 0,\n flipY?: boolean\n ): RenderTarget\n {\n let options: BindOptions;\n\n if ('target' in surfaceOrOptions)\n {\n options = surfaceOrOptions;\n }\n else\n {\n // legacy positional call: sanitise the arguments into a BindOptions and carry on\n // #if _DEBUG\n deprecation('8.20.0', 'RenderTargetSystem.push: positional arguments are deprecated, '\n + 'please use an options object instead: '\n + 'push({ target, clear, clearColor, frame, mipLevel, layer, flipY })');\n // #endif\n\n options = { target: surfaceOrOptions, clear, clearColor, frame, mipLevel, layer, flipY };\n }\n\n const renderTarget = this.bind(options);\n\n // the entry is replayed by pop(): the target is stored as passed (a Texture keeps its\n // frame fallback), the frame is copied (callers reuse their rects), and clear is false\n // (restoring must not wipe the target)\n this._renderTargetStack.push({\n target: options.target,\n clear: false,\n clearColor: undefined,\n frame: options.frame ? options.frame.clone() : undefined,\n mipLevel: options.mipLevel,\n layer: options.layer,\n flipY: options.flipY,\n });\n\n return renderTarget;\n }\n\n /**\n * Pops the current render target and restores the previous binding.\n * @returns the render target that was restored\n */\n public pop(): RenderTarget\n {\n this._renderTargetStack.pop();\n\n const previous = this._renderTargetStack[this._renderTargetStack.length - 1];\n\n if (!previous)\n {\n throw new Error('[RenderTargetSystem] pop: no previous binding to restore (unbalanced pop)');\n }\n\n return this.bind(previous);\n }\n\n /**\n * Gets the render target from the provide render surface. Eg if its a texture,\n * it will return the render target for the texture.\n * If its a render target, it will return the same render target.\n * @param renderSurface - the render surface to get the render target for\n * @returns the render target for the render surface\n */\n public getRenderTarget(renderSurface: RenderSurface): RenderTarget\n {\n if (((renderSurface as Texture).isTexture))\n {\n renderSurface = (renderSurface as Texture).source;\n }\n\n return this._renderSurfaceToRenderTargetHash.get(renderSurface)\n ?? this._initRenderTarget(renderSurface);\n }\n\n /**\n * Copies a render surface to another texture.\n *\n * NOTE:\n * for sourceRenderSurfaceTexture, The render target must be something that is written too by the renderer\n *\n * The following is not valid:\n * @example\n * const canvas = document.createElement('canvas')\n * canvas.width = 200;\n * canvas.height = 200;\n *\n * const ctx = canvas2.getContext('2d')!\n * ctx.fillStyle = 'red'\n * ctx.fillRect(0, 0, 200, 200);\n *\n * const texture = RenderTexture.create({\n * width: 200,\n * height: 200,\n * })\n * const renderTarget = renderer.renderTarget.getRenderTarget(canvas2);\n *\n * renderer.renderTarget.copyToTexture(renderTarget,texture, {x:0,y:0},{width:200,height:200},{x:0,y:0});\n *\n * The best way to copy a canvas is to create a texture from it. Then render with that.\n *\n * Parsing in a RenderTarget canvas context (with a 2d context)\n * @param sourceRenderSurface - the render surface (render target, texture, or canvas) to copy from\n * @param {Texture} destinationTexture - the texture to copy to\n * @param {object} originSrc - the origin of the copy\n * @param {number} originSrc.x - the x origin of the copy\n * @param {number} originSrc.y - the y origin of the copy\n * @param {object} size - the size of the copy\n * @param {number} size.width - the width of the copy\n * @param {number} size.height - the height of the copy\n * @param {object} originDest - the destination origin (top left to paste from!)\n * @param {number} originDest.x - the x origin of the paste\n * @param {number} originDest.y - the y origin of the paste\n */\n public copyToTexture(\n sourceRenderSurface: RenderSurface,\n destinationTexture: Texture,\n originSrc: { x: number; y: number },\n size: { width: number; height: number },\n originDest: { x: number; y: number; },\n )\n {\n // a texture or canvas source is copied from its render target's framebuffer\n const sourceRenderTarget = this.getRenderTarget(sourceRenderSurface);\n\n // fit the size to the source we don't want to go out of bounds\n\n if (originSrc.x < 0)\n {\n size.width += originSrc.x;\n originDest.x -= originSrc.x;\n originSrc.x = 0;\n }\n\n if (originSrc.y < 0)\n {\n size.height += originSrc.y;\n originDest.y -= originSrc.y;\n originSrc.y = 0;\n }\n\n const { pixelWidth, pixelHeight } = sourceRenderTarget;\n\n size.width = Math.min(size.width, pixelWidth - originSrc.x);\n size.height = Math.min(size.height, pixelHeight - originSrc.y);\n\n return this.adaptor.copyToTexture(\n sourceRenderTarget,\n destinationTexture,\n originSrc,\n size,\n originDest\n );\n }\n\n /**\n * Copies the depth attachment from one render target to another.\n * Both source and destination must have a depthStencilAttachment.\n *\n * **Important Note:** When using the copied depth buffer in a subsequent render pass,\n * you must ensure you do not clear the depth buffer again. If you need to clear the color\n * buffer of the destination render target, use `clear: CLEAR.COLOR` to preserve the copied depth data.\n * @example\n * ```js\n * renderer.renderTarget.copyDepthTexture(\n * sourceRT, destRT, { x: 0, y: 0 }, { width: 200, height: 200 }, { x: 0, y: 0 }\n * );\n *\n * // In the subsequent render pass, clear ONLY the color buffer!\n * renderer.render({\n * target: destRT,\n * container: myMesh,\n * clear: CLEAR.COLOR, // Preserves the copied depth\n * clearColor: [0, 0, 0, 1]\n * });\n * ```\n * @param source - the render surface (render target, depth texture, or canvas) to copy depth from\n * @param destination - the depth/stencil texture to copy depth to\n * @param {object} originSrc - the origin of the copy\n * @param {number} originSrc.x - the x origin of the copy\n * @param {number} originSrc.y - the y origin of the copy\n * @param {object} size - the size of the copy\n * @param {number} size.width - the width of the copy\n * @param {number} size.height - the height of the copy\n * @param {object} originDest - the destination origin (top left to paste from!)\n * @param {number} originDest.x - the x origin of the paste\n * @param {number} originDest.y - the y origin of the paste\n */\n public copyDepthTexture(\n source: RenderSurface,\n destination: Texture,\n originSrc: { x: number; y: number },\n size: { width: number; height: number },\n originDest: { x: number; y: number; } = { x: 0, y: 0 },\n ): void\n {\n // a depth texture source is copied from its render target's depth attachment\n const sourceRenderTarget = this.getRenderTarget(source);\n\n if (!sourceRenderTarget.depthStencilAttachment)\n {\n warn('[RenderTargetSystem] copyDepthTexture: the source render target has no depth attachment to copy from');\n\n return;\n }\n\n const destSource = destination.source;\n\n if (!destSource.format.includes('depth') && !destSource.format.includes('stencil'))\n {\n warn('[RenderTargetSystem] copyDepthTexture: the destination texture must have a depth/stencil format '\n + `(got '${destSource.format}')`);\n\n return;\n }\n\n // clamp into locals — callers often reuse their rect objects across frames,\n // so the arguments must never be mutated\n let srcX = originSrc.x;\n let srcY = originSrc.y;\n let destX = originDest.x;\n let destY = originDest.y;\n let width = size.width;\n let height = size.height;\n\n // fit to the source bounds\n if (srcX < 0)\n {\n width += srcX;\n destX -= srcX;\n srcX = 0;\n }\n\n if (srcY < 0)\n {\n height += srcY;\n destY -= srcY;\n srcY = 0;\n }\n\n width = Math.min(width, sourceRenderTarget.pixelWidth - srcX);\n height = Math.min(height, sourceRenderTarget.pixelHeight - srcY);\n\n // fit to the destination bounds too — WebGPU validates the copy against them\n // (GL silently clips), and an oversized copy would discard the whole frame\n width = Math.min(width, destSource.pixelWidth - destX);\n height = Math.min(height, destSource.pixelHeight - destY);\n\n if (width <= 0 || height <= 0) return;\n\n this.adaptor.copyDepthTexture(\n sourceRenderTarget, destination,\n { x: srcX, y: srcY },\n { width, height },\n { x: destX, y: destY },\n );\n }\n\n /**\n * ensures that we have a depth stencil buffer available to render to\n * This is used by the mask system to make sure we have a stencil buffer.\n */\n public ensureDepthStencil()\n {\n if (!this.renderTarget.stencil)\n {\n if (this.renderTarget.depthStencilTexture)\n {\n // an explicit depth-only texture (e.g. 'depth24plus') cannot gain a stencil aspect\n warn('[RenderTargetSystem] a stencil mask is being used, but the render target\\'s '\n + `depthStencilTexture format '${this.renderTarget.depthStencilTexture.format}' has no `\n + 'stencil aspect, so masking cannot work here. Use a \\'depth24plus-stencil8\\' texture instead.');\n\n return;\n }\n\n this.renderTarget._depth = true;\n this.renderTarget._stencil = true;\n\n this.adaptor.startRenderPass(this.renderTarget, false, null, this.viewport, 0, this.layer);\n }\n }\n\n /** nukes the render target system */\n public destroy()\n {\n (this._renderer as null) = null;\n\n this._renderSurfaceToRenderTargetHash.forEach((renderTarget, key) =>\n {\n if (renderTarget !== key)\n {\n this._releaseRenderTarget(key as TextureSource, renderTarget);\n }\n else\n {\n // a caller-owned target outlives the system: stop listening, leave it intact\n renderTarget.off('destroy', this._onRenderTargetDestroy, this);\n }\n });\n\n this._renderSurfaceToRenderTargetHash.clear();\n\n // free the backend targets built for caller-owned surfaces, which the loop above leaves intact\n for (const gpuRenderTarget of Object.values(this._gpuRenderTargetHash))\n {\n if (gpuRenderTarget) this.adaptor.destroyGpuRenderTarget(gpuRenderTarget);\n }\n\n this._gpuRenderTargetHash = Object.create(null);\n }\n\n private _initRenderTarget(renderSurface: RenderSurface): RenderTarget\n {\n let renderTarget: RenderTarget = null;\n\n if (CanvasSource.test(renderSurface))\n {\n renderSurface = getCanvasTexture(renderSurface as ICanvas).source;\n }\n\n if (renderSurface instanceof RenderTarget)\n {\n renderTarget = renderSurface;\n\n renderSurface.once('destroy', this._onRenderTargetDestroy, this);\n }\n else if (renderSurface instanceof TextureSource)\n {\n // a depth/stencil-format source is a depth attachment, any other format is a color one\n const format = renderSurface.format;\n const isDepthStencil = format.includes('depth') || format.includes('stencil');\n\n renderTarget = isDepthStencil\n ? new RenderTarget({ colorTextures: 0, depthStencilTexture: renderSurface })\n : new RenderTarget({ colorTextures: [renderSurface] });\n\n if (renderSurface.source instanceof CanvasSource)\n {\n renderTarget.isRoot = true;\n }\n\n renderSurface.once('destroy', this._onRenderSurfaceDestroy, this);\n }\n\n this._renderSurfaceToRenderTargetHash.set(renderSurface, renderTarget);\n\n return renderTarget;\n }\n\n private _onRenderSurfaceDestroy(renderSurface: TextureSource): void\n {\n const renderTarget = this._renderSurfaceToRenderTargetHash.get(renderSurface);\n\n if (renderTarget) this._releaseRenderTarget(renderSurface, renderTarget);\n }\n\n /**\n * A caller-owned render target is tearing itself down. It releases its own attachments,\n * so only the system's references to it and the backend objects built for it go here.\n * @param renderTarget - the render target being destroyed\n */\n private _onRenderTargetDestroy(renderTarget: RenderTarget): void\n {\n this._renderSurfaceToRenderTargetHash.delete(renderTarget);\n this._releaseGpuRenderTarget(renderTarget);\n }\n\n /**\n * Tears down a render target that wraps a texture source, removing every reference the\n * system holds to it so neither the system's own teardown nor the source's `destroy`\n * event can destroy it a second time.\n * @param renderSurface - the texture source the render target wraps\n * @param renderTarget - the render target to release\n */\n private _releaseRenderTarget(renderSurface: TextureSource, renderTarget: RenderTarget): void\n {\n renderTarget.destroy();\n this._renderSurfaceToRenderTargetHash.delete(renderSurface);\n renderSurface.off('destroy', this._onRenderSurfaceDestroy, this);\n this._releaseGpuRenderTarget(renderTarget);\n }\n\n /**\n * Frees the backend objects (framebuffers, renderbuffers, MSAA textures) cached for a render target.\n * @param renderTarget - the render target whose backend counterpart is no longer needed\n */\n private _releaseGpuRenderTarget(renderTarget: RenderTarget): void\n {\n const gpuRenderTarget = this._gpuRenderTargetHash[renderTarget.uid];\n\n if (gpuRenderTarget)\n {\n this._gpuRenderTargetHash[renderTarget.uid] = null;\n this.adaptor.destroyGpuRenderTarget(gpuRenderTarget);\n }\n }\n\n public getGpuRenderTarget(renderTarget: RenderTarget)\n {\n return this._gpuRenderTargetHash[renderTarget.uid]\n || (this._gpuRenderTargetHash[renderTarget.uid] = this.adaptor.initGpuRenderTarget(renderTarget));\n }\n\n public resetState(): void\n {\n this.renderTarget = null;\n this._bindState.target = null;\n }\n}\n","import { CustomRenderPipe } from '../../../../scene/container/CustomRenderPipe';\nimport { RenderGroupPipe } from '../../../../scene/container/RenderGroupPipe';\nimport { RenderGroupSystem } from '../../../../scene/container/RenderGroupSystem';\nimport { SpritePipe } from '../../../../scene/sprite/SpritePipe';\nimport { RendererInitHook } from '../../../../utils/global/globalHooks';\nimport { BatcherPipe } from '../../../batcher/shared/BatcherPipe';\nimport { AlphaMaskPipe } from '../../../mask/alpha/AlphaMaskPipe';\nimport { ColorMaskPipe } from '../../../mask/color/ColorMaskPipe';\nimport { StencilMaskPipe } from '../../../mask/stencil/StencilMaskPipe';\nimport { BackgroundSystem } from '../background/BackgroundSystem';\nimport { BlendModePipe } from '../blendModes/BlendModePipe';\nimport { ExtractSystem } from '../extract/ExtractSystem';\nimport { GenerateTextureSystem } from '../extract/GenerateTextureSystem';\nimport { GCSystem } from '../GCSystem';\nimport { GlobalUniformSystem } from '../renderTarget/GlobalUniformSystem';\nimport { SchedulerSystem } from '../SchedulerSystem';\nimport { HelloSystem } from '../startup/HelloSystem';\nimport { RenderableGCSystem } from '../texture/RenderableGCSystem';\nimport { TextureGCSystem } from '../texture/TextureGCSystem';\nimport { ViewSystem } from '../view/ViewSystem';\n\nimport type { ExtractRendererOptions } from './utils/typeUtils';\n\n/**\n * Shared systems for the renderer.\n * @category rendering\n * @internal\n */\nexport const SharedSystems = [\n BackgroundSystem,\n GlobalUniformSystem,\n HelloSystem,\n ViewSystem,\n RenderGroupSystem,\n GCSystem,\n TextureGCSystem,\n GenerateTextureSystem,\n ExtractSystem,\n RendererInitHook,\n RenderableGCSystem,\n SchedulerSystem,\n];\n\n/**\n * Shared render pipes for the renderer.\n * @category rendering\n * @internal\n */\nexport const SharedRenderPipes = [\n BlendModePipe,\n BatcherPipe,\n SpritePipe,\n RenderGroupPipe,\n AlphaMaskPipe,\n StencilMaskPipe,\n ColorMaskPipe,\n CustomRenderPipe\n];\n\n/**\n * Options for the shared systems of a renderer.\n * @category rendering\n * @advanced\n */\nexport interface SharedRendererOptions extends ExtractRendererOptions<typeof SharedSystems>, PixiMixins.RendererOptions\n{\n /**\n * Whether to stop PixiJS from dynamically importing default extensions for the renderer.\n * It is false by default, and means PixiJS will load all the default extensions, based\n * on the environment e.g browser/webworker.\n * If you set this to true, then you will need to manually import the systems and extensions you need.\n * Renderer loader extensions (`WebGLLoader`, `WebGPULoader`, `CanvasLoader`) are skipped too.\n *\n * e.g.\n * ```js\n * import 'accessibility';\n * import 'app';\n * import 'events';\n * import 'spritesheet';\n * import 'graphics';\n * import 'mesh';\n * import 'text';\n * import 'text-bitmap';\n * import 'text-html';\n * import { autoDetectRenderer } from 'pixi.js';\n *\n * const renderer = await autoDetectRenderer({\n * width: 800,\n * height: 600,\n * skipExtensionImports: true,\n * });\n * ```\n * @default false\n */\n skipExtensionImports?: boolean;\n /**\n * @default true\n * @deprecated since 8.1.6\n * @see `skipExtensionImports`\n */\n manageImports?: boolean;\n}\n","import type { InstructionPipe } from '../../../rendering/renderers/shared/instructions/RenderPipe';\nimport type { RenderPipes } from '../../../rendering/renderers/types';\nimport type { RenderGroup } from '../RenderGroup';\n\n/**\n * @param renderGroup\n * @param renderer\n * @internal\n */\nexport function executeInstructions(renderGroup: RenderGroup, renderer: RenderPipes)\n{\n const instructionSet = renderGroup.instructionSet;\n const instructions = instructionSet.instructions;\n\n for (let i = 0; i < instructionSet.instructionSize; i++)\n {\n const instruction = instructions[i];\n\n (renderer[instruction.renderPipeId as keyof RenderPipes] as InstructionPipe<any>).execute(instruction);\n }\n}\n","import { ExtensionType } from '../../extensions/Extensions';\n\nimport type { InstructionSet } from '../../rendering/renderers/shared/instructions/InstructionSet';\nimport type { InstructionPipe, RenderPipe } from '../../rendering/renderers/shared/instructions/RenderPipe';\nimport type { Renderer } from '../../rendering/renderers/types';\nimport type { RenderContainer } from './RenderContainer';\n\n/**\n * The CustomRenderPipe is a render pipe that allows for custom rendering logic for your renderable objects.\n * @example\n * import { RenderContainer } from 'pixi.js';\n *\n * const renderContainer = new RenderContainer(\n * (renderer) => {\n * renderer.clear({\n * clearColor: 'green', // clear the screen to green when rendering this item\n * });\n * })\n * @category rendering\n * @internal\n */\nexport class CustomRenderPipe implements InstructionPipe<RenderContainer>, RenderPipe<RenderContainer>\n{\n public static extension = {\n type: [\n ExtensionType.WebGLPipes,\n ExtensionType.WebGPUPipes,\n ExtensionType.CanvasPipes,\n ],\n name: 'customRender',\n } as const;\n\n private _renderer: Renderer;\n\n constructor(renderer: Renderer)\n {\n this._renderer = renderer;\n }\n\n public updateRenderable() { /** empty */ }\n public destroyRenderable() { /** empty */ }\n public validateRenderable() { return false; }\n\n public addRenderable(container: RenderContainer, instructionSet: InstructionSet): void\n {\n this._renderer.renderPipes.batch.break(instructionSet);\n\n instructionSet.add(container);\n }\n\n public execute(container: RenderContainer)\n {\n if (!container.isRenderable) return;\n\n container.render(this._renderer);\n }\n\n public destroy(): void\n {\n this._renderer = null;\n }\n}\n","import { ExtensionType } from '../../extensions/Extensions';\nimport { Matrix } from '../../maths/matrix/Matrix';\nimport { type Renderer } from '../../rendering/renderers/types';\nimport { BigPool } from '../../utils/pool/PoolGroup';\nimport { BatchableSprite } from '../sprite/BatchableSprite';\nimport { executeInstructions } from './utils/executeInstructions';\n\nimport type { InstructionSet } from '../../rendering/renderers/shared/instructions/InstructionSet';\nimport type { InstructionPipe } from '../../rendering/renderers/shared/instructions/RenderPipe';\nimport type { RenderGroup } from './RenderGroup';\n\n/**\n * The RenderGroupPipe is a render pipe for rendering RenderGroups.\n * @internal\n */\nexport class RenderGroupPipe implements InstructionPipe<RenderGroup>\n{\n public static extension = {\n type: [\n ExtensionType.WebGLPipes,\n ExtensionType.WebGPUPipes,\n ExtensionType.CanvasPipes,\n ],\n name: 'renderGroup',\n } as const;\n\n private _renderer: Renderer;\n\n constructor(renderer: Renderer)\n {\n this._renderer = renderer;\n }\n\n public addRenderGroup(renderGroup: RenderGroup, instructionSet: InstructionSet): void\n {\n if (renderGroup.isCachedAsTexture)\n {\n this._addRenderableCacheAsTexture(renderGroup, instructionSet);\n }\n else\n {\n this._addRenderableDirect(renderGroup, instructionSet);\n }\n }\n\n public execute(renderGroup: RenderGroup)\n {\n if (!renderGroup.isRenderable) return;\n\n if (renderGroup.isCachedAsTexture)\n {\n this._executeCacheAsTexture(renderGroup);\n }\n else\n {\n this._executeDirect(renderGroup);\n }\n }\n\n public destroy(): void\n {\n this._renderer = null;\n }\n\n private _addRenderableDirect(renderGroup: RenderGroup, instructionSet: InstructionSet): void\n {\n this._renderer.renderPipes.batch.break(instructionSet);\n\n if (renderGroup._batchableRenderGroup)\n {\n BigPool.return(renderGroup._batchableRenderGroup);\n renderGroup._batchableRenderGroup = null;\n }\n\n instructionSet.add(renderGroup);\n }\n\n private _addRenderableCacheAsTexture(renderGroup: RenderGroup, instructionSet: InstructionSet): void\n {\n const batchableRenderGroup = renderGroup._batchableRenderGroup ??= BigPool.get(BatchableSprite);\n\n batchableRenderGroup.renderable = renderGroup.root;\n batchableRenderGroup.transform = renderGroup.root.relativeGroupTransform;\n batchableRenderGroup.texture = renderGroup.texture;\n batchableRenderGroup.bounds = renderGroup._textureBounds;\n\n instructionSet.add(renderGroup);\n\n this._renderer.renderPipes.blendMode.pushBlendMode(renderGroup, renderGroup.root.groupBlendMode, instructionSet);\n this._renderer.renderPipes.batch.addToBatch(batchableRenderGroup, instructionSet);\n this._renderer.renderPipes.blendMode.popBlendMode(instructionSet);\n }\n\n private _executeCacheAsTexture(renderGroup: RenderGroup): void\n {\n if (renderGroup.textureNeedsUpdate)\n {\n renderGroup.textureNeedsUpdate = false;\n\n const worldTransformMatrix = new Matrix().translate(\n -renderGroup._textureBounds.x,\n -renderGroup._textureBounds.y\n );\n\n this._renderer.renderTarget.push({\n target: renderGroup.texture,\n clear: true,\n frame: renderGroup.texture.frame,\n });\n\n this._renderer.globalUniforms.push({\n worldTransformMatrix,\n worldColor: 0xFFFFFFFF,\n offset: { x: 0, y: 0 },\n });\n\n executeInstructions(renderGroup, this._renderer.renderPipes);\n\n this._renderer.renderTarget.finishRenderPass();\n\n this._renderer.renderTarget.pop();\n this._renderer.globalUniforms.pop();\n }\n\n renderGroup._batchableRenderGroup._batcher.updateElement(renderGroup._batchableRenderGroup);\n renderGroup._batchableRenderGroup._batcher.geometry.buffers[0].update();\n }\n\n private _executeDirect(renderGroup: RenderGroup): void\n {\n this._renderer.globalUniforms.push({\n worldTransformMatrix: renderGroup.inverseParentTextureTransform,\n worldColor: renderGroup.worldColorAlpha,\n });\n\n executeInstructions(renderGroup, this._renderer.renderPipes);\n\n this._renderer.globalUniforms.pop();\n }\n}\n","/**\n * nulls all slots in an array from a certain index.\n * assume that when a null item is hit, the rest are also null.\n * Which will be the case for where this is used!\n * @param list - the array to clean\n * @param index - the index to start from\n * @category utils\n * @internal\n */\nexport function clearList(list: Array<unknown>, index?: number)\n{\n index ||= 0;\n\n for (let j = index; j < list.length; j++)\n {\n if (list[j])\n {\n list[j] = null;\n }\n else\n {\n break;\n }\n }\n}\n","import type { RenderPipe } from '../../../rendering/renderers/shared/instructions/RenderPipe';\nimport type { RenderPipes } from '../../../rendering/renderers/types';\nimport type { RenderGroup } from '../RenderGroup';\n\n/**\n * @param renderGroup\n * @param renderPipes\n * @internal\n */\nexport function validateRenderables(renderGroup: RenderGroup, renderPipes: RenderPipes): boolean\n{\n const { list } = renderGroup.childrenRenderablesToUpdate;\n\n let rebuildRequired = false;\n\n for (let i = 0; i < renderGroup.childrenRenderablesToUpdate.index; i++)\n {\n const container = list[i];\n\n // note to self: there is no need to check if container.parentRenderGroup || !container.renderGroup\n // exist here, as this function is only called if the structure did NOT change\n // which means they have to be valid if this function is called\n\n const renderable = container;\n const pipe = renderPipes[renderable.renderPipeId as keyof RenderPipes] as RenderPipe<any>;\n\n rebuildRequired = pipe.validateRenderable(container);\n\n if (rebuildRequired)\n {\n break;\n }\n }\n\n renderGroup.structureDidChange = rebuildRequired;\n\n return rebuildRequired;\n}\n","import { Container, UPDATE_BLEND, UPDATE_COLOR, UPDATE_VISIBLE } from '../Container';\nimport { clearList } from './clearList';\nimport { multiplyColors } from './multiplyColors';\n\nimport type { ViewContainer } from '../../view/ViewContainer';\nimport type { RenderGroup } from '../RenderGroup';\n\nconst tempContainer = new Container();\nconst UPDATE_BLEND_COLOR_VISIBLE = UPDATE_VISIBLE | UPDATE_COLOR | UPDATE_BLEND;\n\n/**\n * @param renderGroup\n * @param updateChildRenderGroups\n * @internal\n */\nexport function updateRenderGroupTransforms(renderGroup: RenderGroup, updateChildRenderGroups = false)\n{\n updateRenderGroupTransform(renderGroup);\n\n const childrenToUpdate = renderGroup.childrenToUpdate;\n\n const updateTick = renderGroup.updateTick++;\n\n for (const j in childrenToUpdate)\n {\n const renderGroupDepth = Number(j);\n\n const childrenAtDepth = childrenToUpdate[j];\n\n const list = childrenAtDepth.list;\n const index = childrenAtDepth.index;\n\n for (let i = 0; i < index; i++)\n {\n const child = list[i];\n\n // check that these things match our layer and depth - if the renderGroup does not match,\n // the child has been re-parented into another rendergroup since it asked to be updated so we can ignore it here\n // secondly if the relativeRenderGroupDepth has changed, then the it means it will have been nested at a\n // different different level in the render group - so we can wait for the update that does in fact match\n if (child.parentRenderGroup === renderGroup && child.relativeRenderGroupDepth === renderGroupDepth)\n {\n updateTransformAndChildren(child, updateTick, 0);\n }\n }\n\n clearList(list, index);\n\n childrenAtDepth.index = 0;\n }\n\n if (updateChildRenderGroups)\n {\n for (let i = 0; i < renderGroup.renderGroupChildren.length; i++)\n {\n updateRenderGroupTransforms(renderGroup.renderGroupChildren[i], updateChildRenderGroups);\n }\n }\n}\n\n/**\n * @param renderGroup\n * @internal\n */\nexport function updateRenderGroupTransform(renderGroup: RenderGroup)\n{\n const root = renderGroup.root;\n\n let worldAlpha;\n\n if (renderGroup.renderGroupParent)\n {\n const renderGroupParent = renderGroup.renderGroupParent;\n\n renderGroup.worldTransform.appendFrom(\n root.relativeGroupTransform,\n renderGroupParent.worldTransform,\n );\n\n renderGroup.worldColor = multiplyColors(\n root.groupColor,\n renderGroupParent.worldColor,\n );\n\n worldAlpha = root.groupAlpha * renderGroupParent.worldAlpha;\n }\n else\n {\n renderGroup.worldTransform.copyFrom(root.localTransform);\n renderGroup.worldColor = root.localColor;\n worldAlpha = root.localAlpha;\n }\n\n // eslint-disable-next-line no-nested-ternary\n worldAlpha = worldAlpha < 0 ? 0 : (worldAlpha > 1 ? 1 : worldAlpha);\n renderGroup.worldAlpha = worldAlpha;\n\n renderGroup.worldColorAlpha = renderGroup.worldColor\n + (((worldAlpha * 255) | 0) << 24);\n}\n\n/**\n * @param container\n * @param updateTick\n * @param updateFlags\n * @internal\n */\nexport function updateTransformAndChildren(container: Container, updateTick: number, updateFlags: number)\n{\n if (updateTick === container.updateTick) return;\n container.updateTick = updateTick;\n\n container.didChange = false;\n\n const localTransform = container.localTransform;\n\n container.updateLocalTransform();\n\n const parent = container.parent;\n\n if ((parent && !parent.renderGroup))\n {\n updateFlags |= container._updateFlags;\n\n container.relativeGroupTransform.appendFrom(\n localTransform,\n parent.relativeGroupTransform,\n );\n\n if (updateFlags & UPDATE_BLEND_COLOR_VISIBLE)\n {\n updateColorBlendVisibility(container, parent, updateFlags);\n }\n }\n else\n {\n updateFlags = container._updateFlags;\n\n container.relativeGroupTransform.copyFrom(localTransform);\n\n if (updateFlags & UPDATE_BLEND_COLOR_VISIBLE)\n {\n updateColorBlendVisibility(container, tempContainer, updateFlags);\n }\n }\n\n // don't update children if its a layer..\n if (!container.renderGroup)\n {\n const children = container.children;\n const length = children.length;\n\n for (let i = 0; i < length; i++)\n {\n updateTransformAndChildren(children[i], updateTick, updateFlags);\n }\n\n const renderGroup = container.parentRenderGroup;\n const renderable = container as ViewContainer;\n\n if (renderable.renderPipeId && !renderGroup.structureDidChange)\n {\n renderGroup.updateRenderable(renderable);\n }\n }\n}\n\nfunction updateColorBlendVisibility(\n container: Container,\n parent: Container,\n updateFlags: number,\n): void\n{\n if (updateFlags & UPDATE_COLOR)\n {\n container.groupColor = multiplyColors(\n container.localColor,\n parent.groupColor\n );\n\n let groupAlpha = container.localAlpha * parent.groupAlpha;\n\n // eslint-disable-next-line no-nested-ternary\n groupAlpha = groupAlpha < 0 ? 0 : (groupAlpha > 1 ? 1 : groupAlpha);\n\n container.groupAlpha = groupAlpha;\n container.groupColorAlpha = container.groupColor + (((groupAlpha * 255) | 0) << 24);\n }\n\n if (updateFlags & UPDATE_BLEND)\n {\n container.groupBlendMode = container.localBlendMode === 'inherit' ? parent.groupBlendMode : container.localBlendMode;\n }\n\n if (updateFlags & UPDATE_VISIBLE)\n {\n container.globalDisplayStatus = container.localDisplayStatus & parent.globalDisplayStatus;\n }\n\n container._updateFlags = 0;\n}\n\n","import { ExtensionType } from '../../extensions/Extensions';\nimport { Matrix } from '../../maths/matrix/Matrix';\nimport { TexturePool } from '../../rendering/renderers/shared/texture/TexturePool';\nimport { Bounds } from './bounds/Bounds';\nimport { clearList } from './utils/clearList';\nimport { executeInstructions } from './utils/executeInstructions';\nimport { updateRenderGroupTransforms } from './utils/updateRenderGroupTransforms';\nimport { validateRenderables } from './utils/validateRenderables';\n\nimport type { WebGPURenderer } from '../../rendering/renderers/gpu/WebGPURenderer';\nimport type { System } from '../../rendering/renderers/shared/system/System';\nimport type { Renderer, RenderPipes } from '../../rendering/renderers/types';\nimport type { ViewContainer } from '../view/ViewContainer';\nimport type { Container } from './Container';\nimport type { RenderGroup } from './RenderGroup';\n\nconst tempMatrix = new Matrix();\n\n/**\n * The view system manages the main canvas that is attached to the DOM.\n * This main role is to deal with how the holding the view reference and dealing with how it is resized.\n * @category rendering\n * @internal\n */\nexport class RenderGroupSystem implements System\n{\n /** @ignore */\n public static extension = {\n type: [\n ExtensionType.WebGLSystem,\n ExtensionType.WebGPUSystem,\n ExtensionType.CanvasSystem,\n ],\n name: 'renderGroup',\n } as const;\n\n private readonly _renderer: Renderer;\n\n constructor(renderer: Renderer)\n {\n this._renderer = renderer;\n }\n\n protected render({ container, transform }: {container: Container, transform: Matrix}): void\n {\n // we need to save the parent and renderGroupParent, so we can restore them later\n const parent = container.parent;\n const renderGroupParent = container.renderGroup.renderGroupParent;\n\n // we set the transforms and parents to null, so we can render the container without any transforms\n container.parent = null;\n container.renderGroup.renderGroupParent = null;\n\n const renderer = this._renderer;\n\n // collect all the renderGroups in the scene and then render them one by one..\n const originalLocalTransform: Matrix = tempMatrix;\n\n if (transform)\n {\n originalLocalTransform.copyFrom(container.renderGroup.localTransform);\n container.renderGroup.localTransform.copyFrom(transform);\n }\n\n // this._assignTop(container.renderGroup, null);\n const renderPipes = (renderer as WebGPURenderer).renderPipes;\n\n this._updateCachedRenderGroups(container.renderGroup, null);\n\n this._updateRenderGroups(container.renderGroup);\n\n renderer.globalUniforms.start({\n worldTransformMatrix: transform ? container.renderGroup.localTransform : container.renderGroup.worldTransform,\n worldColor: container.renderGroup.worldColorAlpha,\n });\n\n executeInstructions(container.renderGroup, renderPipes);\n\n // TODO need to add some events / runners for things like this to hook up to\n if (renderPipes.uniformBatch)\n {\n renderPipes.uniformBatch.renderEnd();\n }\n\n // now return the transforms back to normal..\n if (transform)\n {\n container.renderGroup.localTransform.copyFrom(originalLocalTransform);\n }\n\n container.parent = parent;\n container.renderGroup.renderGroupParent = renderGroupParent;\n }\n\n public destroy()\n {\n (this._renderer as null) = null;\n }\n\n private _updateCachedRenderGroups(renderGroup: RenderGroup, closestCacheAsTexture: RenderGroup | null): void\n {\n renderGroup._parentCacheAsTextureRenderGroup = closestCacheAsTexture;\n\n if (renderGroup.isCachedAsTexture)\n {\n // Early out as nothing further needs to be updated!\n if (!renderGroup.textureNeedsUpdate) return;\n\n closestCacheAsTexture = renderGroup;\n }\n\n // Update the closest cache reference for children if this render group is cached as texture\n for (let i = renderGroup.renderGroupChildren.length - 1; i >= 0; i--)\n {\n this._updateCachedRenderGroups(renderGroup.renderGroupChildren[i], closestCacheAsTexture);\n }\n\n renderGroup.invalidateMatrices();\n\n if (renderGroup.isCachedAsTexture)\n {\n if (renderGroup.textureNeedsUpdate)\n {\n // lets get the texture ready for rendering\n // but the rendering will not happen until the renderGroup is rendered!\n // We also want to know now, what the bounds of the texture will be.\n // as if the texture changes, we need to invalidate the parent render group!\n const bounds = renderGroup.root.getLocalBounds();\n const renderer = this._renderer;\n const resolution = renderGroup.textureOptions.resolution || renderer.view.resolution;\n const antialias = renderGroup.textureOptions.antialias ?? renderer.view.antialias;\n const scaleMode = renderGroup.textureOptions.scaleMode ?? 'linear';\n const lastTexture = renderGroup.texture;\n\n bounds.ceil();\n\n if (renderGroup.texture)\n {\n TexturePool.returnTexture(renderGroup.texture);\n }\n\n const texture = TexturePool.getOptimalTexture({\n width: bounds.width,\n height: bounds.height,\n resolution,\n antialias,\n scaleMode,\n });\n\n renderGroup.texture = texture;\n renderGroup._textureBounds ||= new Bounds();\n renderGroup._textureBounds.copyFrom(bounds);\n\n if (lastTexture !== renderGroup.texture)\n {\n if (renderGroup.renderGroupParent)\n {\n renderGroup.renderGroupParent.structureDidChange = true;\n }\n }\n }\n }\n else if (renderGroup.texture)\n {\n TexturePool.returnTexture(renderGroup.texture);\n renderGroup.texture = null;\n }\n }\n\n private _updateRenderGroups(renderGroup: RenderGroup): void\n {\n const renderer = this._renderer;\n const renderPipes = renderer.renderPipes;\n\n renderGroup.runOnRender(renderer);\n\n renderGroup.instructionSet.renderPipes = renderPipes;\n\n if (!renderGroup.structureDidChange)\n {\n // phase 1 - validate all the renderables\n validateRenderables(renderGroup, renderPipes);\n }\n else\n {\n clearList(renderGroup.childrenRenderablesToUpdate.list, 0);\n }\n\n // phase 2 - update all the transforms\n // including updating the renderables..\n updateRenderGroupTransforms(renderGroup);\n\n if (renderGroup.structureDidChange)\n {\n renderGroup.structureDidChange = false;\n\n // build the renderables\n this._buildInstructions(renderGroup, renderer);\n }\n else\n {\n // update remaining renderables\n this._updateRenderables(renderGroup);\n }\n\n // reset the renderables to update\n renderGroup.childrenRenderablesToUpdate.index = 0;\n\n // upload all the things!\n renderer.renderPipes.batch.upload(renderGroup.instructionSet);\n\n // early out if it's a texture and it hasn't changed!\n if (renderGroup.isCachedAsTexture && !renderGroup.textureNeedsUpdate) return;\n\n for (let i = 0; i < renderGroup.renderGroupChildren.length; i++)\n {\n this._updateRenderGroups(renderGroup.renderGroupChildren[i]);\n }\n }\n\n private _updateRenderables(renderGroup: RenderGroup)\n {\n const { list, index } = renderGroup.childrenRenderablesToUpdate;\n\n for (let i = 0; i < index; i++)\n {\n const container = list[i];\n\n if (container.didViewUpdate)\n {\n renderGroup.updateRenderable(container as ViewContainer);\n }\n }\n\n clearList(list, index);\n }\n\n /**\n * @param renderGroup\n * @param renderPipes\n * @deprecated since 8.3.0\n */\n private _buildInstructions(renderGroup: RenderGroup, renderPipes: RenderPipes): void;\n private _buildInstructions(renderGroup: RenderGroup, renderer: Renderer): void;\n private _buildInstructions(renderGroup: RenderGroup, rendererOrPipes: RenderPipes | Renderer): void\n {\n // rebuild the scene graph based on layers...\n const root = renderGroup.root;\n const instructionSet = renderGroup.instructionSet;\n\n instructionSet.reset();\n\n // deprecate the use of renderPipes by finding the renderer attached to the batch pipe as this is always there\n const renderer = (rendererOrPipes as Renderer).renderPipes\n ? (rendererOrPipes as Renderer)\n : (rendererOrPipes as RenderPipes).batch.renderer;\n const renderPipes = renderer.renderPipes;\n\n // TODO add some events / runners for build start\n renderPipes.batch.buildStart(instructionSet);\n renderPipes.blendMode.buildStart();\n renderPipes.colorMask.buildStart();\n\n if (root.sortableChildren)\n {\n root.sortChildren();\n }\n\n root.collectRenderablesWithEffects(instructionSet, renderer, null);\n\n // TODO add some events / runners for build end\n renderPipes.batch.buildEnd(instructionSet);\n renderPipes.blendMode.buildEnd(instructionSet);\n }\n}\n\n","import { ExtensionType } from '../../extensions/Extensions';\nimport { BatchableSprite } from './BatchableSprite';\n\nimport type { InstructionSet } from '../../rendering/renderers/shared/instructions/InstructionSet';\nimport type { RenderPipe } from '../../rendering/renderers/shared/instructions/RenderPipe';\nimport type { Renderer } from '../../rendering/renderers/types';\nimport type { Sprite } from './Sprite';\n\n/** @internal */\nexport class SpritePipe implements RenderPipe<Sprite>\n{\n /** @ignore */\n public static extension = {\n type: [\n ExtensionType.WebGLPipes,\n ExtensionType.WebGPUPipes,\n ExtensionType.CanvasPipes,\n ],\n name: 'sprite',\n } as const;\n\n private _renderer: Renderer;\n\n constructor(renderer: Renderer)\n {\n this._renderer = renderer;\n }\n\n public addRenderable(sprite: Sprite, instructionSet: InstructionSet)\n {\n const gpuSprite = this._getGpuSprite(sprite);\n\n if (sprite.didViewUpdate) this._updateBatchableSprite(sprite, gpuSprite);\n\n // TODO visibility\n this._renderer.renderPipes.batch.addToBatch(gpuSprite, instructionSet);\n }\n\n public updateRenderable(sprite: Sprite)\n {\n const gpuSprite = this._getGpuSprite(sprite);\n\n if (sprite.didViewUpdate) this._updateBatchableSprite(sprite, gpuSprite);\n\n gpuSprite._batcher.updateElement(gpuSprite);\n }\n\n public validateRenderable(sprite: Sprite): boolean\n {\n const gpuSprite = this._getGpuSprite(sprite);\n\n return !gpuSprite._batcher.checkAndUpdateTexture(\n gpuSprite,\n sprite._texture)\n ;\n }\n\n private _updateBatchableSprite(sprite: Sprite, batchableSprite: BatchableSprite)\n {\n batchableSprite.bounds = sprite.visualBounds;\n batchableSprite.texture = sprite._texture;\n }\n\n private _getGpuSprite(sprite: Sprite): BatchableSprite\n {\n return sprite._gpuData[this._renderer.uid] || this._initGPUSprite(sprite);\n }\n\n private _initGPUSprite(sprite: Sprite): BatchableSprite\n {\n const batchableSprite = new BatchableSprite();\n\n batchableSprite.renderable = sprite;\n\n batchableSprite.transform = sprite.groupTransform;\n batchableSprite.texture = sprite._texture;\n batchableSprite.bounds = sprite.visualBounds;\n batchableSprite.roundPixels = (this._renderer._roundPixels | sprite._roundPixels) as 0 | 1;\n\n sprite._gpuData[this._renderer.uid] = batchableSprite;\n\n return batchableSprite;\n }\n\n public destroy()\n {\n this._renderer = null;\n }\n}\n","import { extensions, ExtensionType } from '../../../extensions/Extensions';\nimport { State } from '../../renderers/shared/state/State';\nimport { DefaultBatcher } from './DefaultBatcher';\n\nimport type { Geometry } from '../../renderers/shared/geometry/Geometry';\nimport type { InstructionSet } from '../../renderers/shared/instructions/InstructionSet';\nimport type { BatchPipe, InstructionPipe } from '../../renderers/shared/instructions/RenderPipe';\nimport type { Shader } from '../../renderers/shared/shader/Shader';\nimport type { Renderer } from '../../renderers/types';\nimport type { Batch, BatchableElement, Batcher, BatcherOptions } from './Batcher';\n\n/** @internal */\nexport interface BatcherAdaptor\n{\n start(batchPipe: BatcherPipe, geometry: Geometry, shader: Shader): void\n init?(batchPipe: BatcherPipe): void;\n execute(batchPipe: BatcherPipe, batch: Batch): void\n contextChange?(): void;\n}\n\n/**\n * A pipe that batches elements into batches and sends them to the renderer.\n *\n * You can install new Batchers using ExtensionType.Batcher. Each render group will\n * have a default batcher and any required ones will be created on demand.\n * @category rendering\n * @advanced\n */\nexport class BatcherPipe implements InstructionPipe<Batch>, BatchPipe\n{\n /** @ignore */\n public static extension = {\n type: [\n ExtensionType.WebGLPipes,\n ExtensionType.WebGPUPipes,\n ExtensionType.CanvasPipes,\n ],\n name: 'batch',\n } as const;\n\n public state: State = State.for2d();\n public renderer: Renderer;\n\n private readonly _batchersByInstructionSet: Record<number, Record<string, Batcher>> = Object.create(null);\n\n private _adaptor: BatcherAdaptor;\n\n /** A record of all active batchers, keyed by their names */\n private _activeBatches: Record<string, Batcher> = Object.create(null);\n\n /** The currently active batcher being used to batch elements */\n private _activeBatch: Batcher;\n\n public static _availableBatchers: Record<string, new (options: BatcherOptions) => Batcher> = Object.create(null);\n\n public static getBatcher(name: string, maxTextures: number): Batcher\n {\n return new this._availableBatchers[name as keyof typeof this._availableBatchers]({ maxTextures });\n }\n\n constructor(renderer: Renderer, adaptor: BatcherAdaptor)\n {\n this.renderer = renderer;\n this._adaptor = adaptor;\n\n this._adaptor.init?.(this);\n }\n\n public buildStart(instructionSet: InstructionSet)\n {\n let batchers = this._batchersByInstructionSet[instructionSet.uid];\n\n if (!batchers)\n {\n batchers = this._batchersByInstructionSet[instructionSet.uid] = Object.create(null);\n batchers.default ||= new DefaultBatcher({\n maxTextures: this.renderer.limits.maxBatchableTextures,\n });\n }\n\n this._activeBatches = batchers;\n\n this._activeBatch = this._activeBatches.default;\n\n for (const i in this._activeBatches)\n {\n this._activeBatches[i].begin();\n }\n }\n\n public addToBatch(batchableObject: BatchableElement, instructionSet: InstructionSet)\n {\n if (this._activeBatch.name !== batchableObject.batcherName)\n {\n this._activeBatch.break(instructionSet);\n\n let batch = this._activeBatches[batchableObject.batcherName];\n\n if (!batch)\n {\n batch = this._activeBatches[batchableObject.batcherName]\n = BatcherPipe.getBatcher(batchableObject.batcherName, this.renderer.limits.maxBatchableTextures);\n batch.begin();\n }\n\n this._activeBatch = batch;\n }\n\n this._activeBatch.add(batchableObject);\n }\n\n public break(instructionSet: InstructionSet)\n {\n this._activeBatch.break(instructionSet);\n }\n\n public buildEnd(instructionSet: InstructionSet)\n {\n this._activeBatch.break(instructionSet);\n\n const batches = this._activeBatches;\n\n for (const i in batches)\n {\n const batch = batches[i as keyof typeof batches];\n const geometry = batch.geometry;\n\n geometry.indexBuffer.setDataWithSize(batch.indexBuffer, batch.indexSize, true);\n\n geometry.buffers[0].setDataWithSize(batch.attributeBuffer.float32View, batch.attributeSize, false);\n }\n }\n\n public upload(instructionSet: InstructionSet)\n {\n const batchers = this._batchersByInstructionSet[instructionSet.uid];\n\n for (const i in batchers)\n {\n const batcher = batchers[i as keyof typeof batchers];\n const geometry = batcher.geometry;\n\n if (batcher.dirty)\n {\n batcher.dirty = false;\n\n geometry.buffers[0].update(batcher.attributeSize * 4);\n }\n }\n }\n\n public execute(batch: Batch)\n {\n if (batch.action === 'startBatch')\n {\n const batcher = batch.batcher;\n const geometry = batcher.geometry;\n const shader = batcher.shader;\n\n this._adaptor.start(this, geometry, shader);\n }\n\n this._adaptor.execute(this, batch);\n }\n\n /**\n * Releases all batchers cached for the given InstructionSet. Called from\n * `InstructionSet.destroy()` so that batchers (and their GPU geometry / attribute\n * buffers / referenced textures) do not leak when the owning RenderGroup is destroyed.\n * @param instructionSet - the instruction set being destroyed\n */\n public destroyInstructionSet(instructionSet: InstructionSet)\n {\n const batchers = this._batchersByInstructionSet[instructionSet.uid];\n\n if (!batchers) return;\n\n for (const i in batchers)\n {\n batchers[i].destroy();\n }\n\n delete this._batchersByInstructionSet[instructionSet.uid];\n\n if (this._activeBatches === batchers)\n {\n this._activeBatches = Object.create(null);\n this._activeBatch = null;\n }\n }\n\n public destroy()\n {\n this.state = null;\n this.renderer = null;\n\n this._adaptor = null;\n\n for (const i in this._activeBatches)\n {\n this._activeBatches[i].destroy();\n }\n\n this._activeBatches = null;\n }\n}\n\nextensions.handleByMap(ExtensionType.Batcher, BatcherPipe._availableBatchers);\n\nextensions.add(DefaultBatcher);\n","import { ExtensionType } from '../../../extensions/Extensions';\nimport { FilterEffect } from '../../../filters/FilterEffect';\nimport { MaskFilter } from '../../../filters/mask/MaskFilter';\nimport { Bounds } from '../../../scene/container/bounds/Bounds';\nimport { getGlobalBounds } from '../../../scene/container/bounds/getGlobalBounds';\nimport { Sprite } from '../../../scene/sprite/Sprite';\nimport { BigPool } from '../../../utils/pool/PoolGroup';\nimport { Texture } from '../../renderers/shared/texture/Texture';\nimport { TexturePool } from '../../renderers/shared/texture/TexturePool';\nimport { RendererType } from '../../renderers/types';\n\nimport type { MaskChannel } from '../../../filters/mask/MaskFilter';\nimport type { Container } from '../../../scene/container/Container';\nimport type { Effect } from '../../../scene/container/Effect';\nimport type { PoolItem } from '../../../utils/pool/Pool';\nimport type { Instruction } from '../../renderers/shared/instructions/Instruction';\nimport type { InstructionSet } from '../../renderers/shared/instructions/InstructionSet';\nimport type { InstructionPipe } from '../../renderers/shared/instructions/RenderPipe';\nimport type { RenderTarget } from '../../renderers/shared/renderTarget/RenderTarget';\nimport type { Renderer } from '../../renderers/types';\nimport type { AlphaMask } from './AlphaMask';\n\ntype MaskMode = 'pushMaskBegin' | 'pushMaskEnd' | 'popMaskBegin' | 'popMaskEnd';\n\nconst tempBounds = new Bounds();\n\n/** @internal */\nclass AlphaMaskEffect extends FilterEffect implements PoolItem\n{\n /** the sprite the pooled filter is parked on between uses */\n private readonly _placeholderSprite = new Sprite(Texture.EMPTY);\n\n constructor()\n {\n super();\n\n this.filters = [new MaskFilter({\n sprite: this._placeholderSprite,\n inverse: false,\n resolution: 'inherit',\n antialias: 'inherit'\n })];\n }\n\n get sprite(): Sprite\n {\n return (this.filters[0] as MaskFilter).sprite;\n }\n\n set sprite(value: Sprite)\n {\n (this.filters[0] as MaskFilter).setSprite(value);\n }\n\n get inverse(): boolean\n {\n return (this.filters[0] as MaskFilter).inverse;\n }\n\n set inverse(value: boolean)\n {\n (this.filters[0] as MaskFilter).inverse = value;\n }\n\n get channel(): MaskChannel\n {\n return (this.filters[0] as MaskFilter).channel;\n }\n\n set channel(value: MaskChannel)\n {\n (this.filters[0] as MaskFilter).channel = value;\n }\n\n /**\n * Called by {@link BigPool} when the pipe returns the effect: parks the filter\n * on the empty placeholder so a pooled effect keeps no bindings to the last\n * mask it applied. Without this, the pooled filter pins the mask sprite and\n * its texture for as long as the effect sits in the pool, and destroying that\n * texture's source hits a bind group subscription the user cannot release.\n */\n public reset(): void\n {\n this._placeholderSprite.texture = Texture.EMPTY;\n this.sprite = this._placeholderSprite;\n }\n\n public init: () => void;\n}\n\n/** @internal */\nexport interface AlphaMaskInstruction extends Instruction\n{\n renderPipeId: 'alphaMask',\n action: MaskMode,\n mask: AlphaMask,\n inverse: boolean;\n maskedContainer: Container,\n renderMask: boolean,\n}\n\n/** @internal */\nexport interface AlphaMaskData\n{\n filterEffect: AlphaMaskEffect,\n maskedContainer: Container,\n previousRenderTarget?: RenderTarget,\n filterTexture?: Texture,\n}\n\n/** @internal */\nexport class AlphaMaskPipe implements InstructionPipe<AlphaMaskInstruction>\n{\n /** @ignore */\n public static extension = {\n type: [\n ExtensionType.WebGLPipes,\n ExtensionType.WebGPUPipes,\n ExtensionType.CanvasPipes,\n ],\n name: 'alphaMask',\n } as const;\n\n private _renderer: Renderer;\n private _activeMaskStage: AlphaMaskData[] = [];\n private _usedEffects: AlphaMaskEffect[] = [];\n\n constructor(renderer: Renderer)\n {\n this._renderer = renderer;\n\n renderer.runners.postrender.add(this);\n }\n\n public push(mask: Effect, maskedContainer: Container, instructionSet: InstructionSet): void\n {\n const renderer = this._renderer;\n\n renderer.renderPipes.batch.break(instructionSet);\n\n instructionSet.add({\n renderPipeId: 'alphaMask',\n action: 'pushMaskBegin',\n mask,\n inverse: maskedContainer._maskOptions.inverse,\n canBundle: false,\n maskedContainer\n } as AlphaMaskInstruction);\n\n (mask as AlphaMask).inverse = maskedContainer._maskOptions.inverse;\n (mask as AlphaMask).channel = maskedContainer._maskOptions.channel ?? 'red';\n\n if ((mask as AlphaMask).renderMaskToTexture)\n {\n const maskContainer = (mask as AlphaMask).mask;\n\n maskContainer.includeInBuild = true;\n\n maskContainer.collectRenderables(\n instructionSet,\n renderer,\n null\n );\n\n maskContainer.includeInBuild = false;\n }\n\n renderer.renderPipes.batch.break(instructionSet);\n\n instructionSet.add({\n renderPipeId: 'alphaMask',\n action: 'pushMaskEnd',\n mask,\n maskedContainer,\n inverse: maskedContainer._maskOptions.inverse,\n canBundle: false,\n } as AlphaMaskInstruction);\n }\n\n public pop(mask: Effect, _maskedContainer: Container, instructionSet: InstructionSet): void\n {\n const renderer = this._renderer;\n\n renderer.renderPipes.batch.break(instructionSet);\n\n instructionSet.add({\n renderPipeId: 'alphaMask',\n action: 'popMaskEnd',\n mask,\n inverse: _maskedContainer._maskOptions.inverse,\n canBundle: false,\n } as AlphaMaskInstruction);\n }\n\n public execute(instruction: AlphaMaskInstruction)\n {\n const renderer = this._renderer;\n const renderMask = instruction.mask.renderMaskToTexture;\n\n if (instruction.action === 'pushMaskBegin')\n {\n const filterEffect = BigPool.get(AlphaMaskEffect);\n\n filterEffect.inverse = instruction.inverse;\n filterEffect.channel = instruction.mask.channel;\n\n if (renderMask)\n {\n instruction.mask.mask.measurable = true;\n\n const bounds = getGlobalBounds(instruction.mask.mask, true, tempBounds);\n\n instruction.mask.mask.measurable = false;\n\n bounds.ceil();\n\n const colorTextureSource = renderer.renderTarget.renderTarget.colorTexture.source;\n const filterTexture = TexturePool.getOptimalTexture({\n width: bounds.width,\n height: bounds.height,\n resolution: colorTextureSource._resolution,\n antialias: colorTextureSource.antialias,\n });\n\n renderer.renderTarget.push({ target: filterTexture, clear: true });\n\n renderer.globalUniforms.push({\n offset: bounds,\n worldColor: 0xFFFFFFFF\n });\n\n const sprite = filterEffect.sprite;\n\n sprite.texture = filterTexture;\n\n sprite.worldTransform.tx = bounds.minX;\n sprite.worldTransform.ty = bounds.minY;\n\n this._activeMaskStage.push({\n filterEffect,\n maskedContainer: instruction.maskedContainer,\n filterTexture,\n });\n }\n else\n {\n filterEffect.sprite = instruction.mask.mask as Sprite;\n\n this._activeMaskStage.push({\n filterEffect,\n maskedContainer: instruction.maskedContainer,\n });\n }\n }\n else if (instruction.action === 'pushMaskEnd')\n {\n const maskData = this._activeMaskStage[this._activeMaskStage.length - 1];\n\n if (renderMask)\n {\n // WebGPU blit's automatically, but WebGL does not!\n if (renderer.type === RendererType.WEBGL)\n {\n renderer.renderTarget.finishRenderPass();\n }\n\n renderer.renderTarget.pop();\n renderer.globalUniforms.pop();\n }\n\n renderer.filter.push({\n renderPipeId: 'filter',\n action: 'pushFilter',\n container: maskData.maskedContainer,\n filterEffect: maskData.filterEffect,\n canBundle: false,\n });\n }\n else if (instruction.action === 'popMaskEnd')\n {\n renderer.filter.pop();\n\n const maskData = this._activeMaskStage.pop();\n\n if (renderMask)\n {\n TexturePool.returnTexture(maskData.filterTexture);\n }\n\n // Returning the effect to the pool now would let the next mask in this frame\n // reuse it, along with its MaskFilter's uniform buffer. WebGPU only reads that\n // buffer when the frame's commands are submitted, so sharing it between masks\n // would make every mask sample the last-written filter matrix (#12145).\n this._usedEffects.push(maskData.filterEffect);\n }\n }\n\n public postrender(): void\n {\n const effects = this._usedEffects;\n\n for (let i = 0; i < effects.length; i++)\n {\n BigPool.return(effects[i]);\n }\n\n effects.length = 0;\n }\n\n public destroy(): void\n {\n this.postrender();\n\n this._renderer.runners.postrender.remove(this);\n this._renderer = null;\n this._activeMaskStage = null;\n this._usedEffects = null;\n }\n}\n","import { Matrix } from '../../maths/matrix/Matrix';\nimport { GlProgram } from '../../rendering/renderers/gl/shader/GlProgram';\nimport { GpuProgram } from '../../rendering/renderers/gpu/shader/GpuProgram';\nimport { UniformGroup } from '../../rendering/renderers/shared/shader/UniformGroup';\nimport { Texture } from '../../rendering/renderers/shared/texture/Texture';\nimport { TextureMatrix } from '../../rendering/renderers/shared/texture/TextureMatrix';\nimport { warn } from '../../utils/logging/warn';\nimport { Filter } from '../Filter';\nimport fragment from './mask.frag';\nimport vertex from './mask.vert';\nimport source from './mask.wgsl';\n\nimport type { Sprite } from '../../scene/sprite/Sprite';\nimport type { FilterOptions } from '../Filter';\nimport type { FilterSystem } from '../FilterSystem';\n\n/**\n * The channel to use for masking.\n * - `'red'` - Uses the red channel of the mask texture (default). Suitable for grayscale mask textures.\n * - `'alpha'` - Uses the alpha channel of the mask texture. Suitable for sprites with transparency.\n * @category rendering\n * @standard\n */\nexport type MaskChannel = 'red' | 'alpha';\n\n/** @internal */\nexport interface MaskFilterOptions extends FilterOptions\n{\n sprite: Sprite,\n inverse?: boolean;\n channel?: MaskChannel;\n scale?: number | { x: number, y: number },\n}\n\n/** @internal */\nexport class MaskFilter extends Filter\n{\n public sprite: Sprite;\n private readonly _textureMatrix: TextureMatrix;\n\n constructor(options: MaskFilterOptions)\n {\n const { sprite, ...rest } = options;\n\n const textureMatrix = new TextureMatrix(sprite.texture);\n\n const filterUniforms = new UniformGroup({\n uFilterMatrix: { value: new Matrix(), type: 'mat3x3<f32>' },\n uMaskClamp: { value: textureMatrix.uClampFrame, type: 'vec4<f32>' },\n uAlpha: { value: 1, type: 'f32' },\n uInverse: { value: options.inverse ? 1 : 0, type: 'f32' },\n uChannel: { value: options.channel === 'alpha' ? 1 : 0, type: 'f32' },\n });\n\n const gpuProgram = GpuProgram.from({\n vertex: {\n source,\n entryPoint: 'mainVertex',\n },\n fragment: {\n source,\n entryPoint: 'mainFragment',\n },\n });\n\n const glProgram = GlProgram.from({\n vertex,\n fragment,\n name: 'mask-filter',\n });\n\n super({\n ...rest,\n gpuProgram,\n glProgram,\n clipToViewport: false,\n resources: {\n filterUniforms,\n uMaskTexture: sprite.texture.source,\n },\n });\n\n this.sprite = sprite;\n\n this._textureMatrix = textureMatrix;\n }\n\n /**\n * Rebinds the filter to a new mask sprite, moving the texture-matrix `update`\n * listener and the bind group's `change` subscription over to the new sprite's\n * texture. `apply` refreshes the same bindings on every use — this method exists\n * to release the previous sprite's texture immediately, without waiting for\n * (or requiring) another `apply`.\n * @param sprite - the sprite to mask with from now on.\n */\n public setSprite(sprite: Sprite): void\n {\n this.sprite = sprite;\n\n const texture = this._getSafeTexture();\n\n this._textureMatrix.texture = texture;\n this.resources.uMaskTexture = texture.source;\n }\n\n set inverse(value: boolean)\n {\n this.resources.filterUniforms.uniforms.uInverse = value ? 1 : 0;\n }\n\n get inverse(): boolean\n {\n return this.resources.filterUniforms.uniforms.uInverse === 1;\n }\n\n set channel(value: MaskChannel)\n {\n this.resources.filterUniforms.uniforms.uChannel = value === 'alpha' ? 1 : 0;\n }\n\n get channel(): MaskChannel\n {\n return this.resources.filterUniforms.uniforms.uChannel === 1 ? 'alpha' : 'red';\n }\n\n public apply(\n filterManager: FilterSystem,\n input: Texture,\n output: Texture,\n clearMode: boolean\n ): void\n {\n const texture = this._getSafeTexture();\n\n // will trigger an update if the texture changed..\n this._textureMatrix.texture = texture;\n\n filterManager.calculateSpriteMatrix(\n this.resources.filterUniforms.uniforms.uFilterMatrix as Matrix,\n this.sprite\n ).prepend(this._textureMatrix.mapCoord);\n\n this.resources.uMaskTexture = texture.source;\n\n filterManager.applyFilter(this, input, output, clearMode);\n }\n\n /**\n * The sprite's texture, or `Texture.EMPTY` when that texture has been destroyed —\n * a destroyed texture has no source left to sample, so the mask degrades to empty\n * rather than crashing the render.\n */\n private _getSafeTexture(): Texture\n {\n const texture = this.sprite.texture;\n\n if (texture.destroyed || !texture.source || texture.source.destroyed)\n {\n // #if _DEBUG\n warn('[MaskFilter] The mask texture was destroyed while the mask is still in use. '\n + 'Remove the mask before destroying its texture.');\n // #endif\n\n return Texture.EMPTY;\n }\n\n return texture;\n }\n\n public destroy(destroyPrograms = false): void\n {\n // the texture matrix subscribes to its texture outside the bind-group resource\n // system, so the base destroy would leave that `update` listener behind\n this._textureMatrix.destroy();\n super.destroy(destroyPrograms);\n }\n}\n"],"names":["cleanHash"],"mappings":"yEAaO,OAAM,EAgBT,WAhBS,CAgBG,AAfhB,CAegB,CACZ,CALA,IAAA,CAAQ,WAAA,CETC,AACb,CAAA,CFQqC,CACjC,IAAA,CAAQ,ICyDR,YDzDQ,CAAmB,CAAA,mBACnB,CAAgB,gBAIf,CAAY,cAIrB,KACI,CAAK,WAAA,CAAY,CAAC,CAAA,CAAI,EAAA,KACtB,CAAK,gBAAA,CAAmB,CAAA,KACxB,CAAK,GEML,UFNK,CAAA,EACT,CAEO,KAAK,CAAA,CAAc,CEOtB,CFP6C,CAAA,CACjD,CEMI,AFLiB,IAAA,CAAK,OEMJ,EFNI,CAEb,WAAA,CAAY,IEKT,CFLS,CAAM,KAAA,CAAA,SAER,IAAA,CAAK,WAAA,OAEb,CAAK,ICqDH,YDrDmB,CAAA,CAAI,CAAA,CAAW,IAAA,CAAK,gBAAA,CAAmB,CAAC,CAAA,CAAK,EAAmB,EAAnB,EAAmB,KAE1F,EAAA,IAAe,CAAK,WAAA,CAAY,IAAA,CAAK,gBAAgB,CAAA,UAEjC,aAAA,EAC1B,CACI,IAAA,CAAK,aAAA,CAAgB,EACrB,EAAe,CEAG,EFAH,CAAI,KEEvB,SFDsB,YACd,UAAW,aACA,MEIX,IFAH,gBAAA,EACT,CAEO,IAAI,CAAA,CEIP,AFJsB,CAAA,CAAuB,CAAA,CACjD,CACqB,IAAA,CEEY,AFFP,SAAA,CAEb,OEGL,IFHK,CAAY,KAAA,CAAM,KAAA,CAAM,OAE3B,EAAa,EEEf,E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