功能:导出ClipperCpp初始化函数
This commit is contained in:
parent
2282ac009b
commit
b9b4d06bed
24
api.cjs.js
24
api.cjs.js
@ -11,8 +11,8 @@ var Flatbush = require('flatbush');
|
||||
var geom3 = require('@jscad/modeling/src/geometries/geom3');
|
||||
var booleans = require('@jscad/modeling/src/operations/booleans');
|
||||
var poly3 = require('@jscad/modeling/src/geometries/poly3');
|
||||
var mobx = require('mobx');
|
||||
var clipperLib = require('js-angusj-clipper/web');
|
||||
var mobx = require('mobx');
|
||||
var polylabel = require('polylabel');
|
||||
|
||||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
||||
@ -38,6 +38,7 @@ function _interopNamespace(e) {
|
||||
var THREE__namespace = /*#__PURE__*/_interopNamespace(THREE);
|
||||
var Flatbush__default = /*#__PURE__*/_interopDefaultLegacy(Flatbush);
|
||||
var geom3__default = /*#__PURE__*/_interopDefaultLegacy(geom3);
|
||||
var clipperLib__namespace = /*#__PURE__*/_interopNamespace(clipperLib);
|
||||
var polylabel__default = /*#__PURE__*/_interopDefaultLegacy(polylabel);
|
||||
|
||||
/******************************************************************************
|
||||
@ -21205,6 +21206,23 @@ function EntitysUpdateWrap(ens, exec) {
|
||||
}
|
||||
}
|
||||
|
||||
let clipperCpp = {};
|
||||
function InitClipperCpp() {
|
||||
if (clipperCpp.lib)
|
||||
return;
|
||||
if (!globalThis.document)
|
||||
globalThis.document = {};
|
||||
return new Promise((res, rej) => {
|
||||
clipperLib__namespace.loadNativeClipperLibInstanceAsync(
|
||||
// let it autodetect which one to use, but also available WasmOnly and AsmJsOnly
|
||||
clipperLib__namespace.NativeClipperLibRequestedFormat.AsmJsOnly).then(c => {
|
||||
clipperCpp.lib = c;
|
||||
res();
|
||||
// console.log("载入成功!");//不再需要
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
exports.CreateObjectData = class CreateObjectData extends CADObject {
|
||||
/**
|
||||
* 如果是实体新建,那么不需要调用`Save`,历史记录会在命令结束的时候调用.
|
||||
@ -34508,8 +34526,6 @@ class GetArcParam {
|
||||
}
|
||||
}
|
||||
|
||||
let clipperCpp = {};
|
||||
|
||||
//点表面积
|
||||
function Area(pts) {
|
||||
let cnt = pts.length;
|
||||
@ -36231,6 +36247,7 @@ exports.FastDrillingMeshGeometry = FastDrillingMeshGeometry;
|
||||
exports.FastMeshGeometry = FastMeshGeometry;
|
||||
exports.GetBoxGeoBufferGeometry = GetBoxGeoBufferGeometry;
|
||||
exports.Groove = Groove;
|
||||
exports.InitClipperCpp = InitClipperCpp;
|
||||
exports.MaxDrawGrooveCount = MaxDrawGrooveCount;
|
||||
exports.RoomWallParse = RoomWallParse;
|
||||
exports.Shape2 = Shape2;
|
||||
@ -36243,4 +36260,5 @@ exports.UpdateTempPolyline = UpdateTempPolyline;
|
||||
exports.applyMixins = applyMixins;
|
||||
exports.boardUVGenerator = boardUVGenerator;
|
||||
exports.boardUVGenerator2 = boardUVGenerator2;
|
||||
exports.clipperCpp = clipperCpp;
|
||||
//# sourceMappingURL=api.cjs.js.map
|
||||
|
File diff suppressed because one or more lines are too long
24
api.esm.js
24
api.esm.js
@ -8,8 +8,9 @@ import Flatbush from 'flatbush';
|
||||
import geom3 from '@jscad/modeling/src/geometries/geom3';
|
||||
import { intersect } from '@jscad/modeling/src/operations/booleans';
|
||||
import { create } from '@jscad/modeling/src/geometries/poly3';
|
||||
import { observable } from 'mobx';
|
||||
import * as clipperLib from 'js-angusj-clipper/web';
|
||||
import { JoinType, EndType } from 'js-angusj-clipper/web';
|
||||
import { observable } from 'mobx';
|
||||
import polylabel from 'polylabel';
|
||||
|
||||
/******************************************************************************
|
||||
@ -21177,6 +21178,23 @@ function EntitysUpdateWrap(ens, exec) {
|
||||
}
|
||||
}
|
||||
|
||||
let clipperCpp = {};
|
||||
function InitClipperCpp() {
|
||||
if (clipperCpp.lib)
|
||||
return;
|
||||
if (!globalThis.document)
|
||||
globalThis.document = {};
|
||||
return new Promise((res, rej) => {
|
||||
clipperLib.loadNativeClipperLibInstanceAsync(
|
||||
// let it autodetect which one to use, but also available WasmOnly and AsmJsOnly
|
||||
clipperLib.NativeClipperLibRequestedFormat.AsmJsOnly).then(c => {
|
||||
clipperCpp.lib = c;
|
||||
res();
|
||||
// console.log("载入成功!");//不再需要
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
let CreateObjectData = class CreateObjectData extends CADObject {
|
||||
/**
|
||||
* 如果是实体新建,那么不需要调用`Save`,历史记录会在命令结束的时候调用.
|
||||
@ -34480,8 +34498,6 @@ class GetArcParam {
|
||||
}
|
||||
}
|
||||
|
||||
let clipperCpp = {};
|
||||
|
||||
//点表面积
|
||||
function Area(pts) {
|
||||
let cnt = pts.length;
|
||||
@ -36185,5 +36201,5 @@ function UpdateStartEndPoint(curve) {
|
||||
curve.EndPoint = ep;
|
||||
}
|
||||
|
||||
export { AlignedDimension, AllObjectData, AmbientLight, Arc, ArcDimension, AxisCS, BlockTable, BlockTableRecord, Board, BoxSolid, CADFactory, CADFiler, CURVE_FACE_TYPE_KEY, CURVE_MESH_NAMES, CameraSnapshootRecord, CameraType, CameraUpdate, Circle, CommandHistoryRecord, CompositeEntity, ContourTreeNode, ConverBoardTypeToSpaceType, CreateObjectData, Curve, CurveTapeShape, CylinderHole, Cylineder, Database, DepthType, DiameterDimension, Dimension, DirectionalLight, DisposeTextShapeCache, Ellipse, Entity, EntityColorHistoryRecord, EntityRef, EraseEntityData, ExtendType$1 as ExtendType, ExtrudeBuildConfig, ExtrudeGeometryBuilder, ExtrudeHole, ExtrudeSolid, FaceEntity, Factory, FastDrillingEdgeGeometry, FastDrillingMeshGeometry, FastMeshGeometry, GangDrillType, GetBoxGeoBufferGeometry, Groove, GroupRecord, GroupTable, HardwareCompositeEntity, HardwareTopline, HemisphereLight, HistoricManage, HistorycRecord, Hole, Light, Line, LineAngularDimension, LinearDimension, MaterialTableRecord, MaxDrawGrooveCount, ObjectAllDataHistoryRecord, ObjectCollection, PhysicalMaterialRecord, Point, PointLight, Polyline, Positioning, PositioningBoardSpace, PositioningClampSpace, PositioningTemporary, ProcessingGroupRecord, ProcessingGroupTable, RadiusDimension, RectAreaLight, Region, RemoveObjectData, RenderType, RevolveSolid, RoomBase, RoomFlatBase, RoomFlatFloor, RoomFlatTop, RoomHoleBase, RoomHoleLine, RoomHolePolyline, RoomRegion, RoomWallArc, RoomWallBase, RoomWallLine, RoomWallParse, Shape2, Spline, SpotLight, SubtractRange, SubtractRange2, SweepSolid, SymbolTable, Tape, TempPolyline$1 as TempPolyline, TempateDefaultParamCount, TempateThicknessAction, TemplateAction, TemplateBehindBoard, TemplateBoardRecord, TemplateFilletAction, TemplateLatticeRecord, TemplateLayerBoard, TemplateLeftRightBoardRecord, TemplateMoveAction, TemplateParam, TemplateRecord, TemplateSizeBoard, TemplateStretchGripAction, TemplateStretchScaleBoxAction, TemplateTable, TemplateTopBottomBoard, TemplateVerticalBoard, TemplateVisualSpace, TemplateWineRackRecord, Text, TextAligen, TextureTable, TextureTableRecord, ThicknessDirection, UVType, UpdateTempPolyline, ViewportEntity, ViewportEntity2, VisualSpaceBox, WallFaceType, applyMixins, boardUVGenerator, boardUVGenerator2 };
|
||||
export { AlignedDimension, AllObjectData, AmbientLight, Arc, ArcDimension, AxisCS, BlockTable, BlockTableRecord, Board, BoxSolid, CADFactory, CADFiler, CURVE_FACE_TYPE_KEY, CURVE_MESH_NAMES, CameraSnapshootRecord, CameraType, CameraUpdate, Circle, CommandHistoryRecord, CompositeEntity, ContourTreeNode, ConverBoardTypeToSpaceType, CreateObjectData, Curve, CurveTapeShape, CylinderHole, Cylineder, Database, DepthType, DiameterDimension, Dimension, DirectionalLight, DisposeTextShapeCache, Ellipse, Entity, EntityColorHistoryRecord, EntityRef, EraseEntityData, ExtendType$1 as ExtendType, ExtrudeBuildConfig, ExtrudeGeometryBuilder, ExtrudeHole, ExtrudeSolid, FaceEntity, Factory, FastDrillingEdgeGeometry, FastDrillingMeshGeometry, FastMeshGeometry, GangDrillType, GetBoxGeoBufferGeometry, Groove, GroupRecord, GroupTable, HardwareCompositeEntity, HardwareTopline, HemisphereLight, HistoricManage, HistorycRecord, Hole, InitClipperCpp, Light, Line, LineAngularDimension, LinearDimension, MaterialTableRecord, MaxDrawGrooveCount, ObjectAllDataHistoryRecord, ObjectCollection, PhysicalMaterialRecord, Point, PointLight, Polyline, Positioning, PositioningBoardSpace, PositioningClampSpace, PositioningTemporary, ProcessingGroupRecord, ProcessingGroupTable, RadiusDimension, RectAreaLight, Region, RemoveObjectData, RenderType, RevolveSolid, RoomBase, RoomFlatBase, RoomFlatFloor, RoomFlatTop, RoomHoleBase, RoomHoleLine, RoomHolePolyline, RoomRegion, RoomWallArc, RoomWallBase, RoomWallLine, RoomWallParse, Shape2, Spline, SpotLight, SubtractRange, SubtractRange2, SweepSolid, SymbolTable, Tape, TempPolyline$1 as TempPolyline, TempateDefaultParamCount, TempateThicknessAction, TemplateAction, TemplateBehindBoard, TemplateBoardRecord, TemplateFilletAction, TemplateLatticeRecord, TemplateLayerBoard, TemplateLeftRightBoardRecord, TemplateMoveAction, TemplateParam, TemplateRecord, TemplateSizeBoard, TemplateStretchGripAction, TemplateStretchScaleBoxAction, TemplateTable, TemplateTopBottomBoard, TemplateVerticalBoard, TemplateVisualSpace, TemplateWineRackRecord, Text, TextAligen, TextureTable, TextureTableRecord, ThicknessDirection, UVType, UpdateTempPolyline, ViewportEntity, ViewportEntity2, VisualSpaceBox, WallFaceType, applyMixins, boardUVGenerator, boardUVGenerator2, clipperCpp };
|
||||
//# sourceMappingURL=api.esm.js.map
|
||||
|
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "webcad_ue4_api",
|
||||
"version": "0.3.0",
|
||||
"version": "0.3.1",
|
||||
"description": "",
|
||||
"main": "api.esm.js",
|
||||
"module": "api.esm.js",
|
||||
|
@ -1 +1 @@
|
||||
{"version":3,"file":"ClipperCpp.d.ts","sourceRoot":"","sources":["../../../../src/Nest/Common/ClipperCpp.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,UAAU,MAAM,uBAAuB,CAAC;AAEpD,eAAO,IAAI,UAAU,EAAE;IAAE,GAAG,CAAC,EAAE,UAAU,CAAC,iBAAiB,CAAC;CAAO,CAAC;AACpE,wBAAgB,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC,CAiB9C"}
|
||||
{"version":3,"file":"ClipperCpp.d.ts","sourceRoot":"","sources":["../../../../src/Nest/Common/ClipperCpp.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,UAAU,MAAM,uBAAuB,CAAC;AAEpD,eAAO,IAAI,UAAU,EAAE;IAAE,GAAG,CAAC,EAAE,UAAU,CAAC,iBAAiB,CAAC;CAAO,CAAC;AACpE,wBAAgB,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC,CAmB9C"}
|
@ -1 +1 @@
|
||||
{"version":3,"file":"SyncDataReactor.d.ts","sourceRoot":"","sources":["../../../src/Reactor/SyncDataReactor.ts"],"names":[],"mappings":"AACA,OAAO,EAAkB,IAAI,EAAgB,MAAM,sBAAsB,CAAC;AAC1E,OAAO,EAAO,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAW7E,MAAM,WAAW,aAAa;IAE1B,GAAG,EAAE,IAAI,CAAC;IACV,MAAM,EAAE,IAAI,CAAC;IACb,MAAM,EAAE,IAAI,CAAC;CAChB;AAOD,qBAAa,eAAe;IAEZ,OAAO,CAAC,GAAG;gBAAH,GAAG,EAAE,kBAAkB;IAyF3C,OAAO,CAAC,QAAQ;CA4DnB"}
|
||||
{"version":3,"file":"SyncDataReactor.d.ts","sourceRoot":"","sources":["../../../src/Reactor/SyncDataReactor.ts"],"names":[],"mappings":"AACA,OAAO,EAAkB,IAAI,EAAgB,MAAM,sBAAsB,CAAC;AAC1E,OAAO,EAAO,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAY7E,MAAM,WAAW,aAAa;IAE1B,GAAG,EAAE,IAAI,CAAC;IACV,MAAM,EAAE,IAAI,CAAC;IACb,MAAM,EAAE,IAAI,CAAC;CAChB;AAOD,qBAAa,eAAe;IAEZ,OAAO,CAAC,GAAG;gBAAH,GAAG,EAAE,kBAAkB;IAyF3C,OAAO,CAAC,QAAQ;CAuEnB"}
|
1
types/ueapi.d.ts
vendored
1
types/ueapi.d.ts
vendored
@ -8,6 +8,7 @@ export * from "./Geometry/ExtrudeMeshGeomBuilder/ExtrudeEdgeGeometry2";
|
||||
export * from "./DatabaseServices/CADFactory";
|
||||
export * from "./DatabaseServices/Room/ParseService/RoomWallParse";
|
||||
export * from "./GraphicsSystem/RenderType";
|
||||
export * from "./Nest/Common/ClipperCpp";
|
||||
export * from "./entitys.exp";
|
||||
export * from "./DatabaseServices/CADFiler";
|
||||
export * from "./DatabaseServices/Database";
|
||||
|
@ -1 +1 @@
|
||||
{"version":3,"file":"ueapi.d.ts","sourceRoot":"","sources":["../../src/ueapi.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC;AAChD,cAAc,kCAAkC,CAAC;AACjD,cAAc,mCAAmC,CAAC;AAClD,cAAc,oCAAoC,CAAC;AACnD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wDAAwD,CAAC;AAGvE,cAAc,+BAA+B,CAAC;AAE9C,cAAc,oDAAoD,CAAC;AAGnE,cAAc,6BAA6B,CAAC;AAC5C,cAAc,eAAe,CAAC;AAC9B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC"}
|
||||
{"version":3,"file":"ueapi.d.ts","sourceRoot":"","sources":["../../src/ueapi.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC;AAChD,cAAc,kCAAkC,CAAC;AACjD,cAAc,mCAAmC,CAAC;AAClD,cAAc,oCAAoC,CAAC;AACnD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wDAAwD,CAAC;AAGvE,cAAc,+BAA+B,CAAC;AAE9C,cAAc,oDAAoD,CAAC;AAGnE,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0BAA0B,CAAC;AACzC,cAAc,eAAe,CAAC;AAC9B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC"}
|
Loading…
Reference in New Issue
Block a user