mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-06 16:33:15 +01:00
56 lines
No EOL
1.2 KiB
TypeScript
56 lines
No EOL
1.2 KiB
TypeScript
import {EngineAPI_V1} from "engine/api";
|
|
import {Vec3} from "math/vec";
|
|
import {Tessellation2D} from "engine/tessellation";
|
|
import {callEngine} from "engine/impl/wasm/interact";
|
|
|
|
export class GenericWASMEngine_V1 implements EngineAPI_V1 {
|
|
|
|
boolean(params) {
|
|
return callEngine(params, Module._SPI_boolean);
|
|
}
|
|
|
|
createBox(params) {
|
|
return callEngine(params, Module._SPI_box);
|
|
}
|
|
|
|
createCone(params) {
|
|
return callEngine(params, Module._SPI_cone);
|
|
}
|
|
|
|
createCylinder(params) {
|
|
return callEngine(params, Module._SPI_cylinder);
|
|
}
|
|
|
|
createSphere(params) {
|
|
return callEngine(params, Module._SPI_sphere);
|
|
}
|
|
|
|
createTorus(params) {
|
|
return callEngine(params, Module._SPI_torus);
|
|
}
|
|
|
|
extrude(params) {
|
|
return callEngine(params, Module._SPI_extrude);
|
|
}
|
|
|
|
fillet(params) {
|
|
return callEngine(params, Module._SPI_fillet);
|
|
}
|
|
|
|
loft(params) {
|
|
return callEngine(params, Module._SPI_loft);
|
|
}
|
|
|
|
loftPreview(params): Tessellation2D<Vec3> {
|
|
return callEngine(params, Module._SPI_loftPreview) as Tessellation2D<Vec3>;
|
|
}
|
|
|
|
revolve(params) {
|
|
return callEngine(params, Module._SPI_revolve);
|
|
}
|
|
|
|
stepImport(params) {
|
|
return callEngine(params, Module._SPI_stepImport);
|
|
}
|
|
|
|
} |