Skip to content

Instantly share code, notes, and snippets.

@rbkavin
Created February 27, 2020 10:54
Show Gist options
  • Save rbkavin/d455eb87652c1939680a25a037e4a37d to your computer and use it in GitHub Desktop.
Save rbkavin/d455eb87652c1939680a25a037e4a37d to your computer and use it in GitHub Desktop.
const n = require("NativeUI");
const m = require("Materials");
const p = require("Patches");
// values 0 - 1
var val = 0.5;
var mat = m.get('facePaint_mat');
const slider = n.slider;
slider.value.monitor({fireOnInitialValue:false}).subscribe((mod)=>{
val = mod.newValue;
mat.opacity = val;
p.setScalarValue("value",val);
});
slider.value = 0.5;
slider.visible = true;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment