Commit Graph
23 Commits
Author SHA1 Message Date
Geoff deRosenroll cbfeed1672 Update JS bindings with CrossSection + reorganize (#440)
- add CrossSection class
- move static method (constructors) under their respective classes
-add Manifold.{split, splitByPlane}
- enable usage of instanceof on Manifold (and now CrossSection) objects simplify registry indirection in worker.ts, enabling method de-structuring (opening static function names out of class module name-spaces)

Build changes:
- break C++ helpers out from bindings.cpp to helpers.cpp
- ensure that ts files are copied during builds even when nothing is recompiled

Note that in addition to the new bindings, the most of the existing toplevel functions have been moved under their respective classes as static methods (breaking change!). I haven't added any new examples yet, but the existing ones are passing and do make use of CrossSection now (some transparently, and some directly), but I think enough of this is together that review is worthwhile.
2023-06-01 00:31:57 -07:00
Emmett Lalish 9dac47a76a Fix editor warp crash (#442)
* reset errored worker

* catch non-finite warp errors
2023-05-26 22:37:10 -07:00
Emmett Lalish 72935213e8 Editor scene (#438)
* SetProperties working

* cleanup

* added Node

* switched to Vite

* scene export working

* vertex color output works

* added unlit

* fixed rename bug

* switch worker to TS

* don't fail on empty manifolds

* reusing meshes

* cleanup, updated gyroid example

* change signature of setPropFunc

* updated examples

* add dist for githack testing

* Revert "add dist for githack testing"

This reverts commit 8769d7ab08dfaab9fe7824726f7a7229bf553bb3.

* remove duplicate files

* updated docs

* fixed some bugs

* multi-material working

* switched to vitest

* tests pass

* fixed examples

* fix CI

* update deployment

* tweak logging

* cleanup

* fix copy

* updated READMEs

* extend timeout
2023-05-25 09:40:02 -07:00
Emmett Lalish 58fb7e3300 EXT_manifold for glTF (#420)
* extension export works

* reading GLBs

* trying to merge documents

* add await

* removed extra materials

* added builds

* several fixes

* fix versions

* move to built

* fixed test.js

* updated README

* disable nix JS test for now

* fix codecov timeout

* fix test
2023-05-04 20:49:39 -07:00
Emmett Lalish 9e9a22d66b clean up editor.d.ts (#348) 2023-03-01 23:33:31 -08:00
Emmett Lalish 95daa54591 ugly fix for editor TS (#344) 2023-02-28 12:16:48 -08:00
Emmett Lalish feb7fb6edd Convert manifoldCAD.org to a PWA (#336)
* added PWA manifest

* added service worker

* check for service worker
2023-02-25 09:49:19 -08:00
Emmett Lalish 3f42e5e6d7 Adding show() to editor (#330)
* include all transforms

* added show method for editor debug

* await before cleanup

* tighten JS tests

* move out common test functions

* split manifold and boolean tests

* cleanup

* tighten samples tests

* fixed GetMeshGL

* fixed original IDs for empty runs

* link SDF

* update CUDA files

* revert accidentally-removed test function

* added types and docs
2023-02-20 22:00:04 -08:00
Emmett Lalish 02affd5247 convert to ES6 module (#322)
* es6 tests work

* fixed model-viewer example

* fixed three example

* worker not quite working

* removed three.js dependency

* switched to top-level await

* added normalIdx binding

* fix binding
2023-02-16 08:09:31 -08:00
Emmett Lalish 98a61df840 Fix editor first run (#281)
* fixed first run bug, plus minor cleanup

* added examples pointer
2022-11-14 00:02:43 +01:00
Emmett Lalish fd8c381179 Fix spelling (#270)
* fixed spelling

* forgot one

* JS code formatting

* updated CMakeLists for easier testing

* revert small change
2022-11-08 10:40:15 +01:00
Emmett Lalish c59130c754 Adding NodeJS tests for WASM module (#262)
* modularize wasm and add mocha tests

* add npm tests to CI

* fix mv command

* revert to build directory

* added rest of example tests

* fixed three.js test

* update web examples for module
2022-10-27 10:01:08 -07:00
Emmett Lalish 491d7d8045 added package.json to publish to npm (#257)
* added package.json

* updated READMEs
2022-10-23 22:04:53 -07:00
Emmett Lalish 066aec0137 Add missing license headers (#253)
* added examples attribution

* added missing headers
2022-10-20 12:27:27 -07:00
Emmett Lalish 3eae433537 Yet more JS examples (#251)
* added tet puzzle

* added scallop, updated smooth

* add missing file

* moved saved scripts to top of dropdown
2022-10-18 21:14:28 -07:00
Emmett Lalish b26ae27916 More examples (#244)
* better error handling and allow single polygons

* improved console logging

* added gyroidModule example

* fixed delete script
2022-10-14 08:53:46 -07:00
Emmett Lalish 667ae7fe75 Editor output info (#240)
* add missing icon

* added more stats
2022-10-12 08:33:30 -07:00
Emmett Lalish 2c750753a5 Add worker and the ability to cancel (#239)
* moved computations to worker

* fixed console logs

* fixed run at startup

* buttons should not be children of buttons!

* enabled cancel

* allow top and bottom view

* fixed reinitialization
2022-10-11 16:21:36 -07:00
Emmett Lalish f2e3956770 Replaced warp example with heart (#232)
* fixed console overflow

* added heart example

* better saving

* better uniqueness

* make file button fixed width
2022-10-08 08:43:57 -07:00
Emmett Lalish d49de483ad Editor examples (#231)
* moved examples

* added examples

* addressing feedback
2022-10-07 00:42:49 -07:00
Emmett Lalish 4d01e46bd3 Editor console (#230)
* added console output

* fixed bounding box

* updated intro

* catch compile errors

* update intro again
2022-10-06 10:58:47 -07:00
pca006132 a860854143 add missing js bindings (#224)
* export addFunction explicitly

* add missing js APIs

* fixed sdf

* made requested changes
2022-10-03 21:41:04 -07:00
Emmett Lalish 60697cc48a Editor save (#222)
* split editor files

* added loading poster

* added dropdown menu

* switching examples works

* autosave working

* state retrieval working

* rearrange code

* added edit buttons

* made delete function

* rename works
2022-09-30 00:08:06 -07:00