AudioGraphModule
JaveScript API, which enables the creation and manipulation of sound effects graphs.NativeUIModule.picker
and NativeUIModule.slider
properties are now read-only and cannot be assigned if the Native UI Control Picker and Native UI Control Slider capabilities are enabled..globalTransform API
to properly update signals when scene objects are reparented.SceneObjectBase.parentWorldTransform
API and replaced with separate APIs for getParent()
and worldTransform
.AnimationClipSignal
can now be applied to to an AnimationPlaybackController
.Scene.create()
now follows the correct naming convention for SVG images (SvgImage)
. Persistence.userScope
and the StorageScope
class have been removed from the Persistance API. To update old projects, use Persistance.local
. std::getTime()
uniform API in SparkSL will now properly report the time from the start of the effect, instead of creation time of the material.PersonSegmentationModule
has been deprecated. All APIs have been moved to SegmentationModule
.PersistenceModule.local
and StorageLocation
APIs to replace PersistenceModule.userScope
and StorageScope
. Introduces new APIs allowing use of persistence in Blocks.subscribeWithSnapshot
now supports BoolSignal
, Box2DSignal
, Box3DSignal
, QuaternionSignal
, ScalarSignal
, StringSignal
, TransformSignal
, PointSignal
, VectorSignal
, Vec2Signal
, and Vec4Signal
. SceneObjectBase.addChild
. Previously, using SceneObject.addChild
to reparent a BlockSceneRoot
that was already in the scene would reset the Block and reset all its inputs to default values.
Materials.clone()
will no longer be missing properties. WorldTracking
API. HapticFeedback
API. Please note that haptic feedback is not played back in Meta Spark Player on some versions of iOS when the effect contains both haptic feedback and audio capabilities. findByTag
, findByAllTags
, findByAnyTags
for SceneObjectBase and SceneRoot; getTags
, setTags
, addTag
, removeTag
for SceneObjectBase.LayersModule
class provides access to layers. It allows dynamic creation and destruction of layers, modifying layer properties such as render order, as well as changing what layer a scene object is in.std::getFrontFacing
function in SparkSL is no longer returning the wrong value on Metal backend.SceneObjectBase
and BlockSceneRoot
.SceneObjectbase.boundingBox
or the Bounding Box patch with a 3D model in the tree that has non-identity transform.viewMatrix
property to the CameraInfoModule
API. This exposes a TransformSignal
describing the transform that needs to be applied to transform a given object from world-space to view-space.Scene
property worldTransform
is now available in blocks. Get a TransformSignal
that represents the position, orientation and scale of a block's scene.Scene.destroy()
. After destruction, any values given to block inputs are ignored, and block outputs revert to their default values.Scene.destroy
, the Promise
returned from the relevant BlockInstanceInputs.set...
method is now failed (instead of succeeding).emissiveColorFactor
property from the DefaultMaterial
class.normalTextureScale
property to the DefaultMaterial
class, which represents the scale factor applied to each of the texture's normal vectors.alphaTestEnabled
property to the MaterialBase
class, which represents whether alpha testing is enabled for the material. The property is available for all classes that inherit from MaterialBase
.getParent()
method to the SceneObjectBase
class, which allows you to retrieve a scene object's parent object. The method is available for all classes that inherit from SceneObjectBase
.normalTextureScale
property to the MetallicRoughnessPBRMaterial
class, which represents the scale factor applied to each of the texture's normal vectors.depthTestEnabled
and depthWriteEnabled
properties to the MaterialBase
class, which represent whether depth testing and depth writing are enabled for the material, respectively. The properties are available for all classes that inherit from MaterialBase
.emissiveColorFactor
property to the MetallicRoughnessPBRMaterial
class, which represents the texture's emissive color factor. reflectiveTextureTransform
property to the DefaultMaterial class which represents the transform coordinates of the material's reflective texture.transform()
method to the ReactiveModule
API, which creates a new TransformSignal
using the translation
, scale
and rotation
values specified.rotate()
method to the VectorSignal
class, which returns a new vector calculated by rotating the original vector using the specified QuaternionSignal
.mode()
method provided by the PlaneTracker
class and the TrackingMode
enum provided by SceneModule
have been deprecated.contains()
method to the StringSignal
class. This searches the StringSignal
to check if it contains a given string and returns the result as a BoolSignal
.setTexture()
method exposed by the MaterialBase
class has been deprecated and replaced by setTextureSlot()
.Scene.root
by calling the addChild()
or removeChild()
methods, respectively. For example: Scene.root.addChild()
ComposedMaterial.setParameter()
method now accepts arguments of type Transform
and WorldTransform
.ReactiveModule
API. Unlike their primitive signal equivalents, the values of BoolSignalSource
, ScalarSignalSource
and StringSignalSource
objects can be rewritten via the set()
method provided.BoundingBox API
.isActiveInCall
and isActiveInSameEffect
properties exposed by the Participant
class.BlockSceneRoot
class: the boundingBox
property and getBoundingBox()
method return the bounding box of the Block relative to its parent or local coordinate system, respectively. The boundingBoxVisible
property and getBoundingBox()
method return the visibility of the Block's bounding box. Equivalent APIs were also added to the SceneObjectBase
class.Participants
API or participant patches to retrieve details about participants in a video calling effect.Multipeer
API to send messages to, and receive messages from, other participants in a video calling effect.getBlendShapes()
method to the FaceMesh
class, which returns an array of blend shapes for a given face mesh.global
and globalThis
in JavaScript and TypeScript files is no longer allowed. These two keywords will have a value of undefined in all scripting contexts.Bounds2D
class has been unified with the new Box2DSignal
class.std::getFragmentCoord()
returns window-relative coordinates for a fragment, and std::getFrontFacing()
returns whether a fragment belongs to a front-facing primitive.GalleryTextureMediaVideo
API, which seeks video playback to the specified position.getDeltaTime()
method to the SparkSL Uniforms module, which returns the elapsed time since the previous frame was rendered, in seconds.Scene.create()
without any object properties specified, it will be instantiated with the same default values as a particle system created from within Spark AR Studio. Additionally, the default Z axis spray angle value for a particle system has been changed from 10° to 0°.getPulse()
method exposed by the BlockInstanceOutputs
class now correctly returns an EventSource
object.export
qualifier can be used as shader code patches in the Patch Editor.const blockAsset = await BlocksModule.assets.findFirst('MyBlockAsset');These methods return a promise containing an object of type BlockAsset. Additionally, the
Instantiate()
method exposed by the BlocksModule
class can now be called with a BlockAsset
object as the argument.TouchGestures.onTap().subscribeWithSnapshot({ // Store the mouth openness signal in the snapshot as 'val' 'val' : FaceTracking.face(0).mouth.openness // Set a callback function for the 'onTap()' event source, with the snapshot passed } , function (event, snapshot) { // 'snapshot.val' contains the signal's last value at the time the callback function // was called Diagnostics.log(snapshot.val); });
getFieldOfView
to get the current FOV, preferredFieldOfView
to set a preferred FOV and overrideFieldOfView
to set an FOV override.this
keyword is set to undefined
in callback functions executed from the Spark AR API and now matches its behavior in user-defined JavaScript. Previously this
was set to the global object in callback functions, which was inconsistent with Spark AR's execution of JavaScript in strict mode.The pinLastValue() method, which returns the last value a signal contained before the method was called, is now supported on the following signal types:
TransformSignal
QuaternionSignal
VectorSignal
Point2DSignal
PointSignal
Point4DSignal
RgbaSignal
HsvaSignal
MetallicRoughnessPbrMaterial
and EnvironmentLightSource
classes.AnimationModule
API documentation.PlanarStack
class to the SceneModule
API. This class provides the ability to use a stack layout for 2D elements, which organizes child objects in a one-dimensional stack, either horizontally or vertically.OutputVisibility.forOverlayOutput
has been deprecated and will be removed in a future release.outputVisibility: OutputVisibility
read-only property to the Scene class, which provides the ability to control output visibility for the overall scene via Scene.root.outputVisibility
.objectDepthDistance: number
read-only property to the TapGesture
class. The returned value represents the distance from the 3D location of the tap on an object to the camera.rotation: QuaternionSignal
and scale: PointSignal
read-write properties to WorldTransform
class.rotation: QuaternionSignal
read-only property to TransformSignal
class.RotationSignal
to QuaternionSignal
.QuaternionSignal
APIs now include support for common quaternion operations.TransformSignal.applyTo()
and WorldTransform.applyTo()
are deprecated when used with point or vector arguments. Please use applyToPoint()
and applyToVector()
instead.ScaleSignal
into PointSignal
to allow type interoperability and extend functionality.EulerAnglesSignal
into PointSignal
to allow type interoperability and extend functionality.Scene.projectToScreen()
function to convert a world space position into screen space coordinates.play()/stopAll()
methods from the Audio module.InsetsSignal
with Point4DSignal
to allow type interoperability and extend functionality.RgbaSignal
to HsvaSignal
. You can also convert HsvaSignal
to RgbaSignal.
RgbaSignal
and HsvaSignal
into Point4DSignal
. You can also convert Point4DSignal
into RgbaSignal
or HsvaSignal
.HsvaSignal
as read-only properties.mix
(linear interpolation) operations to all Scalar
and Vector
signals.min
/max
/clamp
operations to Scalar
and all Vector
signals.magnitudeSquared()
to Scalar
and all Vector
signals.See a demonstration of new features in the latest Quick Tips video.
PixelSizeSignal
and PixelPointSignal
with Point2DSignal
. Point2DSignal
is now the unified type in all APIs representing a vector of 2 elements. Simply substitute types — there’s no need to add a conversion layer.hidden
property on Scene.root
.HandTrackerSceneObject
to HandTracker
in JS scripting API.