NativeUI Picker (Outdated) | Spark AR Studio
New version is now live for V85 https://youtu.be/uyzfcOsfgP8 Patreon Link: https://www.patreon.com/intar_catalyst Script Javascript: const Materials = require('Materials'); const Scene = require('Scene'); const NativeUI = require('NativeUI'); const Textures = require('Textures'); const plane = Scene.root.find('plane0'); const rect = Scene.root.find('rect'); const index = 0; const configuration = { selectedIndex: index, items: [ {image_texture: Textures.get('Shape_01')}, {image_texture: Textures.get('Shape_02')}, {image_texture: Textures.get('Shape_03')}, ], mats: [ {material: Materials.get("material0")}, {material: Materials.get("material1")}, {material: Materials.get("material2")}, ], mats2: [ {material2: Materials.get("material3")}, {material2: Materials.get("material4")}, {material2: Materials.get("material5")}, ], }; const picker = NativeUI.picker; picker.configure(configuration); picker.visible = true; picker.selectedIndex.monitor().subscribe(function(val) { plane.material = configuration.mats[val.newValue].material; rect.material = configuration.mats2[val.newValue].material2; });
Download
0 formatsNo download links available.