rename numInstances to initialInstances in loadGltf methods.
when initialInstances > 0, don't wait for createInstance to be called to create corresponding GltfSceneAsset
This commit is contained in:
@@ -890,7 +890,7 @@ class FFIFilamentApp extends FilamentApp<Pointer> {
|
||||
///
|
||||
Future<ThermionAsset> loadGltfFromBuffer(
|
||||
Uint8List data, Pointer animationManager,
|
||||
{int numInstances = 1,
|
||||
{int initialInstances = 1,
|
||||
bool keepData = false,
|
||||
int priority = 4,
|
||||
int layer = 0,
|
||||
@@ -914,7 +914,7 @@ class FFIFilamentApp extends FilamentApp<Pointer> {
|
||||
|
||||
var filamentAsset = await withPointerCallback<TFilamentAsset>((cb) =>
|
||||
GltfAssetLoader_loadRenderThread(engine, gltfAssetLoader,
|
||||
data.address, data.length, numInstances, cb));
|
||||
data.address, data.length, initialInstances, cb));
|
||||
|
||||
if (filamentAsset == nullptr) {
|
||||
throw Exception("An error occurred loading the asset");
|
||||
|
||||
@@ -6,7 +6,6 @@ import 'package:thermion_dart/src/filament/src/interface/scene.dart';
|
||||
import 'package:thermion_dart/thermion_dart.dart';
|
||||
|
||||
export 'geometry.dart';
|
||||
export 'gltf.dart';
|
||||
|
||||
///
|
||||
/// A high-level interface for a renderable object
|
||||
|
||||
@@ -291,11 +291,11 @@ abstract class FilamentApp<T> {
|
||||
Future setClearOptions(double r, double g, double b, double a,
|
||||
{int clearStencil = 0, bool discard = false, bool clear = true});
|
||||
|
||||
///
|
||||
/// See [FilamentViewerFFI.loadGltf] for details.
|
||||
///
|
||||
///
|
||||
Future<ThermionAsset> loadGltfFromBuffer(Uint8List data, T animationManager,
|
||||
{int numInstances = 1,
|
||||
{int initialInstances = 1,
|
||||
bool keepData = false,
|
||||
int priority = 4,
|
||||
int layer = 0,
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
class GLTF {
|
||||
final String uri;
|
||||
final int numInstances;
|
||||
|
||||
GLTF(this.uri, this.numInstances);
|
||||
}
|
||||
Reference in New Issue
Block a user