Asynchronous API Changes (v85+)
With v85 of Spark AR Studio the current JavaScript API will be deprecated in favor of asynchronous APIs.
With v85 of Spark AR Studio the current JavaScript API will be deprecated in favor of asynchronous APIs.
This means some APIs will be deprecated and will need to be replaced in your projects. When creating new projects, new APIs should be used instead.
What happens to existing projects
APIs will be deprecated after 6 months in existing live effects, and 3 months in resubmitted projects.
If you’re using a deprecated API, you’ll:
See a message in Spark AR Studio when you open the project.
Get an email and notification to let you know how to update it.
New APIs
Deprecated BlendShapesMesh
BlendShapesMesh
Note: duplicated functionality of Array<BlendShapeMesh>
BlockSceneRoot
BlockSceneRoot
Added inputs.setBoolean(name: String, signal: BoolSignal): Promise<void>
Deprecates
setBooleanInput(name: String, signal: BoolSignal): void
Added inputs.setColor(name: String, signal: ColorSignal): Promise<void>
Deprecates
setColorInput(name: String, signal: ColorSignal): void
Added inputs.setPoint(name: String, signal: PointSignal): Promise<void>
Deprecates
setPointInput(name: String, signal: PointSignal): void
Added inputs.setPoint2D(name: String, signal: PixelPointSignal): Promise<void>
Deprecates
setPixelPointInput(name: String, signal: PixelPointSignal): void
Added inputs.setScalar(name: String, signal: ScalarSignal): Promise<void>
Deprecates
setScalarInput(name: String, signal: ScalarSignal): void
Added inputs.setShader(name: String, signal: ShaderSignal): Promise<void>
Deprecates
setShaderInput(name: String, signal: ShaderSignal): void
Added inputs.setString(name: String, signal: StringSignal): Promise<void>
Deprecates
setStringInput(name: String, signal: StringSignal): void
Added inputs.setVector(name: String, signal: VectorSignal): Promise<void>
Deprecates
setVectorInput(name: String, signal: VectorSignal): void
Added outputs.getBoolean(name: String): Promise<BoolSignal>
Deprecates
getBooleanOutput(name: String): BoolSignal
Added outputs.getBooleanOrFallback(name: String, fallback: BoolSignal): BoolSignal
Added outputs.getColor(name: String): Promise<ColorSignal>
Deprecates
getColorOutput(name: String): ColorSignal
Added outputs.getColorOrFallback(name: String, fallback: ColorSignal): ColorSignal
Added outputs.getPoint(name: String): Promise<PointSignal>
Deprecates
getPointOutput(name: String): PointSignal
Added outputs.getPointOrFallback(name: String, fallback: PointSignal): PointSignal
Added outputs.getPoint2D(name: String): Promise<PixelPointSignal>
Deprecates
getPixelPointOutput(name: String): PixelPointSignal
Added outputs.getPoint2DOrFallback(name: String, fallback: PixelPointSignal): PixelPointSignal
Added outputs.getScalar(name: String): Promise<ScalarSignal>
Deprecates
getScalarOutput(name: String): ScalarSignal
Added outputs.getScalarOrFallback(name: String, fallback: ScalarSignal): ScalarSignal
Added outputs.getShader(name: String): Promise<ShaderSignal>
Deprecates
getShaderOutput(name: String): ShaderSignal
Added outputs.getShaderOrFallback(name: String, fallback: ShaderSignal): ShaderSignal
Added outputs.getString(name: String): Promise<StringSignal>
Deprecates
getStringOutput(name: String): StringSignal
Added outputs.getStringOrFallback(name: String, fallback: StringSignal): StringSignal
Added outputs.getVector(name: String): Promise<VectorSignal>
Deprecates
getVectorOutput(name: String): VectorSignal
Added outputs.getVectorOrFallback(name: String, fallback: VectorSignal): VectorSignal
Canvas
Canvas
Added void setMode(mode: Signal<SceneModule.RenderMode>, config { fallback: SceneModule.RenderMode }): void
Added (get) mode: Signal<SceneModule.RenderMode>
Deprecates
(get) renderMode: SceneModule.RenderMode
Added (set) mode: Signal<SceneModule.RenderMode>
Deprecates
(set) renderMode: SceneModule.RenderMode
CustomMaterial
CustomMaterial
Added getBoolParameter(paramName: string): Promise<BoolSignal>
Deprecates
boolParameter(paramName: string): BoolValue
Added getBoolParameterOrFallback(paramName: string, fallback: BoolSignal): BoolSignal
Added getFloatParameter(paramName: string): Promise<ScalarSignal>
Deprecates
floatParameter(paramName: string): ScalarValue
Added getFloatParameterOrFallback(paramName: string, fallback: ScalarSignal): ScalarSignal
getFloatParameterOrFallback(paramName: string, fallback: ScalarSignal): ScalarSignal
Added getTexture(paramName: string): Promise<TextureBase>
Added setBoolParameter(paramName: string, source: BoolSignal): Promise<void>
Deprecates
setBoolParameter(paramName: string, source: BoolSignal): void
Added setFloatParameter(paramName: string, source: ScalarSignal): Promise<void>
Deprecates
setFloatParameter(paramName: string, source: ScalarSignal): void
Added setTexture(paramName: string, texture: TextureBase): Promise<void>
Deprecates
setTexture(paramName: string, texture: TextureBase): void
DefaultMaterial
DefaultMaterial
Added getEmissive(): Promise<TextureBase>
Deprecates
(get) emissive: TextureBase
Added getMultiply(): Promise<TextureBase>
Deprecates
(get) multiply: TextureBase
Added getReflective(): Promise<TextureBase>
Deprecates
(get) reflective: TextureBase
DiagnosticsModule
DiagnosticsModule
Added typeSystem.getTypeDescriptions(): Promise<Object>
Deprecates
getTypeDescriptions(): Object
Added typeSystem.getModuleNames(): Promise<Array<string>>
Deprecates
getModuleNames(): Array<string>
Face
Face
Deprecated and marked for removal deformationCoefficientAt(index: number): ScalarSignal
Deprecated and marked for removal landmark2D(index: number): PointSignal
FaceMesh
FaceMesh
Added getMaterial(): Promise<MaterialBase>
Deprecates
(get) material: MaterialBase
FontsModule
FontsModule
Deprecated get(fontName: string): FontId
Use
findUsingPattern(namePattern: string, config: {limit: number}): Promise<Array<FontId>>
family of methods instead
InstructionModule
InstructionModule
Added (get) automaticHintsEnabled: BoolSignal
Deprecates
(get) automaticInstructionsEnabled: boolean
Added (set) automaticHintsEnabled: BoolSignal
Deprecates
(set) automaticInstructionsEnabled: boolean
LocaleModule
LocaleModule
Deprecated (get) fromDevice: string
Use
(get) locale: StringSignal
instead
MaterialBase
MaterialBase
Added getDiffuse(): Promise<TextureBase>
Deprecates
(get) diffuse: TextureBase
MaterialsModule
MaterialsModule
Deprecated get(materialName: string): MaterialBase
Use
findUsingPattern(namePattern: string, config: {limit: number}): Promise<Array<MaterialBase>>
family of methods instead
Mesh
Mesh
Added getMaterial(): Promise<MaterialBase>
Deprecates
(get) material: MaterialBase
Deprecated (get) blendShapes: BlendShapesMesh
Use
getBlendShapes(): Promise<Array<BlendShape>>
instead
Deprecated (get) materialIdentifier: String
Use
getMaterial(): Promise<MaterialBase>
instead
MetallicRoughnessPbrMaterial
MetallicRoughnessPbrMaterial
Added getBaseColor(): Promise<TextureBase>
Deprecates
(get) baseColor: TextureBase
Added getEmissive(): Promise<TextureBase>
Deprecates
(get) emissive: TextureBase
Added getMetallicRoughness(): Promise<TextureBase>
Deprecates
(get) metallicRoughness: TextureBase
ParticleSystem
ParticleSystem
Added getMaterial(): Promise<MaterialBase>
Deprecates
(get) material: MaterialBase
Added getTypes(): Promise<Array<ParticleTypeDescription>>
Deprecates
(get) types: Array<ParticleTypeDescription>
Added (get) innerRadius: ScalarSignal
Deprecates
(get) innerRadius: ScalarValue
Added (get) outerRadius: ScalarSignal
Deprecates
(get) outerRadius: ScalarValue
Deprecated ParticleTypeDescriptions
ParticleTypeDescriptions
Note: duplicated functionality of Array<ParticleTypeDescription>
PatchesModule
PatchesModule
Added inputs.setBoolean(name: String, signal: BoolSignal): Promise<void>
Deprecates
nsetBooleanValue(name: String, signal: BoolSignal): void
Added inputs.setColor(name: String, signal: ColorSignal): Promise<void>
Deprecates
setColorValue(name: String, signal: ColorSignal): void
Added inputs.setPoint(name: String, signal: PointSignal): Promise<void>
Deprecates
setPointValue(name: String, signal: PointSignal): void
Added inputs.setPoint2D(name: String, signal: PixelPointSignal): Promise<void>
Deprecates
setPoint2DValue(name: String, signal: PixelPointSignal): void
Added inputs.setPulse(name: String, signal: EventSource): Promise<void>
Deprecates
setPulseValue(name: String, signal: EventSource): void
Added inputs.setScalar(name: String, signal: ScalarSignal): Promise<void>
Deprecates
setScalarValue(name: String, signal: ScalarSignal): void
Added inputs.setString(name: String, signal: StringSignal): Promise<void>
Deprecates
setStringValue(name: String, signal: StringSignal): void
Added inputs.setVector(name: String, signal: VectorSignal): Promise<void>
Deprecates
setVectorValue(name: String, signal: VectorSignal): void
Added outputs.getBoolean(name: String): Promise<BoolSignal>
Deprecates
getBooleanValue(name: String): BoolSignal
Added outputs.getBooleanOrFallback(name: String, fallback: BoolSignal): BoolSignal
Added outputs.getColor(name: String): Promise<ColorSignal>
Deprecates
getColorValue(name: String): ColorSignal
Added outputs.getColorOrFallback(name: String, fallback: ColorSignal): ColorSignal
Added outputs.getPoint(name: String): Promise<PointSignal>
Deprecates
getPointValue(name: String): PointSignal
Added outputs.getPointOrFallback(name: String, fallback: PointSignal): PointSignal
Added outputs.getPoint2D(name: String): Promise<PixelPointSignal>
Deprecates
getPoint2DValue(name: String): PixelPointSignal
Added outputs.getPoint2DOrFallback(name: String, fallback: PixelPointSignal): PixelPointSignal
Added outputs.getPulse(name: String): Promise<EventSource>
Deprecates
getPulseValue(name: String): EventSource
Added outputs.getScalar(name: String): Promise<ScalarSignal>
Deprecates
getScalarValue(name: String): ScalarSignal
Added outputs.getScalarOrFallback(name: String, fallback: ScalarSignal): ScalarSignal
Added outputs.getString(name: String): Promise<StringSignal>
Deprecates
getStringValue(name: String): StringSignal
Added outputs.getStringOrFallback(name: String, fallback: StringSignal): StringSignal
Added outputs.getVector(name: String): Promise<VectorSignal>
Deprecates
getVectorValue(name: String): VectorSignal
Added outputs.getVectorOrFallback(name: String, fallback: VectorSignal): VectorSignal
PlanarImage
PlanarImage
Added getMaterial(): Promise<MaterialBase>
Deprecates
(get) material: MaterialBase
PlanarText
PlanarText
Added getMaterial(): Promise<MaterialBase>
Deprecates
(get) material: MaterialBase
Plane
Plane
Added getMaterial(): Promise<MaterialBase>
Deprecates
(get) material: MaterialBase
SceneObjectBase
SceneObjectBase
Deprecated (get) materialIdentifier: string
Use
getMaterial(): Promise<MaterialBase>
onSceneObjectBase
which support materials
Deprecated find(name: string): SceneObjectBase
Use
findByPath(pathQuery: string, config: {limit: number}): Promise<Array<SceneObjectBase>>
family of methods instead
Deprecated child(name: string): SceneObjectBase
Use
findByPath(pathQuery: string, config: {limit: number}): Promise<Array<SceneObjectBase>>
family of methods instead
Scene
Scene
Deprecated find(name: string): SceneObjectBase
Use
findByPath(pathQuery: string, config: {limit: number}): Promise<Array<SceneObjectBase>>
family of methods instead
Deprecated child(name: string): SceneObjectBase
Use
findByPath(pathQuery: string, config: {limit: number}): Promise<Array<SceneObjectBase>>
family of methods instead
SvgImage
SvgImage
Added getSvg(): Promise<Svg>
SvgsModule
SvgsModule
Deprecated get(svgName: string): Svg
Use
findUsingPattern(namePattern: string, config: {limit: number}): Promise<Array<Svg>>
family of methods instead
TextAlignmentWrapper
TextAlignmentWrapper
Added (get) horizontal: Signal<TextAlignment>
Added (set) horizontal: Signal<TextAlignment>
Deprecates
(set) horizontal: TextAlignment
Added (get) vertical: Signal<VerticalTextAlignment>
Added (set) vertical: Signal<VerticalTextAlignment>
Deprecates
(set) vertical: VerticalTextAlignment
TextExtrusion
TextExtrusion
Added getFrontMaterial(): Promise<MaterialBase>
Added getFont(): Promise<FontId>
Added getBackMaterial(): Promise<MaterialBase>
Added getSideMaterial(): Promise<MaterialBase>
Deprecated (set) faceMaterial: MaterialBase
Use
(set) frontMaterial: MaterialBase
and(set) backMaterial: MaterialBase
instead
TexturesModule
TexturesModule
Deprecated get(textureName: string): TextureBase
Use
findUsingPattern(namePattern: string, config: {limit: number}): Promise<Array<TextureBase>>
family of methods insteadAsynchronous API Changes (v85+)
With v85 of Spark AR Studio the current JavaScript API will be deprecated in favor of asynchronous APIs.
This means some APIs will be deprecated and will need to be replaced in your projects. When creating new projects, new APIs should be used instead.
What happens to existing projects
APIs will be deprecated after 6 months in existing live effects, and 3 months in resubmitted projects.
If you’re using a deprecated API, you’ll:
See a message in Spark AR Studio when you open the project.
Get an email and notification to let you know how to update it.
****
Last updated