Skip to content
SiteEmail

Release Notes 3.2.1

Persistent Layer Caching lets Prysm render a DOM subtree to an isolated GPU surface and reuse that cached image when only its transform changes. This avoids rerasterizing the subtree on transform-only updates. Changes to the subtree's content or layout invalidate the cache, and each active layer uses GPU memory.

The CohLayer sample at Samples/uiresources/CohLayer/index.html demonstrates animated nameplates and a minimap, with a control to toggle caching. For setup details and limitations, see the Persistent Layer Caching guide.

Added support for color-mix() CSS function for sRGB color space

Section titled “Added support for color-mix() CSS function for sRGB color space”

Prysm now supports the CSS color-mix() function for the srgb color space. You can use it to blend two CSS colors directly in stylesheets, including values provided through custom properties. This is useful for theme variants, hover states, and other UI styling workflows where you want to derive colors in CSS instead of preprocessing them.

For example:

.button {
--base: #2474d6;
--mix: white;
--weight: 20%;
background-color: color-mix(in srgb, var(--base) var(--weight), var(--mix));
}

For now, the feature covers color-mix(in srgb, ...) only. Other color spaces, color-space conversions, and polar hue interpolation modes are not included in this release. For syntax details, see the MDN color-mix() reference.

Support for CSS math functions: round(), min(), max(), and clamp()

Section titled “Support for CSS math functions: round(), min(), max(), and clamp()”

Prysm now supports CSS math functions: clamp(), round(), min(), and max(). You can use them to build fluid, resolution-adaptive game HUDs, clamp dynamic game state values, create segmented meters, and snap coordinates to pixel grids directly in your stylesheets—with zero JavaScript overhead.

All math functions evaluate natively within Prysm's C++ styling engine during layout passes. They can be combined with calc(), nested within one another, and used with CSS variables exposed through Prysm Data-Binding.

For detailed usage, game UI examples, and limitations, see the CSS math functions guide.

Support for the scrollTo API with smooth scrolling

Section titled “Support for the scrollTo API with smooth scrolling”

You can now scroll elements from JavaScript with the scrollTo, scrollBy, and scroll methods and the ScrollToOptions dictionary. The behavior option lets you request a smooth scroll, for example element.scrollTo({ top: 500, behavior: 'smooth' }).

You can also set the scroll-behavior: smooth CSS property on a scroll container to make scrolling smooth by default.

Smooth scrolling fires scroll events on every frame in which the position changes. The new scrollend event fires once when scrolling finishes.

#list {
overflow-y: scroll;
scroll-behavior: smooth;
}
const list = document.getElementById('list');
list.addEventListener('scrollend', () => console.log('done', list.scrollTop));
list.scrollTo({ top: 800, behavior: 'smooth' });

The scroll-behavior property is not inherited, and scrollIntoView is not supported. For more information, see the smooth scrolling and scroll events documentation.

Support for fallback values in CSS variables

Section titled “Support for fallback values in CSS variables”

Prysm now supports fallback values for CSS variables. For more information on what fallback values are and how to use them, please refer to the MDN page for var.

Example:

selector {
background-color: var(--undefined-name, red);
}

The example above will resolve to background-color: red;

Prysm logs can now include origin metadata that identifies where a message came from. When enabled, log handlers receive view ids, frame ids, task family ids, and task names through cohtml::Logging::LogInfo::Origin.

This feature builds directly on top of the logging categories and filtering changes introduced in 3.0.0. If your integration already uses the structured LogInfo-based logging API, no handler signature changes are required. You only need to enable the origin fields you want through LibraryParams::LoggingFilters.EnabledContextFields.

For example:

cohtml::LibraryParams params;
params.LoggingFilters = cohtml::Logging::LoggingSettings(
cohtml::Logging::TargetUser::All,
cohtml::Logging::MessageType::All,
cohtml::Logging::Severity::Info,
cohtml::Logging::LogContextFields::All);

This is an example log with the feature enabled:

[ViewID: 0 FamilyID: 2 TaskName: NotifyXHRProgress] xhr completed 404

This makes warnings and errors much easier to trace in multi-view and asynchronous integrations, especially for CSS parsing, resource loading, and script-related diagnostics. The extra metadata is optional, so integrations that do not need it can keep the default disabled behavior.

For the full setup, the available fields, and examples for both custom and default log handlers, see the log origin context documentation.

ScriptCompiler API split for scripts and modules

Section titled “ScriptCompiler API split for scripts and modules”

CoHTML now includes explicit APIs for precompiling classic scripts and ES6 modules. The new CompileScript and CompileModule APIs provide several key benefits:

  • Imports in preloaded ES6 modules: CompileModule accepts a module URL parameter. This URL is crucial for V8 to resolve imports within precompiled modules, which previously failed or imported from incorrect origins.
  • Clearer API intent: Developers are guided to use the correct compilation path based on resource type.

View::Paint execution inside Unreal Engine's Render Dependency Graph

Section titled “View::Paint execution inside Unreal Engine's Render Dependency Graph”

To take greater advantage of Unreal Engine's rendering parallelism, as well as allow greater flexibility in the render passes and optimal blending with the scene backbuffer for features such as the Backdrop Filter, Prysm's rendering has been integrated directly into Unreal's frame through the Render Dependency Graph. Read more about this in the Unreal Engine documentation.

Migrate ScriptCompiler calls to explicit script/module APIs

Section titled “Migrate ScriptCompiler calls to explicit script/module APIs”

The ScriptCompiler public API has been split into explicit classic script and module compilation methods to enable URL-origin mapping for ES6 module imports.

The legacy Compile method with a ScriptType parameter is deprecated. It is replaced by explicit methods CompileScript and CompileModule. Precompiled ES6 modules compiled using Compile will lack origin URL alignment and will fail to resolve relative imports (e.g., import { x } from './utils.js'). Transitioning to CompileModule and specifying the URL solves this behavior.

To ensure correct ES6 module importing, migrate your calling code as soon as possible.

Replace calls to ScriptCompiler::Compile with the explicit methods based on the script type.

// Precompiling a classic script
cohtml::DataBuffer* compiledScript = scriptCompiler->Compile(utf8Source, cohtml::ScriptType::ST_Classic);
cohtml::DataBuffer* compiledScript = scriptCompiler->CompileScript(utf8Source);
// Precompiling an ES6 module
cohtml::DataBuffer* compiledModule = scriptCompiler->Compile(utf8Source, cohtml::ScriptType::ST_Module);
cohtml::DataBuffer* compiledModule = scriptCompiler->CompileModule(utf8Source, "coui://uiresources/js/main.js");

For a comprehensive guide on integrating the precompiled scripts and modules into the resource handling pipeline, please refer to the Preloaded Resources documentation.


Feature

Introduced persistent layers through the coh-layer property, providing explicit control over repaint behavior.

Feature

Added support for the CSS contain property to improve layout performance by containing layout changes and preventing localized updates from triggering full-page reflows

Feature

Added support for smooth scrolling. Implemented the scrollTo API for elements and scroll-behavior CSS property.

Feature

Added support for the CSS 'filter' property on SVG elements.

Feature

Added support for the color-mix() CSS function in the sRGB color space.

Feature

Added support for fallback values in CSS variables.

Feature

Added support for the CSS math functions round(), min(), max(), and clamp().

Feature Unity

Added support for Unity 6.6.

Feature Unreal Engine

Integrated View painting into the Unreal Engine Render Dependency Graph.

Enhancement

Implemented 'fast-track'' style resolution for commonly used properties such as transform

Enhancement

Improved style resolution performance for CSS variables and newly attached elements.

Enhancement

Reduced memory usage when using clip-paths.

Enhancement

Reduced memory allocations when loading user interfaces that use data-binding.

Enhancement

Introduced log origin context to improve diagnostics for log messages.

Enhancement

Added support for parsing HSL(A) CSS color values.

Enhancement

Added support for optional arguments in setInterval and setTimeout.

Enhancement

Added support for the :host pseudo-class within complex selectors.

Enhancement

Added support for animations and transitions between border-width keyword values and pixel lengths.

Enhancement

Updated the 'Unsupported CSS property detected'' log to include the exact source location in Debug and Development builds or when EnableCSSParserErrorLocations is enabled.'

Enhancement

Introduced ScriptCompiler::CompileScript and ScriptCompiler::CompileModule, which require the URL of the preloaded module. Read more about the ScriptCompiler API split.

Enhancement

Improved rendering debug markers to provide better context.

Enhancement

Added documentation for the simple filters feature.

Enhancement Unity

Reduced memory allocations and eliminated garbage collection spikes during data-binding in Unity.

Enhancement Unity

Fixed mixed line-ending warnings in Unity integration files.

Enhancement Unreal Engine

Added support for Launch DevTools on macOS and Linux.

Enhancement Unreal Engine

Improved FTransform binding performance by using the CoherentToTransformMatrix2D converter.

Enhancement Unreal Engine

Added CoherentToColor converters for FColor and FLinearColor.

Fix

Fixed em units in calc() expressions incorrectly resolving against the parent's computed font size instead of the element's own font size for properties other than font-size.

Fix

Fixed occasional layout issues with slotted elements.

Fix

Fixed rendering artifacts affecting the borders of certain elements.

Fix

Fixed an issue where some text was rendered using SDF glyphs instead of raster glyphs.

Fix

Fixed an issue in the rendering library that caused some sampler objects to be destroyed multiple times.

Fix

Fixed rendering artifacts and assertion failures when slotted elements use filters.

Fix

Ensured GPU operations complete before releasing DirectX 12 resources during teardown.

Fix

Disabled GPU debug markers by default.

Fix

Fixed CSS custom properties not taking effect in external SVGs.

Fix

Fixed views not being redrawn when the global backdrop filter mask is updated.

Fix

Improved the user experience when configuring the global backdrop filter mask.

Fix

Fixed a memory leak when an element with backdrop-filter also has a clip-path or mask-image that completely clips out the element.

Fix

Fixed the caretFromPoint API result when the HTML node has been removed.

Fix

Fixed transitions with inherited target values jumping directly to their final state. Transitions now progress as expected.

Fix

Fixed missing redraws when the root font size changes and rem units are used in non-layout properties.

Fix

Fixed cases where slotted elements were not correctly restyled.

Fix

Fixed gradients failing to render after previously having zero size.

Fix

Fixed incorrect caret positioning after changing a text input field's type.

Fix

Fixed incorrect clipping when using clip-path with content-box, padding-box, border-box, or margin-box on elements with border-radius.

Fix

Fixed incorrect transitions on newly displayed elements when their parent has transitions for the same properties.

Fix

Fixed rendering artifacts affecting elements with rounded corners and transparent borders or backgrounds.

Fix

Fixed the ::slotted() pseudo-element failing to match when its argument contains attribute selectors.

Fix

Fixed some non-layout styles failing to update when the font size changes and em units are used.

Fix

Fixed cases where elements were not restyled when CSS custom properties used rem units.

Fix

Fixed stale styles when using rem units in calc() expressions.

Fix

Fixed SVG clip-path and mask not working together when applied to the same element.

Fix

Fixed an issue in the rendering library that caused rendering data processing metadata to be collected even when not requested.

Fix

Fixed handling of null parents when matching descendant elements.

Fix

Fixed assertion failures when rendering filtered elements after they are reattached to the DOM or reparented.

Fix

Fixed dirty rectangle rendering when no user-provided render target is available.

Fix

Fixed the incorrect user-agent border-width style for <textarea>, <input>, and <button> elements. The default value is now '2px''

Fix

Fixed preloading of ES6 modules containing imports.

Fix

Fixed type confusion when using engine.pinUnsafeReference and accessing custom element constructors that caused V8 crashes.

Fix

Fixed crashes caused by pending media and link events firing after their corresponding elements were removed.

Fix

Fixed assertion failures caused by incorrect rendering of Canvas path objects.

Fix

Fixed Android samples broken by logging changes.

Fix

Added missing Android documentation for PlatformSpecificParams::JavaVM.

Fix

Fixed generated TypeScript definitions for the cohtml DOM.

Fix

Fixed a crash when navigating through page history using the Player GUI.

Fix Unity

Fixed an exception when destroying a UISystem component before its Start method has executed.

Fix Unity

Prevented CohtmlView from advancing or drawing when no cameras are enabled or the game or editor window is unfocused.

Fix Unreal Engine

Added memory statistics for depth stencil textures.

Fix Unreal Engine

Fixed assertion failures in the default ViewListener when using the concurrent advance feature.