|
|
|
|
@@ -32,6 +32,7 @@ class ParticleCoreLayerValidationActivity : AppCompatActivity() {
|
|
|
|
|
private var trailFade = DEFAULT_TRAIL_FADE
|
|
|
|
|
private var speedColorEnabled = true
|
|
|
|
|
private var timeWindowMode = false
|
|
|
|
|
private var productionFeedMode = false
|
|
|
|
|
private var styleLoadEpoch = 0L
|
|
|
|
|
private var styleReady = false
|
|
|
|
|
// Display mirror only; Core remains the playback state authority.
|
|
|
|
|
@@ -97,21 +98,25 @@ class ParticleCoreLayerValidationActivity : AppCompatActivity() {
|
|
|
|
|
}
|
|
|
|
|
findViewById<Button>(R.id.validationUniformEast).setOnClickListener {
|
|
|
|
|
timeWindowMode = false
|
|
|
|
|
productionFeedMode = false
|
|
|
|
|
fixtureMode = FIXTURE_UNIFORM_EAST
|
|
|
|
|
if (this::maplibreMap.isInitialized) loadValidationStyle(active, enabled, "UNIFORM_EAST")
|
|
|
|
|
}
|
|
|
|
|
findViewById<Button>(R.id.validationUniformNorth).setOnClickListener {
|
|
|
|
|
timeWindowMode = false
|
|
|
|
|
productionFeedMode = false
|
|
|
|
|
fixtureMode = FIXTURE_UNIFORM_NORTH
|
|
|
|
|
if (this::maplibreMap.isInitialized) loadValidationStyle(active, enabled, "UNIFORM_NORTH")
|
|
|
|
|
}
|
|
|
|
|
findViewById<Button>(R.id.validationVortex).setOnClickListener {
|
|
|
|
|
timeWindowMode = false
|
|
|
|
|
productionFeedMode = false
|
|
|
|
|
fixtureMode = FIXTURE_VORTEX
|
|
|
|
|
if (this::maplibreMap.isInitialized) loadValidationStyle(active, enabled, "VORTEX")
|
|
|
|
|
}
|
|
|
|
|
findViewById<Button>(R.id.validationTimeWindow).setOnClickListener {
|
|
|
|
|
timeWindowMode = true
|
|
|
|
|
productionFeedMode = true
|
|
|
|
|
fixtureMode = FIXTURE_UNIFORM_EAST
|
|
|
|
|
timeMix = 0.0f
|
|
|
|
|
timelineState = "NOT READY"
|
|
|
|
|
@@ -381,7 +386,7 @@ class ParticleCoreLayerValidationActivity : AppCompatActivity() {
|
|
|
|
|
} else {
|
|
|
|
|
"EAST"
|
|
|
|
|
}
|
|
|
|
|
val playback = if (timeWindowMode) " · TL $timelineState · $timelineSpeed" else ""
|
|
|
|
|
val playback = if (timeWindowMode) " · ${if (productionFeedMode) "PRODUCTION" else "FIXTURE"} · TL $timelineState · $timelineSpeed" else ""
|
|
|
|
|
return "$mask · $runtime · $fields$playback · MIX ${(timeMix * 100).toInt()}% · $particleCount · W ${"%.1f".format(lineWidth)} L ${"%.3f".format(particleLength)} O ${(particleOpacity * 100).toInt()} T ${(trailOpacity * 100).toInt()} F ${(trailFade * 100).toInt()} C ${if (speedColorEnabled) "ON" else "OFF"}"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -402,30 +407,33 @@ class ParticleCoreLayerValidationActivity : AppCompatActivity() {
|
|
|
|
|
} else {
|
|
|
|
|
""
|
|
|
|
|
}
|
|
|
|
|
val source = if (productionFeedMode) {
|
|
|
|
|
"""{"type":"raster-array","production-fields":[
|
|
|
|
|
{"metadata":"asset://integration/particle-production/field-00.json","field":"asset://integration/particle-fixtures/uniform-east/field.f32"},
|
|
|
|
|
{"metadata":"asset://integration/particle-production/field-01.json","field":"asset://integration/particle-fixtures/uniform-north/field.f32"},
|
|
|
|
|
{"metadata":"asset://integration/particle-production/field-02.json","field":"asset://integration/particle-fixtures/vortex/field.f32"},
|
|
|
|
|
{"metadata":"asset://integration/particle-production/field-03.json","field":"asset://integration/particle-fixtures/uniform-east/field.f32"}
|
|
|
|
|
]}"""
|
|
|
|
|
} else {
|
|
|
|
|
"""{"type":"raster-array","fixture":"$fixtureId",
|
|
|
|
|
"metadata":"asset://integration/particle-fixtures/$fixtureId/metadata.json",
|
|
|
|
|
"field":"asset://integration/particle-fixtures/$fixtureId/field.f32",
|
|
|
|
|
"next-fixture":"$nextFixtureId",
|
|
|
|
|
"next-metadata":"asset://integration/particle-fixtures/$nextFixtureId/metadata.json",
|
|
|
|
|
"next-field":"asset://integration/particle-fixtures/$nextFixtureId/field.f32",
|
|
|
|
|
"runtime-fields":[
|
|
|
|
|
{"fixture":"vortex","metadata":"asset://integration/particle-fixtures/vortex/metadata.json","field":"asset://integration/particle-fixtures/vortex/field.f32"},
|
|
|
|
|
{"fixture":"nodata","metadata":"asset://integration/particle-fixtures/nodata/metadata.json","field":"asset://integration/particle-fixtures/nodata/field.f32"},
|
|
|
|
|
{"fixture":"uniform-east","metadata":"asset://integration/particle-fixtures/uniform-east/metadata.json","field":"asset://integration/particle-fixtures/uniform-east/field.f32"},
|
|
|
|
|
{"fixture":"uniform-north","metadata":"asset://integration/particle-fixtures/uniform-north/metadata.json","field":"asset://integration/particle-fixtures/uniform-north/field.f32"}
|
|
|
|
|
]}"""
|
|
|
|
|
}
|
|
|
|
|
return """
|
|
|
|
|
{
|
|
|
|
|
"version": 8,
|
|
|
|
|
"name": "Particle Core Layer Validation",
|
|
|
|
|
"sources": {
|
|
|
|
|
"particle-fixture": {
|
|
|
|
|
"type": "raster-array",
|
|
|
|
|
"fixture": "$fixtureId",
|
|
|
|
|
"metadata": "asset://integration/particle-fixtures/$fixtureId/metadata.json",
|
|
|
|
|
"field": "asset://integration/particle-fixtures/$fixtureId/field.f32",
|
|
|
|
|
"next-fixture": "$nextFixtureId",
|
|
|
|
|
"next-metadata": "asset://integration/particle-fixtures/$nextFixtureId/metadata.json",
|
|
|
|
|
"next-field": "asset://integration/particle-fixtures/$nextFixtureId/field.f32",
|
|
|
|
|
"runtime-fields": [
|
|
|
|
|
{"fixture":"vortex","metadata":"asset://integration/particle-fixtures/vortex/metadata.json",
|
|
|
|
|
"field":"asset://integration/particle-fixtures/vortex/field.f32"},
|
|
|
|
|
{"fixture":"nodata","metadata":"asset://integration/particle-fixtures/nodata/metadata.json",
|
|
|
|
|
"field":"asset://integration/particle-fixtures/nodata/field.f32"},
|
|
|
|
|
{"fixture":"uniform-east","metadata":"asset://integration/particle-fixtures/uniform-east/metadata.json",
|
|
|
|
|
"field":"asset://integration/particle-fixtures/uniform-east/field.f32"},
|
|
|
|
|
{"fixture":"uniform-north","metadata":"asset://integration/particle-fixtures/uniform-north/metadata.json",
|
|
|
|
|
"field":"asset://integration/particle-fixtures/uniform-north/field.f32"}
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
"particle-fixture": $source,
|
|
|
|
|
"validation-point": {
|
|
|
|
|
"type": "geojson",
|
|
|
|
|
"data": {"type":"Feature","geometry":{"type":"Point","coordinates":[0,0]}}
|
|
|
|
|
|