@layoutit/polycss-vue 0.2.1 → 0.2.3

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.ts CHANGED
@@ -1,7 +1,8 @@
1
1
  import * as vue from 'vue';
2
- import { PropType, Ref, InjectionKey, VNode, ComputedRef, MaybeRef } from 'vue';
3
- import { Vec3, CameraState, CameraHandle, Polygon, PolyDirectionalLight, PolyAmbientLight, PolyTextureLightingMode, TextureQuality, PolySeamBleed, PolyRenderStrategiesOption, MeshResolution, LoadMeshOptions, ParseResult, PolyMaterial, Vec2, PolyAnimationTarget, PolyAnimationMixer, PolyAnimationClip, PolyAnimationAction, ParseAnimationController } from '@layoutit/polycss-core';
4
- 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, OptimizeMeshPolygonsOptions, ParseAnimationClip, ParseAnimationController, ParseResult, ParsedColor, PlanePolygonsOptions, PolyAmbientLight, PolyAnimationAction, PolyAnimationClip, PolyAnimationMixer, PolyAnimationTarget, PolyDirectionalLight, PolyMaterial, PolyRenderStrategiesOption, PolyRenderStrategy, PolyTextureLightingMode, Polygon, PolygonFace, RingPolygonsOptions, SceneBbox, SceneContext, SceneContextBuildArgs, SceneContextBuildResult, SeamFacetSplitCandidate, SeamFacetSplitCandidateReason, SeamFacetSplitOptions, SeamFacetSplitReport, SeamOverlapCandidate, SeamOverlapCandidateKind, SeamOverlapDiagnostics, SeamOverlapOptions, SolidTextureSampleOptions, TetrahedronPolygonsOptions, TexturePaintMetrics, TexturePaintMetricsOptions, TextureTriangle, TorusPolygonsOptions, VOXEL_CAMERA_CULL_AXIS_EPS, VOXEL_CAMERA_CULL_NORMAL_LIMIT, Vec2, Vec3, VoxParseOptions, arrowPolygons, axesHelperPolygons, bakeSolidTextureSampledPolygons, bakeSolidTextureSamples, boxPolygons, 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, optimizeMeshPolygons, parseColor, parseGltf, parseHexColor, parseMtl, parseObj, parsePureColor, parseRgbColor, parseVox, planePolygons, polygonCssSurfaceNormal, polygonFaces, polygonFacesCamera, repairMeshSeams, ringPolygons, rotateVec3, seamFacetSplitPolygons, seamFacetSplitReport, seamOverlapDiagnostics, seamOverlapPolygons, seamOverlapReport, shadeColor, tetrahedronPolygons, torusPolygons } from '@layoutit/polycss-core';
2
+ import { PropType, Ref, InjectionKey, VNode, CSSProperties, ComputedRef, MaybeRef } from 'vue';
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, 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, 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, polygonCssSurfaceNormal, polygonFaces, polygonFacesCamera, repairMeshSeams, ringPolygons, rotateVec3, seamFacetSplitPolygons, seamFacetSplitReport, seamOverlapDiagnostics, seamOverlapPolygons, seamOverlapReport, shadeColor, simplifyTriangleMeshPolygons, tetrahedronPolygons, torusPolygons, worldDirectionToCss as worldDirectionToPolyCss, worldPositionToCss as worldPositionToPolyCss } from '@layoutit/polycss-core';
5
6
 
6
7
  interface PolyOrthographicCameraProps {
7
8
  zoom?: number;
@@ -61,7 +62,7 @@ interface PolyPerspectiveCameraProps {
61
62
  rotY?: number;
62
63
  /** Camera pull-back in CSS pixels (dolly). Default 0. */
63
64
  distance?: number;
64
- /** CSS perspective distance in pixels. Defaults to 8000. */
65
+ /** CSS perspective distance in pixels. Defaults to 32000. */
65
66
  perspective?: number;
66
67
  class?: string;
67
68
  }
@@ -218,6 +219,7 @@ interface PolyShadowOptions {
218
219
 
219
220
  interface PolySceneProps {
220
221
  polygons?: Polygon[];
222
+ centerPolygons?: Polygon[];
221
223
  perspective?: number;
222
224
  rotX?: number;
223
225
  rotY?: number;
@@ -243,10 +245,9 @@ interface PolySceneProps {
243
245
  autoCenter?: boolean;
244
246
  /**
245
247
  * Shadow appearance for meshes with `castShadow: true`. Works in both
246
- * lighting modes dynamic mode projects via CSS vars so shadows
247
- * follow a moving light, baked mode CPU-bakes the projection into
248
- * each leaf's inline `matrix3d` and drops back-facing polys from the
249
- * DOM entirely. Defaults: `{ color: "#000000", opacity: 0.25, lift: 0.05, maxExtend: 2000 }`.
248
+ * lighting modes. Shadows emit as SVG paths and reproject when light,
249
+ * ground, or mesh geometry changes. Defaults:
250
+ * `{ color: "#000000", opacity: 0.25, lift: 0.05, maxExtend: 2000 }`.
250
251
  */
251
252
  shadow?: PolyShadowOptions;
252
253
  class?: string;
@@ -261,6 +262,10 @@ declare const PolyScene: vue.DefineComponent<vue.ExtractPropTypes<{
261
262
  type: PropType<Polygon[]>;
262
263
  default: undefined;
263
264
  };
265
+ centerPolygons: {
266
+ type: PropType<Polygon[]>;
267
+ default: undefined;
268
+ };
264
269
  perspective: {
265
270
  type: NumberConstructor;
266
271
  };
@@ -333,6 +338,10 @@ declare const PolyScene: vue.DefineComponent<vue.ExtractPropTypes<{
333
338
  type: PropType<Polygon[]>;
334
339
  default: undefined;
335
340
  };
341
+ centerPolygons: {
342
+ type: PropType<Polygon[]>;
343
+ default: undefined;
344
+ };
336
345
  perspective: {
337
346
  type: NumberConstructor;
338
347
  };
@@ -400,13 +409,14 @@ declare const PolyScene: vue.DefineComponent<vue.ExtractPropTypes<{
400
409
  };
401
410
  }>> & Readonly<{}>, {
402
411
  directionalLight: PolyDirectionalLight;
403
- textureLighting: PolyTextureLightingMode;
404
412
  position: Vec3;
405
413
  scale: number | Vec3;
414
+ seamBleed: PolySeamBleed;
415
+ textureLighting: PolyTextureLightingMode;
406
416
  polygons: Polygon[];
417
+ centerPolygons: Polygon[];
407
418
  ambientLight: PolyAmbientLight;
408
419
  textureQuality: TextureQuality;
409
- seamBleed: PolySeamBleed;
410
420
  strategies: PolyRenderStrategiesOption;
411
421
  autoCenter: boolean;
412
422
  shadow: PolyShadowOptions;
@@ -415,6 +425,18 @@ declare const PolyScene: vue.DefineComponent<vue.ExtractPropTypes<{
415
425
  debugShowBackfaces: boolean;
416
426
  }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
417
427
 
428
+ type UseMeshOptions = LoadMeshOptions;
429
+ interface UseMeshResult {
430
+ polygons: Ref<Polygon[]>;
431
+ voxelSource: Ref<ParseResult["voxelSource"]>;
432
+ loading: Ref<boolean>;
433
+ error: Ref<Error | null>;
434
+ warnings: Ref<string[]>;
435
+ /** Manually trigger cleanup (also called on unmount automatically). */
436
+ dispose: () => void;
437
+ }
438
+ declare function usePolyMesh(src: Ref<string>, options?: UseMeshOptions): UseMeshResult;
439
+
418
440
  /**
419
441
  * Pointer event API for `<PolyMesh>` (Vue). Mirrors @react-three/fiber's
420
442
  * mesh event surface (handler names + payload shape) so devs migrating
@@ -534,16 +556,38 @@ interface PolyMeshProps extends InteractionProps {
534
556
  /** Solid seam overscan. `"auto"` computes a fitted per-edge amount from the polygon plan. */
535
557
  seamBleed?: PolySeamBleed;
536
558
  /**
537
- * When `true` and the scene is in dynamic lighting mode, the renderer emits
538
- * a flat shadow leaf sibling for each non-duplicate polygon. The shadow is
539
- * projected onto the ground plane along the CSS-space light direction.
559
+ * Hold the previous frame until the next atlas is decoded, then swap
560
+ * atomically. Best for discrete geometry edits where a partial texture
561
+ * frame would be visible.
562
+ */
563
+ atomicAtlas?: boolean;
564
+ /** Fires when the displayed atlas frame swaps to a ready one in atomic mode. */
565
+ onFrameReady?: () => void;
566
+ /**
567
+ * When `true`, emits a per-mesh SVG shadow path in both lighting modes.
568
+ * Each casting polygon projects onto the scene ground plane along the
569
+ * directional light; overlapping outlines are merged into one silhouette.
540
570
  * Defaults to `false`.
541
571
  */
542
572
  castShadow?: boolean;
573
+ /**
574
+ * When `true`, this mesh acts as a shadow receiver. The scene's caster
575
+ * meshes (those with `castShadow=true`) project per-coplanar-face SVG
576
+ * shadows onto each visible surface, matching Three.js's `mesh.receiveShadow`
577
+ * semantics. Disables the ground-shadow fallback when at least one
578
+ * receiver exists. Defaults to `false`.
579
+ */
580
+ receiveShadow?: boolean;
581
+ /** Apply mesh optimization (coplanar merge + interior cull) before
582
+ * rendering. Defaults to `true` — matches vanilla `scene.add`. Set
583
+ * `false` for helper meshes whose geometry shouldn't be merged. */
584
+ merge?: boolean;
543
585
  /** Mesh optimization intent. Defaults to "lossy"; set "lossless" to keep
544
586
  * authored surface fidelity. Top-level prop wins over any meshResolution
545
587
  * that might be set inside parseOptions. */
546
588
  meshResolution?: MeshResolution;
589
+ /** Parser options forwarded to parseObj/parseGltf/parseVox. */
590
+ parseOptions?: UseMeshOptions;
547
591
  class?: string;
548
592
  position?: Vec3;
549
593
  scale?: number | Vec3;
@@ -566,6 +610,13 @@ declare const PolyMesh: vue.DefineComponent<vue.ExtractPropTypes<{
566
610
  type: PropType<Polygon[]>;
567
611
  default: undefined;
568
612
  };
613
+ /** Optional `parseResult.voxelSource` companion for `.vox` meshes. When
614
+ * set alongside `polygons`, the direct voxel renderer fast path
615
+ * activates — mirrors vanilla's `scene.add(parseResult)` behaviour. */
616
+ voxelSource: {
617
+ type: PropType<_layoutit_polycss_core.ParseResult["voxelSource"]>;
618
+ default: undefined;
619
+ };
569
620
  autoCenter: {
570
621
  type: BooleanConstructor;
571
622
  default: boolean;
@@ -582,14 +633,34 @@ declare const PolyMesh: vue.DefineComponent<vue.ExtractPropTypes<{
582
633
  type: PropType<PolySeamBleed>;
583
634
  default: undefined;
584
635
  };
636
+ atomicAtlas: {
637
+ type: PropType<boolean>;
638
+ default: boolean;
639
+ };
640
+ onFrameReady: {
641
+ type: PropType<() => void>;
642
+ default: undefined;
643
+ };
585
644
  castShadow: {
586
645
  type: PropType<boolean>;
587
646
  default: boolean;
588
647
  };
648
+ receiveShadow: {
649
+ type: PropType<boolean>;
650
+ default: boolean;
651
+ };
652
+ merge: {
653
+ type: PropType<boolean>;
654
+ default: boolean;
655
+ };
589
656
  meshResolution: {
590
657
  type: PropType<MeshResolution>;
591
658
  default: undefined;
592
659
  };
660
+ parseOptions: {
661
+ type: PropType<UseMeshOptions>;
662
+ default: undefined;
663
+ };
593
664
  class: {
594
665
  type: StringConstructor;
595
666
  };
@@ -672,6 +743,13 @@ declare const PolyMesh: vue.DefineComponent<vue.ExtractPropTypes<{
672
743
  type: PropType<Polygon[]>;
673
744
  default: undefined;
674
745
  };
746
+ /** Optional `parseResult.voxelSource` companion for `.vox` meshes. When
747
+ * set alongside `polygons`, the direct voxel renderer fast path
748
+ * activates — mirrors vanilla's `scene.add(parseResult)` behaviour. */
749
+ voxelSource: {
750
+ type: PropType<_layoutit_polycss_core.ParseResult["voxelSource"]>;
751
+ default: undefined;
752
+ };
675
753
  autoCenter: {
676
754
  type: BooleanConstructor;
677
755
  default: boolean;
@@ -688,14 +766,34 @@ declare const PolyMesh: vue.DefineComponent<vue.ExtractPropTypes<{
688
766
  type: PropType<PolySeamBleed>;
689
767
  default: undefined;
690
768
  };
769
+ atomicAtlas: {
770
+ type: PropType<boolean>;
771
+ default: boolean;
772
+ };
773
+ onFrameReady: {
774
+ type: PropType<() => void>;
775
+ default: undefined;
776
+ };
691
777
  castShadow: {
692
778
  type: PropType<boolean>;
693
779
  default: boolean;
694
780
  };
781
+ receiveShadow: {
782
+ type: PropType<boolean>;
783
+ default: boolean;
784
+ };
785
+ merge: {
786
+ type: PropType<boolean>;
787
+ default: boolean;
788
+ };
695
789
  meshResolution: {
696
790
  type: PropType<MeshResolution>;
697
791
  default: undefined;
698
792
  };
793
+ parseOptions: {
794
+ type: PropType<UseMeshOptions>;
795
+ default: undefined;
796
+ };
699
797
  class: {
700
798
  type: StringConstructor;
701
799
  };
@@ -762,19 +860,25 @@ declare const PolyMesh: vue.DefineComponent<vue.ExtractPropTypes<{
762
860
  }>> & Readonly<{}>, {
763
861
  onClick: PolyEventHandler<MouseEvent>;
764
862
  onWheel: PolyEventHandler<WheelEvent>;
765
- textureLighting: PolyTextureLightingMode;
766
863
  position: Vec3;
767
864
  scale: number | Vec3;
865
+ seamBleed: PolySeamBleed;
866
+ textureLighting: PolyTextureLightingMode;
768
867
  polygons: Polygon[];
769
868
  textureQuality: TextureQuality;
770
- seamBleed: PolySeamBleed;
771
869
  autoCenter: boolean;
772
870
  rotation: Vec3;
871
+ voxelSource: _layoutit_polycss_core.PolyVoxelSource | undefined;
773
872
  id: string;
774
873
  src: string;
775
874
  mtl: string;
875
+ atomicAtlas: boolean;
876
+ onFrameReady: () => void;
776
877
  castShadow: boolean;
878
+ receiveShadow: boolean;
879
+ merge: boolean;
777
880
  meshResolution: MeshResolution;
881
+ parseOptions: _layoutit_polycss_core.LoadMeshOptions;
778
882
  onContextMenu: PolyEventHandler<MouseEvent>;
779
883
  onDoubleClick: PolyEventHandler<MouseEvent>;
780
884
  onPointerDown: PolyEventHandler<PointerEvent>;
@@ -787,6 +891,142 @@ declare const PolyMesh: vue.DefineComponent<vue.ExtractPropTypes<{
787
891
  onPointerCancel: PolyEventHandler<PointerEvent>;
788
892
  }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
789
893
 
894
+ interface PolyIframeProps {
895
+ src: string;
896
+ width: number;
897
+ height: number;
898
+ position?: Vec3;
899
+ rotation?: Vec3;
900
+ scale?: number | Vec3;
901
+ allow?: string;
902
+ sandbox?: string;
903
+ loading?: "lazy" | "eager";
904
+ referrerpolicy?: string;
905
+ title?: string;
906
+ class?: string;
907
+ style?: CSSProperties;
908
+ }
909
+ declare const PolyIframe: vue.DefineComponent<vue.ExtractPropTypes<{
910
+ src: {
911
+ type: StringConstructor;
912
+ required: true;
913
+ };
914
+ width: {
915
+ type: NumberConstructor;
916
+ required: true;
917
+ };
918
+ height: {
919
+ type: NumberConstructor;
920
+ required: true;
921
+ };
922
+ position: {
923
+ type: PropType<Vec3>;
924
+ default: undefined;
925
+ };
926
+ rotation: {
927
+ type: PropType<Vec3>;
928
+ default: undefined;
929
+ };
930
+ scale: {
931
+ type: PropType<number | Vec3>;
932
+ default: undefined;
933
+ };
934
+ allow: {
935
+ type: StringConstructor;
936
+ default: undefined;
937
+ };
938
+ sandbox: {
939
+ type: StringConstructor;
940
+ default: undefined;
941
+ };
942
+ loading: {
943
+ type: PropType<"lazy" | "eager">;
944
+ default: undefined;
945
+ };
946
+ referrerpolicy: {
947
+ type: StringConstructor;
948
+ default: undefined;
949
+ };
950
+ title: {
951
+ type: StringConstructor;
952
+ default: undefined;
953
+ };
954
+ class: {
955
+ type: StringConstructor;
956
+ default: undefined;
957
+ };
958
+ style: {
959
+ type: PropType<CSSProperties>;
960
+ default: undefined;
961
+ };
962
+ }>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
963
+ [key: string]: any;
964
+ }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
965
+ src: {
966
+ type: StringConstructor;
967
+ required: true;
968
+ };
969
+ width: {
970
+ type: NumberConstructor;
971
+ required: true;
972
+ };
973
+ height: {
974
+ type: NumberConstructor;
975
+ required: true;
976
+ };
977
+ position: {
978
+ type: PropType<Vec3>;
979
+ default: undefined;
980
+ };
981
+ rotation: {
982
+ type: PropType<Vec3>;
983
+ default: undefined;
984
+ };
985
+ scale: {
986
+ type: PropType<number | Vec3>;
987
+ default: undefined;
988
+ };
989
+ allow: {
990
+ type: StringConstructor;
991
+ default: undefined;
992
+ };
993
+ sandbox: {
994
+ type: StringConstructor;
995
+ default: undefined;
996
+ };
997
+ loading: {
998
+ type: PropType<"lazy" | "eager">;
999
+ default: undefined;
1000
+ };
1001
+ referrerpolicy: {
1002
+ type: StringConstructor;
1003
+ default: undefined;
1004
+ };
1005
+ title: {
1006
+ type: StringConstructor;
1007
+ default: undefined;
1008
+ };
1009
+ class: {
1010
+ type: StringConstructor;
1011
+ default: undefined;
1012
+ };
1013
+ style: {
1014
+ type: PropType<CSSProperties>;
1015
+ default: undefined;
1016
+ };
1017
+ }>> & Readonly<{}>, {
1018
+ class: string;
1019
+ style: CSSProperties;
1020
+ title: string;
1021
+ position: Vec3;
1022
+ scale: number | Vec3;
1023
+ rotation: Vec3;
1024
+ allow: string;
1025
+ sandbox: string;
1026
+ loading: "eager" | "lazy";
1027
+ referrerpolicy: string;
1028
+ }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
1029
+
790
1030
  interface PolyGroundProps {
791
1031
  /** Side length of the ground quad in world units. Default `6`. */
792
1032
  size?: number;
@@ -794,8 +1034,8 @@ interface PolyGroundProps {
794
1034
  z?: number;
795
1035
  /** World-space XY center. Default `[0, 0]`. */
796
1036
  center?: [number, number];
797
- /** Fill color. Default `#7d848e` — medium gray, chosen so 25% black `<q>`
798
- * shadow leaves on top have visible contrast against it. */
1037
+ /** Fill color. Default `#7d848e` — medium gray, chosen so the default
1038
+ * 25% black SVG shadow has visible contrast against it. */
799
1039
  color?: string;
800
1040
  class?: string;
801
1041
  }
@@ -845,9 +1085,9 @@ declare const PolyGround: vue.DefineComponent<vue.ExtractPropTypes<{
845
1085
  };
846
1086
  }>> & Readonly<{}>, {
847
1087
  class: string;
848
- color: string;
849
1088
  size: number;
850
1089
  center: [number, number];
1090
+ color: string;
851
1091
  z: number;
852
1092
  }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
853
1093
 
@@ -870,18 +1110,6 @@ interface UseSceneContextResult {
870
1110
  */
871
1111
  declare function usePolySceneContext(polygons: Ref<Polygon[]>, options: Ref<UseSceneContextOptions>): Ref<UseSceneContextResult>;
872
1112
 
873
- type UseMeshOptions = LoadMeshOptions;
874
- interface UseMeshResult {
875
- polygons: Ref<Polygon[]>;
876
- voxelSource: Ref<ParseResult["voxelSource"]>;
877
- loading: Ref<boolean>;
878
- error: Ref<Error | null>;
879
- warnings: Ref<string[]>;
880
- /** Manually trigger cleanup (also called on unmount automatically). */
881
- dispose: () => void;
882
- }
883
- declare function usePolyMesh(src: Ref<string>, options?: UseMeshOptions): UseMeshResult;
884
-
885
1113
  /**
886
1114
  * usePolyMaterial — Vue composable that returns a stable computed material
887
1115
  * handle. Accepts either a plain options object or a reactive getter so that
@@ -1040,17 +1268,20 @@ declare const Poly: vue.DefineComponent<vue.ExtractPropTypes<{
1040
1268
  };
1041
1269
  }>> & Readonly<{}>, {
1042
1270
  data: Record<string, string | number | boolean>;
1043
- pointerEvents: "none" | "auto";
1044
- textureLighting: PolyTextureLightingMode;
1045
1271
  position: Vec3;
1272
+ pointerEvents: "auto" | "none";
1046
1273
  scale: number | Vec3;
1047
- textureQuality: TextureQuality;
1048
- rotation: Vec3;
1049
1274
  material: PolyMaterial;
1050
1275
  uvs: Vec2[];
1276
+ textureLighting: PolyTextureLightingMode;
1277
+ textureQuality: TextureQuality;
1278
+ rotation: Vec3;
1051
1279
  context: PolyContext;
1052
1280
  }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
1053
1281
 
1282
+ type ShapeMeshProps = Omit<PolyMeshProps, "polygons" | "src" | "mtl">;
1283
+ interface PolyBoxProps extends ShapeMeshProps, BoxPolygonsOptions {
1284
+ }
1054
1285
  declare const PolyBox: vue.DefineComponent<vue.ExtractPropTypes<{
1055
1286
  size: {
1056
1287
  type: PropType<number | Vec3>;
@@ -1076,6 +1307,22 @@ declare const PolyBox: vue.DefineComponent<vue.ExtractPropTypes<{
1076
1307
  type: StringConstructor;
1077
1308
  default: undefined;
1078
1309
  };
1310
+ material: {
1311
+ type: PropType<PolyMaterial>;
1312
+ default: undefined;
1313
+ };
1314
+ uvs: {
1315
+ type: PropType<Vec2[]>;
1316
+ default: undefined;
1317
+ };
1318
+ data: {
1319
+ type: PropType<BoxPolygonsOptions["data"]>;
1320
+ default: undefined;
1321
+ };
1322
+ faces: {
1323
+ type: PropType<BoxPolygonsOptions["faces"]>;
1324
+ default: undefined;
1325
+ };
1079
1326
  position: {
1080
1327
  type: PropType<Vec3>;
1081
1328
  default: undefined;
@@ -1123,6 +1370,22 @@ declare const PolyBox: vue.DefineComponent<vue.ExtractPropTypes<{
1123
1370
  type: StringConstructor;
1124
1371
  default: undefined;
1125
1372
  };
1373
+ material: {
1374
+ type: PropType<PolyMaterial>;
1375
+ default: undefined;
1376
+ };
1377
+ uvs: {
1378
+ type: PropType<Vec2[]>;
1379
+ default: undefined;
1380
+ };
1381
+ data: {
1382
+ type: PropType<BoxPolygonsOptions["data"]>;
1383
+ default: undefined;
1384
+ };
1385
+ faces: {
1386
+ type: PropType<BoxPolygonsOptions["faces"]>;
1387
+ default: undefined;
1388
+ };
1126
1389
  position: {
1127
1390
  type: PropType<Vec3>;
1128
1391
  default: undefined;
@@ -1144,18 +1407,24 @@ declare const PolyBox: vue.DefineComponent<vue.ExtractPropTypes<{
1144
1407
  default: undefined;
1145
1408
  };
1146
1409
  }>> & Readonly<{}>, {
1147
- color: string;
1410
+ data: Record<string, string | number | boolean> | undefined;
1148
1411
  size: number | Vec3;
1149
1412
  center: Vec3;
1413
+ color: string;
1150
1414
  position: Vec3;
1151
1415
  scale: number | Vec3;
1416
+ texture: string;
1417
+ material: PolyMaterial;
1418
+ uvs: Vec2[];
1152
1419
  autoCenter: boolean;
1153
1420
  rotation: Vec3;
1154
- texture: string;
1155
1421
  id: string;
1422
+ faces: Partial<Record<_layoutit_polycss_core.BoxFace, false | _layoutit_polycss_core.BoxFaceOptions>> | undefined;
1156
1423
  min: Vec3;
1157
1424
  max: Vec3;
1158
1425
  }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
1426
+ interface PolyPlaneProps extends ShapeMeshProps, PlanePolygonsOptions {
1427
+ }
1159
1428
  declare const PolyPlane: vue.DefineComponent<vue.ExtractPropTypes<{
1160
1429
  axis: {
1161
1430
  type: PropType<0 | 1 | 2>;
@@ -1165,6 +1434,10 @@ declare const PolyPlane: vue.DefineComponent<vue.ExtractPropTypes<{
1165
1434
  type: NumberConstructor;
1166
1435
  default: undefined;
1167
1436
  };
1437
+ offset: {
1438
+ type: PropType<number | [number, number]>;
1439
+ default: undefined;
1440
+ };
1168
1441
  along: {
1169
1442
  type: NumberConstructor;
1170
1443
  default: undefined;
@@ -1204,6 +1477,10 @@ declare const PolyPlane: vue.DefineComponent<vue.ExtractPropTypes<{
1204
1477
  type: NumberConstructor;
1205
1478
  default: undefined;
1206
1479
  };
1480
+ offset: {
1481
+ type: PropType<number | [number, number]>;
1482
+ default: undefined;
1483
+ };
1207
1484
  along: {
1208
1485
  type: NumberConstructor;
1209
1486
  default: undefined;
@@ -1233,15 +1510,18 @@ declare const PolyPlane: vue.DefineComponent<vue.ExtractPropTypes<{
1233
1510
  default: undefined;
1234
1511
  };
1235
1512
  }>> & Readonly<{}>, {
1236
- color: string;
1237
1513
  size: number;
1514
+ color: string;
1238
1515
  position: Vec3;
1239
1516
  scale: number | Vec3;
1517
+ offset: number | [number, number];
1240
1518
  autoCenter: boolean;
1241
1519
  rotation: Vec3;
1242
1520
  id: string;
1243
1521
  along: number;
1244
1522
  }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
1523
+ interface PolyRingProps extends ShapeMeshProps, RingPolygonsOptions {
1524
+ }
1245
1525
  declare const PolyRing: vue.DefineComponent<vue.ExtractPropTypes<{
1246
1526
  axis: {
1247
1527
  type: PropType<0 | 1 | 2>;
@@ -1336,6 +1616,8 @@ declare const PolyRing: vue.DefineComponent<vue.ExtractPropTypes<{
1336
1616
  halfThickness: number;
1337
1617
  segments: number;
1338
1618
  }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
1619
+ interface PolyOctahedronProps extends ShapeMeshProps, OctahedronPolygonsOptions {
1620
+ }
1339
1621
  declare const PolyOctahedron: vue.DefineComponent<vue.ExtractPropTypes<{
1340
1622
  center: {
1341
1623
  type: PropType<Vec3>;
@@ -1412,6 +1694,8 @@ declare const PolyOctahedron: vue.DefineComponent<vue.ExtractPropTypes<{
1412
1694
  rotation: Vec3;
1413
1695
  id: string;
1414
1696
  }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
1697
+ interface PolyTetrahedronProps extends ShapeMeshProps, TetrahedronPolygonsOptions {
1698
+ }
1415
1699
  declare const PolyTetrahedron: vue.DefineComponent<vue.ExtractPropTypes<{
1416
1700
  size: {
1417
1701
  type: NumberConstructor;
@@ -1473,14 +1757,16 @@ declare const PolyTetrahedron: vue.DefineComponent<vue.ExtractPropTypes<{
1473
1757
  default: undefined;
1474
1758
  };
1475
1759
  }>> & Readonly<{}>, {
1476
- color: string;
1477
1760
  size: number;
1761
+ color: string;
1478
1762
  position: Vec3;
1479
1763
  scale: number | Vec3;
1480
1764
  autoCenter: boolean;
1481
1765
  rotation: Vec3;
1482
1766
  id: string;
1483
1767
  }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
1768
+ interface PolyIcosahedronProps extends ShapeMeshProps, IcosahedronPolygonsOptions {
1769
+ }
1484
1770
  declare const PolyIcosahedron: vue.DefineComponent<vue.ExtractPropTypes<{
1485
1771
  size: {
1486
1772
  type: NumberConstructor;
@@ -1542,14 +1828,16 @@ declare const PolyIcosahedron: vue.DefineComponent<vue.ExtractPropTypes<{
1542
1828
  default: undefined;
1543
1829
  };
1544
1830
  }>> & Readonly<{}>, {
1545
- color: string;
1546
1831
  size: number;
1832
+ color: string;
1547
1833
  position: Vec3;
1548
1834
  scale: number | Vec3;
1549
1835
  autoCenter: boolean;
1550
1836
  rotation: Vec3;
1551
1837
  id: string;
1552
1838
  }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
1839
+ interface PolyDodecahedronProps extends ShapeMeshProps, DodecahedronPolygonsOptions {
1840
+ }
1553
1841
  declare const PolyDodecahedron: vue.DefineComponent<vue.ExtractPropTypes<{
1554
1842
  size: {
1555
1843
  type: NumberConstructor;
@@ -1611,14 +1899,16 @@ declare const PolyDodecahedron: vue.DefineComponent<vue.ExtractPropTypes<{
1611
1899
  default: undefined;
1612
1900
  };
1613
1901
  }>> & Readonly<{}>, {
1614
- color: string;
1615
1902
  size: number;
1903
+ color: string;
1616
1904
  position: Vec3;
1617
1905
  scale: number | Vec3;
1618
1906
  autoCenter: boolean;
1619
1907
  rotation: Vec3;
1620
1908
  id: string;
1621
1909
  }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
1910
+ interface PolySphereProps extends ShapeMeshProps, SpherePolygonsOptions {
1911
+ }
1622
1912
  declare const PolySphere: vue.DefineComponent<vue.ExtractPropTypes<{
1623
1913
  radius: {
1624
1914
  type: NumberConstructor;
@@ -1697,6 +1987,8 @@ declare const PolySphere: vue.DefineComponent<vue.ExtractPropTypes<{
1697
1987
  radius: number;
1698
1988
  subdivisions: number;
1699
1989
  }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
1990
+ interface PolyCylinderProps extends ShapeMeshProps, CylinderPolygonsOptions {
1991
+ }
1700
1992
  declare const PolyCylinder: vue.DefineComponent<vue.ExtractPropTypes<{
1701
1993
  radius: {
1702
1994
  type: NumberConstructor;
@@ -1782,8 +2074,8 @@ declare const PolyCylinder: vue.DefineComponent<vue.ExtractPropTypes<{
1782
2074
  default: undefined;
1783
2075
  };
1784
2076
  }>> & Readonly<{}>, {
1785
- color: string;
1786
2077
  height: number;
2078
+ color: string;
1787
2079
  position: Vec3;
1788
2080
  scale: number | Vec3;
1789
2081
  autoCenter: boolean;
@@ -1793,6 +2085,8 @@ declare const PolyCylinder: vue.DefineComponent<vue.ExtractPropTypes<{
1793
2085
  radiusTop: number;
1794
2086
  radialSegments: number;
1795
2087
  }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
2088
+ interface PolyConeProps extends ShapeMeshProps, ConePolygonsOptions {
2089
+ }
1796
2090
  declare const PolyCone: vue.DefineComponent<vue.ExtractPropTypes<{
1797
2091
  radius: {
1798
2092
  type: NumberConstructor;
@@ -1870,8 +2164,8 @@ declare const PolyCone: vue.DefineComponent<vue.ExtractPropTypes<{
1870
2164
  default: undefined;
1871
2165
  };
1872
2166
  }>> & Readonly<{}>, {
1873
- color: string;
1874
2167
  height: number;
2168
+ color: string;
1875
2169
  position: Vec3;
1876
2170
  scale: number | Vec3;
1877
2171
  autoCenter: boolean;
@@ -1880,6 +2174,8 @@ declare const PolyCone: vue.DefineComponent<vue.ExtractPropTypes<{
1880
2174
  radius: number;
1881
2175
  radialSegments: number;
1882
2176
  }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
2177
+ interface PolyTorusProps extends ShapeMeshProps, TorusPolygonsOptions {
2178
+ }
1883
2179
  declare const PolyTorus: vue.DefineComponent<vue.ExtractPropTypes<{
1884
2180
  radius: {
1885
2181
  type: NumberConstructor;
@@ -2743,8 +3039,8 @@ declare const PolyDirectionalLightHelper: vue.DefineComponent<vue.ExtractPropTyp
2743
3039
  }>> & Readonly<{}>, {
2744
3040
  target: Vec3;
2745
3041
  distance: number;
2746
- color: string;
2747
3042
  size: number;
3043
+ color: string;
2748
3044
  }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
2749
3045
 
2750
3046
  declare function injectPolyBaseStyles(doc?: Document): void;
@@ -2789,4 +3085,4 @@ interface UsePolyAnimationResultVue {
2789
3085
  }
2790
3086
  declare function usePolyAnimation(clips: MaybeRef<PolyAnimationClip[] | undefined>, controller: MaybeRef<ParseAnimationController | undefined>, root?: MaybeRef<PolyAnimationTarget | null | undefined>): UsePolyAnimationResultVue;
2791
3087
 
2792
- export { type InteractionProps, Poly, PolyAxesHelper, type PolyAxesHelperProps, PolyBox, PolyOrthographicCamera as PolyCamera, PolyCameraContextKey, type PolyCameraContextValue, type PolyOrthographicCameraProps as PolyCameraProps, PolyCone, type PolyContext, type PolyControlsAnimateOptions, PolyCylinder, PolyDirectionalLightHelper, type PolyDirectionalLightHelperProps, PolyDodecahedron, type PolyEventHandler, PolyFirstPersonControls, type PolyFirstPersonControlsHandle, type PolyFirstPersonControlsOptions, PolyGround, type PolyGroundProps, PolyIcosahedron, PolyMapControls, type PolyMapControlsCamera, type PolyMapControlsProps, PolyMesh, type PolyMeshHandle, type PolyMeshProps, type PolyMouseEvent, PolyOctahedron, PolyOrbitControls, type PolyOrbitControlsCamera, type PolyOrbitControlsProps, PolyOrthographicCamera, type PolyOrthographicCameraProps, PolyPerspectiveCamera, type PolyPerspectiveCameraProps, PolyPlane, type PolyPointerEvent, type PolyProps, type PolyRenderStats, type PolyRenderStatsOptions, type PolyRenderSurfaceLeafCounts, PolyRing, PolyScene, type PolySceneProps, PolySelect, type PolySelectProps, type PolySelectionApi, PolySelectionContextKey, PolySphere, PolyTetrahedron, PolyTorus, 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 };
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 };