AppBase events and their order are not documented
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 80/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- javascript
- Domain
- documentation
Research direction
The events are fired in src/framework/app-base.js, at the line ranges listed in the issue (for example start, initialize and update near lines 1086 and 1179). Read how the Asset and ButtonComponent classes document their events with @event JSDoc and static EVENT_ constants, then do the same for AppBase. Done means each fired event has an @event entry or constant, and the update-order note is written down. Whether to add a postupdate event is a separate question for maintainers and is not required here.
Written by the indexing model from the issue text.
Description
The application fires a number of events, but none of them are documented - there is no @event JSDoc and no static EVENT_* constant on AppBase, so the API reference does not list them. Other framework classes document theirs this way, for example Asset and ButtonComponent.
The events AppBase fires:
start,initialize,postinitialize: https://github.com/playcanvas/engine/blob/bf6b6e7efe5faefd5dcf789ef7250e2be002a96b/src/framework/app-base.js#L1086-L1100update: https://github.com/playcanvas/engine/blob/bf6b6e7efe5faefd5dcf789ef7250e2be002a96b/src/framework/app-base.js#L1179prerender,postrender: https://github.com/playcanvas/engine/blob/bf6b6e7efe5faefd5dcf789ef7250e2be002a96b/src/framework/app-base.js#L1201-L1215frameupdate,framerender,frameend: https://github.com/playcanvas/engine/blob/bf6b6e7efe5faefd5dcf789ef7250e2be002a96b/src/framework/app-base.js#L260-L287preload:start,preload:progress,preload:end: https://github.com/playcanvas/engine/blob/bf6b6e7efe5faefd5dcf789ef7250e2be002a96b/src/framework/app-base.js#L816-L836destroy: https://github.com/playcanvas/engine/blob/bf6b6e7efe5faefd5dcf789ef7250e2be002a96b/src/framework/app-base.js#L1829
Their order relative to the components is only visible in the source. For example, the update event fires after every component's update, animationUpdate and postUpdate:
There is no postupdate event. Code expecting one, for example to adjust a camera after the frame's updates, gets no warning: app.on('postupdate', ...) subscribes and never fires.
- Dominant language
- JavaScript
- Stars
- 17k
- Forks
- 2k
- Avg merge
- 4h 21m
- Merged PRs (30d)
- 286
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from playcanvas/engine
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
playcanvas/engine#9767 ·
Maintainers usually reply within 1 day
-
XrInputSource#elementEntity holds the ElementComponent, not the Entity its docs and type promiseOpenarea: xr
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
playcanvas/engine#9660 ·
Maintainers usually reply within 1 day
-
Isotropic GGX specular visibility term uses alpha^4 instead of alpha^2Possibly taken @Yahiro025 claimed this 25 days ago. Openarea: gltf area: graphics
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
playcanvas/engine#9510 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
playcanvas/engine#9335 ·
Maintainers usually reply within 1 day
-
area: ui enhancement
Difficulty 1/5 Under an hour Newbie friendliness 72/100
playcanvas/engine#5777 ·
Maintainers usually reply within 1 day
All issues in playcanvas/engine
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
SACGF/variantgrid#2341 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Unsampled pageload span is profiled when profileLifecycle is 'trace' (browser UI profiling)Possibly taken @Jxxunnn claimed this today. OpenBrowser Waiting for: Product Owner
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
getsentry/sentry-javascript#25497 · 1 comment ·
Maintainers usually reply within 1 day
-
external-plugin needs-review:HIGH ready-for-review
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
github/awesome-copilot#5162 · 3 comments ·
Maintainers usually reply within 1 day