Repository navigation
Conversation
…current assets load When gui sets runtime.lazyAssetInstall = true, the project load path passes installWithCurrentCostume to parseScratchObject, so a project opens as soon as its current costume is ready; remaining costumes/sounds keep loading in the background and announce themselves via requestTargetsUpdate(). Co-authored-by: PYC5635 <3653161641@qq.com>
This was referenced Nov 22, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
scratch-gui 侧 PR(Bilup/scratch-gui#3「加载作品时忽略造型」)需要 VM 支持:设置开启后,项目打开只等当前造型就绪,其余造型/声音后台装载。
实现
parseScratchObject的installWithCurrentCostume快速路径(先装 sprite、素材 in-place 填充、完成后updateAllDrawableProperties+requestTargetsUpdate)已存在于本仓库,但项目加载路径硬编码传isSingleSprite,因此只有单 sprite 加载能享受到它。本 PR 在项目加载路径增加一个 runtime 级开关:
GUI 侧设置
vm.runtime.lazyAssetInstall = true即启用(不设置时行为与现在完全一致,零默认行为变化)。效果
requestTargetsUpdate()刷新(setCostume转发已有 skinId,renderer 跳过无 skin 的 drawable,无闪烁)配套