Skip to content

SOF-7926: adapt wave.js to made getBasis/getLattice API (SOF-7926) - #202

Merged
timurbazhirov merged 9 commits into
devfrom
chore/SOF-7926
Aug 13, 2026
Merged

SOF-7926: adapt wave.js to made getBasis/getLattice API (SOF-7926)#202
timurbazhirov merged 9 commits into
devfrom
chore/SOF-7926

Conversation

@k0stik

@k0stik k0stik commented Jun 22, 2026

Copy link
Copy Markdown
Member

Pin @mat3ra/made and @mat3ra/code to git archive tarballs from the constraints refactor branch and replace removed Material.Basis/Lattice accessors with getBasis()/getLattice().

k0stik and others added 4 commits June 23, 2026 02:02
Pin @mat3ra/made and @mat3ra/code to git archive tarballs from the
constraints refactor branch and replace removed Material.Basis/Lattice
accessors with getBasis()/getLattice().

Co-authored-by: Cursor <cursoragent@cursor.com>
Comment thread tests/fixtures/material.json Outdated
oid sha256:3b6350bd9576ef522c2b879db2eceff36c7ce43b4d13ba5a1425713b74850f21
size 769
oid sha256:7ad56cab981da286f4ee754a851ce520c89aabcb0cb7912b9cdfc81db0a11074
size 817

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do these need to change??

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldn't require hash to do the visualization

@netlify

netlify Bot commented Aug 13, 2026

Copy link
Copy Markdown

Deploy Preview for mat3ra-mave failed. Why did it fail? →

Name Link
🔨 Latest commit f8a1913
🔍 Latest deploy log https://app.netlify.com/projects/mat3ra-mave/deploys/6a7e36da9a8f58000821b214

k0stik and others added 2 commits August 14, 2026 00:22
Material.clone()/toJSON now resolve material-enhanced-hashed via JSONSchemasInterface; register schemas.json in tests so CI does not fail.

Co-authored-by: Cursor <cursoragent@cursor.com>
@mat3ra/code deepClone uses structuredClone, which Jest 27 jsdom does not provide.

Co-authored-by: Cursor <cursoragent@cursor.com>
@timurbazhirov
timurbazhirov merged commit 0e3cd47 into dev Aug 13, 2026
3 of 7 checks passed
@timurbazhirov
timurbazhirov deleted the chore/SOF-7926 branch August 13, 2026 21:37
timurbazhirov pushed a commit that referenced this pull request Aug 14, 2026
…e API

#202 (SOF-7926) landed on dev while this was open, removing the `Material.Basis`
and `Material.Lattice` accessors in favour of `getBasis()` / `getLattice()` and
`setLattice()`, and bumping code/esse/made to 2026.8.13-0.

That commit adapted the four call sites that existed on dev. This branch carries
the interactive-editor stack, which dev has never seen, so it had eleven more —
in `ThreeDEditor`, `interactive_structure_editor` and `StatusBar` — plus ten in
tests. All migrated. `Made.Basis` / `Made.Lattice` are static references on the
namespace and are deliberately untouched.

`StatusBar`'s `MaterialLike` gains `getLattice?: () => LatticeLike` in place of
the `Lattice` property. Its fixtures are deliberately plain objects rather than
real Materials, so they now expose the accessor as a function; a test was added
for a material carrying no accessor at all, which must return "" rather than
throw.

Two conflicts resolved in this branch's favour, both against changes #202 made
to code the editor stack had already deleted:

- `materialsToThreeDSceneData` in `src/utils.js`. Removed in `7beb8ae` because it
  built an entire WebGL `Wave` just to serialize scene JSON, was never exported
  from `exports.js`, had no caller, and was the only edge in the utils <-> wave
  import cycle. #202 only adapted its accessors; the deletion stands.
- `onThreejsEditorModalHide` in `ThreeDEditor`. Dead since the editor moved
  in-viewer.

Verified: lint 0 errors, `tsc --noEmit` clean, 431 tests passing across 30
suites, production build clean.
timurbazhirov pushed a commit that referenced this pull request Aug 14, 2026
…e API

#202 (SOF-7926) landed on dev while this was open, removing the `Material.Basis`
and `Material.Lattice` accessors in favour of `getBasis()` / `getLattice()` and
`setLattice()`, and bumping code/esse/made to 2026.8.13-0.

That commit adapted the four call sites that existed on dev. This branch carries
the interactive-editor stack, which dev has never seen, so it had eleven more —
in `ThreeDEditor`, `interactive_structure_editor` and `StatusBar` — plus ten in
tests. All migrated. `Made.Basis` / `Made.Lattice` are static references on the
namespace and are deliberately untouched.

`StatusBar`'s `MaterialLike` gains `getLattice?: () => LatticeLike` in place of
the `Lattice` property. Its fixtures are deliberately plain objects rather than
real Materials, so they now expose the accessor as a function; a test was added
for a material carrying no accessor at all, which must return "" rather than
throw.

Two conflicts resolved in this branch's favour, both against changes #202 made
to code the editor stack had already deleted:

- `materialsToThreeDSceneData` in `src/utils.js`. Removed in `7beb8ae` because it
  built an entire WebGL `Wave` just to serialize scene JSON, was never exported
  from `exports.js`, had no caller, and was the only edge in the utils <-> wave
  import cycle. #202 only adapted its accessors; the deletion stands.
- `onThreejsEditorModalHide` in `ThreeDEditor`. Dead since the editor moved
  in-viewer.

Verified: lint 0 errors, `tsc --noEmit` clean, 461 tests passing across 32
suites, production build clean.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants