Repository navigation
Skills: NineSliceSprite in the UI skill, the audio skill brought up to the implementation, and open 20.9.0 - #1723
Merged
Merged
Conversation
The UI skill's description listed NineSliceSprite panels among what it covers, but the body never mentioned them. It now shows both ways to make one (createSpriteFromName with the nineSlice flag, as the UI example's draggable panel does, and the constructor, as the Text example's dialogue box does) and the three things that trip people up: width/height are the size to stretch to and are mandatory, insetx/insety default to a quarter of the image rather than its border, and the anchor is the centre. melonjs and .claude-plugin/plugin.json move to 20.9.0 together, with an unreleased 20.9.0 section in the changelog. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0146cnBA4Z2zLzWYa3wjnYaW
…nd the rest of the API Checked against every export of the audio module and the vendored backend: - the listener is fixed at the origin and has no public setter, so positions must be passed relative to the player - the panner defaults (inverse, refDistance 1) assume metres: a source 100 px away plays at ~1%, so set refDistance in pixels or scale down - stereo() and position() share one per-instance panner; whichever runs first fixes its type and the other silently does nothing - reverb / echo / compressor on the whole mix: insert after getMasterGain(); streamed clips bypass the master gain, and per-clip effects are not reachable - hasAudio(), hasFormat(), runtime audio.load(), rate and fade ranges - four new symptom-table rows, and triggers for effects and listener Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0146cnBA4Z2zLzWYa3wjnYaW
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.
Description
Two skill updates, plus the version bump that opens 20.9.0 for them. No engine code changes.
UI skill (
melonjs-ui-and-text): its description listed "NineSliceSprite panels" among what it covers, but the body never mentioned them. New section, "Panels and boxes that stretch:NineSliceSprite":createSpriteFromName(name, { width, height }, true)from an atlas (the UI example's draggable panel), and the constructor from an image (the Text example's dialogue box)width/heightare the size to stretch to and the constructor throws without them;insetx/insetydefault to a quarter of the image, not its border; the anchor is the centrewidth/heightsetters (checked innineslicesprite.js: both writenss_width/nss_height, whichdraw()reads)Audio skill (
melonjs-audio): checked against every export of the audio module and the vendored backend. Added what positional sound needs and the skill did not say:pos()but nothing public reaches it, so positions must be passed relative to the player, every frameinverse/refDistance: 1puts a source 100 px away at ~1%, so a sound positioned in pixels is near silent a few tiles out; setrefDistancein pixels or scale positions downstereo()andposition()are exclusive per instance: both create the instance's one panner if it doesn't exist, and each only updates a panner of its own type (spatial.ts), so whichever runs first makes the other a silent no-opgetMasterGain(). Notes thatsetVolume/muteAllstill apply, that astream: trueclip plays through an<audio>element and bypasses the master gain (voice.ts), and that per-clip effects are not reachablehasAudio(),hasFormat(), runtimeaudio.load(), and therate(0.5..4.0) andfaderangesVersion:
packages/melonjs/package.jsonand.claude-plugin/plugin.jsonboth move to20.9.0together, with an unreleased[20.9.0]changelog section carrying both entries under Fixed.Type of change
Checklist
pnpm lintpasses)pnpm testpasses): not run; no source or test changespnpm build), as part ofpnpm lintRelated issues
None. The audio audit surfaced two engine gaps that are not fixed here: the listener cannot be moved through the public API, and
stereo()/position()fail silently on an instance whose panner is the other type.🤖 Generated with Claude Code
https://claude.ai/code/session_0146cnBA4Z2zLzWYa3wjnYaW
Generated by Claude Code