Skip to content

Fix translucent rendering updates for STEP-backed glTF models#690

Draft
seveibar wants to merge 1 commit intomainfrom
codex/add-translucent-model-support-for-step-files
Draft

Fix translucent rendering updates for STEP-backed glTF models#690
seveibar wants to merge 1 commit intomainfrom
codex/add-translucent-model-support-for-step-files

Conversation

@seveibar
Copy link
Contributor

Motivation

  • STEP files are converted to GLB and cached, but toggling the "show as translucent model" flag did not always update already-loaded glTF materials.
  • Material transparency updates were applied only during model load, causing the UI toggle to require a reload to take effect for STEP-backed models.

Description

  • Load the glTF once and keep loading tied only to gltfUrl so the model is not reloaded when translucency changes.
  • Move material translucency updates into a dedicated effect that runs when the loaded model or isTranslucent changes, and apply transparent, opacity, depthWrite, and needsUpdate to each material.
  • Support both single-material and multi-material meshes during translucency updates so all mesh materials reflect the current isTranslucent state.

Testing

  • bunx tsc --noEmit completed successfully and reported no type errors.
  • bun test tests executed 12 tests across 7 files with 10 passing and 2 failing tests in tests/preprocess-circuit-json.test.ts, which are unrelated to the glTF translucency changes.
  • bun run format ran and formatted files successfully.

Codex Task

@vercel
Copy link

vercel bot commented Feb 14, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
3d-viewer Ready Ready Preview, Comment Feb 14, 2026 5:12am

Request Review

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