feat(textures): per-axis texture wrapping (wrapS/wrapT)#254
Merged
Conversation
setTexture now reads and applies independent wrapS/wrapT from options, falling back to the legacy single `wrap` so textures recorded before per-axis support still resolve. Both axes are recorded, and the texture is flagged needsUpdate since wrapping is a sampler-level change. This lets callers set horizontal/vertical wrapping independently through setTextureOptions. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
What
Adds independent per-axis texture wrapping in
Element.setTexture:wrapS/wrapTfrom options and applies them separately (texture.wrapS/texture.wrapT) instead of collapsing to a singlewrap.texture.needsUpdate = true— wrapping is a sampler-level setting, so a change must re-upload the texture.wrapwhen per-axis values are absent, so textures recorded before this still resolve correctly.Combined with the existing
setTextureOptions(from #253), callers can update either axis on an already-assigned texture without reloading it.Why
Follow-up to #253 (offset +
setTextureOptions, released in 3.27.2). The editor's redesigned Wrapping control lets users set horizontal (S) and vertical (T) wrap modes independently — or link them — which needs the engine to honor per-axis values rather than forcing both to onewrap.Testing
npm test→ 505/505 pass (29 suites).Release / companion
Needs a release (e.g. 3.27.3) so the editor can consume it. The editor wrapping UI is held until then; it will pin the new version rather than 3.27.2 (which has repeat/offset but not per-axis wrapping).
🤖 Generated with Claude Code