setCamera method
Sets the current scene camera to the glTF camera under name
in entity
.
Implementation
@override
Future setCamera(ThermionEntity entity, String? name) async {
final result = _module.ccall(
"set_camera",
"bool",
["void*".toJS, "int".toJS, "string".toJS].toJS,
[_viewer!, entity.toJS, (name ?? "").toJS].toJS,
null) as JSBoolean;
if (!result.toDart) {
throw Exception("Failed to set camera to entity ${entity}");
}
}