Skip to content

Add public app getter to ResourceHandler, mark _app protected#8991

Merged
mvaligursky merged 1 commit into
mainfrom
mv-handler-app-getter
Jun 30, 2026
Merged

Add public app getter to ResourceHandler, mark _app protected#8991
mvaligursky merged 1 commit into
mainfrom
mv-handler-app-getter

Conversation

@mvaligursky

Copy link
Copy Markdown
Contributor

ResourceHandler exposed its internal _app field on the public API surface because it lacked a visibility tag. This adds a clean public app getter and marks the backing field protected.

Changes:

  • Add a public app getter to ResourceHandler that returns the running AppBase.
  • Tag the backing _app field @protected so it no longer leaks into the public API. Subclasses (HierarchyHandler, SceneHandler, ScriptHandler, TemplateHandler) already use it directly, so protected is the correct visibility.

API Changes:

  • Added: ResourceHandler#app getter, returning AppBase.
  • ResourceHandler#_app is now @protected (it was previously emitted as a public field in the generated type declarations). It was never intended as public API — use the new app getter instead.

@github-actions

Copy link
Copy Markdown

Build size report

This PR changes the size of the minified bundles.

Bundle Minified Gzip Brotli
playcanvas.min.js 2270.0 KB (+0.0 KB, +0.00%) 584.3 KB (+0.0 KB, +0.00%) 453.7 KB (−0.3 KB, −0.08%)
playcanvas.min.mjs 2267.4 KB (+0.0 KB, +0.00%) 583.4 KB (+0.0 KB, +0.00%) 453.6 KB (+0.1 KB, +0.02%)

@github-actions

Copy link
Copy Markdown

Public API report

This PR changes the public API surface (+14 / −0), per the docs' rules (@ignore / @Private / undocumented are excluded).

Show API diff
+AnimationHandler.get app(): AppBase
+AudioHandler.get app(): AppBase
+ContainerHandler.get app(): AppBase
+CubemapHandler.get app(): AppBase
+FontHandler.get app(): AppBase
+MaterialHandler.get app(): AppBase
+ModelHandler.get app(): AppBase
+RenderHandler.get app(): AppBase
+ResourceHandler.get app(): AppBase
+SceneHandler.get app(): AppBase
+ScriptHandler.get app(): AppBase
+SpriteHandler.get app(): AppBase
+TextureAtlasHandler.get app(): AppBase
+TextureHandler.get app(): AppBase

Informational only — this never fails the build.

@mvaligursky mvaligursky merged commit 5255bcd into main Jun 30, 2026
10 checks passed
@mvaligursky mvaligursky deleted the mv-handler-app-getter branch June 30, 2026 14:03
mvaligursky added a commit that referenced this pull request Jun 30, 2026
Co-authored-by: Martin Valigursky <mvaligursky@snapchat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant