Commit Graph
44 Commits
Author SHA1 Message Date
Emmett Lalish 67a5b7140d basic example working 2022-11-16 00:01:08 +01: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 a9dc1550ba new JS Mesh class (#272)
* new JS Mesh class

* fix Mesh

* switch MeshGL to vectors

* new Mesh constructor

* export Mesh and updated types

* got scallop working again

* optional normals

* fixed Mesh constructor

* added halfedgeTangent

* cleanup
2022-11-10 23:24:46 +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 LalishandStewart Allen af9377d6e7 Add GetMeshGL (#269)
* figure out wasm shared memory access, manifold data structure storage

* checkpoint multi-mode mesh direct access

* clean this up for a PR

* use size_t instead of int. fix pointer math for free() call. tab indent 2 spaces in js to match other code

* apply clang formatting. default to mode 1 (faster)

* eliminate new getMeshDirect() api call and fold it into getMesh() as an optional parameter object
eliminate _FreeMeshDirect and use Module._free() instead

* added optional ability to get normals array
restore access to mode 0 largely for testing

* remove mode options, simplify code

* this is quite a bit neater. fixes shorter header length

* attempt to do this the right way

* meshGL working

* revert JS API update

* added docs

Co-authored-by: Stewart Allen <stewart.allen@gmail.com>
2022-11-05 17:04:38 +01:00
Rafael 50fc5d87de Updated JS bindings (#268)
* Updated JS binding type definitions

* Ignore sublime text projects

* Ignore clangd cache

* Expose isManifold method

* Added wrapper for Manifold constructor, updated Mesh interface (...)
- Optional Mesh fields no longer error out with a 'missing property' error when they are missing
- Manifold constructor now uses the JS style Mesh instead of the serialized Mesh interface (MeshVec)
  - The old constructor was kept as a new static function (ManifoldFromMeshVec)
  - Error checking added to the constructor. If the status is not 0, an error with the correct message and code is thrown
- Updated type definitions

* Fix typo
whoops...

* Fix broken MeshRelation deserialization

* Revert "Expose isManifold method"

This reverts commit cedde70e1a28d721f58d886cea3ebd02fe0565af.

* Dummy commit to trigger CI
2022-11-05 00:23:54 +01:00
Jiří Hon ca81951355 WASM bindings: add missing smooth function to the ManifoldStatic interface (#267)
Update manifold.d.ts

Add missing smooth function to the ManifoldStatic interface.
2022-11-03 22:27:43 +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 0fb47693b3 Fix web examples (#254)
* fixed three.js examples

* add link and fix spelling
2022-10-21 15:42:00 -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 40624329e6 updated getMesh JS binding (#252) 2022-10-20 09:15:34 -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 89578ccb7a Torus Knot example (#249)
* added torusKnot

* save state

* update deploy

* remove shell script
2022-10-16 23:02:12 -07:00
Emmett Lalish 5be306bb7d reorganize gh-pages (#246)
reorganized gh-pages
2022-10-16 15:51:47 -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 bc83f65ba7 Wasm namespace (#236)
Made our API more discoverable in the editor
2022-10-09 16:11:59 -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
Emmett Lalish 3e61c1a156 WASM warp (#221)
* builds, doesn't run

* runs!

* addressing feedback
2022-09-27 08:51:51 -07:00
pca006132 3f33c919df expose batch boolean API to wasm (#220)
* expose batch boolean API

It is common to perform boolean operations on a set of meshes. This
batch boolean API allows faster operation in that case by avoiding
building up a complicated csg tree.

* expose batch boolean interface for wasm

This brings a 10x improvement to browser in some cases.
See #215 for discussion.

* record performance statistics for editor

So we can compare against other libraries easily, and users are able to
verify it without having to compile the whole library. Ideally we should
put this information in a console GUI, but printing to browser console
works for now.
2022-09-25 23:06:56 -07:00
pca006132andEmmett Lalish 8538cf5ee3 use compose for disjoint union (#217)
* use compose for disjoint union

Last mystery in #114. It turns out that the problem is due to
misunderstanding of the bounding box API: Box::Transform is *not* a safe
over-approximation of the bounding box of the manifold after the
transform. In fact it might be smaller than that if the transform is not
axis aligned. The simple fix is to apply the transform first and then
compute the bounding box, this will also make sure that the bounding box
is tight.

* fix batch union

Co-authored-by: Emmett Lalish <elalish@gmail.com>
2022-09-24 23:35:05 -07:00
pca006132andEmmett Lalish ae2ba3e323 python binding changes (#214)
* python documentation

* fixed error in readme

Co-authored-by: Emmett Lalish <elalish@gmail.com>
2022-09-24 23:07:43 -07:00
pca006132 975a6e6b4b free memory for js editor (#213)
* fixed js rotate binding

Rotate accepts three float args instead of 1 vec3 arg.

* free memory for js editor
2022-09-24 22:09:14 -07:00
Emmett Lalish b1b35395fa Editor updates (#212)
* simplification

* more functional binding

* added TS docs

* more docs
2022-09-23 08:38:13 -07:00
Emmett Lalish 31589d255c fix deploy and add favicon (#211) 2022-09-22 09:17:44 -07:00
Emmett Lalish 414c6e06be Editor UX updates (#210)
* UX updates and TS fix

* small refactor

* enable/disable run button

* improved responsive layout
2022-09-22 00:05:05 -07:00
pca006132 17f3751ae4 added monaco editor to model-viewer example (#208)
* add monaco editor page

* changed typescript bindings

* use modern js
2022-09-21 09:32:11 -07:00
Emmett Lalish f6839a36e6 updated python exporter from meshio to trimesh (#204) 2022-09-18 16:34:20 -07:00
Emmett Lalish c38c2b6022 updated wasm examples (#203) 2022-09-18 15:44:37 -07:00
pca006132 3464a9ca4f updated js binding (#201)
* JS API changes

* wasm cmake changes

add the js binding file and configure dependencies properly

* updated model-viewer example

* remove three.js specific APIs

* removed getGeometry
2022-09-11 09:06:44 -07:00
Emmett Lalish cc62c2c9dc model-viewer WASM example (#198)
* added what will become the model-viewer example

* model-viewer working

* cleanup
2022-09-08 16:04:31 -07:00
Emmett Lalish 73a53e0ff8 Removing export from python binding (#190)
* try python meshio

* removed meshIO dependency

* fixed to_mesh

* fix nix

* more nix fix
2022-09-05 09:29:28 -07:00
Emmett Lalish a7584bc7d3 updated for new files 2022-07-20 15:01:03 -07:00
Emmett Lalish 4add644d76 merging master 2022-07-20 14:54:45 -07:00
Emmett Lalish 63164bed95 fixing paths 2022-07-19 22:03:11 -07:00
Emmett Lalish 372f5170ec formatted bindings 2022-07-19 21:47:50 -07:00
Emmett Lalish d404b26d7a examples adjustments 2022-07-19 21:28:38 -07:00
Emmett Lalish 3b39bf2377 new directory structure 2022-07-18 22:01:03 -07:00