Compare commits
32 Commits
04ba735ea6
...
0.0.4
Author | SHA1 | Date | |
---|---|---|---|
2ac5a3d4f0 | |||
5f78a1afde | |||
ef5cf78a03 | |||
b60e62af70 | |||
3e59fe1462 | |||
4b4bf5ed65 | |||
a4f78b3a95 | |||
074a58dabd | |||
a2ef175a81 | |||
915ba55c2e | |||
f154a2a468 | |||
c52d438d40 | |||
8d3f53ba13 | |||
1db25e62e7 | |||
18312176d9 | |||
5be6e32b03 | |||
b33e5ca223 | |||
fe4430b1bf | |||
5a48073152 | |||
41c1e6f9fd | |||
0743fa45eb | |||
7f2c0d2e23 | |||
14202714cc | |||
ce0c23805a | |||
75124a4f62 | |||
9193eb9c8c | |||
c0b3449cc8 | |||
d986418927 | |||
0adea1a325 | |||
399fb577f3 | |||
c3cd512611 | |||
f783d45e23 |
@@ -56,7 +56,7 @@ namespace Cryville.Common.Unity.UI {
|
||||
const float _placeholderLength = 100;
|
||||
int _firstIndex, _lastIndex;
|
||||
readonly Stack<GameObject> _pool = new();
|
||||
void Update() {
|
||||
void LateUpdate() {
|
||||
int axis = (int)m_direction;
|
||||
int sign = m_direction == 0 ? 1 : -1;
|
||||
float padding = axis == 0 ? m_padding.left : m_padding.top;
|
||||
|
3
Assets/Cryville.EEW.Unity/AssemblyInfo.cs
Normal file
3
Assets/Cryville.EEW.Unity/AssemblyInfo.cs
Normal file
@@ -0,0 +1,3 @@
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: AssemblyVersion("0.0.4")]
|
11
Assets/Cryville.EEW.Unity/AssemblyInfo.cs.meta
Normal file
11
Assets/Cryville.EEW.Unity/AssemblyInfo.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c468580e7742d414e96822c2dfe6e4b4
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -1,10 +1,10 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Cryville.EEW.Unity {
|
||||
record Config(
|
||||
string SeverityScheme,
|
||||
string SeverityColorMapping,
|
||||
float SeverityColorMappingLuminanceMultiplier,
|
||||
bool UseContinuousColor,
|
||||
string ColorScheme,
|
||||
@@ -13,10 +13,11 @@ namespace Cryville.EEW.Unity {
|
||||
bool DoDisplayTimeZone,
|
||||
bool DoSwitchBackToHistory,
|
||||
|
||||
string OverrideDisplayCulture,
|
||||
|
||||
IReadOnlyCollection<EventSourceConfig> EventSources
|
||||
) {
|
||||
public static Config Default => new(
|
||||
"Default",
|
||||
"Default",
|
||||
1f,
|
||||
false,
|
||||
@@ -26,29 +27,37 @@ namespace Cryville.EEW.Unity {
|
||||
true,
|
||||
true,
|
||||
|
||||
"",
|
||||
|
||||
new List<EventSourceConfig> {
|
||||
new JMAAtomEventSourceConfig(),
|
||||
new JMAAtomEventSourceConfig(Array.Empty<string>()),
|
||||
new UpdateCheckerEventSourceConfig(),
|
||||
new WolfxEventSourceConfig(),
|
||||
new WolfxEventSourceConfig(Array.Empty<string>()),
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
[JsonPolymorphic(TypeDiscriminatorPropertyName = "Type", UnknownDerivedTypeHandling = JsonUnknownDerivedTypeHandling.FallBackToBaseType)]
|
||||
[JsonDerivedType(typeof(BMKGOpenDataEventSourceConfig), "BMKGOpenData")]
|
||||
[JsonDerivedType(typeof(CWAOpenDataEventSourceConfig), "CWAOpenData")]
|
||||
[JsonDerivedType(typeof(EMSCRealTimeEventSourceConfig), "EMSCRealTime")]
|
||||
[JsonDerivedType(typeof(GlobalQuakeServerEventSourceConfig), "GlobalQuakeServer")]
|
||||
[JsonDerivedType(typeof(GlobalQuakeServer15EventSourceConfig), "GlobalQuakeServer15")]
|
||||
[JsonDerivedType(typeof(JMAAtomEventSourceConfig), "JMAAtom")]
|
||||
[JsonDerivedType(typeof(NOAAEventSourceConfig), "NOAA")]
|
||||
[JsonDerivedType(typeof(UpdateCheckerEventSourceConfig), "UpdateChecker")]
|
||||
[JsonDerivedType(typeof(USGSQuakeMLEventSourceConfig), "USGSQuakeML")]
|
||||
[JsonDerivedType(typeof(WolfxEventSourceConfig), "Wolfx")]
|
||||
abstract record EventSourceConfig();
|
||||
record BMKGOpenDataEventSourceConfig([property: JsonRequired] string[] Subtypes) : EventSourceConfig;
|
||||
record CWAOpenDataEventSourceConfig([property: JsonRequired] string Subtype, [property: JsonRequired] string Token) : EventSourceConfig;
|
||||
record EMSCRealTimeEventSourceConfig() : EventSourceConfig;
|
||||
record GlobalQuakeServerEventSourceConfig([property: JsonRequired] string Host, int Port = 38000) : EventSourceConfig;
|
||||
record GlobalQuakeServer15EventSourceConfig(string Host, int Port = 38000) : GlobalQuakeServerEventSourceConfig(Host, Port);
|
||||
record JMAAtomEventSourceConfig(IReadOnlyCollection<string> Filter = null, bool IsFilterWhitelist = false) : EventSourceConfig;
|
||||
record NOAAEventSourceConfig([property: JsonRequired] string Subtype) : EventSourceConfig;
|
||||
record UpdateCheckerEventSourceConfig : EventSourceConfig;
|
||||
record USGSQuakeMLEventSourceConfig([property: JsonRequired] string Subtype) : EventSourceConfig;
|
||||
record WolfxEventSourceConfig(IReadOnlyCollection<string> Filter = null, bool IsFilterWhitelist = false) : EventSourceConfig;
|
||||
|
||||
[JsonSerializable(typeof(Config))]
|
||||
|
@@ -15,18 +15,27 @@ namespace Cryville.EEW.Unity.Map {
|
||||
MapElementManager m_layerElementSub;
|
||||
[SerializeField]
|
||||
GameObject m_prefabTile;
|
||||
[SerializeField]
|
||||
GameObject m_prefabBitmapHolder;
|
||||
[SerializeField]
|
||||
int m_maxMapTileZoom = 10;
|
||||
[SerializeField]
|
||||
bool m_isEditor;
|
||||
|
||||
readonly MapTileCacheManager _tiles = new();
|
||||
MapTileCacheManager _tiles;
|
||||
float _elementLayerZ;
|
||||
|
||||
void Start() {
|
||||
_camera = GetComponent<Camera>();
|
||||
_tiles = m_isEditor ? new EditorMapTileCacheManager() : new MapTileCacheManager();
|
||||
_tiles.ExtraCachedZoomLevel = 20;
|
||||
_tiles.Parent = m_layerTile;
|
||||
_tiles.PrefabTile = m_prefabTile;
|
||||
_tiles.PrefabBitmapHolder = m_prefabBitmapHolder;
|
||||
_tiles.CacheDir = Application.temporaryCachePath;
|
||||
_camera.orthographicSize = 0.5f / MathF.Max(1, (float)_camera.pixelWidth / _camera.pixelHeight);
|
||||
_elementLayerZ = m_layerElement.transform.position.z;
|
||||
UpdateTransform();
|
||||
if (m_layerElement != null) _elementLayerZ = m_layerElement.transform.position.z;
|
||||
_mapElementUpdated = true;
|
||||
}
|
||||
void OnDestroy() {
|
||||
_tiles.Dispose();
|
||||
@@ -39,7 +48,9 @@ namespace Cryville.EEW.Unity.Map {
|
||||
|
||||
static readonly Rect _viewportRect = new(0, 0, 1, 1);
|
||||
Vector3? ppos;
|
||||
bool _mapElementUpdated;
|
||||
void Update() {
|
||||
bool flag = false;
|
||||
var cpos = Input.mousePosition;
|
||||
bool isMouseInViewport = _viewportRect.Contains(_camera.ScreenToViewportPoint(Input.mousePosition));
|
||||
if (Input.GetMouseButtonDown(0) && isMouseInViewport) {
|
||||
@@ -49,19 +60,26 @@ namespace Cryville.EEW.Unity.Map {
|
||||
var delta = _camera.ScreenToWorldPoint(pos0) - _camera.ScreenToWorldPoint(cpos);
|
||||
transform.position += delta;
|
||||
ppos = cpos;
|
||||
UpdateTransform();
|
||||
flag = true;
|
||||
}
|
||||
if (Input.GetMouseButtonUp(0)) {
|
||||
ppos = null;
|
||||
}
|
||||
if (Input.mouseScrollDelta.y != 0 && isMouseInViewport) {
|
||||
Scale *= Mathf.Pow(2, -Input.mouseScrollDelta.y / 8);
|
||||
UpdateTransform();
|
||||
flag = true;
|
||||
}
|
||||
if (_mapElementUpdated) {
|
||||
_mapElementUpdated = false;
|
||||
ZoomToMapElement();
|
||||
flag = true;
|
||||
}
|
||||
if (flag) {
|
||||
UpdateTransform(); // Ensure UpdateTransform is called at most once per frame for tiles to unload correctly
|
||||
}
|
||||
}
|
||||
|
||||
public void OnMapElementUpdated() {
|
||||
var aabb = m_layerElement.AABB;
|
||||
void ZoomToMapElement() {
|
||||
var aabb = m_layerElement != null ? m_layerElement.AABB : null;
|
||||
if (aabb is not RectangleF b) return;
|
||||
if (b.Width * _camera.pixelHeight < _camera.pixelWidth * b.Height)
|
||||
Scale = b.Height;
|
||||
@@ -70,7 +88,9 @@ namespace Cryville.EEW.Unity.Map {
|
||||
Scale *= 0.6f;
|
||||
if (Scale < 0.01f) Scale = 0.01f;
|
||||
transform.localPosition = new PointF(b.X + b.Width / 2, b.Y + b.Height / 2).ToVector2();
|
||||
UpdateTransform();
|
||||
}
|
||||
public void OnMapElementUpdated() {
|
||||
_mapElementUpdated = true;
|
||||
}
|
||||
|
||||
void UpdateTransform() {
|
||||
@@ -82,26 +102,30 @@ namespace Cryville.EEW.Unity.Map {
|
||||
transform.localPosition = new(nx, Math.Clamp(transform.position.y, h / 2 - 1, -h / 2), -20);
|
||||
|
||||
var bounds = new Bounds((Vector2)transform.position, new Vector2(w, h));
|
||||
int zoom = Math.Clamp((int)Math.Log(vz / 256, 2) + 1, 0, 10);
|
||||
int zoom = Math.Clamp((int)Math.Log(vz / 256, 2) + 1, 0, m_maxMapTileZoom);
|
||||
int zoomScale = 1 << zoom;
|
||||
_tiles.MoveTo(
|
||||
new(Mathf.FloorToInt(bounds.min.x * zoomScale), Mathf.FloorToInt(-bounds.max.y * zoomScale), zoom),
|
||||
new(Mathf.CeilToInt(bounds.max.x * zoomScale), Mathf.CeilToInt(-bounds.min.y * zoomScale), zoom)
|
||||
);
|
||||
|
||||
m_layerElement.Scale = h;
|
||||
m_layerElementSub.Scale = h;
|
||||
if (m_layerElement != null) {
|
||||
m_layerElement.Scale = h;
|
||||
}
|
||||
if (m_layerElementSub != null) {
|
||||
m_layerElementSub.Scale = h;
|
||||
|
||||
if (nx - w / 2 < 0) {
|
||||
m_layerElementSub.gameObject.SetActive(true);
|
||||
m_layerElementSub.transform.localPosition = new(-1, 0, _elementLayerZ);
|
||||
}
|
||||
else if (nx + w / 2 > 1) {
|
||||
m_layerElementSub.gameObject.SetActive(true);
|
||||
m_layerElementSub.transform.localPosition = new(1, 0, _elementLayerZ);
|
||||
}
|
||||
else {
|
||||
m_layerElementSub.gameObject.SetActive(false);
|
||||
if (nx - w / 2 < 0) {
|
||||
m_layerElementSub.gameObject.SetActive(true);
|
||||
m_layerElementSub.transform.localPosition = new(-1, 0, _elementLayerZ);
|
||||
}
|
||||
else if (nx + w / 2 > 1) {
|
||||
m_layerElementSub.gameObject.SetActive(true);
|
||||
m_layerElementSub.transform.localPosition = new(1, 0, _elementLayerZ);
|
||||
}
|
||||
else {
|
||||
m_layerElementSub.gameObject.SetActive(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -4,7 +4,7 @@ MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
executionOrder: 5
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
|
15
Assets/Cryville.EEW.Unity/Map/EditorMapTileCacheManager.cs
Normal file
15
Assets/Cryville.EEW.Unity/Map/EditorMapTileCacheManager.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using Cryville.EEW.Core.Map;
|
||||
using System.IO;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Cryville.EEW.Unity.Map {
|
||||
sealed class EditorMapTileCacheManager : MapTileCacheManager {
|
||||
protected override MapTileBitmapHolder CreateBitmapHolder(MapTileIndex index) => new(
|
||||
index,
|
||||
GameObject.Instantiate(PrefabBitmapHolder, Parent, false),
|
||||
new($"https://tile.openstreetmap.org/{index.Z}/{index.NX}/{index.NY}.png")
|
||||
);
|
||||
|
||||
protected override string GetCacheFilePath(MapTileIndex index) => Path.Combine(CacheDir, $"map_editor/{index.Z}/{index.NX}/{index.NY}");
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 478198b8ecc0082449fa3f68795174a9
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -98,24 +98,25 @@ namespace Cryville.EEW.Unity.Map.Element {
|
||||
for (int d = 0; d < 360; d++) {
|
||||
Quaternion q = Quaternion.AngleAxis(d, axis);
|
||||
Vector3 p = q * rp;
|
||||
Vector2 p2 = ToTilePos(p).ToVector2();
|
||||
if (lp2 != null) {
|
||||
float dx = p2.x - lp2.Value.x;
|
||||
if (MathF.Abs(dx) >= 0.5) {
|
||||
_vertexBuffer[d] = p2.x < 0.5 ? p2 + new Vector2(1, 0) : p2 - new Vector2(1, 0);
|
||||
renderer.AddSegment(_vertexBuffer, segmentIndex, d - segmentIndex + 1);
|
||||
segmentIndex = d;
|
||||
}
|
||||
}
|
||||
_vertexBuffer[d] = p2;
|
||||
lp2 = p2;
|
||||
AddVertex(renderer, ref lp2, ref segmentIndex, d, p);
|
||||
}
|
||||
Vector2 rp2 = ToTilePos(rp).ToVector2();
|
||||
_vertexBuffer[360] = rp2;
|
||||
AddVertex(renderer, ref lp2, ref segmentIndex, 360, rp);
|
||||
renderer.AddSegment(_vertexBuffer, segmentIndex, 361 - segmentIndex);
|
||||
}
|
||||
renderer.SetMaterial(isHistory ? m_historyMaterial : m_ongoingMaterial);
|
||||
}
|
||||
|
||||
void AddVertex(MultiLineRenderer renderer, ref Vector2? lp2, ref int segmentIndex, int d, Vector3 p) {
|
||||
Vector2 p2 = ToTilePos(p).ToVector2();
|
||||
if (lp2 != null && MathF.Abs(p2.x - lp2.Value.x) >= 0.5) {
|
||||
_vertexBuffer[d] = p2.x < 0.5 ? p2 + new Vector2(1, 0) : p2 - new Vector2(1, 0);
|
||||
renderer.AddSegment(_vertexBuffer, segmentIndex, d - segmentIndex + 1);
|
||||
segmentIndex = d;
|
||||
}
|
||||
_vertexBuffer[d] = p2;
|
||||
lp2 = p2;
|
||||
}
|
||||
|
||||
static PointF ToTilePos(Vector3 p) => MapTileUtils.WorldToTilePos(new(MathF.Atan2(p.z, p.x) / MathF.PI * 180f, MathF.Asin(p.y) / MathF.PI * 180f));
|
||||
}
|
||||
}
|
||||
|
@@ -150,12 +150,8 @@ namespace Cryville.EEW.Unity.Map {
|
||||
_mesh.Clear();
|
||||
if (_positions == null) return;
|
||||
if (_positionCount <= 1) return;
|
||||
float hw = m_width / 2;
|
||||
int maxVertexCount = 4 * (_positionCount - 1);
|
||||
var vbuf = ArrayPool<Vector3>.Shared.Rent(maxVertexCount);
|
||||
var ubuf = ArrayPool<Vector2>.Shared.Rent(maxVertexCount);
|
||||
var ibuf = ArrayPool<int>.Shared.Rent(3 * (2 + 4 * (_positionCount - 2)));
|
||||
|
||||
float hw = m_width / 2;
|
||||
int i, vi = 0, ii = 0, li = 0, ri = 1;
|
||||
float uvScale = 1 / (m_tilingScale * m_width);
|
||||
Vector2 p0 = _positions[0], p1 = default;
|
||||
@@ -163,6 +159,12 @@ namespace Cryville.EEW.Unity.Map {
|
||||
if ((p1 = _positions[i]) != p0) break;
|
||||
}
|
||||
if (i >= _positionCount) return;
|
||||
|
||||
int maxVertexCount = 4 * (_positionCount - 1);
|
||||
var vbuf = ArrayPool<Vector3>.Shared.Rent(maxVertexCount);
|
||||
var ubuf = ArrayPool<Vector2>.Shared.Rent(maxVertexCount);
|
||||
var ibuf = ArrayPool<int>.Shared.Rent(3 * (2 + 4 * (_positionCount - 2)));
|
||||
|
||||
Vector2 dp0 = NormalizeSmallVector(p1 - p0), np0 = GetNormal(dp0 * hw);
|
||||
vbuf[vi] = p0 - np0; ubuf[vi++] = new(0, 0);
|
||||
vbuf[vi] = p0 + np0; ubuf[vi++] = new(0, 1);
|
||||
|
@@ -1,9 +1,12 @@
|
||||
using Cryville.EEW.BMKGOpenData.Map;
|
||||
using Cryville.EEW.Core;
|
||||
using Cryville.EEW.CWAOpenData.Map;
|
||||
using Cryville.EEW.EMSC.Map;
|
||||
using Cryville.EEW.GlobalQuake.Map;
|
||||
using Cryville.EEW.JMAAtom.Map;
|
||||
using Cryville.EEW.Map;
|
||||
using Cryville.EEW.NOAA.Map;
|
||||
using Cryville.EEW.QuakeML.Map;
|
||||
using Cryville.EEW.Report;
|
||||
using Cryville.EEW.Wolfx.Map;
|
||||
using System.Collections.Generic;
|
||||
@@ -23,6 +26,7 @@ namespace Cryville.EEW.Unity.Map {
|
||||
readonly List<int> _displayingOrder = new();
|
||||
|
||||
public int Count => _displayingReports.Count;
|
||||
public int OngoingCount => _displayingReports.Count - (_selected != null ? 1 : 0);
|
||||
|
||||
[SerializeField] MapElementManager m_subManager;
|
||||
|
||||
@@ -39,19 +43,39 @@ namespace Cryville.EEW.Unity.Map {
|
||||
return _displayingElements[index].AABB;
|
||||
}
|
||||
|
||||
public void SetSelected(ReportViewModel e) {
|
||||
if (_selected is not null)
|
||||
public void SetSelected(ReportViewModel e, bool forced = false) {
|
||||
if (e == null) {
|
||||
Remove(_selected);
|
||||
if (e == null || _displayingReports.Contains(e)) {
|
||||
_selected = null;
|
||||
return;
|
||||
}
|
||||
if (_displayingReports.Contains(e)) {
|
||||
if (forced) return;
|
||||
Remove(_selected);
|
||||
_selected = null;
|
||||
return;
|
||||
}
|
||||
if (e.IsExcludedFromHistory)
|
||||
return;
|
||||
if (!Add(e))
|
||||
return;
|
||||
if (_selected is not null)
|
||||
Remove(_selected);
|
||||
_selected = e;
|
||||
}
|
||||
public void SetCurrent(ReportViewModel e) {
|
||||
public bool SetCurrent(ReportViewModel e) {
|
||||
if (e == null) {
|
||||
_current = null;
|
||||
return true;
|
||||
}
|
||||
if (!_displayingReports.Contains(e)) {
|
||||
_current = null;
|
||||
return false;
|
||||
}
|
||||
if (_current == e)
|
||||
return false;
|
||||
_current = e;
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool Add(ReportViewModel e) {
|
||||
@@ -68,6 +92,7 @@ namespace Cryville.EEW.Unity.Map {
|
||||
return true;
|
||||
}
|
||||
public void Remove(ReportViewModel e) {
|
||||
if (_current == e) _current = null;
|
||||
int index = _displayingReports.IndexOf(e);
|
||||
if (index == -1) return;
|
||||
_displayingElements.RemoveAt(index);
|
||||
@@ -102,16 +127,19 @@ namespace Cryville.EEW.Unity.Map {
|
||||
}
|
||||
|
||||
readonly ContextedGeneratorManager<IMapGeneratorContext, MapElement> _gen = new(new IContextedGenerator<IMapGeneratorContext, MapElement>[] {
|
||||
new BMKGEarthquakeMapGenerator(),
|
||||
new CENCEarthquakeMapGenerator(),
|
||||
new CENCEEWMapGenerator(),
|
||||
new CWAEarthquakeMapGenerator(),
|
||||
new CWAEEWMapGenerator(),
|
||||
new CWATsunamiMapGenerator(),
|
||||
new EMSCRealTimeEventMapGenerator(),
|
||||
new FujianEEWMapGenerator(),
|
||||
new GlobalQuakeMapViewGenerator(),
|
||||
new JMAAtomMapGenerator(),
|
||||
new JMAEEWMapGenerator(),
|
||||
new NOAAMapGenerator(),
|
||||
new QuakeMLEventMapGenerator(),
|
||||
new SichuanEEWMapGenerator(),
|
||||
});
|
||||
public UnityMapElement Build(object e, out CultureInfo culture, out int order) {
|
||||
|
@@ -1,44 +1,21 @@
|
||||
using Cryville.EEW.Core.Map;
|
||||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.IO;
|
||||
using System.Net.Http;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Networking;
|
||||
|
||||
namespace Cryville.EEW.Unity.Map {
|
||||
[RequireComponent(typeof(SpriteRenderer))]
|
||||
sealed class MapTile : MonoBehaviour {
|
||||
static readonly SemaphoreSlim _semaphore = new(2);
|
||||
|
||||
static readonly HttpClient _httpClient = new() { Timeout = TimeSpan.FromSeconds(10) };
|
||||
|
||||
[SerializeField] Transform _idView;
|
||||
|
||||
public MapTileIndex Index { get; set; }
|
||||
public bool IsEmpty { get; private set; }
|
||||
|
||||
Action<MapTile> _callback;
|
||||
|
||||
SpriteRenderer _renderer;
|
||||
|
||||
UnityWebRequest _req;
|
||||
DownloadHandlerTexture _texHandler;
|
||||
Texture2D _tex;
|
||||
Sprite _sprite;
|
||||
|
||||
void Awake() {
|
||||
_renderer = GetComponent<SpriteRenderer>();
|
||||
}
|
||||
|
||||
FileInfo _localFile;
|
||||
bool _downloadDone;
|
||||
public void Load(MapTileIndex index, string cacheDir, Action<MapTile> onUpdated) {
|
||||
public void Init(MapTileIndex index) {
|
||||
Index = index;
|
||||
_callback = onUpdated;
|
||||
_localFile = new(Path.Combine(cacheDir, $"map/{Index.Z}/{Index.NX}/{Index.NY}"));
|
||||
float z = 1 << index.Z;
|
||||
transform.localPosition = new(index.X / z, -(index.Y + 1) / z, -index.Z / 100f);
|
||||
transform.localScale = new Vector3(1 / z, 1 / z, 1);
|
||||
@@ -46,71 +23,22 @@ namespace Cryville.EEW.Unity.Map {
|
||||
byte e = SharedSettings.Instance.IdBytes[((index.X << 2) + index.Y) & 0x1f];
|
||||
int ex = e >> 4, ey = e & 0xf;
|
||||
_idView.localPosition = new(ex / 16f, 1 - ey / 16f, -1 / 200f);
|
||||
if (_localFile.Exists) {
|
||||
_downloadDone = true;
|
||||
}
|
||||
else {
|
||||
Task.Run(() => RunAsync($"https://server.arcgisonline.com/ArcGIS/rest/services/Ocean/World_Ocean_Base/MapServer/tile/{Index.Z}/{Index.NY}/{Index.NX}"));
|
||||
}
|
||||
}
|
||||
async Task RunAsync(string url) {
|
||||
await _semaphore.WaitAsync().ConfigureAwait(true);
|
||||
try {
|
||||
Directory.CreateDirectory(_localFile.DirectoryName);
|
||||
using var webStream = await _httpClient.GetStreamAsync(new Uri(url)).ConfigureAwait(true);
|
||||
using var fileStream = new FileStream(_localFile.FullName, FileMode.Create, FileAccess.Write);
|
||||
await webStream.CopyToAsync(fileStream).ConfigureAwait(true);
|
||||
}
|
||||
finally {
|
||||
_semaphore.Release();
|
||||
}
|
||||
_downloadDone = true;
|
||||
}
|
||||
|
||||
[SuppressMessage("CodeQuality", "IDE0051", Justification = "Unity message")]
|
||||
public void Set(Sprite sprite) {
|
||||
if (_renderer) {
|
||||
_renderer.sprite = sprite;
|
||||
}
|
||||
}
|
||||
|
||||
bool _isDestroyed;
|
||||
public void Destroy() {
|
||||
_isDestroyed = true;
|
||||
}
|
||||
void Update() {
|
||||
if (_downloadDone) {
|
||||
try {
|
||||
_texHandler = new DownloadHandlerTexture();
|
||||
_req = new UnityWebRequest($"file:///{_localFile}") {
|
||||
downloadHandler = _texHandler,
|
||||
disposeDownloadHandlerOnDispose = true,
|
||||
};
|
||||
_req.SendWebRequest();
|
||||
}
|
||||
catch (Exception ex) {
|
||||
Debug.LogException(ex);
|
||||
}
|
||||
_downloadDone = false;
|
||||
if (_isDestroyed) {
|
||||
Destroy(gameObject);
|
||||
}
|
||||
if (_req == null || !_req.isDone) return;
|
||||
if (_texHandler.isDone) {
|
||||
_tex = _texHandler.texture;
|
||||
_tex.wrapMode = TextureWrapMode.Clamp;
|
||||
_sprite = Sprite.Create(_tex, new Rect(0, 0, _tex.width, _tex.height), Vector2.zero, _tex.height, 0, SpriteMeshType.FullRect, Vector4.zero, false);
|
||||
_renderer.sprite = _sprite;
|
||||
}
|
||||
else {
|
||||
Debug.LogError(_req.error);
|
||||
_localFile.Delete();
|
||||
IsEmpty = true;
|
||||
}
|
||||
_req.Dispose();
|
||||
_req = null;
|
||||
_callback?.Invoke(this);
|
||||
}
|
||||
|
||||
[SuppressMessage("CodeQuality", "IDE0051", Justification = "Unity message")]
|
||||
void OnDestroy() {
|
||||
if (_req != null) {
|
||||
_req.Abort();
|
||||
_req.Dispose();
|
||||
_texHandler.Dispose();
|
||||
}
|
||||
if (_sprite) Destroy(_sprite);
|
||||
if (_tex) Destroy(_tex);
|
||||
IsEmpty = true;
|
||||
_callback?.Invoke(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
36
Assets/Cryville.EEW.Unity/Map/MapTileBitmapHolder.cs
Normal file
36
Assets/Cryville.EEW.Unity/Map/MapTileBitmapHolder.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using Cryville.EEW.Core.Map;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Cryville.EEW.Unity.Map {
|
||||
sealed class MapTileBitmapHolder : Core.Map.MapTileBitmapHolder {
|
||||
readonly MapTileBitmapHolderBehaviour _behaviour;
|
||||
readonly Uri _uri;
|
||||
|
||||
public MapTileBitmapHolder(MapTileIndex index, GameObject gameObject, Uri uri) : base(index) {
|
||||
_behaviour = gameObject.GetComponent<MapTileBitmapHolderBehaviour>();
|
||||
_uri = uri;
|
||||
}
|
||||
|
||||
protected override void Dispose(bool disposing) {
|
||||
base.Dispose(disposing);
|
||||
if (disposing) {
|
||||
if (_behaviour) _behaviour.Destroy();
|
||||
}
|
||||
}
|
||||
|
||||
protected override Uri GetUri() => _uri;
|
||||
|
||||
protected override Task LoadBitmap(FileInfo file, CancellationToken cancellationToken) {
|
||||
_behaviour.Load(file);
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
public void Bind(MapTile tile) {
|
||||
_behaviour.Bind(tile);
|
||||
}
|
||||
}
|
||||
}
|
11
Assets/Cryville.EEW.Unity/Map/MapTileBitmapHolder.cs.meta
Normal file
11
Assets/Cryville.EEW.Unity/Map/MapTileBitmapHolder.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f7ad3a3ac7d829249ba21987d585b07f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -0,0 +1,79 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Networking;
|
||||
|
||||
namespace Cryville.EEW.Unity.Map {
|
||||
sealed class MapTileBitmapHolderBehaviour : MonoBehaviour {
|
||||
Action<Sprite> _callback;
|
||||
public void Bind(MapTile tile) {
|
||||
if (_isDone)
|
||||
tile.Set(_sprite);
|
||||
else
|
||||
_callback += tile.Set;
|
||||
}
|
||||
|
||||
UnityWebRequest _req;
|
||||
DownloadHandlerTexture _texHandler;
|
||||
Texture2D _tex;
|
||||
Sprite _sprite;
|
||||
|
||||
FileInfo _localFile;
|
||||
bool _isReady;
|
||||
bool _isDone;
|
||||
public void Load(FileInfo file) {
|
||||
_localFile = file;
|
||||
_isReady = true;
|
||||
}
|
||||
void Update() {
|
||||
if (_isDestroyed) {
|
||||
Destroy(gameObject);
|
||||
return;
|
||||
}
|
||||
if (_isReady) {
|
||||
try {
|
||||
_texHandler = new DownloadHandlerTexture();
|
||||
_req = new UnityWebRequest($"file:///{_localFile}") {
|
||||
downloadHandler = _texHandler,
|
||||
disposeDownloadHandlerOnDispose = true,
|
||||
};
|
||||
_req.SendWebRequest();
|
||||
}
|
||||
catch (Exception ex) {
|
||||
Debug.LogException(ex);
|
||||
}
|
||||
_isReady = false;
|
||||
}
|
||||
if (_req == null || !_req.isDone) return;
|
||||
if (_texHandler.isDone && _texHandler.texture != null) {
|
||||
_tex = _texHandler.texture;
|
||||
_tex.wrapMode = TextureWrapMode.Clamp;
|
||||
_sprite = Sprite.Create(_tex, new Rect(0, 0, _tex.width, _tex.height), Vector2.zero, _tex.height, 0, SpriteMeshType.FullRect, Vector4.zero, false);
|
||||
}
|
||||
else {
|
||||
Debug.LogError(_texHandler.error);
|
||||
_localFile.Delete();
|
||||
}
|
||||
_req.Dispose();
|
||||
_texHandler.Dispose();
|
||||
_req = null;
|
||||
_callback?.Invoke(_sprite);
|
||||
_isDone = true;
|
||||
}
|
||||
|
||||
|
||||
bool _isDestroyed;
|
||||
public void Destroy() {
|
||||
_isDestroyed = true;
|
||||
}
|
||||
void OnDestroy() {
|
||||
if (_req != null) {
|
||||
_req.Abort();
|
||||
_req.Dispose();
|
||||
_texHandler.Dispose();
|
||||
}
|
||||
if (_sprite) Destroy(_sprite);
|
||||
if (_tex) Destroy(_tex);
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c17f6b26e9a6bd74e8b2d071c6951c41
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -1,165 +1,40 @@
|
||||
using Cryville.EEW.Core.Map;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Cryville.EEW.Unity.Map {
|
||||
sealed class TileZOrderComparer : IComparer<MapTileIndex>, IComparer<MapTile> {
|
||||
public static readonly TileZOrderComparer Instance = new();
|
||||
public int Compare(MapTileIndex a, MapTileIndex b) {
|
||||
var c = a.Z.CompareTo(b.Z);
|
||||
if (c != 0) return c;
|
||||
c = a.Y.CompareTo(b.Y);
|
||||
if (c != 0) return c;
|
||||
return a.X.CompareTo(b.X);
|
||||
}
|
||||
public int Compare(MapTile a, MapTile b) {
|
||||
if (a == null) return b == null ? 0 : -1;
|
||||
if (b == null) return 1;
|
||||
return Compare(a.Index, b.Index);
|
||||
}
|
||||
}
|
||||
|
||||
sealed class MapTileCacheManager : IDisposable {
|
||||
public int ExtraCachedZoomLevel { get; set; } = 20;
|
||||
|
||||
GameObject m_prefabTile;
|
||||
public GameObject PrefabTile {
|
||||
get => m_prefabTile;
|
||||
set {
|
||||
m_prefabTile = value;
|
||||
if (_dummyTask) GameObject.Destroy(_dummyTask.gameObject);
|
||||
_dummyTask = GameObject.Instantiate(m_prefabTile, Parent, false).GetComponent<MapTile>();
|
||||
}
|
||||
}
|
||||
class MapTileCacheManager : MapTileCacheManager<MapTileBitmapHolder> {
|
||||
public GameObject PrefabTile { get; set; }
|
||||
public GameObject PrefabBitmapHolder { get; set; }
|
||||
|
||||
public Transform Parent { get; set; }
|
||||
|
||||
public string CacheDir { get; set; }
|
||||
|
||||
public event Action Updated;
|
||||
void OnUpdated(MapTile tile) {
|
||||
if (tile.IsEmpty) {
|
||||
lock (ActiveTiles) {
|
||||
if (_cache.Remove(tile.Index)) {
|
||||
ActiveTiles.RemoveAt(ActiveTiles.BinarySearch(tile, TileZOrderComparer.Instance));
|
||||
}
|
||||
}
|
||||
}
|
||||
Updated?.Invoke();
|
||||
protected override MapTileBitmapHolder CreateBitmapHolder(MapTileIndex index) => new(
|
||||
index,
|
||||
GameObject.Instantiate(PrefabBitmapHolder, Parent, false),
|
||||
new($"https://server.arcgisonline.com/ArcGIS/rest/services/Ocean/World_Ocean_Base/MapServer/tile/{index.Z}/{index.NY}/{index.NX}")
|
||||
);
|
||||
|
||||
protected override string GetCacheFilePath(MapTileIndex index) => Path.Combine(CacheDir, $"map/{index.Z}/{index.NX}/{index.NY}");
|
||||
|
||||
readonly Dictionary<MapTile<MapTileBitmapHolder>, MapTile> _map = new();
|
||||
protected override void OnTileCreated(MapTile<MapTileBitmapHolder> tile) {
|
||||
base.OnTileCreated(tile);
|
||||
var gameObject = GameObject.Instantiate(PrefabTile, Parent, false);
|
||||
var uTile = gameObject.GetComponent<MapTile>();
|
||||
_map.Add(tile, uTile);
|
||||
uTile.Init(tile.Index);
|
||||
tile.BitmapHolder.Bind(uTile);
|
||||
}
|
||||
|
||||
public void Dispose() {
|
||||
MonoBehaviour.Destroy(_dummyTask);
|
||||
|
||||
lock (ActiveTiles) {
|
||||
foreach (var task in ActiveTiles)
|
||||
GameObject.Destroy(task.gameObject);
|
||||
ActiveTiles.Clear();
|
||||
_cache.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
readonly Dictionary<MapTileIndex, MapTile> _cache = new();
|
||||
public List<MapTile> ActiveTiles { get; } = new();
|
||||
|
||||
MapTileIndex _a, _b;
|
||||
|
||||
public void MoveTo(MapTileIndex a, MapTileIndex b) {
|
||||
if (a.Z != b.Z) throw new ArgumentException("Mismatched Z index.");
|
||||
if (a.X >= b.X || a.Y >= b.Y) throw new ArgumentException("Incorrect relative X/Y index.");
|
||||
|
||||
lock (ActiveTiles) {
|
||||
UnloadTiles(a, b);
|
||||
_a = a; _b = b;
|
||||
LoadTiles(a, b);
|
||||
}
|
||||
}
|
||||
void LoadTiles(MapTileIndex a, MapTileIndex b) {
|
||||
for (int z = Math.Max(0, a.Z - ExtraCachedZoomLevel); z <= Math.Max(0, a.Z); z++) {
|
||||
var ia = a.ZoomToLevel(z, Math.Floor);
|
||||
var ib = b.ZoomToLevel(z, Math.Ceiling);
|
||||
for (int x = ia.X; x < ib.X; x++) {
|
||||
for (int y = ia.Y; y < ib.Y; y++) {
|
||||
var index = new MapTileIndex(x, y, z);
|
||||
if (_cache.ContainsKey(index)) continue;
|
||||
var task = GameObject.Instantiate(PrefabTile, Parent, false).GetComponent<MapTile>();
|
||||
task.Load(index, CacheDir, OnUpdated);
|
||||
_cache.Add(index, task);
|
||||
var i = ~ActiveTiles.BinarySearch(task, TileZOrderComparer.Instance);
|
||||
ActiveTiles.Insert(i, task);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
void UnloadTiles(MapTileIndex a, MapTileIndex b) {
|
||||
if (a.Z != _a.Z) {
|
||||
for (int z = _a.Z - ExtraCachedZoomLevel; z < a.Z - ExtraCachedZoomLevel; z++) UnloadTilesAtZoomLevel(z);
|
||||
for (int z = a.Z + 1; z <= _a.Z; z++) UnloadTilesAtZoomLevel(z);
|
||||
}
|
||||
if (a.X > _a.X) {
|
||||
for (int z = Math.Max(0, a.Z); z >= Math.Max(0, a.Z - ExtraCachedZoomLevel); --z) {
|
||||
var ia0 = _a.ZoomToLevel(z, Math.Floor);
|
||||
var ib0 = _b.ZoomToLevel(z, Math.Ceiling);
|
||||
var ia1 = a.ZoomToLevel(z, Math.Floor);
|
||||
if (ia0.X == ia1.X) break;
|
||||
UnloadTilesInRegion(ia0.X, ia0.Y, ia1.X, ib0.Y, z);
|
||||
}
|
||||
}
|
||||
if (b.X < _b.X) {
|
||||
for (int z = Math.Max(0, a.Z); z >= Math.Max(0, a.Z - ExtraCachedZoomLevel); --z) {
|
||||
var ia0 = _a.ZoomToLevel(z, Math.Floor);
|
||||
var ib0 = _b.ZoomToLevel(z, Math.Ceiling);
|
||||
var ib1 = b.ZoomToLevel(z, Math.Ceiling);
|
||||
if (ib0.X == ib1.X) break;
|
||||
UnloadTilesInRegion(ib1.X, ia0.Y, ib0.X, ib0.Y, z);
|
||||
}
|
||||
}
|
||||
if (a.Y > _a.Y) {
|
||||
for (int z = Math.Max(0, a.Z); z >= Math.Max(0, a.Z - ExtraCachedZoomLevel); --z) {
|
||||
var ia0 = _a.ZoomToLevel(z, Math.Floor);
|
||||
var ib0 = _b.ZoomToLevel(z, Math.Ceiling);
|
||||
var ia1 = a.ZoomToLevel(z, Math.Floor);
|
||||
if (ia0.Y == ia1.Y) break;
|
||||
UnloadTilesInRegion(ia0.X, ia0.Y, ib0.X, ia1.Y, z);
|
||||
}
|
||||
}
|
||||
if (b.Y < _b.Y) {
|
||||
for (int z = Math.Max(0, a.Z); z >= Math.Max(0, a.Z - ExtraCachedZoomLevel); --z) {
|
||||
var ia0 = _a.ZoomToLevel(z, Math.Floor);
|
||||
var ib0 = _b.ZoomToLevel(z, Math.Ceiling);
|
||||
var ib1 = b.ZoomToLevel(z, Math.Ceiling);
|
||||
if (ib0.Y == ib1.Y) break;
|
||||
UnloadTilesInRegion(ia0.X, ib1.Y, ib0.X, ib0.Y, z);
|
||||
}
|
||||
}
|
||||
}
|
||||
void UnloadTilesInRegion(int x1, int y1, int x2, int y2, int z) {
|
||||
for (int x = x1; x < x2; x++) {
|
||||
for (int y = y1; y < y2; y++) {
|
||||
var index = new MapTileIndex(x, y, z);
|
||||
if (!_cache.TryGetValue(index, out var task)) continue;
|
||||
GameObject.Destroy(task.gameObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MapTile _dummyTask;
|
||||
void UnloadTilesAtZoomLevel(int z) {
|
||||
if (z < 0) return;
|
||||
|
||||
_dummyTask.Index = new(int.MinValue, int.MinValue, z);
|
||||
var i0 = ActiveTiles.BinarySearch(_dummyTask, TileZOrderComparer.Instance);
|
||||
if (i0 < 0) i0 = ~i0;
|
||||
|
||||
_dummyTask.Index = new(int.MinValue, int.MinValue, z + 1);
|
||||
var i1 = ActiveTiles.BinarySearch(_dummyTask, TileZOrderComparer.Instance);
|
||||
if (i1 < 0) i1 = ~i1;
|
||||
|
||||
for (var i = i1 - 1; i >= i0; --i) {
|
||||
var index = ActiveTiles[i].Index;
|
||||
if (!_cache.TryGetValue(index, out var task)) continue;
|
||||
GameObject.Destroy(task.gameObject);
|
||||
protected override void OnTileDestroyed(MapTile<MapTileBitmapHolder> tile) {
|
||||
base.OnTileDestroyed(tile);
|
||||
if (_map.TryGetValue(tile, out var uTile)) {
|
||||
uTile.Destroy();
|
||||
_map.Remove(tile);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -77,7 +77,13 @@ namespace Cryville.EEW.Unity.Map {
|
||||
DTSweep.Triangulate(tcx);
|
||||
|
||||
var codeToIndex = new Dictionary<uint, int>();
|
||||
var vertices = ArrayPool<Vector3>.Shared.Rent(convertedPolygon.Points.Count);
|
||||
int vertexCount = convertedPolygon.Points.Count;
|
||||
if (convertedPolygon.Holes != null) {
|
||||
foreach (var hole in convertedPolygon.Holes) {
|
||||
vertexCount += hole.Points.Count;
|
||||
}
|
||||
}
|
||||
var vertices = ArrayPool<Vector3>.Shared.Rent(vertexCount);
|
||||
var triangles = ArrayPool<int>.Shared.Rent(convertedPolygon.Triangles.Count * 3);
|
||||
int vi = 0, ii = 0;
|
||||
foreach (var tri in convertedPolygon.Triangles) {
|
||||
|
219
Assets/Cryville.EEW.Unity/Map/RegionEditor.cs
Normal file
219
Assets/Cryville.EEW.Unity/Map/RegionEditor.cs
Normal file
@@ -0,0 +1,219 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Cryville.EEW.Unity.Map {
|
||||
sealed class RegionEditor : MonoBehaviour {
|
||||
QuadTreeNode _root;
|
||||
|
||||
[SerializeField] CameraController m_cameraController;
|
||||
[SerializeField] GameObject m_regionViewPrefab;
|
||||
|
||||
[SerializeField] TMP_Text m_textSelectedInfo;
|
||||
[SerializeField] TMP_Text m_textHoveredInfo;
|
||||
[SerializeField] TMP_InputField m_inputId;
|
||||
|
||||
readonly Dictionary<QuadTreeNode, RegionView> _map = new();
|
||||
|
||||
void Start() {
|
||||
var file = new FileInfo(Path.Combine(Application.persistentDataPath, "regions.json"));
|
||||
if (file.Exists) {
|
||||
using var stream = file.OpenRead();
|
||||
_root = JsonSerializer.Deserialize<QuadTreeNode>(stream);
|
||||
}
|
||||
else {
|
||||
_root = NewNode();
|
||||
}
|
||||
BuildView(_root);
|
||||
}
|
||||
|
||||
public void Save() {
|
||||
var file = new FileInfo(Path.Combine(Application.persistentDataPath, "regions.json"));
|
||||
using var stream = file.Open(FileMode.Create);
|
||||
JsonSerializer.Serialize(stream, _root);
|
||||
}
|
||||
|
||||
void BuildView(QuadTreeNode node) {
|
||||
var view = Instantiate(m_regionViewPrefab, transform, false).GetComponent<RegionView>();
|
||||
view.Init(node.X, node.Y, node.Z);
|
||||
view.Id = node.Data.Id;
|
||||
view.IsLeaf = node.Children == null;
|
||||
_map.Add(node, view);
|
||||
BuildChildViews(node);
|
||||
}
|
||||
|
||||
void BuildChildViews(QuadTreeNode node) {
|
||||
if (node.Children == null) return;
|
||||
foreach (var child in node.Children) {
|
||||
BuildView(child);
|
||||
}
|
||||
}
|
||||
|
||||
void DestroyChildViews(QuadTreeNode node) {
|
||||
if (node.Children == null) return;
|
||||
foreach (var child in node.Children) {
|
||||
Destroy(_map[child].gameObject);
|
||||
_map.Remove(child);
|
||||
}
|
||||
}
|
||||
|
||||
QuadTreeNode _hoveredNode;
|
||||
QuadTreeNode _selectedNode;
|
||||
Vector3? _ppos;
|
||||
void Update() {
|
||||
var pos = Camera.main.ScreenToWorldPoint(Input.mousePosition);
|
||||
pos.y += 1;
|
||||
var hoveredNode = _root.Get(pos);
|
||||
if (hoveredNode != _hoveredNode) {
|
||||
HoverNode(hoveredNode);
|
||||
}
|
||||
if (Input.GetMouseButtonDown(0)) {
|
||||
_ppos = Input.mousePosition;
|
||||
}
|
||||
if (Input.GetMouseButton(0) && _ppos is Vector3 pos0) {
|
||||
if (Input.mousePosition != pos0) {
|
||||
_ppos = null;
|
||||
}
|
||||
}
|
||||
if (hoveredNode == null) return;
|
||||
if (Input.GetMouseButtonUp(0) && _ppos != null) {
|
||||
SelectNode(hoveredNode);
|
||||
_ppos = null;
|
||||
}
|
||||
if (m_inputId.isFocused)
|
||||
return;
|
||||
if (Input.GetKeyUp(KeyCode.A)) {
|
||||
MergeNode(hoveredNode);
|
||||
}
|
||||
if (Input.GetKeyUp(KeyCode.S)) {
|
||||
SplitNode(hoveredNode);
|
||||
}
|
||||
if (Input.GetKeyUp(KeyCode.C)) {
|
||||
m_inputId.text = hoveredNode.Data.Id;
|
||||
}
|
||||
if (Input.GetKeyUp(KeyCode.V)) {
|
||||
hoveredNode.Data.Id = m_inputId.text;
|
||||
_map[hoveredNode].Id = hoveredNode.Data.Id;
|
||||
}
|
||||
}
|
||||
void HoverNode(QuadTreeNode node) {
|
||||
if (_hoveredNode != null) {
|
||||
_map[_hoveredNode].IsHovered = false;
|
||||
}
|
||||
_hoveredNode = node;
|
||||
if (_hoveredNode != null) {
|
||||
_map[_hoveredNode].IsHovered = true;
|
||||
m_textHoveredInfo.text = string.Format(CultureInfo.InvariantCulture, "<Hovered>\nZ: {2}, XY: ({0}, {1})\nD: {3}", node.X, node.Y, node.Z, node.Data.Id);
|
||||
}
|
||||
else {
|
||||
m_textHoveredInfo.text = "";
|
||||
}
|
||||
}
|
||||
void SelectNode(QuadTreeNode node) {
|
||||
if (_selectedNode != null) {
|
||||
_map[_selectedNode].IsSelected = false;
|
||||
}
|
||||
_selectedNode = node;
|
||||
if (_selectedNode != null) {
|
||||
_map[_selectedNode].IsSelected = true;
|
||||
m_textSelectedInfo.text = string.Format(CultureInfo.InvariantCulture, "<Selected>\nZ: {2}, XY: ({0}, {1})\nD: {3}", node.X, node.Y, node.Z, node.Data.Id);
|
||||
}
|
||||
else {
|
||||
m_textSelectedInfo.text = "";
|
||||
}
|
||||
}
|
||||
void MergeNode(QuadTreeNode node) {
|
||||
var parent = node.Parent;
|
||||
if (parent == null)
|
||||
return;
|
||||
DestroyChildViews(parent);
|
||||
_map[parent].IsLeaf = true;
|
||||
parent.Merge();
|
||||
_hoveredNode = null;
|
||||
if (_selectedNode != null && !_map.ContainsKey(_selectedNode)) {
|
||||
_selectedNode = null;
|
||||
}
|
||||
}
|
||||
void SplitNode(QuadTreeNode node) {
|
||||
node.Split();
|
||||
_map[node].IsLeaf = false;
|
||||
BuildChildViews(node);
|
||||
}
|
||||
|
||||
static QuadTreeNode NewNode() => new() { Data = new("") };
|
||||
|
||||
sealed class QuadTreeNode {
|
||||
QuadTreeNode[] m_children;
|
||||
public QuadTreeNode[] Children {
|
||||
get => m_children;
|
||||
set {
|
||||
if (m_children != null) {
|
||||
foreach (var child in m_children) {
|
||||
child.DetachFromParent();
|
||||
}
|
||||
}
|
||||
m_children = value;
|
||||
UpdateChildren();
|
||||
}
|
||||
}
|
||||
QuadTreeNode m_parent;
|
||||
[JsonIgnore] public QuadTreeNode Parent => m_parent;
|
||||
void AttachToParent(QuadTreeNode parent, int index) {
|
||||
if (m_parent != null && m_parent != parent)
|
||||
throw new InvalidOperationException("Node already in a tree.");
|
||||
m_parent = parent;
|
||||
X = (parent.X << 1) | (index is 0 or 3 ? 1 : 0);
|
||||
Y = (parent.Y << 1) | (index is 0 or 1 ? 1 : 0);
|
||||
Z = parent.Z + 1;
|
||||
UpdateChildren();
|
||||
}
|
||||
void DetachFromParent() => m_parent = null;
|
||||
void UpdateChildren() {
|
||||
if (m_children != null) {
|
||||
for (int i = 0; i < m_children.Length; i++) {
|
||||
m_children[i].AttachToParent(this, i);
|
||||
}
|
||||
}
|
||||
}
|
||||
[JsonIgnore] public int X { get; private set; }
|
||||
[JsonIgnore] public int Y { get; private set; }
|
||||
[JsonIgnore] public int Z { get; private set; }
|
||||
public RegionData Data { get; set; }
|
||||
|
||||
public QuadTreeNode Get(Vector2 pos) {
|
||||
if ((pos.x is < 0 or >= 1) || (pos.y is < 0 or >= 1))
|
||||
return null;
|
||||
if (m_children == null)
|
||||
return this;
|
||||
Vector2 subPos = pos * 2;
|
||||
subPos.x %= 1;
|
||||
subPos.y %= 1;
|
||||
return pos.x >= 0.5f
|
||||
? (pos.y >= 0.5f ? m_children[0] : m_children[3]).Get(subPos)
|
||||
: (pos.y >= 0.5f ? m_children[1] : m_children[2]).Get(subPos);
|
||||
}
|
||||
|
||||
public void Merge() {
|
||||
Children = null;
|
||||
}
|
||||
|
||||
public void Split() {
|
||||
Children = new QuadTreeNode[] {
|
||||
new() { Data = Data.Copy() },
|
||||
new() { Data = Data.Copy() },
|
||||
new() { Data = Data.Copy() },
|
||||
new() { Data = Data.Copy() },
|
||||
};
|
||||
}
|
||||
}
|
||||
sealed record RegionData(string Id) {
|
||||
public string Id { get; set; } = Id;
|
||||
public RegionData Copy() => (RegionData)MemberwiseClone();
|
||||
}
|
||||
}
|
||||
}
|
11
Assets/Cryville.EEW.Unity/Map/RegionEditor.cs.meta
Normal file
11
Assets/Cryville.EEW.Unity/Map/RegionEditor.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fd7b70d11ebfe324e830806e394cc334
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
68
Assets/Cryville.EEW.Unity/Map/RegionView.cs
Normal file
68
Assets/Cryville.EEW.Unity/Map/RegionView.cs
Normal file
@@ -0,0 +1,68 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Cryville.EEW.Unity.Map {
|
||||
sealed class RegionView : MonoBehaviour {
|
||||
[SerializeField]
|
||||
SpriteRenderer m_spriteRenderer;
|
||||
|
||||
Color _color;
|
||||
|
||||
bool m_isHovered;
|
||||
public bool IsHovered {
|
||||
get => m_isHovered;
|
||||
set {
|
||||
m_isHovered = value;
|
||||
UpdateColor();
|
||||
}
|
||||
}
|
||||
|
||||
bool m_isSelected;
|
||||
public bool IsSelected {
|
||||
get => m_isSelected;
|
||||
set {
|
||||
m_isSelected = value;
|
||||
UpdateColor();
|
||||
}
|
||||
}
|
||||
|
||||
bool m_isLeaf = true;
|
||||
public bool IsLeaf {
|
||||
get => m_isLeaf;
|
||||
set {
|
||||
m_isLeaf = value;
|
||||
UpdateColor();
|
||||
}
|
||||
}
|
||||
|
||||
string m_id;
|
||||
public string Id {
|
||||
get => m_id;
|
||||
set {
|
||||
m_id = value;
|
||||
unchecked {
|
||||
uint hash = (uint)value.GetHashCode();
|
||||
_color = Color.HSVToRGB(((hash >> 24) ^ ((hash >> 16) & 0xff) ^ ((hash >> 8) & 0xff) ^ (hash & 0xff)) / (float)0xff, 1, 1);
|
||||
}
|
||||
UpdateColor();
|
||||
}
|
||||
}
|
||||
|
||||
public void Init(int x, int y, int z) {
|
||||
float scale = 1f / (1 << z);
|
||||
transform.localScale = new Vector3(scale, scale, 1);
|
||||
transform.localPosition = new Vector3(x * scale, y * scale - 1, -1 - z / 100f);
|
||||
}
|
||||
|
||||
void UpdateColor() {
|
||||
if (!m_isLeaf)
|
||||
_color.a = 0.0f;
|
||||
else if (m_isSelected)
|
||||
_color.a = 0.6f;
|
||||
else if (m_isHovered)
|
||||
_color.a = 0.4f;
|
||||
else
|
||||
_color.a = 0.2f;
|
||||
m_spriteRenderer.color = _color;
|
||||
}
|
||||
}
|
||||
}
|
11
Assets/Cryville.EEW.Unity/Map/RegionView.cs.meta
Normal file
11
Assets/Cryville.EEW.Unity/Map/RegionView.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c57a0e86eb63b6048ba265e9d98e84f6
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -1,4 +1,5 @@
|
||||
using Cryville.EEW.Colors;
|
||||
using Cryville.EEW.Core;
|
||||
using Cryville.EEW.Core.Colors;
|
||||
using Cryville.EEW.FERegion;
|
||||
using Cryville.EEW.Map;
|
||||
@@ -25,9 +26,21 @@ namespace Cryville.EEW.Unity {
|
||||
public IColorScheme ColorScheme { get; private set; } = new SeverityBasedColorScheme(DefaultSeverityScheme.Instance, DefaultSeverityColorMapping.Instance);
|
||||
public ISubColorScheme BorderColorScheme { get; private set; } = new WrappedColorScheme(new SeverityBasedColorScheme(DefaultSeverityScheme.Instance, DefaultSeverityColorMapping.SecondaryInstance));
|
||||
public ISubColorScheme TextColorScheme { get; private set; } = new DefaultTextColorScheme(Color.White, Color.Black);
|
||||
public ILocationConverter LocationConverter => new FERegionLongConverter(); // TODO TTS
|
||||
public TimeSpan NowcastWarningDelayTolerance => TimeSpan.FromMinutes(60); // TODO TTS
|
||||
|
||||
public CultureInfo RVMCulture { get; private set; } = SharedCultures.CurrentUICulture;
|
||||
readonly int _infoLocationSpecificity = 3;
|
||||
readonly int _ttsLocationSpecificity = 3;
|
||||
readonly LocationNamer _locationNamer = new() { Namer = new FERegionLongNamer() }; // TODO TTS
|
||||
public bool NameLocation(double lat, double lon, CultureInfo localCulture, ref CultureInfo targetCulture, out string name, out int specificity) {
|
||||
specificity = _ttsLocationSpecificity;
|
||||
return _locationNamer.Name(lat, lon, localCulture, ref targetCulture, out name, ref specificity);
|
||||
}
|
||||
public bool NameLocation(double lat, double lon, CultureInfo localCulture, ref CultureInfo targetCulture, out string name) {
|
||||
int specificity = _infoLocationSpecificity;
|
||||
return _locationNamer.Name(lat, lon, localCulture, ref targetCulture, out name, ref specificity);
|
||||
}
|
||||
|
||||
public TimeZoneInfo OverrideTimeZone { get; private set; }
|
||||
public bool DoDisplayTimeZone { get; private set; } = true;
|
||||
public bool DoSwitchBackToHistory { get; private set; } = true;
|
||||
@@ -69,11 +82,14 @@ namespace Cryville.EEW.Unity {
|
||||
"Legacy" => new LegacySeverityScheme(),
|
||||
_ => throw new InvalidOperationException("Unknown severity scheme."),
|
||||
};
|
||||
SeverityColorMapping = config.SeverityColorMapping switch {
|
||||
SeverityColorMapping = config.ColorScheme switch {
|
||||
"Default" => new DefaultSeverityColorMapping(config.SeverityColorMappingLuminanceMultiplier),
|
||||
"SREV" => new SREVSeverityColorMapping(config.SeverityColorMappingLuminanceMultiplier),
|
||||
"SREVBorder" => new SREVBorderSeverityColorMapping(config.SeverityColorMappingLuminanceMultiplier),
|
||||
_ => throw new InvalidOperationException("Unknown severity color mapping."),
|
||||
"DichromaticYB" => new DichromaticSeverityColorMapping(0.62f, 0.20f, 90, config.SeverityColorMappingLuminanceMultiplier),
|
||||
"DichromaticRC" => new DichromaticSeverityColorMapping(0.62f, 0.25f, 30, config.SeverityColorMappingLuminanceMultiplier),
|
||||
"DichromaticPG" => new DichromaticSeverityColorMapping(0.62f, 0.30f, -30, config.SeverityColorMappingLuminanceMultiplier),
|
||||
"Monochromatic" => new MonochromaticSeverityColorMapping(config.SeverityColorMappingLuminanceMultiplier),
|
||||
_ => throw new InvalidOperationException("Unknown color scheme."),
|
||||
};
|
||||
UseContinuousColor = config.UseContinuousColor;
|
||||
ColorScheme = config.ColorScheme switch {
|
||||
@@ -101,6 +117,9 @@ namespace Cryville.EEW.Unity {
|
||||
OverrideTimeZone = ParseTimeZone(config.OverrideTimeZone);
|
||||
DoDisplayTimeZone = config.DoDisplayTimeZone;
|
||||
DoSwitchBackToHistory = config.DoSwitchBackToHistory;
|
||||
RVMCulture = config.OverrideDisplayCulture is string rvmCulture
|
||||
? (string.IsNullOrEmpty(rvmCulture) ? SharedCultures.CurrentUICulture : SharedCultures.Get(rvmCulture))
|
||||
: CultureInfo.InvariantCulture;
|
||||
EventSources = config.EventSources;
|
||||
}
|
||||
|
||||
|
@@ -5,7 +5,7 @@ using System.IO;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Cryville.EEW.Unity {
|
||||
class SoundPlayer : Core.SoundPlayer {
|
||||
class SoundPlayer : Core.Audio.SoundPlayer {
|
||||
public SoundPlayer() : base(GetEngineList(), AudioUsage.NotificationEvent) { }
|
||||
static List<Type> GetEngineList() => new() {
|
||||
typeof(Audio.Wasapi.MMDeviceEnumeratorWrapper),
|
||||
|
@@ -4,7 +4,7 @@ using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Cryville.EEW.Unity {
|
||||
class TTSWorker : Core.TTSWorker {
|
||||
class TTSWorker : Core.Audio.TTSWorker {
|
||||
public TTSWorker() : base(CreateSoundPlayer()) { }
|
||||
|
||||
static SoundPlayer CreateSoundPlayer() {
|
||||
|
@@ -14,9 +14,12 @@ namespace Cryville.EEW.Unity.UI {
|
||||
[SerializeField] GameObject m_listViewRail;
|
||||
[SerializeField] GameObject m_expander;
|
||||
|
||||
void Start() {
|
||||
void OnEnable() {
|
||||
m_groupHeader.onClick.AddListener(OnGroupHeaderClicked);
|
||||
}
|
||||
void OnDisable() {
|
||||
m_groupHeader.onClick.RemoveListener(OnGroupHeaderClicked);
|
||||
}
|
||||
void OnGroupHeaderClicked() {
|
||||
SetExpanded(!m_listViewContainer.activeSelf);
|
||||
}
|
||||
|
@@ -79,15 +79,15 @@ namespace Cryville.EEW.Unity.UI {
|
||||
m_currentView.SetViewModel(e, true);
|
||||
var keyProp = e.Properties.FirstOrDefault();
|
||||
_displayingViews[_index].SetCurrent(true);
|
||||
_tickDown = Math.Max(0, keyProp?.Severity ?? 0) * 4 + 4;
|
||||
_tickDown = MathF.Exp(Math.Max(-1f, keyProp?.Severity ?? -1f) + 1);
|
||||
m_currentView.gameObject.SetActive(true);
|
||||
Worker.Instance.SetCurrent(e);
|
||||
}
|
||||
public void SetCurrent(ReportViewModel viewModel) {
|
||||
public void OnItemClicked(ReportViewModel viewModel) {
|
||||
int index = _displayingReports.IndexOf(viewModel);
|
||||
if (index == -1) return;
|
||||
SwitchTo(index);
|
||||
Worker.Instance.SetSelected(viewModel);
|
||||
Worker.Instance.SetSelected(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -27,7 +27,7 @@ namespace Cryville.EEW.Unity.UI {
|
||||
}
|
||||
void SetView(float mainSeverity, string title, string location, CultureInfo culture) {
|
||||
SetSeverity(mainSeverity);
|
||||
SetText(m_textView, string.Format("{0} {1}", title, location), culture);
|
||||
SetText(m_textView, string.Format(culture, "{0} {1}", title, location), culture);
|
||||
}
|
||||
static void SetText(TMPLocalizedText view, string text, CultureInfo culture) {
|
||||
if (string.IsNullOrWhiteSpace(text)) {
|
||||
@@ -47,11 +47,14 @@ namespace Cryville.EEW.Unity.UI {
|
||||
void Awake() {
|
||||
_dockRatioTweener = new(() => m_dockLayoutGroup.DockOccupiedRatio, v => m_dockLayoutGroup.DockOccupiedRatio = v, Tweeners.Single);
|
||||
}
|
||||
void Start() {
|
||||
void OnEnable() {
|
||||
m_button.onClick.AddListener(OnViewClicked);
|
||||
}
|
||||
void OnDisable() {
|
||||
m_button.onClick.RemoveListener(OnViewClicked);
|
||||
}
|
||||
void OnViewClicked() {
|
||||
EventOngoingListView.Instance.SetCurrent(_viewModel);
|
||||
EventOngoingListView.Instance.OnItemClicked(_viewModel);
|
||||
}
|
||||
void Update() {
|
||||
_dockRatioTweener.Advance(Time.deltaTime);
|
||||
|
@@ -14,9 +14,12 @@ namespace Cryville.EEW.Unity.UI {
|
||||
[SerializeField] TMPLocalizedText m_revisionView;
|
||||
ReportViewModel _viewModel;
|
||||
|
||||
protected virtual void Start() {
|
||||
protected virtual void OnEnable() {
|
||||
if (m_reportViewButton != null) m_reportViewButton.onClick.AddListener(OnViewClicked);
|
||||
}
|
||||
protected virtual void OnDisable() {
|
||||
if (m_reportViewButton != null) m_reportViewButton.onClick.RemoveListener(OnViewClicked);
|
||||
}
|
||||
void OnViewClicked() {
|
||||
Worker.Instance.SetSelected(_viewModel);
|
||||
}
|
||||
|
@@ -8,10 +8,14 @@ namespace Cryville.EEW.Unity.UI {
|
||||
|
||||
[SerializeField] Button m_revisionViewContainerButton;
|
||||
|
||||
protected override void Start() {
|
||||
base.Start();
|
||||
protected override void OnEnable() {
|
||||
base.OnEnable();
|
||||
m_revisionViewContainerButton.onClick.AddListener(OnRevisionViewClicked);
|
||||
}
|
||||
protected override void OnDisable() {
|
||||
base.OnDisable();
|
||||
m_revisionViewContainerButton.onClick.RemoveListener(OnRevisionViewClicked);
|
||||
}
|
||||
void OnRevisionViewClicked() {
|
||||
m_listView.gameObject.SetActive(!m_listView.gameObject.activeSelf);
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
using System.Globalization;
|
||||
using System.Text;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
||||
@@ -11,17 +12,30 @@ namespace Cryville.EEW.Unity.UI {
|
||||
_textView = GetComponent<TMP_Text>();
|
||||
}
|
||||
|
||||
readonly StringBuilder _sb = new();
|
||||
readonly char[] _buffer = new char[256];
|
||||
void Update() {
|
||||
_textView.text = string.Format(
|
||||
_sb.Clear();
|
||||
_sb.AppendFormat(
|
||||
CultureInfo.InvariantCulture,
|
||||
"FPS: i{0:0} / s{1:0}\nSMem: {2:N0} / {3:N0}\nIMem: {4:N0} / {5:N0}",
|
||||
"FPS: i{0:0} / s{1:0}\n",
|
||||
1 / Time.deltaTime,
|
||||
1 / Time.smoothDeltaTime,
|
||||
1 / Time.smoothDeltaTime
|
||||
);
|
||||
_sb.AppendFormat(
|
||||
CultureInfo.InvariantCulture,
|
||||
"SMem: {0:N0} / {1:N0}\n",
|
||||
UnityEngine.Profiling.Profiler.GetMonoUsedSizeLong(),
|
||||
UnityEngine.Profiling.Profiler.GetMonoHeapSizeLong(),
|
||||
UnityEngine.Profiling.Profiler.GetMonoHeapSizeLong()
|
||||
);
|
||||
_sb.AppendFormat(
|
||||
CultureInfo.InvariantCulture,
|
||||
"IMem: {0:N0} / {1:N0}",
|
||||
UnityEngine.Profiling.Profiler.GetTotalAllocatedMemoryLong(),
|
||||
UnityEngine.Profiling.Profiler.GetTotalReservedMemoryLong()
|
||||
);
|
||||
_sb.CopyTo(0, _buffer, _sb.Length);
|
||||
_textView.SetText(_buffer, 0, _sb.Length);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
||||
@@ -19,7 +18,7 @@ namespace Cryville.EEW.Unity.UI {
|
||||
time = TimeZoneInfo.ConvertTime(time, timeZone, tTimeZone);
|
||||
else
|
||||
tTimeZone = timeZone;
|
||||
_textView.text = SharedSettings.Instance.DoDisplayTimeZone ? string.Format(CultureInfo.CurrentCulture, "{0:G} ({1})", time, tTimeZone.ToTimeZoneString()) : time.ToString(CultureInfo.CurrentCulture);
|
||||
_textView.text = SharedSettings.Instance.DoDisplayTimeZone ? string.Format(SharedCultures.CurrentCulture, "{0:G} ({1})", time, tTimeZone.ToTimeZoneString()) : time.ToString(SharedCultures.CurrentCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,21 +1,27 @@
|
||||
using Cryville.EEW.BMKGOpenData;
|
||||
using Cryville.EEW.BMKGOpenData.TTS;
|
||||
using Cryville.EEW.Core;
|
||||
using Cryville.EEW.CWAOpenData;
|
||||
using Cryville.EEW.CWAOpenData.Model;
|
||||
using Cryville.EEW.CWAOpenData.TTS;
|
||||
using Cryville.EEW.EMSC;
|
||||
using Cryville.EEW.GlobalQuake;
|
||||
using Cryville.EEW.JMAAtom;
|
||||
using Cryville.EEW.JMAAtom.TTS;
|
||||
using Cryville.EEW.NOAA;
|
||||
using Cryville.EEW.NOAA.TTS;
|
||||
using Cryville.EEW.QuakeML;
|
||||
using Cryville.EEW.Report;
|
||||
using Cryville.EEW.Unity.Map;
|
||||
using Cryville.EEW.Unity.UI;
|
||||
using Cryville.EEW.UpdateChecker;
|
||||
using Cryville.EEW.USGS;
|
||||
using Cryville.EEW.Wolfx;
|
||||
using Cryville.EEW.Wolfx.Model;
|
||||
using Cryville.EEW.Wolfx.TTS;
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
@@ -33,7 +39,8 @@ namespace Cryville.EEW.Unity {
|
||||
[SerializeField] EventGroupListView m_historyEventGroupList;
|
||||
[SerializeField] GameObject m_connectingHint;
|
||||
|
||||
GroupingCoreWorker _worker;
|
||||
CoreWorker _worker;
|
||||
ReportGrouper _grouper;
|
||||
CancellationTokenSource _cancellationTokenSource;
|
||||
|
||||
void Awake() {
|
||||
@@ -46,6 +53,7 @@ namespace Cryville.EEW.Unity {
|
||||
App.Init();
|
||||
|
||||
_worker = new(new TTSWorker());
|
||||
_grouper = new ReportGrouper();
|
||||
_cancellationTokenSource = new();
|
||||
}
|
||||
|
||||
@@ -56,10 +64,11 @@ namespace Cryville.EEW.Unity {
|
||||
BuildWorkers();
|
||||
_worker.RVMGeneratorContext = SharedSettings.Instance;
|
||||
_worker.TTSMessageGeneratorContext = SharedSettings.Instance;
|
||||
_worker.RVMCulture = SharedSettings.Instance.RVMCulture;
|
||||
_ongoingReportManager.Changed += OnOngoingReported;
|
||||
_worker.Reported += OnReported;
|
||||
_worker.GroupUpdated += OnGroupUpdated;
|
||||
_worker.GroupRemoved += OnGroupRemoved;
|
||||
_grouper.GroupUpdated += OnGroupUpdated;
|
||||
_grouper.GroupRemoved += OnGroupRemoved;
|
||||
Task.Run(() => GatewayVerify(_cancellationTokenSource.Token)).ContinueWith(task => {
|
||||
if (task.IsFaulted) {
|
||||
OnReported(this, new() { Title = task.Exception.Message });
|
||||
@@ -80,20 +89,24 @@ namespace Cryville.EEW.Unity {
|
||||
}
|
||||
|
||||
static void RegisterViewModelGenerators(CoreWorker worker) {
|
||||
worker.RegisterViewModelGenerator(new BMKGEarthquakeRVMGenerator());
|
||||
worker.RegisterViewModelGenerator(new CENCEarthquakeRVMGenerator());
|
||||
worker.RegisterViewModelGenerator(new CENCEEWRVMGenerator());
|
||||
worker.RegisterViewModelGenerator(new CWAEarthquakeRVMGenerator());
|
||||
worker.RegisterViewModelGenerator(new CWAEEWRVMGenerator());
|
||||
worker.RegisterViewModelGenerator(new CWATsunamiRVMGenerator());
|
||||
worker.RegisterViewModelGenerator(new EMSCRealTimeEventRVMGenerator());
|
||||
worker.RegisterViewModelGenerator(new FujianEEWRVMGenerator());
|
||||
worker.RegisterViewModelGenerator(new GlobalQuakeRVMGenerator());
|
||||
worker.RegisterViewModelGenerator(new JMAAtomRVMGenerator());
|
||||
worker.RegisterViewModelGenerator(new JMAEEWRVMGenerator());
|
||||
worker.RegisterViewModelGenerator(new NOAAAtomRVMGenerator());
|
||||
worker.RegisterViewModelGenerator(new QuakeMLEventRVMGenerator());
|
||||
worker.RegisterViewModelGenerator(new SichuanEEWRVMGenerator());
|
||||
worker.RegisterViewModelGenerator(new VersionRVMGenerator());
|
||||
}
|
||||
static void RegisterTTSMessageGenerators(CoreWorker worker) {
|
||||
worker.RegisterTTSMessageGenerator(new BMKGEarthquakeTTSMessageGenerator());
|
||||
worker.RegisterTTSMessageGenerator(new CENCEarthquakeTTSMessageGenerator());
|
||||
worker.RegisterTTSMessageGenerator(new CENCEEWTTSMessageGenerator());
|
||||
worker.RegisterTTSMessageGenerator(new CWAEarthquakeTTSMessageGenerator());
|
||||
@@ -114,17 +127,22 @@ namespace Cryville.EEW.Unity {
|
||||
_worker.AddWorker(new CWAReportWorker<Tsunami>(new Uri("http://localhost:9095/E-A0014-001.json"), "1"));
|
||||
_worker.AddWorker(new CWAReportWorker<Earthquake>(new Uri("http://localhost:9095/E-A0015-001.json"), "1"));
|
||||
_worker.AddWorker(new CWAReportWorker<Earthquake>(new Uri("http://localhost:9095/E-A0016-001.json"), "1"));
|
||||
BMKGOpenDataWorker bmkgWorker = new(new Uri("http://localhost:9095/autogempa.json"));
|
||||
bmkgWorker.SetDataUris(new Uri[] { new("http://localhost:9095/gempadirasakan.json") });
|
||||
_worker.AddWorker(bmkgWorker);
|
||||
_worker.AddWorker(new NOAAAtomWorker(new("http://localhost:9095/PAAQAtom.xml")));
|
||||
_worker.AddWorker(new UpdateCheckerWorker(typeof(Worker).Assembly.GetName().Version?.ToString(3) ?? "", "unity"));
|
||||
#else
|
||||
foreach (var source in SharedSettings.Instance.EventSources) {
|
||||
_worker.AddWorker(source switch {
|
||||
BMKGOpenDataEventSourceConfig bmkgOpenData => BuildBMKGOpenDataWorkerUris(new BMKGOpenDataWorker(new("https://data.bmkg.go.id/DataMKG/TEWS/autogempa.json")), bmkgOpenData),
|
||||
CWAOpenDataEventSourceConfig cwaOpenData => cwaOpenData.Subtype switch {
|
||||
"E-A0014-001" => new CWAReportWorker<Tsunami>(new Uri("https://opendata.cwa.gov.tw/api/v1/rest/datastore/E-A0014-001"), cwaOpenData.Token, 1440, 17280),
|
||||
"E-A0015-001" => new CWAReportWorker<Earthquake>(new Uri("https://opendata.cwa.gov.tw/api/v1/rest/datastore/E-A0015-001"), cwaOpenData.Token),
|
||||
"E-A0016-001" => new CWAReportWorker<Earthquake>(new Uri("https://opendata.cwa.gov.tw/api/v1/rest/datastore/E-A0016-001"), cwaOpenData.Token),
|
||||
_ => throw new InvalidOperationException("Unknown CWA open data sub-type."),
|
||||
},
|
||||
EMSCRealTimeEventSourceConfig => new EMSCRealTimeWorker(new("wss://www.seismicportal.eu/standing_order/websocket")),
|
||||
GlobalQuakeServer15EventSourceConfig gq => new GlobalQuakeWorker15(gq.Host, gq.Port),
|
||||
GlobalQuakeServerEventSourceConfig gq => new GlobalQuakeWorker(gq.Host, gq.Port),
|
||||
JMAAtomEventSourceConfig jmaAtom => BuildJMAAtomWorkerFilter(new JMAAtomWorker(new("https://www.data.jma.go.jp/developer/xml/feed/eqvol.xml")), jmaAtom),
|
||||
@@ -134,18 +152,19 @@ namespace Cryville.EEW.Unity {
|
||||
_ => throw new InvalidOperationException("Unknown NOAA sub-type."),
|
||||
},
|
||||
UpdateCheckerEventSourceConfig => new UpdateCheckerWorker(typeof(Worker).Assembly.GetName().Version?.ToString(3) ?? "", "unity"),
|
||||
USGSQuakeMLEventSourceConfig usgsQuakeML => BuildUSGSQuakeMLWorkerUri(new USGSQuakeMLWorker(new Uri("https://earthquake.usgs.gov/earthquakes/feed/v1.0/quakeml.php")), usgsQuakeML),
|
||||
WolfxEventSourceConfig wolfx => BuildWolfxWorkerFilter(new WolfxWorker(new Uri("wss://ws-api.wolfx.jp/all_eew")), wolfx),
|
||||
_ => throw new InvalidOperationException("Unknown event source type."),
|
||||
});
|
||||
}
|
||||
#endif
|
||||
}
|
||||
JMAAtomWorker BuildJMAAtomWorkerFilter(JMAAtomWorker worker, JMAAtomEventSourceConfig config) {
|
||||
static JMAAtomWorker BuildJMAAtomWorkerFilter(JMAAtomWorker worker, JMAAtomEventSourceConfig config) {
|
||||
if (config.Filter != null) worker.SetFilter(config.Filter);
|
||||
worker.IsFilterWhitelist = config.IsFilterWhitelist;
|
||||
return worker;
|
||||
}
|
||||
WolfxWorker BuildWolfxWorkerFilter(WolfxWorker worker, WolfxEventSourceConfig config) {
|
||||
static WolfxWorker BuildWolfxWorkerFilter(WolfxWorker worker, WolfxEventSourceConfig config) {
|
||||
if (config.Filter != null) worker.SetFilter(config.Filter.Select(i => i switch {
|
||||
"cenc_eew" => typeof(CENCEEW),
|
||||
"cenc_eqlist" => typeof(WolfxEarthquakeList<CENCEarthquake>),
|
||||
@@ -158,39 +177,49 @@ namespace Cryville.EEW.Unity {
|
||||
worker.IsFilterWhitelist = config.IsFilterWhitelist;
|
||||
return worker;
|
||||
}
|
||||
static BMKGOpenDataWorker BuildBMKGOpenDataWorkerUris(BMKGOpenDataWorker worker, BMKGOpenDataEventSourceConfig config) {
|
||||
worker.SetDataUris(config.Subtypes.Select(i => new Uri(string.Format(CultureInfo.InvariantCulture, "https://data.bmkg.go.id/DataMKG/TEWS/{0}.json", i))));
|
||||
return worker;
|
||||
}
|
||||
static USGSQuakeMLWorker BuildUSGSQuakeMLWorkerUri(USGSQuakeMLWorker worker, USGSQuakeMLEventSourceConfig config) {
|
||||
worker.SetFeedRelativeUri(new(string.Format(CultureInfo.InvariantCulture, "/earthquakes/feed/v1.0/summary/{0}.quakeml", config.Subtype), UriKind.Relative));
|
||||
return worker;
|
||||
}
|
||||
|
||||
readonly OngoingReportManager _ongoingReportManager = new();
|
||||
readonly ConcurrentQueue<Action> _uiActionQueue = new();
|
||||
ReportViewModel _latestHistoryReport;
|
||||
void OnReported(object sender, ReportViewModel e) {
|
||||
Debug.Log(e);
|
||||
if (e.Model is Exception && e.Model is not SourceWorkerNetworkException)
|
||||
Debug.LogError(e);
|
||||
_grouper.Report(e);
|
||||
_ongoingReportManager.Report(e);
|
||||
_uiActionQueue.Enqueue(() => {
|
||||
m_mapElementManager.SetSelected(e);
|
||||
if (m_mapElementManager.OngoingCount == 0) {
|
||||
m_mapElementManager.SetSelected(e);
|
||||
m_cameraController.OnMapElementUpdated();
|
||||
}
|
||||
if (e.InvalidatedTime == null && (!(e.RevisionKey?.IsCancellation ?? false))) {
|
||||
_latestHistoryReport = e;
|
||||
}
|
||||
m_cameraController.OnMapElementUpdated();
|
||||
});
|
||||
}
|
||||
void OnOngoingReported(ReportViewModel item, CollectionChangeAction action) {
|
||||
if (action == CollectionChangeAction.Add) {
|
||||
_uiActionQueue.Enqueue(() => {
|
||||
m_ongoingEventList.Add(item);
|
||||
if (m_mapElementManager.Add(item)) {
|
||||
m_mapElementManager.SetSelected(null);
|
||||
}
|
||||
m_cameraController.OnMapElementUpdated();
|
||||
m_ongoingEventList.Add(item);
|
||||
});
|
||||
}
|
||||
else if (action == CollectionChangeAction.Remove) {
|
||||
_uiActionQueue.Enqueue(() => {
|
||||
m_ongoingEventList.Remove(item);
|
||||
m_mapElementManager.Remove(item);
|
||||
if (m_mapElementManager.Count == 0 && SharedSettings.Instance.DoSwitchBackToHistory && _latestHistoryReport is not null) {
|
||||
m_mapElementManager.SetSelected(_latestHistoryReport);
|
||||
m_mapElementManager.SetSelected(_latestHistoryReport, true);
|
||||
}
|
||||
m_cameraController.OnMapElementUpdated();
|
||||
m_ongoingEventList.Remove(item);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -205,8 +234,9 @@ namespace Cryville.EEW.Unity {
|
||||
m_cameraController.OnMapElementUpdated();
|
||||
}
|
||||
public void SetCurrent(ReportViewModel e) {
|
||||
m_mapElementManager.SetCurrent(e);
|
||||
m_cameraController.OnMapElementUpdated();
|
||||
if (m_mapElementManager.SetCurrent(e)) {
|
||||
m_cameraController.OnMapElementUpdated();
|
||||
}
|
||||
}
|
||||
|
||||
void Update() {
|
||||
|
@@ -677,6 +677,7 @@ MonoBehaviour:
|
||||
m_layerElement: {fileID: 1602500234}
|
||||
m_layerElementSub: {fileID: 303098821}
|
||||
m_prefabTile: {fileID: 7683017549812261837, guid: e090edd328c6750478f5849a43a9d278, type: 3}
|
||||
m_prefabBitmapHolder: {fileID: 1455558857588368834, guid: 1a5cf693e0cf6b94390f72f521c151ba, type: 3}
|
||||
--- !u!1 &408286580
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -1368,7 +1369,7 @@ RectTransform:
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 1180, y: 620}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1925427753
|
||||
MonoBehaviour:
|
||||
|
BIN
Assets/Plugins/Analyzers/Cryville.EEW.Analyzer.dll
Normal file
BIN
Assets/Plugins/Analyzers/Cryville.EEW.Analyzer.dll
Normal file
Binary file not shown.
78
Assets/Plugins/Analyzers/Cryville.EEW.Analyzer.dll.meta
Normal file
78
Assets/Plugins/Analyzers/Cryville.EEW.Analyzer.dll.meta
Normal file
@@ -0,0 +1,78 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 88e8ae9c8ce06934ab7681fb678d7b00
|
||||
labels:
|
||||
- RoslynAnalyzer
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
: Any
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
Exclude Android: 1
|
||||
Exclude Editor: 1
|
||||
Exclude Linux64: 1
|
||||
Exclude OSXUniversal: 1
|
||||
Exclude Win: 1
|
||||
Exclude Win64: 1
|
||||
- first:
|
||||
Android: Android
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: ARMv7
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
DefaultValueInitialized: true
|
||||
OS: AnyOS
|
||||
- first:
|
||||
Standalone: Linux64
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
- first:
|
||||
Standalone: OSXUniversal
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
- first:
|
||||
Standalone: Win
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
- first:
|
||||
Standalone: Win64
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
- first:
|
||||
Windows Store Apps: WindowsStoreApps
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/Plugins/Cryville.EEW.BMKGOpenData.Map.dll
Normal file
BIN
Assets/Plugins/Cryville.EEW.BMKGOpenData.Map.dll
Normal file
Binary file not shown.
33
Assets/Plugins/Cryville.EEW.BMKGOpenData.Map.dll.meta
Normal file
33
Assets/Plugins/Cryville.EEW.BMKGOpenData.Map.dll.meta
Normal file
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9c2c20067e0adc54c813350fd61f9a3a
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
Windows Store Apps: WindowsStoreApps
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/Plugins/Cryville.EEW.BMKGOpenData.TTS.dll
Normal file
BIN
Assets/Plugins/Cryville.EEW.BMKGOpenData.TTS.dll
Normal file
Binary file not shown.
33
Assets/Plugins/Cryville.EEW.BMKGOpenData.TTS.dll.meta
Normal file
33
Assets/Plugins/Cryville.EEW.BMKGOpenData.TTS.dll.meta
Normal file
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e9164d2df3d1c03499419935666416ae
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
Windows Store Apps: WindowsStoreApps
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/Plugins/Cryville.EEW.BMKGOpenData.dll
Normal file
BIN
Assets/Plugins/Cryville.EEW.BMKGOpenData.dll
Normal file
Binary file not shown.
33
Assets/Plugins/Cryville.EEW.BMKGOpenData.dll.meta
Normal file
33
Assets/Plugins/Cryville.EEW.BMKGOpenData.dll.meta
Normal file
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 152cea136489ac044b7c12c66ba72b53
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
Windows Store Apps: WindowsStoreApps
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/Plugins/Cryville.EEW.CENCStrongGroundMotion.Map.dll
Normal file
BIN
Assets/Plugins/Cryville.EEW.CENCStrongGroundMotion.Map.dll
Normal file
Binary file not shown.
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 550171b48a648b34e9ce5f1aba6244f1
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
Windows Store Apps: WindowsStoreApps
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/Plugins/Cryville.EEW.CENCStrongGroundMotion.dll
Normal file
BIN
Assets/Plugins/Cryville.EEW.CENCStrongGroundMotion.dll
Normal file
Binary file not shown.
33
Assets/Plugins/Cryville.EEW.CENCStrongGroundMotion.dll.meta
Normal file
33
Assets/Plugins/Cryville.EEW.CENCStrongGroundMotion.dll.meta
Normal file
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0f848a4ea2f35e7449e584beee48c659
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
Windows Store Apps: WindowsStoreApps
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Assets/Plugins/Cryville.EEW.EMSC.Map.dll
Normal file
BIN
Assets/Plugins/Cryville.EEW.EMSC.Map.dll
Normal file
Binary file not shown.
33
Assets/Plugins/Cryville.EEW.EMSC.Map.dll.meta
Normal file
33
Assets/Plugins/Cryville.EEW.EMSC.Map.dll.meta
Normal file
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e1ef9470a2a1d7b4da9ddd106620b665
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
Windows Store Apps: WindowsStoreApps
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/Plugins/Cryville.EEW.EMSC.dll
Normal file
BIN
Assets/Plugins/Cryville.EEW.EMSC.dll
Normal file
Binary file not shown.
33
Assets/Plugins/Cryville.EEW.EMSC.dll.meta
Normal file
33
Assets/Plugins/Cryville.EEW.EMSC.dll.meta
Normal file
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 48f0c884a8a1e4043948f765ed18e4bc
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
Windows Store Apps: WindowsStoreApps
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Assets/Plugins/Cryville.EEW.QuakeML.Map.dll
Normal file
BIN
Assets/Plugins/Cryville.EEW.QuakeML.Map.dll
Normal file
Binary file not shown.
33
Assets/Plugins/Cryville.EEW.QuakeML.Map.dll.meta
Normal file
33
Assets/Plugins/Cryville.EEW.QuakeML.Map.dll.meta
Normal file
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4d3d5b78e07866347b2ba028b4bd3ef8
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
Windows Store Apps: WindowsStoreApps
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/Plugins/Cryville.EEW.QuakeML.dll
Normal file
BIN
Assets/Plugins/Cryville.EEW.QuakeML.dll
Normal file
Binary file not shown.
33
Assets/Plugins/Cryville.EEW.QuakeML.dll.meta
Normal file
33
Assets/Plugins/Cryville.EEW.QuakeML.dll.meta
Normal file
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ec4fba30706c64142a5504e3f0e64620
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
Windows Store Apps: WindowsStoreApps
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Binary file not shown.
@@ -14,10 +14,10 @@
|
||||
The shared instance of the <see cref="T:Cryville.EEW.TTS.EmptyTTSMessageGeneratorContext" /> class.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Cryville.EEW.TTS.EmptyTTSMessageGeneratorContext.LocationConverter">
|
||||
<member name="P:Cryville.EEW.TTS.EmptyTTSMessageGeneratorContext.NowcastWarningDelayTolerance">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="P:Cryville.EEW.TTS.EmptyTTSMessageGeneratorContext.NowcastWarningDelayTolerance">
|
||||
<member name="M:Cryville.EEW.TTS.EmptyTTSMessageGeneratorContext.NameLocation(System.Double,System.Double,System.Globalization.CultureInfo,System.Globalization.CultureInfo@,System.String@)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="T:Cryville.EEW.TTS.ITTSMessageGeneratorContext">
|
||||
@@ -25,16 +25,22 @@
|
||||
Represents a context used in TTS message generators.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Cryville.EEW.TTS.ITTSMessageGeneratorContext.LocationConverter">
|
||||
<summary>
|
||||
The location converter.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Cryville.EEW.TTS.ITTSMessageGeneratorContext.NowcastWarningDelayTolerance">
|
||||
<summary>
|
||||
The delay tolerance before a nowcast warning event cannot trigger sounds and TTS.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Cryville.EEW.TTS.ITTSMessageGeneratorContext.NameLocation(System.Double,System.Double,System.Globalization.CultureInfo,System.Globalization.CultureInfo@,System.String@)">
|
||||
<summary>
|
||||
Names a location in a culture.
|
||||
</summary>
|
||||
<param name="lat">The latitude of the location.</param>
|
||||
<param name="lon">The longitude of the location.</param>
|
||||
<param name="localCulture">The local culture supported by the event itself.</param>
|
||||
<param name="targetCulture">The target culture of the location name. When the method returns, set to the actual culture of the location name.</param>
|
||||
<param name="name">The location name.</param>
|
||||
<returns>Whether the name is given by the context. <see langword="false" /> if the generator should provide a local name instead.</returns>
|
||||
</member>
|
||||
<member name="T:Cryville.EEW.TTS.TTSEntry">
|
||||
<summary>
|
||||
Represents an entry sent to a TTS worker.
|
||||
|
BIN
Assets/Plugins/Cryville.EEW.USGS.dll
Normal file
BIN
Assets/Plugins/Cryville.EEW.USGS.dll
Normal file
Binary file not shown.
33
Assets/Plugins/Cryville.EEW.USGS.dll.meta
Normal file
33
Assets/Plugins/Cryville.EEW.USGS.dll.meta
Normal file
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b3347ce24f73cab44a4191aa8976d88a
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
Windows Store Apps: WindowsStoreApps
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -30,17 +30,17 @@
|
||||
<param name="amount">The amount of phase to increment.</param>
|
||||
<returns>The next delay value.</returns>
|
||||
</member>
|
||||
<member name="T:Cryville.EEW.EmptyLocationConverter">
|
||||
<member name="T:Cryville.EEW.EmptyLocationNamer">
|
||||
<summary>
|
||||
An empty <see cref="T:Cryville.EEW.ILocationConverter" />.
|
||||
An empty <see cref="T:Cryville.EEW.ILocationNamer" />.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Cryville.EEW.EmptyLocationConverter.Instance">
|
||||
<member name="P:Cryville.EEW.EmptyLocationNamer.Instance">
|
||||
<summary>
|
||||
The shared instance of the <see cref="T:Cryville.EEW.EmptyLocationConverter" /> class.
|
||||
The shared instance of the <see cref="T:Cryville.EEW.EmptyLocationNamer" /> class.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Cryville.EEW.EmptyLocationConverter.Convert(Cryville.EEW.INamedLocation,System.Globalization.CultureInfo@)">
|
||||
<member name="M:Cryville.EEW.EmptyLocationNamer.Name(System.Double,System.Double,System.Globalization.CultureInfo@,System.Int32@)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="T:Cryville.EEW.GeoUtils">
|
||||
@@ -213,18 +213,20 @@
|
||||
<param name="culture">The preferred culture of the generated object. When the method returns, set to the actual culture of the generated object.</param>
|
||||
<returns>The generated object.</returns>
|
||||
</member>
|
||||
<member name="T:Cryville.EEW.ILocationConverter">
|
||||
<member name="T:Cryville.EEW.ILocationNamer">
|
||||
<summary>
|
||||
Represents a converter that converts a named location to a name in a specified culture.
|
||||
Represents a namer that names a location in a specified culture.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Cryville.EEW.ILocationConverter.Convert(Cryville.EEW.INamedLocation,System.Globalization.CultureInfo@)">
|
||||
<member name="M:Cryville.EEW.ILocationNamer.Name(System.Double,System.Double,System.Globalization.CultureInfo@,System.Int32@)">
|
||||
<summary>
|
||||
Converts a named location to a name in a specified culture.
|
||||
Names a location in a specified culture.
|
||||
</summary>
|
||||
<param name="location">The named location.</param>
|
||||
<param name="lat">The latitude.</param>
|
||||
<param name="lon">The longitude.</param>
|
||||
<param name="culture">The preferred culture of the name. When the method returns, set to the actual culture of the name.</param>
|
||||
<returns>The converted name.</returns>
|
||||
<param name="specificity">The preferred specificity of the name. When the method returns, set to the actual specificity of the name.</param>
|
||||
<returns>The name.</returns>
|
||||
</member>
|
||||
<member name="T:Cryville.EEW.ISourceWorker">
|
||||
<summary>
|
||||
@@ -349,6 +351,16 @@
|
||||
<returns>The string of the specified name in the resource.</returns>
|
||||
<exception cref="T:System.Collections.Generic.KeyNotFoundException">The string of the specified name is not found.</exception>
|
||||
</member>
|
||||
<member name="M:Cryville.EEW.MessageStringSetExtensions.GetStringOrDefault(Cryville.EEW.IMessageStringSet,System.String,System.String)">
|
||||
<summary>
|
||||
Gets a string in the string set, or a default string in the string set if not found.
|
||||
</summary>
|
||||
<param name="set">The string set.</param>
|
||||
<param name="name">The name of the string.</param>
|
||||
<param name="defaultName">The name of the default string.</param>
|
||||
<returns>The string of the specified name in the resource, or the default string of the specified default name in the string set if not found.</returns>
|
||||
<exception cref="T:System.Collections.Generic.KeyNotFoundException">The default string of the specified default name is not found.</exception>
|
||||
</member>
|
||||
<member name="M:Cryville.EEW.MessageStringSetExtensions.GetStringSetRequired(Cryville.EEW.IMessageStringSet,System.String)">
|
||||
<summary>
|
||||
Gets a string set in the string set.
|
||||
@@ -519,7 +531,7 @@
|
||||
<param name="Properties">The properties of the feature.</param>
|
||||
<param name="BoundingBox">The bounding box.</param>
|
||||
</member>
|
||||
<member name="M:Cryville.EEW.Models.GeoJSON.Feature.#ctor(System.Object,Cryville.EEW.Models.GeoJSON.Geometry,System.Collections.Generic.IDictionary{System.String,System.Object},System.Double[])">
|
||||
<member name="M:Cryville.EEW.Models.GeoJSON.Feature.#ctor(System.Text.Json.JsonElement,Cryville.EEW.Models.GeoJSON.Geometry,System.Collections.Generic.IDictionary{System.String,System.Text.Json.JsonElement},System.Double[])">
|
||||
<summary>
|
||||
Represents a spatially bounded thing.
|
||||
</summary>
|
||||
@@ -741,143 +753,143 @@
|
||||
<member name="M:Cryville.EEW.Models.GeoJSON.PositionConverter.Write(System.Text.Json.Utf8JsonWriter,Cryville.EEW.Models.GeoJSON.Position,System.Text.Json.JsonSerializerOptions)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="T:Cryville.EEW.Models.GeoJSON.GeoJSONSerializationContext">
|
||||
<member name="T:Cryville.EEW.Models.GeoJSON.GeoJSONSerializerContext">
|
||||
<summary>
|
||||
<see cref="T:System.Text.Json.Serialization.JsonSerializerContext" /> for GeoJSON objects.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializationContext.Double">
|
||||
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializerContext.Double">
|
||||
<summary>
|
||||
Defines the source generated JSON serialization contract metadata for a given type.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializationContext.NullableDouble">
|
||||
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializerContext.NullableDouble">
|
||||
<summary>
|
||||
Defines the source generated JSON serialization contract metadata for a given type.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializationContext.DoubleArray">
|
||||
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializerContext.DoubleArray">
|
||||
<summary>
|
||||
Defines the source generated JSON serialization contract metadata for a given type.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializationContext.Feature">
|
||||
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializerContext.Feature">
|
||||
<summary>
|
||||
Defines the source generated JSON serialization contract metadata for a given type.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializationContext.FeatureArray">
|
||||
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializerContext.FeatureArray">
|
||||
<summary>
|
||||
Defines the source generated JSON serialization contract metadata for a given type.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializationContext.FeatureCollection">
|
||||
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializerContext.FeatureCollection">
|
||||
<summary>
|
||||
Defines the source generated JSON serialization contract metadata for a given type.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializationContext.GeoJSONObject">
|
||||
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializerContext.GeoJSONObject">
|
||||
<summary>
|
||||
Defines the source generated JSON serialization contract metadata for a given type.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializationContext.Geometry">
|
||||
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializerContext.Geometry">
|
||||
<summary>
|
||||
Defines the source generated JSON serialization contract metadata for a given type.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializationContext.GeometryArray">
|
||||
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializerContext.GeometryArray">
|
||||
<summary>
|
||||
Defines the source generated JSON serialization contract metadata for a given type.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializationContext.GeometryCollection">
|
||||
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializerContext.GeometryCollection">
|
||||
<summary>
|
||||
Defines the source generated JSON serialization contract metadata for a given type.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializationContext.LineString">
|
||||
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializerContext.LineString">
|
||||
<summary>
|
||||
Defines the source generated JSON serialization contract metadata for a given type.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializationContext.MultiLineString">
|
||||
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializerContext.MultiLineString">
|
||||
<summary>
|
||||
Defines the source generated JSON serialization contract metadata for a given type.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializationContext.MultiPoint">
|
||||
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializerContext.MultiPoint">
|
||||
<summary>
|
||||
Defines the source generated JSON serialization contract metadata for a given type.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializationContext.MultiPolygon">
|
||||
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializerContext.MultiPolygon">
|
||||
<summary>
|
||||
Defines the source generated JSON serialization contract metadata for a given type.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializationContext.Point">
|
||||
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializerContext.Point">
|
||||
<summary>
|
||||
Defines the source generated JSON serialization contract metadata for a given type.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializationContext.Polygon">
|
||||
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializerContext.Polygon">
|
||||
<summary>
|
||||
Defines the source generated JSON serialization contract metadata for a given type.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializationContext.Position">
|
||||
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializerContext.Position">
|
||||
<summary>
|
||||
Defines the source generated JSON serialization contract metadata for a given type.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializationContext.PositionArray">
|
||||
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializerContext.PositionArray">
|
||||
<summary>
|
||||
Defines the source generated JSON serialization contract metadata for a given type.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializationContext.PositionArrayArray">
|
||||
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializerContext.PositionArrayArray">
|
||||
<summary>
|
||||
Defines the source generated JSON serialization contract metadata for a given type.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializationContext.PositionArrayArrayArray">
|
||||
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializerContext.PositionArrayArrayArray">
|
||||
<summary>
|
||||
Defines the source generated JSON serialization contract metadata for a given type.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializationContext.IDictionaryStringObject">
|
||||
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializerContext.IDictionaryStringJsonElement">
|
||||
<summary>
|
||||
Defines the source generated JSON serialization contract metadata for a given type.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializationContext.Object">
|
||||
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializerContext.JsonElement">
|
||||
<summary>
|
||||
Defines the source generated JSON serialization contract metadata for a given type.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializationContext.String">
|
||||
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializerContext.String">
|
||||
<summary>
|
||||
Defines the source generated JSON serialization contract metadata for a given type.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializationContext.Default">
|
||||
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializerContext.Default">
|
||||
<summary>
|
||||
The default <see cref="T:System.Text.Json.Serialization.JsonSerializerContext"/> associated with a default <see cref="T:System.Text.Json.JsonSerializerOptions"/> instance.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializationContext.GeneratedSerializerOptions">
|
||||
<member name="P:Cryville.EEW.Models.GeoJSON.GeoJSONSerializerContext.GeneratedSerializerOptions">
|
||||
<summary>
|
||||
The source-generated options associated with this context.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Cryville.EEW.Models.GeoJSON.GeoJSONSerializationContext.#ctor">
|
||||
<member name="M:Cryville.EEW.Models.GeoJSON.GeoJSONSerializerContext.#ctor">
|
||||
<inheritdoc/>
|
||||
</member>
|
||||
<member name="M:Cryville.EEW.Models.GeoJSON.GeoJSONSerializationContext.#ctor(System.Text.Json.JsonSerializerOptions)">
|
||||
<member name="M:Cryville.EEW.Models.GeoJSON.GeoJSONSerializerContext.#ctor(System.Text.Json.JsonSerializerOptions)">
|
||||
<inheritdoc/>
|
||||
</member>
|
||||
<member name="M:Cryville.EEW.Models.GeoJSON.GeoJSONSerializationContext.GetTypeInfo(System.Type)">
|
||||
<member name="M:Cryville.EEW.Models.GeoJSON.GeoJSONSerializerContext.GetTypeInfo(System.Type)">
|
||||
<inheritdoc/>
|
||||
</member>
|
||||
<member name="T:Cryville.EEW.Models.XmlSerializedDateTimeOffset">
|
||||
@@ -960,61 +972,6 @@
|
||||
</summary>
|
||||
<param name="value">An instance of the <see cref="T:Cryville.EEW.Models.XmlSerializedDateTimeOffset" /> struct.</param>
|
||||
</member>
|
||||
<member name="T:Cryville.EEW.INamedLocation">
|
||||
<summary>
|
||||
Represents a named location.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Cryville.EEW.INamedLocation.Name">
|
||||
<summary>
|
||||
The source name of the location.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Cryville.EEW.INamedLocation.Culture">
|
||||
<summary>
|
||||
The source culture of <see cref="P:Cryville.EEW.INamedLocation.Name" />.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Cryville.EEW.INamedLocation.Latitude">
|
||||
<summary>
|
||||
The latitude of the location.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Cryville.EEW.INamedLocation.Longitude">
|
||||
<summary>
|
||||
The longitude of the location.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Cryville.EEW.NamedLocation">
|
||||
<summary>
|
||||
Represents a named location.
|
||||
</summary>
|
||||
<param name="Name">The source name of the location.</param>
|
||||
<param name="Culture">The source culture of <paramref name="Name" />.</param>
|
||||
<param name="Latitude">The latitude of the location.</param>
|
||||
<param name="Longitude">The longitude of the location.</param>
|
||||
</member>
|
||||
<member name="M:Cryville.EEW.NamedLocation.#ctor(System.String,System.Globalization.CultureInfo,System.Double,System.Double)">
|
||||
<summary>
|
||||
Represents a named location.
|
||||
</summary>
|
||||
<param name="Name">The source name of the location.</param>
|
||||
<param name="Culture">The source culture of <paramref name="Name" />.</param>
|
||||
<param name="Latitude">The latitude of the location.</param>
|
||||
<param name="Longitude">The longitude of the location.</param>
|
||||
</member>
|
||||
<member name="P:Cryville.EEW.NamedLocation.Name">
|
||||
<summary>The source name of the location.</summary>
|
||||
</member>
|
||||
<member name="P:Cryville.EEW.NamedLocation.Culture">
|
||||
<summary>The source culture of <paramref name="Name" />.</summary>
|
||||
</member>
|
||||
<member name="P:Cryville.EEW.NamedLocation.Latitude">
|
||||
<summary>The latitude of the location.</summary>
|
||||
</member>
|
||||
<member name="P:Cryville.EEW.NamedLocation.Longitude">
|
||||
<summary>The longitude of the location.</summary>
|
||||
</member>
|
||||
<member name="T:Cryville.EEW.NonstandardDateTimeJsonConverter">
|
||||
<summary>
|
||||
Converts instances of the <see cref="T:System.DateTime" /> struct to or from JSON.
|
||||
@@ -1039,6 +996,9 @@
|
||||
<member name="P:Cryville.EEW.Report.EmptyRVMGeneratorContext.SeverityScheme">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Cryville.EEW.Report.EmptyRVMGeneratorContext.NameLocation(System.Double,System.Double,System.Globalization.CultureInfo,System.Globalization.CultureInfo@,System.String@,System.Int32@)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="T:Cryville.EEW.Report.EmptySeverityScheme">
|
||||
<summary>
|
||||
An empty <see cref="T:Cryville.EEW.Report.ISeverityScheme" /> that always returns <c>-1</c>.
|
||||
@@ -1189,6 +1149,35 @@
|
||||
The severity scheme.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Cryville.EEW.Report.IRVMGeneratorContext.NameLocation(System.Double,System.Double,System.Globalization.CultureInfo,System.Globalization.CultureInfo@,System.String@,System.Int32@)">
|
||||
<summary>
|
||||
Names a location in a culture.
|
||||
</summary>
|
||||
<param name="lat">The latitude of the location.</param>
|
||||
<param name="lon">The longitude of the location.</param>
|
||||
<param name="localCulture">The local culture supported by the event itself.</param>
|
||||
<param name="targetCulture">The target culture of the location name. When the method returns, set to the actual culture of the location name.</param>
|
||||
<param name="name">The location name.</param>
|
||||
<param name="specificity">The location specificity. See <see cref="P:Cryville.EEW.Report.ReportViewModel.LocationSpecificity" />.</param>
|
||||
<returns>Whether the name is given by the context. <see langword="false" /> if the generator should provide a local name instead.</returns>
|
||||
</member>
|
||||
<member name="T:Cryville.EEW.Report.RVMGeneratorContextExtensions">
|
||||
<summary>
|
||||
Provides a set of <see langword="static" /> methods related to <see cref="T:Cryville.EEW.Report.IRVMGeneratorContext" />.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Cryville.EEW.Report.RVMGeneratorContextExtensions.NameLocationTo(Cryville.EEW.Report.IRVMGeneratorContext,Cryville.EEW.Report.ReportViewModel,System.Double,System.Double,System.Globalization.CultureInfo,System.Globalization.CultureInfo)">
|
||||
<summary>
|
||||
Names a location in a culture and sets the result to a report view model.
|
||||
</summary>
|
||||
<param name="context">The context.</param>
|
||||
<param name="e">The report view model.</param>
|
||||
<param name="lat">The latitude of the location.</param>
|
||||
<param name="lon">The longitude of the location.</param>
|
||||
<param name="localCulture">The local culture supported by the event itself.</param>
|
||||
<param name="targetCulture">The target culture of the location name. When the method returns, set to the actual culture of the location name.</param>
|
||||
<returns>Whether the name is given by the context. <see langword="false" /> if the generator should provide a local name instead.</returns>
|
||||
</member>
|
||||
<member name="T:Cryville.EEW.Report.ISeverityScheme">
|
||||
<summary>
|
||||
Represents a severity scheme, extracting severity values from different properties.
|
||||
@@ -1497,6 +1486,11 @@
|
||||
The culture <c>en-US</c>.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:Cryville.EEW.SharedCultures.IdIdCulture">
|
||||
<summary>
|
||||
The culture <c>id-ID</c>.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:Cryville.EEW.SharedCultures.JaJpCulture">
|
||||
<summary>
|
||||
The culture <c>ja-JP</c>.
|
||||
@@ -1512,6 +1506,16 @@
|
||||
The culture <c>zh-TW</c>.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:Cryville.EEW.SharedCultures.CurrentCulture">
|
||||
<summary>
|
||||
The current culture.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:Cryville.EEW.SharedCultures.CurrentUICulture">
|
||||
<summary>
|
||||
The current UI culture.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Cryville.EEW.SharedCultures.Get(System.String)">
|
||||
<summary>
|
||||
Gets a culture of the specified name.
|
||||
@@ -1549,6 +1553,11 @@
|
||||
China Standard Time.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:Cryville.EEW.SharedTimeZones.SEAsia">
|
||||
<summary>
|
||||
SE Asia Standard Time.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:Cryville.EEW.SharedTimeZones.Taipei">
|
||||
<summary>
|
||||
Taipei Standard Time.
|
||||
|
Binary file not shown.
Binary file not shown.
BIN
Assets/Plugins/QuakeML.dll
Normal file
BIN
Assets/Plugins/QuakeML.dll
Normal file
Binary file not shown.
33
Assets/Plugins/QuakeML.dll.meta
Normal file
33
Assets/Plugins/QuakeML.dll.meta
Normal file
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a5809b30a2765e54aa6f2b5d15c00a76
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
Windows Store Apps: WindowsStoreApps
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
46
Assets/Prefabs/Bitmap Holder.prefab
Normal file
46
Assets/Prefabs/Bitmap Holder.prefab
Normal file
@@ -0,0 +1,46 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &1455558857588368834
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 8746876075196617235}
|
||||
- component: {fileID: 122704584488816298}
|
||||
m_Layer: 0
|
||||
m_Name: Bitmap Holder
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &8746876075196617235
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1455558857588368834}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &122704584488816298
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1455558857588368834}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: c17f6b26e9a6bd74e8b2d071c6951c41, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
7
Assets/Prefabs/Bitmap Holder.prefab.meta
Normal file
7
Assets/Prefabs/Bitmap Holder.prefab.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1a5cf693e0cf6b94390f72f521c151ba
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
132
Assets/Prefabs/RegionView.prefab
Normal file
132
Assets/Prefabs/RegionView.prefab
Normal file
@@ -0,0 +1,132 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &2984379317001549352
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2984379317001549359}
|
||||
- component: {fileID: 2962259339337128397}
|
||||
m_Layer: 0
|
||||
m_Name: RegionView
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &2984379317001549359
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2984379317001549352}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 3524170046801625328}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &2962259339337128397
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2984379317001549352}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: c57a0e86eb63b6048ba265e9d98e84f6, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_spriteRenderer: {fileID: 3524170046801625329}
|
||||
--- !u!1 &3524170046801625335
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 3524170046801625328}
|
||||
- component: {fileID: 3524170046801625329}
|
||||
m_Layer: 0
|
||||
m_Name: Area
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &3524170046801625328
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3524170046801625335}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0.5, y: 0.5, z: 1}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 2984379317001549359}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!212 &3524170046801625329
|
||||
SpriteRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3524170046801625335}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 0
|
||||
m_ReceiveShadows: 0
|
||||
m_DynamicOccludee: 1
|
||||
m_StaticShadowCaster: 0
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 0
|
||||
m_RayTraceProcedural: 0
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_ReceiveGI: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 1
|
||||
m_SelectedEditorRenderState: 0
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_Sprite: {fileID: 7482667652216324306, guid: 311925a002f4447b3a28927169b83ea6, type: 3}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 0.2509804}
|
||||
m_FlipX: 0
|
||||
m_FlipY: 0
|
||||
m_DrawMode: 0
|
||||
m_Size: {x: 1, y: 1}
|
||||
m_AdaptiveModeThreshold: 0.5
|
||||
m_SpriteTileMode: 0
|
||||
m_WasSpriteAssigned: 1
|
||||
m_MaskInteraction: 0
|
||||
m_SpriteSortPoint: 0
|
7
Assets/Prefabs/RegionView.prefab.meta
Normal file
7
Assets/Prefabs/RegionView.prefab.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bcdaa327335962646879336458cd7379
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
1973
Assets/RegionEditor.unity
Normal file
1973
Assets/RegionEditor.unity
Normal file
File diff suppressed because it is too large
Load Diff
7
Assets/RegionEditor.unity.meta
Normal file
7
Assets/RegionEditor.unity.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8d07fde72bae47a4990c95f764ca2b43
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 75452b90c729a7248958090ab7acd6fd
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"Culture": "en-US",
|
||||
"Strings": {
|
||||
"Headline": "An earthquake{1} occurred at {0:HH:mm:ss 'on' MMM dd yyyy} Western Indonesia Time.{2}",
|
||||
"HeadlineDepth": " Hypocenter depth {0}km.",
|
||||
"HeadlineMagnitude": " of magnitude {0:F1}",
|
||||
"MaxIntensity": "The maximum intensity observed is {0}.",
|
||||
"Region": "The epicenter is in {0}.",
|
||||
"Title": "Earthquake data.",
|
||||
"TitleStandAlone": "Earthquake data"
|
||||
}
|
||||
}
|
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 228c78ff7418ebc4d9a6b87592a90b82
|
||||
guid: e4420490220c6df4fb07cd0c63dec184
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"Culture": "id-ID",
|
||||
"Strings": {
|
||||
"Headline": "Telah terjadi gempa pada {0:dd MMMM yyyy 'pukul' H 'lewat' m 'menit' s 'detik'} Waktu Indonesia Barat{1}{2}.",
|
||||
"HeadlineDepth": ", pada kedalaman {0} km",
|
||||
"HeadlineMagnitude": ", dengan magnitudo {0:F1}",
|
||||
"MaxIntensity": "Intensitas gempa maksimum yang dirasakan adalah {0}.",
|
||||
"Region": "Pusat gempa berada di {0}.",
|
||||
"Title": "Data gempabumi.",
|
||||
"TitleStandAlone": "Data gempabumi"
|
||||
}
|
||||
}
|
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c0ddf089cc97f404584a4208053c1fc5
|
||||
guid: 76aa8016add210b489ed175d006ef35d
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user