There is no direct way to change colours using patch editor in Spark AR, using the script seems to not work too, even though I was able to affect the opacity of the material using in the last line, I get no error inside Spark it just does not work but the editor keeps highlighting the first argument of Reactive.RGBA and give me this error
Argument of type '0' is not assignable to parameter of type 'ScalarSignal'.ts(2345)
are there any solutions to this?
const Materials = require('Materials');
const Textures = require('Textures');
const Diagnostics = require('Diagnostics');
const Scene = require('Scene');
const NativeUI = require('NativeUI');
const Patches = require('Patches');
const Reactive = require('Reactive');
var Animation = require('Animation');
const plane = Scene.root.find('plane0');
//Materials.get('material0').diffuse = Reactive.RGBA(1,0,1,1);
plane.material.color = Reactive.RGBA(0.2,0,1,0.5);
//plane.Textures.color = Reactive.RGBA(1,0,1,0.5);
//plane.material.opacity = 0.5;