material property
Flix3DMaterial
get
material
Implementation
Flix3DMaterial get material {
_ensureNotDisposed();
final output = calloc<Float>(6);
try {
if (_api.copyMaterialFactors(_handle, output, 6) == 0) {
throw StateError('Native material factor copy failed.');
}
final values = output.asTypedList(6);
return Flix3DMaterial(
name: _source.name,
red: values[0],
green: values[1],
blue: values[2],
alpha: values[3],
metallic: values[4],
roughness: values[5],
textureMaps: _source.textureMaps,
);
} finally {
calloc.free(output);
}
}