diff --git a/ios/include/SceneAssetLoader.hpp b/ios/include/SceneAssetLoader.hpp index bf99af6a..dbb0dfa3 100644 --- a/ios/include/SceneAssetLoader.hpp +++ b/ios/include/SceneAssetLoader.hpp @@ -35,8 +35,6 @@ namespace polyvox { private: LoadResource _loadResource; FreeResource _freeResource; - MaterialProvider* _materialProvider; - EntityManager* _entityManager; AssetLoader* _assetLoader; ResourceLoader* _resourceLoader; NameComponentManager* _ncm; diff --git a/ios/lib/libimageio.a b/ios/lib/libimageio.a deleted file mode 100644 index 8a61b93a..00000000 --- a/ios/lib/libimageio.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:738f663c400320f6c295f124543e698a241d8bac6065ac4b5c577f2248b97397 -size 823816 diff --git a/ios/lib/libpng.a b/ios/lib/libpng.a deleted file mode 120000 index 5671875d..00000000 --- a/ios/lib/libpng.a +++ /dev/null @@ -1 +0,0 @@ -libpng16.a \ No newline at end of file diff --git a/ios/lib/libtinyexr.a b/ios/lib/libtinyexr.a deleted file mode 100644 index eabbdde6..00000000 --- a/ios/lib/libtinyexr.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3f9bff9a37abee1a3b792e882a327b114ebedc1458f7052675e8031ae16c786c -size 1310496 diff --git a/ios/src/SceneAssetLoader.cpp b/ios/src/SceneAssetLoader.cpp index 9f15e360..01bc0550 100644 --- a/ios/src/SceneAssetLoader.cpp +++ b/ios/src/SceneAssetLoader.cpp @@ -16,8 +16,7 @@ SceneAssetLoader::SceneAssetLoader(LoadResource loadResource, NameComponentManager *ncm, Engine *engine, Scene *scene) - : _loadResource(loadResource), _freeResource(freeResource), _materialProvider(materialProvider), _entityManager(entityManager), - _resourceLoader(resourceLoader), _ncm(ncm), + : _loadResource(loadResource), _freeResource(freeResource), _resourceLoader(resourceLoader), _ncm(ncm), _engine(engine), _scene(scene) { _assetLoader = AssetLoader::create({_engine, materialProvider, _ncm, entityManager}); } @@ -111,21 +110,20 @@ SceneAsset *SceneAssetLoader::fromGlb(const char *uri) { Log("Resources loaded."); - const Entity *entities = asset->getEntities(); + // const Entity *entities = asset->getEntities(); - RenderableManager &rm = _engine->getRenderableManager(); + // RenderableManager &rm = _engine->getRenderableManager(); - MaterialKey config; - auto mi_new = _materialProvider->createMaterialInstance(&config, nullptr); + // MaterialKey config; + // auto mi_new = _materialProvider->createMaterialInstance(&config, nullptr); - // why did I need to explicitly enable culling? - for (int i = 0; i < asset->getEntityCount(); i++) { - auto entityInstance = rm.getInstance(entities[i]); - auto mi = rm.getMaterialInstanceAt(entityInstance, 0); - // auto m = mi->getMaterial(); - // auto shading = m->getShading(); - // Log("Shading %d", shading); - } + // for (int i = 0; i < asset->getEntityCount(); i++) { + // auto entityInstance = rm.getInstance(entities[i]); + // auto mi = rm.getMaterialInstanceAt(entityInstance, 0); + // // auto m = mi->getMaterial(); + // // auto shading = m->getShading(); + // // Log("Shading %d", shading); + // } auto lights = asset->getLightEntities(); _scene->addEntities(lights, asset->getLightEntityCount()); diff --git a/lib/filament_gesture_detector.dart b/lib/filament_gesture_detector.dart index 6d556e49..2567f2e1 100644 --- a/lib/filament_gesture_detector.dart +++ b/lib/filament_gesture_detector.dart @@ -103,7 +103,6 @@ class _FilamentGestureDetectorState extends State { ? null : (d) async { _scaling = true; - print("SCALE START"); if (d.pointerCount == 2) { await widget.controller.zoomEnd(); await widget.controller.zoomBegin(); @@ -154,7 +153,6 @@ class _FilamentGestureDetectorState extends State { onPointerDown: !widget.enableControls ? null : (d) async { - print("piinterodoiwn"); if (d.buttons == kTertiaryButton || _rotating) { await widget.controller.rotateStart( d.localPosition.dx, d.localPosition.dy); @@ -166,7 +164,6 @@ class _FilamentGestureDetectorState extends State { onPointerMove: !widget.enableControls ? null : (d) async { - print("pointermove"); if (d.buttons == kTertiaryButton || _rotating) { await widget.controller.rotateUpdate( d.localPosition.dx, d.localPosition.dy); @@ -178,7 +175,6 @@ class _FilamentGestureDetectorState extends State { onPointerUp: !widget.enableControls ? null : (d) async { - print("pointerup"); if (d.buttons == kTertiaryButton || _rotating) { await widget.controller.rotateEnd(); } else { diff --git a/linux/polyvox_filament_plugin.cc b/linux/polyvox_filament_plugin.cc index 4fa7a232..204bc38b 100644 --- a/linux/polyvox_filament_plugin.cc +++ b/linux/polyvox_filament_plugin.cc @@ -125,9 +125,10 @@ static FlMethodResponse* _remove_ibl(PolyvoxFilamentPlugin* self, FlMethodCall* static FlMethodResponse* _loadIbl(PolyvoxFilamentPlugin* self, FlMethodCall* method_call) { FlValue* args = fl_method_call_get_args(method_call); - const gchar* path = fl_value_get_string(args); + auto path = fl_value_get_string(fl_value_get_list_value(args, 0)); + auto intensity = fl_value_get_float(fl_value_get_list_value(args, 1)); - load_ibl(self->_viewer, path); + load_ibl(self->_viewer, path, intensity); g_autoptr(FlValue) result = fl_value_new_string("OK"); return FL_METHOD_RESPONSE(fl_method_success_response_new(result)); @@ -155,7 +156,7 @@ static FlMethodResponse* _set_background_image(PolyvoxFilamentPlugin* self, FlMe static FlMethodResponse* _set_background_color(PolyvoxFilamentPlugin* self, FlMethodCall* method_call) { const float* color = fl_value_get_float32_list(fl_method_call_get_args(method_call)); - set_background_color(self->_viewer, color); + set_background_color(self->_viewer, color[0], color[1], color[2], color[2]); g_autoptr(FlValue) result = fl_value_new_string("OK"); return FL_METHOD_RESPONSE(fl_method_success_response_new(result)); @@ -184,8 +185,9 @@ static FlMethodResponse* _add_light(PolyvoxFilamentPlugin* self, FlMethodCall* m static FlMethodResponse* _load_glb(PolyvoxFilamentPlugin* self, FlMethodCall* method_call) { FlValue* args = fl_method_call_get_args(method_call); - auto path = fl_value_get_string(args); - auto entityId = load_glb(self->_viewer, path); + auto path = fl_value_get_string(fl_value_get_list_value(args, 0)); + auto unlit = fl_value_get_bool(fl_value_get_list_value(args, 1)); + auto entityId = load_glb(self->_viewer, path, unlit); g_autoptr(FlValue) result = fl_value_new_int((int64_t)entityId); return FL_METHOD_RESPONSE(fl_method_success_response_new(result)); }