Skip to content

Commit d1b36a7

Browse files
authored
Merge pull request #18 from alpinebuster/dev
Dev
2 parents c19c733 + 53841f9 commit d1b36a7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+2372
-1872
lines changed

.vscode/c_cpp_properties.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
{
22
"configurations": [
3+
{
4+
"name": "Emscripten",
5+
"includePath": [
6+
"${workspaceFolder}/**",
7+
"${env:EMSDK}/upstream/emscripten/system/include",
8+
"${env:EMSDK}/upstream/emscripten"
9+
],
10+
"defines": [
11+
"__EMSCRIPTEN__"
12+
],
13+
"compilerPath": "/usr/bin/g++-13",
14+
"intelliSenseMode": "linux-gcc-x64",
15+
"cStandard": "c23",
16+
"cppStandard": "c++23"
17+
},
318
{
419
"name": "Linux",
520
"includePath": [

.vscode/meshsdk.code-workspace

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,8 @@
113113
"streambuf": "cpp",
114114
"system_error": "cpp",
115115
"thread": "cpp",
116-
"typeindex": "cpp"
116+
"typeindex": "cpp",
117+
"__config": "cpp"
117118
}
118119
}
119120
}

README.dotnet.md

Lines changed: 0 additions & 17 deletions
This file was deleted.

docker-compose.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ services:
4848
# Override the command to run your build process
4949
command: >
5050
bash -c "
51-
echo '=== MeshLib Emscripten Build (Multithreaded, 32-bit) ===' &&
51+
echo '=== MeshSDK Emscripten Build (Multithreaded, 32-bit) ===' &&
5252
echo 'Git submodules and thirdparty dependencies are pre-built in the Docker image.' &&
5353
ln -s /usr/local/lib/emscripten/bin /meshsdk/bin &&
5454
ln -s /usr/local/lib/emscripten/include /meshsdk/include &&
@@ -99,7 +99,7 @@ services:
9999
- DEBIAN_FRONTEND=noninteractive
100100
command: >
101101
bash -c "
102-
echo '=== MeshLib Emscripten Build (Single-threaded, 32-bit) ===' &&
102+
echo '=== MeshSDK Emscripten Build (Single-threaded, 32-bit) ===' &&
103103
echo 'Using pre-built singlethreaded thirdparty dependencies.' &&
104104
ln -s /usr/local/lib/emscripten-single/bin /meshsdk/bin &&
105105
ln -s /usr/local/lib/emscripten-single/include /meshsdk/include &&
@@ -146,7 +146,7 @@ services:
146146
- DEBIAN_FRONTEND=noninteractive
147147
command: >
148148
bash -c "
149-
echo '=== MeshLib Emscripten Build (Multithreaded, 64-bit WASM) ===' &&
149+
echo '=== MeshSDK Emscripten Build (Multithreaded, 64-bit WASM) ===' &&
150150
echo 'Using pre-built 64-bit WASM thirdparty dependencies.' &&
151151
ln -s /usr/local/lib/emscripten-wasm64/bin /meshsdk/bin &&
152152
ln -s /usr/local/lib/emscripten-wasm64/include /meshsdk/include &&

examples/web/threejs/editor/js/Editor.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -555,8 +555,7 @@ Editor.prototype = {
555555

556556
const wasmMesh = this.MeshSDK.Mesh.fromTrianglesMemoryView( jsVertices, jsIndices, true );
557557
try {
558-
const wasmMeshWrapper = new this.MeshSDK.MeshWrapper( wasmMesh );
559-
if ( wasmMeshWrapper ) this.addWasmObject( curM.uuid, wasmMeshWrapper );
558+
if ( wasmMesh ) this.addWasmObject( curM.uuid, wasmMesh );
560559
}
561560
finally {
562561
// IMPORTANT!!!

examples/web/threejs/editor/js/Loader.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,7 @@ function Loader( editor ) {
413413
reader.addEventListener( 'load', async function ( event ) {
414414
const contents = event.target.result;
415415

416+
///
416417
// NOTE: Wasm Object with emscripten memory views
417418
const uint8Array = new Uint8Array( contents );
418419
const ptr = editor.MeshSDK._malloc( uint8Array.byteLength );
@@ -425,17 +426,21 @@ function Loader( editor ) {
425426
reader.readAsArrayBuffer( file );
426427
return; // Exit the current function to avoid further processing
427428
}
428-
const mrmeshObj = result.meshWrapper;
429+
///
429430

431+
432+
///
430433
const { STLLoader } = await import( 'three/addons/loaders/STLLoader.js' );
431434

432435
const geometry = new STLLoader().parse( contents );
433436
const material = new THREE.MeshNormalMaterial();
434437

435438
const mesh = new THREE.Mesh( geometry, material );
436439
mesh.name = filename;
440+
///
441+
437442

438-
editor.execute( new AddObjectCommand( editor, mesh, null, null, mrmeshObj ) );
443+
editor.execute( new AddObjectCommand( editor, mesh, null, null, result.mesh ) );
439444

440445
// NOTE: Remember to free after processing
441446
editor.MeshSDK._free( ptr );

0 commit comments

Comments
 (0)