@layoutit/polycss-core 0.2.5 → 0.2.7
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/README.md +1 -2
- package/dist/index.cjs +3 -3
- package/dist/index.d.cts +348 -18
- package/dist/index.d.ts +348 -18
- package/dist/index.js +3 -3
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -11,6 +11,29 @@ declare const DEFAULT_PROJECTION: "cubic";
|
|
|
11
11
|
* variables, no JS work, no atlas re-rasterization.
|
|
12
12
|
*/
|
|
13
13
|
type PolyTextureLightingMode = "baked" | "dynamic";
|
|
14
|
+
type PolyTextureLeafSizing = "canonical" | "local" | "raster";
|
|
15
|
+
type PolyTextureBackend = "auto" | "atlas" | "image";
|
|
16
|
+
type PolyTextureImageRendering = "auto" | "pixelated";
|
|
17
|
+
type PolyTextureImageLighting = "scene" | "source";
|
|
18
|
+
type PolyTextureProjection = "affine" | "projective";
|
|
19
|
+
interface PolyTextureImageSource {
|
|
20
|
+
url: string;
|
|
21
|
+
width: number;
|
|
22
|
+
height: number;
|
|
23
|
+
sourceRect?: {
|
|
24
|
+
x: number;
|
|
25
|
+
y: number;
|
|
26
|
+
width: number;
|
|
27
|
+
height: number;
|
|
28
|
+
};
|
|
29
|
+
imageRendering?: PolyTextureImageRendering;
|
|
30
|
+
}
|
|
31
|
+
interface PolyTexturePresentation {
|
|
32
|
+
imageRendering?: PolyTextureImageRendering;
|
|
33
|
+
backend?: PolyTextureBackend;
|
|
34
|
+
lighting?: PolyTextureImageLighting;
|
|
35
|
+
projection?: PolyTextureProjection;
|
|
36
|
+
}
|
|
14
37
|
/**
|
|
15
38
|
* Mesh post-processing intent.
|
|
16
39
|
* - "lossless": preserve the authored surface while applying exact
|
|
@@ -59,6 +82,29 @@ interface PolyDirectionalLight {
|
|
|
59
82
|
/** Scalar multiplier on the directional contribution. Default 1. */
|
|
60
83
|
intensity?: number;
|
|
61
84
|
}
|
|
85
|
+
/**
|
|
86
|
+
* Point light — radiates from a world-space position. Contributes per-face
|
|
87
|
+
* Lambert like a directional light, but the light direction is computed
|
|
88
|
+
* per polygon (face centroid → light position) rather than being global.
|
|
89
|
+
*
|
|
90
|
+
* DIRECTION-ONLY by design: there is no distance falloff (no `decay`/
|
|
91
|
+
* `distance`). A point light differs from a directional light only in that
|
|
92
|
+
* its direction varies per face. To emulate in three.js for parity, use
|
|
93
|
+
* `new THREE.PointLight(color, intensity, 0, 0)` (distance 0, decay 0 →
|
|
94
|
+
* no attenuation). Shading is flat per face (the centroid direction), so it
|
|
95
|
+
* approximates three.js's per-fragment gradient — exact for small faces /
|
|
96
|
+
* distant lights, never a CSS gradient.
|
|
97
|
+
*/
|
|
98
|
+
interface PolyPointLight {
|
|
99
|
+
/** World-space position the light radiates from. */
|
|
100
|
+
position: Vec3;
|
|
101
|
+
/** Light tint, hex string. White by default. */
|
|
102
|
+
color?: string;
|
|
103
|
+
/** Scalar multiplier on the contribution. Default 1. */
|
|
104
|
+
intensity?: number;
|
|
105
|
+
/** When true, this light casts shadows (radial projection). Default false. */
|
|
106
|
+
castShadow?: boolean;
|
|
107
|
+
}
|
|
62
108
|
/**
|
|
63
109
|
* Ambient light — uniform fill that adds to every polygon regardless of
|
|
64
110
|
* orientation. Mirrors three.js's `AmbientLight`. Decoupled from the
|
|
@@ -92,6 +138,8 @@ interface PolyMaterial {
|
|
|
92
138
|
* pass a stable string; if omitted, the material's identity is its object
|
|
93
139
|
* reference. */
|
|
94
140
|
key?: string;
|
|
141
|
+
imageSource?: PolyTextureImageSource;
|
|
142
|
+
presentation?: PolyTexturePresentation;
|
|
95
143
|
}
|
|
96
144
|
/**
|
|
97
145
|
* The single polygon type for polycss. N coplanar vertices in 3D space,
|
|
@@ -134,6 +182,8 @@ interface Polygon {
|
|
|
134
182
|
* polygon canvas rasterization). Falls back to the atlas path otherwise.
|
|
135
183
|
*/
|
|
136
184
|
material?: PolyMaterial;
|
|
185
|
+
textureImageSource?: PolyTextureImageSource;
|
|
186
|
+
texturePresentation?: PolyTexturePresentation;
|
|
137
187
|
/**
|
|
138
188
|
* Per-vertex UV coords (0..1, OBJ convention with v=0 at bottom).
|
|
139
189
|
* Length MUST equal vertices.length when set; mismatched UVs are
|
|
@@ -432,8 +482,32 @@ interface CameraHandle {
|
|
|
432
482
|
height: string;
|
|
433
483
|
};
|
|
434
484
|
}
|
|
485
|
+
interface PolyCameraSceneTransformOptions {
|
|
486
|
+
autoCenterOffset?: Vec3;
|
|
487
|
+
layoutScale?: number;
|
|
488
|
+
tileSize?: number;
|
|
489
|
+
}
|
|
490
|
+
type PolyCameraProjection = "orthographic" | "perspective";
|
|
491
|
+
interface PolyCameraSnapshot {
|
|
492
|
+
projection: PolyCameraProjection;
|
|
493
|
+
perspectiveStyle: string;
|
|
494
|
+
appliedPerspectiveStyle: string;
|
|
495
|
+
state: CameraState;
|
|
496
|
+
}
|
|
497
|
+
interface PolyCameraSnapshotOptions {
|
|
498
|
+
projection?: PolyCameraProjection;
|
|
499
|
+
perspectiveStyle?: string;
|
|
500
|
+
}
|
|
501
|
+
type PolyCameraSnapshotSource = CameraHandle & {
|
|
502
|
+
readonly type?: PolyCameraProjection;
|
|
503
|
+
readonly perspectiveStyle?: string;
|
|
504
|
+
};
|
|
435
505
|
declare function normalizeInvertMultiplier(value: number | boolean | undefined): number | undefined;
|
|
436
506
|
declare const DEFAULT_CAMERA_STATE: CameraState;
|
|
507
|
+
declare function polyCameraTargetToCss(target?: Vec3, autoCenterOffset?: Vec3, tileSize?: number): Vec3;
|
|
508
|
+
declare function buildPolyCameraSceneTransform(state?: Partial<CameraState>, options?: PolyCameraSceneTransformOptions): string;
|
|
509
|
+
declare function resolvePolyCameraAppliedPerspectiveStyle(perspectiveStyle?: string): string;
|
|
510
|
+
declare function capturePolyCameraSnapshot(camera: PolyCameraSnapshotSource, options?: PolyCameraSnapshotOptions): PolyCameraSnapshot;
|
|
437
511
|
declare function createIsometricCamera(initial?: Partial<CameraState>): CameraHandle;
|
|
438
512
|
|
|
439
513
|
/**
|
|
@@ -1404,6 +1478,29 @@ declare const BAKED_SHADOW_MIN_UP = 0.01;
|
|
|
1404
1478
|
* already in unit-less form (matrix3d entries must be dimensionless).
|
|
1405
1479
|
*/
|
|
1406
1480
|
declare function buildBakedShadowProjectionMatrix(lightDir: Vec3, groundCssZ: number): number[];
|
|
1481
|
+
/**
|
|
1482
|
+
* Radial variant of `projectCssVertexToGround` for a point light at a fixed
|
|
1483
|
+
* CSS-frame position. The shadow ray travels FROM the light THROUGH the
|
|
1484
|
+
* vertex and onto the ground plane `z = groundCssZ`, so each vertex projects
|
|
1485
|
+
* along its own direction (a true perspective projection) rather than the
|
|
1486
|
+
* single parallel direction a directional light uses.
|
|
1487
|
+
*
|
|
1488
|
+
* Returns `null` when no valid forward intersection exists — the vertex sits
|
|
1489
|
+
* on the light's side of the ground plane, or the ray runs parallel to it.
|
|
1490
|
+
* The caller drops that vertex (and any polygon that loses ≥1 vertex falls
|
|
1491
|
+
* back to a degenerate projection it can skip).
|
|
1492
|
+
*
|
|
1493
|
+
* `lightPos` and `cssVertex` are both in the dimensionless CSS frame (after
|
|
1494
|
+
* the world→CSS axis swap + tile scale), matching `projectCssVertexToGround`.
|
|
1495
|
+
*/
|
|
1496
|
+
declare function projectCssVertexToGroundFromPoint(cssVertex: Vec3, lightPos: Vec3, groundCssZ: number): [number, number] | null;
|
|
1497
|
+
/**
|
|
1498
|
+
* Point-light variant of `isBakedShadowCaster`. A polygon casts shadow when
|
|
1499
|
+
* its outward normal points away from the light — i.e. the ray from the
|
|
1500
|
+
* light to the polygon centroid runs into the back of the face. `centroid`
|
|
1501
|
+
* and `lightPos` are CSS-frame; `normal` is the CSS-frame outward normal.
|
|
1502
|
+
*/
|
|
1503
|
+
declare function isPointShadowCaster(centroid: Vec3, normal: Vec3, lightPos: Vec3): boolean;
|
|
1407
1504
|
/**
|
|
1408
1505
|
* Decides whether a polygon should cast a shadow given its outward
|
|
1409
1506
|
* normal and the light's travel direction.
|
|
@@ -1449,6 +1546,73 @@ declare function ensureCcw2D(vertices: ReadonlyArray<readonly [number, number]>)
|
|
|
1449
1546
|
*/
|
|
1450
1547
|
declare function projectCssVertexToGround(cssVertex: Vec3, lightDir: Vec3, groundCssZ: number): [number, number];
|
|
1451
1548
|
|
|
1549
|
+
/**
|
|
1550
|
+
* Build the parametric silhouette loop for a caster lit by a directional light.
|
|
1551
|
+
*
|
|
1552
|
+
* @param worldVerts Every caster vertex in the same world-CSS frame the
|
|
1553
|
+
* receiver projector works in (e.g. `CasterPolyItem.wv`).
|
|
1554
|
+
* @param lightDir Directional light vector (to-source) in that frame.
|
|
1555
|
+
* @param definition Max loop points. The convex hull is decimated down to this
|
|
1556
|
+
* by repeatedly dropping the lowest-area vertex (shape-
|
|
1557
|
+
* preserving). `<= 2` is treated as 3.
|
|
1558
|
+
* @returns A closed 3D loop (the silhouette vertices), or `null` if degenerate.
|
|
1559
|
+
*/
|
|
1560
|
+
declare function computeParametricShadowSilhouette(worldVerts: ReadonlyArray<Vec3>, lightDir: Vec3, definition: number): Vec3[] | null;
|
|
1561
|
+
|
|
1562
|
+
/**
|
|
1563
|
+
* Build concave coverage-contour silhouette loops for a caster lit by a
|
|
1564
|
+
* directional light.
|
|
1565
|
+
*
|
|
1566
|
+
* @param polysWorldVerts Each caster polygon's vertices in the world-CSS frame
|
|
1567
|
+
* (e.g. `CasterPolyItem.wv`).
|
|
1568
|
+
* @param lightDir Directional light vector (to-source) in that frame.
|
|
1569
|
+
* @param definition Detail knob → coverage mask resolution.
|
|
1570
|
+
* @param layers Depth bands along the light. 1 (default) = one flat
|
|
1571
|
+
* outline (cross-mesh casting). >1 = depth-stratified
|
|
1572
|
+
* outlines for correct self-shadow.
|
|
1573
|
+
* @returns Closed 3D loops, or `null`.
|
|
1574
|
+
*/
|
|
1575
|
+
declare function computeCoverageShadowSilhouette(polysWorldVerts: ReadonlyArray<ReadonlyArray<Vec3>>, lightDir: Vec3, definition: number, layers?: number, mode?: "contour" | "pixel"): Vec3[][] | null;
|
|
1576
|
+
|
|
1577
|
+
/** True when every caster vertex lies in a single plane (a ground quad, a
|
|
1578
|
+
* billboard, etc.). Such casters have no coverage volume for the parametric
|
|
1579
|
+
* proxy — their tilted proxy would project garbage onto a coplanar receiver —
|
|
1580
|
+
* so the caller routes them through the exact path instead. */
|
|
1581
|
+
declare function isFlatCaster(polysWv: ReadonlyArray<ReadonlyArray<Vec3>>): boolean;
|
|
1582
|
+
/** Rubric: a CONVEX caster self-shadows nothing. The depth-band proxy still
|
|
1583
|
+
* leaks a little false self-shadow on convex meshes, so detect convexity and
|
|
1584
|
+
* skip self-shadow for them. Capped at `maxPolys` (O(faces × verts), and large
|
|
1585
|
+
* meshes are essentially never convex — they early-exit on the first concave
|
|
1586
|
+
* face anyway). */
|
|
1587
|
+
declare function isConvexCaster(polysWv: ReadonlyArray<ReadonlyArray<Vec3>>, maxPolys?: number): boolean;
|
|
1588
|
+
interface ParametricOverrideInput {
|
|
1589
|
+
/** Caster polygons, each a vertex list in the world-CSS frame. */
|
|
1590
|
+
polysWorldVerts: ReadonlyArray<ReadonlyArray<Vec3>>;
|
|
1591
|
+
/** Directional light (to-source) in the world-CSS frame. */
|
|
1592
|
+
lightDir: Vec3;
|
|
1593
|
+
/** Effective definition (caller folds in per-mesh override + drag cap). */
|
|
1594
|
+
definition: number;
|
|
1595
|
+
/** True when the caster is also the receiver (self-shadow). */
|
|
1596
|
+
isSelf: boolean;
|
|
1597
|
+
/** `"pixel"` greedy-meshes the coverage into voxel rects; default contour. */
|
|
1598
|
+
style?: "vector" | "pixel";
|
|
1599
|
+
/** Shadow-casting point lights (CSS position + index in `allPointLights`). */
|
|
1600
|
+
pointLights?: ReadonlyArray<{
|
|
1601
|
+
position: Vec3;
|
|
1602
|
+
index: number;
|
|
1603
|
+
}>;
|
|
1604
|
+
}
|
|
1605
|
+
interface ParametricOverrideResult {
|
|
1606
|
+
/** Directional override loops, or undefined to use the exact path. */
|
|
1607
|
+
overrideSilhouette?: Vec3[][];
|
|
1608
|
+
/** Per-point-light radial override loops (indexed by point light index). */
|
|
1609
|
+
overridePointSilhouettes?: Array<Vec3[][] | undefined>;
|
|
1610
|
+
}
|
|
1611
|
+
/** Build the parametric override(s) for one caster — directional plus one
|
|
1612
|
+
* radial silhouette per shadow-casting point light. Returns empty overrides
|
|
1613
|
+
* (use the exact path) for flat casters and convex self-shadow. */
|
|
1614
|
+
declare function buildParametricCasterOverride(input: ParametricOverrideInput): ParametricOverrideResult;
|
|
1615
|
+
|
|
1452
1616
|
type Pt = readonly [number, number];
|
|
1453
1617
|
/**
|
|
1454
1618
|
* Clips `subject` against the convex polygon `clip`. Both polygons are
|
|
@@ -1497,6 +1661,12 @@ declare function worldDirectionToCss(d: Vec3): Vec3;
|
|
|
1497
1661
|
declare function worldDirectionalLightToCss<T extends {
|
|
1498
1662
|
direction?: Vec3;
|
|
1499
1663
|
} | undefined>(light: T): T;
|
|
1664
|
+
declare const worldDistanceToPolyCss: typeof worldDistanceToCss;
|
|
1665
|
+
declare const polyCssDistanceToWorld: typeof cssDistanceToWorld;
|
|
1666
|
+
declare const worldPositionToPolyCss: typeof worldPositionToCss;
|
|
1667
|
+
declare const polyCssPositionToWorld: typeof cssPositionToWorld;
|
|
1668
|
+
declare const worldDirectionToPolyCss: typeof worldDirectionToCss;
|
|
1669
|
+
declare const worldDirectionalLightToPolyCss: typeof worldDirectionalLightToCss;
|
|
1500
1670
|
/** Normalize a mesh `scale` value into a Vec3 (undefined → [1,1,1], number →
|
|
1501
1671
|
* uniform, Vec3 → as-is with `?? 1` per axis). */
|
|
1502
1672
|
declare function meshScaleVec3(scale: number | Vec3 | undefined | null): Vec3;
|
|
@@ -1633,18 +1803,6 @@ declare function buildEdgeOwners(polygons: readonly Polygon[]): Map<string, Edge
|
|
|
1633
1803
|
* TRAVELS in direction L, polygons are CCW-from-outside). Matches the
|
|
1634
1804
|
* light-backface cull's sign convention. */
|
|
1635
1805
|
declare function classifyFacing(planeNormals: Array<Vec3 | null>, lightDir: Vec3): boolean[];
|
|
1636
|
-
/**
|
|
1637
|
-
* Walk silhouette edges into closed loops. An edge is silhouette iff
|
|
1638
|
-
* its two adjacent polygons disagree on `facing`. Boundary edges
|
|
1639
|
-
* (polyB === null) are silhouette iff their owner is front-facing —
|
|
1640
|
-
* the boundary is where the lit side ends.
|
|
1641
|
-
*
|
|
1642
|
-
* Returns one closed loop per connected silhouette cycle, each as a
|
|
1643
|
-
* Vec3[] sequence (last vertex equals first vertex implicitly; not
|
|
1644
|
-
* duplicated). For non-manifold or open meshes some edges may not form
|
|
1645
|
-
* a clean cycle; those edges are dropped and the remaining cycles are
|
|
1646
|
-
* returned best-effort.
|
|
1647
|
-
*/
|
|
1648
1806
|
declare function extractSilhouetteLoops(edgeOwners: ReadonlyMap<string, EdgeOwners>, facing: boolean[]): Vec3[][];
|
|
1649
1807
|
|
|
1650
1808
|
/**
|
|
@@ -1717,6 +1875,15 @@ interface ReceiverCasterInput<T = unknown> {
|
|
|
1717
1875
|
* array is sized correctly even when atlas-plan / dedup filters drop
|
|
1718
1876
|
* some polygons from `items`. */
|
|
1719
1877
|
casterPolygonCount?: number;
|
|
1878
|
+
/** Parametric-shadow override: a precomputed world-frame silhouette loop set
|
|
1879
|
+
* (see `computeParametricShadowSilhouette`). When present it is projected
|
|
1880
|
+
* directly — skipping per-poly and silhouette extraction — so a cheap,
|
|
1881
|
+
* low-resolution outline casts onto every receiver via the normal pipeline. */
|
|
1882
|
+
overrideSilhouette?: Vec3[][];
|
|
1883
|
+
/** Per-point-light parametric override (indexed by the point light's index in
|
|
1884
|
+
* `allPointLights`). A point pass uses this RADIAL silhouette instead of the
|
|
1885
|
+
* directional `overrideSilhouette`; an undefined entry → exact point path. */
|
|
1886
|
+
overridePointSilhouettes?: Array<Vec3[][] | undefined>;
|
|
1720
1887
|
}
|
|
1721
1888
|
/**
|
|
1722
1889
|
* Build a polygon-adjacency map: polygonIndex → set of polygonIndex that
|
|
@@ -1758,6 +1925,15 @@ interface ReceiverShadowFaceSpec<T = unknown> {
|
|
|
1758
1925
|
* if applicable). */
|
|
1759
1926
|
opacity: number;
|
|
1760
1927
|
paths: Array<ReceiverShadowPath<T>>;
|
|
1928
|
+
/** Full-lit face color C (all lights), for the multi-light merge: callers
|
|
1929
|
+
* multiply C by each pass's `fill/C` factor so overlaps composite to the
|
|
1930
|
+
* both-blocked color. Empty string for textured receivers (per-pixel base,
|
|
1931
|
+
* multiply can't be uniform — those fall back to cumulative-alpha). */
|
|
1932
|
+
fullLitFill: string;
|
|
1933
|
+
/** Every clipped caster polygon for this pass in absolute face-(u,v) space
|
|
1934
|
+
* (NOT offset by the tight bbox). The multi-light merge re-bases these to a
|
|
1935
|
+
* shared per-face bbox so all lights' shadows live in one SVG. */
|
|
1936
|
+
facePolysUv: Array<Array<[number, number]>>;
|
|
1761
1937
|
}
|
|
1762
1938
|
/**
|
|
1763
1939
|
* Build silhouette `edgeOwners` for a caster mesh in world-CSS frame.
|
|
@@ -1802,8 +1978,29 @@ interface ComputeReceiverShadowFacesInput<T = unknown> {
|
|
|
1802
1978
|
receiverHasTexture: boolean;
|
|
1803
1979
|
/** Per-caster items + caller id, in caller-defined order. */
|
|
1804
1980
|
casters: ReceiverCasterInput<T>[];
|
|
1805
|
-
/**
|
|
1981
|
+
/** Light direction in CSS frame, pointing TOWARD the light (to-source).
|
|
1982
|
+
* For a point light this is a representative direction (used only for the
|
|
1983
|
+
* textured-receiver opacity ratio); per-vertex directions come from
|
|
1984
|
+
* `lightPos`. */
|
|
1806
1985
|
lightDir: Vec3;
|
|
1986
|
+
/** When set, the light is a point light at this CSS-frame position. The
|
|
1987
|
+
* shadow projection becomes radial (per-vertex direction from the light)
|
|
1988
|
+
* and the silhouette fast path is disabled (facing is per-polygon). */
|
|
1989
|
+
lightPos?: Vec3;
|
|
1990
|
+
/** Every point light in the scene (CSS-frame absolute positions), used to
|
|
1991
|
+
* compute the SHADED shadow color — a shadow shows the receiver lit by all
|
|
1992
|
+
* lights EXCEPT the blocked one, so a spot shadowed from one colored light
|
|
1993
|
+
* still shows the others' color (Three.js parity). Includes non-shadow-
|
|
1994
|
+
* casting lights, since they still illuminate the shadowed region. */
|
|
1995
|
+
allPointLights?: ReadonlyArray<{
|
|
1996
|
+
position: Vec3;
|
|
1997
|
+
color?: string;
|
|
1998
|
+
intensity?: number;
|
|
1999
|
+
}>;
|
|
2000
|
+
/** For a point-light pass, the index into `allPointLights` of the light
|
|
2001
|
+
* being shadowed (excluded from the remaining-light fill). Undefined for
|
|
2002
|
+
* the directional pass (which instead excludes the directional light). */
|
|
2003
|
+
thisPointIndex?: number;
|
|
1807
2004
|
/** Camera cull rotation (rotX/rotY + receiver mesh rotation) so back-
|
|
1808
2005
|
* facing receiver faces can be skipped. */
|
|
1809
2006
|
cameraRot: CameraCullRotation;
|
|
@@ -1824,6 +2021,73 @@ interface ComputeReceiverShadowFacesInput<T = unknown> {
|
|
|
1824
2021
|
* back-facing faces. Caller mounts SVGs per spec.
|
|
1825
2022
|
*/
|
|
1826
2023
|
declare function computeReceiverShadowFaces<T = unknown>(input: ComputeReceiverShadowFacesInput<T>): ReceiverShadowFaceSpec<T>[];
|
|
2024
|
+
/** One path inside a merged face SVG. */
|
|
2025
|
+
interface MergedShadowLayer {
|
|
2026
|
+
/** Path data (`M…L…Z`, already offset to the SVG's tight bbox). */
|
|
2027
|
+
d: string;
|
|
2028
|
+
/** Fill color (remaining-light color for a single layer, multiply factor for
|
|
2029
|
+
* a merged solid layer, dark shadow color for textured). */
|
|
2030
|
+
fill: string;
|
|
2031
|
+
/** Apply `mix-blend-mode: multiply` (merged solid layers only). */
|
|
2032
|
+
multiply: boolean;
|
|
2033
|
+
/** Per-path opacity (1 for merged solid layers, which carry strength on the
|
|
2034
|
+
* SVG; the pass's own opacity otherwise). */
|
|
2035
|
+
opacity: number;
|
|
2036
|
+
}
|
|
2037
|
+
/** One receiver FACE's merged shadow, ready to mount as a single SVG. */
|
|
2038
|
+
interface MergedShadowFace {
|
|
2039
|
+
faceIndex: number;
|
|
2040
|
+
memberPolyIndices: number[];
|
|
2041
|
+
matrixCss: string;
|
|
2042
|
+
width: number;
|
|
2043
|
+
height: number;
|
|
2044
|
+
/** SVG-level opacity (shadow strength for merged solid faces, else 1). */
|
|
2045
|
+
svgOpacity: number;
|
|
2046
|
+
/** Full-lit base path (merged solid faces only); null otherwise. */
|
|
2047
|
+
baseFill: string | null;
|
|
2048
|
+
baseD: string | null;
|
|
2049
|
+
layers: MergedShadowLayer[];
|
|
2050
|
+
}
|
|
2051
|
+
/** Inputs for `computeMergedReceiverShadows` — the full light set for one
|
|
2052
|
+
* receiver, plus its prepared face planes and casters. */
|
|
2053
|
+
interface MergedReceiverShadowInput<T = unknown> {
|
|
2054
|
+
receiverPlanes: ReceiverFacePlane[];
|
|
2055
|
+
receiverPolygons: readonly Polygon[];
|
|
2056
|
+
receiverHasTexture: boolean;
|
|
2057
|
+
casters: ReceiverCasterInput<T>[];
|
|
2058
|
+
/** Directional light vector in CSS frame (to-source). */
|
|
2059
|
+
lightDir: Vec3;
|
|
2060
|
+
/** Run the directional pass (caller gates on a real, nonzero-intensity
|
|
2061
|
+
* directional light). */
|
|
2062
|
+
runDirectional: boolean;
|
|
2063
|
+
/** One pass per shadow-casting point light: CSS position + index into
|
|
2064
|
+
* `allPointLights`. Empty in dynamic mode (point lights are baked-only). */
|
|
2065
|
+
pointPasses: ReadonlyArray<{
|
|
2066
|
+
lightPos: Vec3;
|
|
2067
|
+
index: number;
|
|
2068
|
+
}>;
|
|
2069
|
+
/** All point lights (CSS positions) for the shaded shadow color; empty in
|
|
2070
|
+
* dynamic mode. */
|
|
2071
|
+
allPointLights?: ReadonlyArray<{
|
|
2072
|
+
position: Vec3;
|
|
2073
|
+
color?: string;
|
|
2074
|
+
intensity?: number;
|
|
2075
|
+
}>;
|
|
2076
|
+
cameraRot: CameraCullRotation;
|
|
2077
|
+
ambientLight?: PolyAmbientLight;
|
|
2078
|
+
directionalLight?: PolyDirectionalLight;
|
|
2079
|
+
shadow?: {
|
|
2080
|
+
color?: string;
|
|
2081
|
+
opacity?: number;
|
|
2082
|
+
maxExtend?: number;
|
|
2083
|
+
};
|
|
2084
|
+
}
|
|
2085
|
+
/**
|
|
2086
|
+
* Run every light pass for one receiver and merge each face's passes into a
|
|
2087
|
+
* single SVG descriptor. Shared by all three renderers so multi-light shadow
|
|
2088
|
+
* overlap is identical everywhere.
|
|
2089
|
+
*/
|
|
2090
|
+
declare function computeMergedReceiverShadows<T = unknown>(input: MergedReceiverShadowInput<T>): MergedShadowFace[];
|
|
1827
2091
|
|
|
1828
2092
|
/**
|
|
1829
2093
|
* PolyAnimationMixer — three.js-shaped animation API for polycss.
|
|
@@ -2272,6 +2536,9 @@ interface TextureAtlasPlan {
|
|
|
2272
2536
|
canonicalMatrix: string;
|
|
2273
2537
|
atlasMatrix: string;
|
|
2274
2538
|
atlasCanonicalSize?: number;
|
|
2539
|
+
atlasLeafSizing?: PolyTextureLeafSizing;
|
|
2540
|
+
atlasLeafWidth?: number;
|
|
2541
|
+
atlasLeafHeight?: number;
|
|
2275
2542
|
projectiveMatrix: string | null;
|
|
2276
2543
|
canvasW: number;
|
|
2277
2544
|
canvasH: number;
|
|
@@ -2296,6 +2563,33 @@ interface TextureAtlasPlan {
|
|
|
2296
2563
|
textureTint: RGBFactors;
|
|
2297
2564
|
shadedColor: string;
|
|
2298
2565
|
}
|
|
2566
|
+
interface PolyTextureLeafSourceRect {
|
|
2567
|
+
x: number;
|
|
2568
|
+
y: number;
|
|
2569
|
+
width: number;
|
|
2570
|
+
height: number;
|
|
2571
|
+
}
|
|
2572
|
+
interface PolyTextureLeafGeometry {
|
|
2573
|
+
source: PolyTextureImageSource;
|
|
2574
|
+
url: string;
|
|
2575
|
+
sourceRect: PolyTextureLeafSourceRect;
|
|
2576
|
+
leafWidth: number;
|
|
2577
|
+
leafHeight: number;
|
|
2578
|
+
matrix: string;
|
|
2579
|
+
backgroundPosition: [number, number];
|
|
2580
|
+
backgroundSize: [number, number];
|
|
2581
|
+
imageRendering: PolyTextureImageRendering;
|
|
2582
|
+
lighting: PolyTextureImageLighting;
|
|
2583
|
+
projection: PolyTextureProjection;
|
|
2584
|
+
}
|
|
2585
|
+
interface PolyTextureLeafResolverOptions {
|
|
2586
|
+
imageRendering?: PolyTextureImageRendering;
|
|
2587
|
+
backend?: PolyTextureBackend;
|
|
2588
|
+
lighting?: PolyTextureImageLighting;
|
|
2589
|
+
projection?: PolyTextureProjection;
|
|
2590
|
+
allowProjective?: boolean;
|
|
2591
|
+
projectiveQuadGuards?: ProjectiveQuadGuardSettings;
|
|
2592
|
+
}
|
|
2299
2593
|
interface BorderShapeBounds {
|
|
2300
2594
|
minX: number;
|
|
2301
2595
|
minY: number;
|
|
@@ -2483,6 +2777,10 @@ interface SolidTrianglePlanOptions {
|
|
|
2483
2777
|
tileSize?: number;
|
|
2484
2778
|
layerElevation?: number;
|
|
2485
2779
|
directionalLight?: PolyDirectionalLight;
|
|
2780
|
+
/** Point lights in MESH-LOCAL frame (renderer pre-transforms each scene
|
|
2781
|
+
* point light by inverse-rotate(worldPos - meshPos) so positions match
|
|
2782
|
+
* the local cssPoints frame). Direction-only, per-face Lambert. */
|
|
2783
|
+
pointLights?: PolyPointLight[];
|
|
2486
2784
|
ambientLight?: PolyAmbientLight;
|
|
2487
2785
|
textureLighting?: PolyTextureLightingMode;
|
|
2488
2786
|
solidPaintDefaults?: SolidPaintDefaults;
|
|
@@ -2515,6 +2813,10 @@ interface ComputeTextureAtlasPlanOptions {
|
|
|
2515
2813
|
tileSize?: number;
|
|
2516
2814
|
layerElevation?: number;
|
|
2517
2815
|
directionalLight?: PolyDirectionalLight;
|
|
2816
|
+
/** Point lights in MESH-LOCAL frame (renderer pre-transforms each scene
|
|
2817
|
+
* point light by inverse-rotate(worldPos - meshPos) so positions match
|
|
2818
|
+
* the local cssPoints frame). Direction-only, per-face Lambert. */
|
|
2819
|
+
pointLights?: PolyPointLight[];
|
|
2518
2820
|
ambientLight?: PolyAmbientLight;
|
|
2519
2821
|
/** Shared-edge set returned by {@link buildTextureEdgeRepairSets}. */
|
|
2520
2822
|
textureEdgeRepairEdges?: Set<number>;
|
|
@@ -2538,7 +2840,7 @@ declare function formatAffineMatrix3dTransformScalars(x0: number, x1: number, x2
|
|
|
2538
2840
|
declare function formatScaledMatrixFromPlan(entry: TextureAtlasPlan, scaleX: number, scaleY: number, offsetX?: number, offsetY?: number): string;
|
|
2539
2841
|
declare function formatBorderShapeMatrix(entry: TextureAtlasPlan, bounds: BorderShapeBounds): string;
|
|
2540
2842
|
declare function formatSolidQuadMatrix(entry: TextureAtlasPlan): string;
|
|
2541
|
-
declare function formatAtlasMatrix(entry: TextureAtlasPlan,
|
|
2843
|
+
declare function formatAtlasMatrix(entry: TextureAtlasPlan, atlasLeafWidth: number, atlasLeafHeight?: number): string;
|
|
2542
2844
|
declare function formatPercent(value: number, decimals?: number): string;
|
|
2543
2845
|
/** Format a raw comma-separated matrix3d value string with rounded decimals. */
|
|
2544
2846
|
declare function formatMatrix3d(matrix: string, decimals?: number): string;
|
|
@@ -2587,9 +2889,20 @@ declare function rgbToHex({ r, g, b }: RGB): string;
|
|
|
2587
2889
|
* (see applyTextureTint in the renderer). `directScale` is already
|
|
2588
2890
|
* `intensity × max(n·L, 0)` (computed by the caller).
|
|
2589
2891
|
*/
|
|
2590
|
-
|
|
2892
|
+
/**
|
|
2893
|
+
* One point light's per-face contribution to a polygon: its color and the
|
|
2894
|
+
* scalar `intensity × max(0, n·L̂)` already computed by the caller against the
|
|
2895
|
+
* face normal + centroid (point lights are direction-only — no distance
|
|
2896
|
+
* falloff). Multiple lights of different colours can't fold into one scalar,
|
|
2897
|
+
* so the shading functions accumulate these per channel in linear space.
|
|
2898
|
+
*/
|
|
2899
|
+
interface PointLightContrib {
|
|
2900
|
+
color: string;
|
|
2901
|
+
scale: number;
|
|
2902
|
+
}
|
|
2903
|
+
declare function textureTintFactors(directScale: number, lightColor: string, ambientColor: string, ambientIntensity: number, pointContribs?: readonly PointLightContrib[]): RGBFactors;
|
|
2591
2904
|
declare function tintToCss({ r, g, b }: RGBFactors): string;
|
|
2592
|
-
declare function shadePolygon(baseColor: string, directScale: number, lightColor: string, ambientColor: string, ambientIntensity: number): string;
|
|
2905
|
+
declare function shadePolygon(baseColor: string, directScale: number, lightColor: string, ambientColor: string, ambientIntensity: number, pointContribs?: readonly PointLightContrib[]): string;
|
|
2593
2906
|
declare function quantizeCssColor(input: string, steps: number): string;
|
|
2594
2907
|
declare function rgbEqual(a: RGB | undefined, b: RGB | undefined): boolean;
|
|
2595
2908
|
declare function stepRgbToward(current: RGB, target: RGB, maxStep: number): RGB;
|
|
@@ -2614,6 +2927,10 @@ interface FilterAtlasPlansEnv {
|
|
|
2614
2927
|
solidTriangleSupported: boolean;
|
|
2615
2928
|
projectiveQuadSupported: boolean;
|
|
2616
2929
|
borderShapeSupported: boolean;
|
|
2930
|
+
textureBackend?: PolyTextureBackend;
|
|
2931
|
+
textureImageRendering?: PolyTextureImageRendering;
|
|
2932
|
+
textureImageLighting?: PolyTextureImageLighting;
|
|
2933
|
+
textureProjection?: PolyTextureProjection;
|
|
2617
2934
|
/** When true, non-triangle non-rect non-projective polys whose plan has
|
|
2618
2935
|
* cornerShapeGeometryForPlan != null are excluded from the atlas (they
|
|
2619
2936
|
* render as <u> via corner-*-shape: bevel CSS — matches vanilla's
|
|
@@ -2723,6 +3040,13 @@ declare function computeTextureAtlasPlanPublic(polygon: Polygon, index: number,
|
|
|
2723
3040
|
* this from {@link buildBasisHints}; React/Vue mirror that path. */
|
|
2724
3041
|
basisHintOverride?: BasisHint): TextureAtlasPlan | null;
|
|
2725
3042
|
|
|
3043
|
+
declare function resolvePolyTextureLeafGeometry(plan: TextureAtlasPlan, options?: PolyTextureLeafResolverOptions): PolyTextureLeafGeometry | null;
|
|
3044
|
+
|
|
3045
|
+
declare function resolvePolyTextureImageSource(polygon: Polygon): PolyTextureImageSource | undefined;
|
|
3046
|
+
declare function resolvePolyTextureUrl(polygon: Polygon): string | undefined;
|
|
3047
|
+
declare function resolvePolyTexturePresentation(polygon: Polygon, defaults?: PolyTexturePresentation): PolyTexturePresentation;
|
|
3048
|
+
declare function resolvePolyTextureImageRendering(polygon: Polygon, defaultImageRendering: PolyTextureImageRendering | undefined): PolyTextureImageRendering;
|
|
3049
|
+
|
|
2726
3050
|
declare function normalizeAtlasScale(scale: number | string | undefined): number;
|
|
2727
3051
|
declare function atlasArea(pages: PackedPage[]): number;
|
|
2728
3052
|
declare function autoAtlasScaleCap(pages: PackedPage[], maxDecodedBytes: number): number;
|
|
@@ -2735,6 +3059,12 @@ declare function autoAtlasMaxDecodedBytes(isMobile: boolean): number;
|
|
|
2735
3059
|
/** Returns the atlas canonical size for the given texture quality and device class. */
|
|
2736
3060
|
declare function atlasCanonicalSizeForTextureQuality(textureQualityInput: TextureQuality | undefined, isMobile: boolean): number;
|
|
2737
3061
|
declare function applyPackedAtlasCanonicalSize(packed: PackedAtlas, atlasCanonicalSize: number): PackedAtlas;
|
|
3062
|
+
declare function resolveAtlasLeafBox(entry: TextureAtlasPlan, atlasScale: number, textureLeafSizing: PolyTextureLeafSizing | undefined, atlasCanonicalSize?: number): {
|
|
3063
|
+
width: number;
|
|
3064
|
+
height: number;
|
|
3065
|
+
sizing: PolyTextureLeafSizing;
|
|
3066
|
+
};
|
|
3067
|
+
declare function applyPackedAtlasLeafSizing(packed: PackedAtlas, atlasCanonicalSize: number, atlasScale: number, textureLeafSizing?: PolyTextureLeafSizing | undefined): PackedAtlas;
|
|
2738
3068
|
declare function atlasCanonicalSizeForEntry(entry: TextureAtlasPlan): number;
|
|
2739
3069
|
declare function atlasPadding(atlasScale: number): number;
|
|
2740
3070
|
declare function packTextureAtlasPlans(plans: Array<TextureAtlasPlan | null>, atlasScale?: number): PackedAtlas;
|
|
@@ -2742,10 +3072,10 @@ declare function packTextureAtlasPlans(plans: Array<TextureAtlasPlan | null>, at
|
|
|
2742
3072
|
* Pack atlas plans and resolve atlas scale, accepting a pre-resolved isMobile
|
|
2743
3073
|
* boolean instead of a Document reference.
|
|
2744
3074
|
*/
|
|
2745
|
-
declare function packTextureAtlasPlansWithScaleCore(plans: Array<TextureAtlasPlan | null>, textureQualityInput: TextureQuality | undefined, isMobile: boolean): {
|
|
3075
|
+
declare function packTextureAtlasPlansWithScaleCore(plans: Array<TextureAtlasPlan | null>, textureQualityInput: TextureQuality | undefined, isMobile: boolean, textureLeafSizing?: PolyTextureLeafSizing | undefined): {
|
|
2746
3076
|
packed: PackedAtlas;
|
|
2747
3077
|
atlasScale: number;
|
|
2748
3078
|
atlasCanonicalSize: number;
|
|
2749
3079
|
};
|
|
2750
3080
|
|
|
2751
|
-
export { ASYNC_RENDER_BUDGET_MS, ATLAS_CANONICAL_SIZE_AUTO_DESKTOP, ATLAS_CANONICAL_SIZE_EXPLICIT, ATLAS_MAX_SIZE, ATLAS_PADDING, AUTO_ATLAS_LOW_AREA, AUTO_ATLAS_MAX_BITMAP_SIDE, AUTO_ATLAS_MAX_DECODED_BYTES_DESKTOP, AUTO_ATLAS_MAX_DECODED_BYTES_MOBILE, AUTO_ATLAS_MEDIUM_AREA, AUTO_ATLAS_SCALE_GUARD, type ArrowPolygonsOptions, type AutoRotateConfig, type AutoRotateOption, type AxesHelperOptions, BAKED_SHADOW_MIN_UP, BAKED_SHADOW_Z_SQUASH, BASE_TILE, BASIS_EPS, BORDER_SHAPE_BLEED, BORDER_SHAPE_CANONICAL_SIZE, BORDER_SHAPE_CENTER_PERCENT, BORDER_SHAPE_POINT_EPS, type BasisHint, type BasisOptions, type BorderShapeBounds, type BorderShapeGeometry, type BoxFace, type BoxFaceOptions, type BoxPolygonsOptions, CAMERA_BACKFACE_CULL_EPS, COLOR_PARSE_CACHE_MAX, CORNER_SHAPE_DUPLICATE_EPS, CORNER_SHAPE_POINT_EPS, type CameraCullNormalGroup, type CameraCullRotation, type CameraHandle, type CameraState, type CameraStyleInput, type CasterPolyItem, type ComputeReceiverShadowFacesInput, type ComputeTextureAtlasPlanOptions, type ConePolygonsOptions, type CornerShapeCorner, type CornerShapeGeometry, type CornerShapeRadius, type CornerShapeSide, type CoverPlanarPolygonsOptions, type CullInteriorOptions, type CylinderPolygonsOptions, DECIMAL_SCALES, DEFAULT_AMBIENT_COLOR, DEFAULT_AMBIENT_INTENSITY, DEFAULT_ATLAS_CSS_DECIMALS, DEFAULT_BORDER_SHAPE_DECIMALS, DEFAULT_CAMERA_STATE, DEFAULT_LIGHT_COLOR, DEFAULT_LIGHT_DIR, DEFAULT_LIGHT_INTENSITY, DEFAULT_MATRIX_DECIMALS, DEFAULT_PROJECTION, DEFAULT_SEAM_BLEED, DEFAULT_SEAM_FACET_SPLIT_OPTIONS, DEFAULT_SEAM_OVERLAP_OPTIONS, DEFAULT_TILE, type DedupeOverlappingPolygonsOptions, type DodecahedronPolygonsOptions, type EdgeOwners, type FilterAtlasPlansEnv, type GetSolidPaintDefaultsEnv, type GltfParseOptions, type IcosahedronPolygonsOptions, type InternalSolidTrianglePlanOptions, type LoadMeshOptions, type LocalBasis, type LoopMode, LoopOnce, LoopPingPong, LoopRepeat, MAX_ATLAS_SCALE, MIN_ATLAS_SCALE, type MeshResolution, type MtlParseResult, type NormalizeResult, type ObjParseOptions, type OctahedronPolygonsOptions, type OptimizeAnimatedMeshPolygonsOptions, type OptimizeMeshParseResultOptions, type OptimizeMeshPolygonsOptions, PROJECTIVE_QUAD_BLEED, PROJECTIVE_QUAD_DENOM_EPS, PROJECTIVE_QUAD_MAX_WEIGHT_RATIO, type PackedAtlas, type PackedPage, type PackedTextureAtlasEntry, type PackingPage, type PackingShelf, type ParseAnimationClip, type ParseAnimationController, type ParseResult, type ParseStlColor, type ParseStlSolid, type ParseStlTopology, type ParsedColor, type PlanePolygonsOptions, type PolyAmbientLight, type PolyAnimationAction, type ParseAnimationClip as PolyAnimationClip, type PolyAnimationMixer, type PolyAnimationTarget, type PolyDirectionalLight, type PolyMaterial, type PolyMeshTransformInput, type PolyRenderStrategiesOption, type PolyRenderStrategy, type PolySceneTransformInput, type PolySeamBleed, type PolySeamBleedEdgeValue, type PolySeamBleedEdges, type PolyTextureAlphaMode, type PolyTextureLightingMode, type PolyTextureWrap, type PolyTextureWrapMode, type PolyVoxelCell, type PolyVoxelSource, type Polygon, type PolygonBasisInfo, type PolygonFace, type ProjectiveQuadCoefficients, type ProjectiveQuadGuardGlobal, type ProjectiveQuadGuardOverrides, type ProjectiveQuadGuardSettings, QUAT_IDENTITY, type Quat, RECEIVER_NORMAL_TOL, RECEIVER_OFFSET_TOL, RECEIVER_OUTLINE_EXPAND, RECT_EPS, type RGB, type RGBFactors, type ReceiverCasterInput, type ReceiverFacePlane, type ReceiverPlaneGroup, type ReceiverShadowFaceSpec, type ReceiverShadowPath, type RectBrush, type RingPolygonsOptions, type RingQuadPolygonsOptions, SEAM_LIGHT_EPS, SOLID_QUAD_CANONICAL_SIZE, SOLID_TRIANGLE_BLEED, SOLID_TRIANGLE_CANONICAL_SIZE, SOLID_TRIANGLE_LARGE_BORDER_CANONICAL_SIZE, SURFACE_DISTANCE_EPS, SURFACE_NORMAL_EPS, type SceneBbox, type SceneContext, type SceneContextBuildArgs, type SceneContextBuildResult, type ScreenToWorldOptions, type SeamBleedInsets, type SeamFacetSplitCandidate, type SeamFacetSplitCandidateReason, type SeamFacetSplitOptions, type SeamFacetSplitReport, type SeamOverlapCandidate, type SeamOverlapCandidateKind, type SeamOverlapDiagnostics, type SeamOverlapOptions, type SimplifyTriangleMeshPolygonsOptions, type SolidPaintDefaults, type SolidTextureSampleOptions, type SolidTriangleBasis, type SolidTriangleColorPlan, type SolidTriangleComputeOptions, type SolidTriangleFrame, type SolidTrianglePlan, type SolidTrianglePlanOptions, type SolidTrianglePrimitive, type SpherePolygonsOptions, type StablePlanBasis, type StableTriangleColorState, type StlParseOptions, TEXTURE_EDGE_REPAIR_ALPHA_MIN, TEXTURE_EDGE_REPAIR_RADIUS, TEXTURE_EDGE_REPAIR_SOURCE_ALPHA_MIN, TEXTURE_TRIANGLE_BLEED, type TetrahedronPolygonsOptions, type TextureAtlasPage, type TextureAtlasPlan, type TexturePaintMetrics, type TexturePaintMetricsOptions, type TextureQuality, type TextureTriangle, type TextureTrianglePlan, type TorusPolygonsOptions, type UvAffine, type UvSampleRect, VOXEL_CAMERA_CULL_AXIS_EPS, VOXEL_CAMERA_CULL_NORMAL_LIMIT, type Vec2, type Vec3, type VoxParseOptions, applyPackedAtlasCanonicalSize, arrowPolygons, atlasArea, atlasBitmapMaxSide, atlasCanonicalSizeForEntry, atlasCanonicalSizeForTextureQuality, atlasDecodedBytes, atlasPadding, autoAtlasBudgetFactor, autoAtlasMaxDecodedBytes, autoAtlasScale, autoAtlasScaleCap, axesHelperPolygons, bakeSolidTextureSampledPolygons, bakeSolidTextureSamples, basisAxisKey, borderShapeBoundsFromPoints, borderShapeGeometryForPlan, boxPolygons, buildBakedShadowProjectionMatrix, buildBasisHints, buildEdgeOwners, buildPolyMeshTransform, buildPolySceneTransform, buildSceneContext, buildSeamBleedPolygonEdges, buildSeamBleedPolygonSet, buildSharedEdgeMap, buildTextureEdgeRepairSets, cachedParsePureColor, cameraCullNormalGroups, cameraCullNormalGroupsFromPolygons, cameraCullNormalKey, cameraCullVisibleSignature, cameraFacingDepth, chooseIslandXAxis, chooseLocalBasis, clampChannel, classifyFacing, clipPolygonToConvex2D, colorErrorScore, compatibleBleedSurface, compatibleSurface, computeLightVisibility, computePlanSeamBleedEdgeAmounts, computeProjectiveQuadCoefficients, computeProjectiveQuadMatrix, computeReceiverShadowFaces, computeSceneBbox, computeSeamBleedInsets, computeShapeLighting, computeSolidTriangleColorPlan, computeSolidTriangleColorPlanFromNormal, computeSolidTrianglePlan, computeSolidTrianglePlanFromCssPoints, computeSurfaceNormal, computeTextureAtlasPlan, computeTextureAtlasPlanPublic, computeTexturePaintMetrics, computeUvAffine, computeUvSampleRect, conePolygons, convexHull2D, cornerShapeDiagonal, cornerShapeGeometryForPlan, cornerShapePointSides, coverPlanarPolygons, createIsometricCamera, createPolyAnimationMixer, crossVec, cssBorderShapeForGeometry, cssBorderShapeForPlan, cssDistanceToWorld, cssPoints, cssPositionToWorld, cullInteriorPolygons, cylinderPolygons, dedupeOverlappingPolygons, dodecahedronPolygons, dominantCountKey, dotVec, ensureCcw2D, eulerXYZFromQuat, evaluateIslandAxis, expandClipPoints, expandConvexHullOutward, extractSilhouetteLoops, filterAtlasPlans, findOverlappingPolygonDuplicates, formatAffineMatrix3dColumns, formatAffineMatrix3dScalars, formatAffineMatrix3dTransformScalars, formatAtlasMatrix, formatBorderShapeElementStyle, formatBorderShapeEntryMatrix, formatBorderShapeMatrix, formatColor, formatCornerShapeElementStyle, formatCssLength, formatCssLengthPx, formatMatrix3d, formatMatrix3dValues, formatPercent, formatScaledMatrixFromPlan, formatSolidQuadEntryMatrix, formatSolidQuadMatrix, fullRectBounds, getPolygonBasisInfo, getSolidPaintDefaultsForPlansCore, groupReceiverFaceGroups, icosahedronPolygons, incrementCount, intersect2DLines, intersect2DLinesRaw, inverseRotateVec3, isAxisAlignedSurfaceNormal, isBakedShadowCaster, isBasisOptimizable, isConvexPolygonPoints, isFullRectBasis, isFullRectSolid, isProjectiveQuadPlan, isSolidTrianglePlan, isVoxelCameraCullableNormalGroups, loadMesh, makeLocalBasis, mergePolygons, meshScaleVec3, normalFacesCamera, normalizeAtlasScale, normalizeInvertMultiplier, normalizePolygons, normalizedSeamBleed, octahedronPolygons, offsetConvexPolygonPoints, offsetConvexPolygonPointsByEdgeAmounts, offsetStableTrianglePoints, offsetTrianglePoints, optimizeAnimatedMeshPolygons, optimizeMeshParseResult, optimizeMeshPolygons, packTextureAtlasPlans, packTextureAtlasPlansWithScaleCore, parseAlpha, parseColor, parseGltf, parseHex, parseHexColor, parseMtl, parseObj, parsePureColor, parseRgbColor, parseStl, parseVox, planePolygons, cssDistanceToWorld as polyCssDistanceToWorld, cssPositionToWorld as polyCssPositionToWorld, polygonContainsPoint, polygonCssSurfaceNormal, polygonFaces, polygonFacesCamera, polygonSignedArea2D, prepareCasterEdgeOwners, prepareCasterPolyItems, prepareReceiverFacePlanes, projectCssVertexToGround, projectTextureTriangle, quantizeCssColor, quatFromAxisAngle, quatFromEulerXYZ, quatMultiply, repairMeshSeams, resolveBleedRatio, resolveProjectiveQuadGuards, resolveSeamBleed, rgbEqual, rgbKey, rgbToCss, rgbToHex, ringPolygons, ringQuadPolygons, rotateVec3, rotateVec3InWrapperCssFrame, roundDecimal, safariCssProjectiveUnsupported, safePlanSeamBleedAmount, screenToWorldOnSphere, screenToWorldRay, seamBleedAmountArray, seamFacetSplitPolygons, seamFacetSplitReport, seamLightBrightness, seamOverlapDiagnostics, seamOverlapPolygons, seamOverlapReport, shadeColor, shadePolygon, sharedCornerShapeSide, signedArea2D, simplifyCornerShapePoints, simplifyTriangleMeshPolygons, spherePolygons, stableBasisFromPlan, stableTriangleMatrixDecimals, stepRgbToward, tetrahedronPolygons, textureTintFactors, tintToCss, torusPolygons, worldCssForMesh, worldDirectionToCss, worldDirectionToCss as worldDirectionToPolyCss, worldDirectionalLightToCss, worldDirectionalLightToCss as worldDirectionalLightToPolyCss, worldDistanceToCss, worldDistanceToCss as worldDistanceToPolyCss, worldPositionToCss, worldPositionToCss as worldPositionToPolyCss };
|
|
3081
|
+
export { ASYNC_RENDER_BUDGET_MS, ATLAS_CANONICAL_SIZE_AUTO_DESKTOP, ATLAS_CANONICAL_SIZE_EXPLICIT, ATLAS_MAX_SIZE, ATLAS_PADDING, AUTO_ATLAS_LOW_AREA, AUTO_ATLAS_MAX_BITMAP_SIDE, AUTO_ATLAS_MAX_DECODED_BYTES_DESKTOP, AUTO_ATLAS_MAX_DECODED_BYTES_MOBILE, AUTO_ATLAS_MEDIUM_AREA, AUTO_ATLAS_SCALE_GUARD, type ArrowPolygonsOptions, type AutoRotateConfig, type AutoRotateOption, type AxesHelperOptions, BAKED_SHADOW_MIN_UP, BAKED_SHADOW_Z_SQUASH, BASE_TILE, BASIS_EPS, BORDER_SHAPE_BLEED, BORDER_SHAPE_CANONICAL_SIZE, BORDER_SHAPE_CENTER_PERCENT, BORDER_SHAPE_POINT_EPS, type BasisHint, type BasisOptions, type BorderShapeBounds, type BorderShapeGeometry, type BoxFace, type BoxFaceOptions, type BoxPolygonsOptions, CAMERA_BACKFACE_CULL_EPS, COLOR_PARSE_CACHE_MAX, CORNER_SHAPE_DUPLICATE_EPS, CORNER_SHAPE_POINT_EPS, type CameraCullNormalGroup, type CameraCullRotation, type CameraHandle, type CameraState, type CameraStyleInput, type CasterPolyItem, type ComputeReceiverShadowFacesInput, type ComputeTextureAtlasPlanOptions, type ConePolygonsOptions, type CornerShapeCorner, type CornerShapeGeometry, type CornerShapeRadius, type CornerShapeSide, type CoverPlanarPolygonsOptions, type CullInteriorOptions, type CylinderPolygonsOptions, DECIMAL_SCALES, DEFAULT_AMBIENT_COLOR, DEFAULT_AMBIENT_INTENSITY, DEFAULT_ATLAS_CSS_DECIMALS, DEFAULT_BORDER_SHAPE_DECIMALS, DEFAULT_CAMERA_STATE, DEFAULT_LIGHT_COLOR, DEFAULT_LIGHT_DIR, DEFAULT_LIGHT_INTENSITY, DEFAULT_MATRIX_DECIMALS, DEFAULT_PROJECTION, DEFAULT_SEAM_BLEED, DEFAULT_SEAM_FACET_SPLIT_OPTIONS, DEFAULT_SEAM_OVERLAP_OPTIONS, DEFAULT_TILE, type DedupeOverlappingPolygonsOptions, type DodecahedronPolygonsOptions, type EdgeOwners, type FilterAtlasPlansEnv, type GetSolidPaintDefaultsEnv, type GltfParseOptions, type IcosahedronPolygonsOptions, type InternalSolidTrianglePlanOptions, type LoadMeshOptions, type LocalBasis, type LoopMode, LoopOnce, LoopPingPong, LoopRepeat, MAX_ATLAS_SCALE, MIN_ATLAS_SCALE, type MergedReceiverShadowInput, type MergedShadowFace, type MergedShadowLayer, type MeshResolution, type MtlParseResult, type NormalizeResult, type ObjParseOptions, type OctahedronPolygonsOptions, type OptimizeAnimatedMeshPolygonsOptions, type OptimizeMeshParseResultOptions, type OptimizeMeshPolygonsOptions, PROJECTIVE_QUAD_BLEED, PROJECTIVE_QUAD_DENOM_EPS, PROJECTIVE_QUAD_MAX_WEIGHT_RATIO, type PackedAtlas, type PackedPage, type PackedTextureAtlasEntry, type PackingPage, type PackingShelf, type ParametricOverrideInput, type ParametricOverrideResult, type ParseAnimationClip, type ParseAnimationController, type ParseResult, type ParseStlColor, type ParseStlSolid, type ParseStlTopology, type ParsedColor, type PlanePolygonsOptions, type PolyAmbientLight, type PolyAnimationAction, type ParseAnimationClip as PolyAnimationClip, type PolyAnimationMixer, type PolyAnimationTarget, type PolyCameraProjection, type PolyCameraSceneTransformOptions, type PolyCameraSnapshot, type PolyCameraSnapshotOptions, type PolyCameraSnapshotSource, type PolyDirectionalLight, type PolyMaterial, type PolyMeshTransformInput, type PolyPointLight, type PolyRenderStrategiesOption, type PolyRenderStrategy, type PolySceneTransformInput, type PolySeamBleed, type PolySeamBleedEdgeValue, type PolySeamBleedEdges, type PolyTextureAlphaMode, type PolyTextureBackend, type PolyTextureImageLighting, type PolyTextureImageRendering, type PolyTextureImageSource, type PolyTextureLeafGeometry, type PolyTextureLeafResolverOptions, type PolyTextureLeafSizing, type PolyTextureLeafSourceRect, type PolyTextureLightingMode, type PolyTexturePresentation, type PolyTextureProjection, type PolyTextureWrap, type PolyTextureWrapMode, type PolyVoxelCell, type PolyVoxelSource, type Polygon, type PolygonBasisInfo, type PolygonFace, type ProjectiveQuadCoefficients, type ProjectiveQuadGuardGlobal, type ProjectiveQuadGuardOverrides, type ProjectiveQuadGuardSettings, QUAT_IDENTITY, type Quat, RECEIVER_NORMAL_TOL, RECEIVER_OFFSET_TOL, RECEIVER_OUTLINE_EXPAND, RECT_EPS, type RGB, type RGBFactors, type ReceiverCasterInput, type ReceiverFacePlane, type ReceiverPlaneGroup, type ReceiverShadowFaceSpec, type ReceiverShadowPath, type RectBrush, type RingPolygonsOptions, type RingQuadPolygonsOptions, SEAM_LIGHT_EPS, SOLID_QUAD_CANONICAL_SIZE, SOLID_TRIANGLE_BLEED, SOLID_TRIANGLE_CANONICAL_SIZE, SOLID_TRIANGLE_LARGE_BORDER_CANONICAL_SIZE, SURFACE_DISTANCE_EPS, SURFACE_NORMAL_EPS, type SceneBbox, type SceneContext, type SceneContextBuildArgs, type SceneContextBuildResult, type ScreenToWorldOptions, type SeamBleedInsets, type SeamFacetSplitCandidate, type SeamFacetSplitCandidateReason, type SeamFacetSplitOptions, type SeamFacetSplitReport, type SeamOverlapCandidate, type SeamOverlapCandidateKind, type SeamOverlapDiagnostics, type SeamOverlapOptions, type SimplifyTriangleMeshPolygonsOptions, type SolidPaintDefaults, type SolidTextureSampleOptions, type SolidTriangleBasis, type SolidTriangleColorPlan, type SolidTriangleComputeOptions, type SolidTriangleFrame, type SolidTrianglePlan, type SolidTrianglePlanOptions, type SolidTrianglePrimitive, type SpherePolygonsOptions, type StablePlanBasis, type StableTriangleColorState, type StlParseOptions, TEXTURE_EDGE_REPAIR_ALPHA_MIN, TEXTURE_EDGE_REPAIR_RADIUS, TEXTURE_EDGE_REPAIR_SOURCE_ALPHA_MIN, TEXTURE_TRIANGLE_BLEED, type TetrahedronPolygonsOptions, type TextureAtlasPage, type TextureAtlasPlan, type TexturePaintMetrics, type TexturePaintMetricsOptions, type TextureQuality, type TextureTriangle, type TextureTrianglePlan, type TorusPolygonsOptions, type UvAffine, type UvSampleRect, VOXEL_CAMERA_CULL_AXIS_EPS, VOXEL_CAMERA_CULL_NORMAL_LIMIT, type Vec2, type Vec3, type VoxParseOptions, applyPackedAtlasCanonicalSize, applyPackedAtlasLeafSizing, arrowPolygons, atlasArea, atlasBitmapMaxSide, atlasCanonicalSizeForEntry, atlasCanonicalSizeForTextureQuality, atlasDecodedBytes, atlasPadding, autoAtlasBudgetFactor, autoAtlasMaxDecodedBytes, autoAtlasScale, autoAtlasScaleCap, axesHelperPolygons, bakeSolidTextureSampledPolygons, bakeSolidTextureSamples, basisAxisKey, borderShapeBoundsFromPoints, borderShapeGeometryForPlan, boxPolygons, buildBakedShadowProjectionMatrix, buildBasisHints, buildEdgeOwners, buildParametricCasterOverride, buildPolyCameraSceneTransform, buildPolyMeshTransform, buildPolySceneTransform, buildSceneContext, buildSeamBleedPolygonEdges, buildSeamBleedPolygonSet, buildSharedEdgeMap, buildTextureEdgeRepairSets, cachedParsePureColor, cameraCullNormalGroups, cameraCullNormalGroupsFromPolygons, cameraCullNormalKey, cameraCullVisibleSignature, cameraFacingDepth, capturePolyCameraSnapshot, chooseIslandXAxis, chooseLocalBasis, clampChannel, classifyFacing, clipPolygonToConvex2D, colorErrorScore, compatibleBleedSurface, compatibleSurface, computeCoverageShadowSilhouette, computeLightVisibility, computeMergedReceiverShadows, computeParametricShadowSilhouette, computePlanSeamBleedEdgeAmounts, computeProjectiveQuadCoefficients, computeProjectiveQuadMatrix, computeReceiverShadowFaces, computeSceneBbox, computeSeamBleedInsets, computeShapeLighting, computeSolidTriangleColorPlan, computeSolidTriangleColorPlanFromNormal, computeSolidTrianglePlan, computeSolidTrianglePlanFromCssPoints, computeSurfaceNormal, computeTextureAtlasPlan, computeTextureAtlasPlanPublic, computeTexturePaintMetrics, computeUvAffine, computeUvSampleRect, conePolygons, convexHull2D, cornerShapeDiagonal, cornerShapeGeometryForPlan, cornerShapePointSides, coverPlanarPolygons, createIsometricCamera, createPolyAnimationMixer, crossVec, cssBorderShapeForGeometry, cssBorderShapeForPlan, cssDistanceToWorld, cssPoints, cssPositionToWorld, cullInteriorPolygons, cylinderPolygons, dedupeOverlappingPolygons, dodecahedronPolygons, dominantCountKey, dotVec, ensureCcw2D, eulerXYZFromQuat, evaluateIslandAxis, expandClipPoints, expandConvexHullOutward, extractSilhouetteLoops, filterAtlasPlans, findOverlappingPolygonDuplicates, formatAffineMatrix3dColumns, formatAffineMatrix3dScalars, formatAffineMatrix3dTransformScalars, formatAtlasMatrix, formatBorderShapeElementStyle, formatBorderShapeEntryMatrix, formatBorderShapeMatrix, formatColor, formatCornerShapeElementStyle, formatCssLength, formatCssLengthPx, formatMatrix3d, formatMatrix3dValues, formatPercent, formatScaledMatrixFromPlan, formatSolidQuadEntryMatrix, formatSolidQuadMatrix, fullRectBounds, getPolygonBasisInfo, getSolidPaintDefaultsForPlansCore, groupReceiverFaceGroups, icosahedronPolygons, incrementCount, intersect2DLines, intersect2DLinesRaw, inverseRotateVec3, isAxisAlignedSurfaceNormal, isBakedShadowCaster, isBasisOptimizable, isConvexCaster, isConvexPolygonPoints, isFlatCaster, isFullRectBasis, isFullRectSolid, isPointShadowCaster, isProjectiveQuadPlan, isSolidTrianglePlan, isVoxelCameraCullableNormalGroups, loadMesh, makeLocalBasis, mergePolygons, meshScaleVec3, normalFacesCamera, normalizeAtlasScale, normalizeInvertMultiplier, normalizePolygons, normalizedSeamBleed, octahedronPolygons, offsetConvexPolygonPoints, offsetConvexPolygonPointsByEdgeAmounts, offsetStableTrianglePoints, offsetTrianglePoints, optimizeAnimatedMeshPolygons, optimizeMeshParseResult, optimizeMeshPolygons, packTextureAtlasPlans, packTextureAtlasPlansWithScaleCore, parseAlpha, parseColor, parseGltf, parseHex, parseHexColor, parseMtl, parseObj, parsePureColor, parseRgbColor, parseStl, parseVox, planePolygons, polyCameraTargetToCss, polyCssDistanceToWorld, polyCssPositionToWorld, polygonContainsPoint, polygonCssSurfaceNormal, polygonFaces, polygonFacesCamera, polygonSignedArea2D, prepareCasterEdgeOwners, prepareCasterPolyItems, prepareReceiverFacePlanes, projectCssVertexToGround, projectCssVertexToGroundFromPoint, projectTextureTriangle, quantizeCssColor, quatFromAxisAngle, quatFromEulerXYZ, quatMultiply, repairMeshSeams, resolveAtlasLeafBox, resolveBleedRatio, resolvePolyCameraAppliedPerspectiveStyle, resolvePolyTextureImageRendering, resolvePolyTextureImageSource, resolvePolyTextureLeafGeometry, resolvePolyTexturePresentation, resolvePolyTextureUrl, resolveProjectiveQuadGuards, resolveSeamBleed, rgbEqual, rgbKey, rgbToCss, rgbToHex, ringPolygons, ringQuadPolygons, rotateVec3, rotateVec3InWrapperCssFrame, roundDecimal, safariCssProjectiveUnsupported, safePlanSeamBleedAmount, screenToWorldOnSphere, screenToWorldRay, seamBleedAmountArray, seamFacetSplitPolygons, seamFacetSplitReport, seamLightBrightness, seamOverlapDiagnostics, seamOverlapPolygons, seamOverlapReport, shadeColor, shadePolygon, sharedCornerShapeSide, signedArea2D, simplifyCornerShapePoints, simplifyTriangleMeshPolygons, spherePolygons, stableBasisFromPlan, stableTriangleMatrixDecimals, stepRgbToward, tetrahedronPolygons, textureTintFactors, tintToCss, torusPolygons, worldCssForMesh, worldDirectionToCss, worldDirectionToPolyCss, worldDirectionalLightToCss, worldDirectionalLightToPolyCss, worldDistanceToCss, worldDistanceToPolyCss, worldPositionToCss, worldPositionToPolyCss };
|