Remove the wire drawing methods from AppBase - #9289
Merged
Merged
Conversation
`AppBase#drawWireSphere` and `#drawWireAlignedBox` are replaced by `WireRenderer#sphere` and `#boxMinMax` from #9288, so their bodies and docs are gone and they report themselves through `Debug.removed`. Both were `@ignore` and absent from the type definitions, so this is not a public API change, but they were used widely enough that a silent removal would be unkind. `Debug.removed` is dropped from release builds, so a caller in production gets a no-op and the message only in development. `Color` is now only referenced from JSDoc in this file, so it becomes a type import. The other five `@ignore` draw methods stay. `drawMesh`, `drawMeshInstance`, `drawQuad`, `drawTexture` and `drawDepthTexture` have no replacement yet, and belong with whatever replaces the mesh submission path. `Immediate#drawWireSphere` and `#drawWireAlignedBox` both stay as well. The aligned box has three callers inside the engine - gsplat-data, gsplat-manager and gsplat-octree-instance - which cannot use WireRenderer because core does not depend on extras. The sphere has no callers left, but is worth keeping alongside it. Migrates the four examples that used the removed methods: - gaussian-splatting/clipping and gaussian-splatting/editor draw a single colored box, so the color moves to the renderer - gaussian-splatting/wind colors each handle as it is drawn, and its explicit segment count of 20 was already the default - physics/offset-collision reached into `scene.immediate` directly and passed a non default segment count and an explicit layer. Those are renderer settings, so they are applied once outside the update loop and the call itself becomes `wire.sphere(position, 0.3)` Verified in the browser: all four still draw as before, wind keeps its two handle colors, and the stubs report the expected messages.
Build size reportThis PR changes the size of the minified bundles.
|
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.
Follow-up to #9288, which added
WireRenderer.AppBase#drawWireSphereand#drawWireAlignedBoxare replaced byWireRenderer#sphereand#boxMinMax, so their bodies and docs are gone and they now report themselves throughDebug.removed:Both were
@ignoreand absent from the type definitions, so this is not a public API change — but they were used widely enough that a silent removal would be unkind.Debug.removedis dropped from release builds, so a caller in production gets a no-op and the message only in development.Coloris now only referenced from JSDoc inapp-base.js, so it becomes a type import.What stays
The other five
@ignoredraw methods —drawMesh,drawMeshInstance,drawQuad,drawTexture,drawDepthTexture— have no replacement yet and belong with whatever replaces the mesh submission path.Immediate#drawWireSphereand#drawWireAlignedBoxboth stay too. The aligned box has three callers inside the engine that cannot useWireRenderer, because core does not depend on extras:src/scene/gsplat/gsplat-data.jssrc/scene/gsplat-unified/gsplat-manager.jssrc/scene/gsplat-unified/gsplat-octree-instance.jsThe sphere has no callers left, but is kept alongside it as it may be useful again.
Migrated examples
gaussian-splatting/clippinggaussian-splatting/editorgaussian-splatting/windsegmentsof 20 was already the default, so it drops outphysics/offset-collisionscene.immediatedirectly with a non-default segment count and an explicit layerThat last one is the nicest read of the change. Before:
After, with the three settings applied once outside the update loop:
Verified
All four examples still draw as before, in the browser.
windkeeps its two handle colors — measured as1,1,0,1for the selected handle and0.5,0.5,0.5,1for the rest, with 10 handles at 60 segments each. Both stubs emit their expected messages. 2626 tests passing; engine lint, examples lint, prettier and types all clean.🤖 Generated with Claude Code