@glyphcss/core 0.0.4 → 0.0.6
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/dist/index.cjs +3 -3
- package/dist/index.d.cts +100 -3
- package/dist/index.d.ts +100 -3
- package/dist/index.js +3 -3
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -28,6 +28,8 @@ interface TextureTriangle {
|
|
|
28
28
|
uvs: [Vec2, Vec2, Vec2];
|
|
29
29
|
/** Hex color string (`#rrggbb`) propagated from source model material. */
|
|
30
30
|
color?: string;
|
|
31
|
+
/** Texture URL carried for renderers that sample textures per cell (UV-mapped). */
|
|
32
|
+
texture?: string;
|
|
31
33
|
}
|
|
32
34
|
/**
|
|
33
35
|
* Directional light — simulates a single distant source (sun, key light).
|
|
@@ -77,6 +79,13 @@ interface PolyMaterial {
|
|
|
77
79
|
* reference. */
|
|
78
80
|
key?: string;
|
|
79
81
|
}
|
|
82
|
+
/** Texture sampler wrap mode for one axis (glTF sampler convention). */
|
|
83
|
+
type PolyTextureWrapMode = "repeat" | "clamp-to-edge" | "mirrored-repeat";
|
|
84
|
+
/** Per-axis texture wrap modes (see {@link Polygon.textureWrap}). */
|
|
85
|
+
interface PolyTextureWrap {
|
|
86
|
+
s: PolyTextureWrapMode;
|
|
87
|
+
t: PolyTextureWrapMode;
|
|
88
|
+
}
|
|
80
89
|
/**
|
|
81
90
|
* The single polygon type for glyphcss. N coplanar vertices in 3D space,
|
|
82
91
|
* CCW winding from outside. No bbox field, no shape discriminator, no
|
|
@@ -104,6 +113,14 @@ interface Polygon {
|
|
|
104
113
|
* polygon canvas rasterization). Falls back to the atlas path otherwise.
|
|
105
114
|
*/
|
|
106
115
|
material?: PolyMaterial;
|
|
116
|
+
/**
|
|
117
|
+
* Texture sampler wrap mode for UVs outside [0, 1]. glTF imports and the
|
|
118
|
+
* fonts extruder preserve sampler.wrapS / wrapT here so a renderer that
|
|
119
|
+
* tiles textures can repeat the UVs. The ASCII renderer bakes textures to a
|
|
120
|
+
* flat per-face color and ignores this; unset keeps single-image behavior.
|
|
121
|
+
* @internal
|
|
122
|
+
*/
|
|
123
|
+
textureWrap?: PolyTextureWrap;
|
|
107
124
|
/**
|
|
108
125
|
* Per-vertex UV coords (0..1, OBJ convention with v=0 at bottom).
|
|
109
126
|
* Length MUST equal vertices.length when set; mismatched UVs are
|
|
@@ -246,6 +263,12 @@ interface SceneContextBuildResult {
|
|
|
246
263
|
* about that case should check `polygons.length` first.
|
|
247
264
|
*/
|
|
248
265
|
declare function computeSceneBbox(polygons: Polygon[]): SceneBbox;
|
|
266
|
+
/**
|
|
267
|
+
* Recenter polygons so their bounding-box center sits at the origin — center
|
|
268
|
+
* only, no scaling (matches voxcss `recenterPolygons` / `autoCenter`). A loaded
|
|
269
|
+
* mesh then pivots around its own center; the camera's fit/zoom handles size.
|
|
270
|
+
*/
|
|
271
|
+
declare function recenterPolygons(polygons: Polygon[]): Polygon[];
|
|
249
272
|
declare function buildSceneContext(args: SceneContextBuildArgs): SceneContextBuildResult;
|
|
250
273
|
|
|
251
274
|
/**
|
|
@@ -1755,7 +1778,7 @@ declare function resolveGeometry(name: GlyphGeometryName, opts?: GlyphGeometryOp
|
|
|
1755
1778
|
|
|
1756
1779
|
/**
|
|
1757
1780
|
* Unified parser return type. All polygon-emitting parsers (parseObj,
|
|
1758
|
-
* parseGltf, the loadMesh dispatcher) return this exact shape.
|
|
1781
|
+
* parseGltf, parseVox, parseStl, the loadMesh dispatcher) return this exact shape.
|
|
1759
1782
|
*
|
|
1760
1783
|
* The asymmetric helper `parseMtl` returns its own `MtlParseResult` (it
|
|
1761
1784
|
* emits materials, not polygons) — see parseMtl.ts for the rationale.
|
|
@@ -1765,6 +1788,26 @@ declare function resolveGeometry(name: GlyphGeometryName, opts?: GlyphGeometryOp
|
|
|
1765
1788
|
* is empty (e.g. `parseObj`, where it's a no-op).
|
|
1766
1789
|
*/
|
|
1767
1790
|
|
|
1791
|
+
interface ParseStlTopology {
|
|
1792
|
+
componentCount: number;
|
|
1793
|
+
repairedTriangleCount: number;
|
|
1794
|
+
outwardComponentCount: number;
|
|
1795
|
+
suppliedNormalComponentCount: number;
|
|
1796
|
+
inconsistentSharedEdgeCount: number;
|
|
1797
|
+
nonManifoldSharedEdgeCount: number;
|
|
1798
|
+
}
|
|
1799
|
+
interface ParseStlColor {
|
|
1800
|
+
format: "magics";
|
|
1801
|
+
defaultColor: string;
|
|
1802
|
+
alpha: number;
|
|
1803
|
+
coloredTriangleCount: number;
|
|
1804
|
+
defaultColorTriangleCount: number;
|
|
1805
|
+
}
|
|
1806
|
+
interface ParseStlSolid {
|
|
1807
|
+
name: string;
|
|
1808
|
+
start: number;
|
|
1809
|
+
count: number;
|
|
1810
|
+
}
|
|
1768
1811
|
interface ParseAnimationClip {
|
|
1769
1812
|
/** Stable numeric index in the source file's animation array. */
|
|
1770
1813
|
index: number;
|
|
@@ -1818,6 +1861,16 @@ interface ParseResult {
|
|
|
1818
1861
|
animations?: ParseAnimationClip[];
|
|
1819
1862
|
/** Source file size in bytes (for diagnostics). */
|
|
1820
1863
|
sourceBytes?: number;
|
|
1864
|
+
/** Voxel count for `.vox` sources. */
|
|
1865
|
+
voxelCount?: number;
|
|
1866
|
+
/** Printable binary STL header, trimmed. */
|
|
1867
|
+
stlHeader?: string;
|
|
1868
|
+
/** Binary STL color metadata when a supported color extension is present. */
|
|
1869
|
+
stlColor?: ParseStlColor;
|
|
1870
|
+
/** Consecutive ASCII `solid` groups after parse/filtering. */
|
|
1871
|
+
stlSolids?: ParseStlSolid[];
|
|
1872
|
+
/** STL winding/connectivity diagnostics. */
|
|
1873
|
+
stlTopology?: ParseStlTopology;
|
|
1821
1874
|
};
|
|
1822
1875
|
}
|
|
1823
1876
|
|
|
@@ -2048,8 +2101,33 @@ interface SolidTextureSampleOptions {
|
|
|
2048
2101
|
/** Skip decoding very large textures for this optimization. Default 16 MP. */
|
|
2049
2102
|
maxTexturePixels?: number;
|
|
2050
2103
|
}
|
|
2104
|
+
interface SampledColor {
|
|
2105
|
+
r: number;
|
|
2106
|
+
g: number;
|
|
2107
|
+
b: number;
|
|
2108
|
+
a: number;
|
|
2109
|
+
}
|
|
2110
|
+
interface TextureSampler {
|
|
2111
|
+
width: number;
|
|
2112
|
+
height: number;
|
|
2113
|
+
data: ArrayLike<number>;
|
|
2114
|
+
lowDetail: boolean;
|
|
2115
|
+
}
|
|
2051
2116
|
declare function bakeSolidTextureSampledPolygons(polygons: Polygon[], options?: SolidTextureSampleOptions): Promise<Polygon[]>;
|
|
2052
2117
|
declare function bakeSolidTextureSamples(result: ParseResult, options?: SolidTextureSampleOptions): Promise<ParseResult>;
|
|
2118
|
+
/**
|
|
2119
|
+
* Decode every distinct texture referenced by `polygons` into a pixel sampler,
|
|
2120
|
+
* for renderers that sample textures at draw time (per-cell UV mapping) instead
|
|
2121
|
+
* of baking each face to one flat color. Keyed by texture URL. Empty map when no
|
|
2122
|
+
* browser image/canvas env is available (SSR / tests).
|
|
2123
|
+
*/
|
|
2124
|
+
declare function buildTextureSamplers(polygons: Polygon[], options?: {
|
|
2125
|
+
maxTexturePixels?: number;
|
|
2126
|
+
}): Promise<Map<string, TextureSampler>>;
|
|
2127
|
+
/** Sample a decoded texture at UV (0..1, OBJ convention with v=0 at bottom). */
|
|
2128
|
+
declare function sampleTexel(sampler: TextureSampler, u: number, v: number): SampledColor | null;
|
|
2129
|
+
/** The texture URL a polygon renders with (`material.texture` takes precedence). */
|
|
2130
|
+
declare function polygonTexture(polygon: Polygon): string | undefined;
|
|
2053
2131
|
|
|
2054
2132
|
interface VoxParseOptions {
|
|
2055
2133
|
/**
|
|
@@ -2066,6 +2144,22 @@ interface VoxParseOptions {
|
|
|
2066
2144
|
}
|
|
2067
2145
|
declare function parseVox(buffer: ArrayBuffer, options?: VoxParseOptions): ParseResult;
|
|
2068
2146
|
|
|
2147
|
+
interface StlParseOptions {
|
|
2148
|
+
/** Largest mesh extent (units). Mesh is uniformly scaled to fit. Default: 60. */
|
|
2149
|
+
targetSize?: number;
|
|
2150
|
+
/** Padding offset added after scaling. Default: 1. */
|
|
2151
|
+
gridShift?: number;
|
|
2152
|
+
/** Solid color assigned to every STL triangle. Default: "#888888". */
|
|
2153
|
+
defaultColor?: string;
|
|
2154
|
+
/**
|
|
2155
|
+
* Which axis is "up" in the source mesh.
|
|
2156
|
+
* - "z" (default): identity axes, matching common CAD/3D-print STL exports.
|
|
2157
|
+
* - "y": cyclic permutation (x,y,z) → (z,x,y), matching OBJ/glTF's +Y-up path.
|
|
2158
|
+
*/
|
|
2159
|
+
upAxis?: "z" | "y";
|
|
2160
|
+
}
|
|
2161
|
+
declare function parseStl(source: ArrayBuffer | Uint8Array | string, options?: StlParseOptions): ParseResult;
|
|
2162
|
+
|
|
2069
2163
|
/**
|
|
2070
2164
|
* loadMesh — high-level fetch+parse dispatcher. Picks the parser by file
|
|
2071
2165
|
* extension, fetches the URL, runs the parser, returns the unified
|
|
@@ -2076,11 +2170,12 @@ declare function parseVox(buffer: ArrayBuffer, options?: VoxParseOptions): Parse
|
|
|
2076
2170
|
* - `.glb` → ArrayBuffer fetch + `parseGltf`
|
|
2077
2171
|
* - `.gltf` → ArrayBuffer fetch + `parseGltf` (caller may pass `baseUrl`)
|
|
2078
2172
|
* - `.vox` → ArrayBuffer fetch + `parseVox`
|
|
2173
|
+
* - `.stl` → ArrayBuffer fetch + `parseStl`
|
|
2079
2174
|
*
|
|
2080
2175
|
* `.mtl` is rejected — it's a material file, not a mesh. Use `parseMtl`
|
|
2081
2176
|
* directly if you want to read materials.
|
|
2082
2177
|
*
|
|
2083
|
-
* Other extensions throw. Future formats (
|
|
2178
|
+
* Other extensions throw. Future formats (PLY, 3MF) plug in here.
|
|
2084
2179
|
*/
|
|
2085
2180
|
|
|
2086
2181
|
interface LoadMeshOptions {
|
|
@@ -2104,6 +2199,8 @@ interface LoadMeshOptions {
|
|
|
2104
2199
|
gltfOptions?: GltfParseOptions;
|
|
2105
2200
|
/** Forwarded to `parseVox`. */
|
|
2106
2201
|
voxOptions?: VoxParseOptions;
|
|
2202
|
+
/** Forwarded to `parseStl`. */
|
|
2203
|
+
stlOptions?: StlParseOptions;
|
|
2107
2204
|
/**
|
|
2108
2205
|
* Converts texture-backed faces whose UV samples are a uniform color into
|
|
2109
2206
|
* solid-color polygons before culling/merging. This avoids atlas sprites for
|
|
@@ -2128,4 +2225,4 @@ declare function project(v: Vec3, cols: number, rows: number, cellAspect: number
|
|
|
2128
2225
|
/** Public: derive feature edges from a triangle list. `featureAngleDeg = 0` = all edges. */
|
|
2129
2226
|
declare function trianglesToFeatureEdges(triangles: TextureTriangle[], featureAngleDeg?: number): WireframeEdge[];
|
|
2130
2227
|
|
|
2131
|
-
export { type AntiprismPolygonsOptions, type ApproximateMergeOptions, type ArrowPolygonsOptions, type AutoRotateConfig, type AutoRotateOption, type AxesHelperOptions, BASE_TILE, type BipyramidPolygonsOptions, CAMERA_BACKFACE_CULL_EPS, type CameraCullNormalGroup, type CameraCullRotation, type CameraHandle, type CameraState, type CameraStyleInput, type CharRamp, type ConePolygonsOptions, type CoverPlanarPolygonsOptions, type CubePolygonsOptions, type CuboctahedronPolygonsOptions, type CullInteriorOptions, type CylinderPolygonsOptions, DEFAULT_CAMERA_STATE, DEFAULT_PROJECTION, type DedupeOverlappingPolygonsOptions, type DeltoidalHexecontahedronPolygonsOptions, type DeltoidalIcositetrahedronPolygonsOptions, type DisdyakisDodecahedronPolygonsOptions, type DisdyakisTriacontahedronPolygonsOptions, type DodecahedronPolygonsOptions, type EdgeWeight, type GltfParseOptions, type GlyphAmbientLight, type GlyphAnimationAction, type ParseAnimationClip as GlyphAnimationClip, type GlyphAnimationMixer, type GlyphAnimationTarget, type GlyphDirectionalLight, type GlyphGeometryName, type GlyphGeometryOptions, type GreatDodecahedronPolygonsOptions, type GreatIcosahedronPolygonsOptions, type GreatStellatedDodecahedronPolygonsOptions, type GridSize, type Hotspot, type HotspotCell, type IcosahedronPolygonsOptions, type IcosidodecahedronPolygonsOptions, type LoadMeshOptions, type LoopMode, LoopOnce, LoopPingPong, LoopRepeat, type MeshResolution, type MtlParseResult, type NormalizeResult, type ObjParseOptions, type OctahedronPolygonsOptions, type OptimizeMeshPolygonsOptions, type ParseAnimationClip, type ParseAnimationController, type ParseResult, type ParsedColor, type PentagonalHexecontahedronPolygonsOptions, type PentagonalIcositetrahedronPolygonsOptions, type PentakisDodecahedronPolygonsOptions, type PlanePolygonsOptions, type Polygon, type PolygonFace, type PrismPolygonsOptions, type PyramidPolygonsOptions, QUAT_IDENTITY, type Quat, type RenderMode, type RhombicDodecahedronPolygonsOptions, type RhombicTriacontahedronPolygonsOptions, type RhombicosidodecahedronPolygonsOptions, type RhombicuboctahedronPolygonsOptions, type RingPolygonsOptions, type RingQuadPolygonsOptions, type SceneBbox, type SceneContext, type SceneContextBuildArgs, type SceneContextBuildResult, type SmallStellatedDodecahedronPolygonsOptions, type SnubCubePolygonsOptions, type SnubDodecahedronPolygonsOptions, type SolidTextureSampleOptions, type SpherePolygonsOptions, type TetrahedronPolygonsOptions, type TetrakisHexahedronPolygonsOptions, type TextureTriangle, type TorusPolygonsOptions, type TrapezohedronPolygonsOptions, type TriakisIcosahedronPolygonsOptions, type TriakisOctahedronPolygonsOptions, type TriakisTetrahedronPolygonsOptions, type TruncatedCubePolygonsOptions, type TruncatedCuboctahedronPolygonsOptions, type TruncatedDodecahedronPolygonsOptions, type TruncatedIcosahedronPolygonsOptions, type TruncatedIcosidodecahedronPolygonsOptions, type TruncatedOctahedronPolygonsOptions, type TruncatedTetrahedronPolygonsOptions, VOXEL_CAMERA_CULL_AXIS_EPS, VOXEL_CAMERA_CULL_NORMAL_LIMIT, type Vec2, type Vec3, type VoxParseOptions, type WireframeEdge, antiprismPolygons, arrowPolygons, axesHelperPolygons, bakeSolidTextureSampledPolygons, bakeSolidTextureSamples, bipyramidPolygons, buildSceneContext, cameraCullNormalGroups, cameraCullNormalGroupsFromPolygons, cameraCullNormalKey, cameraCullVisibleSignature, cameraFacingDepth, clampChannel, computeSceneBbox, computeShapeLighting, conePolygons, coverPlanarPolygons, createGlyphAnimationMixer, createIsometricCamera, cubePolygons, cuboctahedronPolygons, cullInteriorPolygons, cylinderPolygons, dedupeOverlappingPolygons, deltoidalHexecontahedronPolygons, deltoidalIcositetrahedronPolygons, disdyakisDodecahedronPolygons, disdyakisTriacontahedronPolygons, dodecahedronPolygons, eulerXYZFromQuat, findOverlappingPolygonDuplicates, formatColor, greatDodecahedronPolygons, greatIcosahedronPolygons, greatStellatedDodecahedronPolygons, icosahedronPolygons, icosidodecahedronPolygons, inverseRotateVec3, isAxisAlignedSurfaceNormal, isVoxelCameraCullableNormalGroups, loadMesh, mergePolygons, normalFacesCamera, normalizeInvertMultiplier, normalizePolygons, octahedronPolygons, optimizeMeshPolygons, parseColor, parseGltf, parseHexColor, parseMtl, parseObj, parsePureColor, parseRgbColor, parseVox, pentagonalHexecontahedronPolygons, pentagonalIcositetrahedronPolygons, pentakisDodecahedronPolygons, planePolygons, polygonCssSurfaceNormal, polygonFaces, polygonFacesCamera, prismPolygons, project, pyramidPolygons, quatFromAxisAngle, quatFromEulerXYZ, quatMultiply, resolveGeometry, rhombicDodecahedronPolygons, rhombicTriacontahedronPolygons, rhombicosidodecahedronPolygons, rhombicuboctahedronPolygons, ringPolygons, ringQuadPolygons, rotateVec3, shadeColor, smallStellatedDodecahedronPolygons, snubCubePolygons, snubDodecahedronPolygons, spherePolygons, tetrahedronPolygons, tetrakisHexahedronPolygons, torusPolygons, trapezohedronPolygons, triakisIcosahedronPolygons, triakisOctahedronPolygons, triakisTetrahedronPolygons, trianglesToFeatureEdges, truncatedCubePolygons, truncatedCuboctahedronPolygons, truncatedDodecahedronPolygons, truncatedIcosahedronPolygons, truncatedIcosidodecahedronPolygons, truncatedOctahedronPolygons, truncatedTetrahedronPolygons };
|
|
2228
|
+
export { type AntiprismPolygonsOptions, type ApproximateMergeOptions, type ArrowPolygonsOptions, type AutoRotateConfig, type AutoRotateOption, type AxesHelperOptions, BASE_TILE, type BipyramidPolygonsOptions, CAMERA_BACKFACE_CULL_EPS, type CameraCullNormalGroup, type CameraCullRotation, type CameraHandle, type CameraState, type CameraStyleInput, type CharRamp, type ConePolygonsOptions, type CoverPlanarPolygonsOptions, type CubePolygonsOptions, type CuboctahedronPolygonsOptions, type CullInteriorOptions, type CylinderPolygonsOptions, DEFAULT_CAMERA_STATE, DEFAULT_PROJECTION, type DedupeOverlappingPolygonsOptions, type DeltoidalHexecontahedronPolygonsOptions, type DeltoidalIcositetrahedronPolygonsOptions, type DisdyakisDodecahedronPolygonsOptions, type DisdyakisTriacontahedronPolygonsOptions, type DodecahedronPolygonsOptions, type EdgeWeight, type GltfParseOptions, type GlyphAmbientLight, type GlyphAnimationAction, type ParseAnimationClip as GlyphAnimationClip, type GlyphAnimationMixer, type GlyphAnimationTarget, type GlyphDirectionalLight, type GlyphGeometryName, type GlyphGeometryOptions, type GreatDodecahedronPolygonsOptions, type GreatIcosahedronPolygonsOptions, type GreatStellatedDodecahedronPolygonsOptions, type GridSize, type Hotspot, type HotspotCell, type IcosahedronPolygonsOptions, type IcosidodecahedronPolygonsOptions, type LoadMeshOptions, type LoopMode, LoopOnce, LoopPingPong, LoopRepeat, type MeshResolution, type MtlParseResult, type NormalizeResult, type ObjParseOptions, type OctahedronPolygonsOptions, type OptimizeMeshPolygonsOptions, type ParseAnimationClip, type ParseAnimationController, type ParseResult, type ParseStlColor, type ParseStlSolid, type ParseStlTopology, type ParsedColor, type PentagonalHexecontahedronPolygonsOptions, type PentagonalIcositetrahedronPolygonsOptions, type PentakisDodecahedronPolygonsOptions, type PlanePolygonsOptions, type PolyTextureWrap, type PolyTextureWrapMode, type Polygon, type PolygonFace, type PrismPolygonsOptions, type PyramidPolygonsOptions, QUAT_IDENTITY, type Quat, type RenderMode, type RhombicDodecahedronPolygonsOptions, type RhombicTriacontahedronPolygonsOptions, type RhombicosidodecahedronPolygonsOptions, type RhombicuboctahedronPolygonsOptions, type RingPolygonsOptions, type RingQuadPolygonsOptions, type SampledColor, type SceneBbox, type SceneContext, type SceneContextBuildArgs, type SceneContextBuildResult, type SmallStellatedDodecahedronPolygonsOptions, type SnubCubePolygonsOptions, type SnubDodecahedronPolygonsOptions, type SolidTextureSampleOptions, type SpherePolygonsOptions, type StlParseOptions, type TetrahedronPolygonsOptions, type TetrakisHexahedronPolygonsOptions, type TextureSampler, type TextureTriangle, type TorusPolygonsOptions, type TrapezohedronPolygonsOptions, type TriakisIcosahedronPolygonsOptions, type TriakisOctahedronPolygonsOptions, type TriakisTetrahedronPolygonsOptions, type TruncatedCubePolygonsOptions, type TruncatedCuboctahedronPolygonsOptions, type TruncatedDodecahedronPolygonsOptions, type TruncatedIcosahedronPolygonsOptions, type TruncatedIcosidodecahedronPolygonsOptions, type TruncatedOctahedronPolygonsOptions, type TruncatedTetrahedronPolygonsOptions, VOXEL_CAMERA_CULL_AXIS_EPS, VOXEL_CAMERA_CULL_NORMAL_LIMIT, type Vec2, type Vec3, type VoxParseOptions, type WireframeEdge, antiprismPolygons, arrowPolygons, axesHelperPolygons, bakeSolidTextureSampledPolygons, bakeSolidTextureSamples, bipyramidPolygons, buildSceneContext, buildTextureSamplers, cameraCullNormalGroups, cameraCullNormalGroupsFromPolygons, cameraCullNormalKey, cameraCullVisibleSignature, cameraFacingDepth, clampChannel, computeSceneBbox, computeShapeLighting, conePolygons, coverPlanarPolygons, createGlyphAnimationMixer, createIsometricCamera, cubePolygons, cuboctahedronPolygons, cullInteriorPolygons, cylinderPolygons, dedupeOverlappingPolygons, deltoidalHexecontahedronPolygons, deltoidalIcositetrahedronPolygons, disdyakisDodecahedronPolygons, disdyakisTriacontahedronPolygons, dodecahedronPolygons, eulerXYZFromQuat, findOverlappingPolygonDuplicates, formatColor, greatDodecahedronPolygons, greatIcosahedronPolygons, greatStellatedDodecahedronPolygons, icosahedronPolygons, icosidodecahedronPolygons, inverseRotateVec3, isAxisAlignedSurfaceNormal, isVoxelCameraCullableNormalGroups, loadMesh, mergePolygons, normalFacesCamera, normalizeInvertMultiplier, normalizePolygons, octahedronPolygons, optimizeMeshPolygons, parseColor, parseGltf, parseHexColor, parseMtl, parseObj, parsePureColor, parseRgbColor, parseStl, parseVox, pentagonalHexecontahedronPolygons, pentagonalIcositetrahedronPolygons, pentakisDodecahedronPolygons, planePolygons, polygonCssSurfaceNormal, polygonFaces, polygonFacesCamera, polygonTexture, prismPolygons, project, pyramidPolygons, quatFromAxisAngle, quatFromEulerXYZ, quatMultiply, recenterPolygons, resolveGeometry, rhombicDodecahedronPolygons, rhombicTriacontahedronPolygons, rhombicosidodecahedronPolygons, rhombicuboctahedronPolygons, ringPolygons, ringQuadPolygons, rotateVec3, sampleTexel, shadeColor, smallStellatedDodecahedronPolygons, snubCubePolygons, snubDodecahedronPolygons, spherePolygons, tetrahedronPolygons, tetrakisHexahedronPolygons, torusPolygons, trapezohedronPolygons, triakisIcosahedronPolygons, triakisOctahedronPolygons, triakisTetrahedronPolygons, trianglesToFeatureEdges, truncatedCubePolygons, truncatedCuboctahedronPolygons, truncatedDodecahedronPolygons, truncatedIcosahedronPolygons, truncatedIcosidodecahedronPolygons, truncatedOctahedronPolygons, truncatedTetrahedronPolygons };
|
package/dist/index.d.ts
CHANGED
|
@@ -28,6 +28,8 @@ interface TextureTriangle {
|
|
|
28
28
|
uvs: [Vec2, Vec2, Vec2];
|
|
29
29
|
/** Hex color string (`#rrggbb`) propagated from source model material. */
|
|
30
30
|
color?: string;
|
|
31
|
+
/** Texture URL carried for renderers that sample textures per cell (UV-mapped). */
|
|
32
|
+
texture?: string;
|
|
31
33
|
}
|
|
32
34
|
/**
|
|
33
35
|
* Directional light — simulates a single distant source (sun, key light).
|
|
@@ -77,6 +79,13 @@ interface PolyMaterial {
|
|
|
77
79
|
* reference. */
|
|
78
80
|
key?: string;
|
|
79
81
|
}
|
|
82
|
+
/** Texture sampler wrap mode for one axis (glTF sampler convention). */
|
|
83
|
+
type PolyTextureWrapMode = "repeat" | "clamp-to-edge" | "mirrored-repeat";
|
|
84
|
+
/** Per-axis texture wrap modes (see {@link Polygon.textureWrap}). */
|
|
85
|
+
interface PolyTextureWrap {
|
|
86
|
+
s: PolyTextureWrapMode;
|
|
87
|
+
t: PolyTextureWrapMode;
|
|
88
|
+
}
|
|
80
89
|
/**
|
|
81
90
|
* The single polygon type for glyphcss. N coplanar vertices in 3D space,
|
|
82
91
|
* CCW winding from outside. No bbox field, no shape discriminator, no
|
|
@@ -104,6 +113,14 @@ interface Polygon {
|
|
|
104
113
|
* polygon canvas rasterization). Falls back to the atlas path otherwise.
|
|
105
114
|
*/
|
|
106
115
|
material?: PolyMaterial;
|
|
116
|
+
/**
|
|
117
|
+
* Texture sampler wrap mode for UVs outside [0, 1]. glTF imports and the
|
|
118
|
+
* fonts extruder preserve sampler.wrapS / wrapT here so a renderer that
|
|
119
|
+
* tiles textures can repeat the UVs. The ASCII renderer bakes textures to a
|
|
120
|
+
* flat per-face color and ignores this; unset keeps single-image behavior.
|
|
121
|
+
* @internal
|
|
122
|
+
*/
|
|
123
|
+
textureWrap?: PolyTextureWrap;
|
|
107
124
|
/**
|
|
108
125
|
* Per-vertex UV coords (0..1, OBJ convention with v=0 at bottom).
|
|
109
126
|
* Length MUST equal vertices.length when set; mismatched UVs are
|
|
@@ -246,6 +263,12 @@ interface SceneContextBuildResult {
|
|
|
246
263
|
* about that case should check `polygons.length` first.
|
|
247
264
|
*/
|
|
248
265
|
declare function computeSceneBbox(polygons: Polygon[]): SceneBbox;
|
|
266
|
+
/**
|
|
267
|
+
* Recenter polygons so their bounding-box center sits at the origin — center
|
|
268
|
+
* only, no scaling (matches voxcss `recenterPolygons` / `autoCenter`). A loaded
|
|
269
|
+
* mesh then pivots around its own center; the camera's fit/zoom handles size.
|
|
270
|
+
*/
|
|
271
|
+
declare function recenterPolygons(polygons: Polygon[]): Polygon[];
|
|
249
272
|
declare function buildSceneContext(args: SceneContextBuildArgs): SceneContextBuildResult;
|
|
250
273
|
|
|
251
274
|
/**
|
|
@@ -1755,7 +1778,7 @@ declare function resolveGeometry(name: GlyphGeometryName, opts?: GlyphGeometryOp
|
|
|
1755
1778
|
|
|
1756
1779
|
/**
|
|
1757
1780
|
* Unified parser return type. All polygon-emitting parsers (parseObj,
|
|
1758
|
-
* parseGltf, the loadMesh dispatcher) return this exact shape.
|
|
1781
|
+
* parseGltf, parseVox, parseStl, the loadMesh dispatcher) return this exact shape.
|
|
1759
1782
|
*
|
|
1760
1783
|
* The asymmetric helper `parseMtl` returns its own `MtlParseResult` (it
|
|
1761
1784
|
* emits materials, not polygons) — see parseMtl.ts for the rationale.
|
|
@@ -1765,6 +1788,26 @@ declare function resolveGeometry(name: GlyphGeometryName, opts?: GlyphGeometryOp
|
|
|
1765
1788
|
* is empty (e.g. `parseObj`, where it's a no-op).
|
|
1766
1789
|
*/
|
|
1767
1790
|
|
|
1791
|
+
interface ParseStlTopology {
|
|
1792
|
+
componentCount: number;
|
|
1793
|
+
repairedTriangleCount: number;
|
|
1794
|
+
outwardComponentCount: number;
|
|
1795
|
+
suppliedNormalComponentCount: number;
|
|
1796
|
+
inconsistentSharedEdgeCount: number;
|
|
1797
|
+
nonManifoldSharedEdgeCount: number;
|
|
1798
|
+
}
|
|
1799
|
+
interface ParseStlColor {
|
|
1800
|
+
format: "magics";
|
|
1801
|
+
defaultColor: string;
|
|
1802
|
+
alpha: number;
|
|
1803
|
+
coloredTriangleCount: number;
|
|
1804
|
+
defaultColorTriangleCount: number;
|
|
1805
|
+
}
|
|
1806
|
+
interface ParseStlSolid {
|
|
1807
|
+
name: string;
|
|
1808
|
+
start: number;
|
|
1809
|
+
count: number;
|
|
1810
|
+
}
|
|
1768
1811
|
interface ParseAnimationClip {
|
|
1769
1812
|
/** Stable numeric index in the source file's animation array. */
|
|
1770
1813
|
index: number;
|
|
@@ -1818,6 +1861,16 @@ interface ParseResult {
|
|
|
1818
1861
|
animations?: ParseAnimationClip[];
|
|
1819
1862
|
/** Source file size in bytes (for diagnostics). */
|
|
1820
1863
|
sourceBytes?: number;
|
|
1864
|
+
/** Voxel count for `.vox` sources. */
|
|
1865
|
+
voxelCount?: number;
|
|
1866
|
+
/** Printable binary STL header, trimmed. */
|
|
1867
|
+
stlHeader?: string;
|
|
1868
|
+
/** Binary STL color metadata when a supported color extension is present. */
|
|
1869
|
+
stlColor?: ParseStlColor;
|
|
1870
|
+
/** Consecutive ASCII `solid` groups after parse/filtering. */
|
|
1871
|
+
stlSolids?: ParseStlSolid[];
|
|
1872
|
+
/** STL winding/connectivity diagnostics. */
|
|
1873
|
+
stlTopology?: ParseStlTopology;
|
|
1821
1874
|
};
|
|
1822
1875
|
}
|
|
1823
1876
|
|
|
@@ -2048,8 +2101,33 @@ interface SolidTextureSampleOptions {
|
|
|
2048
2101
|
/** Skip decoding very large textures for this optimization. Default 16 MP. */
|
|
2049
2102
|
maxTexturePixels?: number;
|
|
2050
2103
|
}
|
|
2104
|
+
interface SampledColor {
|
|
2105
|
+
r: number;
|
|
2106
|
+
g: number;
|
|
2107
|
+
b: number;
|
|
2108
|
+
a: number;
|
|
2109
|
+
}
|
|
2110
|
+
interface TextureSampler {
|
|
2111
|
+
width: number;
|
|
2112
|
+
height: number;
|
|
2113
|
+
data: ArrayLike<number>;
|
|
2114
|
+
lowDetail: boolean;
|
|
2115
|
+
}
|
|
2051
2116
|
declare function bakeSolidTextureSampledPolygons(polygons: Polygon[], options?: SolidTextureSampleOptions): Promise<Polygon[]>;
|
|
2052
2117
|
declare function bakeSolidTextureSamples(result: ParseResult, options?: SolidTextureSampleOptions): Promise<ParseResult>;
|
|
2118
|
+
/**
|
|
2119
|
+
* Decode every distinct texture referenced by `polygons` into a pixel sampler,
|
|
2120
|
+
* for renderers that sample textures at draw time (per-cell UV mapping) instead
|
|
2121
|
+
* of baking each face to one flat color. Keyed by texture URL. Empty map when no
|
|
2122
|
+
* browser image/canvas env is available (SSR / tests).
|
|
2123
|
+
*/
|
|
2124
|
+
declare function buildTextureSamplers(polygons: Polygon[], options?: {
|
|
2125
|
+
maxTexturePixels?: number;
|
|
2126
|
+
}): Promise<Map<string, TextureSampler>>;
|
|
2127
|
+
/** Sample a decoded texture at UV (0..1, OBJ convention with v=0 at bottom). */
|
|
2128
|
+
declare function sampleTexel(sampler: TextureSampler, u: number, v: number): SampledColor | null;
|
|
2129
|
+
/** The texture URL a polygon renders with (`material.texture` takes precedence). */
|
|
2130
|
+
declare function polygonTexture(polygon: Polygon): string | undefined;
|
|
2053
2131
|
|
|
2054
2132
|
interface VoxParseOptions {
|
|
2055
2133
|
/**
|
|
@@ -2066,6 +2144,22 @@ interface VoxParseOptions {
|
|
|
2066
2144
|
}
|
|
2067
2145
|
declare function parseVox(buffer: ArrayBuffer, options?: VoxParseOptions): ParseResult;
|
|
2068
2146
|
|
|
2147
|
+
interface StlParseOptions {
|
|
2148
|
+
/** Largest mesh extent (units). Mesh is uniformly scaled to fit. Default: 60. */
|
|
2149
|
+
targetSize?: number;
|
|
2150
|
+
/** Padding offset added after scaling. Default: 1. */
|
|
2151
|
+
gridShift?: number;
|
|
2152
|
+
/** Solid color assigned to every STL triangle. Default: "#888888". */
|
|
2153
|
+
defaultColor?: string;
|
|
2154
|
+
/**
|
|
2155
|
+
* Which axis is "up" in the source mesh.
|
|
2156
|
+
* - "z" (default): identity axes, matching common CAD/3D-print STL exports.
|
|
2157
|
+
* - "y": cyclic permutation (x,y,z) → (z,x,y), matching OBJ/glTF's +Y-up path.
|
|
2158
|
+
*/
|
|
2159
|
+
upAxis?: "z" | "y";
|
|
2160
|
+
}
|
|
2161
|
+
declare function parseStl(source: ArrayBuffer | Uint8Array | string, options?: StlParseOptions): ParseResult;
|
|
2162
|
+
|
|
2069
2163
|
/**
|
|
2070
2164
|
* loadMesh — high-level fetch+parse dispatcher. Picks the parser by file
|
|
2071
2165
|
* extension, fetches the URL, runs the parser, returns the unified
|
|
@@ -2076,11 +2170,12 @@ declare function parseVox(buffer: ArrayBuffer, options?: VoxParseOptions): Parse
|
|
|
2076
2170
|
* - `.glb` → ArrayBuffer fetch + `parseGltf`
|
|
2077
2171
|
* - `.gltf` → ArrayBuffer fetch + `parseGltf` (caller may pass `baseUrl`)
|
|
2078
2172
|
* - `.vox` → ArrayBuffer fetch + `parseVox`
|
|
2173
|
+
* - `.stl` → ArrayBuffer fetch + `parseStl`
|
|
2079
2174
|
*
|
|
2080
2175
|
* `.mtl` is rejected — it's a material file, not a mesh. Use `parseMtl`
|
|
2081
2176
|
* directly if you want to read materials.
|
|
2082
2177
|
*
|
|
2083
|
-
* Other extensions throw. Future formats (
|
|
2178
|
+
* Other extensions throw. Future formats (PLY, 3MF) plug in here.
|
|
2084
2179
|
*/
|
|
2085
2180
|
|
|
2086
2181
|
interface LoadMeshOptions {
|
|
@@ -2104,6 +2199,8 @@ interface LoadMeshOptions {
|
|
|
2104
2199
|
gltfOptions?: GltfParseOptions;
|
|
2105
2200
|
/** Forwarded to `parseVox`. */
|
|
2106
2201
|
voxOptions?: VoxParseOptions;
|
|
2202
|
+
/** Forwarded to `parseStl`. */
|
|
2203
|
+
stlOptions?: StlParseOptions;
|
|
2107
2204
|
/**
|
|
2108
2205
|
* Converts texture-backed faces whose UV samples are a uniform color into
|
|
2109
2206
|
* solid-color polygons before culling/merging. This avoids atlas sprites for
|
|
@@ -2128,4 +2225,4 @@ declare function project(v: Vec3, cols: number, rows: number, cellAspect: number
|
|
|
2128
2225
|
/** Public: derive feature edges from a triangle list. `featureAngleDeg = 0` = all edges. */
|
|
2129
2226
|
declare function trianglesToFeatureEdges(triangles: TextureTriangle[], featureAngleDeg?: number): WireframeEdge[];
|
|
2130
2227
|
|
|
2131
|
-
export { type AntiprismPolygonsOptions, type ApproximateMergeOptions, type ArrowPolygonsOptions, type AutoRotateConfig, type AutoRotateOption, type AxesHelperOptions, BASE_TILE, type BipyramidPolygonsOptions, CAMERA_BACKFACE_CULL_EPS, type CameraCullNormalGroup, type CameraCullRotation, type CameraHandle, type CameraState, type CameraStyleInput, type CharRamp, type ConePolygonsOptions, type CoverPlanarPolygonsOptions, type CubePolygonsOptions, type CuboctahedronPolygonsOptions, type CullInteriorOptions, type CylinderPolygonsOptions, DEFAULT_CAMERA_STATE, DEFAULT_PROJECTION, type DedupeOverlappingPolygonsOptions, type DeltoidalHexecontahedronPolygonsOptions, type DeltoidalIcositetrahedronPolygonsOptions, type DisdyakisDodecahedronPolygonsOptions, type DisdyakisTriacontahedronPolygonsOptions, type DodecahedronPolygonsOptions, type EdgeWeight, type GltfParseOptions, type GlyphAmbientLight, type GlyphAnimationAction, type ParseAnimationClip as GlyphAnimationClip, type GlyphAnimationMixer, type GlyphAnimationTarget, type GlyphDirectionalLight, type GlyphGeometryName, type GlyphGeometryOptions, type GreatDodecahedronPolygonsOptions, type GreatIcosahedronPolygonsOptions, type GreatStellatedDodecahedronPolygonsOptions, type GridSize, type Hotspot, type HotspotCell, type IcosahedronPolygonsOptions, type IcosidodecahedronPolygonsOptions, type LoadMeshOptions, type LoopMode, LoopOnce, LoopPingPong, LoopRepeat, type MeshResolution, type MtlParseResult, type NormalizeResult, type ObjParseOptions, type OctahedronPolygonsOptions, type OptimizeMeshPolygonsOptions, type ParseAnimationClip, type ParseAnimationController, type ParseResult, type ParsedColor, type PentagonalHexecontahedronPolygonsOptions, type PentagonalIcositetrahedronPolygonsOptions, type PentakisDodecahedronPolygonsOptions, type PlanePolygonsOptions, type Polygon, type PolygonFace, type PrismPolygonsOptions, type PyramidPolygonsOptions, QUAT_IDENTITY, type Quat, type RenderMode, type RhombicDodecahedronPolygonsOptions, type RhombicTriacontahedronPolygonsOptions, type RhombicosidodecahedronPolygonsOptions, type RhombicuboctahedronPolygonsOptions, type RingPolygonsOptions, type RingQuadPolygonsOptions, type SceneBbox, type SceneContext, type SceneContextBuildArgs, type SceneContextBuildResult, type SmallStellatedDodecahedronPolygonsOptions, type SnubCubePolygonsOptions, type SnubDodecahedronPolygonsOptions, type SolidTextureSampleOptions, type SpherePolygonsOptions, type TetrahedronPolygonsOptions, type TetrakisHexahedronPolygonsOptions, type TextureTriangle, type TorusPolygonsOptions, type TrapezohedronPolygonsOptions, type TriakisIcosahedronPolygonsOptions, type TriakisOctahedronPolygonsOptions, type TriakisTetrahedronPolygonsOptions, type TruncatedCubePolygonsOptions, type TruncatedCuboctahedronPolygonsOptions, type TruncatedDodecahedronPolygonsOptions, type TruncatedIcosahedronPolygonsOptions, type TruncatedIcosidodecahedronPolygonsOptions, type TruncatedOctahedronPolygonsOptions, type TruncatedTetrahedronPolygonsOptions, VOXEL_CAMERA_CULL_AXIS_EPS, VOXEL_CAMERA_CULL_NORMAL_LIMIT, type Vec2, type Vec3, type VoxParseOptions, type WireframeEdge, antiprismPolygons, arrowPolygons, axesHelperPolygons, bakeSolidTextureSampledPolygons, bakeSolidTextureSamples, bipyramidPolygons, buildSceneContext, cameraCullNormalGroups, cameraCullNormalGroupsFromPolygons, cameraCullNormalKey, cameraCullVisibleSignature, cameraFacingDepth, clampChannel, computeSceneBbox, computeShapeLighting, conePolygons, coverPlanarPolygons, createGlyphAnimationMixer, createIsometricCamera, cubePolygons, cuboctahedronPolygons, cullInteriorPolygons, cylinderPolygons, dedupeOverlappingPolygons, deltoidalHexecontahedronPolygons, deltoidalIcositetrahedronPolygons, disdyakisDodecahedronPolygons, disdyakisTriacontahedronPolygons, dodecahedronPolygons, eulerXYZFromQuat, findOverlappingPolygonDuplicates, formatColor, greatDodecahedronPolygons, greatIcosahedronPolygons, greatStellatedDodecahedronPolygons, icosahedronPolygons, icosidodecahedronPolygons, inverseRotateVec3, isAxisAlignedSurfaceNormal, isVoxelCameraCullableNormalGroups, loadMesh, mergePolygons, normalFacesCamera, normalizeInvertMultiplier, normalizePolygons, octahedronPolygons, optimizeMeshPolygons, parseColor, parseGltf, parseHexColor, parseMtl, parseObj, parsePureColor, parseRgbColor, parseVox, pentagonalHexecontahedronPolygons, pentagonalIcositetrahedronPolygons, pentakisDodecahedronPolygons, planePolygons, polygonCssSurfaceNormal, polygonFaces, polygonFacesCamera, prismPolygons, project, pyramidPolygons, quatFromAxisAngle, quatFromEulerXYZ, quatMultiply, resolveGeometry, rhombicDodecahedronPolygons, rhombicTriacontahedronPolygons, rhombicosidodecahedronPolygons, rhombicuboctahedronPolygons, ringPolygons, ringQuadPolygons, rotateVec3, shadeColor, smallStellatedDodecahedronPolygons, snubCubePolygons, snubDodecahedronPolygons, spherePolygons, tetrahedronPolygons, tetrakisHexahedronPolygons, torusPolygons, trapezohedronPolygons, triakisIcosahedronPolygons, triakisOctahedronPolygons, triakisTetrahedronPolygons, trianglesToFeatureEdges, truncatedCubePolygons, truncatedCuboctahedronPolygons, truncatedDodecahedronPolygons, truncatedIcosahedronPolygons, truncatedIcosidodecahedronPolygons, truncatedOctahedronPolygons, truncatedTetrahedronPolygons };
|
|
2228
|
+
export { type AntiprismPolygonsOptions, type ApproximateMergeOptions, type ArrowPolygonsOptions, type AutoRotateConfig, type AutoRotateOption, type AxesHelperOptions, BASE_TILE, type BipyramidPolygonsOptions, CAMERA_BACKFACE_CULL_EPS, type CameraCullNormalGroup, type CameraCullRotation, type CameraHandle, type CameraState, type CameraStyleInput, type CharRamp, type ConePolygonsOptions, type CoverPlanarPolygonsOptions, type CubePolygonsOptions, type CuboctahedronPolygonsOptions, type CullInteriorOptions, type CylinderPolygonsOptions, DEFAULT_CAMERA_STATE, DEFAULT_PROJECTION, type DedupeOverlappingPolygonsOptions, type DeltoidalHexecontahedronPolygonsOptions, type DeltoidalIcositetrahedronPolygonsOptions, type DisdyakisDodecahedronPolygonsOptions, type DisdyakisTriacontahedronPolygonsOptions, type DodecahedronPolygonsOptions, type EdgeWeight, type GltfParseOptions, type GlyphAmbientLight, type GlyphAnimationAction, type ParseAnimationClip as GlyphAnimationClip, type GlyphAnimationMixer, type GlyphAnimationTarget, type GlyphDirectionalLight, type GlyphGeometryName, type GlyphGeometryOptions, type GreatDodecahedronPolygonsOptions, type GreatIcosahedronPolygonsOptions, type GreatStellatedDodecahedronPolygonsOptions, type GridSize, type Hotspot, type HotspotCell, type IcosahedronPolygonsOptions, type IcosidodecahedronPolygonsOptions, type LoadMeshOptions, type LoopMode, LoopOnce, LoopPingPong, LoopRepeat, type MeshResolution, type MtlParseResult, type NormalizeResult, type ObjParseOptions, type OctahedronPolygonsOptions, type OptimizeMeshPolygonsOptions, type ParseAnimationClip, type ParseAnimationController, type ParseResult, type ParseStlColor, type ParseStlSolid, type ParseStlTopology, type ParsedColor, type PentagonalHexecontahedronPolygonsOptions, type PentagonalIcositetrahedronPolygonsOptions, type PentakisDodecahedronPolygonsOptions, type PlanePolygonsOptions, type PolyTextureWrap, type PolyTextureWrapMode, type Polygon, type PolygonFace, type PrismPolygonsOptions, type PyramidPolygonsOptions, QUAT_IDENTITY, type Quat, type RenderMode, type RhombicDodecahedronPolygonsOptions, type RhombicTriacontahedronPolygonsOptions, type RhombicosidodecahedronPolygonsOptions, type RhombicuboctahedronPolygonsOptions, type RingPolygonsOptions, type RingQuadPolygonsOptions, type SampledColor, type SceneBbox, type SceneContext, type SceneContextBuildArgs, type SceneContextBuildResult, type SmallStellatedDodecahedronPolygonsOptions, type SnubCubePolygonsOptions, type SnubDodecahedronPolygonsOptions, type SolidTextureSampleOptions, type SpherePolygonsOptions, type StlParseOptions, type TetrahedronPolygonsOptions, type TetrakisHexahedronPolygonsOptions, type TextureSampler, type TextureTriangle, type TorusPolygonsOptions, type TrapezohedronPolygonsOptions, type TriakisIcosahedronPolygonsOptions, type TriakisOctahedronPolygonsOptions, type TriakisTetrahedronPolygonsOptions, type TruncatedCubePolygonsOptions, type TruncatedCuboctahedronPolygonsOptions, type TruncatedDodecahedronPolygonsOptions, type TruncatedIcosahedronPolygonsOptions, type TruncatedIcosidodecahedronPolygonsOptions, type TruncatedOctahedronPolygonsOptions, type TruncatedTetrahedronPolygonsOptions, VOXEL_CAMERA_CULL_AXIS_EPS, VOXEL_CAMERA_CULL_NORMAL_LIMIT, type Vec2, type Vec3, type VoxParseOptions, type WireframeEdge, antiprismPolygons, arrowPolygons, axesHelperPolygons, bakeSolidTextureSampledPolygons, bakeSolidTextureSamples, bipyramidPolygons, buildSceneContext, buildTextureSamplers, cameraCullNormalGroups, cameraCullNormalGroupsFromPolygons, cameraCullNormalKey, cameraCullVisibleSignature, cameraFacingDepth, clampChannel, computeSceneBbox, computeShapeLighting, conePolygons, coverPlanarPolygons, createGlyphAnimationMixer, createIsometricCamera, cubePolygons, cuboctahedronPolygons, cullInteriorPolygons, cylinderPolygons, dedupeOverlappingPolygons, deltoidalHexecontahedronPolygons, deltoidalIcositetrahedronPolygons, disdyakisDodecahedronPolygons, disdyakisTriacontahedronPolygons, dodecahedronPolygons, eulerXYZFromQuat, findOverlappingPolygonDuplicates, formatColor, greatDodecahedronPolygons, greatIcosahedronPolygons, greatStellatedDodecahedronPolygons, icosahedronPolygons, icosidodecahedronPolygons, inverseRotateVec3, isAxisAlignedSurfaceNormal, isVoxelCameraCullableNormalGroups, loadMesh, mergePolygons, normalFacesCamera, normalizeInvertMultiplier, normalizePolygons, octahedronPolygons, optimizeMeshPolygons, parseColor, parseGltf, parseHexColor, parseMtl, parseObj, parsePureColor, parseRgbColor, parseStl, parseVox, pentagonalHexecontahedronPolygons, pentagonalIcositetrahedronPolygons, pentakisDodecahedronPolygons, planePolygons, polygonCssSurfaceNormal, polygonFaces, polygonFacesCamera, polygonTexture, prismPolygons, project, pyramidPolygons, quatFromAxisAngle, quatFromEulerXYZ, quatMultiply, recenterPolygons, resolveGeometry, rhombicDodecahedronPolygons, rhombicTriacontahedronPolygons, rhombicosidodecahedronPolygons, rhombicuboctahedronPolygons, ringPolygons, ringQuadPolygons, rotateVec3, sampleTexel, shadeColor, smallStellatedDodecahedronPolygons, snubCubePolygons, snubDodecahedronPolygons, spherePolygons, tetrahedronPolygons, tetrakisHexahedronPolygons, torusPolygons, trapezohedronPolygons, triakisIcosahedronPolygons, triakisOctahedronPolygons, triakisTetrahedronPolygons, trianglesToFeatureEdges, truncatedCubePolygons, truncatedCuboctahedronPolygons, truncatedDodecahedronPolygons, truncatedIcosahedronPolygons, truncatedIcosidodecahedronPolygons, truncatedOctahedronPolygons, truncatedTetrahedronPolygons };
|