C3D Web Vision. - 3D , -. , C3D Web Vision. API, , C++ .
C3D Labs - . . C3D Viewer , -. C3D Vision, C3D Modeler, C3D Converter, -, C++, Qt. C3D Modeler C3D Converter , backend . Business logic TypeScript, . Vue. C3D Vision, Web Assembly, .
TypeScript
JavaScript, JavaScript. , , , , . TypeScript. , . , frontend- TypeScript. . 1 TypeScript, TypeScript JavaScript.
. 1
, TypeScript , JavaScript .
TypeScript JavaScript . , , , , . TypeScript. , JavaScript , backend node. JavaScript commonjs, umd, amd. , , . 2.
. 2
, TypeScript, umd-, . , .
Modules: commonjs, umd, amd
, , . package.json, JavaScript TypeScript. , npm, . . 3 npm-.
. 3
package.json, devDependencies, C3D Vision wasm. , . . , , node_modules, .
, webpack. Webpack , , TypeScript, , , node . .
Worker, , promise
, , . , . , , , , , . .
. 4 Task 1:
. 4
( - , - ), Task 2 Task 3. promise , . , , .
, (. 5). - -, , UI, . , , - , .
. 5
. webworker. Webworker (. 6), . worker shared . , shared worker . , . , .
. 6
. , () . , , .
Local store, offline mode
worker service worker. shared worker , , . , offline mode , . , , , . service worker , - . :
- IndexDB ;
- LocalStorage ;
- SessionStorage ;
- Storage , 50% .
API
HTML5 , canvas, 2D 3D-. 3D WebGl WebGl2. 2022 WebGL2 , WebGl2. API WebGL OpenGL ES, . , : , , glMapBufferRange, . glGetBufferSubData, OpenGl ES .
OpenGL, , shared context, . shared context ( ), shared context. offscreen context. , (canvas), , , , canvas. offscreen context shared web worker, . , , 3D- (. 7).
. 7
, , , .
2023 WebGPU Vulcan DirectX 12. , .
C++
, C++ . , Emscripten. C++ , JavaScript WebAssembly. Wasm , . . , JavaScript. . 8 , C++, , , output.
. 8
hello.js , - onRuntimeInitialized. , wasm binding, wasm.
emscripten CMake conan. conan- -, wasm. emsdk_installer. conan ( gcc) emcc. emsdk , . , OpenGL, OpenGL WebGl. , .
C++ JavaScript, (binding) Embind ( ) WebIDl.
. 9 , . Embind :
. 9
(. 10):
. 10
, JavaScript. definition, , TypeScript. JavaScript-, TypeScript, TypeScript definition .
C++ :
++ JavaScript, , wasm- promise . , TypeScript. , . wasm-: , , wasm- , . webpack, , wasm- ArrayBuffer .
, C++ . , , C++, , wasm- ( ). JavaScript garbage collector, ++ garbage collector , ++ array buffer. , .
. , OpenGl, , OpenGL. , OpenGL 4 . .
C++ JavaScript, . ++ - , JavaScript , , . ., C++ JavaScript . ++ JavaScript, . , . , . C++. C++, TypeScript , , wasm-. .
. C++ , . 11:
. 11
, , , , . var23, var24. , .
front- - C3D Web Vision. - . , - -.