update manifold. fix selection to sketch
This commit is contained in:
parent
ef06fdf876
commit
3b24ebe0d9
9 changed files with 10 additions and 58 deletions
|
|
@ -48,7 +48,7 @@
|
|||
"earcut": "^2.2.3",
|
||||
"express-useragent": "^1.0.13",
|
||||
"jszip": "^3.7.1",
|
||||
"manifold-3d": "^2.5.1",
|
||||
"manifold-3d": "^3.1.1",
|
||||
"moment": "^2.29.4",
|
||||
"serve-static": "^1.14.1",
|
||||
"three": "^0.174.0",
|
||||
|
|
|
|||
|
|
@ -2,12 +2,9 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
import { base } from './base.js';
|
||||
import { THREE } from '../ext/three.js';
|
||||
import manifold from '../ext/manifold.js';
|
||||
const { Mesh, BufferGeometry, Vector3 } = THREE;
|
||||
|
||||
const debug = true;
|
||||
const precision = 0.001;
|
||||
const factor = 1/precision;
|
||||
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import '../add/array.js';
|
|||
import '../add/class.js';
|
||||
import '../add/three.js';
|
||||
import '../mesh/build.js';
|
||||
|
||||
import { client as motoClient } from '../moto/client.js';
|
||||
import { broker as motoBroker } from '../moto/broker.js';
|
||||
import { space as motoSpace } from '../moto/space.js';
|
||||
|
|
@ -18,12 +19,13 @@ import { load as fileLoad } from '../load/file.js';
|
|||
import { $, $d, h, estop } from '../moto/webui.js';
|
||||
import { THREE } from '../ext/three.js';
|
||||
|
||||
const { Quaternion } = THREE;
|
||||
const version = '1.5.6';
|
||||
const version = '1.5.7';
|
||||
const api = meshApi;
|
||||
const call = motoBroker.send;
|
||||
const dbindex = [ "admin", "space" ];
|
||||
|
||||
const { Quaternion } = THREE;
|
||||
|
||||
function log() {
|
||||
return meshApi.log.emit(...arguments);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1115,7 +1115,7 @@ const tool = {
|
|||
},
|
||||
|
||||
toSketch() {
|
||||
for (let m of selection.models()) {
|
||||
for (let m of api.model.list()) {
|
||||
m.selectionToSketch();
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/** Copyright Stewart Allen <sa@grid.space> -- All Rights Reserved */
|
||||
|
||||
import { broker } from '../moto/broker.js';
|
||||
import { $, h } from '../moto/webui.js';
|
||||
import { $, h, estop } from '../moto/webui.js';
|
||||
import { api } from './api.js';
|
||||
import { util } from './util.js';
|
||||
import { space } from '../moto/space.js';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/** Copyright Stewart Allen <sa@grid.space> -- All Rights Reserved */
|
||||
|
||||
/**
|
||||
* facet edge selecetor. allows for creating new facets
|
||||
* facet edge selector. allows for creating new facets
|
||||
* when two connected edges share a single point.
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import "../ext/earcut.js";
|
|||
import '../add/array.js';
|
||||
import '../add/class.js';
|
||||
import '../add/three.js';
|
||||
|
||||
import { version } from '../moto/license.js';
|
||||
import { client as motoClient } from '../moto/client.js';
|
||||
import { worker } from '../moto/worker.js';
|
||||
|
|
@ -26,7 +27,7 @@ const work = { cache };
|
|||
motoClient.start(`/v2/lib/mesh/pool.js?${version}`, motoClient.max() * 0);
|
||||
|
||||
function log(msg) {
|
||||
return motoWorker.publish("mesh.log", msg);
|
||||
return worker.publish("mesh.log", msg);
|
||||
}
|
||||
|
||||
function cacheUpdate(id, data) {
|
||||
|
|
|
|||
|
|
@ -1,31 +0,0 @@
|
|||
# Mesh:Tool Development Server
|
||||
|
||||
This is the development server setup for Mesh:Tool, a browser-based 3D mesh editor.
|
||||
|
||||
## Running the Development Server
|
||||
|
||||
1. Make sure you have Node.js installed
|
||||
2. Install serve globally (optional):
|
||||
```bash
|
||||
npm install -g serve
|
||||
```
|
||||
3. Run the development server:
|
||||
```bash
|
||||
npx serve -l 5432
|
||||
```
|
||||
4. Open your browser to http://localhost:5432/mesh
|
||||
|
||||
## Development Notes
|
||||
|
||||
- The server is configured to handle symlinks and path mappings through `serve.json`
|
||||
- CORS headers are set to allow WebAssembly modules to load properly
|
||||
- Static assets are served from the `lib` directory
|
||||
- Source code is served from the `src2` directory
|
||||
- Fonts are served from `/font` and `/fon2` directories
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
If you encounter CORS or WebAssembly loading issues:
|
||||
1. Make sure you're using a modern browser that supports SharedArrayBuffer
|
||||
2. Check that the CORS headers are being applied correctly
|
||||
3. Verify that all paths in index.html are correct for your setup
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
{
|
||||
"headers": [
|
||||
{
|
||||
"source": "**/*",
|
||||
"headers": [
|
||||
{
|
||||
"key": "Cross-Origin-Embedder-Policy",
|
||||
"value": "require-corp"
|
||||
},
|
||||
{
|
||||
"key": "Cross-Origin-Opener-Policy",
|
||||
"value": "same-origin"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Loading…
Reference in a new issue