@layoutit/polycss-core 0.2.6 → 0.2.8
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 +54 -7
- package/dist/camera-VU-yix11.d.cts +304 -0
- package/dist/camera-VU-yix11.d.ts +304 -0
- package/dist/index.cjs +3 -3
- package/dist/index.d.cts +222 -296
- package/dist/index.d.ts +222 -296
- package/dist/index.js +3 -3
- package/dist/three.cjs +1 -0
- package/dist/three.d.cts +108 -0
- package/dist/three.d.ts +108 -0
- package/dist/three.js +1 -0
- package/package.json +13 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,206 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* How polygon lighting is applied by DOM renderers.
|
|
4
|
-
* - "baked": multiply the light tint into the off-DOM canvas before the
|
|
5
|
-
* polygon becomes an atlas sprite. Best fidelity (full RGB tint) but
|
|
6
|
-
* the atlas re-rasterizes whenever the light changes.
|
|
7
|
-
* - "dynamic": lighting computed entirely in CSS via per-polygon normals
|
|
8
|
-
* embedded in calc() and scene-root light vars (background-color +
|
|
9
|
-
* background-blend-mode multiply, masked by the atlas alpha). Atlas
|
|
10
|
-
* stays light-independent — sliding the light only writes a few CSS
|
|
11
|
-
* variables, no JS work, no atlas re-rasterization.
|
|
12
|
-
*/
|
|
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
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Mesh post-processing intent.
|
|
39
|
-
* - "lossless": preserve the authored surface while applying exact
|
|
40
|
-
* reductions such as interior culling and coplanar merge.
|
|
41
|
-
* - "lossy": allow bounded geometric approximation when it reduces the
|
|
42
|
-
* rendered polygon/DOM count.
|
|
43
|
-
*/
|
|
44
|
-
type MeshResolution = "lossless" | "lossy";
|
|
45
|
-
/**
|
|
46
|
-
* 3D point/vector, stored as a `[x, y, z]` tuple. Tuple (rather than
|
|
47
|
-
* `{x, y, z}`) for compact JSON: meshes serialize to thousands of vertices
|
|
48
|
-
* and the difference adds up. Destructure with `const [x, y, z] = v` when
|
|
49
|
-
* you need named axes.
|
|
50
|
-
*
|
|
51
|
-
* PolyCSS world space convention: +X right, +Y forward, +Z up.
|
|
52
|
-
*/
|
|
53
|
-
type Vec3 = [number, number, number];
|
|
54
|
-
/**
|
|
55
|
-
* 2D point/vector — `[u, v]`. Used for texture-atlas UV coordinates on
|
|
56
|
-
* polygons. Convention follows OBJ: u is horizontal (0=left, 1=right),
|
|
57
|
-
* v is vertical (0=bottom, 1=top). Renderers flip v when binding to raster
|
|
58
|
-
* image space whose Y-axis points down.
|
|
59
|
-
*/
|
|
60
|
-
type Vec2 = [number, number];
|
|
61
|
-
interface TextureTriangle {
|
|
62
|
-
vertices: [Vec3, Vec3, Vec3];
|
|
63
|
-
uvs: [Vec2, Vec2, Vec2];
|
|
64
|
-
}
|
|
65
|
-
type PolyTextureWrapMode = "repeat" | "clamp-to-edge" | "mirrored-repeat";
|
|
66
|
-
interface PolyTextureWrap {
|
|
67
|
-
s: PolyTextureWrapMode;
|
|
68
|
-
t: PolyTextureWrapMode;
|
|
69
|
-
}
|
|
70
|
-
type PolyTextureAlphaMode = "opaque" | "mask" | "blend";
|
|
71
|
-
/**
|
|
72
|
-
* Directional light — simulates a single distant source (sun, key light).
|
|
73
|
-
* Contributes Lambert shading scaled by `intensity`. `direction` is in
|
|
74
|
-
* scene-local CSS-pixel coords and does not need to be pre-normalized.
|
|
75
|
-
* Mirrors three.js's `DirectionalLight`.
|
|
76
|
-
*/
|
|
77
|
-
interface PolyDirectionalLight {
|
|
78
|
-
/** Direction the light shines TOWARD (typical convention). */
|
|
79
|
-
direction: Vec3;
|
|
80
|
-
/** Light tint, hex string. White by default. */
|
|
81
|
-
color?: string;
|
|
82
|
-
/** Scalar multiplier on the directional contribution. Default 1. */
|
|
83
|
-
intensity?: number;
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* Ambient light — uniform fill that adds to every polygon regardless of
|
|
87
|
-
* orientation. Mirrors three.js's `AmbientLight`. Decoupled from the
|
|
88
|
-
* directional contribution: the two add independently rather than
|
|
89
|
-
* splitting a fixed energy budget.
|
|
90
|
-
*/
|
|
91
|
-
interface PolyAmbientLight {
|
|
92
|
-
/** Tint, hex string. White by default. */
|
|
93
|
-
color?: string;
|
|
94
|
-
/** Scalar multiplier on the ambient contribution. Default 0.4. */
|
|
95
|
-
intensity?: number;
|
|
96
|
-
}
|
|
97
|
-
/**
|
|
98
|
-
* Material — paint configuration shareable across many polygons.
|
|
99
|
-
*
|
|
100
|
-
* In CSS terms, a material bundles the `background-image` source plus paint
|
|
101
|
-
* config. When a polygon references a material AND its UVs form an
|
|
102
|
-
* axis-aligned rectangle, PolyCSS renders the polygon as an <i> with
|
|
103
|
-
* `background-image: url(material.texture)` directly — no per-polygon canvas
|
|
104
|
-
* rasterization, browser-cached texture, mounting / unmounting one polygon
|
|
105
|
-
* does not affect any other.
|
|
106
|
-
*
|
|
107
|
-
* Three.js parallel: combines THREE.Texture + a basic Material in one. CSS
|
|
108
|
-
* has no shader/sampler concerns, so the texture/material split from
|
|
109
|
-
* Three.js doesn't pay rent here.
|
|
110
|
-
*/
|
|
111
|
-
interface PolyMaterial {
|
|
112
|
-
/** Image source. Anything `background-image: url(...)` can use. */
|
|
113
|
-
texture: string;
|
|
114
|
-
/** Optional unique key (used by PolyCSS to dedupe / cache). Caller can
|
|
115
|
-
* pass a stable string; if omitted, the material's identity is its object
|
|
116
|
-
* reference. */
|
|
117
|
-
key?: string;
|
|
118
|
-
imageSource?: PolyTextureImageSource;
|
|
119
|
-
presentation?: PolyTexturePresentation;
|
|
120
|
-
}
|
|
121
|
-
/**
|
|
122
|
-
* The single polygon type for polycss. N coplanar vertices in 3D space,
|
|
123
|
-
* CCW winding from outside. No bbox field, no shape discriminator, no
|
|
124
|
-
* input/output distinction — one type, used by parsers, by the merge
|
|
125
|
-
* pass, and by the renderer.
|
|
126
|
-
*/
|
|
127
|
-
interface Polygon {
|
|
128
|
-
/** N coplanar vertices in 3D space, CCW winding from outside. */
|
|
129
|
-
vertices: Vec3[];
|
|
130
|
-
/**
|
|
131
|
-
* Solid base color. Falls back to "#cccccc" when neither color nor
|
|
132
|
-
* texture is set.
|
|
133
|
-
*/
|
|
134
|
-
color?: string;
|
|
135
|
-
/**
|
|
136
|
-
* Texture URL. When set with `uvs`, UV-mapped via affine; without
|
|
137
|
-
* `uvs`, single-tile fill. If the load fails, renderer falls back to
|
|
138
|
-
* `color` (or default gray).
|
|
139
|
-
*/
|
|
140
|
-
texture?: string;
|
|
141
|
-
/**
|
|
142
|
-
* Texture sampler wrap mode for UVs outside [0, 1]. glTF imports preserve
|
|
143
|
-
* sampler.wrapS / wrapT here so the atlas rasterizer can tile repeated UVs.
|
|
144
|
-
* When unset, renderers keep the historical single-image behavior.
|
|
145
|
-
* @internal
|
|
146
|
-
*/
|
|
147
|
-
textureWrap?: PolyTextureWrap;
|
|
148
|
-
/**
|
|
149
|
-
* Texture alpha interpretation imported from glTF `material.alphaMode`.
|
|
150
|
-
* Opaque textures can use transparent PNG padding without cutting holes in
|
|
151
|
-
* the rendered polygon.
|
|
152
|
-
* @internal
|
|
153
|
-
*/
|
|
154
|
-
textureAlphaMode?: PolyTextureAlphaMode;
|
|
155
|
-
/**
|
|
156
|
-
* Shared material. When set, `material.texture` takes precedence over the
|
|
157
|
-
* inline `texture` field. If the polygon's UVs form an axis-aligned
|
|
158
|
-
* rectangle, PolyCSS uses the direct CSS background-image path (no per-
|
|
159
|
-
* polygon canvas rasterization). Falls back to the atlas path otherwise.
|
|
160
|
-
*/
|
|
161
|
-
material?: PolyMaterial;
|
|
162
|
-
textureImageSource?: PolyTextureImageSource;
|
|
163
|
-
texturePresentation?: PolyTexturePresentation;
|
|
164
|
-
/**
|
|
165
|
-
* Per-vertex UV coords (0..1, OBJ convention with v=0 at bottom).
|
|
166
|
-
* Length MUST equal vertices.length when set; mismatched UVs are
|
|
167
|
-
* stripped by `normalizePolygons`.
|
|
168
|
-
*/
|
|
169
|
-
uvs?: Vec2[];
|
|
170
|
-
/**
|
|
171
|
-
* Renderer-internal source triangles for UV textures. Merge passes use this
|
|
172
|
-
* to reduce DOM planes while preserving per-triangle texture mapping in the
|
|
173
|
-
* generated atlas.
|
|
174
|
-
* @internal
|
|
175
|
-
*/
|
|
176
|
-
textureTriangles?: TextureTriangle[];
|
|
177
|
-
/**
|
|
178
|
-
* Import-time simplifier seam keys retained after solid texture baking.
|
|
179
|
-
* Renderers ignore this; mesh optimization uses it to avoid welding vertices
|
|
180
|
-
* that shared a position but came from different texture/attribute seams.
|
|
181
|
-
* @internal
|
|
182
|
-
*/
|
|
183
|
-
simplifyVertexKeys?: string[];
|
|
184
|
-
/**
|
|
185
|
-
* Stricter import-time simplifier keys that preserve source vertex identity.
|
|
186
|
-
* Renderers ignore this; candidate simplification uses it only for fallback
|
|
187
|
-
* passes where relaxed seam welding loses after render-cost optimization.
|
|
188
|
-
* @internal
|
|
189
|
-
*/
|
|
190
|
-
simplifySourceVertexKeys?: string[];
|
|
191
|
-
/**
|
|
192
|
-
* Source material requested two-sided rendering. Importers use this so
|
|
193
|
-
* optimization passes do not collapse intentional reverse-wound faces.
|
|
194
|
-
* @internal
|
|
195
|
-
*/
|
|
196
|
-
doubleSided?: boolean;
|
|
197
|
-
/**
|
|
198
|
-
* User-controlled metadata. Reflected to DOM as `data-*` attributes via
|
|
199
|
-
* stringification by the framework wrappers. Only string|number|boolean
|
|
200
|
-
* values are kept; other shapes are dropped by `normalizePolygons`.
|
|
201
|
-
*/
|
|
202
|
-
data?: Record<string, string | number | boolean>;
|
|
203
|
-
}
|
|
1
|
+
import { P as Polygon, V as Vec3, C as CameraState, a as PolyDirectionalLight, b as PolyAmbientLight, M as MeshResolution, c as PolyPointLight, d as PolyTextureLightingMode, e as Vec2, f as PolyTextureLeafSizing, g as PolyTextureImageSource, h as PolyTextureImageRendering, i as PolyTextureImageLighting, j as PolyTextureProjection, k as PolyTextureBackend, T as TextureTriangle, l as PolyTexturePresentation } from './camera-VU-yix11.js';
|
|
2
|
+
export { A as AutoRotateConfig, m as AutoRotateOption, B as BASE_TILE, n as CameraHandle, o as CameraStyleInput, D as DEFAULT_CAMERA_STATE, p as DEFAULT_PROJECTION, q as PolyCameraProjection, r as PolyCameraSceneTransformOptions, s as PolyCameraSnapshot, t as PolyCameraSnapshotOptions, u as PolyCameraSnapshotSource, v as PolyMaterial, w as PolyTextureAlphaMode, x as PolyTextureWrap, y as PolyTextureWrapMode, z as buildPolyCameraSceneTransform, E as capturePolyCameraSnapshot, F as createIsometricCamera, G as normalizeInvertMultiplier, H as polyCameraTargetToCss, I as resolvePolyCameraAppliedPerspectiveStyle } from './camera-VU-yix11.js';
|
|
204
3
|
|
|
205
4
|
/**
|
|
206
5
|
* normalizePolygons — validates a polygon list, drops degenerate inputs,
|
|
@@ -411,82 +210,6 @@ declare function quatFromEulerXYZ(eulerDeg: Vec3): Quat;
|
|
|
411
210
|
* be written straight back into a PolyMesh rotation prop. */
|
|
412
211
|
declare function eulerXYZFromQuat(q: Quat): Vec3;
|
|
413
212
|
|
|
414
|
-
/**
|
|
415
|
-
* Base tile size in CSS pixels. One PolyCSS world unit = BASE_TILE CSS
|
|
416
|
-
* pixels (pre-scale). Used to convert world-coordinate target values to
|
|
417
|
-
* CSS translations in the transform string.
|
|
418
|
-
*/
|
|
419
|
-
declare const BASE_TILE = 50;
|
|
420
|
-
interface AutoRotateConfig {
|
|
421
|
-
axis?: "x" | "y";
|
|
422
|
-
speed?: number;
|
|
423
|
-
pauseOnInteraction?: boolean;
|
|
424
|
-
}
|
|
425
|
-
type AutoRotateOption = boolean | number | AutoRotateConfig;
|
|
426
|
-
/**
|
|
427
|
-
* World-coordinate camera state (Three.js-style).
|
|
428
|
-
*
|
|
429
|
-
* `target` is the world point that should appear at the viewport centre.
|
|
430
|
-
* PolyCSS world axes: [0]=X (rows/south), [1]=Y (cols/east), [2]=Z (up).
|
|
431
|
-
*
|
|
432
|
-
* `pan`, `tilt`, and `depthOffset` are gone. Translations now live inside
|
|
433
|
-
* `target` so they happen BEFORE rotations — enabling correct world-space
|
|
434
|
-
* pan at any tilt angle.
|
|
435
|
-
*
|
|
436
|
-
* `distance` is the camera's pull-back from the target in CSS pixels.
|
|
437
|
-
* Increasing distance moves the camera farther from the target along the
|
|
438
|
-
* view axis (dolly out) — analogous to three.js's spherical radius.
|
|
439
|
-
* Default 0 keeps orthographic/isometric scenes flat.
|
|
440
|
-
*/
|
|
441
|
-
interface CameraState {
|
|
442
|
-
target: Vec3;
|
|
443
|
-
rotX: number;
|
|
444
|
-
rotY: number;
|
|
445
|
-
zoom: number;
|
|
446
|
-
/** Camera pull-back from target in CSS pixels. Default 0. */
|
|
447
|
-
distance: number;
|
|
448
|
-
}
|
|
449
|
-
interface CameraStyleInput {
|
|
450
|
-
rows?: number;
|
|
451
|
-
cols?: number;
|
|
452
|
-
}
|
|
453
|
-
interface CameraHandle {
|
|
454
|
-
state: CameraState;
|
|
455
|
-
update(next: Partial<CameraState>): void;
|
|
456
|
-
getStyle(input?: CameraStyleInput): {
|
|
457
|
-
transform: string;
|
|
458
|
-
width: string;
|
|
459
|
-
height: string;
|
|
460
|
-
};
|
|
461
|
-
}
|
|
462
|
-
interface PolyCameraSceneTransformOptions {
|
|
463
|
-
autoCenterOffset?: Vec3;
|
|
464
|
-
layoutScale?: number;
|
|
465
|
-
tileSize?: number;
|
|
466
|
-
}
|
|
467
|
-
type PolyCameraProjection = "orthographic" | "perspective";
|
|
468
|
-
interface PolyCameraSnapshot {
|
|
469
|
-
projection: PolyCameraProjection;
|
|
470
|
-
perspectiveStyle: string;
|
|
471
|
-
appliedPerspectiveStyle: string;
|
|
472
|
-
state: CameraState;
|
|
473
|
-
}
|
|
474
|
-
interface PolyCameraSnapshotOptions {
|
|
475
|
-
projection?: PolyCameraProjection;
|
|
476
|
-
perspectiveStyle?: string;
|
|
477
|
-
}
|
|
478
|
-
type PolyCameraSnapshotSource = CameraHandle & {
|
|
479
|
-
readonly type?: PolyCameraProjection;
|
|
480
|
-
readonly perspectiveStyle?: string;
|
|
481
|
-
};
|
|
482
|
-
declare function normalizeInvertMultiplier(value: number | boolean | undefined): number | undefined;
|
|
483
|
-
declare const DEFAULT_CAMERA_STATE: CameraState;
|
|
484
|
-
declare function polyCameraTargetToCss(target?: Vec3, autoCenterOffset?: Vec3, tileSize?: number): Vec3;
|
|
485
|
-
declare function buildPolyCameraSceneTransform(state?: Partial<CameraState>, options?: PolyCameraSceneTransformOptions): string;
|
|
486
|
-
declare function resolvePolyCameraAppliedPerspectiveStyle(perspectiveStyle?: string): string;
|
|
487
|
-
declare function capturePolyCameraSnapshot(camera: PolyCameraSnapshotSource, options?: PolyCameraSnapshotOptions): PolyCameraSnapshot;
|
|
488
|
-
declare function createIsometricCamera(initial?: Partial<CameraState>): CameraHandle;
|
|
489
|
-
|
|
490
213
|
/**
|
|
491
214
|
* Screen → world inverse projection helpers.
|
|
492
215
|
*
|
|
@@ -571,7 +294,7 @@ declare function shadeColor(base: string, delta: number): string;
|
|
|
571
294
|
*
|
|
572
295
|
* Math (decoupled, three.js convention):
|
|
573
296
|
* tint = ambient.color · ambient.intensity
|
|
574
|
-
* + directional.color · directional.intensity · max(0, n ·
|
|
297
|
+
* + directional.color · directional.intensity · max(0, n · L)
|
|
575
298
|
* final = baseColor × tint
|
|
576
299
|
*
|
|
577
300
|
* Pass `directional` and/or `ambient` undefined to fall back to defaults
|
|
@@ -1455,6 +1178,29 @@ declare const BAKED_SHADOW_MIN_UP = 0.01;
|
|
|
1455
1178
|
* already in unit-less form (matrix3d entries must be dimensionless).
|
|
1456
1179
|
*/
|
|
1457
1180
|
declare function buildBakedShadowProjectionMatrix(lightDir: Vec3, groundCssZ: number): number[];
|
|
1181
|
+
/**
|
|
1182
|
+
* Radial variant of `projectCssVertexToGround` for a point light at a fixed
|
|
1183
|
+
* CSS-frame position. The shadow ray travels FROM the light THROUGH the
|
|
1184
|
+
* vertex and onto the ground plane `z = groundCssZ`, so each vertex projects
|
|
1185
|
+
* along its own direction (a true perspective projection) rather than the
|
|
1186
|
+
* single parallel direction a directional light uses.
|
|
1187
|
+
*
|
|
1188
|
+
* Returns `null` when no valid forward intersection exists — the vertex sits
|
|
1189
|
+
* on the light's side of the ground plane, or the ray runs parallel to it.
|
|
1190
|
+
* The caller drops that vertex (and any polygon that loses ≥1 vertex falls
|
|
1191
|
+
* back to a degenerate projection it can skip).
|
|
1192
|
+
*
|
|
1193
|
+
* `lightPos` and `cssVertex` are both in the dimensionless CSS frame (after
|
|
1194
|
+
* the world→CSS axis swap + tile scale), matching `projectCssVertexToGround`.
|
|
1195
|
+
*/
|
|
1196
|
+
declare function projectCssVertexToGroundFromPoint(cssVertex: Vec3, lightPos: Vec3, groundCssZ: number): [number, number] | null;
|
|
1197
|
+
/**
|
|
1198
|
+
* Point-light variant of `isBakedShadowCaster`. A polygon casts shadow when
|
|
1199
|
+
* its outward normal points away from the light — i.e. the ray from the
|
|
1200
|
+
* light to the polygon centroid runs into the back of the face. `centroid`
|
|
1201
|
+
* and `lightPos` are CSS-frame; `normal` is the CSS-frame outward normal.
|
|
1202
|
+
*/
|
|
1203
|
+
declare function isPointShadowCaster(centroid: Vec3, normal: Vec3, lightPos: Vec3): boolean;
|
|
1458
1204
|
/**
|
|
1459
1205
|
* Decides whether a polygon should cast a shadow given its outward
|
|
1460
1206
|
* normal and the light's travel direction.
|
|
@@ -1500,6 +1246,73 @@ declare function ensureCcw2D(vertices: ReadonlyArray<readonly [number, number]>)
|
|
|
1500
1246
|
*/
|
|
1501
1247
|
declare function projectCssVertexToGround(cssVertex: Vec3, lightDir: Vec3, groundCssZ: number): [number, number];
|
|
1502
1248
|
|
|
1249
|
+
/**
|
|
1250
|
+
* Build the parametric silhouette loop for a caster lit by a directional light.
|
|
1251
|
+
*
|
|
1252
|
+
* @param worldVerts Every caster vertex in the same world-CSS frame the
|
|
1253
|
+
* receiver projector works in (e.g. `CasterPolyItem.wv`).
|
|
1254
|
+
* @param lightDir Directional light vector (to-source) in that frame.
|
|
1255
|
+
* @param definition Max loop points. The convex hull is decimated down to this
|
|
1256
|
+
* by repeatedly dropping the lowest-area vertex (shape-
|
|
1257
|
+
* preserving). `<= 2` is treated as 3.
|
|
1258
|
+
* @returns A closed 3D loop (the silhouette vertices), or `null` if degenerate.
|
|
1259
|
+
*/
|
|
1260
|
+
declare function computeParametricShadowSilhouette(worldVerts: ReadonlyArray<Vec3>, lightDir: Vec3, definition: number): Vec3[] | null;
|
|
1261
|
+
|
|
1262
|
+
/**
|
|
1263
|
+
* Build concave coverage-contour silhouette loops for a caster lit by a
|
|
1264
|
+
* directional light.
|
|
1265
|
+
*
|
|
1266
|
+
* @param polysWorldVerts Each caster polygon's vertices in the world-CSS frame
|
|
1267
|
+
* (e.g. `CasterPolyItem.wv`).
|
|
1268
|
+
* @param lightDir Directional light vector (to-source) in that frame.
|
|
1269
|
+
* @param definition Detail knob → coverage mask resolution.
|
|
1270
|
+
* @param layers Depth bands along the light. 1 (default) = one flat
|
|
1271
|
+
* outline (cross-mesh casting). >1 = depth-stratified
|
|
1272
|
+
* outlines for correct self-shadow.
|
|
1273
|
+
* @returns Closed 3D loops, or `null`.
|
|
1274
|
+
*/
|
|
1275
|
+
declare function computeCoverageShadowSilhouette(polysWorldVerts: ReadonlyArray<ReadonlyArray<Vec3>>, lightDir: Vec3, definition: number, layers?: number, mode?: "contour" | "pixel"): Vec3[][] | null;
|
|
1276
|
+
|
|
1277
|
+
/** True when every caster vertex lies in a single plane (a ground quad, a
|
|
1278
|
+
* billboard, etc.). Such casters have no coverage volume for the parametric
|
|
1279
|
+
* proxy — their tilted proxy would project garbage onto a coplanar receiver —
|
|
1280
|
+
* so the caller routes them through the exact path instead. */
|
|
1281
|
+
declare function isFlatCaster(polysWv: ReadonlyArray<ReadonlyArray<Vec3>>): boolean;
|
|
1282
|
+
/** Rubric: a CONVEX caster self-shadows nothing. The depth-band proxy still
|
|
1283
|
+
* leaks a little false self-shadow on convex meshes, so detect convexity and
|
|
1284
|
+
* skip self-shadow for them. Capped at `maxPolys` (O(faces × verts), and large
|
|
1285
|
+
* meshes are essentially never convex — they early-exit on the first concave
|
|
1286
|
+
* face anyway). */
|
|
1287
|
+
declare function isConvexCaster(polysWv: ReadonlyArray<ReadonlyArray<Vec3>>, maxPolys?: number): boolean;
|
|
1288
|
+
interface ParametricOverrideInput {
|
|
1289
|
+
/** Caster polygons, each a vertex list in the world-CSS frame. */
|
|
1290
|
+
polysWorldVerts: ReadonlyArray<ReadonlyArray<Vec3>>;
|
|
1291
|
+
/** Directional light (to-source) in the world-CSS frame. */
|
|
1292
|
+
lightDir: Vec3;
|
|
1293
|
+
/** Effective definition (caller folds in per-mesh override + drag cap). */
|
|
1294
|
+
definition: number;
|
|
1295
|
+
/** True when the caster is also the receiver (self-shadow). */
|
|
1296
|
+
isSelf: boolean;
|
|
1297
|
+
/** `"pixel"` greedy-meshes the coverage into voxel rects; default contour. */
|
|
1298
|
+
style?: "vector" | "pixel";
|
|
1299
|
+
/** Shadow-casting point lights (CSS position + index in `allPointLights`). */
|
|
1300
|
+
pointLights?: ReadonlyArray<{
|
|
1301
|
+
position: Vec3;
|
|
1302
|
+
index: number;
|
|
1303
|
+
}>;
|
|
1304
|
+
}
|
|
1305
|
+
interface ParametricOverrideResult {
|
|
1306
|
+
/** Directional override loops, or undefined to use the exact path. */
|
|
1307
|
+
overrideSilhouette?: Vec3[][];
|
|
1308
|
+
/** Per-point-light radial override loops (indexed by point light index). */
|
|
1309
|
+
overridePointSilhouettes?: Array<Vec3[][] | undefined>;
|
|
1310
|
+
}
|
|
1311
|
+
/** Build the parametric override(s) for one caster — directional plus one
|
|
1312
|
+
* radial silhouette per shadow-casting point light. Returns empty overrides
|
|
1313
|
+
* (use the exact path) for flat casters and convex self-shadow. */
|
|
1314
|
+
declare function buildParametricCasterOverride(input: ParametricOverrideInput): ParametricOverrideResult;
|
|
1315
|
+
|
|
1503
1316
|
type Pt = readonly [number, number];
|
|
1504
1317
|
/**
|
|
1505
1318
|
* Clips `subject` against the convex polygon `clip`. Both polygons are
|
|
@@ -1690,18 +1503,6 @@ declare function buildEdgeOwners(polygons: readonly Polygon[]): Map<string, Edge
|
|
|
1690
1503
|
* TRAVELS in direction L, polygons are CCW-from-outside). Matches the
|
|
1691
1504
|
* light-backface cull's sign convention. */
|
|
1692
1505
|
declare function classifyFacing(planeNormals: Array<Vec3 | null>, lightDir: Vec3): boolean[];
|
|
1693
|
-
/**
|
|
1694
|
-
* Walk silhouette edges into closed loops. An edge is silhouette iff
|
|
1695
|
-
* its two adjacent polygons disagree on `facing`. Boundary edges
|
|
1696
|
-
* (polyB === null) are silhouette iff their owner is front-facing —
|
|
1697
|
-
* the boundary is where the lit side ends.
|
|
1698
|
-
*
|
|
1699
|
-
* Returns one closed loop per connected silhouette cycle, each as a
|
|
1700
|
-
* Vec3[] sequence (last vertex equals first vertex implicitly; not
|
|
1701
|
-
* duplicated). For non-manifold or open meshes some edges may not form
|
|
1702
|
-
* a clean cycle; those edges are dropped and the remaining cycles are
|
|
1703
|
-
* returned best-effort.
|
|
1704
|
-
*/
|
|
1705
1506
|
declare function extractSilhouetteLoops(edgeOwners: ReadonlyMap<string, EdgeOwners>, facing: boolean[]): Vec3[][];
|
|
1706
1507
|
|
|
1707
1508
|
/**
|
|
@@ -1774,6 +1575,15 @@ interface ReceiverCasterInput<T = unknown> {
|
|
|
1774
1575
|
* array is sized correctly even when atlas-plan / dedup filters drop
|
|
1775
1576
|
* some polygons from `items`. */
|
|
1776
1577
|
casterPolygonCount?: number;
|
|
1578
|
+
/** Parametric-shadow override: a precomputed world-frame silhouette loop set
|
|
1579
|
+
* (see `computeParametricShadowSilhouette`). When present it is projected
|
|
1580
|
+
* directly — skipping per-poly and silhouette extraction — so a cheap,
|
|
1581
|
+
* low-resolution outline casts onto every receiver via the normal pipeline. */
|
|
1582
|
+
overrideSilhouette?: Vec3[][];
|
|
1583
|
+
/** Per-point-light parametric override (indexed by the point light's index in
|
|
1584
|
+
* `allPointLights`). A point pass uses this RADIAL silhouette instead of the
|
|
1585
|
+
* directional `overrideSilhouette`; an undefined entry → exact point path. */
|
|
1586
|
+
overridePointSilhouettes?: Array<Vec3[][] | undefined>;
|
|
1777
1587
|
}
|
|
1778
1588
|
/**
|
|
1779
1589
|
* Build a polygon-adjacency map: polygonIndex → set of polygonIndex that
|
|
@@ -1815,6 +1625,15 @@ interface ReceiverShadowFaceSpec<T = unknown> {
|
|
|
1815
1625
|
* if applicable). */
|
|
1816
1626
|
opacity: number;
|
|
1817
1627
|
paths: Array<ReceiverShadowPath<T>>;
|
|
1628
|
+
/** Full-lit face color C (all lights), for the multi-light merge: callers
|
|
1629
|
+
* multiply C by each pass's `fill/C` factor so overlaps composite to the
|
|
1630
|
+
* both-blocked color. Empty string for textured receivers (per-pixel base,
|
|
1631
|
+
* multiply can't be uniform — those fall back to cumulative-alpha). */
|
|
1632
|
+
fullLitFill: string;
|
|
1633
|
+
/** Every clipped caster polygon for this pass in absolute face-(u,v) space
|
|
1634
|
+
* (NOT offset by the tight bbox). The multi-light merge re-bases these to a
|
|
1635
|
+
* shared per-face bbox so all lights' shadows live in one SVG. */
|
|
1636
|
+
facePolysUv: Array<Array<[number, number]>>;
|
|
1818
1637
|
}
|
|
1819
1638
|
/**
|
|
1820
1639
|
* Build silhouette `edgeOwners` for a caster mesh in world-CSS frame.
|
|
@@ -1859,8 +1678,29 @@ interface ComputeReceiverShadowFacesInput<T = unknown> {
|
|
|
1859
1678
|
receiverHasTexture: boolean;
|
|
1860
1679
|
/** Per-caster items + caller id, in caller-defined order. */
|
|
1861
1680
|
casters: ReceiverCasterInput<T>[];
|
|
1862
|
-
/**
|
|
1681
|
+
/** Light direction in CSS frame, pointing TOWARD the light (to-source).
|
|
1682
|
+
* For a point light this is a representative direction (used only for the
|
|
1683
|
+
* textured-receiver opacity ratio); per-vertex directions come from
|
|
1684
|
+
* `lightPos`. */
|
|
1863
1685
|
lightDir: Vec3;
|
|
1686
|
+
/** When set, the light is a point light at this CSS-frame position. The
|
|
1687
|
+
* shadow projection becomes radial (per-vertex direction from the light)
|
|
1688
|
+
* and the silhouette fast path is disabled (facing is per-polygon). */
|
|
1689
|
+
lightPos?: Vec3;
|
|
1690
|
+
/** Every point light in the scene (CSS-frame absolute positions), used to
|
|
1691
|
+
* compute the SHADED shadow color — a shadow shows the receiver lit by all
|
|
1692
|
+
* lights EXCEPT the blocked one, so a spot shadowed from one colored light
|
|
1693
|
+
* still shows the others' color (Three.js parity). Includes non-shadow-
|
|
1694
|
+
* casting lights, since they still illuminate the shadowed region. */
|
|
1695
|
+
allPointLights?: ReadonlyArray<{
|
|
1696
|
+
position: Vec3;
|
|
1697
|
+
color?: string;
|
|
1698
|
+
intensity?: number;
|
|
1699
|
+
}>;
|
|
1700
|
+
/** For a point-light pass, the index into `allPointLights` of the light
|
|
1701
|
+
* being shadowed (excluded from the remaining-light fill). Undefined for
|
|
1702
|
+
* the directional pass (which instead excludes the directional light). */
|
|
1703
|
+
thisPointIndex?: number;
|
|
1864
1704
|
/** Camera cull rotation (rotX/rotY + receiver mesh rotation) so back-
|
|
1865
1705
|
* facing receiver faces can be skipped. */
|
|
1866
1706
|
cameraRot: CameraCullRotation;
|
|
@@ -1881,6 +1721,73 @@ interface ComputeReceiverShadowFacesInput<T = unknown> {
|
|
|
1881
1721
|
* back-facing faces. Caller mounts SVGs per spec.
|
|
1882
1722
|
*/
|
|
1883
1723
|
declare function computeReceiverShadowFaces<T = unknown>(input: ComputeReceiverShadowFacesInput<T>): ReceiverShadowFaceSpec<T>[];
|
|
1724
|
+
/** One path inside a merged face SVG. */
|
|
1725
|
+
interface MergedShadowLayer {
|
|
1726
|
+
/** Path data (`M…L…Z`, already offset to the SVG's tight bbox). */
|
|
1727
|
+
d: string;
|
|
1728
|
+
/** Fill color (remaining-light color for a single layer, multiply factor for
|
|
1729
|
+
* a merged solid layer, dark shadow color for textured). */
|
|
1730
|
+
fill: string;
|
|
1731
|
+
/** Apply `mix-blend-mode: multiply` (merged solid layers only). */
|
|
1732
|
+
multiply: boolean;
|
|
1733
|
+
/** Per-path opacity (1 for merged solid layers, which carry strength on the
|
|
1734
|
+
* SVG; the pass's own opacity otherwise). */
|
|
1735
|
+
opacity: number;
|
|
1736
|
+
}
|
|
1737
|
+
/** One receiver FACE's merged shadow, ready to mount as a single SVG. */
|
|
1738
|
+
interface MergedShadowFace {
|
|
1739
|
+
faceIndex: number;
|
|
1740
|
+
memberPolyIndices: number[];
|
|
1741
|
+
matrixCss: string;
|
|
1742
|
+
width: number;
|
|
1743
|
+
height: number;
|
|
1744
|
+
/** SVG-level opacity (shadow strength for merged solid faces, else 1). */
|
|
1745
|
+
svgOpacity: number;
|
|
1746
|
+
/** Full-lit base path (merged solid faces only); null otherwise. */
|
|
1747
|
+
baseFill: string | null;
|
|
1748
|
+
baseD: string | null;
|
|
1749
|
+
layers: MergedShadowLayer[];
|
|
1750
|
+
}
|
|
1751
|
+
/** Inputs for `computeMergedReceiverShadows` — the full light set for one
|
|
1752
|
+
* receiver, plus its prepared face planes and casters. */
|
|
1753
|
+
interface MergedReceiverShadowInput<T = unknown> {
|
|
1754
|
+
receiverPlanes: ReceiverFacePlane[];
|
|
1755
|
+
receiverPolygons: readonly Polygon[];
|
|
1756
|
+
receiverHasTexture: boolean;
|
|
1757
|
+
casters: ReceiverCasterInput<T>[];
|
|
1758
|
+
/** Directional light vector in CSS frame (to-source). */
|
|
1759
|
+
lightDir: Vec3;
|
|
1760
|
+
/** Run the directional pass (caller gates on a real, nonzero-intensity
|
|
1761
|
+
* directional light). */
|
|
1762
|
+
runDirectional: boolean;
|
|
1763
|
+
/** One pass per shadow-casting point light: CSS position + index into
|
|
1764
|
+
* `allPointLights`. Empty in dynamic mode (point lights are baked-only). */
|
|
1765
|
+
pointPasses: ReadonlyArray<{
|
|
1766
|
+
lightPos: Vec3;
|
|
1767
|
+
index: number;
|
|
1768
|
+
}>;
|
|
1769
|
+
/** All point lights (CSS positions) for the shaded shadow color; empty in
|
|
1770
|
+
* dynamic mode. */
|
|
1771
|
+
allPointLights?: ReadonlyArray<{
|
|
1772
|
+
position: Vec3;
|
|
1773
|
+
color?: string;
|
|
1774
|
+
intensity?: number;
|
|
1775
|
+
}>;
|
|
1776
|
+
cameraRot: CameraCullRotation;
|
|
1777
|
+
ambientLight?: PolyAmbientLight;
|
|
1778
|
+
directionalLight?: PolyDirectionalLight;
|
|
1779
|
+
shadow?: {
|
|
1780
|
+
color?: string;
|
|
1781
|
+
opacity?: number;
|
|
1782
|
+
maxExtend?: number;
|
|
1783
|
+
};
|
|
1784
|
+
}
|
|
1785
|
+
/**
|
|
1786
|
+
* Run every light pass for one receiver and merge each face's passes into a
|
|
1787
|
+
* single SVG descriptor. Shared by all three renderers so multi-light shadow
|
|
1788
|
+
* overlap is identical everywhere.
|
|
1789
|
+
*/
|
|
1790
|
+
declare function computeMergedReceiverShadows<T = unknown>(input: MergedReceiverShadowInput<T>): MergedShadowFace[];
|
|
1884
1791
|
|
|
1885
1792
|
/**
|
|
1886
1793
|
* PolyAnimationMixer — three.js-shaped animation API for polycss.
|
|
@@ -2570,6 +2477,10 @@ interface SolidTrianglePlanOptions {
|
|
|
2570
2477
|
tileSize?: number;
|
|
2571
2478
|
layerElevation?: number;
|
|
2572
2479
|
directionalLight?: PolyDirectionalLight;
|
|
2480
|
+
/** Point lights in MESH-LOCAL frame (renderer pre-transforms each scene
|
|
2481
|
+
* point light by inverse-rotate(worldPos - meshPos) so positions match
|
|
2482
|
+
* the local cssPoints frame). Direction-only, per-face Lambert. */
|
|
2483
|
+
pointLights?: PolyPointLight[];
|
|
2573
2484
|
ambientLight?: PolyAmbientLight;
|
|
2574
2485
|
textureLighting?: PolyTextureLightingMode;
|
|
2575
2486
|
solidPaintDefaults?: SolidPaintDefaults;
|
|
@@ -2602,6 +2513,10 @@ interface ComputeTextureAtlasPlanOptions {
|
|
|
2602
2513
|
tileSize?: number;
|
|
2603
2514
|
layerElevation?: number;
|
|
2604
2515
|
directionalLight?: PolyDirectionalLight;
|
|
2516
|
+
/** Point lights in MESH-LOCAL frame (renderer pre-transforms each scene
|
|
2517
|
+
* point light by inverse-rotate(worldPos - meshPos) so positions match
|
|
2518
|
+
* the local cssPoints frame). Direction-only, per-face Lambert. */
|
|
2519
|
+
pointLights?: PolyPointLight[];
|
|
2605
2520
|
ambientLight?: PolyAmbientLight;
|
|
2606
2521
|
/** Shared-edge set returned by {@link buildTextureEdgeRepairSets}. */
|
|
2607
2522
|
textureEdgeRepairEdges?: Set<number>;
|
|
@@ -2674,9 +2589,20 @@ declare function rgbToHex({ r, g, b }: RGB): string;
|
|
|
2674
2589
|
* (see applyTextureTint in the renderer). `directScale` is already
|
|
2675
2590
|
* `intensity × max(n·L, 0)` (computed by the caller).
|
|
2676
2591
|
*/
|
|
2677
|
-
|
|
2592
|
+
/**
|
|
2593
|
+
* One point light's per-face contribution to a polygon: its color and the
|
|
2594
|
+
* scalar `intensity × max(0, n·L̂)` already computed by the caller against the
|
|
2595
|
+
* face normal + centroid (point lights are direction-only — no distance
|
|
2596
|
+
* falloff). Multiple lights of different colours can't fold into one scalar,
|
|
2597
|
+
* so the shading functions accumulate these per channel in linear space.
|
|
2598
|
+
*/
|
|
2599
|
+
interface PointLightContrib {
|
|
2600
|
+
color: string;
|
|
2601
|
+
scale: number;
|
|
2602
|
+
}
|
|
2603
|
+
declare function textureTintFactors(directScale: number, lightColor: string, ambientColor: string, ambientIntensity: number, pointContribs?: readonly PointLightContrib[]): RGBFactors;
|
|
2678
2604
|
declare function tintToCss({ r, g, b }: RGBFactors): string;
|
|
2679
|
-
declare function shadePolygon(baseColor: string, directScale: number, lightColor: string, ambientColor: string, ambientIntensity: number): string;
|
|
2605
|
+
declare function shadePolygon(baseColor: string, directScale: number, lightColor: string, ambientColor: string, ambientIntensity: number, pointContribs?: readonly PointLightContrib[]): string;
|
|
2680
2606
|
declare function quantizeCssColor(input: string, steps: number): string;
|
|
2681
2607
|
declare function rgbEqual(a: RGB | undefined, b: RGB | undefined): boolean;
|
|
2682
2608
|
declare function stepRgbToward(current: RGB, target: RGB, maxStep: number): RGB;
|
|
@@ -2852,4 +2778,4 @@ declare function packTextureAtlasPlansWithScaleCore(plans: Array<TextureAtlasPla
|
|
|
2852
2778
|
atlasCanonicalSize: number;
|
|
2853
2779
|
};
|
|
2854
2780
|
|
|
2855
|
-
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 PolyCameraProjection, type PolyCameraSceneTransformOptions, type PolyCameraSnapshot, type PolyCameraSnapshotOptions, type PolyCameraSnapshotSource, type PolyDirectionalLight, type PolyMaterial, type PolyMeshTransformInput, 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, buildPolyCameraSceneTransform, buildPolyMeshTransform, buildPolySceneTransform, buildSceneContext, buildSeamBleedPolygonEdges, buildSeamBleedPolygonSet, buildSharedEdgeMap, buildTextureEdgeRepairSets, cachedParsePureColor, cameraCullNormalGroups, cameraCullNormalGroupsFromPolygons, cameraCullNormalKey, cameraCullVisibleSignature, cameraFacingDepth, capturePolyCameraSnapshot, 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, polyCameraTargetToCss, polyCssDistanceToWorld, polyCssPositionToWorld, polygonContainsPoint, polygonCssSurfaceNormal, polygonFaces, polygonFacesCamera, polygonSignedArea2D, prepareCasterEdgeOwners, prepareCasterPolyItems, prepareReceiverFacePlanes, projectCssVertexToGround, 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 };
|
|
2781
|
+
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 AxesHelperOptions, BAKED_SHADOW_MIN_UP, BAKED_SHADOW_Z_SQUASH, 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, CameraState, 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_LIGHT_COLOR, DEFAULT_LIGHT_DIR, DEFAULT_LIGHT_INTENSITY, DEFAULT_MATRIX_DECIMALS, 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, 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, PolyAmbientLight, type PolyAnimationAction, type ParseAnimationClip as PolyAnimationClip, type PolyAnimationMixer, type PolyAnimationTarget, PolyDirectionalLight, type PolyMeshTransformInput, PolyPointLight, type PolyRenderStrategiesOption, type PolyRenderStrategy, type PolySceneTransformInput, type PolySeamBleed, type PolySeamBleedEdgeValue, type PolySeamBleedEdges, PolyTextureBackend, PolyTextureImageLighting, PolyTextureImageRendering, PolyTextureImageSource, type PolyTextureLeafGeometry, type PolyTextureLeafResolverOptions, PolyTextureLeafSizing, type PolyTextureLeafSourceRect, PolyTextureLightingMode, PolyTexturePresentation, PolyTextureProjection, type PolyVoxelCell, type PolyVoxelSource, 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, TextureTriangle, type TextureTrianglePlan, type TorusPolygonsOptions, type UvAffine, type UvSampleRect, VOXEL_CAMERA_CULL_AXIS_EPS, VOXEL_CAMERA_CULL_NORMAL_LIMIT, Vec2, 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, buildPolyMeshTransform, buildPolySceneTransform, buildSceneContext, buildSeamBleedPolygonEdges, buildSeamBleedPolygonSet, buildSharedEdgeMap, buildTextureEdgeRepairSets, cachedParsePureColor, cameraCullNormalGroups, cameraCullNormalGroupsFromPolygons, cameraCullNormalKey, cameraCullVisibleSignature, cameraFacingDepth, 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, 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, normalizePolygons, normalizedSeamBleed, octahedronPolygons, offsetConvexPolygonPoints, offsetConvexPolygonPointsByEdgeAmounts, offsetStableTrianglePoints, offsetTrianglePoints, optimizeAnimatedMeshPolygons, optimizeMeshParseResult, optimizeMeshPolygons, packTextureAtlasPlans, packTextureAtlasPlansWithScaleCore, parseAlpha, parseColor, parseGltf, parseHex, parseHexColor, parseMtl, parseObj, parsePureColor, parseRgbColor, parseStl, parseVox, planePolygons, polyCssDistanceToWorld, polyCssPositionToWorld, polygonContainsPoint, polygonCssSurfaceNormal, polygonFaces, polygonFacesCamera, polygonSignedArea2D, prepareCasterEdgeOwners, prepareCasterPolyItems, prepareReceiverFacePlanes, projectCssVertexToGround, projectCssVertexToGroundFromPoint, projectTextureTriangle, quantizeCssColor, quatFromAxisAngle, quatFromEulerXYZ, quatMultiply, repairMeshSeams, resolveAtlasLeafBox, resolveBleedRatio, 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 };
|