Looks up a color property by name.
Returns a DataValueColor.
local vmi = context:viewModel()if vmi then local primaryColor = vmi:getColor('primaryColor') if primaryColor then primaryColor.value = Color.rgba(255, 0, 0, 155) endend
Creates a new instance of the ViewModel.
Pass instanceName to specify an existing instance from the file to use as template
function init(self: VMNameNode, context: Context): boolean local vm = context:viewModel() if vm then local newInstance = vm:instance() local age = newInstance:getNumber('age') if age then age.value = 99 end end return trueend