vec2 top-level property
dynamic Function(dynamic params)
vec2
getter/setter pair
Implementation
var vec2 = (params) {
if (params[0]?.isNode == true) {
return nodeObject(new ConvertNode(params[0], 'vec2'));
} else {
// Providing one scalar value: This value is used for all components
if (params.length == 1) {
params[1] = params[0];
}
return nodeObject(new Vector2Node(new Vector2(params)).setConst(true));
}
};