Skip to content

Release v0.8.9

The new release includes support for flipping the input video stream from a camera. This feature is designed to accommodate various camera configurations, such as back or selfie positions, portrait orientation, or mirroring on immersive displays. When combined with transposition, flipping along X or Y axes allows for any necessary transformation of the input stream into the desired state.

Video flipping is handled within the capturing module early in the processing pipeline. It can be requested during engine initialization by providing the flip field within the VideoParams interface to the setup() method.

Since the SDK now provides a mechanism to flip the input video stream directly, the mirroring functionality in renderers and render plugins is now obsolete and has been removed. This change also helps prevent unintended double-mirroring. Mirror option is removed from base CanvasRenderer and underlying ResponsiveCanvas and inherently from all its derivatives:

And their specializations like:

Mirroring is now not needed in several plugins and was removed as well:

Examples distributed with the SDK are updated to demonstrate these changes. The simplest way to flip the feed for the selfie camera, for instance, is as follows:

let rear = urlParams.has("rear");
await engine.setup({
rear, flip: { x: !rear, y: false },
size: { width: 1920, height: 1080 } });
cameraSwitch.onclick = async () => {
cameraSwitch.disabled = true;
rear = !rear;
await engine.setup({
rear, flip: { x: !rear, y: false },
size: { width: 1920, height: 1080 } });
await engine.start();
cameraSwitch.disabled = false;
}

Pose fitting plugins (including their twin counterparts) now only align well-visible bones. A bone is aligned with pose keypoints only when both ends meet the required reliability and visibility thresholds. If these thresholds are not met, the bone will remain in its rest pose. Updated plugins are:

This feature is enabled by default, one can use constructor parameter to disable it: fitVisible.

Pose fitting plugins return skeleton to the rest pose in setNode() before parsing the armature and caching references. We’ve found this is necessary to preserve accuracy when the same node is assigned to a plugin several times in certain usage patterns.

To maintain accuracy when a node is repeatedly assigned to a plugin, pose fitting plugins return the skeleton to its rest pose before parsing the armature and caching its metrics in setNode(). We’ve found this might be helpful in specific usage patterns.

Babylon.js renderers now execute engine.endFrame() upon scene rendering completion. This action is necessary because certain Babylon.js effects rely on the global frame counter being incremented, which is an undocumented side effect of endFrame(). Since calling this method was not strictly required within the standard render loop for general use, it had not been included previously.

Even when the pipeline is only partially initialized, the Engine’s init() method will return false. When this occurs, the Engine will also emit an init event with a false boolean argument. You can subscribe to this event using an event handler with a (boolean) => void signature.