@mappedin/blue-dot 6.0.1-beta.54 → 6.0.1-beta.55
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/lib/esm/index.d.ts +33 -16
- package/lib/esm/index.js +1 -1
- package/package.json +2 -2
package/lib/esm/index.d.ts
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
// ../blue-dot/@packages/internal/common
|
|
4
4
|
// ../blue-dot/@mappedin/mappedin-js
|
|
5
5
|
// ../blue-dot/three
|
|
6
|
-
// ../blue-dot/zod
|
|
7
6
|
// ../blue-dot/type-fest
|
|
8
7
|
|
|
9
8
|
declare module '@mappedin/blue-dot' {
|
|
@@ -284,6 +283,11 @@ declare module '@mappedin/blue-dot/blue-dot/src/types' {
|
|
|
284
283
|
* @default false
|
|
285
284
|
*/
|
|
286
285
|
debug?: boolean;
|
|
286
|
+
/**
|
|
287
|
+
* The maximum acceptable accuracy in meters. Position updates with accuracy exceeding this value will be dropped.
|
|
288
|
+
* @default 50
|
|
289
|
+
*/
|
|
290
|
+
accuracyThreshold?: number;
|
|
287
291
|
};
|
|
288
292
|
/**
|
|
289
293
|
* Position update options for the {@link BlueDot.update} method.
|
|
@@ -442,10 +446,9 @@ declare module '@mappedin/blue-dot/packages/common/utils' {
|
|
|
442
446
|
end: number;
|
|
443
447
|
};
|
|
444
448
|
export function isFiniteBox(box: Box2 | Box3): boolean;
|
|
445
|
-
export
|
|
446
|
-
export
|
|
449
|
+
export { clampWithWarning } from '@mappedin/blue-dot/packages/common/math-utils';
|
|
450
|
+
export { arraysEqual } from '@mappedin/blue-dot/packages/common/array-utils';
|
|
447
451
|
export function isBrowser(): boolean;
|
|
448
|
-
export {};
|
|
449
452
|
}
|
|
450
453
|
|
|
451
454
|
declare module '@mappedin/blue-dot/packages/common/async' {
|
|
@@ -524,11 +527,6 @@ declare module '@mappedin/blue-dot/packages/common/pubsub' {
|
|
|
524
527
|
* @template EVENT - The type of the event.
|
|
525
528
|
*/
|
|
526
529
|
export class PubSub<EVENT_PAYLOAD, EVENT extends keyof EVENT_PAYLOAD = keyof EVENT_PAYLOAD> {
|
|
527
|
-
/**
|
|
528
|
-
* @private
|
|
529
|
-
* @internal
|
|
530
|
-
*/
|
|
531
|
-
_subscribers: any;
|
|
532
530
|
/**
|
|
533
531
|
* @private
|
|
534
532
|
* @internal
|
|
@@ -649,19 +647,24 @@ declare module '@mappedin/blue-dot/packages/common/color' {
|
|
|
649
647
|
}
|
|
650
648
|
|
|
651
649
|
declare module '@mappedin/blue-dot/packages/common/interpolate' {
|
|
652
|
-
|
|
653
|
-
export
|
|
654
|
-
|
|
650
|
+
export const EASING_CURVES: readonly ["ease-in", "ease-out", "ease-in-out", "linear"];
|
|
651
|
+
export type EasingCurve = (typeof EASING_CURVES)[number];
|
|
652
|
+
/**
|
|
653
|
+
* Validates if a value is a valid easing curve
|
|
654
|
+
* @param value The value to validate
|
|
655
|
+
* @returns True if the value is a valid easing curve
|
|
656
|
+
*/
|
|
657
|
+
export function isValidEasingCurve(value: unknown): value is EasingCurve;
|
|
655
658
|
export const linearEase: (t: number) => number;
|
|
656
659
|
export const quadEaseIn: (t: number) => number;
|
|
657
660
|
export const easeIn: (x: number) => number;
|
|
658
661
|
export const quadEaseOut: (t: number) => number;
|
|
659
662
|
export function interpolate(value: number, inputMin: number, inputMax: number, outputMin: number, outputMax: number, easeFunc?: EasingCurve | ((t: number) => number)): number;
|
|
660
663
|
/**
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
664
|
+
* Return the closest range within an ordered set of values that a given value falls within. If the given value is
|
|
665
|
+
* exactly within a range, returns the index of the range. If the given value is less than the first value in the range,
|
|
666
|
+
* returns 0. If the given value is greater than the last value in the range, returns the last range (lastIndex - 1).
|
|
667
|
+
*/
|
|
665
668
|
export function getInterpolationBreakpoint(value: number, range: number[]): number;
|
|
666
669
|
export function interpolateMulti(value: number, inputRange: number[], outputRange: number[], easeFunc?: EasingCurve | ((t: number) => number)): number;
|
|
667
670
|
}
|
|
@@ -704,3 +707,17 @@ declare module '@mappedin/blue-dot/packages/common/type-utils' {
|
|
|
704
707
|
export {};
|
|
705
708
|
}
|
|
706
709
|
|
|
710
|
+
declare module '@mappedin/blue-dot/packages/common/math-utils' {
|
|
711
|
+
/**
|
|
712
|
+
* Clamp a number between lower and upper bounds with a warning
|
|
713
|
+
*/
|
|
714
|
+
export function clampWithWarning(x: number, lower: number, upper: number, warning: string): number;
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
declare module '@mappedin/blue-dot/packages/common/array-utils' {
|
|
718
|
+
/**
|
|
719
|
+
* Compare two arrays for equality
|
|
720
|
+
*/
|
|
721
|
+
export function arraysEqual(arr1: any[] | null | undefined, arr2: any[] | null | undefined): boolean;
|
|
722
|
+
}
|
|
723
|
+
|