Added moon example fonts

This commit is contained in:
Zemledelec 2024-09-25 22:04:11 +04:00
parent 9f84634ec9
commit 996a1c6471
23 changed files with 33136 additions and 45 deletions

BIN
bmfont/Karla-Italic.ttf Normal file

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 600 KiB

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 482 KiB

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,856 @@
{
"opt": {
"version": "msdf-bmfont-xml v2.7.0",
"outputType": "json",
"filename": "Karla-Light.ttf",
"fontSize": 32,
"charsetFile": "charset.txt",
"textureSize": [
1024,
1024
],
"texturePadding": 1,
"border": 0,
"distanceRange": 24,
"fieldType": "msdf",
"roundDecimal": 0,
"vector": false,
"smartSize": false,
"pot": false,
"square": false,
"rot": false,
"rtl": false,
"fontFile": "Karla-Light.ttf",
"charset": [
" ",
"A",
"B",
"C",
"Č",
"Ć",
"D",
"Đ",
"E",
"F",
"G",
"H",
"I",
"J",
"K",
"L",
"M",
"N",
"O",
"P",
"Q",
"R",
"S",
"Š",
"T",
"U",
"V",
"W",
"X",
"Y",
"Z",
"Ž",
"a",
"b",
"c",
"č",
"ć",
"d",
"đ",
"e",
"f",
"g",
"h",
"i",
"j",
"k",
"l",
"m",
"n",
"o",
"p",
"q",
"r",
"s",
"š",
"t",
"u",
"v",
"w",
"x",
"y",
"z",
"ž",
"А",
"Б",
"В",
"Г",
"Ґ",
"Д",
"Ђ",
"Е",
"Ё",
"Є",
"Ж",
"З",
"Ѕ",
"И",
"І",
"Ї",
"Й",
"Ј",
"К",
"Л",
"Љ",
"М",
"Н",
"Њ",
"О",
"П",
"Р",
"С",
"Т",
"Ћ",
"У",
"Ў",
"Ф",
"Х",
"Ц",
"Ч",
"Џ",
"Ш",
"Щ",
"Ъ",
"Ы",
"Ь",
"Э",
"Ю",
"Я",
"а",
"б",
"в",
"г",
"ґ",
"д",
"ђ",
"е",
"ё",
"є",
"ж",
"з",
"ѕ",
"и",
"і",
"ї",
"й",
"ј",
"к",
"л",
"љ",
"м",
"н",
"њ",
"о",
"п",
"р",
"с",
"т",
"ћ",
"у",
"ў",
"ф",
"х",
"ц",
"ч",
"џ",
"ш",
"щ",
"ъ",
"ы",
"ь",
"э",
"ю",
"я",
"Α",
"Β",
"Γ",
"Δ",
"Ε",
"Ζ",
"Η",
"Θ",
"Ι",
"Κ",
"Λ",
"Μ",
"Ν",
"Ξ",
"Ο",
"Π",
"Ρ",
"Σ",
"Τ",
"Υ",
"Φ",
"Χ",
"Ψ",
"Ω",
"α",
"β",
"γ",
"δ",
"ε",
"ζ",
"η",
"θ",
"ι",
"κ",
"λ",
"μ",
"ν",
"ξ",
"ο",
"π",
"ρ",
"σ",
"τ",
"υ",
"φ",
"χ",
"ψ",
"ω",
"ά",
"Ά",
"έ",
"Έ",
"έ",
"Ή",
"ί",
"ϊ",
"ΐ",
"Ί",
"ό",
"Ό",
"ύ",
"ΰ",
"ϋ",
"Ύ",
"Ϋ",
"Ώ",
"Ă",
"Â",
"Ê",
"Ô",
"Ơ",
"Ư",
"ă",
"â",
"ê",
"ô",
"ơ",
"ư",
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
"0",
"",
"?",
"",
"“",
"!",
"”",
"(",
"%",
")",
"[",
"#",
"]",
"{",
"@",
"}",
"/",
"&",
"\\",
"<",
"-",
"+",
"÷",
"×",
"=",
">",
"®",
"©",
"$",
"€",
"£",
"¥",
"¢",
":",
";",
",",
".",
"*",
"Ä",
"ä",
"Ö",
"ö",
"Ü",
"ü",
"ẞ",
"ß"
],
"fontSpacing": [
0,
0
],
"fontPadding": [
12,
12,
12,
12
],
"textureWidth": 1024,
"textureHeight": 1024,
"tolerance": 0
},
"pages": [
"Karla-Light.ttf.png"
],
"packer": {
"bins": [
{
"width": 1024,
"height": 1024,
"maxWidth": 1024,
"maxHeight": 1024,
"freeRects": [
{
"x": 41,
"y": 53,
"width": 32,
"height": 1
},
{
"x": 73,
"y": 105,
"width": 9,
"height": 2
},
{
"x": 80,
"y": 52,
"width": 34,
"height": 1
},
{
"x": 37,
"y": 259,
"width": 5,
"height": 8
},
{
"x": 42,
"y": 311,
"width": 40,
"height": 9
},
{
"x": 114,
"y": 104,
"width": 9,
"height": 1
},
{
"x": 123,
"y": 208,
"width": 1,
"height": 51
},
{
"x": 156,
"y": 260,
"width": 8,
"height": 51
},
{
"x": 1002,
"y": 104,
"width": 23,
"height": 51
},
{
"x": 41,
"y": 211,
"width": 48,
"height": 3
},
{
"x": 82,
"y": 209,
"width": 7,
"height": 5
},
{
"x": 120,
"y": 209,
"width": 4,
"height": 50
},
{
"x": 1005,
"y": 104,
"width": 20,
"height": 101
},
{
"x": 286,
"y": 208,
"width": 1,
"height": 43
},
{
"x": 513,
"y": 197,
"width": 12,
"height": 8
},
{
"x": 416,
"y": 206,
"width": 22,
"height": 47
},
{
"x": 552,
"y": 205,
"width": 11,
"height": 45
},
{
"x": 454,
"y": 253,
"width": 22,
"height": 39
},
{
"x": 323,
"y": 251,
"width": 13,
"height": 3
},
{
"x": 883,
"y": 156,
"width": 3,
"height": 50
},
{
"x": 867,
"y": 203,
"width": 19,
"height": 3
},
{
"x": 678,
"y": 243,
"width": 7,
"height": 6
},
{
"x": 634,
"y": 250,
"width": 5,
"height": 39
},
{
"x": 849,
"y": 248,
"width": 18,
"height": 3
},
{
"x": 494,
"y": 292,
"width": 19,
"height": 5
},
{
"x": 714,
"y": 249,
"width": 9,
"height": 44
},
{
"x": 630,
"y": 295,
"width": 4,
"height": 39
},
{
"x": 902,
"y": 206,
"width": 23,
"height": 45
},
{
"x": 534,
"y": 297,
"width": 18,
"height": 43
},
{
"x": 922,
"y": 206,
"width": 3,
"height": 49
},
{
"x": 833,
"y": 293,
"width": 16,
"height": 3
},
{
"x": 913,
"y": 296,
"width": 9,
"height": 4
},
{
"x": 712,
"y": 294,
"width": 2,
"height": 44
},
{
"x": 829,
"y": 338,
"width": 4,
"height": 3
},
{
"x": 1016,
"y": 52,
"width": 9,
"height": 203
},
{
"x": 1006,
"y": 104,
"width": 19,
"height": 151
},
{
"x": 617,
"y": 340,
"width": 13,
"height": 39
},
{
"x": 907,
"y": 341,
"width": 6,
"height": 4
},
{
"x": 706,
"y": 379,
"width": 6,
"height": 4
},
{
"x": 788,
"y": 383,
"width": 41,
"height": 3
},
{
"x": 1019,
"y": 52,
"width": 6,
"height": 248
},
{
"x": 991,
"y": 300,
"width": 3,
"height": 45
},
{
"x": 872,
"y": 386,
"width": 35,
"height": 4
},
{
"x": 825,
"y": 426,
"width": 6,
"height": 3
},
{
"x": 1023,
"y": 0,
"width": 2,
"height": 390
},
{
"x": 863,
"y": 429,
"width": 9,
"height": 2
},
{
"x": 674,
"y": 289,
"width": 4,
"height": 5
},
{
"x": 707,
"y": 294,
"width": 7,
"height": 40
},
{
"x": 1013,
"y": 431,
"width": 12,
"height": 40
},
{
"x": 1014,
"y": 431,
"width": 11,
"height": 594
},
{
"x": 285,
"y": 256,
"width": 1,
"height": 43
},
{
"x": 324,
"y": 337,
"width": 170,
"height": 688
},
{
"x": 246,
"y": 260,
"width": 1,
"height": 44
},
{
"x": 283,
"y": 342,
"width": 251,
"height": 683
},
{
"x": 283,
"y": 304,
"width": 2,
"height": 721
},
{
"x": 283,
"y": 339,
"width": 211,
"height": 686
},
{
"x": 110,
"y": 987,
"width": 54,
"height": 1
},
{
"x": 147,
"y": 1024,
"width": 878,
"height": 1
},
{
"x": 246,
"y": 385,
"width": 371,
"height": 603
},
{
"x": 252,
"y": 385,
"width": 365,
"height": 640
},
{
"x": 246,
"y": 424,
"width": 460,
"height": 564
},
{
"x": 252,
"y": 424,
"width": 454,
"height": 601
},
{
"x": 246,
"y": 428,
"width": 542,
"height": 560
},
{
"x": 252,
"y": 428,
"width": 536,
"height": 597
},
{
"x": 246,
"y": 467,
"width": 579,
"height": 521
},
{
"x": 252,
"y": 467,
"width": 573,
"height": 558
},
{
"x": 246,
"y": 470,
"width": 617,
"height": 518
},
{
"x": 252,
"y": 470,
"width": 611,
"height": 555
},
{
"x": 246,
"y": 511,
"width": 779,
"height": 477
},
{
"x": 252,
"y": 511,
"width": 773,
"height": 514
},
{
"x": 246,
"y": 472,
"width": 729,
"height": 516
},
{
"x": 252,
"y": 472,
"width": 723,
"height": 553
},
{
"x": 246,
"y": 344,
"width": 288,
"height": 644
},
{
"x": 252,
"y": 344,
"width": 282,
"height": 681
},
{
"x": 183,
"y": 1022,
"width": 842,
"height": 3
},
{
"x": 183,
"y": 1020,
"width": 35,
"height": 5
},
{
"x": 324,
"y": 330,
"width": 130,
"height": 695
},
{
"x": 994,
"y": 373,
"width": 31,
"height": 17
},
{
"x": 403,
"y": 254,
"width": 13,
"height": 45
},
{
"x": 448,
"y": 299,
"width": 6,
"height": 726
},
{
"x": 0,
"y": 1024,
"width": 82,
"height": 1
},
{
"x": 0,
"y": 1023,
"width": 34,
"height": 2
},
{
"x": 62,
"y": 996,
"width": 20,
"height": 29
},
{
"x": 35,
"y": 107,
"width": 6,
"height": 1
}
],
"rects": [],
"options": {
"smart": false,
"pot": false,
"square": false,
"allowRotation": false,
"tag": false,
"exclusiveTag": true,
"border": 0,
"logic": 1
}
}
]
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 410 KiB

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 426 KiB

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 550 KiB

305
sandbox/moon/lacus.json Normal file
View File

@ -0,0 +1,305 @@
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"name": "Lacus Aestatis",
"description": "Lake of Summer",
"diameter": 90
},
"geometry": {
"type": "Point",
"coordinates": [
-69.0,
-15.0
]
}
},
{
"type": "Feature",
"properties": {
"name": "Lacus Autumni",
"description": "Lake of Autumn",
"diameter": 183
},
"geometry": {
"type": "Point",
"coordinates": [
-83.9,
-9.9
]
}
},
{
"type": "Feature",
"properties": {
"name": "Lacus Bonitatis",
"description": "Lake of Goodness",
"diameter": 92
},
"geometry": {
"type": "Point",
"coordinates": [
43.7,
23.2
]
}
},
{
"type": "Feature",
"properties": {
"name": "Lacus Doloris",
"description": "Lake of Sorrow",
"diameter": 110
},
"geometry": {
"type": "Point",
"coordinates": [
9.0,
17.1
]
}
},
{
"type": "Feature",
"properties": {
"name": "Lacus Excellentiae",
"description": "Lake of Excellence",
"diameter": 184
},
"geometry": {
"type": "Point",
"coordinates": [
-44.0,
-35.4
]
}
},
{
"type": "Feature",
"properties": {
"name": "Lacus Felicitatis",
"description": "Lake of Happiness",
"diameter": 90
},
"geometry": {
"type": "Point",
"coordinates": [
5.0,
19.0
]
}
},
{
"type": "Feature",
"properties": {
"name": "Lacus Gaudii",
"description": "Lake of Joy",
"diameter": 113
},
"geometry": {
"type": "Point",
"coordinates": [
12.6,
16.2
]
}
},
{
"type": "Feature",
"properties": {
"name": "Lacus Hiemalis",
"description": "Lake of Winter",
"diameter": 50
},
"geometry": {
"type": "Point",
"coordinates": [
14.0,
15.0
]
}
},
{
"type": "Feature",
"properties": {
"name": "Lacus Lenitatis",
"description": "Lake of Softness",
"diameter": 80
},
"geometry": {
"type": "Point",
"coordinates": [
12.0,
14.0
]
}
},
{
"type": "Feature",
"properties": {
"name": "Lacus Luxuriae",
"description": "Lake of Luxury",
"diameter": 50
},
"geometry": {
"type": "Point",
"coordinates": [
176.0,
19.0
]
}
},
{
"type": "Feature",
"properties": {
"name": "Lacus Mortis",
"description": "Lake of Death",
"diameter": 151
},
"geometry": {
"type": "Point",
"coordinates": [
27.2,
45.0
]
}
},
{
"type": "Feature",
"properties": {
"name": "Lacus Oblivionis",
"description": "Lake of Forgetfulness",
"diameter": 50
},
"geometry": {
"type": "Point",
"coordinates": [
-168.0,
-21.0
]
}
},
{
"type": "Feature",
"properties": {
"name": "Lacus Odii",
"description": "Lake of Hatred",
"diameter": 70
},
"geometry": {
"type": "Point",
"coordinates": [
7.0,
19.0
]
}
},
{
"type": "Feature",
"properties": {
"name": "Lacus Perseverantiae",
"description": "Lake of Perseverance",
"diameter": 70
},
"geometry": {
"type": "Point",
"coordinates": [
62.0,
8.0
]
}
},
{
"type": "Feature",
"properties": {
"name": "Lacus Solitudinis",
"description": "Lake of Solitude",
"diameter": 139
},
"geometry": {
"type": "Point",
"coordinates": [
104.3,
-27.8
]
}
},
{
"type": "Feature",
"properties": {
"name": "Lacus Somniorum",
"description": "Lake of Dreams",
"diameter": 384
},
"geometry": {
"type": "Point",
"coordinates": [
29.2,
38.0
]
}
},
{
"type": "Feature",
"properties": {
"name": "Lacus Spei",
"description": "Lake of Hope",
"diameter": 80
},
"geometry": {
"type": "Point",
"coordinates": [
65.0,
43.0
]
}
},
{
"type": "Feature",
"properties": {
"name": "Lacus Temporis",
"description": "Lake of Time",
"diameter": 117
},
"geometry": {
"type": "Point",
"coordinates": [
58.4,
45.9
]
}
},
{
"type": "Feature",
"properties": {
"name": "Lacus Timoris",
"description": "Lake of Fear",
"diameter": 117
},
"geometry": {
"type": "Point",
"coordinates": [
-27.3,
-38.8
]
}
},
{
"type": "Feature",
"properties": {
"name": "Lacus Veris",
"description": "Lake of Spring",
"diameter": 396
},
"geometry": {
"type": "Point",
"coordinates": [
-86.1,
-16.5
]
}
}
]
}

350
sandbox/moon/mare.json Normal file
View File

@ -0,0 +1,350 @@
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"name": "Mare Anguis",
"description": "Serpent Sea",
"diameter": 150
},
"geometry": {
"type": "Point",
"coordinates": [
67.7,
22.6
]
}
},
{
"type": "Feature",
"properties": {
"name": "Mare Australe",
"description": "Southern Sea",
"diameter": 603
},
"geometry": {
"type": "Point",
"coordinates": [
93.0,
-38.9
]
}
},
{
"type": "Feature",
"properties": {
"name": "Mare Cognitum",
"description": "Sea of Knowledge",
"diameter": 376
},
"geometry": {
"type": "Point",
"coordinates": [
-23.1,
-10.0
]
}
},
{
"type": "Feature",
"properties": {
"name": "Mare Crisium",
"description": "Sea of Crises",
"diameter": 418
},
"geometry": {
"type": "Point",
"coordinates": [
59.1,
17.0
]
}
},
{
"type": "Feature",
"properties": {
"name": "Mare Fecunditatis",
"description": "Sea of Fecundity",
"diameter": 909
},
"geometry": {
"type": "Point",
"coordinates": [
51.3,
-7.8
]
}
},
{
"type": "Feature",
"properties": {
"name": "Mare Frigoris",
"description": "Sea of Cold",
"diameter": 1596
},
"geometry": {
"type": "Point",
"coordinates": [
1.4,
56.0
]
}
},
{
"type": "Feature",
"properties": {
"name": "Mare Humboldtianum",
"description": "Sea of Alexander von Humboldt",
"diameter": 273
},
"geometry": {
"type": "Point",
"coordinates": [
81.5,
56.8
]
}
},
{
"type": "Feature",
"properties": {
"name": "Mare Humorum",
"description": "Sea of Moisture or Humors",
"diameter": 389
},
"geometry": {
"type": "Point",
"coordinates": [
-38.6,
-24.4
]
}
},
{
"type": "Feature",
"properties": {
"name": "Mare Imbrium",
"description": "Sea of Showers",
"diameter": 1123
},
"geometry": {
"type": "Point",
"coordinates": [
-15.6,
32.8
]
}
},
{
"type": "Feature",
"properties": {
"name": "Mare Ingenii",
"description": "Sea of Cleverness",
"diameter": 318
},
"geometry": {
"type": "Point",
"coordinates": [
163.5,
-33.7
]
}
},
{
"type": "Feature",
"properties": {
"name": "Mare Insularum",
"description": "Sea of Islands",
"diameter": 513
},
"geometry": {
"type": "Point",
"coordinates": [
-30.9,
7.5
]
}
},
{
"type": "Feature",
"properties": {
"name": "Mare Marginis",
"description": "Sea of the Edge",
"diameter": 420
},
"geometry": {
"type": "Point",
"coordinates": [
86.1,
13.3
]
}
},
{
"type": "Feature",
"properties": {
"name": "Mare Moscoviense",
"description": "Sea of Moscow",
"diameter": 277
},
"geometry": {
"type": "Point",
"coordinates": [
147.9,
27.3
]
}
},
{
"type": "Feature",
"properties": {
"name": "Mare Nectaris",
"description": "Sea of Nectar",
"diameter": 333
},
"geometry": {
"type": "Point",
"coordinates": [
35.5,
-15.2
]
}
},
{
"type": "Feature",
"properties": {
"name": "Mare Nubium",
"description": "Sea of Clouds",
"diameter": 715
},
"geometry": {
"type": "Point",
"coordinates": [
-16.6,
-21.3
]
}
},
{
"type": "Feature",
"properties": {
"name": "Mare Orientale",
"description": "Eastern Sea",
"diameter": 327
},
"geometry": {
"type": "Point",
"coordinates": [
-92.8,
-19.4
]
}
},
{
"type": "Feature",
"properties": {
"name": "Mare Serenitatis",
"description": "Sea of Serenity",
"diameter": 707
},
"geometry": {
"type": "Point",
"coordinates": [
17.5,
28.0
]
}
},
{
"type": "Feature",
"properties": {
"name": "Mare Smythii",
"description": "Smyth's Sea",
"diameter": 373
},
"geometry": {
"type": "Point",
"coordinates": [
87.5,
1.3
]
}
},
{
"type": "Feature",
"properties": {
"name": "Mare Spumans",
"description": "Foaming Sea",
"diameter": 139
},
"geometry": {
"type": "Point",
"coordinates": [
65.1,
1.1
]
}
},
{
"type": "Feature",
"properties": {
"name": "Mare Tranquillitatis",
"description": "Sea of Tranquility",
"diameter": 873
},
"geometry": {
"type": "Point",
"coordinates": [
31.4,
8.5
]
}
},
{
"type": "Feature",
"properties": {
"name": "Mare Undarum",
"description": "Sea of Waves",
"diameter": 243
},
"geometry": {
"type": "Point",
"coordinates": [
68.4,
6.8
]
}
},
{
"type": "Feature",
"properties": {
"name": "Mare Vaporum",
"description": "Sea of Vapors",
"diameter": 245
},
"geometry": {
"type": "Point",
"coordinates": [
3.6,
13.3
]
}
},
{
"type": "Feature",
"properties": {
"name": "Oceanus Procellarum",
"description": "Ocean of Storms",
"diameter": 2568
},
"geometry": {
"type": "Point",
"coordinates": [
-57.4,
18.4
]
}
}
]
}

View File

@ -28,15 +28,12 @@
LonLat
} from "../../lib/@openglobus/og.esm.js";
const mountains = new Vector("Mountains",{
const mountains = new Vector("Mountains", {
fading: true
});
const mountains2 = new Vector("Mountains");
const catena = new Vector("Catena");
const lacus = new Vector("Lacus");
const maria = new Vector("maria");
const vallis = new Vector("vallis");
const sinusAndPaludes = new Vector("Sinus and Paludes");
//const lacus = new Vector("Lacus");
const maria = new Vector("Seas And Oceans");
//const vallis = new Vector("vallis");
const sat = new XYZ("moon", {
isBaseLayer: true,
@ -60,7 +57,6 @@
maxZoom: 7,
//maxNativeZoom: 7,
url: "https://{s}.terrain.openglobus.org/moon/dem/{z}/{x}/{y}.png",
//url: "./dem/{z}/{x}/{y}.png",
heightFactor: 0.5,
minHeight: -20000,
resolution: 0.1021
@ -72,7 +68,7 @@
quadTreeStrategyPrototype: quadTreeStrategyType.equi,
target: "globus",
terrain: highResTerrain,
layers: [sat, appoloSat, mountains],
layers: [sat, appoloSat, mountains, maria],
nightTextureSrc: null,
specularTextureSrc: null,
atmosphereEnabled: false,
@ -102,16 +98,6 @@
mountains.setEntities(entities);
});
fetch("./catena.json").then((r) => r.json()).then((data) => {
let entities = data.features.map((f) => createLabelEntity(
new LonLat(f.geometry.coordinates[0], f.geometry.coordinates[1]),
f.properties.name,
"Ephesis-Regular",
21)
);
catena.setEntities(entities);
});
fetch("./lacus.json").then((r) => r.json()).then((data) => {
let entities = data.features.map((f) => createLabelEntity(
new LonLat(f.geometry.coordinates[0], f.geometry.coordinates[1]),
@ -122,13 +108,13 @@
lacus.setEntities(entities);
});
fetch("./maria.json").then((r) => r.json()).then((data) => {
let entities = data.features.map((f) => createLabelEntity(
new LonLat(f.geometry.coordinates[0], f.geometry.coordinates[1]),
f.properties.name,
"Ephesis-Regular",
21)
"Karla-Medium",
35,
false)
);
maria.setEntities(entities);
});
@ -143,17 +129,14 @@
vallis.setEntities(entities);
});
fetch("./sinus_and_paludes.json").then((r) => r.json()).then((data) => {
let entities = data.features.map((f) => createLabelEntity(
new LonLat(f.geometry.coordinates[0], f.geometry.coordinates[1]),
f.properties.name,
"Ephesis-Regular",
21)
);
sinusAndPaludes.setEntities(entities);
});
function createLabelEntity(lonlat, text, fontFace = "Ephesis-Regular", fontSize = 21) {
function createLabelEntity(
lonlat,
text,
fontFace = "Ephesis-Regular",
fontSize = 21,
showSpin = true,
color = "white"
) {
const ell = globe.planet.ellipsoid;
let ll = new LonLat(lonlat.lon, lonlat.lat, 15000);
@ -165,7 +148,8 @@
face: fontFace,
text: text,
align: "center",
offset: [0, fontSize + 3]
offset: [0, fontSize + 3],
color: color
}
});
@ -174,17 +158,19 @@
ll.height = h + 10000;
let ray = new Entity({
ray: {
startPosition: ell.lonLatToCartesian(new LonLat(ll.lon, ll.lat, h)),
endPosition: ell.lonLatToCartesian(ll),
startColor: "white",
endColor: "white",
thickness: 3
}
});
if (showSpin) {
let ray = new Entity({
ray: {
startPosition: ell.lonLatToCartesian(new LonLat(ll.lon, ll.lat, h)),
endPosition: ell.lonLatToCartesian(ll),
startColor: "white",
endColor: "white",
thickness: 3
}
});
res.appendChild(ray);
}
res.appendChild(ray);
res.setLonLat(ll);
});

197
sandbox/moon/vallis.json Normal file
View File

@ -0,0 +1,197 @@
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"name": "Vallis Alpes",
"description": "Latin name meaning 'Alpine valley'",
"length_km": 166,
"named_after": null
},
"geometry": {
"type": "Point",
"coordinates": [
3.2,
48.5
]
}
},
{
"type": "Feature",
"properties": {
"name": "Vallis Baade",
"description": "Named after Walter Baade",
"length_km": 203,
"named_after": "Baade"
},
"geometry": {
"type": "Point",
"coordinates": [
-76.2,
-45.9
]
}
},
{
"type": "Feature",
"properties": {
"name": "Vallis Bohr",
"description": "Named after Niels Bohr",
"length_km": 80,
"named_after": "Bohr"
},
"geometry": {
"type": "Point",
"coordinates": [
-86.6,
12.4
]
}
},
{
"type": "Feature",
"properties": {
"name": "Vallis Bouvard",
"description": "Named after Alexis Bouvard",
"length_km": 284,
"named_after": null
},
"geometry": {
"type": "Point",
"coordinates": [
-83.1,
-38.3
]
}
},
{
"type": "Feature",
"properties": {
"name": "Vallis Capella",
"description": "Named after Martianus Capella",
"length_km": 49,
"named_after": "Capella"
},
"geometry": {
"type": "Point",
"coordinates": [
34.9,
-7.6
]
}
},
{
"type": "Feature",
"properties": {
"name": "Vallis Inghirami",
"description": "Named after Giovanni Inghirami",
"length_km": 148,
"named_after": "Inghirami"
},
"geometry": {
"type": "Point",
"coordinates": [
-72.2,
-43.8
]
}
},
{
"type": "Feature",
"properties": {
"name": "Vallis Palitzsch",
"description": "Named after Johann Palitzsch",
"length_km": 132,
"named_after": "Palitzsch"
},
"geometry": {
"type": "Point",
"coordinates": [
64.3,
-26.4
]
}
},
{
"type": "Feature",
"properties": {
"name": "Vallis Planck",
"description": "Named after Max Planck",
"length_km": 451,
"named_after": "Planck"
},
"geometry": {
"type": "Point",
"coordinates": [
126.1,
-58.4
]
}
},
{
"type": "Feature",
"properties": {
"name": "Vallis Rheita",
"description": "Named after Anton Maria Schyrleus of Rheita",
"length_km": 445,
"named_after": "Rheita"
},
"geometry": {
"type": "Point",
"coordinates": [
51.5,
-42.5
]
}
},
{
"type": "Feature",
"properties": {
"name": "Vallis Schr\u00f6dinger",
"description": "Named after Erwin Schr\u00f6dinger",
"length_km": 310,
"named_after": "Schr\u00f6dinger"
},
"geometry": {
"type": "Point",
"coordinates": [
105.0,
-67.0
]
}
},
{
"type": "Feature",
"properties": {
"name": "Vallis Schr\u00f6teri",
"description": "Named after Johann Hieronymus Schr\u00f6ter",
"length_km": 168,
"named_after": "Schr\u00f6ter"
},
"geometry": {
"type": "Point",
"coordinates": [
-50.8,
26.2
]
}
},
{
"type": "Feature",
"properties": {
"name": "Vallis Snellius",
"description": "Named after Willebrord Snell",
"length_km": 592,
"named_after": "Snellius"
},
"geometry": {
"type": "Point",
"coordinates": [
56.0,
-31.1
]
}
}
]
}

View File

@ -20,7 +20,11 @@ const globus = new Globe({
frustums: [[1,101100],[100000,1000000000]],
target: "earth",
name: "Earth",
terrain: new GlobusRgbTerrain(),
terrain: new RgbTerrain("",{
//maxNativeZoom: 6,
maxZoom: 18,
url: "https://{s}.terrain.openglobus.org/kingcounty/{z}/{x}/{y}.png",
}),
layers: [osm],
atmosphereEnabled: false,
fontsSrc: "../../res/fonts",

View File

@ -523,6 +523,8 @@ class LabelHandler extends BaseBillboardHandler {
}
}
offset += 5;
// 49/512 - font atlas left border letter offset
if (align === ALIGN.CENTER) {
offset *= -0.5;