playcanvas / playcanvas/engine
Should AssetRegistery#add also load assets if marked as preload?
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 16.8k
- Forks
- 2k
- Avg merge
- 4h 32m
- Merged PRs (30d)
- 222
Description
https://github.com/playcanvas/engine/blob/main/src/framework/asset/asset-registry.js#L244
This means that on the launch of an application, when the assets are added via Application#configure (using _parseAssets), they are already loading despite Applications#preload not being called yet.
Preload function doesn't actually start any loading in our case, just sets up the events.
Contributor 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.
Research direction
Read src/framework/asset/asset-registry.js around AssetRegistry#add, then trace Application#configure, _parseAssets, and preload in src/framework/application.js. Confirm when assets marked for preload begin loading and whether add or preload should own that behavior; done means the loading timing is intentional and covered by the relevant behavior checks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- game-dev, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100