manim-web 0.14.0 → 0.15.0

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.
@@ -0,0 +1,122 @@
1
+ import { Group } from '../../core/Group';
2
+ import { Vector3Tuple } from '../../core/Mobject';
3
+ import { Sphere } from '../three-d/Sphere';
4
+ import { TexturedSurface } from '../three-d/TexturedSurface';
5
+ import { Dot3D } from '../three-d/ThreeDExtensions';
6
+ import { Polygon } from '../geometry/Polygon';
7
+ /** A `[latitude, longitude]` pair in decimal degrees. */
8
+ export type LatLon = [number, number];
9
+ /** Options for a {@link Globe}. */
10
+ export interface GlobeOptions {
11
+ /** Sphere radius. Default: 1. */
12
+ radius?: number;
13
+ /** Center position `[x, y, z]`. Default: `[0, 0, 0]`. */
14
+ center?: Vector3Tuple;
15
+ /** Texture image URL. When set, the globe uses a textured sphere. */
16
+ textureUrl?: string;
17
+ /** Optional dark/night texture URL, blended by light direction. */
18
+ darkTextureUrl?: string;
19
+ /** Sphere color when untextured. Default: '#2a6f97'. */
20
+ color?: string;
21
+ /** Opacity from 0 to 1. Default: 1. */
22
+ opacity?: number;
23
+ /** Sphere mesh resolution. Default: 64. */
24
+ resolution?: number;
25
+ }
26
+ /** Options for a plotted point marker. */
27
+ export interface GlobePointOptions {
28
+ /** Marker radius in scene units. Default: radius * 0.03. */
29
+ size?: number;
30
+ /** Marker color. Default: '#ffd166'. */
31
+ color?: string;
32
+ }
33
+ /** Options for a great-circle arc. */
34
+ export interface GlobeArcOptions {
35
+ /** Number of segments along the arc. Default: 64. */
36
+ segments?: number;
37
+ /** Line color. Default: '#ef476f'. */
38
+ color?: string;
39
+ /** Line width in pixels. Default: 2. */
40
+ lineWidth?: number;
41
+ /** Fraction of the sphere radius to lift the arc off the surface. Default: 0. */
42
+ altitude?: number;
43
+ }
44
+ /** Options for a graticule (lat/long grid). */
45
+ export interface GlobeGraticuleOptions {
46
+ /** Spacing between parallels in degrees. Default: 30. */
47
+ latStep?: number;
48
+ /** Spacing between meridians in degrees. Default: 30. */
49
+ lonStep?: number;
50
+ /** Samples per grid line. Default: 48. */
51
+ segments?: number;
52
+ /** Line color. Default: '#8d99ae'. */
53
+ color?: string;
54
+ /** Line width in pixels. Default: 1. */
55
+ lineWidth?: number;
56
+ }
57
+ /**
58
+ * Globe - a 3D sphere with geographic plotting helpers.
59
+ *
60
+ * @example
61
+ * ```typescript
62
+ * const globe = new Globe({ radius: 2, textureUrl: '/textures/earth.jpg' });
63
+ * globe.plotPoint(48.85, 2.35); // Paris
64
+ * globe.arc([48.85, 2.35], [40.71, -74.0]); // Paris -> New York
65
+ * globe.graticule({ latStep: 30, lonStep: 30 });
66
+ * scene.add(globe);
67
+ * ```
68
+ */
69
+ export declare class Globe extends Group {
70
+ private _radius;
71
+ private _center;
72
+ private _sphere;
73
+ private _plottedPoints;
74
+ constructor(options?: GlobeOptions);
75
+ /** Get the underlying sphere mobject (plain or textured). */
76
+ getSphere(): Sphere | TexturedSurface;
77
+ /** Get the sphere radius. */
78
+ getRadius(): number;
79
+ /**
80
+ * Convert a latitude/longitude (degrees) to a point on the sphere surface,
81
+ * in scene coordinates (center offset included).
82
+ *
83
+ * @param lat - Latitude in degrees (north positive).
84
+ * @param lon - Longitude in degrees (east positive).
85
+ * @returns The `[x, y, z]` surface point.
86
+ */
87
+ latLonToPoint(lat: number, lon: number): Vector3Tuple;
88
+ /**
89
+ * Plot a marker at a latitude/longitude. The marker is added as a child so it
90
+ * transforms with the globe.
91
+ *
92
+ * @param lat - Latitude in degrees.
93
+ * @param lon - Longitude in degrees.
94
+ * @param options - Marker size and color.
95
+ * @returns The created {@link Dot3D} marker.
96
+ */
97
+ plotPoint(lat: number, lon: number, options?: GlobePointOptions): Dot3D;
98
+ /** Get the markers added via {@link plotPoint}. */
99
+ getPlottedPoints(): Dot3D[];
100
+ /**
101
+ * Draw the great-circle (shortest-path) arc between two lat/long points. The
102
+ * arc is sampled with spherical linear interpolation, so every vertex lies on
103
+ * the sphere. The arc is added as a child.
104
+ *
105
+ * @param from - Start `[lat, lon]` in degrees.
106
+ * @param to - End `[lat, lon]` in degrees.
107
+ * @param options - Segment count, color, width and optional altitude.
108
+ * @returns The created {@link Polygon} polyline.
109
+ */
110
+ arc(from: LatLon, to: LatLon, options?: GlobeArcOptions): Polygon;
111
+ /**
112
+ * Build a graticule (lat/long grid) as a group of polylines, added as a
113
+ * child. Meridians run pole to pole; parallels circle the globe.
114
+ *
115
+ * @param options - Grid spacing, resolution and style.
116
+ * @returns The created {@link Group} of grid lines.
117
+ */
118
+ graticule(options?: GlobeGraticuleOptions): Group;
119
+ private _gridLine;
120
+ private _surfacePoint;
121
+ }
122
+ //# sourceMappingURL=Globe.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Globe.d.ts","sourceRoot":"","sources":["../../../src/mobjects/geo/Globe.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAkB,MAAM,4BAA4B,CAAC;AAC7E,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAI9C,yDAAyD;AACzD,MAAM,MAAM,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAEtC,mCAAmC;AACnC,MAAM,WAAW,YAAY;IAC3B,iCAAiC;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,yDAAyD;IACzD,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,qEAAqE;IACrE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,mEAAmE;IACnE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,wDAAwD;IACxD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uCAAuC;IACvC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,2CAA2C;IAC3C,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,0CAA0C;AAC1C,MAAM,WAAW,iBAAiB;IAChC,4DAA4D;IAC5D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,wCAAwC;IACxC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,sCAAsC;AACtC,MAAM,WAAW,eAAe;IAC9B,qDAAqD;IACrD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,sCAAsC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wCAAwC;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iFAAiF;IACjF,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,+CAA+C;AAC/C,MAAM,WAAW,qBAAqB;IACpC,yDAAyD;IACzD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,yDAAyD;IACzD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,0CAA0C;IAC1C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,sCAAsC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wCAAwC;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;GAWG;AACH,qBAAa,KAAM,SAAQ,KAAK;IAC9B,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,OAAO,CAAe;IAC9B,OAAO,CAAC,OAAO,CAA2B;IAC1C,OAAO,CAAC,cAAc,CAAe;gBAEzB,OAAO,GAAE,YAAiB;IA+BtC,6DAA6D;IAC7D,SAAS,IAAI,MAAM,GAAG,eAAe;IAIrC,6BAA6B;IAC7B,SAAS,IAAI,MAAM;IAInB;;;;;;;OAOG;IACH,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,YAAY;IAIrD;;;;;;;;OAQG;IACH,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,GAAE,iBAAsB,GAAG,KAAK;IAQ3E,mDAAmD;IACnD,gBAAgB,IAAI,KAAK,EAAE;IAI3B;;;;;;;;;OASG;IACH,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,OAAO,GAAE,eAAoB,GAAG,OAAO;IA0BrE;;;;;;OAMG;IACH,SAAS,CAAC,OAAO,GAAE,qBAA0B,GAAG,KAAK;IAiBrD,OAAO,CAAC,SAAS;IAKjB,OAAO,CAAC,aAAa;CAQtB"}
@@ -0,0 +1,45 @@
1
+ /**
2
+ * A sequential color scale: maps a numeric value in a domain to a color by
3
+ * sampling a gradient built from reference colors.
4
+ *
5
+ * Reuses {@link colorGradient} (the same helper behind
6
+ * `VMobject.setColorByGradient`) so choropleth colors match the rest of the
7
+ * library. Values are normalized over the domain, clamped to `[0, 1]`, and
8
+ * indexed into a pre-sampled palette.
9
+ */
10
+ /** Options for a {@link ColorScale}. */
11
+ export interface ColorScaleOptions {
12
+ /** Reference colors to interpolate (at least one). Default: a blue ramp. */
13
+ colors?: string[];
14
+ /** Value domain `[min, max]`. Default: `[0, 1]`, or set from data later. */
15
+ domain?: [number, number];
16
+ /** Number of palette samples. Higher is smoother. Default: 256. */
17
+ samples?: number;
18
+ }
19
+ /**
20
+ * Maps numeric values to `#rrggbb` colors across a domain.
21
+ */
22
+ export declare class ColorScale {
23
+ private _palette;
24
+ private _domain;
25
+ constructor(options?: ColorScaleOptions);
26
+ /**
27
+ * Set the domain from a list of values (its min and max). Non-finite values
28
+ * are ignored. Leaves the domain unchanged when no finite value is present.
29
+ *
30
+ * @param values - The data values.
31
+ * @returns this for chaining.
32
+ */
33
+ setDomainFromValues(values: number[]): this;
34
+ /** Get the current domain `[min, max]`. */
35
+ getDomain(): [number, number];
36
+ /**
37
+ * Map a value to a color. Values outside the domain clamp to the endpoints.
38
+ * A zero-width domain maps everything to the first palette color.
39
+ *
40
+ * @param value - The value to map.
41
+ * @returns A `#rrggbb` color string.
42
+ */
43
+ colorFor(value: number): string;
44
+ }
45
+ //# sourceMappingURL=colorScale.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"colorScale.d.ts","sourceRoot":"","sources":["../../../src/mobjects/geo/colorScale.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAOH,wCAAwC;AACxC,MAAM,WAAW,iBAAiB;IAChC,4EAA4E;IAC5E,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,4EAA4E;IAC5E,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1B,mEAAmE;IACnE,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,qBAAa,UAAU;IACrB,OAAO,CAAC,QAAQ,CAAW;IAC3B,OAAO,CAAC,OAAO,CAAmB;gBAEtB,OAAO,GAAE,iBAAsB;IAO3C;;;;;;OAMG;IACH,mBAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI;IAc3C,2CAA2C;IAC3C,SAAS,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC;IAI7B;;;;;;OAMG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;CAQhC"}
@@ -0,0 +1,54 @@
1
+ /**
2
+ * Minimal GeoJSON type definitions (RFC 7946 subset) for the geo module.
3
+ *
4
+ * Only the pieces the choropleth map needs are modeled: positions, Polygon and
5
+ * MultiPolygon geometries, features and feature collections. Typing these
6
+ * precisely avoids `any` while keeping the dependency surface at zero (no
7
+ * `@types/geojson` needed).
8
+ */
9
+ /**
10
+ * A single coordinate as `[longitude, latitude]` in decimal degrees. A third
11
+ * altitude element is allowed by the spec and ignored by this module.
12
+ */
13
+ export type GeoPosition = [number, number] | [number, number, number];
14
+ /** A linear ring: an array of positions. The first ring of a polygon is its
15
+ * exterior; any further rings are holes (not punched out in V1). */
16
+ export type GeoLinearRing = GeoPosition[];
17
+ /** A Polygon geometry: an array of linear rings (exterior first). */
18
+ export interface GeoPolygon {
19
+ type: 'Polygon';
20
+ coordinates: GeoLinearRing[];
21
+ }
22
+ /** A MultiPolygon geometry: an array of polygons. */
23
+ export interface GeoMultiPolygon {
24
+ type: 'MultiPolygon';
25
+ coordinates: GeoLinearRing[][];
26
+ }
27
+ /** The geometry types this module renders. */
28
+ export type GeoGeometry = GeoPolygon | GeoMultiPolygon;
29
+ /** Arbitrary per-feature properties. */
30
+ export type GeoProperties = Record<string, unknown> | null;
31
+ /** A GeoJSON Feature carrying a polygonal geometry and properties. */
32
+ export interface GeoFeature {
33
+ type: 'Feature';
34
+ geometry: GeoGeometry;
35
+ properties?: GeoProperties;
36
+ id?: string | number;
37
+ }
38
+ /** A GeoJSON FeatureCollection. */
39
+ export interface GeoFeatureCollection {
40
+ type: 'FeatureCollection';
41
+ features: GeoFeature[];
42
+ }
43
+ /**
44
+ * Return the exterior rings of a feature's geometry.
45
+ *
46
+ * A Polygon yields its first ring. A MultiPolygon yields the first ring of each
47
+ * contained polygon. Interior rings (holes) are dropped: the choropleth fills
48
+ * exterior rings only in V1.
49
+ *
50
+ * @param geometry - The feature geometry.
51
+ * @returns One linear ring per exterior boundary.
52
+ */
53
+ export declare function exteriorRings(geometry: GeoGeometry): GeoLinearRing[];
54
+ //# sourceMappingURL=geojson.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"geojson.d.ts","sourceRoot":"","sources":["../../../src/mobjects/geo/geojson.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAEtE;oEACoE;AACpE,MAAM,MAAM,aAAa,GAAG,WAAW,EAAE,CAAC;AAE1C,qEAAqE;AACrE,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,SAAS,CAAC;IAChB,WAAW,EAAE,aAAa,EAAE,CAAC;CAC9B;AAED,qDAAqD;AACrD,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,cAAc,CAAC;IACrB,WAAW,EAAE,aAAa,EAAE,EAAE,CAAC;CAChC;AAED,8CAA8C;AAC9C,MAAM,MAAM,WAAW,GAAG,UAAU,GAAG,eAAe,CAAC;AAEvD,wCAAwC;AACxC,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;AAE3D,sEAAsE;AACtE,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,SAAS,CAAC;IAChB,QAAQ,EAAE,WAAW,CAAC;IACtB,UAAU,CAAC,EAAE,aAAa,CAAC;IAC3B,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACtB;AAED,mCAAmC;AACnC,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,mBAAmB,CAAC;IAC1B,QAAQ,EAAE,UAAU,EAAE,CAAC;CACxB;AAED;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,WAAW,GAAG,aAAa,EAAE,CAWpE"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Geographical maps module for manim-web.
3
+ *
4
+ * Provides a 2D choropleth map ({@link ChoroplethMap}) and a 3D globe
5
+ * ({@link Globe}) built from GeoJSON. See each class for coordinate
6
+ * conventions and covered projections.
7
+ */
8
+ export { exteriorRings, type GeoPosition, type GeoLinearRing, type GeoPolygon, type GeoMultiPolygon, type GeoGeometry, type GeoProperties, type GeoFeature, type GeoFeatureCollection, } from './geojson';
9
+ export { equirectangular, mercator, type GeoProjection, type EquirectangularOptions, type MercatorOptions, } from './projections';
10
+ export { ColorScale, type ColorScaleOptions } from './colorScale';
11
+ export { ChoroplethMap, GeoMap, type ChoroplethMapOptions, type ChoroplethValueAccessor, } from './ChoroplethMap';
12
+ export { Globe, type LatLon, type GlobeOptions, type GlobePointOptions, type GlobeArcOptions, type GlobeGraticuleOptions, } from './Globe';
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/mobjects/geo/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EACL,aAAa,EACb,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,UAAU,EACf,KAAK,oBAAoB,GAC1B,MAAM,WAAW,CAAC;AAGnB,OAAO,EACL,eAAe,EACf,QAAQ,EACR,KAAK,aAAa,EAClB,KAAK,sBAAsB,EAC3B,KAAK,eAAe,GACrB,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAE,UAAU,EAAE,KAAK,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAGlE,OAAO,EACL,aAAa,EACb,MAAM,EACN,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,GAC7B,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EACL,KAAK,EACL,KAAK,MAAM,EACX,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,qBAAqB,GAC3B,MAAM,SAAS,CAAC"}
@@ -0,0 +1,53 @@
1
+ import { GeoPosition } from './geojson';
2
+ /**
3
+ * A projection maps a lon/lat position (degrees) to a 2D scene point.
4
+ */
5
+ export type GeoProjection = (position: GeoPosition) => [number, number];
6
+ /** Options for the equirectangular (plate carrée) projection. */
7
+ export interface EquirectangularOptions {
8
+ /** Scene-unit scale applied to the radian coordinates. Default: 1. */
9
+ radius?: number;
10
+ /** Central meridian in degrees; subtracted from each longitude. Default: 0. */
11
+ centerLon?: number;
12
+ /** Central parallel in degrees; subtracted from each latitude. Default: 0. */
13
+ centerLat?: number;
14
+ /**
15
+ * Standard parallel in degrees. Its cosine scales the horizontal axis so the
16
+ * map is undistorted along that latitude. Default: 0 (cosine 1).
17
+ */
18
+ standardParallel?: number;
19
+ }
20
+ /**
21
+ * Build an equirectangular projection.
22
+ *
23
+ * `x = radius * cos(standardParallel) * (lon - centerLon)` and
24
+ * `y = radius * (lat - centerLat)`, with all angles in radians.
25
+ *
26
+ * @param options - Projection parameters.
27
+ * @returns A projection function.
28
+ */
29
+ export declare function equirectangular(options?: EquirectangularOptions): GeoProjection;
30
+ /** Options for the Web Mercator projection. */
31
+ export interface MercatorOptions {
32
+ /** Scene-unit scale applied to the radian coordinates. Default: 1. */
33
+ radius?: number;
34
+ /** Central meridian in degrees; subtracted from each longitude. Default: 0. */
35
+ centerLon?: number;
36
+ /**
37
+ * Latitude cutoff in degrees. Latitudes beyond this are clamped so `y` stays
38
+ * finite. Default: 85.05112878 (the standard Web Mercator limit).
39
+ */
40
+ maxLatitude?: number;
41
+ }
42
+ /**
43
+ * Build a Web Mercator projection.
44
+ *
45
+ * `x = radius * (lon - centerLon)` and
46
+ * `y = radius * ln(tan(PI/4 + lat/2))`, with angles in radians and latitude
47
+ * clamped to `maxLatitude`.
48
+ *
49
+ * @param options - Projection parameters.
50
+ * @returns A projection function.
51
+ */
52
+ export declare function mercator(options?: MercatorOptions): GeoProjection;
53
+ //# sourceMappingURL=projections.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"projections.d.ts","sourceRoot":"","sources":["../../../src/mobjects/geo/projections.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAI7C;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,QAAQ,EAAE,WAAW,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAExE,iEAAiE;AACjE,MAAM,WAAW,sBAAsB;IACrC,sEAAsE;IACtE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,+EAA+E;IAC/E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8EAA8E;IAC9E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,OAAO,GAAE,sBAA2B,GAAG,aAAa,CAOnF;AAED,+CAA+C;AAC/C,MAAM,WAAW,eAAe;IAC9B,sEAAsE;IACtE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,+EAA+E;IAC/E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;;;;GASG;AACH,wBAAgB,QAAQ,CAAC,OAAO,GAAE,eAAoB,GAAG,aAAa,CAUrE"}
@@ -1 +1 @@
1
- {"version":3,"file":"spring.d.ts","sourceRoot":"","sources":["../../src/rate-functions/spring.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C;;;;;GAKG;AACH,MAAM,WAAW,aAAa;IAC5B,uDAAuD;IACvD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yEAAyE;IACzE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,uDAAuD;IACvD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AA6ED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,MAAM,GAAI,UAAS,aAAkB,KAAG,YAapD,CAAC"}
1
+ {"version":3,"file":"spring.d.ts","sourceRoot":"","sources":["../../src/rate-functions/spring.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C;;;;;GAKG;AACH,MAAM,WAAW,aAAa;IAC5B,uDAAuD;IACvD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yEAAyE;IACzE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,uDAAuD;IACvD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAgFD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,MAAM,GAAI,UAAS,aAAkB,KAAG,YAapD,CAAC"}
@@ -3819,7 +3819,7 @@ var I = class e extends Qi {
3819
3819
  let t = e.stiffness ?? eo, n = e.damping ?? to, r = e.mass ?? no;
3820
3820
  return {
3821
3821
  omega0: Math.sqrt(t / r),
3822
- zeta: n / (2 * Math.sqrt(t * r))
3822
+ zeta: Math.max(n / (2 * Math.sqrt(t * r)), .001)
3823
3823
  };
3824
3824
  }, oo = (e, t) => {
3825
3825
  if (t < .999999) {
@@ -70326,4 +70326,262 @@ function Qj(e, t) {
70326
70326
  //#region src/serialization/index.ts
70327
70327
  Hj();
70328
70328
  //#endregion
70329
- export { eA as $, OC as $a, cv as $c, Co as $d, Jt as $f, Jw as $i, hg as $l, gD as $n, Hx as $o, We as $p, fE as $r, Qy as $s, rk as $t, Ro as $u, zA as A, aw as Aa, Av as Ac, Zo as Ad, Cn as Af, ET as Ai, D_ as Al, it as Am, JD as An, ES as Ao, Dt as Ap, PE as Ar, Vb as As, Ok as At, kh as Au, pA as B, ew as Ba, wv as Bc, es as Bd, Sn as Bf, oT as Bi, p_ as Bl, De as Bm, ND as Bn, cS as Bo, ge as Bp, OE as Br, xb as Bs, yk as Bt, um as Bu, $A as C, vw as Ca, Vv as Cc, ps as Cd, Rn as Cf, IT as Ci, P_ as Cl, dt as Cm, dO as Cn, jS as Co, ht as Cp, VE as Cr, nx as Cs, Hk as Ct, Rh as Cu, lj as D, mw as Da, Gv as Dc, os as Dd, Pn as Df, MT as Di, N_ as Dl, Ze as Dm, aO as Dn, CS as Do, Wt as Dp, GE as Dr, $b as Ds, Fk as Dt, Vh as Du, uj as E, _w as Ea, qv as Ec, Ao as Ed, Mn as Ef, PT as Ei, j_ as El, Ne as Em, iO as En, LS as Eo, Pt as Ep, UE as Er, Jb as Es, Pk as Et, Ih as Eu, RA as F, YC as Fa, Ov as Fc, qo as Fd, bn as Ff, xT as Fi, __ as Fl, Ke as Fm, ID as Fn, lS as Fo, yt as Fp, NE as Fr, Lb as Fs, Ek as Ft, Hm as Fu, yA as G, LC as Ga, gv as Gc, Fo as Gd, Yt as Gf, iT as Gi, Yg as Gl, Ee as Gm, CD as Gn, $x as Go, xe as Gp, bE as Gr, pb as Gs, ak as Gt, Qp as Gu, EA as H, KC as Ha, yv as Hc, Qo as Hd, ln as Hf, eT as Hi, t_ as Hl, Ce as Hm, jD as Hn, uS as Ho, ve as Hp, wE as Hr, gb as Hs, vk as Ht, lm as Hu, IA as I, QC as Ia, Pv as Ic, Lo as Id, vn as If, pT as Ii, h_ as Il, qe as Im, zD as In, pS as Io, bt as Ip, ME as Ir, Ib as Is, Lk as It, Rm as Iu, CA as J, IC as Ja, pv as Jc, vo as Jd, Zt as Jf, Zw as Ji, Gg as Jl, Fe as Jm, SD as Jn, Zx as Jo, Ge as Jp, gE as Jr, lb as Js, ZO as Jt, Hp as Ju, _A as K, jC as Ka, mv as Kc, Ko as Kd, tn as Kf, rT as Ki, Xg as Kl, E as Km, wD as Kn, eS as Ko, pt as Kp, vE as Kr, mb as Ks, $O as Kt, Kp as Ku, FA as L, ZC as La, xv as Lc, Io as Ld, _n as Lf, gT as Li, m_ as Ll, Je as Lm, PD as Ln, dS as Lo, de as Lp, DE as Lr, Fb as Ls, jk as Lt, Im as Lu, VA as M, rw as Ma, Mv as Mc, Xo as Md, wn as Mf, CT as Mi, w_ as Ml, ot as Mm, YD as Mn, aS as Mo, Mt as Mp, FE as Mr, Rb as Ms, Ak as Mt, Mh as Mu, HA as N, nw as Na, Dv as Nc, Yo as Nd, yn as Nf, wT as Ni, v_ as Nl, st as Nm, HD as Nn, sS as No, Nt as Np, jE as Nr, Bb as Ns, Rk as Nt, Ah as Nu, XA as O, fw as Oa, Wv as Oc, ls as Od, zn as Of, OT as Oi, A_ as Ol, ct as Om, tO as On, TS as Oo, Gt as Op, KE as Or, qb as Os, zk as Ot, Nh as Ou, LA as P, tw as Pa, kv as Pc, Bo as Pd, gn as Pf, bT as Pi, C_ as Pl, N as Pm, WD as Pn, _S as Po, vt as Pp, AE as Pr, zb as Ps, Nk as Pt, ih as Pu, xA as Q, kC as Qa, lv as Qc, xo as Qd, $t as Qf, Uw as Qi, _g as Ql, M as Qm, _D as Qn, Jx as Qo, Ue as Qp, pE as Qr, nb as Qs, ik as Qt, Vo as Qu, PA as R, XC as Ra, Cv as Rc, Wo as Rd, xn as Rf, mT as Ri, d_ as Rl, Ye as Rm, FD as Rn, gS as Ro, be as Rp, EE as Rr, Eb as Rs, kk as Rt, hm as Ru, GA as S, Cw as Sa, Uv as Sc, No as Sd, Hn as Sf, RT as Si, I_ as Sl, tt as Sm, uO as Sn, kS as So, Rt as Sp, QE as Sr, rx as Ss, Kk as St, Bh as Su, WA as T, gw as Ta, Kv as Tc, Mo as Td, Bn as Tf, jT as Ti, k_ as Tl, ye as Tm, lO as Tn, FS as To, At as Tp, WE as Tr, ex as Ts, Tk as Tt, Lh as Tu, bA as U, RC as Ua, vv as Uc, Go as Ud, fn as Uf, Xw as Ui, $g as Ul, we as Um, OD as Un, mS as Uo, j as Up, SE as Ur, bb as Us, Sk as Ut, im as Uu, fA as V, JC as Va, bv as Vc, $o as Vd, dn as Vf, nT as Vi, s_ as Vl, Se as Vm, AD as Vn, vS as Vo, _e as Vp, CE as Vr, vb as Vs, _k as Vt, cm as Vu, hA as W, FC as Wa, hv as Wc, zo as Wd, Xt as Wf, Qw as Wi, e_ as Wl, Te as Wm, kD as Wn, fS as Wo, me as Wp, xE as Wr, yb as Ws, Ck as Wt, Jp as Wu, AA as X, PC as Xa, fv as Xc, bo as Xd, cn as Xf, aT as Xi, yg as Xl, Le as Xm, bD as Xn, Yx as Xo, Ve as Xp, hE as Xr, ab as Xs, XO as Xt, Es as Xu, mA as Y, NC as Ya, dv as Yc, yo as Yd, sn as Yf, $w as Yi, bg as Yl, Ie as Ym, yD as Yn, Xx as Yo, Be as Yp, _E as Yr, ib as Ys, QO as Yt, Os as Yu, SA as Z, AC as Za, sv as Zc, So as Zd, en as Zf, Vw as Zi, vg as Zl, Re as Zm, hD as Zn, Qx as Zo, He as Zp, mE as Zr, sb as Zs, lk as Zt, z as Zu, yj as _, Pw as _a, ay as _c, as as _d, vr as _f, eE as _i, H_ as _l, nt as _m, bO as _n, OS as _o, Lt as _p, ZE as _r, sx as _s, Yk as _t, Yh as _u, jj as a, Fw as aa, wy as ac, jo as ad, Na as af, cE as ai, tv as al, ue as am, nk as an, iC as ao, Ft as ap, lD as ar, xx as as, vA as at, dg as au, QA as b, Tw as ba, Iv as bc, Oo as bd, Fn as bf, LT as bi, z_ as bl, $e as bm, pO as bn, PS as bo, kt as bp, XE as br, ax as bs, Uk as bt, Kh as bu, kj as c, Iw as ca, by as cc, Ts as cd, kr as cf, sE as ci, X_ as cl, ke as cm, WO as cn, qS as co, Ct as cp, cD as cr, _x as cs, cA as ct, cg as cu, _j as d, kw as da, vy as dc, ds as dd, wr as df, JT as di, q_ as dl, Me as dm, FO as dn, WS as do, Ht as dp, rD as dr, px as ds, wA as dt, ig as du, Gw as ea, Xy as ec, Do as ed, co as ef, dE as ei, ov as el, pe as em, ck as en, bC as eo, on as ep, vD as er, Vx as es, nA as et, fg as eu, hj as f, Dw as fa, uy as fc, is as fd, br as ff, ZT as fi, K_ as fl, k as fm, CO as fn, US as fo, Vt as fp, iD as fr, mx as fs, TA as ft, eg as fu, mj as g, Ow as ga, iy as gc, ko as gd, Sr as gf, tE as gi, V_ as gl, mt as gm, gO as gn, RS as go, jt as gp, $E as gr, lx as gs, qk as gt, Xh as gu, gj as h, Aw as ha, oy as hc, rs as hd, _r as hf, QT as hi, U_ as hl, ut as hm, vO as hn, BS as ho, _t as hp, YE as hr, ux as hs, dA as ht, Zh as hu, Zj as i, Kw as ia, Ty as ic, Cs as id, Pa as if, oE as ii, nv as il, O as im, uk as in, vC as io, Et as ip, fD as ir, wx as is, rA as it, og as iu, BA as j, iw as ja, Nv as jc, wo as jd, hn as jf, DT as ji, b_ as jl, at as jm, ZD as jn, hS as jo, It as jp, LE as jr, Hb as js, Ik as jt, Ph as ju, ZA as k, cw as ka, jv as kc, ns as kd, a as kf, kT as ki, O_ as kl, rt as km, nO as kn, wS as ko, gt as kp, IE as kr, Wb as ks, Dk as kt, jh as ku, Ej as l, Rw as la, xy as lc, ms as ld, Cr as lf, lE as li, Y_ as ll, Ae as lm, UO as ln, YS as lo, xt as lp, aD as lr, vx as ls, sA as lt, ag as lu, pj as m, jw as ma, ly as mc, us as md, xr as mf, $T as mi, W_ as ml, fe as mm, _O as mn, HS as mo, zt as mp, tD as mr, dx as ms, kA as mt, Qh as mu, Qj as n, Ww as na, Wy as nc, Po as nd, I as nf, nE as ni, iv as nl, ce as nm, tk as nn, _C as no, rn as np, mD as nr, Cx as ns, oA as nt, mg as nu, Aj as o, Lw as oa, Cy as oc, Eo as od, La as of, rE as oi, Z_ as ol, Pe as om, GO as on, JS as oo, qt as op, uD as or, yx as os, gA as ot, ug as ou, bj as p, Nw as pa, cy as pc, ss as pd, yr as pf, XT as pi, G_ as pl, ft as pm, SO as pn, VS as po, St as pp, qE as pr, fx as ps, DA as pt, $h as pu, tA as q, MC as qa, uv as qc, Jo as qd, Qt as qf, tT as qi, Jg as ql, ze as qm, xD as qn, tS as qo, A as qp, yE as qr, ub as qs, ek as qt, Wp as qu, Yj as r, Yw as ra, Oy as rc, fs as rd, Ua as rf, iE as ri, rv as rl, le as rm, YO as rn, gC as ro, nn as rp, dD as rr, Sx as rs, iA as rt, pg as ru, Oj as s, zw as sa, Sy as sc, bs as sd, Bi as sf, aE as si, ev as sl, Oe as sm, HO as sn, KS as so, wt as sp, sD as sr, bx as ss, uA as st, lg as su, Xj as t, Hw as ta, Zy as tc, vs as td, L as tf, uE as ti, av as tl, D as tm, sk as tn, yC as to, an as tp, pD as tr, Rx as ts, OA as tt, sg as tu, Tj as u, Bw as ua, yy as uc, R as ud, Tr as uf, YT as ui, J_ as ul, je as um, zO as un, XS as uo, Bt as up, oD as ur, gx as us, lA as ut, rg as uu, vj as v, Mw as va, ry as vc, cs as vd, Nn as vf, VT as vi, R_ as vl, Qe as vm, xO as vn, AS as vo, Ot as vp, JE as vr, cx as vs, Xk as vt, qh as vu, KA as w, yw as wa, Bv as wc, ws as wd, Vn as wf, NT as wi, M_ as wl, lt as wm, cO as wn, NS as wo, Ut as wp, HE as wr, tx as ws, wk as wt, zh as wu, UA as x, Sw as xa, Hv as xc, ys as xd, Ln as xf, FT as xi, L_ as xl, et as xm, mO as xn, IS as xo, Tt as xp, eD as xr, ix as xs, Wk as xt, Hh as xu, YA as y, ww as ya, sy as yc, ts as yd, In as yf, HT as yi, B_ as yl, P as ym, hO as yn, MS as yo, Kt as yp, nD as yr, ox as ys, Jk as yt, Jh as yu, aA as z, $C as za, Sv as zc, To as zd, mn as zf, _T as zi, f_ as zl, Xe as zm, MD as zn, oS as zo, he as zp, kE as zr, Db as zs, Mk as zt, sm as zu };
70329
+ //#region src/mobjects/geo/geojson.ts
70330
+ function $j(e) {
70331
+ if (e.type === "Polygon") {
70332
+ let t = e.coordinates[0];
70333
+ return t ? [t] : [];
70334
+ }
70335
+ let t = [];
70336
+ for (let n of e.coordinates) {
70337
+ let e = n[0];
70338
+ e && t.push(e);
70339
+ }
70340
+ return t;
70341
+ }
70342
+ //#endregion
70343
+ //#region src/mobjects/geo/projections.ts
70344
+ var eM = Math.PI / 180;
70345
+ function tM(e = {}) {
70346
+ let { radius: t = 1, centerLon: n = 0, centerLat: r = 0, standardParallel: i = 0 } = e, a = Math.cos(i * eM);
70347
+ return ([e, i]) => [(e - n) * eM * t * a, (i - r) * eM * t];
70348
+ }
70349
+ function nM(e = {}) {
70350
+ let { radius: t = 1, centerLon: n = 0, maxLatitude: r = 85.05112878 } = e;
70351
+ return ([e, i]) => {
70352
+ let a = Math.max(-r, Math.min(r, i)) * eM;
70353
+ return [(e - n) * eM * t, t * Math.log(Math.tan(Math.PI / 4 + a / 2))];
70354
+ };
70355
+ }
70356
+ //#endregion
70357
+ //#region src/mobjects/geo/colorScale.ts
70358
+ var rM = ["#0d1b2a", "#4cc9f0"], iM = class {
70359
+ _palette;
70360
+ _domain;
70361
+ constructor(e = {}) {
70362
+ let { colors: t = rM, domain: n = [0, 1], samples: r = 256 } = e, i = Math.max(2, Math.floor(r));
70363
+ this._palette = Ua(t.length > 0 ? t : rM, i), this._domain = [n[0], n[1]];
70364
+ }
70365
+ setDomainFromValues(e) {
70366
+ let t = Infinity, n = -Infinity;
70367
+ for (let r of e) Number.isFinite(r) && (r < t && (t = r), r > n && (n = r));
70368
+ return Number.isFinite(t) && Number.isFinite(n) && (this._domain = [t, n]), this;
70369
+ }
70370
+ getDomain() {
70371
+ return [this._domain[0], this._domain[1]];
70372
+ }
70373
+ colorFor(e) {
70374
+ let [t, n] = this._domain, r = n - t, i = r === 0 || !Number.isFinite(e) ? 0 : (e - t) / r;
70375
+ i = Math.max(0, Math.min(1, i));
70376
+ let a = Math.round(i * (this._palette.length - 1));
70377
+ return this._palette[a];
70378
+ }
70379
+ }, aM = class extends Yh {
70380
+ _projection;
70381
+ _colorScale;
70382
+ _regions = [];
70383
+ _regionColors = [];
70384
+ _regionPolygons = [];
70385
+ constructor(e) {
70386
+ super();
70387
+ let { geojson: t, value: n, colorScale: r = ["#0d1b2a", "#4cc9f0"], domain: i, fillOpacity: a = 1, noDataColor: o = pe, borderColor: s = "#1b263b", borderWidth: c = 1, projection: l = tM() } = e;
70388
+ this._projection = l;
70389
+ let u = t.features ?? [], d = u.map((e, t) => n(e, t));
70390
+ this._colorScale = new iM({
70391
+ colors: r,
70392
+ domain: i
70393
+ }), i || this._colorScale.setDomainFromValues(d.filter((e) => typeof e == "number" && Number.isFinite(e))), u.forEach((e, t) => {
70394
+ this._buildRegion(e, d[t], {
70395
+ fillOpacity: a,
70396
+ noDataColor: o,
70397
+ borderColor: s,
70398
+ borderWidth: c
70399
+ });
70400
+ });
70401
+ }
70402
+ _buildRegion(e, t, n) {
70403
+ let r = typeof t == "number" && Number.isFinite(t) ? this._colorScale.colorFor(t) : n.noDataColor, i = $j(e.geometry), a = [];
70404
+ for (let e of i) {
70405
+ let t = this._buildPolygon(e, r, n);
70406
+ t && a.push(t);
70407
+ }
70408
+ let o = a.length === 1 ? a[0] : new Yh(...a);
70409
+ this.add(o), this._regions.push(o), this._regionColors.push(r), this._regionPolygons.push(a);
70410
+ }
70411
+ _buildPolygon(e, t, n) {
70412
+ let r = sM(e);
70413
+ if (r.length < 3) return null;
70414
+ let i = new R_({
70415
+ vertices: r.map((e) => {
70416
+ let [t, n] = this._projection(e);
70417
+ return [
70418
+ t,
70419
+ n,
70420
+ 0
70421
+ ];
70422
+ }),
70423
+ color: n.borderColor,
70424
+ strokeWidth: n.borderWidth,
70425
+ fillOpacity: n.fillOpacity,
70426
+ closed: !0
70427
+ });
70428
+ return i.setFill(t, n.fillOpacity), i;
70429
+ }
70430
+ getRegions() {
70431
+ return [...this._regions];
70432
+ }
70433
+ getRegionCount() {
70434
+ return this._regions.length;
70435
+ }
70436
+ getRegionColor(e) {
70437
+ return this._regionColors[e];
70438
+ }
70439
+ getRegionPolygons(e) {
70440
+ return [...this._regionPolygons[e] ?? []];
70441
+ }
70442
+ getProjection() {
70443
+ return this._projection;
70444
+ }
70445
+ getColorScale() {
70446
+ return this._colorScale;
70447
+ }
70448
+ }, oM = aM;
70449
+ function sM(e) {
70450
+ if (e.length < 2) return e;
70451
+ let t = e[0], n = e[e.length - 1];
70452
+ return t[0] === n[0] && t[1] === n[1] ? e.slice(0, -1) : e;
70453
+ }
70454
+ //#endregion
70455
+ //#region src/mobjects/geo/Globe.ts
70456
+ var cM = Math.PI / 180, lM = class extends Yh {
70457
+ _radius;
70458
+ _center;
70459
+ _sphere;
70460
+ _plottedPoints = [];
70461
+ constructor(e = {}) {
70462
+ super();
70463
+ let { radius: t = 1, center: n = [
70464
+ 0,
70465
+ 0,
70466
+ 0
70467
+ ], textureUrl: r, darkTextureUrl: i, color: a = "#2a6f97", opacity: o = 1, resolution: s = 64 } = e;
70468
+ this._radius = t, this._center = [...n], r ? this._sphere = bx({
70469
+ textureUrl: r,
70470
+ darkTextureUrl: i,
70471
+ radius: t,
70472
+ center: n,
70473
+ resolution: s,
70474
+ opacity: o
70475
+ }) : this._sphere = new tx({
70476
+ radius: t,
70477
+ center: n,
70478
+ color: a,
70479
+ opacity: o,
70480
+ resolution: s
70481
+ }), this.add(this._sphere);
70482
+ }
70483
+ getSphere() {
70484
+ return this._sphere;
70485
+ }
70486
+ getRadius() {
70487
+ return this._radius;
70488
+ }
70489
+ latLonToPoint(e, t) {
70490
+ return this._surfacePoint(e, t, this._radius);
70491
+ }
70492
+ plotPoint(e, t, n = {}) {
70493
+ let { size: r = this._radius * .03, color: i = "#ffd166" } = n, a = new Cx({
70494
+ point: this.latLonToPoint(e, t),
70495
+ radius: r,
70496
+ color: i
70497
+ });
70498
+ return this.add(a), this._plottedPoints.push(a), a;
70499
+ }
70500
+ getPlottedPoints() {
70501
+ return [...this._plottedPoints];
70502
+ }
70503
+ arc(e, t, n = {}) {
70504
+ let { segments: r = 64, color: i = "#ef476f", lineWidth: a = 2, altitude: o = 0 } = n, s = this._radius * (1 + o), c = uM(e[0], e[1]), l = uM(t[0], t[1]), u = pM(c[0] * l[0] + c[1] * l[1] + c[2] * l[2], -1, 1), d = Math.acos(u), f = Math.sin(d), p = [];
70505
+ for (let e = 0; e <= r; e++) {
70506
+ let t = dM(c, l, e / r, d, f);
70507
+ p.push([
70508
+ this._center[0] + s * t[0],
70509
+ this._center[1] + s * t[1],
70510
+ this._center[2] + s * t[2]
70511
+ ]);
70512
+ }
70513
+ let m = new R_({
70514
+ vertices: p,
70515
+ color: i,
70516
+ strokeWidth: a,
70517
+ closed: !1
70518
+ });
70519
+ return this.add(m), m;
70520
+ }
70521
+ graticule(e = {}) {
70522
+ let { latStep: t = 30, lonStep: n = 30, segments: r = 48, color: i = "#8d99ae", lineWidth: a = 1 } = e, o = new Yh();
70523
+ for (let e = -180; e < 180; e += n) o.add(this._gridLine(mM(e, r), i, a));
70524
+ for (let e = -90 + t; e < 90; e += t) o.add(this._gridLine(hM(e, r), i, a));
70525
+ return this.add(o), o;
70526
+ }
70527
+ _gridLine(e, t, n) {
70528
+ return new R_({
70529
+ vertices: e.map(([e, t]) => this.latLonToPoint(e, t)),
70530
+ color: t,
70531
+ strokeWidth: n,
70532
+ closed: !1
70533
+ });
70534
+ }
70535
+ _surfacePoint(e, t, n) {
70536
+ let r = uM(e, t);
70537
+ return [
70538
+ this._center[0] + n * r[0],
70539
+ this._center[1] + n * r[1],
70540
+ this._center[2] + n * r[2]
70541
+ ];
70542
+ }
70543
+ };
70544
+ function uM(e, t) {
70545
+ let n = e * cM, r = t * cM, i = Math.cos(n);
70546
+ return [
70547
+ i * Math.cos(r),
70548
+ i * Math.sin(r),
70549
+ Math.sin(n)
70550
+ ];
70551
+ }
70552
+ function dM(e, t, n, r, i) {
70553
+ if (i < 1e-9) return fM([
70554
+ e[0] + (t[0] - e[0]) * n,
70555
+ e[1] + (t[1] - e[1]) * n,
70556
+ e[2] + (t[2] - e[2]) * n
70557
+ ]);
70558
+ let a = Math.sin((1 - n) * r) / i, o = Math.sin(n * r) / i;
70559
+ return [
70560
+ e[0] * a + t[0] * o,
70561
+ e[1] * a + t[1] * o,
70562
+ e[2] * a + t[2] * o
70563
+ ];
70564
+ }
70565
+ function fM(e) {
70566
+ let t = Math.sqrt(e[0] * e[0] + e[1] * e[1] + e[2] * e[2]) || 1;
70567
+ return [
70568
+ e[0] / t,
70569
+ e[1] / t,
70570
+ e[2] / t
70571
+ ];
70572
+ }
70573
+ function pM(e, t, n) {
70574
+ return Math.max(t, Math.min(n, e));
70575
+ }
70576
+ function mM(e, t) {
70577
+ let n = [];
70578
+ for (let r = 0; r <= t; r++) n.push([-90 + 180 * r / t, e]);
70579
+ return n;
70580
+ }
70581
+ function hM(e, t) {
70582
+ let n = [];
70583
+ for (let r = 0; r <= t; r++) n.push([e, -180 + 360 * r / t]);
70584
+ return n;
70585
+ }
70586
+ //#endregion
70587
+ export { _A as $, jC as $a, mv as $c, Ko as $d, tn as $f, rT as $i, Xg as $l, E as $m, wD as $n, eS as $o, pt as $p, vE as $r, mb as $s, $O as $t, Kp as $u, $A as A, vw as Aa, Vv as Ac, ps as Ad, Rn as Af, IT as Ai, P_ as Al, dt as Am, dO as An, jS as Ao, ht as Ap, VE as Ar, nx as As, Hk as At, Rh as Au, HA as B, nw as Ba, Dv as Bc, Yo as Bd, yn as Bf, wT as Bi, v_ as Bl, st as Bm, HD as Bn, sS as Bo, Nt as Bp, jE as Br, Bb as Bs, Rk as Bt, Ah as Bu, mj as C, Ow as Ca, iy as Cc, ko as Cd, Sr as Cf, tE as Ci, V_ as Cl, mt as Cm, gO as Cn, RS as Co, jt as Cp, $E as Cr, lx as Cs, qk as Ct, Xh as Cu, QA as D, Tw as Da, Iv as Dc, Oo as Dd, Fn as Df, LT as Di, z_ as Dl, $e as Dm, pO as Dn, PS as Do, kt as Dp, XE as Dr, ax as Ds, Uk as Dt, Kh as Du, YA as E, ww as Ea, sy as Ec, ts as Ed, In as Ef, HT as Ei, B_ as El, P as Em, hO as En, MS as Eo, Kt as Ep, nD as Er, ox as Es, Jk as Et, Jh as Eu, XA as F, fw as Fa, Wv as Fc, ls as Fd, zn as Ff, OT as Fi, A_ as Fl, ct as Fm, tO as Fn, TS as Fo, Gt as Fp, KE as Fr, qb as Fs, zk as Ft, Nh as Fu, PA as G, XC as Ga, Cv as Gc, Wo as Gd, xn as Gf, mT as Gi, d_ as Gl, Ye as Gm, FD as Gn, gS as Go, be as Gp, EE as Gr, Eb as Gs, kk as Gt, hm as Gu, RA as H, YC as Ha, Ov as Hc, qo as Hd, bn as Hf, xT as Hi, __ as Hl, Ke as Hm, ID as Hn, lS as Ho, yt as Hp, NE as Hr, Lb as Hs, Ek as Ht, Hm as Hu, ZA as I, cw as Ia, jv as Ic, ns as Id, a as If, kT as Ii, O_ as Il, rt as Im, nO as In, wS as Io, gt as Ip, IE as Ir, Wb as Is, Dk as It, jh as Iu, fA as J, JC as Ja, bv as Jc, $o as Jd, dn as Jf, nT as Ji, s_ as Jl, Se as Jm, AD as Jn, vS as Jo, _e as Jp, CE as Jr, vb as Js, _k as Jt, cm as Ju, aA as K, $C as Ka, Sv as Kc, To as Kd, mn as Kf, _T as Ki, f_ as Kl, Xe as Km, MD as Kn, oS as Ko, he as Kp, kE as Kr, Db as Ks, Mk as Kt, sm as Ku, zA as L, aw as La, Av as Lc, Zo as Ld, Cn as Lf, ET as Li, D_ as Ll, it as Lm, JD as Ln, ES as Lo, Dt as Lp, PE as Lr, Vb as Ls, Ok as Lt, kh as Lu, WA as M, gw as Ma, Kv as Mc, Mo as Md, Bn as Mf, jT as Mi, k_ as Ml, ye as Mm, lO as Mn, FS as Mo, At as Mp, WE as Mr, ex as Ms, Tk as Mt, Lh as Mu, uj as N, _w as Na, qv as Nc, Ao as Nd, Mn as Nf, PT as Ni, j_ as Nl, Ne as Nm, iO as Nn, LS as No, Pt as Np, UE as Nr, Jb as Ns, Pk as Nt, Ih as Nu, UA as O, Sw as Oa, Hv as Oc, ys as Od, Ln as Of, FT as Oi, L_ as Ol, et as Om, mO as On, IS as Oo, Tt as Op, eD as Or, ix as Os, Wk as Ot, Hh as Ou, lj as P, mw as Pa, Gv as Pc, os as Pd, Pn as Pf, MT as Pi, N_ as Pl, Ze as Pm, aO as Pn, CS as Po, Wt as Pp, GE as Pr, $b as Ps, Fk as Pt, Vh as Pu, yA as Q, LC as Qa, gv as Qc, Fo as Qd, Yt as Qf, iT as Qi, Yg as Ql, Ee as Qm, CD as Qn, $x as Qo, xe as Qp, bE as Qr, pb as Qs, ak as Qt, Qp as Qu, BA as R, iw as Ra, Nv as Rc, wo as Rd, hn as Rf, DT as Ri, b_ as Rl, at as Rm, ZD as Rn, hS as Ro, It as Rp, LE as Rr, Hb as Rs, Ik as Rt, Ph as Ru, gj as S, Aw as Sa, oy as Sc, rs as Sd, _r as Sf, QT as Si, U_ as Sl, ut as Sm, vO as Sn, BS as So, _t as Sp, YE as Sr, ux as Ss, dA as St, Zh as Su, vj as T, Mw as Ta, ry as Tc, cs as Td, Nn as Tf, VT as Ti, R_ as Tl, Qe as Tm, xO as Tn, AS as To, Ot as Tp, JE as Tr, cx as Ts, Xk as Tt, qh as Tu, IA as U, QC as Ua, Pv as Uc, Lo as Ud, vn as Uf, pT as Ui, h_ as Ul, qe as Um, zD as Un, pS as Uo, bt as Up, ME as Ur, Ib as Us, Lk as Ut, Rm as Uu, LA as V, tw as Va, kv as Vc, Bo as Vd, gn as Vf, bT as Vi, C_ as Vl, N as Vm, WD as Vn, _S as Vo, vt as Vp, AE as Vr, zb as Vs, Nk as Vt, ih as Vu, FA as W, ZC as Wa, xv as Wc, Io as Wd, _n as Wf, gT as Wi, m_ as Wl, Je as Wm, PD as Wn, dS as Wo, de as Wp, DE as Wr, Fb as Ws, jk as Wt, Im as Wu, bA as X, RC as Xa, vv as Xc, Go as Xd, fn as Xf, Xw as Xi, $g as Xl, we as Xm, OD as Xn, mS as Xo, j as Xp, SE as Xr, bb as Xs, Sk as Xt, im as Xu, EA as Y, KC as Ya, yv as Yc, Qo as Yd, ln as Yf, eT as Yi, t_ as Yl, Ce as Ym, jD as Yn, uS as Yo, ve as Yp, wE as Yr, gb as Ys, vk as Yt, lm as Yu, hA as Z, FC as Za, hv as Zc, zo as Zd, Xt as Zf, Qw as Zi, e_ as Zl, Te as Zm, kD as Zn, fS as Zo, me as Zp, xE as Zr, yb as Zs, Ck as Zt, Jp as Zu, Tj as _, Bw as _a, yy as _c, R as _d, Tr as _f, YT as _i, J_ as _l, je as _m, zO as _n, XS as _o, Bt as _p, oD as _r, gx as _s, lA as _t, rg as _u, tM as a, Uw as aa, nb as ac, Vo as ad, xo as af, M as ah, pE as ai, lv as al, Ue as am, ik as an, kC as ao, $t as ap, _D as ar, Jx as as, xA as at, _g as au, bj as b, Nw as ba, cy as bc, ss as bd, yr as bf, XT as bi, G_ as bl, ft as bm, SO as bn, VS as bo, St as bp, qE as br, fx as bs, DA as bt, $h as bu, Xj as c, Hw as ca, Zy as cc, vs as cd, L as cf, uE as ci, av as cl, D as cm, sk as cn, yC as co, an as cp, pD as cr, Rx as cs, OA as ct, sg as cu, Zj as d, Kw as da, Ty as dc, Cs as dd, Pa as df, oE as di, nv as dl, O as dm, uk as dn, vC as do, Et as dp, fD as dr, wx as ds, rA as dt, og as du, tT as ea, ub as ec, Wp as ed, Jo as ef, ze as eh, yE as ei, uv as el, A as em, ek as en, MC as eo, Qt as ep, xD as er, tS as es, tA as et, Jg as eu, jj as f, Fw as fa, wy as fc, jo as fd, Na as ff, cE as fi, tv as fl, ue as fm, nk as fn, iC as fo, Ft as fp, lD as fr, xx as fs, vA as ft, dg as fu, Ej as g, Rw as ga, xy as gc, ms as gd, Cr as gf, lE as gi, Y_ as gl, Ae as gm, UO as gn, YS as go, xt as gp, aD as gr, vx as gs, sA as gt, ag as gu, kj as h, Iw as ha, by as hc, Ts as hd, kr as hf, sE as hi, X_ as hl, ke as hm, WO as hn, qS as ho, Ct as hp, cD as hr, _x as hs, cA as ht, cg as hu, iM as i, Vw as ia, sb as ic, z as id, So as if, Re as ih, mE as ii, sv as il, He as im, lk as in, AC as io, en as ip, hD as ir, Qx as is, SA as it, vg as iu, KA as j, yw as ja, Bv as jc, ws as jd, Vn as jf, NT as ji, M_ as jl, lt as jm, cO as jn, NS as jo, Ut as jp, HE as jr, tx as js, wk as jt, zh as ju, GA as k, Cw as ka, Uv as kc, No as kd, Hn as kf, RT as ki, I_ as kl, tt as km, uO as kn, kS as ko, Rt as kp, QE as kr, rx as ks, Kk as kt, Bh as ku, Qj as l, Ww as la, Wy as lc, Po as ld, I as lf, nE as li, iv as ll, ce as lm, tk as ln, _C as lo, rn as lp, mD as lr, Cx as ls, oA as lt, mg as lu, Oj as m, zw as ma, Sy as mc, bs as md, Bi as mf, aE as mi, ev as ml, Oe as mm, HO as mn, KS as mo, wt as mp, sD as mr, bx as ms, uA as mt, lg as mu, aM as n, $w as na, ib as nc, Os as nd, yo as nf, Ie as nh, _E as ni, dv as nl, Be as nm, QO as nn, NC as no, sn as np, yD as nr, Xx as ns, mA as nt, bg as nu, nM as o, Jw as oa, Qy as oc, Ro as od, Co as of, fE as oi, cv as ol, We as om, rk as on, OC as oo, Jt as op, gD as or, Hx as os, eA as ot, hg as ou, Aj as p, Lw as pa, Cy as pc, Eo as pd, La as pf, rE as pi, Z_ as pl, Pe as pm, GO as pn, JS as po, qt as pp, uD as pr, yx as ps, gA as pt, ug as pu, pA as q, ew as qa, wv as qc, es as qd, Sn as qf, oT as qi, p_ as ql, De as qm, ND as qn, cS as qo, ge as qp, OE as qr, xb as qs, yk as qt, um as qu, oM as r, aT as ra, ab as rc, Es as rd, bo as rf, Le as rh, hE as ri, fv as rl, Ve as rm, XO as rn, PC as ro, cn as rp, bD as rr, Yx as rs, AA as rt, yg as ru, $j as s, Gw as sa, Xy as sc, Do as sd, co as sf, dE as si, ov as sl, pe as sm, ck as sn, bC as so, on as sp, vD as sr, Vx as ss, nA as st, fg as su, lM as t, Zw as ta, lb as tc, Hp as td, vo as tf, Fe as th, gE as ti, pv as tl, Ge as tm, ZO as tn, IC as to, Zt as tp, SD as tr, Zx as ts, CA as tt, Gg as tu, Yj as u, Yw as ua, Oy as uc, fs as ud, Ua as uf, iE as ui, rv as ul, le as um, YO as un, gC as uo, nn as up, dD as ur, Sx as us, iA as ut, pg as uu, _j as v, kw as va, vy as vc, ds as vd, wr as vf, JT as vi, q_ as vl, Me as vm, FO as vn, WS as vo, Ht as vp, rD as vr, px as vs, wA as vt, ig as vu, yj as w, Pw as wa, ay as wc, as as wd, vr as wf, eE as wi, H_ as wl, nt as wm, bO as wn, OS as wo, Lt as wp, ZE as wr, sx as ws, Yk as wt, Yh as wu, pj as x, jw as xa, ly as xc, us as xd, xr as xf, $T as xi, W_ as xl, fe as xm, _O as xn, HS as xo, zt as xp, tD as xr, dx as xs, kA as xt, Qh as xu, hj as y, Dw as ya, uy as yc, is as yd, br as yf, ZT as yi, K_ as yl, k as ym, CO as yn, US as yo, Vt as yp, iD as yr, mx as ys, TA as yt, eg as yu, VA as z, rw as za, Mv as zc, Xo as zd, wn as zf, CT as zi, w_ as zl, ot as zm, YD as zn, aS as zo, Mt as zp, FE as zr, Rb as zs, Ak as zt, Mh as zu };
@@ -0,0 +1,23 @@
1
+ import { Mobject, MobjectOptions } from '../core/Mobject';
2
+ import * as THREE from 'three';
3
+ /**
4
+ * Minimal concrete Mobject for tests.
5
+ *
6
+ * The base {@link Mobject} is abstract and cannot be instantiated. Tests that
7
+ * need a plain, non-VMobject mobject (for example to exercise the opacity
8
+ * fallback path of an animation) use this stand-in. It implements only the
9
+ * abstract members with the smallest valid behavior:
10
+ * - `_createThreeObject` returns an empty Three.js object.
11
+ * - `copy` returns a new instance with the base attributes copied over.
12
+ * - `normalizeTransform` is a no-op that returns `this`.
13
+ *
14
+ * Keep it a direct subclass of Mobject (not VMobject) so tests that check
15
+ * non-VMobject behavior still exercise that path.
16
+ */
17
+ export declare class TestMobject extends Mobject {
18
+ constructor(options?: MobjectOptions);
19
+ protected _createThreeObject(): THREE.Object3D;
20
+ copy(): Mobject;
21
+ normalizeTransform(): this;
22
+ }
23
+ //# sourceMappingURL=TestMobject.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TestMobject.d.ts","sourceRoot":"","sources":["../../src/test-setup/TestMobject.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAE/D;;;;;;;;;;;;;GAaG;AACH,qBAAa,WAAY,SAAQ,OAAO;gBAC1B,OAAO,CAAC,EAAE,cAAc;IAIpC,SAAS,CAAC,kBAAkB,IAAI,KAAK,CAAC,QAAQ;IAIrC,IAAI,IAAI,OAAO;IAMf,kBAAkB,IAAI,IAAI;CAGpC"}
@@ -1,4 +1,3 @@
1
1
  export type AxisName = 'x' | 'y' | 'z';
2
2
  export declare function axisVector(axis: AxisName): [number, number, number];
3
- export declare function axisVectorFromEulerKey(key: 'X' | 'Y' | 'Z'): [number, number, number];
4
3
  //# sourceMappingURL=axis.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"axis.d.ts","sourceRoot":"","sources":["../../src/utils/axis.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;AAEvC,wBAAgB,UAAU,CAAC,IAAI,EAAE,QAAQ,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CASnE;AAED,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAErF"}
1
+ {"version":3,"file":"axis.d.ts","sourceRoot":"","sources":["../../src/utils/axis.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;AAEvC,wBAAgB,UAAU,CAAC,IAAI,EAAE,QAAQ,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CASnE"}