Grant-Nelson / ThreeDart

3D graphical rendering tool for websites written in Dart.
Other
16 stars 11 forks source link

Hi i didn't load our fbx model in mobile please check this error #139

Open AliImrangang opened 1 year ago

AliImrangang commented 1 year ago

I/flutter (31588): Important warn: make sure set samples before setRenderTarget
E/flutter (31588): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: type 'Null' is not a subtype of type 'Map<dynamic, dynamic>' E/flutter (31588): #0 FBXTreeParser.parseScene. (package:three_dart_jsm/three_dart_jsm/loaders/fbx_loader.dart:677:40) E/flutter (31588): #1 _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:617:13) E/flutter (31588): #2 FBXTreeParser.parseScene (package:three_dart_jsm/three_dart_jsm/loaders/fbx_loader.dart:675:14) E/flutter (31588): #3 FBXTreeParser.parse (package:three_dart_jsm/three_dart_jsm/loaders/fbx_loader.dart:127:5) E/flutter (31588): E/flutter (31588): #4 _MyAppState.initPage (package:example/webgl_loader_fbx.dart:266:18) E/flutter (31588): E/flutter (31588):

Grant-Nelson commented 1 year ago

Oh, I'm so sorry, I totally didn't see this notification until now.

That's interesting. The loader only supports some of the object and material features. For example since ThreeDart was mostly designed to run on a browser, if the file contains a reference to another image, the browser has no ability to request the file from the machine that the browser is running on. FBX hasn't been officially supported. Issue 49 has a list of file types which haven't been fully checked nor supported. I'm not sure why the null is being hit in the map.

With the information I have I don't think I'll be able to appropriately address this issue. Also I haven't worked on ThreeDart recently (some other projects have required my focus) but if you have some ideas or fixes, let me know or create a branch for the fix. Any help with this project is welcomed.