feat: add direction particle advection
Some checks failed
validate-scripts / validate-scripts (push) Has been cancelled

This commit is contained in:
OpenAI Codex
2026-09-11 08:27:28 +08:00
parent 89c72554c5
commit f3c33c6727
17 changed files with 560 additions and 57 deletions

View File

@@ -178,6 +178,18 @@ TEST(Layer, RasterParticleVisualProperties) {
EXPECT_EQ(layer.getParticleColor(), particleColor);
}
TEST(Layer, RasterParticleDirectionAdvectionScale) {
RasterParticleLayer layer{"particle", "raster-array"};
EXPECT_FLOAT_EQ(1.0f, layer.getAdvectionScale());
layer.setAdvectionScale(2.5f);
EXPECT_FLOAT_EQ(2.5f, layer.getAdvectionScale());
layer.setAdvectionScale(0.0f);
layer.setAdvectionScale(-1.0f);
layer.setAdvectionScale(std::numeric_limits<float>::infinity());
EXPECT_FLOAT_EQ(2.5f, layer.getAdvectionScale());
}
TEST(Layer, WeatherColorUsesIndependentFixedOpacity) {
WeatherColorLayer layer{"weather-color", "raster-array"};
ASSERT_STREQ("weather-color", layer.getTypeInfo()->type);