@glyphcss/react 0.0.4 → 0.0.5

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.cjs CHANGED
@@ -541,6 +541,7 @@ function GlyphPerspectiveCameraInner({
541
541
  rotX,
542
542
  rotY,
543
543
  distance,
544
+ perspective,
544
545
  zoom,
545
546
  stretch,
546
547
  center,
@@ -555,6 +556,7 @@ function GlyphPerspectiveCameraInner({
555
556
  if (rotX !== void 0) opts.rotX = rotX;
556
557
  if (rotY !== void 0) opts.rotY = rotY;
557
558
  if (distance !== void 0) opts.distance = distance;
559
+ if (perspective !== void 0) opts.perspective = perspective;
558
560
  if (zoom !== void 0) opts.zoom = zoom;
559
561
  if (stretch !== void 0) opts.stretch = stretch;
560
562
  if (center !== void 0) opts.center = center;
@@ -576,6 +578,10 @@ function GlyphPerspectiveCameraInner({
576
578
  camera.distance = distance;
577
579
  dirty = true;
578
580
  }
581
+ if (perspective !== void 0 && camera.perspective !== perspective) {
582
+ camera.perspective = perspective;
583
+ dirty = true;
584
+ }
579
585
  if (zoom !== void 0 && camera.zoom !== zoom) {
580
586
  camera.zoom = zoom;
581
587
  dirty = true;
package/dist/index.d.cts CHANGED
@@ -166,6 +166,9 @@ interface GlyphPerspectiveCameraProps {
166
166
  rotY?: number;
167
167
  /** Perspective distance (world units). Default 6. */
168
168
  distance?: number;
169
+ /** CSS-perspective distance in virtual pixels (matches voxcss). Larger =
170
+ * flatter. Default 32000. Set 0 to disable (legacy orbit projection). */
171
+ perspective?: number;
169
172
  /** Camera zoom — absolute px per world unit (zoom=1 → BASE_TILE=50). Default 0.65. */
170
173
  zoom?: number;
171
174
  /** Extra horizontal stretch on top of cellAspect. Default 1.0. */
@@ -176,7 +179,7 @@ interface GlyphPerspectiveCameraProps {
176
179
  style?: CSSProperties;
177
180
  children?: ReactNode;
178
181
  }
179
- declare function GlyphPerspectiveCameraInner({ rotX, rotY, distance, zoom, stretch, center, className, style, children, }: GlyphPerspectiveCameraProps): react_jsx_runtime.JSX.Element;
182
+ declare function GlyphPerspectiveCameraInner({ rotX, rotY, distance, perspective, zoom, stretch, center, className, style, children, }: GlyphPerspectiveCameraProps): react_jsx_runtime.JSX.Element;
180
183
  declare const GlyphPerspectiveCamera: react.MemoExoticComponent<typeof GlyphPerspectiveCameraInner>;
181
184
 
182
185
  interface GlyphCameraContextValue {
package/dist/index.d.ts CHANGED
@@ -166,6 +166,9 @@ interface GlyphPerspectiveCameraProps {
166
166
  rotY?: number;
167
167
  /** Perspective distance (world units). Default 6. */
168
168
  distance?: number;
169
+ /** CSS-perspective distance in virtual pixels (matches voxcss). Larger =
170
+ * flatter. Default 32000. Set 0 to disable (legacy orbit projection). */
171
+ perspective?: number;
169
172
  /** Camera zoom — absolute px per world unit (zoom=1 → BASE_TILE=50). Default 0.65. */
170
173
  zoom?: number;
171
174
  /** Extra horizontal stretch on top of cellAspect. Default 1.0. */
@@ -176,7 +179,7 @@ interface GlyphPerspectiveCameraProps {
176
179
  style?: CSSProperties;
177
180
  children?: ReactNode;
178
181
  }
179
- declare function GlyphPerspectiveCameraInner({ rotX, rotY, distance, zoom, stretch, center, className, style, children, }: GlyphPerspectiveCameraProps): react_jsx_runtime.JSX.Element;
182
+ declare function GlyphPerspectiveCameraInner({ rotX, rotY, distance, perspective, zoom, stretch, center, className, style, children, }: GlyphPerspectiveCameraProps): react_jsx_runtime.JSX.Element;
180
183
  declare const GlyphPerspectiveCamera: react.MemoExoticComponent<typeof GlyphPerspectiveCameraInner>;
181
184
 
182
185
  interface GlyphCameraContextValue {
package/dist/index.js CHANGED
@@ -497,6 +497,7 @@ function GlyphPerspectiveCameraInner({
497
497
  rotX,
498
498
  rotY,
499
499
  distance,
500
+ perspective,
500
501
  zoom,
501
502
  stretch,
502
503
  center,
@@ -511,6 +512,7 @@ function GlyphPerspectiveCameraInner({
511
512
  if (rotX !== void 0) opts.rotX = rotX;
512
513
  if (rotY !== void 0) opts.rotY = rotY;
513
514
  if (distance !== void 0) opts.distance = distance;
515
+ if (perspective !== void 0) opts.perspective = perspective;
514
516
  if (zoom !== void 0) opts.zoom = zoom;
515
517
  if (stretch !== void 0) opts.stretch = stretch;
516
518
  if (center !== void 0) opts.center = center;
@@ -532,6 +534,10 @@ function GlyphPerspectiveCameraInner({
532
534
  camera.distance = distance;
533
535
  dirty = true;
534
536
  }
537
+ if (perspective !== void 0 && camera.perspective !== perspective) {
538
+ camera.perspective = perspective;
539
+ dirty = true;
540
+ }
535
541
  if (zoom !== void 0 && camera.zoom !== zoom) {
536
542
  camera.zoom = zoom;
537
543
  dirty = true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glyphcss/react",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "description": "React components for the glyphcss ASCII polygon mesh rendering engine",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -40,8 +40,8 @@
40
40
  "access": "public"
41
41
  },
42
42
  "dependencies": {
43
- "@glyphcss/core": "^0.0.4",
44
- "glyphcss": "^0.0.4"
43
+ "@glyphcss/core": "^0.0.5",
44
+ "glyphcss": "^0.0.5"
45
45
  },
46
46
  "peerDependencies": {
47
47
  "react": "^18.0.0 || ^19.0.0",