Skip to content

Fix sky vertical UV orientation and add per-sky flipV option#337

Merged
tracygardner merged 1 commit intomainfrom
codex/adjust-sky-texture-scaling-in-flockscene
Mar 5, 2026
Merged

Fix sky vertical UV orientation and add per-sky flipV option#337
tracygardner merged 1 commit intomainfrom
codex/adjust-sky-texture-scaling-in-flockscene

Conversation

@tracygardner
Copy link
Contributor

Motivation

  • Sky textures and shader materials were using the same positive scaling for both U and V, but the vertical orientation for sky should be inverted while keeping uScale positive.
  • Provide a way to opt out when inversion causes mirrored appearances by exposing a per-sky toggle rather than changing global material behavior.

Description

  • In api/scene.js (flockScene.setSky) added an options.flipV parameter defaulting to true and kept clear behavior unchanged.
  • Compute verticalScale = flipV ? -scaleValue : scaleValue and apply it only in the sky-material branch.
  • For standard textures set tex.uScale = scaleValue and tex.vScale = verticalScale, and for shader materials call color.setFloat("uScale", scaleValue) and color.setFloat("vScale", verticalScale).
  • No global material creation logic was modified; changes are scoped to sky setup only in setSky.

Testing

  • node --check api/scene.js completed successfully.
  • npm -s run test:api failed in this environment because Playwright browser binaries are not installed (error: missing Chromium executable).
  • npm -s run lint reported pre-existing unrelated lint issues in flock.js and did not pass in this environment.

Codex Task

@tracygardner tracygardner merged commit 1265222 into main Mar 5, 2026
5 checks passed
@tracygardner tracygardner deleted the codex/adjust-sky-texture-scaling-in-flockscene branch March 5, 2026 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant