Skip to main content

Common paint transitions

Target declarations, actual-time display and conditional 2D playback composition

This batch has local implementation and matching development-SDK acceptance. The capability is commonPaintTransitions. Use it only with matching core and host implementations that expose it. Windows, macOS, mobile devices and formal publication still require independent acceptance.

A style's root transition defaults to duration: 300, delay: 0, in milliseconds. A property-specific object such as circle-radius-transition overrides root fields independently: a duration-only object inherits root delay, and vice versa. Each value must be finite, nonnegative and at most 3,600,000; their sum may reach 7,200,000. Changed controls affect subsequent retargets; existing curves retain their original start/end times. A new layer or a property without a prior value displays its target immediately; duration: 0 applies immediately.

map.setPaintProperty('marker', 'circle-radius-transition', {duration: 1500, delay: 200});
map.setPaintProperty('marker', 'circle-radius', 30);

getPaintProperty and getStyle return the new target declaration. Rendering and rendered-feature queries use the same displayed value at the current sample time; intermediate values never replace the style declaration. Timing uses piecewise cubic ease-in-out. Non-premultiplied sRGB red, green, blue and alpha components interpolate independently before entering the existing rendering color contract.

Changing a target midway continues from the actual display. The prior curve continues on its original clock rather than snapping back to its declaration. Compatible style diffs and no-op updates preserve layer/source identity, caches, requests and applicable timelines. Removing a layer or replacing an incompatible definition terminates its timelines.

Only feature-independent and feature-state-independent numeric, color and two-dimensional vector targets create common transitions. Feature-dependent and feature-state-dependent targets retain immediate evaluation; no per-feature transition history is stored. Uniform zoom/global-state and lexical expressions still evaluate in the current environment.

TypeSupported transition properties
backgroundcolor, opacity
fillcolor, outline-color, opacity
linecolor, opacity, width, offset, gap-width, blur, translate
circlecolor, stroke-color, radius, stroke-width, blur, opacity, stroke-opacity, translate
symbolicon/text color and opacity
rasteropacity, brightness-min/max, saturation, contrast, hue-rotate
heatmapradius, intensity, opacity
hillshadeexaggeration, shadow/highlight/accent-color
color-reliefopacity
fill-extrusioncolor, opacity, height, base

The table omits type prefixes: circle radius means circle-radius; symbol colors are icon-color and text-color. Every property retains its existing view and data restrictions. This table does not enable unsupported globe, terrain or complex 3D combinations.

Root defaults start transitions only for this supported intersection; other previously legal properties remain immediate. heatmap-weight, hillshade lighting angles, raster-fade-duration, gradients and color ramps are outside this batch. Dash/pattern and image changes have no crossfade; explicitly enabling their unsupported nonzero property transitions rejects. Layout, enum and nonzero Light transitions are also outside the batch. Existing raster-arrival fades and camera animations retain their original clocks.

Drawing samples the host's monotonic clock. Active paint sets lifecycle animating and prevents loaded(); it does not make a stationary camera report isMoving(). Lifecycle reads observe state without advancing samples. The final frame must actually draw before idle.

A zero-pitch/roll Mercator view can compose media with existing line playback in real layer order. Playback retains its original layer, scene owner and clock. Paint writes, including transition control parameters, to the same playing or paused layer retaining its visual return CONFLICT. Stop playback to detach the visual before writing. Starting playback on a layer with an existing paint curve also returns CONFLICT; other layers may transition independently. Unsupported topology, offset/gap/blur/pattern/gradient animation combinations remain restricted.

Common transitions may affect at most 128 layers and 2048 timelines. Interrupted history has maximum depth 32 and 1024 JSON nodes. Each expression leaf permits 8192 evaluation steps; the full table's static bound and actual accumulated work each permit at most 2 million steps, including repeated lexical-variable evaluation.

Current and candidate history together are limited to 16MiB. History cost recursively includes JSON payloads, strings/keys, history and entry structures, and map overhead. Each entry additionally includes its own structure, 128 conservative bytes and twice its identity/property/type string sizes. Admission requires 2 × summed entry cost ≤ 16MiB: each accepted table is at most 8MiB, so an old table plus any candidate is at most 16MiB. Shared histories are conservatively double-counted, never truncated. Target/display declarations and cached paint remain included in the original four-copy layer-description estimate and 128MiB cache budget.

Existing geometry, atlas, collision,64 visible tiles/32 pending requests, joint line/pattern/gradient/playback limits of32 layers/4096 paths/100,000 generated vertices/256MiB, and symbol limits of65536 quads/64MiB/1024CSS footprint/16384 glyph history remain in force. Actual public acceptance and matching development-delivery records follow below.

Resources, source data, state, global state, styles, camera, viewport, images and glyph changes require complete candidate checks. A rejected submission preserves declarations, existing timelines, queues and the frame. If an accepted transition fails during a future sample, its accepted target declaration remains; display and caches retain the last successful frame, that property stops clock retries, and lifecycle failed becomes true. Neither intermediate values nor old declarations are written back. A valid new paint declaration or full style replacement can clear the failure flag; the failed property needs an actual new target to redirect, while parameter-only changes and same-value no-ops do not revive it. Later frames cannot silently exceed limits.

The complete HTML includes CSS, initialization and real animate/redirect/reset button handlers; it ships in the matching development SDK. Public fixtures exercise representative scalar, color, vector, diff, state, failure and media/playback cases. Comprehensive core checks cover the property table; representative pictures do not constitute all-property cross-platform acceptance.

The existing circle contract retains Native SRGB versus browser linear-UNORM raw RGB differences. Cross-host acceptance normalizes RGB for comparison and retains original screenshot/frame SHA and alpha; it does not claim identical raw frames or change existing shaders.

Core ae8c2773eac948eebd4aa42a5510ca65070d9687, developmentSDK 0.3.0-dev.ae8c2773. One comprehensive42-property CPU case and the final realGPU case passed (0.55seconds, Vulkan/llvmpipe software adapter, REQUIRE_GPU). The same69-check/14-phase script passed Native, main-thread and Worker with real clocks at DPR1/2, totaling1126 actual frames. Separate completeHTML acceptance clicked three real buttons, observed six actual trajectories and clicked original featureID71 (71frames). Representative public pictures do not constitute an all42-property cross-host GPU matrix.

Archive SqsMap-SDK-0.3.0-dev.ae8c2773-resumed.tar.gz contains609 inventory files plusbundle.json, 37668946bytes, SHA256 63db5bd9bc4e73cd153a4718af041188d285097fe1244d52992b42ca9240d3b9. Every file's length/SHA was independently checked by reopening the archive, including current script/fullHTML/original media and all historical resources. Native/core/applicationWASM and AndroidAPI24 ARM64/JNI match the core. Contract signatures are unchanged, so exact existing scriptWASM is reused. Production-site HTTP and four-repository Git delivery are finalized before submission; devices and formal publication remain pending.