@layoutit/polycss-vue 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/dist/index.d.cts CHANGED
@@ -1,8 +1,8 @@
1
1
  import * as vue from 'vue';
2
2
  import { PropType, Ref, InjectionKey, VNode, CSSProperties, ComputedRef, MaybeRef } from 'vue';
3
3
  import * as _layoutit_polycss_core from '@layoutit/polycss-core';
4
- import { Vec3, CameraState, CameraHandle, Polygon, PolyDirectionalLight, PolyAmbientLight, PolyTextureLightingMode, TextureQuality, PolySeamBleed, PolyRenderStrategiesOption, LoadMeshOptions, ParseResult, MeshResolution, PolyMaterial, Vec2, BoxPolygonsOptions, ConePolygonsOptions, CylinderPolygonsOptions, DodecahedronPolygonsOptions, IcosahedronPolygonsOptions, OctahedronPolygonsOptions, PlanePolygonsOptions, RingPolygonsOptions, SpherePolygonsOptions, TetrahedronPolygonsOptions, TorusPolygonsOptions, PolyAnimationTarget, PolyAnimationMixer, PolyAnimationClip, PolyAnimationAction, ParseAnimationController } from '@layoutit/polycss-core';
5
- export { ArrowPolygonsOptions, AutoRotateConfig, AutoRotateOption, AxesHelperOptions, BASE_TILE, BoxFace, BoxFaceOptions, BoxPolygonsOptions, CAMERA_BACKFACE_CULL_EPS, CameraCullNormalGroup, CameraCullRotation, CameraHandle, CameraState, CameraStyleInput, ConePolygonsOptions, CoverPlanarPolygonsOptions, CullInteriorOptions, CylinderPolygonsOptions, DEFAULT_CAMERA_STATE, DEFAULT_PROJECTION, DEFAULT_SEAM_FACET_SPLIT_OPTIONS, DEFAULT_SEAM_OVERLAP_OPTIONS, DodecahedronPolygonsOptions, GltfParseOptions, IcosahedronPolygonsOptions, LoadMeshOptions, LoopMode, LoopOnce, LoopPingPong, LoopRepeat, MeshResolution, MtlParseResult, NormalizeResult, ObjParseOptions, OctahedronPolygonsOptions, OptimizeAnimatedMeshPolygonsOptions, OptimizeMeshParseResultOptions, OptimizeMeshPolygonsOptions, ParseAnimationClip, ParseAnimationController, ParseResult, ParseStlColor, ParseStlSolid, ParseStlTopology, ParsedColor, PlanePolygonsOptions, PolyAmbientLight, PolyAnimationAction, PolyAnimationClip, PolyAnimationMixer, PolyAnimationTarget, PolyDirectionalLight, PolyMaterial, PolyMeshTransformInput, PolyRenderStrategiesOption, PolyRenderStrategy, PolySceneTransformInput, PolyTextureLightingMode, Polygon, PolygonFace, RingPolygonsOptions, SceneBbox, SceneContext, SceneContextBuildArgs, SceneContextBuildResult, SeamFacetSplitCandidate, SeamFacetSplitCandidateReason, SeamFacetSplitOptions, SeamFacetSplitReport, SeamOverlapCandidate, SeamOverlapCandidateKind, SeamOverlapDiagnostics, SeamOverlapOptions, SimplifyTriangleMeshPolygonsOptions, SolidTextureSampleOptions, StlParseOptions, TetrahedronPolygonsOptions, TexturePaintMetrics, TexturePaintMetricsOptions, TextureTriangle, TorusPolygonsOptions, VOXEL_CAMERA_CULL_AXIS_EPS, VOXEL_CAMERA_CULL_NORMAL_LIMIT, Vec2, Vec3, VoxParseOptions, arrowPolygons, axesHelperPolygons, bakeSolidTextureSampledPolygons, bakeSolidTextureSamples, boxPolygons, buildPolyMeshTransform, buildPolySceneTransform, buildSceneContext, cameraCullNormalGroups, cameraCullNormalGroupsFromPolygons, cameraCullNormalKey, cameraCullVisibleSignature, cameraFacingDepth, clampChannel, computeSceneBbox, computeShapeLighting, computeTexturePaintMetrics, conePolygons, coverPlanarPolygons, createIsometricCamera, createPolyAnimationMixer, cullInteriorPolygons, cylinderPolygons, dodecahedronPolygons, formatColor, icosahedronPolygons, inverseRotateVec3, isAxisAlignedSurfaceNormal, isVoxelCameraCullableNormalGroups, loadMesh, mergePolygons, normalFacesCamera, normalizeInvertMultiplier, normalizePolygons, octahedronPolygons, optimizeAnimatedMeshPolygons, optimizeMeshParseResult, optimizeMeshPolygons, parseColor, parseGltf, parseHexColor, parseMtl, parseObj, parsePureColor, parseRgbColor, parseStl, parseVox, planePolygons, cssDistanceToWorld as polyCssDistanceToWorld, cssPositionToWorld as polyCssPositionToWorld, polygonCssSurfaceNormal, polygonFaces, polygonFacesCamera, repairMeshSeams, ringPolygons, rotateVec3, seamFacetSplitPolygons, seamFacetSplitReport, seamOverlapDiagnostics, seamOverlapPolygons, seamOverlapReport, shadeColor, simplifyTriangleMeshPolygons, tetrahedronPolygons, torusPolygons, worldDirectionToCss as worldDirectionToPolyCss, worldDirectionalLightToCss as worldDirectionalLightToPolyCss, worldDistanceToCss as worldDistanceToPolyCss, worldPositionToCss as worldPositionToPolyCss } from '@layoutit/polycss-core';
4
+ import { Vec3, CameraState, CameraHandle, PolyCameraProjection, Polygon, PolyDirectionalLight, PolyPointLight, PolyAmbientLight, PolyTextureLightingMode, TextureQuality, PolyTextureLeafSizing, PolyTextureImageRendering, PolyTextureBackend, PolyTextureProjection, PolySeamBleed, PolyRenderStrategiesOption, LoadMeshOptions, ParseResult, MeshResolution, PolyMaterial, PolyTextureImageSource, PolyTexturePresentation, Vec2, BoxPolygonsOptions, ConePolygonsOptions, CylinderPolygonsOptions, DodecahedronPolygonsOptions, IcosahedronPolygonsOptions, OctahedronPolygonsOptions, PlanePolygonsOptions, RingPolygonsOptions, SpherePolygonsOptions, TetrahedronPolygonsOptions, TorusPolygonsOptions, PolyAnimationTarget, PolyAnimationMixer, PolyAnimationClip, PolyAnimationAction, ParseAnimationController } from '@layoutit/polycss-core';
5
+ export { ArrowPolygonsOptions, AutoRotateConfig, AutoRotateOption, AxesHelperOptions, BASE_TILE, BoxFace, BoxFaceOptions, BoxPolygonsOptions, CAMERA_BACKFACE_CULL_EPS, CameraCullNormalGroup, CameraCullRotation, CameraHandle, CameraState, CameraStyleInput, ConePolygonsOptions, CoverPlanarPolygonsOptions, CullInteriorOptions, CylinderPolygonsOptions, DEFAULT_CAMERA_STATE, DEFAULT_PROJECTION, DEFAULT_SEAM_FACET_SPLIT_OPTIONS, DEFAULT_SEAM_OVERLAP_OPTIONS, DodecahedronPolygonsOptions, GltfParseOptions, IcosahedronPolygonsOptions, LoadMeshOptions, LoopMode, LoopOnce, LoopPingPong, LoopRepeat, MeshResolution, MtlParseResult, NormalizeResult, ObjParseOptions, OctahedronPolygonsOptions, OptimizeAnimatedMeshPolygonsOptions, OptimizeMeshParseResultOptions, OptimizeMeshPolygonsOptions, ParseAnimationClip, ParseAnimationController, ParseResult, ParseStlColor, ParseStlSolid, ParseStlTopology, ParsedColor, PlanePolygonsOptions, PolyAmbientLight, PolyAnimationAction, PolyAnimationClip, PolyAnimationMixer, PolyAnimationTarget, PolyCameraProjection, PolyCameraSnapshot, PolyCameraSnapshotOptions, PolyCameraSnapshotSource, PolyDirectionalLight, PolyMaterial, PolyMeshTransformInput, PolyRenderStrategiesOption, PolyRenderStrategy, PolySceneTransformInput, PolyTextureBackend, PolyTextureImageLighting, PolyTextureImageRendering, PolyTextureImageSource, PolyTextureLeafSizing, PolyTextureLightingMode, PolyTexturePresentation, PolyTextureProjection, Polygon, PolygonFace, RingPolygonsOptions, SceneBbox, SceneContext, SceneContextBuildArgs, SceneContextBuildResult, SeamFacetSplitCandidate, SeamFacetSplitCandidateReason, SeamFacetSplitOptions, SeamFacetSplitReport, SeamOverlapCandidate, SeamOverlapCandidateKind, SeamOverlapDiagnostics, SeamOverlapOptions, SimplifyTriangleMeshPolygonsOptions, SolidTextureSampleOptions, StlParseOptions, TetrahedronPolygonsOptions, TexturePaintMetrics, TexturePaintMetricsOptions, TextureTriangle, TorusPolygonsOptions, VOXEL_CAMERA_CULL_AXIS_EPS, VOXEL_CAMERA_CULL_NORMAL_LIMIT, Vec2, Vec3, VoxParseOptions, arrowPolygons, axesHelperPolygons, bakeSolidTextureSampledPolygons, bakeSolidTextureSamples, boxPolygons, buildPolyCameraSceneTransform, buildPolyMeshTransform, buildPolySceneTransform, buildSceneContext, cameraCullNormalGroups, cameraCullNormalGroupsFromPolygons, cameraCullNormalKey, cameraCullVisibleSignature, cameraFacingDepth, capturePolyCameraSnapshot, clampChannel, computeSceneBbox, computeShapeLighting, computeTexturePaintMetrics, conePolygons, coverPlanarPolygons, createIsometricCamera, createPolyAnimationMixer, cssDistanceToWorld, cssPositionToWorld, cullInteriorPolygons, cylinderPolygons, dodecahedronPolygons, formatColor, icosahedronPolygons, inverseRotateVec3, isAxisAlignedSurfaceNormal, isVoxelCameraCullableNormalGroups, loadMesh, mergePolygons, normalFacesCamera, normalizeInvertMultiplier, normalizePolygons, octahedronPolygons, optimizeAnimatedMeshPolygons, optimizeMeshParseResult, optimizeMeshPolygons, parseColor, parseGltf, parseHexColor, parseMtl, parseObj, parsePureColor, parseRgbColor, parseStl, parseVox, planePolygons, polyCameraTargetToCss, polyCssDistanceToWorld, polyCssPositionToWorld, polygonCssSurfaceNormal, polygonFaces, polygonFacesCamera, repairMeshSeams, resolvePolyCameraAppliedPerspectiveStyle, ringPolygons, rotateVec3, seamFacetSplitPolygons, seamFacetSplitReport, seamOverlapDiagnostics, seamOverlapPolygons, seamOverlapReport, shadeColor, simplifyTriangleMeshPolygons, tetrahedronPolygons, torusPolygons, worldDirectionToCss, worldDirectionToPolyCss, worldDirectionalLightToCss, worldDirectionalLightToPolyCss, worldDistanceToCss, worldDistanceToPolyCss, worldPositionToCss, worldPositionToPolyCss } from '@layoutit/polycss-core';
6
6
 
7
7
  interface PolyOrthographicCameraProps {
8
8
  zoom?: number;
@@ -143,6 +143,8 @@ interface UseCameraOptions {
143
143
  rotX?: number;
144
144
  rotY?: number;
145
145
  distance?: number;
146
+ projection?: PolyCameraProjection;
147
+ perspectiveStyle?: string;
146
148
  }
147
149
  interface UseCameraResult {
148
150
  store: SceneStore;
@@ -215,6 +217,30 @@ interface PolyShadowOptions {
215
217
  * disable the cap entirely.
216
218
  */
217
219
  maxExtend?: number;
220
+ /**
221
+ * Cast a low-resolution parametric silhouette per caster instead of full
222
+ * geometry — lighter DOM + cheaper projection. Directional + point lights.
223
+ * Default: `false`.
224
+ */
225
+ parametric?: boolean;
226
+ /**
227
+ * Parametric-shadow detail (max silhouette points / pixel-grid resolution).
228
+ * Only used when `parametric` is true. Default: `16`. Override per mesh via
229
+ * `<poly-mesh shadow-definition>`.
230
+ */
231
+ definition?: number;
232
+ /**
233
+ * Parametric render style: `"vector"` (smooth contour, default) or `"pixel"`
234
+ * (greedy-meshed voxel blocks; `definition` becomes the grid resolution).
235
+ */
236
+ style?: "vector" | "pixel";
237
+ /**
238
+ * Re-emit a caster's shadow while it animates (deforms) so the shadow follows
239
+ * the pose instead of freezing. Default `false`: a same-topology deform keeps
240
+ * the last shadow pose (re-emitting every frame is expensive). Best with
241
+ * `parametric`. Topology changes (different polygon count) always re-emit.
242
+ */
243
+ followAnimation?: boolean;
218
244
  }
219
245
 
220
246
  interface PolySceneProps {
@@ -225,6 +251,7 @@ interface PolySceneProps {
225
251
  rotY?: number;
226
252
  zoom?: number;
227
253
  directionalLight?: PolyDirectionalLight;
254
+ pointLights?: PolyPointLight[];
228
255
  ambientLight?: PolyAmbientLight;
229
256
  textureLighting?: PolyTextureLightingMode;
230
257
  /** Atlas bitmap budget and CSS sprite size. `"auto"` (default) uses a
@@ -232,6 +259,14 @@ interface PolySceneProps {
232
259
  * desktop/mobile sprite sizing. Numeric values 0.1..1 force an explicit
233
260
  * raster scale and the 64px sprite. */
234
261
  textureQuality?: TextureQuality;
262
+ /** Atlas leaf CSS primitive sizing. Defaults to canonical browser-fast sizing. */
263
+ textureLeafSizing?: PolyTextureLeafSizing;
264
+ /** Default image filtering for atlas and direct image texture leaves. */
265
+ textureImageRendering?: PolyTextureImageRendering;
266
+ /** Default texture backend request. Defaults to "auto". */
267
+ textureBackend?: PolyTextureBackend;
268
+ /** Default texture projection request. Defaults to "affine". */
269
+ textureProjection?: PolyTextureProjection;
235
270
  /** Solid seam overscan. `"auto"` computes a fitted per-edge amount from the polygon plan. */
236
271
  seamBleed?: PolySeamBleed;
237
272
  /** Opt out of specific render strategies. Disabled strategies fall through the chain (b→i→s, u→i→s, i→s). `<s>` cannot be disabled. */
@@ -282,6 +317,10 @@ declare const PolyScene: vue.DefineComponent<vue.ExtractPropTypes<{
282
317
  type: PropType<PolyDirectionalLight>;
283
318
  default: undefined;
284
319
  };
320
+ pointLights: {
321
+ type: PropType<PolyPointLight[]>;
322
+ default: undefined;
323
+ };
285
324
  ambientLight: {
286
325
  type: PropType<PolyAmbientLight>;
287
326
  default: undefined;
@@ -294,6 +333,22 @@ declare const PolyScene: vue.DefineComponent<vue.ExtractPropTypes<{
294
333
  type: PropType<TextureQuality>;
295
334
  default: undefined;
296
335
  };
336
+ textureLeafSizing: {
337
+ type: PropType<PolyTextureLeafSizing>;
338
+ default: undefined;
339
+ };
340
+ textureImageRendering: {
341
+ type: PropType<PolyTextureImageRendering>;
342
+ default: undefined;
343
+ };
344
+ textureBackend: {
345
+ type: PropType<PolyTextureBackend>;
346
+ default: undefined;
347
+ };
348
+ textureProjection: {
349
+ type: PropType<PolyTextureProjection>;
350
+ default: undefined;
351
+ };
297
352
  seamBleed: {
298
353
  type: PropType<PolySeamBleed>;
299
354
  default: undefined;
@@ -358,6 +413,10 @@ declare const PolyScene: vue.DefineComponent<vue.ExtractPropTypes<{
358
413
  type: PropType<PolyDirectionalLight>;
359
414
  default: undefined;
360
415
  };
416
+ pointLights: {
417
+ type: PropType<PolyPointLight[]>;
418
+ default: undefined;
419
+ };
361
420
  ambientLight: {
362
421
  type: PropType<PolyAmbientLight>;
363
422
  default: undefined;
@@ -370,6 +429,22 @@ declare const PolyScene: vue.DefineComponent<vue.ExtractPropTypes<{
370
429
  type: PropType<TextureQuality>;
371
430
  default: undefined;
372
431
  };
432
+ textureLeafSizing: {
433
+ type: PropType<PolyTextureLeafSizing>;
434
+ default: undefined;
435
+ };
436
+ textureImageRendering: {
437
+ type: PropType<PolyTextureImageRendering>;
438
+ default: undefined;
439
+ };
440
+ textureBackend: {
441
+ type: PropType<PolyTextureBackend>;
442
+ default: undefined;
443
+ };
444
+ textureProjection: {
445
+ type: PropType<PolyTextureProjection>;
446
+ default: undefined;
447
+ };
373
448
  seamBleed: {
374
449
  type: PropType<PolySeamBleed>;
375
450
  default: undefined;
@@ -413,10 +488,15 @@ declare const PolyScene: vue.DefineComponent<vue.ExtractPropTypes<{
413
488
  scale: number | Vec3;
414
489
  seamBleed: PolySeamBleed;
415
490
  textureLighting: PolyTextureLightingMode;
491
+ textureImageRendering: PolyTextureImageRendering;
416
492
  polygons: Polygon[];
417
493
  centerPolygons: Polygon[];
494
+ pointLights: PolyPointLight[];
418
495
  ambientLight: PolyAmbientLight;
419
496
  textureQuality: TextureQuality;
497
+ textureLeafSizing: PolyTextureLeafSizing;
498
+ textureBackend: PolyTextureBackend;
499
+ textureProjection: PolyTextureProjection;
420
500
  strategies: PolyRenderStrategiesOption;
421
501
  autoCenter: boolean;
422
502
  shadow: PolyShadowOptions;
@@ -496,6 +576,8 @@ interface PolyMeshHandle {
496
576
  * is always correct and never needs rebaking.
497
577
  */
498
578
  rebakeAtlas(): void;
579
+ /** Resolves when this mesh's current texture generation has usable backgrounds. */
580
+ whenTexturesReady(): Promise<void>;
499
581
  }
500
582
  interface PolyPointerEvent<E extends Event = PointerEvent> {
501
583
  object: PolyMeshHandle;
@@ -553,6 +635,14 @@ interface PolyMeshProps extends InteractionProps {
553
635
  * desktop/mobile sprite sizing. Numeric values 0.1..1 force an explicit
554
636
  * raster scale and the 64px sprite. */
555
637
  textureQuality?: TextureQuality;
638
+ /** Atlas leaf CSS primitive sizing. Defaults to scene context, then canonical. */
639
+ textureLeafSizing?: PolyTextureLeafSizing;
640
+ /** Default image filtering for atlas and direct image texture leaves. */
641
+ textureImageRendering?: PolyTextureImageRendering;
642
+ /** Default texture backend request. Defaults to scene context, then "auto". */
643
+ textureBackend?: PolyTextureBackend;
644
+ /** Default texture projection request. Defaults to scene context, then "affine". */
645
+ textureProjection?: PolyTextureProjection;
556
646
  /** Solid seam overscan. `"auto"` computes a fitted per-edge amount from the polygon plan. */
557
647
  seamBleed?: PolySeamBleed;
558
648
  /**
@@ -629,6 +719,22 @@ declare const PolyMesh: vue.DefineComponent<vue.ExtractPropTypes<{
629
719
  type: PropType<TextureQuality>;
630
720
  default: undefined;
631
721
  };
722
+ textureLeafSizing: {
723
+ type: PropType<PolyTextureLeafSizing>;
724
+ default: undefined;
725
+ };
726
+ textureImageRendering: {
727
+ type: PropType<PolyTextureImageRendering>;
728
+ default: undefined;
729
+ };
730
+ textureBackend: {
731
+ type: PropType<PolyTextureBackend>;
732
+ default: undefined;
733
+ };
734
+ textureProjection: {
735
+ type: PropType<PolyTextureProjection>;
736
+ default: undefined;
737
+ };
632
738
  seamBleed: {
633
739
  type: PropType<PolySeamBleed>;
634
740
  default: undefined;
@@ -649,6 +755,12 @@ declare const PolyMesh: vue.DefineComponent<vue.ExtractPropTypes<{
649
755
  type: PropType<boolean>;
650
756
  default: boolean;
651
757
  };
758
+ /** Per-mesh parametric-shadow detail override (scene `shadow.definition`
759
+ * when undefined). Only used when the scene's `shadow.parametric` is true. */
760
+ shadowDefinition: {
761
+ type: PropType<number>;
762
+ default: undefined;
763
+ };
652
764
  merge: {
653
765
  type: PropType<boolean>;
654
766
  default: boolean;
@@ -762,6 +874,22 @@ declare const PolyMesh: vue.DefineComponent<vue.ExtractPropTypes<{
762
874
  type: PropType<TextureQuality>;
763
875
  default: undefined;
764
876
  };
877
+ textureLeafSizing: {
878
+ type: PropType<PolyTextureLeafSizing>;
879
+ default: undefined;
880
+ };
881
+ textureImageRendering: {
882
+ type: PropType<PolyTextureImageRendering>;
883
+ default: undefined;
884
+ };
885
+ textureBackend: {
886
+ type: PropType<PolyTextureBackend>;
887
+ default: undefined;
888
+ };
889
+ textureProjection: {
890
+ type: PropType<PolyTextureProjection>;
891
+ default: undefined;
892
+ };
765
893
  seamBleed: {
766
894
  type: PropType<PolySeamBleed>;
767
895
  default: undefined;
@@ -782,6 +910,12 @@ declare const PolyMesh: vue.DefineComponent<vue.ExtractPropTypes<{
782
910
  type: PropType<boolean>;
783
911
  default: boolean;
784
912
  };
913
+ /** Per-mesh parametric-shadow detail override (scene `shadow.definition`
914
+ * when undefined). Only used when the scene's `shadow.parametric` is true. */
915
+ shadowDefinition: {
916
+ type: PropType<number>;
917
+ default: undefined;
918
+ };
785
919
  merge: {
786
920
  type: PropType<boolean>;
787
921
  default: boolean;
@@ -864,8 +998,12 @@ declare const PolyMesh: vue.DefineComponent<vue.ExtractPropTypes<{
864
998
  scale: number | Vec3;
865
999
  seamBleed: PolySeamBleed;
866
1000
  textureLighting: PolyTextureLightingMode;
1001
+ textureImageRendering: PolyTextureImageRendering;
867
1002
  polygons: Polygon[];
868
1003
  textureQuality: TextureQuality;
1004
+ textureLeafSizing: PolyTextureLeafSizing;
1005
+ textureBackend: PolyTextureBackend;
1006
+ textureProjection: PolyTextureProjection;
869
1007
  autoCenter: boolean;
870
1008
  rotation: Vec3;
871
1009
  voxelSource: _layoutit_polycss_core.PolyVoxelSource | undefined;
@@ -879,6 +1017,7 @@ declare const PolyMesh: vue.DefineComponent<vue.ExtractPropTypes<{
879
1017
  merge: boolean;
880
1018
  meshResolution: MeshResolution;
881
1019
  parseOptions: _layoutit_polycss_core.LoadMeshOptions;
1020
+ shadowDefinition: number;
882
1021
  onContextMenu: PolyEventHandler<MouseEvent>;
883
1022
  onDoubleClick: PolyEventHandler<MouseEvent>;
884
1023
  onPointerDown: PolyEventHandler<PointerEvent>;
@@ -1132,6 +1271,10 @@ interface PolyContext {
1132
1271
  directionalLight?: PolyDirectionalLight;
1133
1272
  textureLighting?: PolyTextureLightingMode;
1134
1273
  textureQuality?: TextureQuality;
1274
+ textureLeafSizing?: PolyTextureLeafSizing;
1275
+ textureImageRendering?: PolyTextureImageRendering;
1276
+ textureBackend?: PolyTextureBackend;
1277
+ textureProjection?: PolyTextureProjection;
1135
1278
  debugShowBackfaces?: boolean;
1136
1279
  [key: string]: unknown;
1137
1280
  }
@@ -1139,8 +1282,11 @@ interface PolyProps {
1139
1282
  vertices: Vec3[];
1140
1283
  color?: string;
1141
1284
  texture?: string;
1285
+ textureImageSource?: PolyTextureImageSource;
1286
+ texturePresentation?: PolyTexturePresentation;
1142
1287
  uvs?: Vec2[];
1143
1288
  data?: Record<string, string | number | boolean>;
1289
+ doubleSided?: boolean;
1144
1290
  /** Shared material. When set AND the polygon's UVs form an axis-aligned
1145
1291
  * rectangle, renders via `background-image` directly — no per-polygon
1146
1292
  * canvas rasterization. Falls back to the atlas path otherwise. */
@@ -1153,6 +1299,14 @@ interface PolyProps {
1153
1299
  /** Atlas bitmap budget and CSS sprite size. `"auto"` (default) uses a
1154
1300
  * device-appropriate memory budget and desktop/mobile sprite sizing. */
1155
1301
  textureQuality?: TextureQuality;
1302
+ /** Atlas leaf CSS primitive sizing. Defaults to scene context, then canonical. */
1303
+ textureLeafSizing?: PolyTextureLeafSizing;
1304
+ /** Default image filtering for atlas and direct image texture leaves. */
1305
+ textureImageRendering?: PolyTextureImageRendering;
1306
+ /** Default texture backend request. Defaults to scene context, then "auto". */
1307
+ textureBackend?: PolyTextureBackend;
1308
+ /** Default texture projection request. Defaults to scene context, then "affine". */
1309
+ textureProjection?: PolyTextureProjection;
1156
1310
  baseColor?: string;
1157
1311
  pointerEvents?: "auto" | "none";
1158
1312
  }
@@ -1167,6 +1321,14 @@ declare const Poly: vue.DefineComponent<vue.ExtractPropTypes<{
1167
1321
  texture: {
1168
1322
  type: StringConstructor;
1169
1323
  };
1324
+ textureImageSource: {
1325
+ type: PropType<PolyTextureImageSource>;
1326
+ default: undefined;
1327
+ };
1328
+ texturePresentation: {
1329
+ type: PropType<PolyTexturePresentation>;
1330
+ default: undefined;
1331
+ };
1170
1332
  uvs: {
1171
1333
  type: PropType<Vec2[]>;
1172
1334
  default: undefined;
@@ -1175,6 +1337,10 @@ declare const Poly: vue.DefineComponent<vue.ExtractPropTypes<{
1175
1337
  type: PropType<Record<string, string | number | boolean>>;
1176
1338
  default: undefined;
1177
1339
  };
1340
+ doubleSided: {
1341
+ type: BooleanConstructor;
1342
+ default: undefined;
1343
+ };
1178
1344
  material: {
1179
1345
  type: PropType<PolyMaterial>;
1180
1346
  default: undefined;
@@ -1199,6 +1365,22 @@ declare const Poly: vue.DefineComponent<vue.ExtractPropTypes<{
1199
1365
  type: PropType<TextureQuality>;
1200
1366
  default: undefined;
1201
1367
  };
1368
+ textureLeafSizing: {
1369
+ type: PropType<PolyTextureLeafSizing>;
1370
+ default: undefined;
1371
+ };
1372
+ textureImageRendering: {
1373
+ type: PropType<PolyTextureImageRendering>;
1374
+ default: undefined;
1375
+ };
1376
+ textureBackend: {
1377
+ type: PropType<PolyTextureBackend>;
1378
+ default: undefined;
1379
+ };
1380
+ textureProjection: {
1381
+ type: PropType<PolyTextureProjection>;
1382
+ default: undefined;
1383
+ };
1202
1384
  context: {
1203
1385
  type: PropType<PolyContext>;
1204
1386
  default: undefined;
@@ -1223,6 +1405,14 @@ declare const Poly: vue.DefineComponent<vue.ExtractPropTypes<{
1223
1405
  texture: {
1224
1406
  type: StringConstructor;
1225
1407
  };
1408
+ textureImageSource: {
1409
+ type: PropType<PolyTextureImageSource>;
1410
+ default: undefined;
1411
+ };
1412
+ texturePresentation: {
1413
+ type: PropType<PolyTexturePresentation>;
1414
+ default: undefined;
1415
+ };
1226
1416
  uvs: {
1227
1417
  type: PropType<Vec2[]>;
1228
1418
  default: undefined;
@@ -1231,6 +1421,10 @@ declare const Poly: vue.DefineComponent<vue.ExtractPropTypes<{
1231
1421
  type: PropType<Record<string, string | number | boolean>>;
1232
1422
  default: undefined;
1233
1423
  };
1424
+ doubleSided: {
1425
+ type: BooleanConstructor;
1426
+ default: undefined;
1427
+ };
1234
1428
  material: {
1235
1429
  type: PropType<PolyMaterial>;
1236
1430
  default: undefined;
@@ -1255,6 +1449,22 @@ declare const Poly: vue.DefineComponent<vue.ExtractPropTypes<{
1255
1449
  type: PropType<TextureQuality>;
1256
1450
  default: undefined;
1257
1451
  };
1452
+ textureLeafSizing: {
1453
+ type: PropType<PolyTextureLeafSizing>;
1454
+ default: undefined;
1455
+ };
1456
+ textureImageRendering: {
1457
+ type: PropType<PolyTextureImageRendering>;
1458
+ default: undefined;
1459
+ };
1460
+ textureBackend: {
1461
+ type: PropType<PolyTextureBackend>;
1462
+ default: undefined;
1463
+ };
1464
+ textureProjection: {
1465
+ type: PropType<PolyTextureProjection>;
1466
+ default: undefined;
1467
+ };
1258
1468
  context: {
1259
1469
  type: PropType<PolyContext>;
1260
1470
  default: undefined;
@@ -1269,12 +1479,19 @@ declare const Poly: vue.DefineComponent<vue.ExtractPropTypes<{
1269
1479
  }>> & Readonly<{}>, {
1270
1480
  data: Record<string, string | number | boolean>;
1271
1481
  position: Vec3;
1272
- pointerEvents: "auto" | "none";
1482
+ pointerEvents: "none" | "auto";
1273
1483
  scale: number | Vec3;
1274
1484
  material: PolyMaterial;
1485
+ textureImageSource: PolyTextureImageSource;
1486
+ texturePresentation: PolyTexturePresentation;
1275
1487
  uvs: Vec2[];
1488
+ doubleSided: boolean;
1276
1489
  textureLighting: PolyTextureLightingMode;
1490
+ textureImageRendering: PolyTextureImageRendering;
1277
1491
  textureQuality: TextureQuality;
1492
+ textureLeafSizing: PolyTextureLeafSizing;
1493
+ textureBackend: PolyTextureBackend;
1494
+ textureProjection: PolyTextureProjection;
1278
1495
  rotation: Vec3;
1279
1496
  context: PolyContext;
1280
1497
  }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
@@ -3051,11 +3268,84 @@ interface PolyRenderSurfaceLeafCounts {
3051
3268
  atlas: number;
3052
3269
  stableTriangle: number;
3053
3270
  }
3271
+ type PolyRenderLeafStrategy = keyof PolyRenderSurfaceLeafCounts;
3272
+ interface PolyTextureReadiness {
3273
+ ready: boolean;
3274
+ textureLeafCount: number;
3275
+ readyTextureLeafCount: number;
3276
+ pendingTextureLeafCount: number;
3277
+ atlasTextureLeafCount: number;
3278
+ imageTextureLeafCount: number;
3279
+ }
3280
+ interface PolyTextureRenderStats {
3281
+ ready: boolean;
3282
+ leafCount: number;
3283
+ atlasCount: number;
3284
+ imageCount: number;
3285
+ pendingCount: number;
3286
+ sizingCounts: {
3287
+ canonical: number;
3288
+ local: number;
3289
+ raster: number;
3290
+ image: number;
3291
+ unknown: number;
3292
+ };
3293
+ imageRenderingCounts: {
3294
+ auto: number;
3295
+ pixelated: number;
3296
+ unknown: number;
3297
+ };
3298
+ projectionCounts: {
3299
+ affine: number;
3300
+ projective: number;
3301
+ fallback: number;
3302
+ unknown: number;
3303
+ };
3304
+ minLeafWidth: number;
3305
+ maxLeafWidth: number;
3306
+ minLeafHeight: number;
3307
+ maxLeafHeight: number;
3308
+ doubleSidedCount: number;
3309
+ }
3310
+ interface PolySnapshotRenderStats {
3311
+ runtimeAtlasUrlCount: number;
3312
+ snapshotAtlasCount: number;
3313
+ snapshotBackgroundCount: number;
3314
+ selfContained: boolean;
3315
+ }
3316
+ interface PolyCameraSnapshotStats {
3317
+ rootFound: boolean;
3318
+ projection: "orthographic" | "perspective" | "unknown";
3319
+ perspectiveStyle: string;
3320
+ appliedPerspectiveStyle: string;
3321
+ zoom?: number;
3322
+ distance?: number;
3323
+ rotX?: number;
3324
+ rotY?: number;
3325
+ target?: [number, number, number];
3326
+ }
3327
+ interface PolyLeafInfo {
3328
+ element: HTMLElement;
3329
+ strategy: PolyRenderLeafStrategy;
3330
+ polygonIndex?: number;
3331
+ textureBackend?: string;
3332
+ textureReady?: boolean;
3333
+ textureLeafSizing?: string;
3334
+ textureImageRendering?: string;
3335
+ textureProjection?: string;
3336
+ textureLeafWidth?: number;
3337
+ textureLeafHeight?: number;
3338
+ doubleSided?: boolean;
3339
+ }
3054
3340
  interface PolyRenderStats {
3055
3341
  polygonCount: number;
3056
3342
  mountedPolygonLeafCount: number;
3057
3343
  shadowLeafCount: number;
3058
3344
  surfaceLeafCounts: PolyRenderSurfaceLeafCounts;
3345
+ textureReadiness: PolyTextureReadiness;
3346
+ textureStats: PolyTextureRenderStats;
3347
+ snapshotStats: PolySnapshotRenderStats;
3348
+ cameraStats: PolyCameraSnapshotStats;
3059
3349
  bucketCount: number;
3060
3350
  }
3061
3351
  interface PolyRenderStatsOptions {
@@ -3066,6 +3356,8 @@ interface PolyRenderStatsOptions {
3066
3356
  */
3067
3357
  scopeSelector?: string;
3068
3358
  }
3359
+ declare function queryPolyLeaves(root: ParentNode | null | undefined, optionsOrPolygonCount?: number | PolyRenderStatsOptions): PolyLeafInfo[];
3360
+ declare function collectPolyTextureReadiness(root: ParentNode | null | undefined, optionsOrPolygonCount?: number | PolyRenderStatsOptions): PolyTextureReadiness;
3069
3361
  declare function collectPolyRenderStats(root: ParentNode | null | undefined, optionsOrPolygonCount?: number | PolyRenderStatsOptions): PolyRenderStats;
3070
3362
 
3071
3363
  interface UsePolyAnimationResultVue {
@@ -3085,4 +3377,4 @@ interface UsePolyAnimationResultVue {
3085
3377
  }
3086
3378
  declare function usePolyAnimation(clips: MaybeRef<PolyAnimationClip[] | undefined>, controller: MaybeRef<ParseAnimationController | undefined>, root?: MaybeRef<PolyAnimationTarget | null | undefined>): UsePolyAnimationResultVue;
3087
3379
 
3088
- export { type InteractionProps, Poly, PolyAxesHelper, type PolyAxesHelperProps, PolyBox, type PolyBoxProps, PolyOrthographicCamera as PolyCamera, PolyCameraContextKey, type PolyCameraContextValue, type PolyOrthographicCameraProps as PolyCameraProps, PolyCone, type PolyConeProps, type PolyContext, type PolyControlsAnimateOptions, PolyCylinder, type PolyCylinderProps, PolyDirectionalLightHelper, type PolyDirectionalLightHelperProps, PolyDodecahedron, type PolyDodecahedronProps, type PolyEventHandler, PolyFirstPersonControls, type PolyFirstPersonControlsHandle, type PolyFirstPersonControlsOptions, PolyGround, type PolyGroundProps, PolyIcosahedron, type PolyIcosahedronProps, PolyIframe, type PolyIframeProps, PolyMapControls, type PolyMapControlsCamera, type PolyMapControlsProps, PolyMesh, type PolyMeshHandle, type PolyMeshProps, type PolyMouseEvent, PolyOctahedron, type PolyOctahedronProps, PolyOrbitControls, type PolyOrbitControlsCamera, type PolyOrbitControlsProps, PolyOrthographicCamera, type PolyOrthographicCameraProps, PolyPerspectiveCamera, type PolyPerspectiveCameraProps, PolyPlane, type PolyPlaneProps, type PolyPointerEvent, type PolyProps, type PolyRenderStats, type PolyRenderStatsOptions, type PolyRenderSurfaceLeafCounts, PolyRing, type PolyRingProps, PolyScene, type PolySceneProps, PolySelect, type PolySelectProps, type PolySelectionApi, PolySelectionContextKey, PolySphere, type PolySphereProps, PolyTetrahedron, type PolyTetrahedronProps, PolyTorus, type PolyTorusProps, PolyTransformControls, type PolyTransformControlsObject, type PolyTransformControlsObjectChangeEvent, type PolyTransformControlsProps, type PolyWheelEvent, type UseCameraOptions, type UseCameraResult, type UseMeshOptions, type UseMeshResult, type UsePolyAnimationResultVue, type UseSceneContextOptions, type UseSceneContextResult, collectPolyRenderStats, findMeshUnderPoint, findPolyMeshHandle, injectPolyBaseStyles, pointInMeshElement, usePolyAnimation, usePolyCamera, usePolyMaterial, usePolyMesh, usePolySceneContext, usePolySelect, usePolySelectionApi };
3380
+ export { type InteractionProps, Poly, PolyAxesHelper, type PolyAxesHelperProps, PolyBox, type PolyBoxProps, PolyOrthographicCamera as PolyCamera, PolyCameraContextKey, type PolyCameraContextValue, type PolyOrthographicCameraProps as PolyCameraProps, type PolyCameraSnapshotStats, PolyCone, type PolyConeProps, type PolyContext, type PolyControlsAnimateOptions, PolyCylinder, type PolyCylinderProps, PolyDirectionalLightHelper, type PolyDirectionalLightHelperProps, PolyDodecahedron, type PolyDodecahedronProps, type PolyEventHandler, PolyFirstPersonControls, type PolyFirstPersonControlsHandle, type PolyFirstPersonControlsOptions, PolyGround, type PolyGroundProps, PolyIcosahedron, type PolyIcosahedronProps, PolyIframe, type PolyIframeProps, type PolyLeafInfo, PolyMapControls, type PolyMapControlsCamera, type PolyMapControlsProps, PolyMesh, type PolyMeshHandle, type PolyMeshProps, type PolyMouseEvent, PolyOctahedron, type PolyOctahedronProps, PolyOrbitControls, type PolyOrbitControlsCamera, type PolyOrbitControlsProps, PolyOrthographicCamera, type PolyOrthographicCameraProps, PolyPerspectiveCamera, type PolyPerspectiveCameraProps, PolyPlane, type PolyPlaneProps, type PolyPointerEvent, type PolyProps, type PolyRenderLeafStrategy, type PolyRenderStats, type PolyRenderStatsOptions, type PolyRenderSurfaceLeafCounts, PolyRing, type PolyRingProps, PolyScene, type PolySceneProps, PolySelect, type PolySelectProps, type PolySelectionApi, PolySelectionContextKey, type PolySnapshotRenderStats, PolySphere, type PolySphereProps, PolyTetrahedron, type PolyTetrahedronProps, type PolyTextureReadiness, type PolyTextureRenderStats, PolyTorus, type PolyTorusProps, PolyTransformControls, type PolyTransformControlsObject, type PolyTransformControlsObjectChangeEvent, type PolyTransformControlsProps, type PolyWheelEvent, type UseCameraOptions, type UseCameraResult, type UseMeshOptions, type UseMeshResult, type UsePolyAnimationResultVue, type UseSceneContextOptions, type UseSceneContextResult, collectPolyRenderStats, collectPolyTextureReadiness, findMeshUnderPoint, findPolyMeshHandle, injectPolyBaseStyles, pointInMeshElement, queryPolyLeaves, usePolyAnimation, usePolyCamera, usePolyMaterial, usePolyMesh, usePolySceneContext, usePolySelect, usePolySelectionApi };