@layoutit/polycss 0.2.5 → 0.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{PolyShapeElements-CoKhApyN.d.cts → PolyShapeElements-YDkJX2Fz.d.cts} +13 -1
- package/dist/{PolyShapeElements-CoKhApyN.d.ts → PolyShapeElements-YDkJX2Fz.d.ts} +13 -1
- package/dist/elements.cjs +4 -4
- package/dist/elements.d.cts +1 -1
- package/dist/elements.d.ts +1 -1
- package/dist/elements.js +4 -4
- package/dist/index.cjs +22 -22
- package/dist/index.d.cts +85 -6
- package/dist/index.d.ts +85 -6
- package/dist/index.js +22 -22
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { P as PolySceneOptions, a as PolySceneHandle, b as PolyControlsHandle, c as PolyControlsBaseOptions, d as PolyControlsEvent, e as PolyControlsListener, f as PolyMeshHandle } from './PolyShapeElements-
|
|
2
|
-
export { g as PolyBoxElement, h as PolyCameraElement, i as PolyCameraOptions, j as PolyConeElement, k as PolyControlsAnimateOptions, l as PolyControlsCamera, m as PolyControlsChangeEvent, n as PolyControlsInteractionEvent, o as PolyCylinderElement, p as PolyDodecahedronElement, q as PolyFirstPersonControlsElement, r as PolyIcosahedronElement, s as PolyIframeElement, t as PolyMapControlsElement, u as PolyMeshElement, v as PolyMeshTransform, w as PolyOctahedronElement, x as PolyOrbitControlsElement, y as PolyOrbitControlsHandle, z as PolyOrbitControlsOptions, A as PolyOrthographicCameraElement, B as PolyOrthographicCameraHandle, C as PolyOrthographicCameraOptions, D as PolyPerspectiveCameraElement, E as PolyPerspectiveCameraHandle, F as PolyPerspectiveCameraOptions, G as PolyPlaneElement, H as PolyPolygonElement, I as PolyRingElement, J as PolySceneElement, K as PolySelectElement, L as PolySphereElement, M as PolyTetrahedronElement, N as PolyTorusElement, O as PolyTransformControlsElement, Q as createPolyCamera, R as createPolyOrbitControls, S as createPolyOrthographicCamera, T as createPolyPerspectiveCamera } from './PolyShapeElements-
|
|
1
|
+
import { P as PolySceneOptions, a as PolySceneHandle, b as PolyControlsHandle, c as PolyControlsBaseOptions, d as PolyControlsEvent, e as PolyControlsListener, f as PolyMeshHandle } from './PolyShapeElements-YDkJX2Fz.cjs';
|
|
2
|
+
export { g as PolyBoxElement, h as PolyCameraElement, i as PolyCameraOptions, j as PolyConeElement, k as PolyControlsAnimateOptions, l as PolyControlsCamera, m as PolyControlsChangeEvent, n as PolyControlsInteractionEvent, o as PolyCylinderElement, p as PolyDodecahedronElement, q as PolyFirstPersonControlsElement, r as PolyIcosahedronElement, s as PolyIframeElement, t as PolyMapControlsElement, u as PolyMeshElement, v as PolyMeshTransform, w as PolyOctahedronElement, x as PolyOrbitControlsElement, y as PolyOrbitControlsHandle, z as PolyOrbitControlsOptions, A as PolyOrthographicCameraElement, B as PolyOrthographicCameraHandle, C as PolyOrthographicCameraOptions, D as PolyPerspectiveCameraElement, E as PolyPerspectiveCameraHandle, F as PolyPerspectiveCameraOptions, G as PolyPlaneElement, H as PolyPolygonElement, I as PolyRingElement, J as PolySceneElement, K as PolySelectElement, L as PolySphereElement, M as PolyTetrahedronElement, N as PolyTorusElement, O as PolyTransformControlsElement, Q as createPolyCamera, R as createPolyOrbitControls, S as createPolyOrthographicCamera, T as createPolyPerspectiveCamera } from './PolyShapeElements-YDkJX2Fz.cjs';
|
|
3
3
|
import * as _layoutit_polycss_core from '@layoutit/polycss-core';
|
|
4
|
-
import { PolyDirectionalLight, PolyAmbientLight, PolyTextureLightingMode, TextureAtlasPlan, TextureQuality, PackedAtlas, PackedPage, TextureAtlasPage, PolyRenderStrategy, SolidPaintDefaults, Polygon, SolidTriangleFrame, Vec3, BoxPolygonsOptions, ParseResult, ConePolygonsOptions, CylinderPolygonsOptions, DodecahedronPolygonsOptions, IcosahedronPolygonsOptions, OctahedronPolygonsOptions, PlanePolygonsOptions, RingPolygonsOptions, SpherePolygonsOptions, TetrahedronPolygonsOptions, TorusPolygonsOptions } from '@layoutit/polycss-core';
|
|
4
|
+
import { PolyDirectionalLight, PolyAmbientLight, PolyTextureLightingMode, PolyTextureLeafSizing, PolyTextureImageRendering, PolyTextureBackend, PolyTextureProjection, TextureAtlasPlan, TextureQuality, PackedAtlas, PackedPage, TextureAtlasPage, PolyRenderStrategy, SolidPaintDefaults, Polygon, SolidTriangleFrame, Vec3, BoxPolygonsOptions, ParseResult, ConePolygonsOptions, CylinderPolygonsOptions, DodecahedronPolygonsOptions, IcosahedronPolygonsOptions, OctahedronPolygonsOptions, PlanePolygonsOptions, RingPolygonsOptions, SpherePolygonsOptions, TetrahedronPolygonsOptions, TorusPolygonsOptions } from '@layoutit/polycss-core';
|
|
5
5
|
export * from '@layoutit/polycss-core';
|
|
6
6
|
export { ComputeTextureAtlasPlanOptions, PackedAtlas, PackedPage, PackedTextureAtlasEntry, PolyMeshTransformInput, PolyRenderStrategiesOption, PolyRenderStrategy, PolySceneTransformInput, ParseResult as PolyShapeResult, SolidPaintDefaults, SolidTriangleFrame, TextureAtlasPage, TextureAtlasPlan, TextureQuality, buildPolyMeshTransform, buildPolySceneTransform, buildTextureEdgeRepairSets, computeTextureAtlasPlanPublic, cssBorderShapeForPlan, cssDistanceToWorld, cssPositionToWorld, formatBorderShapeEntryMatrix, formatCssLengthPx, formatMatrix3d, formatSolidQuadEntryMatrix, isFullRectSolid, isProjectiveQuadPlan, isSolidTrianglePlan, cssDistanceToWorld as polyCssDistanceToWorld, cssPositionToWorld as polyCssPositionToWorld, worldDirectionToPolyCss, worldDirectionalLightToCss as worldDirectionalLightToPolyCss, worldDistanceToCss, worldDistanceToCss as worldDistanceToPolyCss, worldPositionToPolyCss } from '@layoutit/polycss-core';
|
|
7
7
|
|
|
@@ -20,6 +20,10 @@ interface RenderTextureAtlasOptions {
|
|
|
20
20
|
* or a 64px sprite on mobile-class documents.
|
|
21
21
|
*/
|
|
22
22
|
textureQuality?: _layoutit_polycss_core.TextureQuality;
|
|
23
|
+
textureLeafSizing?: PolyTextureLeafSizing;
|
|
24
|
+
textureImageRendering?: PolyTextureImageRendering;
|
|
25
|
+
textureBackend?: PolyTextureBackend;
|
|
26
|
+
textureProjection?: PolyTextureProjection;
|
|
23
27
|
solidPaintDefaults?: _layoutit_polycss_core.SolidPaintDefaults;
|
|
24
28
|
strategies?: _layoutit_polycss_core.PolyRenderStrategiesOption;
|
|
25
29
|
/**
|
|
@@ -33,7 +37,7 @@ interface RenderTextureAtlasOptions {
|
|
|
33
37
|
interface RenderedPoly {
|
|
34
38
|
polygonIndex: number;
|
|
35
39
|
element: HTMLElement;
|
|
36
|
-
kind?: "atlas" | "solid" | "border" | "corner" | "triangle";
|
|
40
|
+
kind?: "atlas" | "image" | "solid" | "border" | "corner" | "triangle";
|
|
37
41
|
plan?: _layoutit_polycss_core.TextureAtlasPlan;
|
|
38
42
|
dispose(): void;
|
|
39
43
|
}
|
|
@@ -55,7 +59,7 @@ interface RenderTextureAtlasAsyncResult extends RenderTextureAtlasResult {
|
|
|
55
59
|
solidPaintDefaults: _layoutit_polycss_core.SolidPaintDefaults;
|
|
56
60
|
}
|
|
57
61
|
|
|
58
|
-
declare function packTextureAtlasPlansWithScale(plans: Array<TextureAtlasPlan | null>, textureQualityInput: TextureQuality | undefined, doc: Document | null | undefined): {
|
|
62
|
+
declare function packTextureAtlasPlansWithScale(plans: Array<TextureAtlasPlan | null>, textureQualityInput: TextureQuality | undefined, doc: Document | null | undefined, textureLeafSizing?: PolyTextureLeafSizing): {
|
|
59
63
|
packed: PackedAtlas;
|
|
60
64
|
atlasScale: number;
|
|
61
65
|
atlasCanonicalSize: number;
|
|
@@ -308,11 +312,84 @@ interface PolyRenderSurfaceLeafCounts {
|
|
|
308
312
|
atlas: number;
|
|
309
313
|
stableTriangle: number;
|
|
310
314
|
}
|
|
315
|
+
type PolyRenderLeafStrategy = keyof PolyRenderSurfaceLeafCounts;
|
|
316
|
+
interface PolyTextureReadiness {
|
|
317
|
+
ready: boolean;
|
|
318
|
+
textureLeafCount: number;
|
|
319
|
+
readyTextureLeafCount: number;
|
|
320
|
+
pendingTextureLeafCount: number;
|
|
321
|
+
atlasTextureLeafCount: number;
|
|
322
|
+
imageTextureLeafCount: number;
|
|
323
|
+
}
|
|
324
|
+
interface PolyTextureRenderStats {
|
|
325
|
+
ready: boolean;
|
|
326
|
+
leafCount: number;
|
|
327
|
+
atlasCount: number;
|
|
328
|
+
imageCount: number;
|
|
329
|
+
pendingCount: number;
|
|
330
|
+
sizingCounts: {
|
|
331
|
+
canonical: number;
|
|
332
|
+
local: number;
|
|
333
|
+
raster: number;
|
|
334
|
+
image: number;
|
|
335
|
+
unknown: number;
|
|
336
|
+
};
|
|
337
|
+
imageRenderingCounts: {
|
|
338
|
+
auto: number;
|
|
339
|
+
pixelated: number;
|
|
340
|
+
unknown: number;
|
|
341
|
+
};
|
|
342
|
+
projectionCounts: {
|
|
343
|
+
affine: number;
|
|
344
|
+
projective: number;
|
|
345
|
+
fallback: number;
|
|
346
|
+
unknown: number;
|
|
347
|
+
};
|
|
348
|
+
minLeafWidth: number;
|
|
349
|
+
maxLeafWidth: number;
|
|
350
|
+
minLeafHeight: number;
|
|
351
|
+
maxLeafHeight: number;
|
|
352
|
+
doubleSidedCount: number;
|
|
353
|
+
}
|
|
354
|
+
interface PolySnapshotRenderStats {
|
|
355
|
+
runtimeAtlasUrlCount: number;
|
|
356
|
+
snapshotAtlasCount: number;
|
|
357
|
+
snapshotBackgroundCount: number;
|
|
358
|
+
selfContained: boolean;
|
|
359
|
+
}
|
|
360
|
+
interface PolyCameraSnapshotStats {
|
|
361
|
+
rootFound: boolean;
|
|
362
|
+
projection: "orthographic" | "perspective" | "unknown";
|
|
363
|
+
perspectiveStyle: string;
|
|
364
|
+
appliedPerspectiveStyle: string;
|
|
365
|
+
zoom?: number;
|
|
366
|
+
distance?: number;
|
|
367
|
+
rotX?: number;
|
|
368
|
+
rotY?: number;
|
|
369
|
+
target?: [number, number, number];
|
|
370
|
+
}
|
|
371
|
+
interface PolyLeafInfo {
|
|
372
|
+
element: HTMLElement;
|
|
373
|
+
strategy: PolyRenderLeafStrategy;
|
|
374
|
+
polygonIndex?: number;
|
|
375
|
+
textureBackend?: string;
|
|
376
|
+
textureReady?: boolean;
|
|
377
|
+
textureLeafSizing?: string;
|
|
378
|
+
textureImageRendering?: string;
|
|
379
|
+
textureProjection?: string;
|
|
380
|
+
textureLeafWidth?: number;
|
|
381
|
+
textureLeafHeight?: number;
|
|
382
|
+
doubleSided?: boolean;
|
|
383
|
+
}
|
|
311
384
|
interface PolyRenderStats {
|
|
312
385
|
polygonCount: number;
|
|
313
386
|
mountedPolygonLeafCount: number;
|
|
314
387
|
shadowLeafCount: number;
|
|
315
388
|
surfaceLeafCounts: PolyRenderSurfaceLeafCounts;
|
|
389
|
+
textureReadiness: PolyTextureReadiness;
|
|
390
|
+
textureStats: PolyTextureRenderStats;
|
|
391
|
+
snapshotStats: PolySnapshotRenderStats;
|
|
392
|
+
cameraStats: PolyCameraSnapshotStats;
|
|
316
393
|
bucketCount: number;
|
|
317
394
|
}
|
|
318
395
|
interface PolyRenderStatsOptions {
|
|
@@ -323,6 +400,8 @@ interface PolyRenderStatsOptions {
|
|
|
323
400
|
*/
|
|
324
401
|
scopeSelector?: string;
|
|
325
402
|
}
|
|
403
|
+
declare function queryPolyLeaves(root: ParentNode | null | undefined, optionsOrPolygonCount?: number | PolyRenderStatsOptions): PolyLeafInfo[];
|
|
404
|
+
declare function collectPolyTextureReadiness(root: ParentNode | null | undefined, optionsOrPolygonCount?: number | PolyRenderStatsOptions): PolyTextureReadiness;
|
|
326
405
|
declare function collectPolyRenderStats(root: ParentNode | null | undefined, optionsOrPolygonCount?: number | PolyRenderStatsOptions): PolyRenderStats;
|
|
327
406
|
|
|
328
407
|
type PolySceneSnapshotErrorCode = "INVALID_TARGET" | "SCENE_NOT_FOUND" | "ASSET_INLINE_FAILED";
|
|
@@ -358,4 +437,4 @@ declare function createPolyTorus(options?: TorusPolygonsOptions): ParseResult;
|
|
|
358
437
|
|
|
359
438
|
declare function injectPolyBaseStyles(doc?: Document): void;
|
|
360
439
|
|
|
361
|
-
export { PolyControlsBaseOptions, PolyControlsEvent, PolyControlsHandle, PolyControlsListener, type PolyFirstPersonControlsHandle, type PolyFirstPersonControlsOptions, type PolyMapControlsHandle, type PolyMapControlsOptions, PolyMeshHandle, type PolyRenderStats, type PolyRenderStatsOptions, type PolyRenderSurfaceLeafCounts, PolySceneHandle, PolySceneOptions, PolySceneSnapshotError, type PolySceneSnapshotErrorCode, type PolySelectOptions, type PolySelectionHandle, type PolyTransformControlsHandle, type PolyTransformControlsObjectChangeEvent, type PolyTransformControlsOptions, type RenderTextureAtlasAsyncResult, type RenderTextureAtlasOptions, type RenderTextureAtlasResult, type RenderedPoly, buildAtlasPages, collectPolyRenderStats, createPolyBox, createPolyCone, createPolyCylinder, createPolyDodecahedron, createPolyFirstPersonControls, createPolyIcosahedron, createPolyMapControls, createPolyOctahedron, createPolyPlane, createPolyRing, createPolyScene, createPolySphere, createPolyTetrahedron, createPolyTorus, createSelect, createTransformControls, exportPolySceneSnapshot, filterAtlasPlans, getSolidPaintDefaults, getSolidPaintDefaultsFromPlans, injectPolyBaseStyles, isBorderShapeSupported, isSolidTriangleSupported, packTextureAtlasPlansWithScale, renderPolygonsWithStableTriangles, renderPolygonsWithTextureAtlas, renderPolygonsWithTextureAtlasAsync, updatePolygonsWithStableTopology, updatePolygonsWithStableTriangles, updateStableTriangleFrame };
|
|
440
|
+
export { type PolyCameraSnapshotStats, PolyControlsBaseOptions, PolyControlsEvent, PolyControlsHandle, PolyControlsListener, type PolyFirstPersonControlsHandle, type PolyFirstPersonControlsOptions, type PolyLeafInfo, type PolyMapControlsHandle, type PolyMapControlsOptions, PolyMeshHandle, type PolyRenderLeafStrategy, type PolyRenderStats, type PolyRenderStatsOptions, type PolyRenderSurfaceLeafCounts, PolySceneHandle, PolySceneOptions, PolySceneSnapshotError, type PolySceneSnapshotErrorCode, type PolySelectOptions, type PolySelectionHandle, type PolySnapshotRenderStats, type PolyTextureReadiness, type PolyTextureRenderStats, type PolyTransformControlsHandle, type PolyTransformControlsObjectChangeEvent, type PolyTransformControlsOptions, type RenderTextureAtlasAsyncResult, type RenderTextureAtlasOptions, type RenderTextureAtlasResult, type RenderedPoly, buildAtlasPages, collectPolyRenderStats, collectPolyTextureReadiness, createPolyBox, createPolyCone, createPolyCylinder, createPolyDodecahedron, createPolyFirstPersonControls, createPolyIcosahedron, createPolyMapControls, createPolyOctahedron, createPolyPlane, createPolyRing, createPolyScene, createPolySphere, createPolyTetrahedron, createPolyTorus, createSelect, createTransformControls, exportPolySceneSnapshot, filterAtlasPlans, getSolidPaintDefaults, getSolidPaintDefaultsFromPlans, injectPolyBaseStyles, isBorderShapeSupported, isSolidTriangleSupported, packTextureAtlasPlansWithScale, queryPolyLeaves, renderPolygonsWithStableTriangles, renderPolygonsWithTextureAtlas, renderPolygonsWithTextureAtlasAsync, updatePolygonsWithStableTopology, updatePolygonsWithStableTriangles, updateStableTriangleFrame };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { P as PolySceneOptions, a as PolySceneHandle, b as PolyControlsHandle, c as PolyControlsBaseOptions, d as PolyControlsEvent, e as PolyControlsListener, f as PolyMeshHandle } from './PolyShapeElements-
|
|
2
|
-
export { g as PolyBoxElement, h as PolyCameraElement, i as PolyCameraOptions, j as PolyConeElement, k as PolyControlsAnimateOptions, l as PolyControlsCamera, m as PolyControlsChangeEvent, n as PolyControlsInteractionEvent, o as PolyCylinderElement, p as PolyDodecahedronElement, q as PolyFirstPersonControlsElement, r as PolyIcosahedronElement, s as PolyIframeElement, t as PolyMapControlsElement, u as PolyMeshElement, v as PolyMeshTransform, w as PolyOctahedronElement, x as PolyOrbitControlsElement, y as PolyOrbitControlsHandle, z as PolyOrbitControlsOptions, A as PolyOrthographicCameraElement, B as PolyOrthographicCameraHandle, C as PolyOrthographicCameraOptions, D as PolyPerspectiveCameraElement, E as PolyPerspectiveCameraHandle, F as PolyPerspectiveCameraOptions, G as PolyPlaneElement, H as PolyPolygonElement, I as PolyRingElement, J as PolySceneElement, K as PolySelectElement, L as PolySphereElement, M as PolyTetrahedronElement, N as PolyTorusElement, O as PolyTransformControlsElement, Q as createPolyCamera, R as createPolyOrbitControls, S as createPolyOrthographicCamera, T as createPolyPerspectiveCamera } from './PolyShapeElements-
|
|
1
|
+
import { P as PolySceneOptions, a as PolySceneHandle, b as PolyControlsHandle, c as PolyControlsBaseOptions, d as PolyControlsEvent, e as PolyControlsListener, f as PolyMeshHandle } from './PolyShapeElements-YDkJX2Fz.js';
|
|
2
|
+
export { g as PolyBoxElement, h as PolyCameraElement, i as PolyCameraOptions, j as PolyConeElement, k as PolyControlsAnimateOptions, l as PolyControlsCamera, m as PolyControlsChangeEvent, n as PolyControlsInteractionEvent, o as PolyCylinderElement, p as PolyDodecahedronElement, q as PolyFirstPersonControlsElement, r as PolyIcosahedronElement, s as PolyIframeElement, t as PolyMapControlsElement, u as PolyMeshElement, v as PolyMeshTransform, w as PolyOctahedronElement, x as PolyOrbitControlsElement, y as PolyOrbitControlsHandle, z as PolyOrbitControlsOptions, A as PolyOrthographicCameraElement, B as PolyOrthographicCameraHandle, C as PolyOrthographicCameraOptions, D as PolyPerspectiveCameraElement, E as PolyPerspectiveCameraHandle, F as PolyPerspectiveCameraOptions, G as PolyPlaneElement, H as PolyPolygonElement, I as PolyRingElement, J as PolySceneElement, K as PolySelectElement, L as PolySphereElement, M as PolyTetrahedronElement, N as PolyTorusElement, O as PolyTransformControlsElement, Q as createPolyCamera, R as createPolyOrbitControls, S as createPolyOrthographicCamera, T as createPolyPerspectiveCamera } from './PolyShapeElements-YDkJX2Fz.js';
|
|
3
3
|
import * as _layoutit_polycss_core from '@layoutit/polycss-core';
|
|
4
|
-
import { PolyDirectionalLight, PolyAmbientLight, PolyTextureLightingMode, TextureAtlasPlan, TextureQuality, PackedAtlas, PackedPage, TextureAtlasPage, PolyRenderStrategy, SolidPaintDefaults, Polygon, SolidTriangleFrame, Vec3, BoxPolygonsOptions, ParseResult, ConePolygonsOptions, CylinderPolygonsOptions, DodecahedronPolygonsOptions, IcosahedronPolygonsOptions, OctahedronPolygonsOptions, PlanePolygonsOptions, RingPolygonsOptions, SpherePolygonsOptions, TetrahedronPolygonsOptions, TorusPolygonsOptions } from '@layoutit/polycss-core';
|
|
4
|
+
import { PolyDirectionalLight, PolyAmbientLight, PolyTextureLightingMode, PolyTextureLeafSizing, PolyTextureImageRendering, PolyTextureBackend, PolyTextureProjection, TextureAtlasPlan, TextureQuality, PackedAtlas, PackedPage, TextureAtlasPage, PolyRenderStrategy, SolidPaintDefaults, Polygon, SolidTriangleFrame, Vec3, BoxPolygonsOptions, ParseResult, ConePolygonsOptions, CylinderPolygonsOptions, DodecahedronPolygonsOptions, IcosahedronPolygonsOptions, OctahedronPolygonsOptions, PlanePolygonsOptions, RingPolygonsOptions, SpherePolygonsOptions, TetrahedronPolygonsOptions, TorusPolygonsOptions } from '@layoutit/polycss-core';
|
|
5
5
|
export * from '@layoutit/polycss-core';
|
|
6
6
|
export { ComputeTextureAtlasPlanOptions, PackedAtlas, PackedPage, PackedTextureAtlasEntry, PolyMeshTransformInput, PolyRenderStrategiesOption, PolyRenderStrategy, PolySceneTransformInput, ParseResult as PolyShapeResult, SolidPaintDefaults, SolidTriangleFrame, TextureAtlasPage, TextureAtlasPlan, TextureQuality, buildPolyMeshTransform, buildPolySceneTransform, buildTextureEdgeRepairSets, computeTextureAtlasPlanPublic, cssBorderShapeForPlan, cssDistanceToWorld, cssPositionToWorld, formatBorderShapeEntryMatrix, formatCssLengthPx, formatMatrix3d, formatSolidQuadEntryMatrix, isFullRectSolid, isProjectiveQuadPlan, isSolidTrianglePlan, cssDistanceToWorld as polyCssDistanceToWorld, cssPositionToWorld as polyCssPositionToWorld, worldDirectionToPolyCss, worldDirectionalLightToCss as worldDirectionalLightToPolyCss, worldDistanceToCss, worldDistanceToCss as worldDistanceToPolyCss, worldPositionToPolyCss } from '@layoutit/polycss-core';
|
|
7
7
|
|
|
@@ -20,6 +20,10 @@ interface RenderTextureAtlasOptions {
|
|
|
20
20
|
* or a 64px sprite on mobile-class documents.
|
|
21
21
|
*/
|
|
22
22
|
textureQuality?: _layoutit_polycss_core.TextureQuality;
|
|
23
|
+
textureLeafSizing?: PolyTextureLeafSizing;
|
|
24
|
+
textureImageRendering?: PolyTextureImageRendering;
|
|
25
|
+
textureBackend?: PolyTextureBackend;
|
|
26
|
+
textureProjection?: PolyTextureProjection;
|
|
23
27
|
solidPaintDefaults?: _layoutit_polycss_core.SolidPaintDefaults;
|
|
24
28
|
strategies?: _layoutit_polycss_core.PolyRenderStrategiesOption;
|
|
25
29
|
/**
|
|
@@ -33,7 +37,7 @@ interface RenderTextureAtlasOptions {
|
|
|
33
37
|
interface RenderedPoly {
|
|
34
38
|
polygonIndex: number;
|
|
35
39
|
element: HTMLElement;
|
|
36
|
-
kind?: "atlas" | "solid" | "border" | "corner" | "triangle";
|
|
40
|
+
kind?: "atlas" | "image" | "solid" | "border" | "corner" | "triangle";
|
|
37
41
|
plan?: _layoutit_polycss_core.TextureAtlasPlan;
|
|
38
42
|
dispose(): void;
|
|
39
43
|
}
|
|
@@ -55,7 +59,7 @@ interface RenderTextureAtlasAsyncResult extends RenderTextureAtlasResult {
|
|
|
55
59
|
solidPaintDefaults: _layoutit_polycss_core.SolidPaintDefaults;
|
|
56
60
|
}
|
|
57
61
|
|
|
58
|
-
declare function packTextureAtlasPlansWithScale(plans: Array<TextureAtlasPlan | null>, textureQualityInput: TextureQuality | undefined, doc: Document | null | undefined): {
|
|
62
|
+
declare function packTextureAtlasPlansWithScale(plans: Array<TextureAtlasPlan | null>, textureQualityInput: TextureQuality | undefined, doc: Document | null | undefined, textureLeafSizing?: PolyTextureLeafSizing): {
|
|
59
63
|
packed: PackedAtlas;
|
|
60
64
|
atlasScale: number;
|
|
61
65
|
atlasCanonicalSize: number;
|
|
@@ -308,11 +312,84 @@ interface PolyRenderSurfaceLeafCounts {
|
|
|
308
312
|
atlas: number;
|
|
309
313
|
stableTriangle: number;
|
|
310
314
|
}
|
|
315
|
+
type PolyRenderLeafStrategy = keyof PolyRenderSurfaceLeafCounts;
|
|
316
|
+
interface PolyTextureReadiness {
|
|
317
|
+
ready: boolean;
|
|
318
|
+
textureLeafCount: number;
|
|
319
|
+
readyTextureLeafCount: number;
|
|
320
|
+
pendingTextureLeafCount: number;
|
|
321
|
+
atlasTextureLeafCount: number;
|
|
322
|
+
imageTextureLeafCount: number;
|
|
323
|
+
}
|
|
324
|
+
interface PolyTextureRenderStats {
|
|
325
|
+
ready: boolean;
|
|
326
|
+
leafCount: number;
|
|
327
|
+
atlasCount: number;
|
|
328
|
+
imageCount: number;
|
|
329
|
+
pendingCount: number;
|
|
330
|
+
sizingCounts: {
|
|
331
|
+
canonical: number;
|
|
332
|
+
local: number;
|
|
333
|
+
raster: number;
|
|
334
|
+
image: number;
|
|
335
|
+
unknown: number;
|
|
336
|
+
};
|
|
337
|
+
imageRenderingCounts: {
|
|
338
|
+
auto: number;
|
|
339
|
+
pixelated: number;
|
|
340
|
+
unknown: number;
|
|
341
|
+
};
|
|
342
|
+
projectionCounts: {
|
|
343
|
+
affine: number;
|
|
344
|
+
projective: number;
|
|
345
|
+
fallback: number;
|
|
346
|
+
unknown: number;
|
|
347
|
+
};
|
|
348
|
+
minLeafWidth: number;
|
|
349
|
+
maxLeafWidth: number;
|
|
350
|
+
minLeafHeight: number;
|
|
351
|
+
maxLeafHeight: number;
|
|
352
|
+
doubleSidedCount: number;
|
|
353
|
+
}
|
|
354
|
+
interface PolySnapshotRenderStats {
|
|
355
|
+
runtimeAtlasUrlCount: number;
|
|
356
|
+
snapshotAtlasCount: number;
|
|
357
|
+
snapshotBackgroundCount: number;
|
|
358
|
+
selfContained: boolean;
|
|
359
|
+
}
|
|
360
|
+
interface PolyCameraSnapshotStats {
|
|
361
|
+
rootFound: boolean;
|
|
362
|
+
projection: "orthographic" | "perspective" | "unknown";
|
|
363
|
+
perspectiveStyle: string;
|
|
364
|
+
appliedPerspectiveStyle: string;
|
|
365
|
+
zoom?: number;
|
|
366
|
+
distance?: number;
|
|
367
|
+
rotX?: number;
|
|
368
|
+
rotY?: number;
|
|
369
|
+
target?: [number, number, number];
|
|
370
|
+
}
|
|
371
|
+
interface PolyLeafInfo {
|
|
372
|
+
element: HTMLElement;
|
|
373
|
+
strategy: PolyRenderLeafStrategy;
|
|
374
|
+
polygonIndex?: number;
|
|
375
|
+
textureBackend?: string;
|
|
376
|
+
textureReady?: boolean;
|
|
377
|
+
textureLeafSizing?: string;
|
|
378
|
+
textureImageRendering?: string;
|
|
379
|
+
textureProjection?: string;
|
|
380
|
+
textureLeafWidth?: number;
|
|
381
|
+
textureLeafHeight?: number;
|
|
382
|
+
doubleSided?: boolean;
|
|
383
|
+
}
|
|
311
384
|
interface PolyRenderStats {
|
|
312
385
|
polygonCount: number;
|
|
313
386
|
mountedPolygonLeafCount: number;
|
|
314
387
|
shadowLeafCount: number;
|
|
315
388
|
surfaceLeafCounts: PolyRenderSurfaceLeafCounts;
|
|
389
|
+
textureReadiness: PolyTextureReadiness;
|
|
390
|
+
textureStats: PolyTextureRenderStats;
|
|
391
|
+
snapshotStats: PolySnapshotRenderStats;
|
|
392
|
+
cameraStats: PolyCameraSnapshotStats;
|
|
316
393
|
bucketCount: number;
|
|
317
394
|
}
|
|
318
395
|
interface PolyRenderStatsOptions {
|
|
@@ -323,6 +400,8 @@ interface PolyRenderStatsOptions {
|
|
|
323
400
|
*/
|
|
324
401
|
scopeSelector?: string;
|
|
325
402
|
}
|
|
403
|
+
declare function queryPolyLeaves(root: ParentNode | null | undefined, optionsOrPolygonCount?: number | PolyRenderStatsOptions): PolyLeafInfo[];
|
|
404
|
+
declare function collectPolyTextureReadiness(root: ParentNode | null | undefined, optionsOrPolygonCount?: number | PolyRenderStatsOptions): PolyTextureReadiness;
|
|
326
405
|
declare function collectPolyRenderStats(root: ParentNode | null | undefined, optionsOrPolygonCount?: number | PolyRenderStatsOptions): PolyRenderStats;
|
|
327
406
|
|
|
328
407
|
type PolySceneSnapshotErrorCode = "INVALID_TARGET" | "SCENE_NOT_FOUND" | "ASSET_INLINE_FAILED";
|
|
@@ -358,4 +437,4 @@ declare function createPolyTorus(options?: TorusPolygonsOptions): ParseResult;
|
|
|
358
437
|
|
|
359
438
|
declare function injectPolyBaseStyles(doc?: Document): void;
|
|
360
439
|
|
|
361
|
-
export { PolyControlsBaseOptions, PolyControlsEvent, PolyControlsHandle, PolyControlsListener, type PolyFirstPersonControlsHandle, type PolyFirstPersonControlsOptions, type PolyMapControlsHandle, type PolyMapControlsOptions, PolyMeshHandle, type PolyRenderStats, type PolyRenderStatsOptions, type PolyRenderSurfaceLeafCounts, PolySceneHandle, PolySceneOptions, PolySceneSnapshotError, type PolySceneSnapshotErrorCode, type PolySelectOptions, type PolySelectionHandle, type PolyTransformControlsHandle, type PolyTransformControlsObjectChangeEvent, type PolyTransformControlsOptions, type RenderTextureAtlasAsyncResult, type RenderTextureAtlasOptions, type RenderTextureAtlasResult, type RenderedPoly, buildAtlasPages, collectPolyRenderStats, createPolyBox, createPolyCone, createPolyCylinder, createPolyDodecahedron, createPolyFirstPersonControls, createPolyIcosahedron, createPolyMapControls, createPolyOctahedron, createPolyPlane, createPolyRing, createPolyScene, createPolySphere, createPolyTetrahedron, createPolyTorus, createSelect, createTransformControls, exportPolySceneSnapshot, filterAtlasPlans, getSolidPaintDefaults, getSolidPaintDefaultsFromPlans, injectPolyBaseStyles, isBorderShapeSupported, isSolidTriangleSupported, packTextureAtlasPlansWithScale, renderPolygonsWithStableTriangles, renderPolygonsWithTextureAtlas, renderPolygonsWithTextureAtlasAsync, updatePolygonsWithStableTopology, updatePolygonsWithStableTriangles, updateStableTriangleFrame };
|
|
440
|
+
export { type PolyCameraSnapshotStats, PolyControlsBaseOptions, PolyControlsEvent, PolyControlsHandle, PolyControlsListener, type PolyFirstPersonControlsHandle, type PolyFirstPersonControlsOptions, type PolyLeafInfo, type PolyMapControlsHandle, type PolyMapControlsOptions, PolyMeshHandle, type PolyRenderLeafStrategy, type PolyRenderStats, type PolyRenderStatsOptions, type PolyRenderSurfaceLeafCounts, PolySceneHandle, PolySceneOptions, PolySceneSnapshotError, type PolySceneSnapshotErrorCode, type PolySelectOptions, type PolySelectionHandle, type PolySnapshotRenderStats, type PolyTextureReadiness, type PolyTextureRenderStats, type PolyTransformControlsHandle, type PolyTransformControlsObjectChangeEvent, type PolyTransformControlsOptions, type RenderTextureAtlasAsyncResult, type RenderTextureAtlasOptions, type RenderTextureAtlasResult, type RenderedPoly, buildAtlasPages, collectPolyRenderStats, collectPolyTextureReadiness, createPolyBox, createPolyCone, createPolyCylinder, createPolyDodecahedron, createPolyFirstPersonControls, createPolyIcosahedron, createPolyMapControls, createPolyOctahedron, createPolyPlane, createPolyRing, createPolyScene, createPolySphere, createPolyTetrahedron, createPolyTorus, createSelect, createTransformControls, exportPolySceneSnapshot, filterAtlasPlans, getSolidPaintDefaults, getSolidPaintDefaultsFromPlans, injectPolyBaseStyles, isBorderShapeSupported, isSolidTriangleSupported, packTextureAtlasPlansWithScale, queryPolyLeaves, renderPolygonsWithStableTriangles, renderPolygonsWithTextureAtlas, renderPolygonsWithTextureAtlasAsync, updatePolygonsWithStableTopology, updatePolygonsWithStableTriangles, updateStableTriangleFrame };
|