@bitbybit-dev/base 1.5.0 → 1.6.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/GlobalCDNProvider.js +1 -1
- package/lib/api/bearings/ansi-bearings.constants.d.ts +2 -0
- package/lib/api/bearings/ansi-bearings.constants.js +26 -0
- package/lib/api/bearings/ansi-bearings.d.ts +4 -0
- package/lib/api/bearings/ansi-bearings.js +14 -0
- package/lib/api/bearings/bearing-types.d.ts +25 -0
- package/lib/api/bearings/bearing-types.js +1 -0
- package/lib/api/bearings/bearings.constants.d.ts +1 -0
- package/lib/api/bearings/bearings.constants.js +1 -0
- package/lib/api/bearings/iso-bearings.constants.d.ts +2 -0
- package/lib/api/bearings/iso-bearings.constants.js +30 -0
- package/lib/api/bearings/iso-bearings.d.ts +4 -0
- package/lib/api/bearings/iso-bearings.js +14 -0
- package/lib/api/color-space.d.ts +2 -0
- package/lib/api/color-space.js +5 -8
- package/lib/api/fasteners/ansi-fasteners.constants.d.ts +16 -0
- package/lib/api/fasteners/ansi-fasteners.constants.js +118 -0
- package/lib/api/fasteners/ansi-fasteners.d.ts +8 -0
- package/lib/api/fasteners/ansi-fasteners.js +64 -0
- package/lib/api/fasteners/fastener-types.d.ts +161 -0
- package/lib/api/fasteners/fastener-types.js +1 -0
- package/lib/api/fasteners/fasteners.constants.d.ts +5 -0
- package/lib/api/fasteners/fasteners.constants.js +5 -0
- package/lib/api/fasteners/fasteners.d.ts +2 -0
- package/lib/api/fasteners/fasteners.js +9 -0
- package/lib/api/fasteners/iso-fasteners.constants.d.ts +23 -0
- package/lib/api/fasteners/iso-fasteners.constants.js +110 -0
- package/lib/api/fasteners/iso-fasteners.d.ts +9 -0
- package/lib/api/fasteners/iso-fasteners.js +61 -0
- package/lib/api/gears/bevel-gears.d.ts +6 -0
- package/lib/api/gears/bevel-gears.js +69 -0
- package/lib/api/gears/gear-checks.d.ts +8 -0
- package/lib/api/gears/gear-checks.js +69 -0
- package/lib/api/gears/gear-pairs.d.ts +4 -0
- package/lib/api/gears/gear-pairs.js +140 -0
- package/lib/api/gears/gear-types.d.ts +425 -0
- package/lib/api/gears/gear-types.js +1 -0
- package/lib/api/gears/gears.constants.d.ts +19 -0
- package/lib/api/gears/gears.constants.js +19 -0
- package/lib/api/gears/gears.d.ts +10 -0
- package/lib/api/gears/gears.js +156 -0
- package/lib/api/gears/helical-gears.d.ts +5 -0
- package/lib/api/gears/helical-gears.js +33 -0
- package/lib/api/gears/involute-flank.d.ts +26 -0
- package/lib/api/gears/involute-flank.js +158 -0
- package/lib/api/gears/racks.d.ts +3 -0
- package/lib/api/gears/racks.js +64 -0
- package/lib/api/index.d.ts +10 -1
- package/lib/api/index.js +0 -1
- package/lib/api/inputs/base-inputs.d.ts +450 -3
- package/lib/api/inputs/base-inputs.js +12 -0
- package/lib/api/inputs/color-inputs.d.ts +14 -0
- package/lib/api/inputs/color-inputs.js +19 -0
- package/lib/api/inputs/engineering-inputs.d.ts +1539 -0
- package/lib/api/inputs/engineering-inputs.js +2181 -0
- package/lib/api/inputs/index.d.ts +2 -0
- package/lib/api/inputs/index.js +2 -0
- package/lib/api/inputs/io-inputs.d.ts +8 -1
- package/lib/api/inputs/io-inputs.js +4 -1
- package/lib/api/inputs/math-inputs.d.ts +61 -0
- package/lib/api/inputs/math-inputs.js +85 -0
- package/lib/api/inputs/mesh-inputs.d.ts +170 -0
- package/lib/api/inputs/mesh-inputs.js +206 -0
- package/lib/api/inputs/point-inputs.d.ts +4 -4
- package/lib/api/inputs/polyline-inputs.d.ts +144 -0
- package/lib/api/inputs/polyline-inputs.js +151 -0
- package/lib/api/inputs/recipes-inputs.d.ts +76 -0
- package/lib/api/inputs/recipes-inputs.js +74 -0
- package/lib/api/inputs/transforms-inputs.d.ts +34 -0
- package/lib/api/inputs/transforms-inputs.js +35 -0
- package/lib/api/keys/ansi-keys.constants.d.ts +3 -0
- package/lib/api/keys/ansi-keys.constants.js +16 -0
- package/lib/api/keys/ansi-keys.d.ts +3 -0
- package/lib/api/keys/ansi-keys.js +14 -0
- package/lib/api/keys/din-keys.constants.d.ts +3 -0
- package/lib/api/keys/din-keys.constants.js +14 -0
- package/lib/api/keys/din-keys.d.ts +3 -0
- package/lib/api/keys/din-keys.js +13 -0
- package/lib/api/keys/key-types.d.ts +17 -0
- package/lib/api/keys/key-types.js +1 -0
- package/lib/api/keys/keys.constants.d.ts +1 -0
- package/lib/api/keys/keys.constants.js +1 -0
- package/lib/api/knurls/ansi-knurls.constants.d.ts +4 -0
- package/lib/api/knurls/ansi-knurls.constants.js +8 -0
- package/lib/api/knurls/ansi-knurls.d.ts +3 -0
- package/lib/api/knurls/ansi-knurls.js +20 -0
- package/lib/api/knurls/din-knurls.constants.d.ts +2 -0
- package/lib/api/knurls/din-knurls.constants.js +2 -0
- package/lib/api/knurls/din-knurls.d.ts +3 -0
- package/lib/api/knurls/din-knurls.js +19 -0
- package/lib/api/knurls/knurl-types.d.ts +24 -0
- package/lib/api/knurls/knurl-types.js +1 -0
- package/lib/api/knurls/knurls.constants.d.ts +1 -0
- package/lib/api/knurls/knurls.constants.js +1 -0
- package/lib/api/knurls/knurls.d.ts +2 -0
- package/lib/api/knurls/knurls.js +9 -0
- package/lib/api/recipes/checks.d.ts +15 -0
- package/lib/api/recipes/checks.js +85 -0
- package/lib/api/recipes/limits.constants.d.ts +4 -0
- package/lib/api/recipes/limits.constants.js +4 -0
- package/lib/api/recipes/sources.d.ts +0 -13
- package/lib/api/recipes/sources.js +3 -15
- package/lib/api/recipes/surface-mesh.d.ts +0 -14
- package/lib/api/recipes/surface-mesh.js +8 -21
- package/lib/api/recipes/validate-brep.d.ts +2 -0
- package/lib/api/recipes/validate-brep.js +330 -0
- package/lib/api/recipes/validate.d.ts +0 -31
- package/lib/api/recipes/validate.js +7 -115
- package/lib/api/resolved-inputs/index.d.ts +80 -0
- package/lib/api/retaining-rings/ansi-retaining-rings.constants.d.ts +4 -0
- package/lib/api/retaining-rings/ansi-retaining-rings.constants.js +93 -0
- package/lib/api/retaining-rings/ansi-retaining-rings.d.ts +4 -0
- package/lib/api/retaining-rings/ansi-retaining-rings.js +20 -0
- package/lib/api/retaining-rings/din-retaining-rings.constants.d.ts +3 -0
- package/lib/api/retaining-rings/din-retaining-rings.constants.js +115 -0
- package/lib/api/retaining-rings/din-retaining-rings.d.ts +4 -0
- package/lib/api/retaining-rings/din-retaining-rings.js +20 -0
- package/lib/api/retaining-rings/retaining-ring-types.d.ts +30 -0
- package/lib/api/retaining-rings/retaining-ring-types.js +1 -0
- package/lib/api/retaining-rings/retaining-rings.constants.d.ts +1 -0
- package/lib/api/retaining-rings/retaining-rings.constants.js +1 -0
- package/lib/api/retaining-rings/retaining-rings.d.ts +2 -0
- package/lib/api/retaining-rings/retaining-rings.js +9 -0
- package/lib/api/services/base-bitbybit.d.ts +42 -0
- package/lib/api/services/base-bitbybit.js +43 -0
- package/lib/api/services/color.d.ts +35 -2
- package/lib/api/services/color.js +48 -12
- package/lib/api/services/engineering/engineering.d.ts +12 -0
- package/lib/api/services/engineering/engineering.js +13 -0
- package/lib/api/services/engineering/index.d.ts +2 -0
- package/lib/api/services/engineering/index.js +2 -0
- package/lib/api/services/engineering/mechanical/bearings-ansi.d.ts +40 -0
- package/lib/api/services/engineering/mechanical/bearings-ansi.js +47 -0
- package/lib/api/services/engineering/mechanical/bearings-iso.d.ts +39 -0
- package/lib/api/services/engineering/mechanical/bearings-iso.js +46 -0
- package/lib/api/services/engineering/mechanical/bearings.d.ts +14 -0
- package/lib/api/services/engineering/mechanical/bearings.js +15 -0
- package/lib/api/services/engineering/mechanical/fasteners-ansi.d.ts +109 -0
- package/lib/api/services/engineering/mechanical/fasteners-ansi.js +133 -0
- package/lib/api/services/engineering/mechanical/fasteners-iso.d.ts +123 -0
- package/lib/api/services/engineering/mechanical/fasteners-iso.js +151 -0
- package/lib/api/services/engineering/mechanical/fasteners.d.ts +13 -0
- package/lib/api/services/engineering/mechanical/fasteners.js +14 -0
- package/lib/api/services/engineering/mechanical/gears.d.ts +267 -0
- package/lib/api/services/engineering/mechanical/gears.js +318 -0
- package/lib/api/services/engineering/mechanical/index.d.ts +24 -0
- package/lib/api/services/engineering/mechanical/index.js +24 -0
- package/lib/api/services/engineering/mechanical/keys-ansi.d.ts +27 -0
- package/lib/api/services/engineering/mechanical/keys-ansi.js +32 -0
- package/lib/api/services/engineering/mechanical/keys-din.d.ts +26 -0
- package/lib/api/services/engineering/mechanical/keys-din.js +31 -0
- package/lib/api/services/engineering/mechanical/keys.d.ts +14 -0
- package/lib/api/services/engineering/mechanical/keys.js +15 -0
- package/lib/api/services/engineering/mechanical/knurls-ansi.d.ts +26 -0
- package/lib/api/services/engineering/mechanical/knurls-ansi.js +31 -0
- package/lib/api/services/engineering/mechanical/knurls-din.d.ts +26 -0
- package/lib/api/services/engineering/mechanical/knurls-din.js +31 -0
- package/lib/api/services/engineering/mechanical/knurls.d.ts +14 -0
- package/lib/api/services/engineering/mechanical/knurls.js +15 -0
- package/lib/api/services/engineering/mechanical/mechanical.d.ts +29 -0
- package/lib/api/services/engineering/mechanical/mechanical.js +30 -0
- package/lib/api/services/engineering/mechanical/retaining-rings-ansi.d.ts +43 -0
- package/lib/api/services/engineering/mechanical/retaining-rings-ansi.js +51 -0
- package/lib/api/services/engineering/mechanical/retaining-rings-din.d.ts +43 -0
- package/lib/api/services/engineering/mechanical/retaining-rings-din.js +51 -0
- package/lib/api/services/engineering/mechanical/retaining-rings.d.ts +13 -0
- package/lib/api/services/engineering/mechanical/retaining-rings.js +14 -0
- package/lib/api/services/engineering/mechanical/splines-ansi.d.ts +27 -0
- package/lib/api/services/engineering/mechanical/splines-ansi.js +32 -0
- package/lib/api/services/engineering/mechanical/splines-din.d.ts +26 -0
- package/lib/api/services/engineering/mechanical/splines-din.js +31 -0
- package/lib/api/services/engineering/mechanical/splines.d.ts +13 -0
- package/lib/api/services/engineering/mechanical/splines.js +14 -0
- package/lib/api/services/engineering/mechanical/springs.d.ts +27 -0
- package/lib/api/services/engineering/mechanical/springs.js +31 -0
- package/lib/api/services/engineering/mechanical/threads-ansi.d.ts +40 -0
- package/lib/api/services/engineering/mechanical/threads-ansi.js +48 -0
- package/lib/api/services/engineering/mechanical/threads-iso.d.ts +40 -0
- package/lib/api/services/engineering/mechanical/threads-iso.js +48 -0
- package/lib/api/services/engineering/mechanical/threads.d.ts +13 -0
- package/lib/api/services/engineering/mechanical/threads.js +14 -0
- package/lib/api/services/frame.js +3 -3
- package/lib/api/services/geometry-helper.js +8 -111
- package/lib/api/services/helpers/color/color-space.d.ts +2 -0
- package/lib/api/services/helpers/color/color-space.js +12 -0
- package/lib/api/services/helpers/{nurbs.d.ts → curves/nurbs.d.ts} +1 -1
- package/lib/api/services/helpers/{surface-triangulation.d.ts → curves/surface-triangulation.d.ts} +2 -2
- package/lib/api/services/helpers/{surface-triangulation.js → curves/surface-triangulation.js} +14 -8
- package/lib/api/services/helpers/{dxf → files/dxf}/dxf-generator.d.ts +2 -1
- package/lib/api/services/helpers/{dxf → files/dxf}/dxf-generator.js +19 -5
- package/lib/api/services/helpers/files/dxf/dxf.constants.d.ts +4 -0
- package/lib/api/services/helpers/files/dxf/dxf.constants.js +4 -0
- package/lib/api/services/helpers/{dxf → files/dxf}/dxf.d.ts +1 -1
- package/lib/api/services/helpers/{dxf → files/dxf}/dxf.js +2 -2
- package/lib/api/services/helpers/files/glb.constants.d.ts +11 -0
- package/lib/api/services/helpers/files/glb.constants.js +11 -0
- package/lib/api/services/helpers/files/glb.d.ts +1 -0
- package/lib/api/services/helpers/files/glb.js +69 -0
- package/lib/api/services/helpers/files/gzip.constants.d.ts +11 -0
- package/lib/api/services/helpers/files/gzip.constants.js +11 -0
- package/lib/api/services/helpers/files/gzip.d.ts +2 -0
- package/lib/api/services/helpers/files/gzip.js +52 -0
- package/lib/api/services/helpers/{inflate.constants.d.ts → files/inflate.constants.d.ts} +1 -0
- package/lib/api/services/helpers/{inflate.constants.js → files/inflate.constants.js} +1 -0
- package/lib/api/services/helpers/{inflate.d.ts → files/inflate.d.ts} +1 -1
- package/lib/api/services/helpers/{inflate.js → files/inflate.js} +5 -4
- package/lib/api/services/helpers/{zip.d.ts → files/zip.d.ts} +1 -1
- package/lib/api/services/helpers/geometry/arcs.d.ts +9 -0
- package/lib/api/services/helpers/{arcs.js → geometry/arcs.js} +7 -0
- package/lib/api/services/helpers/{frame-axes.d.ts → geometry/frame-axes.d.ts} +8 -5
- package/lib/api/services/helpers/{frame-axes.js → geometry/frame-axes.js} +21 -9
- package/lib/api/services/helpers/geometry/lengths.constants.d.ts +4 -0
- package/lib/api/services/helpers/geometry/lengths.constants.js +3 -0
- package/lib/api/services/helpers/geometry/lengths.d.ts +7 -0
- package/lib/api/services/helpers/geometry/lengths.js +20 -0
- package/lib/api/services/helpers/geometry/matrices.constants.d.ts +8 -0
- package/lib/api/services/helpers/geometry/matrices.constants.js +7 -0
- package/lib/api/services/helpers/geometry/matrices.d.ts +17 -0
- package/lib/api/services/helpers/{matrices.js → geometry/matrices.js} +28 -17
- package/lib/api/services/helpers/{paths.d.ts → geometry/paths.d.ts} +2 -1
- package/lib/api/services/helpers/{paths.js → geometry/paths.js} +36 -30
- package/lib/api/services/helpers/{polygons.d.ts → geometry/polygons.d.ts} +1 -1
- package/lib/api/services/helpers/geometry/polygons.js +111 -0
- package/lib/api/services/helpers/geometry/scalars.d.ts +9 -0
- package/lib/api/services/helpers/geometry/scalars.js +34 -0
- package/lib/api/services/helpers/{triangulation.js → geometry/triangulation.js} +11 -6
- package/lib/api/services/helpers/geometry/vector-grid.d.ts +12 -0
- package/lib/api/services/helpers/geometry/vector-grid.js +149 -0
- package/lib/api/services/helpers/{vectors.d.ts → geometry/vectors.d.ts} +8 -1
- package/lib/api/services/helpers/geometry/vectors.js +43 -0
- package/lib/api/services/helpers/helper-types.d.ts +57 -0
- package/lib/api/services/helpers/mesh/mesh-normals.d.ts +21 -0
- package/lib/api/services/helpers/{mesh-normals.js → mesh/mesh-normals.js} +54 -65
- package/lib/api/services/helpers/mesh/mesh-orientation.d.ts +24 -0
- package/lib/api/services/helpers/mesh/mesh-orientation.js +104 -0
- package/lib/api/services/helpers/{mesh-primitives.d.ts → mesh/mesh-primitives.d.ts} +1 -1
- package/lib/api/services/helpers/{mesh-primitives.js → mesh/mesh-primitives.js} +6 -5
- package/lib/api/services/helpers/mesh/mesh-proximity.constants.d.ts +7 -0
- package/lib/api/services/helpers/mesh/mesh-proximity.constants.js +11 -0
- package/lib/api/services/helpers/mesh/mesh-proximity.d.ts +11 -0
- package/lib/api/services/helpers/mesh/mesh-proximity.js +382 -0
- package/lib/api/services/index.d.ts +3 -0
- package/lib/api/services/index.js +3 -0
- package/lib/api/services/io.d.ts +1 -1
- package/lib/api/services/io.js +1 -1
- package/lib/api/services/line.js +2 -3
- package/lib/api/services/math.d.ts +47 -0
- package/lib/api/services/math.js +77 -10
- package/lib/api/services/mesh.d.ts +174 -2
- package/lib/api/services/mesh.js +305 -7
- package/lib/api/services/point.js +4 -10
- package/lib/api/services/polyline-types.d.ts +6 -0
- package/lib/api/services/polyline-types.js +1 -0
- package/lib/api/services/polyline.d.ts +163 -1
- package/lib/api/services/polyline.js +270 -13
- package/lib/api/services/recipes.d.ts +80 -0
- package/lib/api/services/recipes.js +107 -0
- package/lib/api/services/transforms.d.ts +74 -2
- package/lib/api/services/transforms.js +100 -3
- package/lib/api/services/vector.d.ts +4 -3
- package/lib/api/services/vector.js +14 -14
- package/lib/api/splines/ansi-splines.constants.d.ts +9 -0
- package/lib/api/splines/ansi-splines.constants.js +9 -0
- package/lib/api/splines/ansi-splines.d.ts +3 -0
- package/lib/api/splines/ansi-splines.js +28 -0
- package/lib/api/splines/din-splines.constants.d.ts +12 -0
- package/lib/api/splines/din-splines.constants.js +12 -0
- package/lib/api/splines/din-splines.d.ts +3 -0
- package/lib/api/splines/din-splines.js +38 -0
- package/lib/api/splines/spline-types.d.ts +32 -0
- package/lib/api/splines/spline-types.js +1 -0
- package/lib/api/splines/splines.constants.d.ts +1 -0
- package/lib/api/splines/splines.constants.js +1 -0
- package/lib/api/springs/spring-types.d.ts +26 -0
- package/lib/api/springs/spring-types.js +1 -0
- package/lib/api/springs/springs.constants.d.ts +9 -0
- package/lib/api/springs/springs.constants.js +9 -0
- package/lib/api/springs/springs.d.ts +2 -0
- package/lib/api/springs/springs.js +50 -0
- package/lib/api/threads/ansi-threads.constants.d.ts +6 -0
- package/lib/api/threads/ansi-threads.constants.js +27 -0
- package/lib/api/threads/ansi-threads.d.ts +4 -0
- package/lib/api/threads/ansi-threads.js +50 -0
- package/lib/api/threads/iso-threads.constants.d.ts +5 -0
- package/lib/api/threads/iso-threads.constants.js +20 -0
- package/lib/api/threads/iso-threads.d.ts +4 -0
- package/lib/api/threads/iso-threads.js +32 -0
- package/lib/api/threads/thread-profile.constants.d.ts +3 -0
- package/lib/api/threads/thread-profile.constants.js +3 -0
- package/lib/api/threads/thread-types.d.ts +66 -0
- package/lib/api/threads/thread-types.js +1 -0
- package/package.json +1 -1
- package/lib/api/recipes/index.d.ts +0 -4
- package/lib/api/recipes/index.js +0 -3
- package/lib/api/services/helpers/arcs.d.ts +0 -6
- package/lib/api/services/helpers/matrices.constants.d.ts +0 -2
- package/lib/api/services/helpers/matrices.constants.js +0 -2
- package/lib/api/services/helpers/matrices.d.ts +0 -25
- package/lib/api/services/helpers/mesh-normals.d.ts +0 -11
- package/lib/api/services/helpers/polygons.js +0 -59
- package/lib/api/services/helpers/vectors.js +0 -17
- /package/lib/api/services/helpers/{nurbs.js → curves/nurbs.js} +0 -0
- /package/lib/api/services/helpers/{crc32.d.ts → files/crc32.d.ts} +0 -0
- /package/lib/api/services/helpers/{crc32.js → files/crc32.js} +0 -0
- /package/lib/api/services/helpers/{zip.constants.d.ts → files/zip.constants.d.ts} +0 -0
- /package/lib/api/services/helpers/{zip.constants.js → files/zip.constants.js} +0 -0
- /package/lib/api/services/helpers/{zip.js → files/zip.js} +0 -0
- /package/lib/api/services/helpers/{triangulation.d.ts → geometry/triangulation.d.ts} +0 -0
- /package/lib/api/services/helpers/{mesh-measures.d.ts → mesh/mesh-measures.d.ts} +0 -0
- /package/lib/api/services/helpers/{mesh-measures.js → mesh/mesh-measures.js} +0 -0
- /package/lib/api/services/helpers/{mesh-primitives.constants.d.ts → mesh/mesh-primitives.constants.d.ts} +0 -0
- /package/lib/api/services/helpers/{mesh-primitives.constants.js → mesh/mesh-primitives.constants.js} +0 -0
|
@@ -97,6 +97,28 @@ export declare namespace Base {
|
|
|
97
97
|
* repeating coordinates.
|
|
98
98
|
*/
|
|
99
99
|
type Mesh3 = Triangle3[];
|
|
100
|
+
/**
|
|
101
|
+
* A mesh whose points are stored once and whose triangles refer to them by number, the layout
|
|
102
|
+
* glTF and game engines draw. `positions` holds x, y, z for each point in turn, `indices` three
|
|
103
|
+
* point numbers, counted from 0, for each triangle, and `normals`, when present, one direction
|
|
104
|
+
* x, y, z for each point. Triangles that share a corner share its number, which is how the mesh
|
|
105
|
+
* knows its neighbours.
|
|
106
|
+
*/
|
|
107
|
+
type IndexedMesh = {
|
|
108
|
+
positions: number[];
|
|
109
|
+
indices: number[];
|
|
110
|
+
normals?: number[];
|
|
111
|
+
};
|
|
112
|
+
/**
|
|
113
|
+
* The connected pieces of a mesh, and the triangles to turn over so that each piece is wound one
|
|
114
|
+
* way. `turnOver` and `pieces` hold one entry per triangle, in the mesh's order; pieces are
|
|
115
|
+
* numbered from 0 and `count` says how many there are.
|
|
116
|
+
*/
|
|
117
|
+
type MeshWindingPieces = {
|
|
118
|
+
turnOver: boolean[];
|
|
119
|
+
pieces: number[];
|
|
120
|
+
count: number;
|
|
121
|
+
};
|
|
100
122
|
/**
|
|
101
123
|
* A coordinate frame: an origin, a normal (its z axis) and a direction (its x axis, square to the
|
|
102
124
|
* normal); its y axis is the normal crossed with the direction, so the frame is right-handed. A
|
|
@@ -192,8 +214,9 @@ export declare namespace Base {
|
|
|
192
214
|
interface RecipeBuffers {
|
|
193
215
|
/**
|
|
194
216
|
* Coordinates: flat `x, y` pairs for polygons, `x, y, z` triples for triangle positions and
|
|
195
|
-
* sixteen numbers for each frame of a loft
|
|
196
|
-
*
|
|
217
|
+
* vertices, sixteen numbers for each frame of a loft, and the control points, weights and
|
|
218
|
+
* knots of a brep node's curves and surfaces. Every number in it is finite and between minus
|
|
219
|
+
* and plus one billion.
|
|
197
220
|
*/
|
|
198
221
|
f64: Float64Array;
|
|
199
222
|
/**
|
|
@@ -451,11 +474,424 @@ export declare namespace Base {
|
|
|
451
474
|
*/
|
|
452
475
|
frames: RecipeRange;
|
|
453
476
|
}
|
|
477
|
+
/**
|
|
478
|
+
* Where a curve or surface of a brep node sits: an origin, its local Z axis and its local X
|
|
479
|
+
* axis, as IFC's and STEP's axis placements give them. The X axis is made square to the Z axis
|
|
480
|
+
* before use.
|
|
481
|
+
* @beta
|
|
482
|
+
*/
|
|
483
|
+
interface RecipeBrepPlacement {
|
|
484
|
+
/**
|
|
485
|
+
* The local origin.
|
|
486
|
+
*/
|
|
487
|
+
origin: Point3;
|
|
488
|
+
/**
|
|
489
|
+
* The local Z axis: the normal of a plane, the axis of a cylinder, cone, sphere, torus or
|
|
490
|
+
* circle. Not a zero vector.
|
|
491
|
+
*/
|
|
492
|
+
axis: Vector3;
|
|
493
|
+
/**
|
|
494
|
+
* The local X axis, where a circle's or a surface's parameters start. Not a zero vector, and
|
|
495
|
+
* not along `axis`.
|
|
496
|
+
*/
|
|
497
|
+
xDirection: Vector3;
|
|
498
|
+
}
|
|
499
|
+
/**
|
|
500
|
+
* A straight line through `origin` along `direction`.
|
|
501
|
+
* @beta
|
|
502
|
+
*/
|
|
503
|
+
interface RecipeBrepLine {
|
|
504
|
+
/**
|
|
505
|
+
* Always `line`.
|
|
506
|
+
*/
|
|
507
|
+
kind: "line";
|
|
508
|
+
/**
|
|
509
|
+
* A point on the line.
|
|
510
|
+
*/
|
|
511
|
+
origin: Point3;
|
|
512
|
+
/**
|
|
513
|
+
* The line's direction, not a zero vector.
|
|
514
|
+
*/
|
|
515
|
+
direction: Vector3;
|
|
516
|
+
}
|
|
517
|
+
/**
|
|
518
|
+
* A circle about its placement's axis, starting on its X axis.
|
|
519
|
+
* @beta
|
|
520
|
+
*/
|
|
521
|
+
interface RecipeBrepCircle extends RecipeBrepPlacement {
|
|
522
|
+
/**
|
|
523
|
+
* Always `circle`.
|
|
524
|
+
*/
|
|
525
|
+
kind: "circle";
|
|
526
|
+
/**
|
|
527
|
+
* The radius, above zero.
|
|
528
|
+
*/
|
|
529
|
+
radius: number;
|
|
530
|
+
}
|
|
531
|
+
/**
|
|
532
|
+
* An ellipse about its placement's axis, with one semi-axis along its X axis and the other
|
|
533
|
+
* square to it; either may be the longer.
|
|
534
|
+
* @beta
|
|
535
|
+
*/
|
|
536
|
+
interface RecipeBrepEllipse extends RecipeBrepPlacement {
|
|
537
|
+
/**
|
|
538
|
+
* Always `ellipse`.
|
|
539
|
+
*/
|
|
540
|
+
kind: "ellipse";
|
|
541
|
+
/**
|
|
542
|
+
* The semi-axis along the placement's X axis, above zero.
|
|
543
|
+
*/
|
|
544
|
+
xRadius: number;
|
|
545
|
+
/**
|
|
546
|
+
* The semi-axis square to it, above zero.
|
|
547
|
+
*/
|
|
548
|
+
yRadius: number;
|
|
549
|
+
}
|
|
550
|
+
/**
|
|
551
|
+
* A B-spline curve, rational when it has weights, with its knots and their multiplicities as
|
|
552
|
+
* STEP and IFC write them: knots rising, and the multiplicities adding up to the number of
|
|
553
|
+
* control points plus the degree plus one.
|
|
554
|
+
* @beta
|
|
555
|
+
*/
|
|
556
|
+
interface RecipeBrepBSplineCurve {
|
|
557
|
+
/**
|
|
558
|
+
* Always `bspline`.
|
|
559
|
+
*/
|
|
560
|
+
kind: "bspline";
|
|
561
|
+
/**
|
|
562
|
+
* The degree, from 1 to 25.
|
|
563
|
+
*/
|
|
564
|
+
degree: number;
|
|
565
|
+
/**
|
|
566
|
+
* A range of `x, y, z` triples in `f64`: the control points, at least the degree plus one.
|
|
567
|
+
*/
|
|
568
|
+
points: RecipeRange;
|
|
569
|
+
/**
|
|
570
|
+
* A range in `f64` with one weight above zero per control point; left out for a curve that
|
|
571
|
+
* is not rational.
|
|
572
|
+
*/
|
|
573
|
+
weights?: RecipeRange | undefined;
|
|
574
|
+
/**
|
|
575
|
+
* A range in `f64` holding the distinct knots, rising.
|
|
576
|
+
*/
|
|
577
|
+
knots: RecipeRange;
|
|
578
|
+
/**
|
|
579
|
+
* How many times each knot repeats, one whole number above zero per knot.
|
|
580
|
+
*/
|
|
581
|
+
multiplicities: number[];
|
|
582
|
+
}
|
|
583
|
+
/**
|
|
584
|
+
* A curve an edge of a brep node lies on.
|
|
585
|
+
* @beta
|
|
586
|
+
*/
|
|
587
|
+
type RecipeBrepCurve = RecipeBrepLine | RecipeBrepCircle | RecipeBrepEllipse | RecipeBrepBSplineCurve;
|
|
588
|
+
/**
|
|
589
|
+
* A plane through its placement's origin, square to its axis.
|
|
590
|
+
* @beta
|
|
591
|
+
*/
|
|
592
|
+
interface RecipeBrepPlane extends RecipeBrepPlacement {
|
|
593
|
+
/**
|
|
594
|
+
* Always `plane`.
|
|
595
|
+
*/
|
|
596
|
+
kind: "plane";
|
|
597
|
+
}
|
|
598
|
+
/**
|
|
599
|
+
* A cylinder about its placement's axis.
|
|
600
|
+
* @beta
|
|
601
|
+
*/
|
|
602
|
+
interface RecipeBrepCylinder extends RecipeBrepPlacement {
|
|
603
|
+
/**
|
|
604
|
+
* Always `cylinder`.
|
|
605
|
+
*/
|
|
606
|
+
kind: "cylinder";
|
|
607
|
+
/**
|
|
608
|
+
* The radius, above zero.
|
|
609
|
+
*/
|
|
610
|
+
radius: number;
|
|
611
|
+
}
|
|
612
|
+
/**
|
|
613
|
+
* A cone about its placement's axis, widening along it.
|
|
614
|
+
* @beta
|
|
615
|
+
*/
|
|
616
|
+
interface RecipeBrepCone extends RecipeBrepPlacement {
|
|
617
|
+
/**
|
|
618
|
+
* Always `cone`.
|
|
619
|
+
*/
|
|
620
|
+
kind: "cone";
|
|
621
|
+
/**
|
|
622
|
+
* The radius in the plane through the origin square to the axis, zero or above.
|
|
623
|
+
*/
|
|
624
|
+
radius: number;
|
|
625
|
+
/**
|
|
626
|
+
* The angle between the axis and the cone's side, in radians, above zero and below a
|
|
627
|
+
* quarter turn.
|
|
628
|
+
*/
|
|
629
|
+
semiAngle: number;
|
|
630
|
+
}
|
|
631
|
+
/**
|
|
632
|
+
* A sphere about its placement's origin.
|
|
633
|
+
* @beta
|
|
634
|
+
*/
|
|
635
|
+
interface RecipeBrepSphere extends RecipeBrepPlacement {
|
|
636
|
+
/**
|
|
637
|
+
* Always `sphere`.
|
|
638
|
+
*/
|
|
639
|
+
kind: "sphere";
|
|
640
|
+
/**
|
|
641
|
+
* The radius, above zero.
|
|
642
|
+
*/
|
|
643
|
+
radius: number;
|
|
644
|
+
}
|
|
645
|
+
/**
|
|
646
|
+
* A torus about its placement's axis.
|
|
647
|
+
* @beta
|
|
648
|
+
*/
|
|
649
|
+
interface RecipeBrepTorus extends RecipeBrepPlacement {
|
|
650
|
+
/**
|
|
651
|
+
* Always `torus`.
|
|
652
|
+
*/
|
|
653
|
+
kind: "torus";
|
|
654
|
+
/**
|
|
655
|
+
* The distance from the axis to the centre of the tube, above zero.
|
|
656
|
+
*/
|
|
657
|
+
majorRadius: number;
|
|
658
|
+
/**
|
|
659
|
+
* The radius of the tube, above zero.
|
|
660
|
+
*/
|
|
661
|
+
minorRadius: number;
|
|
662
|
+
}
|
|
663
|
+
/**
|
|
664
|
+
* A B-spline surface, rational when it has weights. Its control points form a net of
|
|
665
|
+
* `uCount` rows of `vCount` points, row by row, as STEP's list of lists does.
|
|
666
|
+
* @beta
|
|
667
|
+
*/
|
|
668
|
+
interface RecipeBrepBSplineSurface {
|
|
669
|
+
/**
|
|
670
|
+
* Always `bspline`.
|
|
671
|
+
*/
|
|
672
|
+
kind: "bspline";
|
|
673
|
+
/**
|
|
674
|
+
* The degree along u, from 1 to 25.
|
|
675
|
+
*/
|
|
676
|
+
uDegree: number;
|
|
677
|
+
/**
|
|
678
|
+
* The degree along v, from 1 to 25.
|
|
679
|
+
*/
|
|
680
|
+
vDegree: number;
|
|
681
|
+
/**
|
|
682
|
+
* How many rows of control points there are along u.
|
|
683
|
+
*/
|
|
684
|
+
uCount: number;
|
|
685
|
+
/**
|
|
686
|
+
* How many control points each row holds, along v.
|
|
687
|
+
*/
|
|
688
|
+
vCount: number;
|
|
689
|
+
/**
|
|
690
|
+
* A range of `x, y, z` triples in `f64`: `uCount` times `vCount` control points.
|
|
691
|
+
*/
|
|
692
|
+
points: RecipeRange;
|
|
693
|
+
/**
|
|
694
|
+
* A range in `f64` with one weight above zero per control point; left out for a surface
|
|
695
|
+
* that is not rational.
|
|
696
|
+
*/
|
|
697
|
+
weights?: RecipeRange | undefined;
|
|
698
|
+
/**
|
|
699
|
+
* A range in `f64` holding the distinct knots along u, rising.
|
|
700
|
+
*/
|
|
701
|
+
uKnots: RecipeRange;
|
|
702
|
+
/**
|
|
703
|
+
* How many times each knot along u repeats; they add up to `uCount` plus `uDegree` plus one.
|
|
704
|
+
*/
|
|
705
|
+
uMultiplicities: number[];
|
|
706
|
+
/**
|
|
707
|
+
* A range in `f64` holding the distinct knots along v, rising.
|
|
708
|
+
*/
|
|
709
|
+
vKnots: RecipeRange;
|
|
710
|
+
/**
|
|
711
|
+
* How many times each knot along v repeats; they add up to `vCount` plus `vDegree` plus one.
|
|
712
|
+
*/
|
|
713
|
+
vMultiplicities: number[];
|
|
714
|
+
}
|
|
715
|
+
/**
|
|
716
|
+
* The surface a curve sweeps turning about an axis.
|
|
717
|
+
* @beta
|
|
718
|
+
*/
|
|
719
|
+
interface RecipeBrepRevolution {
|
|
720
|
+
/**
|
|
721
|
+
* Always `revolution`.
|
|
722
|
+
*/
|
|
723
|
+
kind: "revolution";
|
|
724
|
+
/**
|
|
725
|
+
* The index of the curve that turns, among the node's curves.
|
|
726
|
+
*/
|
|
727
|
+
curve: number;
|
|
728
|
+
/**
|
|
729
|
+
* A point on the axis.
|
|
730
|
+
*/
|
|
731
|
+
origin: Point3;
|
|
732
|
+
/**
|
|
733
|
+
* The axis direction, not a zero vector.
|
|
734
|
+
*/
|
|
735
|
+
axis: Vector3;
|
|
736
|
+
}
|
|
737
|
+
/**
|
|
738
|
+
* The surface a curve sweeps moving along a direction.
|
|
739
|
+
* @beta
|
|
740
|
+
*/
|
|
741
|
+
interface RecipeBrepExtrusion {
|
|
742
|
+
/**
|
|
743
|
+
* Always `extrusion`.
|
|
744
|
+
*/
|
|
745
|
+
kind: "extrusion";
|
|
746
|
+
/**
|
|
747
|
+
* The index of the curve that moves, among the node's curves.
|
|
748
|
+
*/
|
|
749
|
+
curve: number;
|
|
750
|
+
/**
|
|
751
|
+
* The direction it moves along, not a zero vector.
|
|
752
|
+
*/
|
|
753
|
+
direction: Vector3;
|
|
754
|
+
}
|
|
755
|
+
/**
|
|
756
|
+
* A surface a face of a brep node lies on.
|
|
757
|
+
* @beta
|
|
758
|
+
*/
|
|
759
|
+
type RecipeBrepSurface = RecipeBrepPlane | RecipeBrepCylinder | RecipeBrepCone | RecipeBrepSphere | RecipeBrepTorus | RecipeBrepBSplineSurface | RecipeBrepRevolution | RecipeBrepExtrusion;
|
|
760
|
+
/**
|
|
761
|
+
* An edge of a brep node: the part of a curve between two vertices. Faces that meet along an
|
|
762
|
+
* edge name the same edge.
|
|
763
|
+
* @beta
|
|
764
|
+
*/
|
|
765
|
+
interface RecipeBrepEdge {
|
|
766
|
+
/**
|
|
767
|
+
* The index of the curve, among the node's curves.
|
|
768
|
+
*/
|
|
769
|
+
curve: number;
|
|
770
|
+
/**
|
|
771
|
+
* The index of the vertex the edge starts at.
|
|
772
|
+
*/
|
|
773
|
+
start: number;
|
|
774
|
+
/**
|
|
775
|
+
* The index of the vertex the edge ends at; the same as `start` for a closed edge, such as a
|
|
776
|
+
* whole circle.
|
|
777
|
+
*/
|
|
778
|
+
end: number;
|
|
779
|
+
/**
|
|
780
|
+
* Whether the edge runs from `start` to `end` the way the curve runs; left out, it does.
|
|
781
|
+
* A closed edge with no `parameters` takes the whole curve.
|
|
782
|
+
*/
|
|
783
|
+
sameSense?: boolean | undefined;
|
|
784
|
+
/**
|
|
785
|
+
* The curve's parameters at the start and the end; left out, they are found from the
|
|
786
|
+
* vertices.
|
|
787
|
+
*/
|
|
788
|
+
parameters?: [number, number] | undefined;
|
|
789
|
+
}
|
|
790
|
+
/**
|
|
791
|
+
* A loop bounding a face: edges in order, each run forward or backward, end to end.
|
|
792
|
+
* @beta
|
|
793
|
+
*/
|
|
794
|
+
interface RecipeBrepBound {
|
|
795
|
+
/**
|
|
796
|
+
* Whether this is the face's outer boundary; a face has at most one.
|
|
797
|
+
*/
|
|
798
|
+
outer: boolean;
|
|
799
|
+
/**
|
|
800
|
+
* The indices of the edges, in the order the loop runs.
|
|
801
|
+
*/
|
|
802
|
+
edges: number[];
|
|
803
|
+
/**
|
|
804
|
+
* For each edge, whether the loop runs it from its start to its end.
|
|
805
|
+
*/
|
|
806
|
+
forward: boolean[];
|
|
807
|
+
}
|
|
808
|
+
/**
|
|
809
|
+
* A face of a brep node: the part of a surface its bounds enclose.
|
|
810
|
+
* @beta
|
|
811
|
+
*/
|
|
812
|
+
interface RecipeBrepFace {
|
|
813
|
+
/**
|
|
814
|
+
* The index of the surface, among the node's surfaces.
|
|
815
|
+
*/
|
|
816
|
+
surface: number;
|
|
817
|
+
/**
|
|
818
|
+
* Whether the face's outward side is the surface's normal side.
|
|
819
|
+
*/
|
|
820
|
+
sameSense: boolean;
|
|
821
|
+
/**
|
|
822
|
+
* The loops bounding the face, at least one.
|
|
823
|
+
*/
|
|
824
|
+
bounds: RecipeBrepBound[];
|
|
825
|
+
}
|
|
826
|
+
/**
|
|
827
|
+
* One solid of a brep node: the faces of its outer shell and of each cavity inside it, by their
|
|
828
|
+
* indices among the node's faces, as STEP's brep with voids gives them.
|
|
829
|
+
* @beta
|
|
830
|
+
*/
|
|
831
|
+
interface RecipeBrepSolid {
|
|
832
|
+
/**
|
|
833
|
+
* The faces of the outer shell, at least one.
|
|
834
|
+
*/
|
|
835
|
+
outer: number[];
|
|
836
|
+
/**
|
|
837
|
+
* The faces of each cavity's shell; left out for a solid without cavities.
|
|
838
|
+
*/
|
|
839
|
+
voids?: number[][] | undefined;
|
|
840
|
+
}
|
|
841
|
+
/**
|
|
842
|
+
* A boundary representation given exactly, as STEP and IFC describe one: vertices, edges on
|
|
843
|
+
* curves, and faces on surfaces bounded by loops of those edges. Faces meet on shared edges, so
|
|
844
|
+
* a closed set of faces is a solid.
|
|
845
|
+
*
|
|
846
|
+
* A kernel that builds no exact surfaces builds `fallback` instead, a node describing the same
|
|
847
|
+
* faces approximately, such as their triangles.
|
|
848
|
+
* @beta
|
|
849
|
+
*/
|
|
850
|
+
interface RecipeBrepNode {
|
|
851
|
+
/**
|
|
852
|
+
* Always `brep`.
|
|
853
|
+
*/
|
|
854
|
+
op: "brep";
|
|
855
|
+
/**
|
|
856
|
+
* A range of `x, y, z` triples in `f64`: the vertices.
|
|
857
|
+
*/
|
|
858
|
+
vertices: RecipeRange;
|
|
859
|
+
/**
|
|
860
|
+
* The curves the edges lie on, and the curves surfaces of revolution and extrusion sweep.
|
|
861
|
+
*/
|
|
862
|
+
curves: RecipeBrepCurve[];
|
|
863
|
+
/**
|
|
864
|
+
* The surfaces the faces lie on.
|
|
865
|
+
*/
|
|
866
|
+
surfaces: RecipeBrepSurface[];
|
|
867
|
+
/**
|
|
868
|
+
* The edges.
|
|
869
|
+
*/
|
|
870
|
+
edges: RecipeBrepEdge[];
|
|
871
|
+
/**
|
|
872
|
+
* The faces, at least one.
|
|
873
|
+
*/
|
|
874
|
+
faces: RecipeBrepFace[];
|
|
875
|
+
/**
|
|
876
|
+
* Whether the faces close a volume, so the result is a solid rather than a shell.
|
|
877
|
+
*/
|
|
878
|
+
closed: boolean;
|
|
879
|
+
/**
|
|
880
|
+
* The solids the faces make, each an outer shell and its cavities; left out, a closed node's
|
|
881
|
+
* shells are found from the edges the faces share and a shell inside another is its cavity.
|
|
882
|
+
* Every face belongs to one shell at most.
|
|
883
|
+
*/
|
|
884
|
+
solids?: RecipeBrepSolid[] | undefined;
|
|
885
|
+
/**
|
|
886
|
+
* The index of an earlier node to build where exact surfaces cannot be, or are not built.
|
|
887
|
+
*/
|
|
888
|
+
fallback?: number | undefined;
|
|
889
|
+
}
|
|
454
890
|
/**
|
|
455
891
|
* One step of a recipe. A node refers only to nodes before it, by their position in the list.
|
|
456
892
|
* @beta
|
|
457
893
|
*/
|
|
458
|
-
type RecipeNode = RecipePolygonNode | RecipeCircleNode | RecipeExtrudeNode | RecipeHalfSpaceNode | RecipeDifferenceNode | RecipeTransformNode | RecipeVoidsNode | RecipeTrianglesNode | RecipeCompoundNode | RecipeUnionNode | RecipeIntersectionNode | RecipeRevolveNode | RecipeLoftNode;
|
|
894
|
+
type RecipeNode = RecipePolygonNode | RecipeCircleNode | RecipeExtrudeNode | RecipeHalfSpaceNode | RecipeDifferenceNode | RecipeTransformNode | RecipeVoidsNode | RecipeTrianglesNode | RecipeCompoundNode | RecipeUnionNode | RecipeIntersectionNode | RecipeRevolveNode | RecipeLoftNode | RecipeBrepNode;
|
|
459
895
|
/**
|
|
460
896
|
* A value a recipe carries through to its results untouched.
|
|
461
897
|
* @beta
|
|
@@ -595,4 +1031,15 @@ export declare namespace Base {
|
|
|
595
1031
|
bottomMid = "bottomMid",
|
|
596
1032
|
bottomRight = "bottomRight"
|
|
597
1033
|
}
|
|
1034
|
+
/**
|
|
1035
|
+
* A unit of length: millimetres, centimetres, metres or inches. Model units carry no unit of
|
|
1036
|
+
* their own; this names the one they are in where a file, a standard's sizes or a conversion
|
|
1037
|
+
* needs to know it. The values are the short codes design documents and assembly structures use.
|
|
1038
|
+
*/
|
|
1039
|
+
enum unitOfLengthEnum {
|
|
1040
|
+
millimetre = "mm",
|
|
1041
|
+
centimetre = "cm",
|
|
1042
|
+
metre = "m",
|
|
1043
|
+
inch = "in"
|
|
1044
|
+
}
|
|
598
1045
|
}
|
|
@@ -49,4 +49,16 @@ export var Base;
|
|
|
49
49
|
basicAlignmentEnum["bottomMid"] = "bottomMid";
|
|
50
50
|
basicAlignmentEnum["bottomRight"] = "bottomRight";
|
|
51
51
|
})(basicAlignmentEnum = Base.basicAlignmentEnum || (Base.basicAlignmentEnum = {}));
|
|
52
|
+
/**
|
|
53
|
+
* A unit of length: millimetres, centimetres, metres or inches. Model units carry no unit of
|
|
54
|
+
* their own; this names the one they are in where a file, a standard's sizes or a conversion
|
|
55
|
+
* needs to know it. The values are the short codes design documents and assembly structures use.
|
|
56
|
+
*/
|
|
57
|
+
let unitOfLengthEnum;
|
|
58
|
+
(function (unitOfLengthEnum) {
|
|
59
|
+
unitOfLengthEnum["millimetre"] = "mm";
|
|
60
|
+
unitOfLengthEnum["centimetre"] = "cm";
|
|
61
|
+
unitOfLengthEnum["metre"] = "m";
|
|
62
|
+
unitOfLengthEnum["inch"] = "in";
|
|
63
|
+
})(unitOfLengthEnum = Base.unitOfLengthEnum || (Base.unitOfLengthEnum = {}));
|
|
52
64
|
})(Base || (Base = {}));
|
|
@@ -4,6 +4,20 @@ import type { Base } from "./base-inputs";
|
|
|
4
4
|
* the settings for blending, inverting and generating ranges of colors.
|
|
5
5
|
*/
|
|
6
6
|
export declare namespace Color {
|
|
7
|
+
/**
|
|
8
|
+
* One color channel for `color.srgbToLinear` and `color.linearToSrgb`.
|
|
9
|
+
*/
|
|
10
|
+
class ChannelDto {
|
|
11
|
+
constructor(channel?: number);
|
|
12
|
+
/**
|
|
13
|
+
* The channel, from 0 to 1.
|
|
14
|
+
* @default 0.5
|
|
15
|
+
* @minimum 0
|
|
16
|
+
* @maximum 1
|
|
17
|
+
* @step 0.01
|
|
18
|
+
*/
|
|
19
|
+
channel?: number | undefined;
|
|
20
|
+
}
|
|
7
21
|
/**
|
|
8
22
|
* A hex color for `color.hexColor` and `color.hexToRgb`.
|
|
9
23
|
*/
|
|
@@ -4,6 +4,25 @@
|
|
|
4
4
|
*/
|
|
5
5
|
export var Color;
|
|
6
6
|
(function (Color) {
|
|
7
|
+
/**
|
|
8
|
+
* One color channel for `color.srgbToLinear` and `color.linearToSrgb`.
|
|
9
|
+
*/
|
|
10
|
+
class ChannelDto {
|
|
11
|
+
constructor(channel) {
|
|
12
|
+
/**
|
|
13
|
+
* The channel, from 0 to 1.
|
|
14
|
+
* @default 0.5
|
|
15
|
+
* @minimum 0
|
|
16
|
+
* @maximum 1
|
|
17
|
+
* @step 0.01
|
|
18
|
+
*/
|
|
19
|
+
this.channel = 0.5;
|
|
20
|
+
if (channel !== undefined) {
|
|
21
|
+
this.channel = channel;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
Color.ChannelDto = ChannelDto;
|
|
7
26
|
/**
|
|
8
27
|
* A hex color for `color.hexColor` and `color.hexToRgb`.
|
|
9
28
|
*/
|