@project-skymap/library 0.4.0 → 0.5.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.
- package/dist/index.cjs +961 -289
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +43 -1
- package/dist/index.d.ts +43 -1
- package/dist/index.js +960 -288
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -20,10 +20,41 @@ type SceneModel = {
|
|
|
20
20
|
nodes: SceneNode[];
|
|
21
21
|
links: SceneLink[];
|
|
22
22
|
};
|
|
23
|
+
type ConstellationItem = {
|
|
24
|
+
id: string;
|
|
25
|
+
title: string;
|
|
26
|
+
type: "book" | "division" | "custom";
|
|
27
|
+
image: string;
|
|
28
|
+
anchors: string[];
|
|
29
|
+
center: [number, number, number] | null;
|
|
30
|
+
radius: number;
|
|
31
|
+
rotationDeg: number;
|
|
32
|
+
aspectRatio?: number;
|
|
33
|
+
opacity: number;
|
|
34
|
+
blend: "normal" | "additive" | "screen";
|
|
35
|
+
zBias: number;
|
|
36
|
+
fade: {
|
|
37
|
+
zoomInStart: number;
|
|
38
|
+
zoomInEnd: number;
|
|
39
|
+
hoverBoost: number;
|
|
40
|
+
minOpacity: number;
|
|
41
|
+
maxOpacity: number;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
type ConstellationConfig = {
|
|
45
|
+
version: number;
|
|
46
|
+
atlasBasePath: string;
|
|
47
|
+
constellations: ConstellationItem[];
|
|
48
|
+
};
|
|
23
49
|
type Vector3Arr = [number, number, number];
|
|
24
50
|
type StarArrangement = Record<string, {
|
|
25
51
|
position: Vector3Arr;
|
|
26
52
|
}>;
|
|
53
|
+
type GroupDef = {
|
|
54
|
+
name: string;
|
|
55
|
+
start: number;
|
|
56
|
+
end: number;
|
|
57
|
+
};
|
|
27
58
|
type StarMapConfig = {
|
|
28
59
|
background?: string;
|
|
29
60
|
camera?: {
|
|
@@ -35,11 +66,18 @@ type StarMapConfig = {
|
|
|
35
66
|
arrangement?: StarArrangement;
|
|
36
67
|
polygons?: Record<string, Vector3Arr[]>;
|
|
37
68
|
editable?: boolean;
|
|
69
|
+
constellations?: ConstellationConfig;
|
|
70
|
+
groups?: Record<string, GroupDef[]>;
|
|
38
71
|
showBookLabels?: boolean;
|
|
39
72
|
showDivisionLabels?: boolean;
|
|
40
73
|
showChapterLabels?: boolean;
|
|
74
|
+
showGroupLabels?: boolean;
|
|
41
75
|
showConstellationLines?: boolean;
|
|
42
76
|
showDivisionBoundaries?: boolean;
|
|
77
|
+
showConstellationArt?: boolean;
|
|
78
|
+
showBackdropStars?: boolean;
|
|
79
|
+
backdropStarsCount?: number;
|
|
80
|
+
showAtmosphere?: boolean;
|
|
43
81
|
model?: SceneModel;
|
|
44
82
|
data?: any;
|
|
45
83
|
adapter?: (data: any) => SceneModel;
|
|
@@ -71,9 +109,13 @@ type StarMapProps = {
|
|
|
71
109
|
onSelect?: (node: SceneNode) => void;
|
|
72
110
|
onHover?: (node?: SceneNode) => void;
|
|
73
111
|
onArrangementChange?: (arrangement: StarArrangement) => void;
|
|
112
|
+
onFovChange?: (fov: number) => void;
|
|
74
113
|
};
|
|
75
114
|
type StarMapHandle = {
|
|
76
115
|
getFullArrangement: () => StarArrangement | undefined;
|
|
116
|
+
setHoveredBook: (id: string | null) => void;
|
|
117
|
+
setFocusedBook: (id: string | null) => void;
|
|
118
|
+
setOrderRevealEnabled: (enabled: boolean) => void;
|
|
77
119
|
};
|
|
78
120
|
declare const StarMap: React.ForwardRefExoticComponent<StarMapProps & React.RefAttributes<StarMapHandle>>;
|
|
79
121
|
|
|
@@ -29153,4 +29195,4 @@ interface GenerateOptions {
|
|
|
29153
29195
|
declare const defaultGenerateOptions: GenerateOptions;
|
|
29154
29196
|
declare function generateArrangement(bible: BibleJSON, options?: Partial<GenerateOptions>): StarArrangement;
|
|
29155
29197
|
|
|
29156
|
-
export { type BibleJSON, type GenerateOptions, type SceneLink, type SceneModel, type SceneNode, type StarArrangement, StarMap, type StarMapConfig, type StarMapHandle, type StarMapProps, bibleToSceneModel, defaultGenerateOptions, defaultStars, generateArrangement };
|
|
29198
|
+
export { type BibleJSON, type ConstellationConfig, type GenerateOptions, type SceneLink, type SceneModel, type SceneNode, type StarArrangement, StarMap, type StarMapConfig, type StarMapHandle, type StarMapProps, bibleToSceneModel, defaultGenerateOptions, defaultStars, generateArrangement };
|
package/dist/index.d.ts
CHANGED
|
@@ -20,10 +20,41 @@ type SceneModel = {
|
|
|
20
20
|
nodes: SceneNode[];
|
|
21
21
|
links: SceneLink[];
|
|
22
22
|
};
|
|
23
|
+
type ConstellationItem = {
|
|
24
|
+
id: string;
|
|
25
|
+
title: string;
|
|
26
|
+
type: "book" | "division" | "custom";
|
|
27
|
+
image: string;
|
|
28
|
+
anchors: string[];
|
|
29
|
+
center: [number, number, number] | null;
|
|
30
|
+
radius: number;
|
|
31
|
+
rotationDeg: number;
|
|
32
|
+
aspectRatio?: number;
|
|
33
|
+
opacity: number;
|
|
34
|
+
blend: "normal" | "additive" | "screen";
|
|
35
|
+
zBias: number;
|
|
36
|
+
fade: {
|
|
37
|
+
zoomInStart: number;
|
|
38
|
+
zoomInEnd: number;
|
|
39
|
+
hoverBoost: number;
|
|
40
|
+
minOpacity: number;
|
|
41
|
+
maxOpacity: number;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
type ConstellationConfig = {
|
|
45
|
+
version: number;
|
|
46
|
+
atlasBasePath: string;
|
|
47
|
+
constellations: ConstellationItem[];
|
|
48
|
+
};
|
|
23
49
|
type Vector3Arr = [number, number, number];
|
|
24
50
|
type StarArrangement = Record<string, {
|
|
25
51
|
position: Vector3Arr;
|
|
26
52
|
}>;
|
|
53
|
+
type GroupDef = {
|
|
54
|
+
name: string;
|
|
55
|
+
start: number;
|
|
56
|
+
end: number;
|
|
57
|
+
};
|
|
27
58
|
type StarMapConfig = {
|
|
28
59
|
background?: string;
|
|
29
60
|
camera?: {
|
|
@@ -35,11 +66,18 @@ type StarMapConfig = {
|
|
|
35
66
|
arrangement?: StarArrangement;
|
|
36
67
|
polygons?: Record<string, Vector3Arr[]>;
|
|
37
68
|
editable?: boolean;
|
|
69
|
+
constellations?: ConstellationConfig;
|
|
70
|
+
groups?: Record<string, GroupDef[]>;
|
|
38
71
|
showBookLabels?: boolean;
|
|
39
72
|
showDivisionLabels?: boolean;
|
|
40
73
|
showChapterLabels?: boolean;
|
|
74
|
+
showGroupLabels?: boolean;
|
|
41
75
|
showConstellationLines?: boolean;
|
|
42
76
|
showDivisionBoundaries?: boolean;
|
|
77
|
+
showConstellationArt?: boolean;
|
|
78
|
+
showBackdropStars?: boolean;
|
|
79
|
+
backdropStarsCount?: number;
|
|
80
|
+
showAtmosphere?: boolean;
|
|
43
81
|
model?: SceneModel;
|
|
44
82
|
data?: any;
|
|
45
83
|
adapter?: (data: any) => SceneModel;
|
|
@@ -71,9 +109,13 @@ type StarMapProps = {
|
|
|
71
109
|
onSelect?: (node: SceneNode) => void;
|
|
72
110
|
onHover?: (node?: SceneNode) => void;
|
|
73
111
|
onArrangementChange?: (arrangement: StarArrangement) => void;
|
|
112
|
+
onFovChange?: (fov: number) => void;
|
|
74
113
|
};
|
|
75
114
|
type StarMapHandle = {
|
|
76
115
|
getFullArrangement: () => StarArrangement | undefined;
|
|
116
|
+
setHoveredBook: (id: string | null) => void;
|
|
117
|
+
setFocusedBook: (id: string | null) => void;
|
|
118
|
+
setOrderRevealEnabled: (enabled: boolean) => void;
|
|
77
119
|
};
|
|
78
120
|
declare const StarMap: React.ForwardRefExoticComponent<StarMapProps & React.RefAttributes<StarMapHandle>>;
|
|
79
121
|
|
|
@@ -29153,4 +29195,4 @@ interface GenerateOptions {
|
|
|
29153
29195
|
declare const defaultGenerateOptions: GenerateOptions;
|
|
29154
29196
|
declare function generateArrangement(bible: BibleJSON, options?: Partial<GenerateOptions>): StarArrangement;
|
|
29155
29197
|
|
|
29156
|
-
export { type BibleJSON, type GenerateOptions, type SceneLink, type SceneModel, type SceneNode, type StarArrangement, StarMap, type StarMapConfig, type StarMapHandle, type StarMapProps, bibleToSceneModel, defaultGenerateOptions, defaultStars, generateArrangement };
|
|
29198
|
+
export { type BibleJSON, type ConstellationConfig, type GenerateOptions, type SceneLink, type SceneModel, type SceneNode, type StarArrangement, StarMap, type StarMapConfig, type StarMapHandle, type StarMapProps, bibleToSceneModel, defaultGenerateOptions, defaultStars, generateArrangement };
|