feat: add runtime particle timeline playback
Some checks failed
validate-scripts / validate-scripts (push) Has been cancelled

This commit is contained in:
OpenAI Codex
2026-09-03 21:23:29 +08:00
parent 73bf01ebc0
commit 49b2e8aebd
17 changed files with 491 additions and 140 deletions

View File

@@ -301,6 +301,11 @@ public final class MapLibreMap {
return nativeMapView.repeatRasterArraySourceFieldWindow(sourceId);
}
/** Sends a low-frequency playback command to the Core-owned raster-array timeline. */
public boolean controlRasterArraySourceTimeline(String sourceId, int command, float value) {
return nativeMapView.controlRasterArraySourceTimeline(sourceId, command, value);
}
// Style
/**

View File

@@ -145,6 +145,8 @@ interface NativeMap {
boolean repeatRasterArraySourceFieldWindow(String sourceId);
boolean controlRasterArraySourceTimeline(String sourceId, int command, float value);
boolean removeLayer(@NonNull String layerId);
boolean removeLayer(@NonNull Layer layer);

View File

@@ -968,6 +968,12 @@ final class NativeMapView implements NativeMap {
&& nativeRepeatRasterArraySourceFieldWindow(sourceId);
}
@Override
public boolean controlRasterArraySourceTimeline(String sourceId, int command, float value) {
return !checkState("controlRasterArraySourceTimeline")
&& nativeControlRasterArraySourceTimeline(sourceId, command, value);
}
@Override
public void addLayer(@NonNull Layer layer) {
if (checkState("addLayer")) {
@@ -1708,6 +1714,9 @@ final class NativeMapView implements NativeMap {
@Keep
private native boolean nativeRepeatRasterArraySourceFieldWindow(String sourceId);
@Keep
private native boolean nativeControlRasterArraySourceTimeline(String sourceId, int command, float value);
@Keep
private native void nativeAddLayer(long layerPtr, String before) throws CannotAddLayerException;