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.

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:
  1. 1.
    See a message in Spark AR Studio when you open the project.
  2. 2.
    Get an email and notification to let you know how to update it.

Note: duplicated functionality of Array<BlendShapeMesh>

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

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

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 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

Added getEmissive(): Promise<TextureBase>
  • Deprecates (get) emissive: TextureBase
Added getMultiply(): Promise<TextureBase>
  • Deprecates (get) multiply: TextureBase
Added getReflective(): Promise<TextureBase>
  • Deprecates (get) reflective: TextureBase

Added typeSystem.getTypeDescriptions(): Promise<Object>
  • Deprecates getTypeDescriptions(): Object
Added typeSystem.getModuleNames(): Promise<Array<string>>
  • Deprecates getModuleNames(): Array<string>

Deprecated and marked for removal deformationCoefficientAt(index: number): ScalarSignal
Deprecated and marked for removal landmark2D(index: number): PointSignal

Added getMaterial(): Promise<MaterialBase>
  • Deprecates (get) material: MaterialBase

Deprecated get(fontName: string): FontId
  • Use findUsingPattern(namePattern: string, config: {limit: number}): Promise<Array<FontId>> family of methods instead

Added (get) automaticHintsEnabled: BoolSignal
  • Deprecates (get) automaticInstructionsEnabled: boolean
Added (set) automaticHintsEnabled: BoolSignal
  • Deprecates (set) automaticInstructionsEnabled: boolean

Deprecated (get) fromDevice: string
  • Use (get) locale: StringSignal instead

Added getDiffuse(): Promise<TextureBase>
  • Deprecates (get) diffuse: TextureBase

Deprecated get(materialName: string): MaterialBase
  • Use findUsingPattern(namePattern: string, config: {limit: number}): Promise<Array<MaterialBase>> family of methods instead

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

Added getBaseColor(): Promise<TextureBase>
  • Deprecates (get) baseColor: TextureBase
Added getEmissive(): Promise<TextureBase>
  • Deprecates (get) emissive: TextureBase
Added getMetallicRoughness(): Promise<TextureBase>
  • Deprecates (get) metallicRoughness: TextureBase

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

Note: duplicated functionality of Array<ParticleTypeDescription>

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

Added getMaterial(): Promise<MaterialBase>
  • Deprecates (get) material: MaterialBase

Added getMaterial(): Promise<MaterialBase>
  • Deprecates (get) material: MaterialBase

Added getMaterial(): Promise<MaterialBase>
  • Deprecates (get) material: MaterialBase

Deprecated (get) materialIdentifier: string
  • Use getMaterial(): Promise<MaterialBase> on SceneObjectBase 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

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

Added getSvg(): Promise<Svg>

Deprecated get(svgName: string): Svg
  • Use findUsingPattern(namePattern: string, config: {limit: number}): Promise<Array<Svg>> family of methods instead

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

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

Deprecated get(textureName: string): TextureBase
  • Use findUsingPattern(namePattern: string, config: {limit: number}): Promise<Array<TextureBase>> family of methods instead
    Asynchronous 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:
    1. 1.
      See a message in Spark AR Studio when you open the project.
    2. 2.
      Get an email and notification to let you know how to update it.
    ****
Copy link
On this page
What happens to existing projects
New APIs
Deprecated BlendShapesMesh
BlockSceneRoot
Canvas
CustomMaterial
DefaultMaterial
DiagnosticsModule
Face
FontsModule
InstructionModule
LocaleModule
MaterialBase
MaterialsModule
Mesh
MetallicRoughnessPbrMaterial
ParticleSystem
PatchesModule
PlanarImage
Plane
Scene
SvgImage
SvgsModule
TextAlignmentWrapper
TextExtrusion
TexturesModule