Files
MapLibreParticleLab/integration/react-native/MapLibreParticleRNTestHost/src/weatherStyle.ts
tei f47469d2ab
Some checks failed
validate-scripts / validate-scripts (push) Has been cancelled
test: integrate particle.10 online QBIN host
2026-09-21 20:21:16 +09:00

57 lines
1.5 KiB
TypeScript

/** Fixed visual baseline: WeatherColor -> Particle -> local darkmap PNG. */
export const DARKMAP_SOURCE_ID = "navsea_darkmap_png";
export const DARKMAP_TILE_URL =
"http://192.168.200.133:8000/windy_tiles_japan/{z}/{x}/{y}.png";
export const WEATHER_SOURCE_ID = "rn-weather-fields";
export const WEATHER_COLOR_LAYER_ID = "rn-weather-color";
export const PARTICLE_LAYER_ID = "rn-weather-particles";
export const weatherTestStyle = JSON.stringify({
version: 8,
sources: {
[DARKMAP_SOURCE_ID]: {
type: "raster",
tiles: [DARKMAP_TILE_URL],
minzoom: 4,
maxzoom: 9,
tileSize: 256
},
[WEATHER_SOURCE_ID]: {
type: "raster-array",
"host-field-submission": true
}
}, layers: [
{
id: WEATHER_COLOR_LAYER_ID,
type: "weather-color",
source: WEATHER_SOURCE_ID,
paint: {
"weather-color-opacity": 1.0
}
},
{
id: PARTICLE_LAYER_ID,
type: "raster-particle",
source: WEATHER_SOURCE_ID,
paint: {
"raster-particle-active": true,
"raster-particle-particle-count": 4096,
"raster-particle-line-width": 1.8,
"raster-particle-particle-length": 0.028,
"raster-particle-particle-opacity": 0.85,
"raster-particle-trail-opacity": 0.72,
"raster-particle-trail-fade": 0.975
}
}, {
id: "darkmap-basemap",
type: "raster",
source: DARKMAP_SOURCE_ID,
paint: {
"raster-opacity": 1,
"raster-fade-duration": 0
}
}
]
});