Compare commits

...

899 Commits

Author SHA1 Message Date
jingyun d16474784d fix:3的模型动态修改模型文件 2025-08-25 15:09:07 +08:00
jingyun 1c07d576d3 init 2025-08-22 15:14:09 +08:00
Nick Fisher 961b2ae1ee chore(release): publish packages
- thermion_dart@0.3.3
 - thermion_flutter_method_channel@0.3.3
 - thermion_flutter_platform_interface@0.3.3
 - thermion_flutter_web@0.3.3
 - thermion_flutter@0.3.3
2025-07-24 11:40:35 +08:00
Nick Fisher a7ac118899 chore(release): publish packages
- thermion_dart@0.3.3-pre
 - thermion_flutter@0.3.3-pre
 - thermion_flutter_method_channel@0.3.3-pre
 - thermion_flutter_platform_interface@0.3.3-pre
 - thermion_flutter_web@0.3.3-pre
2025-07-17 12:13:53 +08:00
Nick Fisher d92ad4ef12 feat: allow passing renderTargetColorTextureFormat via ThermionFlutterOptions 2025-07-17 12:11:20 +08:00
Nick Fisher 437e91e7bd fix: fix Windows build.dart 2025-07-17 10:54:00 +08:00
Nick Fisher e169bf6c41 nit: reorder build.dart imports 2025-07-16 18:33:47 +08:00
Nick Fisher 23b060c329 nit: change gltf logging from Log to TRACE 2025-07-16 18:33:47 +08:00
Nick Fisher 5fd0a10630 re-enable EMSCRIPTEN_KEEPALIVE qualifiers for headers. These are not needed for Emscripten builds but the same name is used for Windows __declspec(dllimport), so this is still needed on Windows. We should probably rename this to API_EXPORT or something similar 2025-07-16 18:33:47 +08:00
Nick Fisher ddfb649733 ci: add windows workflow 2025-07-16 18:15:04 +08:00
Nick Fisher ecffc5b62a use async loading for camera_manipulation sample 2025-07-16 18:08:21 +08:00
Nick Fisher 429b8eb93b doc: improve addToScene/removeFromScene documentation 2025-07-16 13:00:27 +08:00
Nick Fisher 413faec849 fix: add nan/negative checks inside setLensProjection 2025-07-14 11:50:52 +08:00
Nick Fisher 433b6373a9 docs: replace thermion_flutter README with symlink to thermion_dart README 2025-07-14 10:13:58 +08:00
Nick Fisher ad2c5afb7f docs: update contributor list 2025-07-14 10:13:38 +08:00
Nick Fisher a561c847a7 (test) don't load dylib on macos in testing 2025-07-09 10:47:22 +08:00
Nick Fisher ef7ba24ecc don't fade grid axes depending on camera angle 2025-07-09 10:46:37 +08:00
Nick Fisher ee176d2684 explicitly list packages in melos.yaml 2025-07-09 10:41:53 +08:00
Nick Fisher fa168df28f chore(release): publish packages
- thermion_dart@0.3.2
 - thermion_flutter@0.3.2
 - thermion_flutter_method_channel@0.3.2
 - thermion_flutter_web@0.3.2
 - thermion_flutter_platform_interface@0.3.2
2025-07-08 11:48:25 +08:00
Nick Fisher ba3d016c1a fix: add missing destroySwapchain argument for web 2025-07-08 11:47:47 +08:00
Nick Fisher e04d8e76c2 chore(release): publish packages
- thermion_dart@0.3.1
 - thermion_flutter@0.3.1
 - thermion_flutter_method_channel@0.3.1
 - thermion_flutter_web@0.3.1
 - thermion_flutter_platform_interface@0.3.1
2025-07-08 10:33:06 +08:00
Nick Fisher 353b33b7c3 fix: addDestroySwapchain argument to createViewer() (true by default). This is only used on iOS/macOS where a single swapchain is shared between all render targets 2025-07-07 17:37:28 +08:00
Nick Fisher 3c1b26af2c reverse orientation of camera volume 'lens' 2025-07-07 17:21:43 +08:00
Nick Fisher b4ea80a84c don't allow creating instances for GridOverlay asset and only expose a single entity 2025-07-07 17:21:43 +08:00
Nick Fisher db44bc6f74 formatting 2025-07-07 17:19:47 +08:00
Nick Fisher c668549fb0 fix: add flush() to skybox/IBL destroy methods to ensure that textre upload callbacks are completed to avoid stalling 2025-07-07 17:19:36 +08:00
Nick Fisher a66703b61c (flutter) (example) cleanup 2025-07-07 17:19:06 +08:00
Nick Fisher cb8943ff72 formatting 2025-07-07 17:18:43 +08:00
Nick Fisher 9f59577f90 fix: duplicate setting for _grid 2025-07-07 16:40:15 +08:00
Nick Fisher b86145d4c6 refactor: remove covariant keyword from createInstance args 2025-07-04 22:37:15 +08:00
Nick Fisher cb8672f120 docs: remove camera_manipulation document 2025-07-03 17:49:51 +08:00
Nick Fisher 92578426ac docs: update quickstart 2025-07-03 17:17:44 +08:00
Nick Fisher 4a6479c4d8 docs: fix typo in link 2025-07-03 17:13:47 +08:00
Nick Fisher 2244d3fcb6 docs: remove code from thermion_flutter README.md and point to docs/repository example instead 2025-07-03 17:12:45 +08:00
Nick Fisher 003fd59269 (web) add -Wno-invalid-specialization 2025-07-03 16:23:24 +08:00
Nick Fisher 77e6ef7568 (CI) move to macos for web build 2025-07-03 16:15:20 +08:00
Nick Fisher 6f07d406f8 (CI) move compile-web-wasm to own step 2025-07-03 16:05:49 +08:00
Nick Fisher bf5551e278 update Makefile to download wasm release libs 2025-07-03 15:51:23 +08:00
Nick Fisher 64577af352 (CI): update web build 2025-07-03 15:27:54 +08:00
Nick Fisher 951894be41 update CHANGELOG 2025-07-03 15:25:14 +08:00
Nick Fisher c64b2b8659 docs: update showcase 2025-07-03 15:10:11 +08:00
Nick Fisher 322e77d2b7 add additional camera geometry object 2025-07-03 15:00:02 +08:00
Nick Fisher a8a52bb2f4 docs: update quickstart/getting started/viewer docs 2025-07-03 14:32:07 +08:00
Nick Fisher c7dfd293e2 (web) add cplusplus guards for material header 2025-07-03 14:22:26 +08:00
Nick Fisher cf2498b45f (docs) update web 2025-07-03 14:22:08 +08:00
Nick Fisher edb7538c36 (example) update viewer example + docs 2025-07-03 14:22:01 +08:00
Nick Fisher b023e2fb97 chore(release): publish packages
- thermion_dart@0.3.0
 - thermion_flutter@0.3.0
 - thermion_flutter_method_channel@0.3.0
 - thermion_flutter_web@0.3.0
 - thermion_flutter_platform_interface@0.3.0
2025-07-03 13:33:19 +08:00
Nick Fisher b51cc4b1d1 (flutter) remove direct local dependency in pubspec.yaml 2025-07-03 13:16:06 +08:00
Nick Fisher d995ed8843 (flutter) cleanup widgets to satisfy pub.dev analyzer 2025-07-03 13:15:50 +08:00
Nick Fisher b0d34bf6a8 (flutter) rename setExposure method in camera widget 2025-07-03 13:13:04 +08:00
Nick Fisher 2e28b0379d bump min Dart constraint to satisfy pub.dev 2025-07-03 13:09:36 +08:00
Nick Fisher c899e30a7b chore(release): publish packages
- thermion_dart@0.3.0
 - thermion_flutter@0.3.0
 - thermion_flutter_method_channel@0.3.0
 - thermion_flutter_web@0.3.0
 - thermion_flutter_platform_interface@0.3.0
2025-07-03 13:04:44 +08:00
Nick Fisher 37f8558794 add stub method for resizeWebCanvas to make pub.dev happy 2025-07-03 13:04:24 +08:00
Nick Fisher 3cfa26d284 (web) add package:logging to pubspec to make pub.dev happy 2025-07-03 13:00:41 +08:00
Nick Fisher b22a82e181 delete swift bindings from thermion_dart package 2025-07-03 12:59:28 +08:00
Nick Fisher 3d072594b5 chore(release): publish packages
- thermion_dart@0.3.0
 - thermion_flutter@0.3.0
 - thermion_flutter_method_channel@0.3.0
 - thermion_flutter_web@0.3.0
 - thermion_flutter_platform_interface@0.3.0
2025-07-03 12:56:51 +08:00
Nick Fisher 75590c5dde (CI) fix android build 2025-07-03 12:20:17 +08:00
Nick Fisher b52d47bb41 (CI) temporarily disable ios build 2025-07-03 12:13:07 +08:00
Nick Fisher 397c575631 (CI) add android/ios builds to runner 2025-07-03 12:01:35 +08:00
Nick Fisher ddc5af376a update grid material 2025-07-03 11:54:06 +08:00
Nick Fisher 77f843568f return true in listener widget when key handled 2025-07-03 11:53:54 +08:00
Nick Fisher f706f54eb2 update outline material 2025-07-03 11:53:06 +08:00
Nick Fisher c12ec892f3 add bbCenter to outline material 2025-07-03 11:52:50 +08:00
Nick Fisher 8e88252337 attach highlight to all entities, not the ultimate owning asset entity 2025-07-03 11:51:42 +08:00
Nick Fisher 23e34e6da4 expose isRenderable 2025-07-03 11:50:18 +08:00
Nick Fisher 5aa14ff5f6 update bindings 2025-07-01 17:00:34 +08:00
Nick Fisher c0cc9fc26a use premultiplied alpha for grid material 2025-07-01 16:59:48 +08:00
Nick Fisher 946a6ae9d2 use premultiplied alpha for grid material 2025-07-01 16:59:19 +08:00
Nick Fisher 73e6597301 replace overlay render target when viewport resizes 2025-07-01 16:58:46 +08:00
Nick Fisher e731556e6f add scale parameter to outline material 2025-07-01 14:28:19 +08:00
Nick Fisher f9a7ac49a1 expose View methods for transparent picking 2025-07-01 14:20:02 +08:00
Nick Fisher 83e4a5142a (CI) update golden ref 2025-07-01 13:27:52 +08:00
Nick Fisher bb913644f4 (example) add web folder for materials_and_textures example 2025-07-01 13:16:31 +08:00
Nick Fisher 4b9870244a fix material headers for web 2025-07-01 13:16:07 +08:00
Nick Fisher ce2dc9b1cb update FFI/JS bindings 2025-07-01 13:11:24 +08:00
Nick Fisher 1a2b3b7b59 (test) pass-through render arg to capture() 2025-07-01 13:10:15 +08:00
Nick Fisher c0ed7cbc90 (test) remove stencil highlight from scene_test.dart 2025-07-01 13:10:02 +08:00
Nick Fisher a5eab305da add bool render argument to capture() 2025-07-01 13:09:42 +08:00
Nick Fisher c467e3ca69 (test) add stencil highlight to view_tests 2025-07-01 13:09:20 +08:00
Nick Fisher e984d8cf71 don't pass View to readPixels (only width/height, x/y offsets needed, and optionally rendertarget) 2025-07-01 13:03:06 +08:00
Nick Fisher 0693a2a95b update overlay tests 2025-07-01 12:17:17 +08:00
Nick Fisher a2883fbee9 update overlay tests 2025-07-01 12:17:09 +08:00
Nick Fisher dbcf463fd1 use buildMode from user defines (if present) 2025-07-01 12:14:53 +08:00
Nick Fisher 6ab1411801 (example) add Android support for materials_and_textures example 2025-07-01 12:12:59 +08:00
Nick Fisher a9b5ca786e update grid material 2025-07-01 12:12:33 +08:00
Nick Fisher 4379313932 move grid material instantiation to GridOverlay 2025-07-01 11:07:44 +08:00
Nick Fisher 8a997d533a remove stencil highlight on remove from scene or destroyAsset 2025-07-01 11:07:17 +08:00
Nick Fisher b7e79b1ac5 move outline material to embedded binary 2025-07-01 11:07:01 +08:00
Nick Fisher 9a5b737391 move outline material to embedded binary 2025-07-01 11:06:51 +08:00
Nick Fisher 215515a4fc use RenderTarget nativeHandle and don't cast to FFIMaterialInstance 2025-07-01 10:52:04 +08:00
Nick Fisher 3ca1cc0747 add OverlayComponentManager destructor 2025-07-01 10:51:00 +08:00
Nick Fisher 0c2e4e6faa (material) set gridColor when instantiating grid material 2025-07-01 10:42:42 +08:00
Nick Fisher e50a1b6002 implement RenderTicker::removeSwapChain 2025-07-01 10:42:21 +08:00
Nick Fisher 70c67b59f7 (test) use DEPTH24_STENCIL8 2025-07-01 10:41:32 +08:00
Nick Fisher 2022fa97cc use DEPTH24_STENCIL8 as depth attachment for render target.
I'm not sure this is even used; the backend always allocate its own internal depth/stencil buffer. There may be a final blit from the internal buffer to the render target buffer, but I haven't actually confirmed this yet
2025-07-01 10:28:36 +08:00
Nick Fisher 809f84e1fa logging 2025-07-01 10:27:00 +08:00
Nick Fisher 932971c872 use generic parameter in FilamentApp for renderableManager/transformManager/etc, and only expose as getters in the interface 2025-07-01 10:26:30 +08:00
Nick Fisher 7ed120e854 call removeSwapChain when swapChain is destroyed 2025-07-01 10:25:36 +08:00
Nick Fisher 45c4cea6aa add setBackgroundImageFromTexture method to ThermionViewer 2025-07-01 10:23:25 +08:00
Nick Fisher 2545bbbd35 move set/remove stencilHighlight to View and implement via OverlayManager 2025-07-01 10:22:15 +08:00
Nick Fisher 5b41d594da on macOS/windows, always create stencil buffer by default 2025-07-01 10:22:07 +08:00
Nick Fisher 584abd6086 on macOS, always create stencil buffer by default 2025-07-01 10:21:39 +08:00
Nick Fisher 4b9c20eaa6 move set/remove stencilHighlight to View and implement via OverlayManager 2025-07-01 10:15:41 +08:00
Nick Fisher d35a7a6de2 remove uv0 requirement from unlit.mat 2025-07-01 10:15:07 +08:00
Nick Fisher 0f9d2492e6 move set/remove stencilHighlight to View and implement via OverlayManager 2025-07-01 10:13:47 +08:00
Nick Fisher 96ef070be7 add linear_depth material 2025-07-01 10:08:36 +08:00
Nick Fisher 506d2fb562 expose Material->getFeautureLevel 2025-07-01 10:07:35 +08:00
Nick Fisher 0b18caf4ff expose Engine->getSupportedFeatureLevel() 2025-07-01 10:07:10 +08:00
Nick Fisher b3b0e2bae1 Material now implements NativeHandle 2025-07-01 10:06:05 +08:00
Nick Fisher 35369b890f Camera now implements NativeHandle 2025-07-01 10:05:47 +08:00
Nick Fisher 53a2a116aa RenderTarget now implements NativeHandle 2025-07-01 10:04:33 +08:00
Nick Fisher 80ceb5988e RenderTarget now implements NativeHandle 2025-07-01 10:04:13 +08:00
Nick Fisher 9dc81781d1 (doc) debugging fix 2025-06-27 13:52:33 +08:00
Nick Fisher 3e8189ecd4 (CI) update goldens 2025-06-27 13:52:21 +08:00
Nick Fisher 31acdecedf (CI) disable overlay tests 2025-06-27 13:42:54 +08:00
Nick Fisher feeb757a10 use render thread method for creating grid overlay & reinstate overlay tests 2025-06-27 13:34:01 +08:00
Nick Fisher 1bbf9d26ac (doc): fix debugging docs 2025-06-27 11:34:24 +08:00
Nick Fisher 40e206fc94 expose setScene on View 2025-06-27 11:34:01 +08:00
Nick Fisher 48b631b0a8 add generic parameter to NativeHandle, rather than getNativeHandle() 2025-06-27 11:33:50 +08:00
Nick Fisher 5ac4da5075 (CI) add picking_tests.dart and disable overlay_tests.dart (latter seems to have some issue on Linux 2025-06-27 09:36:59 +08:00
Nick Fisher bc392bd933 use getNativeHandle for MaterialInstance 2025-06-27 09:36:20 +08:00
Nick Fisher ceba3915a7 (test) add dithering to postprocessing test 2025-06-27 09:26:26 +08:00
Nick Fisher c46ac2383c (test) add dithering to postprocessing test 2025-06-27 09:25:43 +08:00
Nick Fisher a9083d9ba0 update overlay_tests to check if CI is the problem with rendering 2025-06-26 22:30:22 +08:00
Nick Fisher d9436b8141 (CI) update goldens 2025-06-26 22:16:53 +08:00
Nick Fisher 72cc9b932a add containsChild method to ThermionAsset 2025-06-26 22:11:36 +08:00
Nick Fisher 2c7425fbdb (CI) add overlay_tests.dart 2025-06-26 22:11:13 +08:00
Nick Fisher b5e699c781 (CI) add scene_tests to CI run 2025-06-26 15:32:27 +08:00
Nick Fisher a7b0ed6f21 don't share a single material instance for all highlighted objects
destroy highlight material instances on highlight asset destroyed
expose highlight instances on Scene via getAssetForHighlight
2025-06-26 15:32:05 +08:00
Nick Fisher b5d9a06422 update goldens 2025-06-26 10:45:40 +08:00
Nick Fisher 6b9b13682b (CI) update list of tests 2025-06-26 10:31:13 +08:00
Nick Fisher fab3240ecf clamp pixel values in image conversion 2025-06-26 10:30:32 +08:00
Nick Fisher 2613ba2423 (example) fix initialInstances arg 2025-06-26 10:25:59 +08:00
Nick Fisher 85e3c98b28 (CI) update goldens 2025-06-26 10:20:10 +08:00
Nick Fisher 9d4802c270 (CI) remove update_goldens step - image artifacts are uploaded for every run, when updating goldens, edit dart.yml to point to the correct run/artifact ID 2025-06-26 10:14:43 +08:00
Nick Fisher e7227d5f91 (CI) remove update_goldens step - image artifacts are uploaded for every run, when updating goldens, edit dart.yml to point to the correct run/artifact ID 2025-06-26 10:13:36 +08:00
Nick Fisher ccc0a53abc rename numInstances to initialInstances in loadGltf methods.
when initialInstances > 0, don't wait for createInstance to be called to create corresponding GltfSceneAsset
2025-06-26 10:11:29 +08:00
Nick Fisher b983c6bb90 (CI) download goldens artifact directly 2025-06-26 09:25:16 +08:00
Nick Fisher 854f1545d3 (CI) use artifact ID for golden download 2025-06-26 09:15:12 +08:00
Nick Fisher ca110b2b01 (CI) update goldens SHA 2025-06-26 09:03:39 +08:00
Nick Fisher ced0667a21 (test) add python script to compare goldens 2025-06-26 08:48:20 +08:00
Nick Fisher 240a2d5345 (CI) add dart-tests job 2025-06-26 08:48:20 +08:00
Nick Fisher cb4479d8ce (CI) factor out shared setup into standalone action 2025-06-26 08:48:20 +08:00
Nick Fisher f4b473b9ae disable physics test in instancing 2025-06-26 08:47:22 +08:00
Nick Fisher fac0c727e4 don't track/remove assets when addToScene/removeFromScene is called 2025-06-25 16:51:21 +08:00
Nick Fisher f0cf20d904 (docs) fix links 2025-06-25 15:56:21 +08:00
Nick Fisher ebb73a29e1 (docs) add Linux docs 2025-06-25 15:54:08 +08:00
Nick Fisher e92e59fab4 don't link mikktspace on Linux 2025-06-25 15:47:20 +08:00
Nick Fisher be47ec0f8b add Linux build dockerfile 2025-06-25 15:47:20 +08:00
Nick Fisher 3657428025 (test) write PNGs, not BMP 2025-06-25 13:31:57 +08:00
Nick Fisher 33f8faac04 (CI) use xvfb 2025-06-25 12:49:55 +08:00
Nick Fisher e9f0d5b745 use OpenGL backend on Linux tests 2025-06-25 11:13:07 +08:00
Nick Fisher 682881e133 don't ignore .github 2025-06-25 11:06:55 +08:00
Nick Fisher 3e2405aa76 merge linux CI runner 2025-06-25 11:06:47 +08:00
Nick Fisher 52038084f3 (CI) fix workflow 2025-06-25 11:05:45 +08:00
Nick Fisher af9c2a93dc (Linux) remove OS check for mikktspace & geometry 2025-06-25 11:05:07 +08:00
Nick Fisher e99ccb3100 (CI) update GitHub workflow runner for Linux 2025-06-25 11:03:48 +08:00
Nick Fisher ed21eec66e pass through instance owner to FFIAsset so instances can be created on instances 2025-06-24 21:31:10 +08:00
Nick Fisher 05c62d5fa0 fix for macOS support 2025-06-24 15:39:41 +08:00
Nick Fisher bec34e5b0b (test) update image path 2025-06-24 15:34:12 +08:00
Nick Fisher 634c6d6877 (web) only requestFrame/setState when canvas is imported as widget 2025-06-24 15:33:50 +08:00
Nick Fisher b47e7f206c update BUILDING.md for Linux 2025-06-24 15:33:24 +08:00
Nick Fisher 1fe1889fa2 remove STB_IMAGE_IMPLEMENTATION (this is already linked) 2025-06-24 15:30:39 +08:00
Nick Fisher 4a43c6169a update build.dart for Linux support 2025-06-24 15:27:27 +08:00
Nick Fisher 6075608bda (CI) fix workflow 2025-06-24 15:26:46 +08:00
Nick Fisher 8a1f320bb7 remove objective_c from dev_dependencies & change test_helper to create render target without importing textures 2025-06-24 13:37:09 +08:00
Nick Fisher ed5fb03aa4 (CI) update GitHub workflow to add update-goldens 2025-06-24 13:27:33 +08:00
Nick Fisher 21ccb52ab9 fix missing includes for Linux compatibility 2025-06-24 12:30:33 +08:00
Nick Fisher ff48ce94a3 update build.dart to prepare for Linux support 2025-06-24 10:46:33 +08:00
Nick Fisher d20ff0a6f1 don't require SwapChain to be passed to viewer.render - this will just render into all registered swapchains 2025-06-24 10:36:10 +08:00
Nick Fisher c7d4d9cb33 add NativeHandle interface and refactor SwapChain to use getNativeHandle 2025-06-24 10:35:33 +08:00
Nick Fisher 9aec83fd70 throw Exception if createInstance is called on an instance and pass through isInstance/keepData flags 2025-06-24 10:22:40 +08:00
Nick Fisher 4dbd761d16 always request stencil buffer (depth24_stencil8) on macos/ios 2025-06-23 12:48:25 +08:00
Nick Fisher fc365744ef (test) add cube_texture2.svg 2025-06-23 12:47:02 +08:00
Nick Fisher 900e43b5ec (example) (web) update build_web_compilers dependency 2025-06-23 12:46:45 +08:00
Nick Fisher c78cd45b8a (example) (web) cleanup js_wasm example HTML when building for wasm 2025-06-23 12:46:18 +08:00
Nick Fisher 1268970ba7 (example) (web) cleanup js_wasm example 2025-06-23 12:45:59 +08:00
Nick Fisher f93e44abd5 (web) don't hardcore 60fps timer on web 2025-06-23 12:44:37 +08:00
Nick Fisher d41f29c06d (web) after capture is called on emscripten builds, request the render thread to exit/resume to yield to the browser so the frame is committed 2025-06-23 12:43:40 +08:00
Nick Fisher e27be37378 add mRestart flag to immediately request the thread exits to force a commit frame 2025-06-23 12:43:03 +08:00
Nick Fisher a8a7f11d44 add mRestart flag to immediately request the thread exits to force a commit frame 2025-06-23 12:42:53 +08:00
Nick Fisher c81f2f225c (test) add simple capture test 2025-06-23 12:41:56 +08:00
Nick Fisher a89c6d0eb3 update key map 2025-06-23 12:39:25 +08:00
Nick Fisher 34c9d5a279 (example) update metadata 2025-06-23 12:39:07 +08:00
Nick Fisher 57999bec3c clean up TextureProjection 2025-06-23 12:38:35 +08:00
Nick Fisher 69400f8b68 update TextureProjection to accept material instances and render multiple target entities 2025-06-23 12:38:06 +08:00
Nick Fisher 18b6b2e5f0 (web) in capture, add extra call to render a frame to flush frame callbacks 2025-06-23 12:27:05 +08:00
Nick Fisher 7e802f7b23 formatting 2025-06-23 12:25:30 +08:00
Nick Fisher ce23b9f3cd (doc) add documentation for destroyAsset instances 2025-06-23 12:25:18 +08:00
Nick Fisher 45d8c7b929 (example) add user_defines to headless example pubspec 2025-06-23 12:24:46 +08:00
Nick Fisher 7a484ee794 update light tests for IBL from manually-created texture 2025-06-23 12:23:12 +08:00
Nick Fisher 832319ee1b (test) add bounding box test to asset_tests 2025-06-23 12:22:13 +08:00
Nick Fisher 668c001b49 add inUse flag to assist with recycling gltf instances 2025-06-23 12:21:52 +08:00
Nick Fisher e503dd2e8b docstrings for GltfSceneAsset destroyInstance 2025-06-23 12:21:21 +08:00
Nick Fisher e1c34cc4d9 formatting 2025-06-23 12:21:04 +08:00
Nick Fisher b035d45ada (example) remove HTML header from picking web 2025-06-23 12:20:31 +08:00
Nick Fisher 75d34f0afb log user defines in build.dart 2025-06-23 12:20:14 +08:00
Nick Fisher d053bfd6da move showBoundingBox/hideBoundingBox implementation to ThermionViewerFFI 2025-06-23 12:19:41 +08:00
Nick Fisher 920f81c514 add flipY argument to pixelBufferToPng 2025-06-23 12:18:08 +08:00
Nick Fisher b64a505ffc formatting 2025-06-23 12:17:52 +08:00
Nick Fisher 00debf509d remove getBoundingBoxAsset and destroyBoundingBoxAsset from ThermionAsset 2025-06-23 12:17:38 +08:00
Nick Fisher 73b32f9c1e start migrating from covariant (for FFIAsset) to getNativeHandle() 2025-06-23 11:58:51 +08:00
Nick Fisher abd1a1fd55 move bounding box asset methods from ThermionAsset to ThermionViewer 2025-06-23 11:57:15 +08:00
Nick Fisher e8721b6133 more key mappings 2025-06-23 10:33:50 +08:00
Nick Fisher a01bf36576 use ENABLE_TRACING from user defines 2025-06-21 10:14:43 +08:00
Nick Fisher 5f92c7feab expose addToScene argument in interface for loadGltfFromBuffer (this was already exposed in the implementation) 2025-06-21 09:25:44 +08:00
Nick Fisher e1cb517417 allow creating more glTF instances than pre-allocated 2025-06-20 18:46:36 +08:00
Nick Fisher 37c35906d6 add propagateEvents arg to ThermionListenerWidget
expose physical/logical key maps
dont await InputHandler.handle - this no longer returns a future
2025-06-20 18:36:31 +08:00
Nick Fisher 355999562f move Axis class to own file 2025-06-20 18:35:21 +08:00
Nick Fisher c208972ed7 docstrings 2025-06-20 18:34:08 +08:00
Nick Fisher 6a7ca3cd42 add backtick key 2025-06-20 18:33:47 +08:00
Nick Fisher b6d869275a InputHandler shouldn't return Future
add mousePanSensitivity
2025-06-20 18:33:35 +08:00
Nick Fisher 64eeacc029 add missing support for Camera_getCullingProjectionMatrix 2025-06-20 12:42:32 +08:00
Nick Fisher 3783081456 in viewer, ensure onTextureUploadComplete callbacks are passed through to KTX1Bundle.createTexture 2025-06-19 11:52:44 +08:00
Nick Fisher 0a9b1a82e2 update instancing tests 2025-06-19 11:01:16 +08:00
Nick Fisher 9322122dac pass through keepData argument when loadGltfFromBuffer is called 2025-06-19 11:01:09 +08:00
Nick Fisher a823718bcd fix incorrect indexing for material instances when creating an instance 2025-06-19 10:57:54 +08:00
Nick Fisher 7446b0545a update docs 2025-06-18 14:34:03 +08:00
Nick Fisher 3c4bedd43b update headless example README 2025-06-18 13:10:49 +08:00
Nick Fisher 21e8cf0d11 add Dart/headless example 2025-06-18 13:08:51 +08:00
Nick Fisher 86e0f7740f add Fence_waitAndDestroyRenderThread 2025-06-18 13:03:34 +08:00
Nick Fisher a5a3c73708 add Fence_waitAndDestroy to TEngine.h 2025-06-18 13:02:59 +08:00
Nick Fisher a44cb9a9cc add Fence_waitAndDestroy to TEngine.h 2025-06-18 13:02:48 +08:00
Nick Fisher 6f97bf3993 update build.dart to set ENABLE_TRACING based on tracing property from user defines 2025-06-18 13:02:24 +08:00
Nick Fisher 42f9538040 implement TSkybox and use setColor method to set the background color, rather than the image 2025-06-18 13:01:25 +08:00
Nick Fisher df393b075b update bindings for Fence methods 2025-06-18 12:11:36 +08:00
Nick Fisher 13f9a8370b add iOS build instructions 2025-06-18 10:59:04 +08:00
Nick Fisher 558978a0f2 add makeUint8List helper method for ffi/jsinterop 2025-06-17 18:01:18 +08:00
Nick Fisher a29b194612 ensure highlight entities don't cast/receive shadows 2025-06-17 17:29:40 +08:00
Nick Fisher 3e04bf427f allow passing reflection texture separately from irradiance when calling loadIblFromTexture 2025-06-17 14:13:19 +08:00
Nick Fisher 65ca59ff22 merge native setImage with setImageWithDepth 2025-06-17 13:25:53 +08:00
Nick Fisher a91aaae131 formatting 2025-06-17 11:51:37 +08:00
Nick Fisher 71bae61015 add loadIblFromTexture method 2025-06-17 11:51:07 +08:00
Nick Fisher 288acb019e add getBackgroundImage to ThermionViewerFFI 2025-06-17 11:49:16 +08:00
Nick Fisher b9354531b2 add cubemap methods to BackgroundImage 2025-06-17 11:26:27 +08:00
Nick Fisher 388b8556e5 fix incorrect index when creating texture from Ktx1Bundle 2025-06-12 11:54:10 +08:00
Nick Fisher 59d9d87d2f remove unused headers 2025-06-12 11:47:23 +08:00
Nick Fisher d5824466f7 update generated bindings 2025-06-12 11:39:09 +08:00
Nick Fisher 3e11f09d63 update BUILDING.md 2025-06-12 11:38:25 +08:00
Nick Fisher 6bbab332be rename assetId to asset-id in ffigen config 2025-06-12 11:38:08 +08:00
Nick Fisher 85b86c5f13 formatting 2025-06-12 11:37:45 +08:00
Nick Fisher d8652e8709 formatting 2025-06-12 11:37:29 +08:00
Nick Fisher fe5279f942 don't free Int32List for childEntities, stackRestore takes care of this 2025-06-12 11:37:18 +08:00
Nick Fisher 828354abe5 clean up 2025-06-12 11:36:23 +08:00
Nick Fisher 48d9d6751b render() method on viewer now requires a SwapChain argument 2025-06-12 11:36:08 +08:00
Nick Fisher 4bde3d34cf (test) add test to create indirect light from irradiance texture 2025-06-12 11:34:17 +08:00
Nick Fisher 7f2ad7c4e4 (test) rename background_tests.dart to image_tests.dart 2025-06-12 11:33:57 +08:00
Nick Fisher 47807d560f separate native methods for creating IBL from irradiance texture and harmonics 2025-06-12 11:33:38 +08:00
Nick Fisher ad26fc4563 add Dart IndirectLight and Ktx1Bundle classes, and separate KTX decoding from skybox/IBL creation 2025-06-12 11:31:44 +08:00
Nick Fisher f252c86152 update image material to support cubemaps 2025-06-12 08:40:28 +08:00
Nick Fisher e5bcde3ade (web) update bindings 2025-06-11 11:13:43 +08:00
Nick Fisher 9436666d34 (example) update quickstart web to import canvas as widget 2025-06-11 11:08:31 +08:00
Nick Fisher 32fe54ac09 (web) on Emscripten builds, use static global wrapper function for texture upload complete callbacks (this is needed because all callbacks need to be proxied to the main thread 2025-06-11 11:08:13 +08:00
Nick Fisher 0461bb364a use getPrimitiveCount method on FilamentApp, rather than direct FFI method 2025-06-11 09:52:57 +08:00
Nick Fisher f78c6f258f add test for getBoundingBox 2025-06-11 09:51:24 +08:00
Nick Fisher b0796f493f (test) move IBL tests to light_tests 2025-06-11 09:51:14 +08:00
Nick Fisher 8998f1f740 add RenderableManager_getBoundingBox 2025-06-11 09:50:48 +08:00
Nick Fisher 6362efcd61 add implementations for getPrimitiveCount/getBoundingBox on FFIFilamentApp 2025-06-11 09:50:35 +08:00
Nick Fisher dc5c1161cc add setMaterialInstanceAt to FilamentApp interface 2025-06-11 09:50:02 +08:00
Nick Fisher 3e6f95e0bf add removeEntity method on Scene 2025-06-11 09:49:05 +08:00
Nick Fisher f053c2f852 add removeEntity method on Scene 2025-06-11 09:48:44 +08:00
Nick Fisher 8f1da5e7bd separate skybox/ibl creation from KTX decoding 2025-06-11 09:48:17 +08:00
Nick Fisher 641d92515e move VoidCallback typedef to APIBoundaryTypes (now used outside the render thread header for texture upload callbacks) 2025-06-11 09:45:23 +08:00
Nick Fisher d447fb8e2a add RenderableManager_getBoundingBox 2025-06-11 09:44:46 +08:00
Nick Fisher ac87420a87 add setPriority to FilamentApp interface 2025-06-10 11:49:17 +08:00
Nick Fisher 5669ac5c55 Dart wrappers for View/Scene are now stateful 2025-06-10 11:48:31 +08:00
Nick Fisher ae9ce197c1 move setStencilHighlight/removeStencilHighlight to Scene 2025-06-10 10:27:03 +08:00
Nick Fisher 37c67c2da8 (macos) create render target texture with isStencil:false 2025-06-10 10:24:01 +08:00
Nick Fisher 66d3bf65fd add view test for multiple views rendering into the same render target 2025-06-10 09:08:30 +08:00
Nick Fisher dba40fb82b update instancing tests 2025-06-09 18:28:58 +08:00
Nick Fisher 95db6d7ebb update generated bindings 2025-06-09 18:28:43 +08:00
Nick Fisher fef48940fc add implementation methods for getPrimitiveCount, setMaterialInstancesFromMap, getMaterialInstancesAsMap and setMaterialInstanceForAll 2025-06-09 18:28:33 +08:00
Nick Fisher 4086c9bd01 add interface methods for getPrimitiveCount, setMaterialInstancesFromMap, getMaterialInstancesAsMap and setMaterialInstanceForAll 2025-06-09 18:26:36 +08:00
Nick Fisher 928517f80f update gitignore with generated Swift dylib 2025-06-09 18:25:53 +08:00
Nick Fisher 4a9b91c411 (test) update helper to add createStencilBuffer flag 2025-06-09 18:25:39 +08:00
Nick Fisher 9054879722 update Swift bindings and remove dylib from repository (should be recompiled when running via CI/CD?) 2025-06-09 18:25:18 +08:00
Nick Fisher 4c95bc5b70 (macos) add isStencil argument for creating depth texture on macOS (if true, creates texture with .depth24Unorm_stencil8 2025-06-09 18:24:15 +08:00
Nick Fisher 8866ffe210 (test) update helper to add createStencilBuffer flag 2025-06-09 18:23:22 +08:00
Nick Fisher c33eaef713 replace direct FFI View_ calls with calls to corresponding (Dart) methods on View 2025-06-09 18:18:58 +08:00
Nick Fisher 78e14574ef split stencil/depth tests from unlit material tests 2025-06-09 18:15:17 +08:00
Nick Fisher 073976b40e logging 2025-06-09 18:13:54 +08:00
Nick Fisher 6d0844f873 logging 2025-06-09 18:13:44 +08:00
Nick Fisher 983d1373ba logging 2025-06-09 18:13:35 +08:00
Nick Fisher 0dd64a07bb add helper method to convert between TStencilFace and MaterialInstance::StencilFace (not strictly necessary, but will help if something upstream changes in future 2025-06-09 18:12:17 +08:00
Nick Fisher 6055bd3fa7 fix FFIMaterial so it correctly translates between StencilFace (Dart) and TStencilFace (Dart FFI) enums 2025-06-09 18:10:07 +08:00
Nick Fisher f3a576005a expose setShadowsEnabled method on View/FFIView 2025-06-09 18:09:27 +08:00
Nick Fisher ff559997dd (web) regenerate JS bindings 2025-06-05 21:52:47 +08:00
Nick Fisher 79fea25d1b manually edit JS bindings to remove internal (Dart) struct members and fix TFogOptions 2025-06-05 16:42:28 +08:00
Nick Fisher 9ae7c784df pass TFogOptions by value, not pointer, and rearrange struct fields to minimize alignment issues 2025-06-05 16:41:08 +08:00
Nick Fisher acf03ea0c7 pass TFogOptions by value, not pointer, and rearrange struct fields to minimize alignment issues 2025-06-05 16:40:53 +08:00
Nick Fisher a9553da1d4 (build) remove libpng 2025-06-05 10:12:41 +08:00
Nick Fisher fc4686b20f add documentation for Scene 2025-06-04 17:44:24 +08:00
Nick Fisher ab4743da90 pass keepData flag to instances of FFIAsset when creating geometry 2025-06-04 11:14:02 +08:00
Nick Fisher 7406662853 add nullptr check when loading gltf assets 2025-06-04 11:13:39 +08:00
Nick Fisher aa2f19442b surround frame request hooks with try/catch, and add a check to avoid concurrency exceptions when adding/removing hooks 2025-06-04 11:13:15 +08:00
Nick Fisher cc99905eb8 pass through keepData flag when creating geometry via viewer 2025-06-04 11:11:42 +08:00
Nick Fisher 1d697037c0 gltf animation names are immutable, so cache these in a local copy in FFIAsset 2025-06-04 11:10:45 +08:00
Nick Fisher c024efb8cd store reference to keepData in each FFIAsset and throw exception if an instance is attempted to be created when keepData is false 2025-06-04 11:09:28 +08:00
Nick Fisher 150c0227c8 (test) remove group from asset_tests 2025-06-04 11:08:13 +08:00
Nick Fisher e594a42496 add test for create/destroy geometry instances 2025-06-04 11:07:58 +08:00
Nick Fisher c484eeb37f when destroying an asset, remove/destroy instances before destroying the parent asset 2025-06-04 11:07:21 +08:00
Nick Fisher 655ba89b0f logging 2025-06-04 11:05:19 +08:00
Nick Fisher 840f3599e7 logging 2025-06-04 11:04:52 +08:00
Nick Fisher d0da7f49f3 when destroying a SceneAsset, if the object is an instance, call destroyInstance on the owner of instance rather than deleting the object directly 2025-06-04 10:48:07 +08:00
Nick Fisher 886a4a37aa (test) log to stdout by default when using TestHelper 2025-06-04 10:46:55 +08:00
Nick Fisher 6db82d00c2 don't call removeAnimationComponent in viewer (moved to FilamentApp.destroyAsset) 2025-06-03 16:40:50 +08:00
Nick Fisher 0fb4fd0004 (web) use mimalloc as default allocator on emscripten builds and set SAFE_HEAP to 1 by default for debug builds 2025-06-03 16:40:12 +08:00
Nick Fisher e147e59d8d don't call endFrame() unless beginFrame() was called
only use condition_variable on non-emscripten builds
2025-06-03 16:39:04 +08:00
Nick Fisher 28aef7e5cc when destroying assets, remove animation component in FilamentApp, not viewer 2025-06-02 14:58:52 +08:00
Nick Fisher b1617004d7 add missing EMSCRIPTEN_KEEPALIVE from Texture_generateMipMapsRenderThread 2025-06-02 14:58:11 +08:00
Nick Fisher 32b6b1c227 (flutter) add zero size check in TextureWidget 2025-06-02 12:58:53 +08:00
Nick Fisher 1c500fe925 require dispose() on InputHandlerDelegate and update sample implementations 2025-06-02 12:58:26 +08:00
Nick Fisher 3fd15ab91b (flutter) add zero size check for texture descriptors 2025-06-02 12:58:11 +08:00
Nick Fisher 2191f9d44b require dispose() on InputHandlerDelegate and update sample implementations 2025-06-02 12:57:45 +08:00
Nick Fisher 87b63301f2 require dispose() on InputHandlerDelegate and update sample implementations 2025-06-02 12:57:22 +08:00
Nick Fisher 0d5b42c908 add Char to js_interop malloc 2025-06-02 12:15:35 +08:00
Nick Fisher 12e2dca873 change wireframe camera geometry 2025-06-02 12:14:55 +08:00
Nick Fisher 8eae6bf90c add flags to pixelBufferToPng for alpha/float 2025-06-02 12:14:40 +08:00
Nick Fisher 873244879f when batch is true in DelegateInputHandler, filter simultaneous keydown/keyup 2025-06-02 12:14:05 +08:00
Nick Fisher 2ab1732b6b add synthesized property to KeyEvent and add additional keys 2025-06-02 12:12:51 +08:00
Nick Fisher 5eb83a80b3 formatting 2025-06-02 12:08:26 +08:00
Nick Fisher 7141a01101 use render thread method for resetting to rest pose 2025-06-02 11:52:41 +08:00
Nick Fisher 24aaffda9c lock mutex when setting animations manually via AnimationManager 2025-06-02 11:52:08 +08:00
Nick Fisher 82aba605f9 add Texture_generateMipMapsRenderThread, AnimationManager_resetToRestPoseRenderThread 2025-06-02 11:51:43 +08:00
Nick Fisher 7b80723560 add Texture_generateMipMapsRenderThread, AnimationManager_resetToRestPoseRenderThread 2025-06-02 11:51:19 +08:00
Nick Fisher 39a302c23e remove comments 2025-06-02 11:50:26 +08:00
Nick Fisher 059926fe98 add generateMipmapsRenderThread 2025-06-02 10:44:45 +08:00
Nick Fisher 3c9b607109 add geometry tests for destroyAssets 2025-06-02 10:13:08 +08:00
Nick Fisher 70e2933c4b track geometry assets internally to ensure they are destroyed when destroyAssets is called 2025-06-02 10:09:58 +08:00
Nick Fisher 4fb85eb45a don't throw exception on failure to remove animation component 2025-05-31 21:58:32 +08:00
Nick Fisher afecacfcf0 getChildEntity in FFIAsset should invoke FilamentApp method, not direct binding method 2025-05-31 11:25:24 +08:00
Nick Fisher 2f7f363db9 pass shared NameComponentManager to gltfio AssetLoader 2025-05-31 11:21:57 +08:00
Nick Fisher 7f0ec01937 change RenderThread warning from Log to TRACE 2025-05-30 14:35:48 +08:00
Nick Fisher ccdf2ecda6 (flutter) better synchronization in ThermionTextureWidget with presentation deadline 2025-05-30 14:35:24 +08:00
Nick Fisher 5f9a7bb959 remove errant comment 2025-05-29 22:30:00 +08:00
Nick Fisher 764fea836b move tests to unlit_material_tests.dart 2025-05-29 22:29:04 +08:00
Nick Fisher 27d6bd0f4a update projection tests to use aspect-ratio other than 1 2025-05-29 22:28:50 +08:00
Nick Fisher 7e810b8265 remove old tests 2025-05-29 22:27:39 +08:00
Nick Fisher 6ad3bfab13 remove old material_tests.dart 2025-05-29 22:27:31 +08:00
Nick Fisher 5ed00164a9 (web) expose HEAPF32 2025-05-29 22:26:59 +08:00
Nick Fisher 86894cf583 add alpha/requireAlpha argument when decoding images
remove size checks from setImage (we are assuming the caller knows the correct size)
This also adds some monkey-patch methods to js_interop to convert Float32List to a UInt8List (but use this with care, because it will only work for emscripten-allocated objects)
2025-05-29 22:26:42 +08:00
Nick Fisher c789e75af5 (web) fix casing for generateMipMaps 2025-05-29 19:27:22 +08:00
Nick Fisher 6ad76b6217 add stb_image.h 2025-05-29 19:02:35 +08:00
Nick Fisher 2e097f7ec6 (CI) run macos/web samples separately 2025-05-29 18:57:53 +08:00
Nick Fisher beeb45609c don't take reference to Builder 2025-05-29 18:57:01 +08:00
Nick Fisher 94eacec27e Texture improvements: generateMipmaps(), add levels to createTexture, tests to check auto mip level selection 2025-05-29 18:38:57 +08:00
Nick Fisher 11f7ac459b separate material_tests into ubershader & unlit 2025-05-29 18:02:21 +08:00
Nick Fisher afd47f9b24 merge test/example assets 2025-05-29 17:58:13 +08:00
Nick Fisher aab2b0b769 (web) update emcc flags 2025-05-28 21:54:31 +08:00
Nick Fisher ffc7717149 (web) add explicit check for failure to create context 2025-05-28 21:54:03 +08:00
Nick Fisher ff5921a505 remove unused StreamBufferAdapter 2025-05-28 21:52:53 +08:00
Nick Fisher 45c7831a17 replace libpng with stb_image for Image_decode 2025-05-28 21:51:56 +08:00
Nick Fisher fcf57e8850 fix missing return value in EntityManager_createEntity 2025-05-28 21:48:24 +08:00
Nick Fisher a875f370e5 remove logging 2025-05-28 18:41:02 +08:00
Nick Fisher b00f37ddaa (web) remove asTypedList from generated JS bindings (replaced by equivalent in js_interop.dart 2025-05-28 11:21:48 +08:00
Nick Fisher a98d7550ae (web) add asTypedList extension for Pointer<Float>/Float32List 2025-05-28 10:49:44 +08:00
Nick Fisher b12dc80cfd (flutter) (web) only set position/zIndex for canvas if createCanvas is true 2025-05-28 10:48:39 +08:00
Nick Fisher f7d6d4786a remove asset from internal list before destroying 2025-05-28 10:48:10 +08:00
Nick Fisher 5db9fe2c9e disable initial clear color (blue) for gl canvas on web 2025-05-28 10:47:44 +08:00
Nick Fisher d298b0d091 add decodeToTexture static helper method to Texture 2025-05-28 10:47:21 +08:00
Nick Fisher 4a7a366fc6 add setTransform/getWorldTransform to FilamentApp 2025-05-28 10:47:00 +08:00
Nick Fisher c6ceea4f8b update generated bindings 2025-05-24 16:38:21 +08:00
Nick Fisher 679af95901 allow directly creating an entity and setting transform 2025-05-24 16:34:47 +08:00
Nick Fisher 1e812ebe93 allow directly creating an entity and setting transform 2025-05-24 16:33:58 +08:00
Nick Fisher 75a9950909 update generated bindings 2025-05-24 15:05:29 +08:00
Nick Fisher 81fb0fb583 add setFogOptions 2025-05-24 15:05:03 +08:00
Nick Fisher 4d6c008299 regenerate JS bindings 2025-05-24 10:54:49 +08:00
Nick Fisher 4505cbe325 add missing setExposure methods + reinstate camera tests 2025-05-24 10:51:56 +08:00
Nick Fisher 60cfe32672 (CI) explicitly specify arm64 for runner 2025-05-23 17:48:55 +08:00
Nick Fisher 0decb6b9f1 upload build.log on test failure 2025-05-23 17:41:51 +08:00
Nick Fisher d799ef0ca0 comment out Dart action (needs software rasterizer or self-hosted runner with GPU)
add basic flutter build for example projects
2025-05-23 17:33:37 +08:00
Nick Fisher 5a72bc835d use flutter pub get before attempting to run with dart 2025-05-23 17:11:59 +08:00
Nick Fisher 3e44716e8c try and use Dart path directly 2025-05-23 17:09:51 +08:00
Nick Fisher bf295394a8 try and use Dart path directly 2025-05-23 17:06:45 +08:00
Nick Fisher 64bc7f8bf3 update GitHub actions to use flutter action 2025-05-23 17:03:07 +08:00
Nick Fisher 63ba231996 update GitHub actions to remove upload logs step (unavailable on macos?) 2025-05-23 16:59:28 +08:00
Nick Fisher 562c221461 update GitHub actions to remove upload logs step (unavailable on macos?) 2025-05-23 16:58:48 +08:00
Nick Fisher f123bbf930 update GitHub actions 2025-05-23 16:57:53 +08:00
Nick Fisher 1765350cbe update GitHub actions to run tests on macos 2025-05-23 16:50:13 +08:00
Nick Fisher 94683ab5a9 (test) ensure aspect ratio is correctly set if viewport is not square 2025-05-23 16:28:32 +08:00
Nick Fisher 5a74345fe1 specify texture flags for render target in flutter 2025-05-23 16:28:09 +08:00
Nick Fisher 195a625738 when getMaterialInstance/setMaterialInstance are called, if entity is not renderable, return false
if no entity is passed, iterate through all entities and use the first renderable entity
2025-05-23 16:27:38 +08:00
Nick Fisher 725f36a860 (test) use RGBA32F when creating render target in TestHelper 2025-05-22 15:23:30 +08:00
Nick Fisher 51212bdeed (test) cleanup imports 2025-05-22 15:22:32 +08:00
Nick Fisher 96694be017 remove register/unregister swapchain/view in TextureProjection
since we are rendering each view separately, this is no longer necessary
2025-05-22 15:22:15 +08:00
Nick Fisher a31f11151e check for beginFrame returning false in project() and correctly calculate numChannels/channelSize 2025-05-22 15:19:03 +08:00
Nick Fisher 10136c8cde use flush() instead of directly calling executeRenderThread (wasm) or flushAndWait (native) 2025-05-22 15:18:19 +08:00
Nick Fisher c712804bb1 add createLight method to FilamentApp 2025-05-22 15:09:36 +08:00
Nick Fisher 1373ce5a32 use flush() instead of manually invoking different methods for wasm/native 2025-05-22 15:08:29 +08:00
Nick Fisher 1b3d46533c remove unnecessary import 2025-05-22 15:08:02 +08:00
Nick Fisher 5733bc125b add addEntity method to Scene 2025-05-22 15:07:43 +08:00
Nick Fisher 943de8f77b add createCamera method to FilamentApp 2025-05-22 15:07:23 +08:00
Nick Fisher 9a4fd1141e remove logging 2025-05-22 15:06:27 +08:00
Nick Fisher 2bf77f123f remove unused sampledDepth parameter from capture_uv material 2025-05-22 15:03:52 +08:00
Nick Fisher 9785576866 reinstate View tests 2025-05-22 15:03:22 +08:00
Nick Fisher 3007dec127 TextureProjection now makes a separate render pass for each View.
This is needed because changing material properties between beginFrame/endFrame is unsupported
2025-05-22 15:03:06 +08:00
Nick Fisher 1008452198 (test) formatting 2025-05-21 13:16:20 +08:00
Nick Fisher 1f58c13179 (test) formatting 2025-05-21 13:16:06 +08:00
Nick Fisher 5ce2efa638 (web) remove console logging 2025-05-21 13:15:43 +08:00
Nick Fisher e75805ba06 change output dir for generated swift lib 2025-05-21 13:15:14 +08:00
Nick Fisher 73f04eb0d4 update test helper setup for new objective_c package 2025-05-21 13:14:46 +08:00
Nick Fisher 097d991ea8 move precompiled Swift lib to test/generated and add precompiled objc 2025-05-21 13:14:31 +08:00
Nick Fisher 5cf494def9 remove old input handler test 2025-05-21 12:03:20 +08:00
Nick Fisher 23d6e3a819 (example) update picking example 2025-05-21 12:02:29 +08:00
Nick Fisher 9a6bacc73f pass both logical key & physical key to input handler on keyboard keypress 2025-05-21 12:01:50 +08:00
Nick Fisher e432b0be1d update tests 2025-05-21 11:58:32 +08:00
Nick Fisher 2dad04a354 (examples) remove logging 2025-05-20 14:57:41 +08:00
Nick Fisher 1fb68b20e9 separate Gltf/Morph/BoneAnimationComponentManager definitions
move gltf animation instantiation to GltfAnimationComponentManager (this helps ensure we are creating the component on the correct entity)
2025-05-20 14:57:26 +08:00
Nick Fisher d61723dee2 update Emscripten build instructions for macOS compat 2025-05-18 15:13:02 +08:00
Nick Fisher 1afd5ff257 clean up FixedOrbitCameraDelegate 2025-05-18 15:11:52 +08:00
Nick Fisher 04b8b333d4 update materials_and_textures sample 2025-05-18 15:11:52 +08:00
Nick Fisher fdd3853121 add await to inputHandler calls in ThermionListenerWidget 2025-05-18 15:11:52 +08:00
Nick Fisher bdba92c842 set emscripten main thread to nullptr when RenderThread is stopped 2025-05-18 15:11:52 +08:00
Nick Fisher 66f3e20489 copy input events before passing to delegate 2025-05-18 15:11:52 +08:00
Nick Fisher 871a327d99 implement js_interop withUint32Callback 2025-05-18 15:11:52 +08:00
Nick Fisher c53266f12f move ThermionFlutterWebOptions to platform_interface package 2025-05-18 15:11:52 +08:00
Nick Fisher 11ff6c9053 remove TMaterialKey struct and pass directly as function params 2025-05-18 15:11:50 +08:00
Nick Fisher d392daa2e6 fix Makefile 2025-05-18 15:09:05 +08:00
Nick Fisher fc75aab94b add bindings for View_pickRenderThread 2025-05-18 15:09:05 +08:00
Nick Fisher 760ae8ed8b add makeInt32List method (to create an Int32List actually backed by heap-allocated memory 2025-05-18 15:09:05 +08:00
Nick Fisher 25ada92574 add View_pickRenderThread method (only used in WASM builds so we can proxy the callback to the main thread 2025-05-18 15:09:05 +08:00
Nick Fisher 12c8031f2b update JS bindings 2025-05-18 15:09:04 +08:00
Nick Fisher 8c78e8e629 update JS interop to accept requestId for VoidCallback 2025-05-18 15:09:03 +08:00
Nick Fisher dc5cdcb7e1 update all void callbacks to accept an integer requestId 2025-05-18 15:08:47 +08:00
Nick Fisher 383fc221d9 add web docs 2025-05-18 15:08:47 +08:00
Nick Fisher e4942bad2f add web docs 2025-05-18 15:08:47 +08:00
Nick Fisher 460000308a remove custom camera delegate 2025-05-18 15:08:47 +08:00
Nick Fisher 826a22f348 wip 2025-05-18 15:08:45 +08:00
Nick Fisher 43442e10de update picking index.html 2025-05-18 14:46:56 +08:00
Nick Fisher b710e0ace3 regenerate JS bindings 2025-05-18 14:46:48 +08:00
Nick Fisher b0087d8d54 rename loadResource in ThermionFlutterWeb 2025-05-18 14:46:39 +08:00
Nick Fisher dcef1a5749 symlink cube_with_morph_targets.glb to example assets 2025-05-17 22:23:39 +08:00
Nick Fisher 1c0a7f6b1e update BUILDING.md 2025-05-17 22:23:00 +08:00
Nick Fisher 2444e9a980 add example animations project 2025-05-17 22:19:47 +08:00
Nick Fisher 417ee4648f (flutter) rename resourceLoader to loadResource and don't pass to ThermionViewerFFI 2025-05-17 22:19:09 +08:00
Nick Fisher 4b2342979f update tests + bindings 2025-05-17 21:52:21 +08:00
Nick Fisher ee306549d8 rename relativeResourcePath to resourceUri
move resource loader from viewer to FilamentApp
2025-05-17 21:51:51 +08:00
Nick Fisher d3ec825688 rename relativeResourcePath to resourceUri
move resource loader from viewer to FilamentApp
2025-05-17 21:50:58 +08:00
Nick Fisher fe11479b08 remove relativeResourcePath from gltf resource loading;
all external resources should be added on the Dart side, Filament should never attempt to load these directly from the filesystem.
relativeResourcePath (called gltfPath on the Filament side) is only used for desktop loading, so this is now irrelevant.
Note that Filament must be compiled with GLTFIO_USE_FILESYSTEM=0
2025-05-17 21:48:18 +08:00
Nick Fisher c98e604e76 split animation components into GltfAnimation/MorphAnimation/BoneAnimation 2025-05-17 10:11:55 +08:00
Nick Fisher f9d09e17ef return false from AnimationManager_ methods if provided sceneAsset is not a glTF asset
rename playAnimation to playGltfAnimation etc where appropriate
2025-05-17 10:06:12 +08:00
Nick Fisher 27eb117466 remove old WASM viewer 2025-05-17 10:04:49 +08:00
Nick Fisher 46e87fb6a4 add sources to native CMakeLists.txt 2025-05-17 10:04:33 +08:00
Nick Fisher 6d95180870 remove old JS shim/bridge classes 2025-05-17 10:04:19 +08:00
Nick Fisher c7ad70b81c add glTF animation track to test cube 2025-05-17 10:03:51 +08:00
Nick Fisher 62bf3876f8 update materials_and_textures example 2025-05-13 18:06:33 +08:00
Nick Fisher cff0893d53 await future in ThermionListenerWidget 2025-05-13 16:42:50 +08:00
Nick Fisher 6135c5eecc (android) use flutter.ndkVersion in thermion_flutter build.gradle 2025-05-13 16:42:32 +08:00
Nick Fisher 170fb4bf6d removing processing check in DelegateInputHandler 2025-05-13 16:41:58 +08:00
Nick Fisher 2f5ce65684 add JNI_OnLoad to Android library. This is needed to manually call ::filament::backend::VirtualMachineEnv::JNI_OnLoad 2025-05-12 14:15:11 +08:00
Nick Fisher bb272f2579 update web input handler 2025-05-12 10:15:41 +08:00
Nick Fisher 56e132ec15 update picking example for web 2025-05-12 10:15:27 +08:00
Nick Fisher 5379ae7d74 update js/wasm example pubspec 2025-05-12 10:15:06 +08:00
Nick Fisher 9d7e96e996 update Makefile for web 2025-05-12 10:14:51 +08:00
Nick Fisher 8bbe2f0dfb remove manual stack allocation/copy for struct args 2025-05-12 10:14:41 +08:00
Nick Fisher 0794e0ad84 comments 2025-05-12 09:36:12 +08:00
Nick Fisher 3f0f15b441 add _ready check to FixedOrbitCameraDelegate 2025-05-10 12:16:49 +08:00
Nick Fisher 90f17e3bc9 rename camera_manipulation sample to picking 2025-05-10 12:16:16 +08:00
Nick Fisher 8311c95100 update delegates to accept a List<InputEvent>, not Set 2025-05-10 09:08:59 +08:00
Nick Fisher 97da08ae8b explicitly state type 2025-05-10 09:07:52 +08:00
Nick Fisher 12a96cceee InputHandler now accepts a List of events, not a Set
add batch argument to DelegateInputHandler
2025-05-10 09:07:28 +08:00
Nick Fisher fac7e9a894 transformToUnitCube returns bool (false when transform instance can't be found) 2025-05-10 09:06:53 +08:00
Nick Fisher c47cfe9b57 transformToUnitCube returns bool (false when transform instance can't be found) 2025-05-10 09:04:06 +08:00
Nick Fisher 671949a5cd transformToUnitCube returns bool (false when transform instance can't be found) 2025-05-10 09:03:46 +08:00
Nick Fisher 602e220024 update ThermionListenerWidget to use newer InputHandler interface 2025-05-09 11:24:28 +08:00
Nick Fisher ebab1f528d only set mRendered to true when a frame was actually rendered 2025-05-09 11:23:13 +08:00
Nick Fisher 4a5a1d0157 remove debug printing 2025-05-09 11:22:25 +08:00
Nick Fisher 906f5bf931 remove redundant make_render_callback_fn_pointer definition 2025-05-09 11:22:08 +08:00
Nick Fisher 9ef6d46958 update iOS/Android/MacOS project files 2025-05-09 11:21:47 +08:00
Nick Fisher 50c1c871a8 return false from RenderTicker when frame skipped 2025-05-09 11:20:21 +08:00
Nick Fisher 8a6ba637a7 store last render time in RenderTicker 2025-05-09 11:19:13 +08:00
Nick Fisher abde201bda update bindings 2025-05-09 11:18:33 +08:00
Nick Fisher 428a613b65 update iOS build instructions 2025-05-09 11:18:20 +08:00
Nick Fisher 1ddeac2d31 refactor InputHandler interface/DelegateInputHandler implementation 2025-05-09 11:18:07 +08:00
Nick Fisher 7961ed06f7 exclude libfilamat from iOS and gltfio from iOS/Android 2025-05-09 11:15:20 +08:00
Nick Fisher cedcb45484 feat!: change default near/far to 0.1/100.0 2025-05-08 17:27:49 +08:00
Nick Fisher cf6abdcf01 exclude libgltfio from Android (only gltfio_core is available) 2025-05-08 17:27:23 +08:00
Nick Fisher 04d3aee2e9 don't actually invoke markTextureFrameAvailable on Android (the swapchain is attached to the window so this is not necessary 2025-05-08 17:25:54 +08:00
Nick Fisher 5af18cb99b [android] update docs 2025-05-08 16:48:01 +08:00
Nick Fisher 87396ec859 [android] remove legacy references to ResourceBuffer/RenderCallback and switch from JNA to JNI for getting native window handle 2025-05-08 16:47:39 +08:00
Nick Fisher 2f16908992 feat! js_interop improvements 2025-05-07 17:06:38 +08:00
Nick Fisher 63e2dcd0ca add getter for Aabb3 directly (getBoundingBox) on ThermionAsset 2025-05-07 16:53:16 +08:00
Nick Fisher afd8bff58e remove superseded Linux resource loader 2025-05-07 16:53:16 +08:00
Nick Fisher 2ab56b86bc remove old CMake script 2025-05-07 16:53:16 +08:00
Nick Fisher e9628511fc remove C++ includes from C headers 2025-05-07 16:53:15 +08:00
Nick Fisher 3402c02d6a Update README.md 2025-04-19 12:38:22 +08:00
Daniel Breedeveld fdf278cd79 docs: fix typo 'applicaiton' in index.mdx 2025-04-19 12:37:51 +08:00
Nick Fisher e5b75debed add test for destroy camera 2025-04-19 09:50:18 +08:00
Nick Fisher eedfbbb934 remove unused material input src files from native CMakeLists 2025-04-19 09:49:59 +08:00
Nick Fisher 2a5a149e83 update bindings 2025-04-19 09:49:35 +08:00
Nick Fisher 4cb725d47e add Engine_destroyCamera 2025-04-19 09:49:19 +08:00
Nick Fisher 8228486ef3 remove asset from internal list when destroyAsset is called 2025-04-19 09:48:17 +08:00
Nick Fisher c66dc40bab separate getter/create method for boundingBoxAsset 2025-04-19 09:47:18 +08:00
Nick Fisher 4f1a9fb0d5 update stub + generated bindings 2025-04-17 13:36:16 +08:00
Nick Fisher 454ec14b40 allow relativeResourcePath to be null for loadGltfFromBuffer 2025-04-17 13:36:02 +08:00
Nick Fisher b4f3d865b4 call updateRenderOrder when setRenderable is called on View 2025-04-17 13:35:41 +08:00
Nick Fisher 86779cb629 reinstate GizmoInputHandler 2025-04-17 13:35:22 +08:00
Nick Fisher e1d5d14ff7 add RenderTarget_destroyRenderThread 2025-04-17 13:35:07 +08:00
Nick Fisher 1be1979c05 rename requestAnimationFrame to requestFrame 2025-04-17 13:34:18 +08:00
Nick Fisher 2b6693a826 change default PixelDataType to FLOAT for capture() 2025-04-17 13:32:35 +08:00
Nick Fisher 7d369ad813 change setBoundingBoxVisibility to getBoundingBoxAsset 2025-04-17 13:32:16 +08:00
Nick Fisher 81a28a2f2e change setBoundingBoxVisibility to getBoundingBoxAsset 2025-04-17 13:31:59 +08:00
Nick Fisher 6b008bd433 change setBoundingBoxVisibility to getBoundingBoxAsset 2025-04-17 13:31:47 +08:00
Nick Fisher 241c0fe07c recompile materials 2025-04-16 19:08:55 +08:00
Nick Fisher 12b6a8c8a5 use render thread methods for all async gltf loading 2025-04-16 19:08:34 +08:00
Nick Fisher 426d6c4ed6 use render thread methods for all async gltf loading 2025-04-16 19:07:55 +08:00
Nick Fisher 4002425c0d add withFloatCallback handler 2025-04-16 19:07:47 +08:00
Nick Fisher 230bb5f9f6 use render thread methods for all async gltf loading 2025-04-16 19:07:31 +08:00
Nick Fisher 8a35060653 write sources to temp dir for Windows 2025-04-16 18:05:03 +08:00
Nick Fisher 2b00d374e0 update generated bindings 2025-04-16 18:01:47 +08:00
Nick Fisher da87442b3a add async gltf test 2025-04-16 18:01:31 +08:00
Nick Fisher 3c68731fe0 ensure __FILENAME__ is defined even if ENABLE_TRACING is off 2025-04-16 18:00:50 +08:00
Nick Fisher ef775b2e2c add GltfResourceLoader_asyncBeginLoadRenderThread 2025-04-16 18:00:31 +08:00
Nick Fisher 0759590f4c test fix 2025-04-16 18:00:17 +08:00
Nick Fisher e7092c416b call render thread method for asyncBeginLoad 2025-04-16 18:00:06 +08:00
Nick Fisher f272410803 update ffigen/objective_c dependencies 2025-04-16 17:59:46 +08:00
Nick Fisher b128f385e5 unused unlit material 2025-04-16 17:23:56 +08:00
Nick Fisher a4227df098 test cleanup 2025-04-16 17:23:56 +08:00
Nick Fisher 230af0ae17 remove unused import 2025-04-16 17:23:55 +08:00
Nick Fisher aeb644cf16 make swapChain an optional parameter when calling capture() (if not specified, first swapchain will be used) 2025-04-16 17:23:55 +08:00
Nick Fisher c3e583ac5a make swapChain an optional parameter when calling capture() (if not specified, first swapchain will be used) 2025-04-16 17:23:55 +08:00
Nick Fisher 48654f0e8f documentation 2025-04-16 17:23:55 +08:00
Nick Fisher a772b86f09 export light options and layers 2025-04-16 17:23:53 +08:00
Nick Fisher 026893d2fe update BUILDING 2025-04-16 17:23:38 +08:00
Nick Fisher 2d4342607d add async gltf resource loading 2025-04-16 17:06:51 +08:00
Nick Fisher 02b6bc4ee6 update camera_manipulation example to use new API 2025-04-16 16:02:46 +08:00
Nick Fisher 0194eb5cd5 update camera_manipulation example to add local thermion_flutter_web in dependency_overrides 2025-04-16 16:02:23 +08:00
Nick Fisher 9ceedb4e1c default to release mode builds 2025-04-16 16:01:49 +08:00
Nick Fisher 85a0451f1b remove outdated resource loader methods for iOS/macOS/Android 2025-04-16 14:01:47 +08:00
Nick Fisher dfda0eb476 update DefaultPickDelegate to use pick() on view 2025-04-16 14:00:47 +08:00
Nick Fisher b160932ff3 logging 2025-04-16 14:00:30 +08:00
Nick Fisher f9c5ee5896 remove pick() from FFI viewer / add setLayerVisibility 2025-04-16 13:59:42 +08:00
Nick Fisher 5097373a22 export layers in package 2025-04-16 13:59:06 +08:00
Nick Fisher 10dd66c7f8 remove pick() from viewer interface and add setLayerVisibility 2025-04-16 13:58:52 +08:00
Nick Fisher b6e5d2c834 update Windows/Vulkan sample app 2025-04-16 13:58:02 +08:00
Nick Fisher 726f9b8c80 OK to return Flutter texture handle even if width or height don't match 2025-04-16 13:54:10 +08:00
Nick Fisher 7349fa2298 rename utils.h etc to vulkan_utils.h to avoid filename clashes 2025-04-16 13:48:00 +08:00
Nick Fisher 143c4a436d return nullptr if D3D device cannot create render target view 2025-04-16 13:46:04 +08:00
Nick Fisher 60e025e78d cleanup 2025-04-16 13:36:39 +08:00
Nick Fisher de5bc5c02e cleanup 2025-04-16 13:36:26 +08:00
Nick Fisher a1ab4186b4 logging on error and return NULL if vkTexture cannot be created 2025-04-16 13:36:08 +08:00
Nick Fisher d3b9ae45cf (Windows) properly destroy swapchain and don't un-set current unless the swapchain being destroyed is the current swapchain 2025-04-16 13:35:40 +08:00
Nick Fisher 7dfb8a4b19 logging/header path changes 2025-04-16 13:34:45 +08:00
Nick Fisher 2bd64805a9 logging on Windows 2025-04-16 13:34:08 +08:00
Nick Fisher b17b732c55 update BUILDING.md for Windows 2025-04-16 13:33:44 +08:00
Nick Fisher 8157f3318b revert CameraOrientationWidget 2025-04-16 13:33:15 +08:00
Nick Fisher fbbb4ed792 specify thermion_dart in thermion_flutter dependency_overrides to fix intellisense in during dev 2025-04-16 13:32:46 +08:00
Nick Fisher ec3e7ed3ba implement pick() for FFIView with fixed native callable 2025-04-16 13:32:12 +08:00
Nick Fisher 585e0ad087 move pick() to View 2025-04-16 13:30:31 +08:00
Nick Fisher 4815b0309e force /MD for Flutter Windows plugin 2025-04-16 13:30:06 +08:00
Nick Fisher 9d593b8c3b add getHorizontalFieldOfView/getVerticalFieldOfView methods to (Dart) Camera class 2025-04-16 13:29:24 +08:00
Nick Fisher aaa74f0267 add missing Camera_getFov method 2025-04-16 13:28:02 +08:00
Nick Fisher cf8e0f6ed2 rename utils.h etc to vulkan_utils.h to avoid filename clashes 2025-04-16 13:27:46 +08:00
Nick Fisher 303174117f destroy background image on viewer dispose 2025-04-02 23:01:13 +08:00
Nick Fisher ccda475073 logging 2025-04-02 23:00:59 +08:00
Nick Fisher ddba3c35ab logging 2025-04-02 23:00:44 +08:00
Nick Fisher 87d04fc2c1 properly initialize SwapChainPtr to nullptr 2025-04-02 23:00:27 +08:00
Nick Fisher a3f05e353d remove view from registered swapchain list on destroy 2025-04-02 23:00:04 +08:00
Nick Fisher 69ce7b1a15 update Dart cli_windows example 2025-04-02 22:29:39 +08:00
Nick Fisher 3922ee536b remove old README 2025-04-02 22:28:59 +08:00
Nick Fisher cf372f4dc2 call method channel destroyContext on Windows 2025-04-02 22:28:47 +08:00
Nick Fisher 854b142973 call method channel destroyContext 2025-04-02 22:28:25 +08:00
Nick Fisher 7d8f7a726b properly null out texture references on disposal 2025-04-02 22:27:36 +08:00
Nick Fisher e0b2e1c3b9 add onDestroy hooks for FilamentApp 2025-04-02 22:27:12 +08:00
Nick Fisher f7a7b6bedf add EMSCRIPTEN_KEEPALIVE to swap chain flags 2025-04-02 22:26:03 +08:00
Nick Fisher 7b0550c713 manually define SceneLayer enum 2025-04-02 22:25:42 +08:00
Nick Fisher ec8248e10c Windows logging compatibility 2025-04-02 22:25:03 +08:00
Nick Fisher 374d2e5697 update native_toolchain_c/native_assets_cli to latest 2025-04-02 22:24:46 +08:00
Nick Fisher e407e75389 add EMSCRIPTEN_KEEPALIVE to swap chain flags 2025-04-02 22:23:47 +08:00
Nick Fisher 342ff58cbe finish all pending tasks before joining RenderThread on destruction 2025-04-02 22:23:21 +08:00
Nick Fisher 68842fb4ce update Overlay enum references 2025-04-02 22:22:55 +08:00
Nick Fisher 88f229481d remove old includes 2025-04-02 22:22:36 +08:00
Nick Fisher 09b2a924af (Windows) define M_PI 2025-04-02 22:22:05 +08:00
Nick Fisher 06715f0618 add standalone build script for materials 2025-04-02 22:21:35 +08:00
Nick Fisher 38d190f582 add standalone build script for materials 2025-04-02 22:21:22 +08:00
Nick Fisher 73cb20a2dd remove ResourceBuffer/loadResource/etc from Flutter Windows implementation 2025-04-02 22:21:01 +08:00
Nick Fisher a08cc7aa62 update Windows Vulkan implementation 2025-04-02 22:20:21 +08:00
Nick Fisher 9d4fd4d6d4 remove camutils 2025-04-02 22:19:42 +08:00
Nick Fisher e8aa68beb4 update Vulkan implementation headers 2025-04-02 22:19:19 +08:00
Nick Fisher 178da458ad update materials 2025-04-02 22:15:38 +08:00
Nick Fisher 508c184f1a add missing Filament headers for Windows 2025-04-02 22:15:11 +08:00
Nick Fisher a8cf071f2f Update README.md 2025-03-28 16:23:32 +08:00
Nick Fisher 89768c9303 update BUILDING.md 2025-03-28 16:21:11 +08:00
Nick Fisher a31142de6d documentation updates 2025-03-28 16:13:36 +08:00
Nick Fisher 66ddcac412 remove gizmo/unlit material from Makefile 2025-03-28 15:55:36 +08:00
Nick Fisher 645ba97c1d update Windows CLI example 2025-03-28 15:55:35 +08:00
Nick Fisher a26eacb247 add fgviewer/matdbg to build.dart and bump Filament version number 2025-03-28 15:55:35 +08:00
Nick Fisher 667397ad83 update BUILDING.md 2025-03-28 15:55:35 +08:00
Nick Fisher 99217499f9 remove old SceneManager references 2025-03-28 15:55:35 +08:00
Nick Fisher b083c62bd4 recompile materials 2025-03-28 15:55:35 +08:00
Nick Fisher d0b297b015 add destructor test 2025-03-28 15:55:35 +08:00
Nick Fisher ddc5fedc4d recompile materials 2025-03-28 15:55:35 +08:00
Nick Fisher 968e2e508d set FilamentApp.instance to null on disposal 2025-03-28 15:55:35 +08:00
Nick Fisher 7c936547aa update BUILDING.md 2025-03-28 15:55:35 +08:00
Nick Fisher 4ac1b5329c tests: split createViewer from withViewer 2025-03-28 15:55:35 +08:00
Nick Fisher bf44ca7ddd add precompiled swift lib for macos tests 2025-03-28 15:55:35 +08:00
Nick Fisher e25d7805d9 comment out tests for merge 2025-03-28 15:55:35 +08:00
Nick Fisher 5aaf212d9a update swift bindings output dir 2025-03-28 15:55:35 +08:00
Nick Fisher 99bd993f25 gitignore native build directory 2025-03-28 15:55:34 +08:00
Nick Fisher a153bc9916 ignore filamat files 2025-03-28 15:55:34 +08:00
Nick Fisher 77ff8ff4c3 Update README.md 2025-03-28 14:08:16 +08:00
Nick Fisher 709fe35852 instancing tests/demo 2025-03-28 14:06:12 +08:00
Nick Fisher ecb8d8672a fix instancing so that gltf assets always fill the first instance slot 2025-03-28 13:06:36 +08:00
Nick Fisher a79e1a86f8 update stub 2025-03-28 11:48:52 +08:00
Nick Fisher 4bdbb170a7 export ViewerWidget 2025-03-28 11:48:39 +08:00
Nick Fisher 7960b55dbd in ThermionViewerFFI, set view renderable by default 2025-03-28 11:48:26 +08:00
Nick Fisher 77465baaf4 cleanup imports 2025-03-28 11:48:08 +08:00
Nick Fisher dcf13fd53f cleanup imports 2025-03-28 11:48:00 +08:00
Nick Fisher 973804ed14 update ViewerWidget 2025-03-28 11:47:46 +08:00
Nick Fisher 9978d9d75c use View as key for ThermionWidget and update docstrings 2025-03-28 11:47:31 +08:00
Nick Fisher e4f436fab1 use unregister in ThermionFlutterMethodChannelPlatform 2025-03-28 11:47:00 +08:00
Nick Fisher ac5b5b89f6 remove old ThermionFlutterWindow class 2025-03-28 11:46:32 +08:00
Nick Fisher b69977929c in ThermionListenerWidget, don't return child before the input handler has initialized 2025-03-28 11:46:11 +08:00
Nick Fisher 548dccf776 separate quickstart/viewer example projects 2025-03-28 11:45:34 +08:00
Nick Fisher b4e4eb349c test updates 2025-03-28 10:04:21 +08:00
Nick Fisher 7a5fdb0b77 test updates 2025-03-28 10:04:02 +08:00
Nick Fisher 51e51db229 VDTM tests 2025-03-28 10:03:39 +08:00
Nick Fisher faba1b3087 add depth sampler material 2025-03-28 10:03:30 +08:00
Nick Fisher 123543a985 test fixes 2025-03-28 10:03:14 +08:00
Nick Fisher cd9332063c update TestHelper 2025-03-28 10:02:01 +08:00
Nick Fisher 54a0a0befb update TextureProjection 2025-03-28 10:01:49 +08:00
Nick Fisher 289749115b add flush() method on FilamentApp 2025-03-28 10:01:26 +08:00
Nick Fisher cd1c2f3827 projection work + tests 2025-03-28 10:01:00 +08:00
Nick Fisher e8169e86d1 VDTM material 2025-03-25 14:54:30 +08:00
Nick Fisher cac063324d texture projection work 2025-03-25 12:16:38 +08:00
Nick Fisher aebaa8425c cleanup 2025-03-25 11:34:24 +08:00
Nick Fisher 1b902e36f4 expose setBlendMode on View 2025-03-25 11:34:08 +08:00
Nick Fisher 396b7ed6dc add depth write material 2025-03-25 11:33:37 +08:00
Nick Fisher d6666d6388 cleanup capture_uv material 2025-03-25 11:33:24 +08:00
Nick Fisher 7d5b183dea add TextureProjection class 2025-03-25 11:33:07 +08:00
Nick Fisher 6c25a3c405 projection tests 2025-03-25 11:32:53 +08:00
Nick Fisher 999b1e613f refactoring + texture projection 2025-03-25 09:39:02 +08:00
Nick Fisher 0cbbc058e0 refactoring 2025-03-22 10:49:24 +08:00
Nick Fisher a67f42f0de refactoring 2025-03-21 17:18:16 +08:00
Nick Fisher 4ef74c4c70 add native CMakeLists 2025-03-21 14:56:27 +08:00
Nick Fisher 255c0edd49 refactoring 2025-03-21 14:56:20 +08:00
Nick Fisher 1177a71f73 test updates 2025-03-20 18:56:10 +08:00
Nick Fisher e6bdcb687a refactoring 2025-03-20 18:48:04 +08:00
Nick Fisher cbff4cd805 refactoring 2025-03-20 11:07:16 +08:00
Nick Fisher a8a2f14b34 refactoring 2025-03-19 23:22:19 +08:00
Nick Fisher 931aab5159 refactoring 2025-03-19 21:52:59 +08:00
Nick Fisher a310498c5a refactoring 2025-03-19 18:45:42 +08:00
Nick Fisher 6744c02019 refactoring 2025-03-19 17:54:43 +08:00
Nick Fisher 124f923720 refactor 2025-03-19 16:06:55 +08:00
Nick Fisher e2048c3efd refactoring 2025-03-19 16:03:44 +08:00
Nick Fisher ac86dc7ad7 refactoring 2025-03-19 16:02:43 +08:00
Nick Fisher e73cb9c7d6 refactor 2025-03-19 15:42:33 +08:00
Nick Fisher 102429e090 refactoring 2025-03-19 15:42:11 +08:00
Nick Fisher 627447f8b0 refactoring 2025-03-19 12:27:13 +08:00
Nick Fisher d5bffd5ad2 refactor 2025-03-18 23:15:13 +08:00
Nick Fisher 951f5daa2d more refactoring 2025-03-18 18:06:17 +08:00
Nick Fisher 77fe40848b refactoring 2025-03-18 16:26:47 +08:00
Nick Fisher 07b80071a4 add destroy methods for skybox/indirect light 2025-03-18 11:42:29 +08:00
Nick Fisher 03f7764da2 add bitmask to createTexture viewer method 2025-03-17 22:37:19 +08:00
Nick Fisher 231b03cd17 add indirect light methods 2025-03-17 22:36:53 +08:00
Nick Fisher b271b7e433 more render thread methods 2025-03-17 22:36:10 +08:00
Nick Fisher 746ef07e42 add FilamentAsset methods 2025-03-17 22:35:58 +08:00
Nick Fisher bff76f184e add gltfio FFI methods and expose texture/render target creation directly 2025-03-17 18:53:36 +08:00
Nick Fisher 2244359edd interm texture depth tests 2025-03-17 17:00:47 +08:00
Nick Fisher b94edf0951 Dart interface updates 2025-03-17 17:00:25 +08:00
Nick Fisher 988e22fe95 rename updateViewport -> setViewport 2025-03-17 16:59:57 +08:00
Nick Fisher 401048e6a8 allow creation/import of Metal depth texture 2025-03-17 16:59:35 +08:00
Nick Fisher 232289003e add generated Swift bindings 2025-03-17 16:59:03 +08:00
Nick Fisher e18d1246f6 ffigen: generate enums as int 2025-03-17 16:58:39 +08:00
Nick Fisher 95c9e5be66 misc C API updates 2025-03-17 16:58:24 +08:00
Nick Fisher e1203df087 add depth texture to createRenderTarget, set stencil disabled by default 2025-03-17 16:58:04 +08:00
Nick Fisher 09678c6cdc add more Dart-side Texture methods 2025-03-17 16:57:22 +08:00
Nick Fisher f2ce4a4044 add depth texture to render target creation 2025-03-17 16:56:17 +08:00
Nick Fisher c23b991c9c add Dart-side methods 2025-03-17 16:55:53 +08:00
Nick Fisher 4205b86f13 update generated Swift bindings 2025-03-17 16:55:28 +08:00
Nick Fisher d710ab810c expose more Texture/TextureSampler methods 2025-03-17 16:54:15 +08:00
Nick Fisher 4e5a9be97a add standalone SceneAsset_createGeometry method 2025-03-17 16:53:35 +08:00
Nick Fisher 342a53ae7b add View_setScene and rename View_updateViewport to View_setViewport 2025-03-17 16:53:06 +08:00
Nick Fisher a0e1971958 logging 2025-03-17 16:52:32 +08:00
Nick Fisher 74502ba5b3 add further TEngine methods 2025-03-17 16:52:05 +08:00
Nick Fisher 09b6aca08f move FFISwapChain to own file 2025-03-17 16:39:28 +08:00
Nick Fisher 03c4afb031 update API boundary types & enums 2025-03-17 16:39:13 +08:00
Nick Fisher f923b94b84 update Filament headers to v1.58.0 2025-03-17 16:38:52 +08:00
Nick Fisher 20ea43a809 add TScene 2025-03-17 16:38:30 +08:00
Nick Fisher 8b34934755 add TRenderer 2025-03-17 16:37:51 +08:00
Nick Fisher 5ad187d54f add various render thread methods 2025-03-17 16:35:45 +08:00
Nick Fisher 711abe11bd add Camera_lookAt 2025-03-17 16:34:34 +08:00
Nick Fisher a16c3c7580 add logging to setImage 2025-03-10 22:22:07 +08:00
Nick Fisher e1446c7eb8 more VDTM work 2025-03-10 22:21:25 +08:00
Nick Fisher 1f4af8c946 more VDTM work 2025-03-10 22:05:10 +08:00
Nick Fisher 75bee32e54 test fix 2025-03-10 18:11:23 +08:00
Nick Fisher 1d49db4767 3D texture tests 2025-03-10 18:06:27 +08:00
Nick Fisher d39b57f054 initial view-dependent texture projection material 2025-03-10 18:06:18 +08:00
Nick Fisher e91d1ca0aa support 3D texture/2D texture arrays 2025-03-10 18:05:42 +08:00
Nick Fisher 7d87d229d0 add texture projection material 2025-03-08 13:25:15 +08:00
Nick Fisher 7ed7ff48b9 always initialize uvScale to 1 2025-03-08 12:17:57 +08:00
Nick Fisher 9d311220b1 remove UV1 from geometry 2025-03-08 12:17:39 +08:00
Nick Fisher e4de0f3ae0 expose setParameterBool/hasParameter on material + instance 2025-03-08 12:17:06 +08:00
Nick Fisher 72711ee64f rename/update materials_and_textures sample project 2025-03-08 11:20:10 +08:00
Nick Fisher c52052c1b9 ensure any existing Viewers are destroyed on initialize() 2025-03-07 18:58:22 +08:00
Nick Fisher aa26f4d0df separate out RenderLoop/FilamentViewer construction/destruction 2025-03-07 18:53:36 +08:00
Nick Fisher be61d5e5ca move image from dev to package dependency 2025-03-07 14:53:38 +08:00
Nick Fisher 1a3d902d23 add image utils 2025-03-07 14:53:13 +08:00
Nick Fisher 35bddd2bb2 fix geometry normals/UVs 2025-03-07 14:53:02 +08:00
Nick Fisher 74ee35bfcd use render thread methods for Texture/Image/TextureSampler 2025-03-07 14:52:45 +08:00
Nick Fisher 2915655695 remove superseded destroyTexture method (call texture.dispose() instead) 2025-03-05 17:32:48 +08:00
Nick Fisher 5b80dd3a3d bounding box geometry doesn't cast/receive shadows 2025-03-05 14:57:20 +08:00
Nick Fisher 593bca3365 feat: expose setCastShadows/setReceiveShadows 2025-03-05 14:47:55 +08:00
Nick Fisher cca9fba79f add setImage method to set texture image directly from buffer 2025-03-04 18:17:17 +08:00
Nick Fisher a245cf2915 add bitmap conversion to utils 2025-03-04 18:16:49 +08:00
Nick Fisher 15134c335b hide Texture import inside ThermionTextureWidget to avoid clash 2025-03-04 18:16:36 +08:00
Nick Fisher 85215f6760 flip UV coords for capture material 2025-03-04 18:16:13 +08:00
Nick Fisher 9abb192148 add setImage method to set texture image directly from buffer 2025-03-04 18:15:54 +08:00
Nick Fisher f7fa02180a add bitmap conversion to utils 2025-03-04 18:15:30 +08:00
Nick Fisher fc7f5d7b93 create material for texture baking
textures can now be created manually and are no longer tracked by SceneManager (and therefore require manual tracking/disposal)
2025-03-04 14:52:48 +08:00
Nick Fisher 5dca42c3c1 remove unused postprocess material 2025-03-04 14:38:05 +08:00
Nick Fisher 665c2fb39d update projection test 2025-03-04 14:37:13 +08:00
Nick Fisher 3ac79b2080 initial projection material 2025-03-03 16:11:12 +08:00
Nick Fisher 8d52690c97 fix texture/material methods 2025-03-03 15:52:03 +08:00
Nick Fisher 2a8931e1ac add TTexture bindings with TextureFormat, PixelDataType and PixelDataFormat enums 2025-03-03 14:43:20 +08:00
Nick Fisher 94d77ff21b move Engine_ FFI methods to own header/source 2025-03-03 11:32:45 +08:00
Nick Fisher 7a707cda67 move Engine_ FFI methods to own header/source 2025-03-03 11:32:34 +08:00
Nick Fisher 8993d888b1 docstring 2025-03-01 17:23:06 +08:00
Nick Fisher ffc256228a add fps counters and headroom 2025-03-01 13:02:05 +08:00
Nick Fisher 1b1de0b7c0 add Filament version to README 2025-03-01 12:29:38 +08:00
Nick Fisher 4c1480864e remove thermion_flutter_ffi from thermion_flutter pubspec 2025-03-01 12:29:15 +08:00
Nick Fisher 06cc114daa add geometry_combined lib to libs 2025-03-01 12:28:35 +08:00
Nick Fisher 1258751dda update bindings 2025-03-01 12:00:03 +08:00
Nick Fisher 67ca24a7d9 remove old ThermionDartRenderThreadApi.h 2025-03-01 11:59:52 +08:00
Nick Fisher 282ee6d103 cherry pick changes onto ThermionDartRenderThreadApi.h 2025-03-01 11:59:36 +08:00
Nick Fisher bb5a8f495d enable GPU validation mode for camera_manipulation iOS project 2025-03-01 11:56:35 +08:00
Nick Fisher c400ca3993 rename Android project and disable impeller for camera_manipulation 2025-03-01 11:56:35 +08:00
Nick Fisher d7d7fa7c0b use scale directly for DelegateInputHandler 2025-03-01 11:56:34 +08:00
Nick Fisher c1be084e3e update generated bindings 2025-03-01 11:56:14 +08:00
Nick Fisher 178e59a618 add enabled/strength params for bloom 2025-03-01 11:55:48 +08:00
Nick Fisher 7fe9c06a7f change setBloom docstring 2025-03-01 11:54:54 +08:00
Nick Fisher 0f4531d3d7 add enabled/strength params to setBloom, add setRenderQuality method 2025-03-01 11:54:29 +08:00
Nick Fisher c5228dff7e add enabled/strength params to setBloom, add setRenderQuality method 2025-03-01 11:54:12 +08:00
Nick Fisher 7131e7ab86 add enabled/strength params for bloom 2025-03-01 11:53:40 +08:00
Nick Fisher 16ff7ef008 fix: rename msPerFrame property 2025-03-01 11:52:31 +08:00
Nick Fisher a178035796 internal: set dynamicResolution enabled by default, set frameInterval properly, set bloom disabled by default 2025-03-01 11:52:19 +08:00
Nick Fisher 61abed2fb7 internal: use msPerFrame to control render timing 2025-03-01 11:50:43 +08:00
Nick Fisher 30060578ef chore(release): publish packages
- thermion_dart@0.2.1-dev.20.0
 - thermion_flutter@0.2.1-dev.20.0
 - thermion_flutter_platform_interface@0.2.1-dev.20.0
 - thermion_flutter_ffi@0.2.1-dev.20.0
 - thermion_flutter_web@0.2.0+11
2025-03-01 11:50:41 +08:00
Nick Fisher 2c2beb0e76 internal: add missing Mutex.h header 2025-01-09 09:50:03 +08:00
Nick Fisher 2b864f6f44 example: fix android release build for camera_manipulation 2025-01-08 17:18:27 +08:00
Nick Fisher 0b1da2a15d feat!: use raw pointer scale (>1 meaning zoom in, <1 meaning zoom out) rather than binary -1/1 for DelegateInputHandler 2025-01-08 11:39:40 +08:00
Nick Fisher ad70ef1461 fix: only use Windows-style ndkRoot when building on Windows 2025-01-08 11:39:34 +08:00
Nick Fisher 6f110a56dd internal: add Gizmo material to Makefile 2025-01-08 09:35:27 +08:00
Nick Fisher 0e5253f7b3 internal: store bounding box with SceneAsset rather than recalculating from renderables 2025-01-07 12:02:44 +08:00
Nick Fisher 124eed0264 fix: don't return entity from SceneManager_addLightRenderThread 2025-01-07 08:43:36 +08:00
Nick Fisher 9a055174e6 fix: return light entity from SceneManager 2025-01-07 08:43:06 +08:00
Nick Fisher 3a231697e5 test: add more tests 2025-01-07 08:42:24 +08:00
Nick Fisher 3e74c8faea internal: regenerate bindings 2025-01-07 08:40:51 +08:00
Nick Fisher 18b0bf19b9 internal: recompile materials 2025-01-07 08:40:51 +08:00
Nick Fisher 020bfbcbf6 feat: update Filament to v1.56.4 2025-01-07 08:40:51 +08:00
Nick Fisher b1c0d4b2e8 internal: expose more RenderableManager/LightManager bindings 2025-01-07 08:25:48 +08:00
Nick Fisher 6cefe44c64 fix: when creating geometry, normals/uvs are set to false by default. remove wirefame camera container (can now be replaced by bounding box methods 2025-01-07 08:25:48 +08:00
Nick Fisher 4aa8889834 internal: rename Viewer_getMainCamera and return null in Engine_getCameraComponent if camera entity is null 2025-01-07 08:25:48 +08:00
Nick Fisher aee9c767dd doc: camera improvements 2025-01-07 08:25:48 +08:00
Nick Fisher 916ecd5629 internal: rename Viewer_getMainCamera and return null in Engine_getCameraComponent if camera entity is null 2025-01-07 08:25:48 +08:00
Nick Fisher d3a6f6e22a fix: add destroyCamera to ThermionViewer interface 2025-01-07 08:25:48 +08:00
Nick Fisher 86ecd53de7 internal: use std::vector for geometry material instances 2025-01-07 08:25:48 +08:00
Nick Fisher 8653ca8398 doc: postprocessing 2025-01-07 08:25:48 +08:00
Nick Fisher 1d615e7568 fix: UV calculation for geometry 2025-01-07 08:25:48 +08:00
Nick Fisher 4cb118ad65 feat: use existing material instances when creating an instance of GeometrySceneAsset and no material instance is passed 2025-01-07 08:25:48 +08:00
Nick Fisher 4e64c4976f refactor!: rename removeAsset to destroyAsset
use render thread methods for lights
2025-01-07 08:25:48 +08:00
Nick Fisher 04adbc39e0 remove Scene class 2025-01-07 08:25:48 +08:00
Nick Fisher 744e39e8dd fix: move removeIbl to render thread 2025-01-07 08:25:48 +08:00
Nick Fisher baf86d1ade refactor!: move light methods from FilamentViewer to SceneManager/TLightManager and rename clearLights/clearAssets to destroyLights/destroyAssets 2025-01-07 08:25:48 +08:00
Nick Fisher 3e181b6aff fix: allow destroying instances independently of owner 2025-01-07 08:25:48 +08:00
Nick Fisher 8e0ba8ac4e fix: glTF instancing when loaded via buffer 2025-01-07 08:25:48 +08:00
Nick Fisher 3e39aa3630 feat: allow setting material instance directly on ThermionAsset 2025-01-07 08:25:48 +08:00
Nick Fisher cc1b55b6c9 internal: remove vertexScale from unlit material and multiply by alpha 2025-01-07 08:25:48 +08:00
Nick Fisher 242041c9f6 fix: increase grid material depth 2025-01-07 08:25:48 +08:00
Nick Fisher 7717387909 internal: remove bounding box asset when parent asset removed 2025-01-07 08:25:48 +08:00
Nick Fisher 31e453a4e6 refactor: dont require GizmoInputHandler to wrap an existing InputHandler (you can do this by creating your own InputHandler that wraps two children 2025-01-07 08:25:48 +08:00
Nick Fisher 9b988537e0 internal: allow InputHandler methods to return null 2025-01-07 08:25:48 +08:00
Nick Fisher d9338f4341 chore: test fixes 2025-01-07 08:25:48 +08:00
Nick Fisher b6397b5f73 fix!: rename removeEntity to removeAsset 2025-01-07 08:25:48 +08:00
Nick Fisher 584ace23b4 refactor: gizmo/input handler improvements 2025-01-07 08:25:48 +08:00
Nick Fisher 5e89dc43e8 feat: add FocusNode to ThermionListenerWidget 2025-01-07 08:25:48 +08:00
Nick Fisher 024643e3a1 internal: add check for renderable entity when returning bounding box 2025-01-07 08:25:48 +08:00
Nick Fisher 96fe2c89ea internal: add FFI method to check for valid renderable 2025-01-07 08:25:48 +08:00
Nick Fisher 8d8acef481 feat: remove bounding box from SceneAsset and create renderable wireframe bounding box in ThermionAsset 2025-01-07 08:25:48 +08:00
Nick Fisher 51bdca7158 feat!: remove Viewer setRenderTarget method (use the View method instead) 2025-01-07 08:25:48 +08:00
Nick Fisher 658984e784 internal: FFIView getRenderTarget 2025-01-07 08:25:48 +08:00
Nick Fisher f8ae90b631 internal: add destroyRenderTargetRenderThread 2025-01-07 08:25:48 +08:00
Nick Fisher b158062ce8 internal: expose View_getRenderTarget and set (Dart) FFIView.renderTarget property on construction 2025-01-07 08:25:48 +08:00
Nick Fisher dc690bb93a refactor: rename ThermionFlutterTexture->PlatformTextureDescriptor 2025-01-07 08:25:48 +08:00
Nick Fisher 342264eba9 chore: remove unnecessary null check 2025-01-07 08:25:48 +08:00
Nick Fisher 453ce9d1ea fix: fix highlights after first 2025-01-07 08:25:48 +08:00
Nick Fisher e9c14139c2 chore: disable grid center sphere and fix priority 2025-01-07 08:25:48 +08:00
Nick Fisher d92d47faa5 chore: logging 2025-01-07 08:25:48 +08:00
Nick Fisher b6bde0c9d9 fix: set overlay layer visibility when adding grid 2025-01-07 08:25:48 +08:00
Nick Fisher f873f7da66 feat: add setTransparencyMode to Dart Material class 2025-01-07 08:25:48 +08:00
Nick Fisher aabea985bd fix: transparency/depth fixes for grid.mat 2025-01-07 08:25:48 +08:00
Nick Fisher 9f9b34f662 feat: expose attached entity as Stream on GizmoInputHandler 2025-01-07 08:25:48 +08:00
Nick Fisher fc4842ed6d chore: remove colors from Gizmo 2025-01-07 08:25:48 +08:00
Nick Fisher eb4e70a7cf chore: remove colors from Gizmo 2025-01-07 08:25:48 +08:00
Nick Fisher 19ffa91164 chore: update stubbed viewer 2025-01-07 08:25:48 +08:00
Nick Fisher a519701510 chore: logging 2025-01-07 08:25:48 +08:00
Nick Fisher 5fb5e42b98 feat: allow custom material for grid overlay, and material creation from Uint8List 2025-01-07 08:25:48 +08:00
Nick Fisher ba3636a203 fix: use render thread methods for grid overlay creation and create ubershader instance 2025-01-07 08:25:48 +08:00
Nick Fisher e0b4ebc349 chore: regenerate bindings 2025-01-07 08:25:48 +08:00
Nick Fisher 1d1a3cbfe6 chore: rename to FFIMaterialInstance 2025-01-07 08:25:48 +08:00
Nick Fisher 7aa0367a3b internal: *Material_createInstance 2025-01-07 08:25:48 +08:00
Nick Fisher 0817efc33e internal: add Dart FFIMaterial type 2025-01-07 08:25:48 +08:00
Nick Fisher 0facb3f906 internal: add TMaterial type 2025-01-07 08:25:48 +08:00
Nick Fisher 355c28477b internal: add Material_createInstance 2025-01-07 08:25:48 +08:00
Nick Fisher c1a294315a internal: expose Engine getters (TransformManager, RenderableManager), and build/desotry material methods 2025-01-07 08:25:48 +08:00
Nick Fisher f27628e719 internal: add createGrid/destroyMaterial render thread methods 2025-01-07 08:25:48 +08:00
Nick Fisher fd1faa6023 feat: allow passing custom material for grid overlay 2025-01-07 08:25:48 +08:00
Nick Fisher 8fa43e5306 feat: allow passing custom material for grid overlay 2025-01-07 08:25:48 +08:00
Nick Fisher 94863134fc feat: allow passing custom material for grid overlay 2025-01-07 08:25:48 +08:00
Nick Fisher 1b979252db feat: re-implement grid overlay 2025-01-07 08:25:48 +08:00
Nick Fisher 852cb58ba9 fix: move material/instance creation to render thread 2025-01-07 08:25:48 +08:00
Nick Fisher 7cf1468f38 feat: more rotation gizmo improvements 2025-01-07 08:25:48 +08:00
Nick Fisher 62cd85c148 feat: rotation gizmo improvements 2025-01-07 08:25:48 +08:00
Nick Fisher 771f851784 feat: add rotation gizmo 2025-01-07 08:25:48 +08:00
Nick Fisher def85614d8 feat: add rotation gizmo 2025-01-07 08:25:48 +08:00
Nick Fisher 0ad73d06e0 internal: pass NameComponentManager to GltfSceneAsset, used for finding child entities by name 2025-01-07 08:25:48 +08:00
Nick Fisher 6c236da675 feat: add rotation gizmo asset + resource file 2025-01-07 08:25:48 +08:00
Nick Fisher 6b883f3352 chore: update hit test entities used for gizmo 2025-01-07 08:25:48 +08:00
Nick Fisher ffa0f77a42 chore: ignore TRACE when ENABLE_TRACING not set 2025-01-07 08:25:48 +08:00
Nick Fisher 26ae21910f feat: add rotation gizmo asset + resource file 2025-01-07 08:25:48 +08:00
Nick Fisher 5c3af255e4 chore: remove unused transform parameter from unlit_fixed_size material 2025-01-07 08:25:48 +08:00
Nick Fisher 29c35f9037 refactor: Gizmo internals 2025-01-07 08:25:48 +08:00
Nick Fisher 1e1d6fdcc9 chore: add dummy bounding box to GridOverlay 2025-01-07 08:25:48 +08:00
Nick Fisher 113f769160 chore: regenerate materials 2025-01-07 08:25:48 +08:00
Nick Fisher 278575c3e2 internal: add bounding box to SceneAsset & subclasses 2025-01-07 08:25:48 +08:00
Nick Fisher 27e150ebf6 chore: clean up static_cast 2025-01-07 08:25:48 +08:00
Nick Fisher fe0f63c4cb chore: update gizmo materials 2025-01-07 08:25:48 +08:00
Nick Fisher b94aeb8b4a chore: whitespace 2025-01-07 08:25:48 +08:00
Nick Fisher 8b9b299786 chore: update generated bindings 2025-01-07 08:25:48 +08:00
Nick Fisher 6ce743057b chore: whitespace 2025-01-07 08:25:48 +08:00
Nick Fisher fbb53f9033 fix: use createGizmoRenderThread 2025-01-07 08:25:48 +08:00
Nick Fisher 8a894f7e88 refactor: add createGizmoRenderThread 2025-01-07 08:25:48 +08:00
Nick Fisher 5e88a710ae chore: explicitly build debug symbols in debug mode, and add gizmo.c/gizmo_glb.c to build 2025-01-07 08:25:48 +08:00
Nick Fisher 6b36d67ed7 feat: add gizmo.glb to assets/resources 2025-01-07 08:25:48 +08:00
Nick Fisher 5564be9ce9 feat: add TRACE macro 2025-01-07 08:25:48 +08:00
Nick Fisher 9f676f42b9 remove old HighlightOverlay class 2025-01-07 08:25:48 +08:00
Nick Fisher 981fd63963 update overlay tests 2025-01-07 08:25:48 +08:00
Nick Fisher cb9320f3a1 remove pragma from Geometry builder cpp 2025-01-07 08:25:48 +08:00
Nick Fisher 6d5bc305dc fix SceneManager_createCameraRenderThread 2025-01-07 08:25:48 +08:00
Nick Fisher 1c5b5c890b reimplement grid as SceneAsset 2025-01-07 08:25:48 +08:00
Nick Fisher e43e1c9cbd flip camera wireframe direction 2025-01-07 08:25:48 +08:00
Nick Fisher 5fe985d2c7 add create/set camera render thread functions 2025-01-07 08:25:48 +08:00
Nick Fisher 80ca4b97a9 add create/set camera render thread functions 2025-01-07 08:25:48 +08:00
Nick Fisher d3b4bed654 move grid clipspace.z closer to camera to allow for skybox 2025-01-07 08:25:48 +08:00
Nick Fisher c117555b2c gizmo improvements, use render thread methods for createCamera, allow setParent null to unparent transform 2025-01-07 08:25:48 +08:00
Nick Fisher abbf2d5391 update bindings 2025-01-07 08:25:48 +08:00
Nick Fisher a31c800204 add wireframe camera to geometry 2025-01-07 08:25:48 +08:00
Nick Fisher 877e8def80 add dithering to view 2025-01-07 08:25:48 +08:00
Nick Fisher fb650dbd52 allow null parent to setParent 2025-01-07 08:25:48 +08:00
Nick Fisher c34c7d5545 change grid priority 2025-01-07 08:25:48 +08:00
Nick Fisher fe37d45e1a return null entity for grid overlay 2025-01-07 08:25:48 +08:00
Nick Fisher bf3d4f7c0e add dithering to view 2025-01-07 08:25:48 +08:00
Nick Fisher 69643e26f6 whitespace 2025-01-07 08:25:48 +08:00
Nick Fisher 44b502a1e4 add dithering to view 2025-01-07 08:25:48 +08:00
Nick Fisher 6d36dc7923 add dithering to view 2025-01-07 08:25:48 +08:00
Nick Fisher 151935913f allow null parent to setParent 2025-01-07 08:25:48 +08:00
Nick Fisher d72ed58436 in createGeometry, all geometry entities to scene 2025-01-07 08:25:48 +08:00
Nick Fisher d53a8b20b8 move Geometry asset builder from header to own implementation 2025-01-07 08:25:48 +08:00
Nick Fisher 600ab1ad28 update tests 2025-01-07 08:25:48 +08:00
Nick Fisher aa7350c419 gizmo & picking improvements 2025-01-07 08:25:48 +08:00
Nick Fisher c2077cb6b1 fix: store reference to material instances in ThermionViewer so they can be cleaned up on dispose 2025-01-07 08:25:48 +08:00
Nick Fisher bedd50ec38 chore: update pubspec.yaml with new package name 2025-01-07 08:25:48 +08:00
Nick Fisher 8a3525d879 chore: temporarily disable ThermionWidgetWebImpl 2025-01-07 08:25:48 +08:00
Nick Fisher 853f1d1a68 feat!: remove superseded ThermionWindows widget 2025-01-07 08:25:48 +08:00
Nick Fisher 7e50f0317e feat: use new createTextureAndBindToView in ThermionTextureWidget 2025-01-07 08:25:48 +08:00
Nick Fisher 724d7532e2 chore: docstring fixes 2025-01-07 08:25:48 +08:00
Nick Fisher 45a548afd2 feat!: rename thermion_flutter_ffi package to thermion_flutter_method_channel 2025-01-07 08:25:48 +08:00
Nick Fisher e8b4b7806b feat!: rename thermion_flutter_ffi package to thermion_flutter_method_channel 2025-01-07 08:25:48 +08:00
Nick Fisher 133367669d feat: create separate createTexture and createTextureAndBindToView interface methods 2025-01-07 08:25:48 +08:00
Nick Fisher 60a09a1cd9 chore: rename thermion_flutter_ffi in example projects 2025-01-07 08:25:48 +08:00
Nick Fisher 9128fbbd61 chore: rename local variable in ThermionTexture.swift to avoid compiler warning 2025-01-07 08:25:48 +08:00
Nick Fisher c3c6465908 documentation 2025-01-07 08:25:48 +08:00
Nick Fisher ed444b0615 feature!:
This is a breaking change needed to fully implement instancing and stencil highlighting.

Previously, users would work directly with entities (on the Dart side, ThermionEntity), e.g.

final entity = await viewer.loadGlb("some.glb");

However, Filament "entities" are a lower-level abstraction.

Loading a glTF file, for example, inserts multiple entities into the scene.

For example, each mesh, light, and camera within a glTF asset will be assigned an entity. A top-level (non-renderable) entity will also be created for the glTF asset, which can be used to transform the entire hierarchy.

"Asset" is a better representation for loading/inserting objects into the scene; think of this as a bundle of entities.

Unless you need to work directly with transforms, instancing, materials and renderables, you can work directly with ThermionAsset.
2024-11-27 15:02:37 +11:00
Nick Fisher 9ada6aae64 chore: rename to Viewer_destroy 2024-11-21 12:32:52 +08:00
Nick Fisher 0ef0f37bbf chore: update stubs 2024-11-21 12:32:34 +08:00
Nick Fisher df37f5e95f test cleanup 2024-11-21 12:32:17 +08:00
Nick Fisher 468cada6c6 update bindings 2024-11-21 12:31:58 +08:00
Nick Fisher e60ab51b79 fix: remove MaterialInstance from SceneManager storage when destroyed 2024-11-21 12:31:36 +08:00
Nick Fisher d58a48061c fix: remove MaterialInstance from SceneManager storage when destroyed 2024-11-21 12:31:04 +08:00
Nick Fisher cabb62043d feat: re-add uvScale, vertexScale to unlit material 2024-11-21 12:30:51 +08:00
Nick Fisher b7bc46b94a feat: re-add uvScale, vertexScale to unlit material 2024-11-21 12:30:20 +08:00
Nick Fisher bc8edb7eb4 fix: remove MaterialInstance from SceneManager storage when destroyed 2024-11-21 12:29:54 +08:00
Nick Fisher 5deb2ad7cf chore: factor out SceneManager_ methods 2024-11-21 11:16:54 +08:00
Nick Fisher dcc523edff chore(release): publish packages
- thermion_dart@0.2.1-dev.19.0
 - thermion_flutter@0.2.1-dev.19.0
 - thermion_flutter_web@0.2.0+10
 - thermion_flutter_platform_interface@0.2.1-dev.19.0
 - thermion_flutter_ffi@0.2.1-dev.19.0
2024-11-21 10:08:10 +08:00
Nick Fisher 26eba7ae09 fix!: update Makefile & rebuild materials for Vulkan 2024-11-21 10:07:08 +08:00
Nick Fisher 9692c07da9 chore: free flight handler cleanup 2024-11-21 10:03:48 +08:00
Nick Fisher 2860db3fbd feat: use InputAction.ZOOM for scroll wheel in free flight handler 2024-11-21 08:44:36 +08:00
Nick Fisher 1ce5bd3bcf feat: free flight camera improvements 2024-11-19 16:30:35 +08:00
Nick Fisher 9d3f87218e chore(release): publish packages
- thermion_dart@0.2.1-dev.18.0
 - thermion_flutter@0.2.1-dev.18.0
 - thermion_flutter_web@0.2.0+9
 - thermion_flutter_platform_interface@0.2.1-dev.18.0
 - thermion_flutter_ffi@0.2.1-dev.18.0
2024-11-18 22:56:40 +08:00
Nick Fisher 505b4bb156 fix: fix windows import header 2024-11-18 22:55:25 +08:00
Nick Fisher 25320f45af chore: fix spelling 2024-11-15 22:58:04 +08:00
Nick Fisher 0b9f3160d9 feat: add MaterialInstance.setDepthFunc 2024-11-15 22:56:40 +08:00
Nick Fisher bb27f40cb2 chore: add TMaterialInstance to ffigen.yaml 2024-11-15 22:55:16 +08:00
Nick Fisher 9853d6b721 chore: remove uvScale parameter from SceneManager and add some explicit logging 2024-11-15 22:24:30 +08:00
Nick Fisher 52f041afba chore: move TMaterialInstance FFI methods to own file/header 2024-11-15 22:24:07 +08:00
Nick Fisher 646814126f chore: test cleanup 2024-11-15 22:23:28 +08:00
Nick Fisher 05cb4325da chore: rebuild materials 2024-11-15 22:23:07 +08:00
Nick Fisher e8b3468a3a chore: remove uvScale from unlit.mat 2024-11-15 22:22:49 +08:00
Nick Fisher 741607b78b chore: add checks to Makefile for FILAMENT_PATH 2024-11-15 22:22:31 +08:00
1315 changed files with 171768 additions and 106410 deletions
@@ -0,0 +1,29 @@
name: 'Setup Build Environment'
description: 'Set up LLVM, MESA, and Flutter for builds'
runs:
using: 'composite'
steps:
- uses: actions/checkout@v4
- name: Setup LLVM
uses: KyleMayes/install-llvm-action@v1
with:
version: "16"
- name: Add LLVM to PATH
shell: bash
run: |
echo "${{ github.workspace }}/llvm/bin" >> $GITHUB_PATH
echo "LD_LIBRARY_PATH=${{ github.workspace }}/llvm/lib/x86_64-unknown-linux-gnu/" >> $GITHUB_ENV
- name: Verify installation
shell: bash
run: clang --version
- name: Install MESA
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y xvfb
sudo apt-get install -y libosmesa6-dev
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: master
architecture: X64
+172 -51
View File
@@ -1,7 +1,3 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Dart name: Dart
on: on:
@@ -11,30 +7,130 @@ on:
branches: [ "develop" ] branches: [ "develop" ]
jobs: jobs:
thermion_dart: compile-web-wasm:
name: thermion_dart runs-on: macos-latest
runs-on: self-hosted
defaults:
run:
working-directory: thermion_dart # Adjust this path
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Install dependencies - name: Setup CMake
run: flutter pub get # even though this is a Dart package, it has as dev_dependency on objective_c for testing which for some reason has a Flutter dependency uses: jwlawson/actions-setup-cmake@v2
with:
# Uncomment this step to verify the use of 'dart format' on each commit. cmake-version: '3.25.0' # or 'latest'
# - name: Verify formatting - name: Setup Emscripten
# run: dart format --output=none --set-exit-if-changed . uses: mymindstorm/setup-emsdk@v14
with:
#- name: Analyze project source version: 'latest'
# run: dart analyze - name: Compile web
run: make wasm
- name: Build and Test dart-tests:
shell: cmd runs-on: ubuntu-22.04
run: dart --enable-experiment=native-assets test steps:
- uses: actions/checkout@v4
# Upload logs on failure - uses: ./.github/actions/setup-build-env
- run: |
cd thermion_dart
dart pub get
xvfb-run dart --enable-experiment=native-assets test \
test/asset_tests.dart \
test/instancing_tests.dart \
test/light_tests.dart \
test/entity_tests.dart \
test/geometry_tests.dart \
test/view_tests.dart \
test/postprocessing_tests.dart \
test/scene_tests.dart \
test/picking_tests.dart \
--concurrency=1
#test/overlay_tests.dart \
- name: Zip output
run: zip -r output.zip ./thermion_dart/test/output
- name: Upload test output
uses: actions/upload-artifact@v4
with:
name: golden-images-${{ github.sha }}
path: output.zip
- name: Download golden images from previous run
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh run download 15990504915 \
--name golden-images-4b9870244a529bf086280331d38c55e294425b4f \
--dir ./thermion_dart/test/golden-downloads
- name: Unzip golden images
run: |
cd thermion_dart/test/golden-downloads && unzip output.zip
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install Pillow numpy
- name: Compare golden images
run: cd thermion_dart/test && python compare_goldens.py
- name: Upload logs
if: failure() || steps.build.outcome == 'failure'
uses: actions/upload-artifact@v4
with:
name: build-logs
path: |
${{ github.workspace }}/thermion_dart/.dart_tool/thermion_dart/log/build.log
retention-days: 5
flutter_examples:
name: flutter_examples
runs-on: macos-latest
defaults:
run:
working-directory: examples/flutter
steps:
- uses: actions/checkout@v4
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: master
architecture: ARM64
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Install Android SDK
uses: android-actions/setup-android@v3
with:
api-level: 34
build-tools: 34.0.0
cmake-version: 3.22.1
ndk-version: 25.1.893739
- name: Accept Android SDK licenses
run: |
yes | $ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager --licenses
- run: cd quickstart && flutter pub get && flutter build macos
# - run: cd quickstart && flutter pub get && flutter build ios
- run: cd quickstart && flutter pub get && flutter build appbundle
- run: cd quickstart && flutter build web
- run: cd picking && flutter pub get && flutter build macos
# - run: cd picking && flutter pub get && flutter build ios
- run: cd picking && flutter pub get && flutter build appbundle
- run: cd picking && flutter build web
- name: Upload logs
if: failure() || steps.build.outcome == 'failure'
uses: actions/upload-artifact@v4
with:
name: build-logs
path: |
# D:\a\thermion\thermion\thermion_dart\.dart_tool\thermion_dart\log\build.log
/Users/runner/work/thermion/thermion/thermion_dart/.dart_tool/thermion_dart/log/build.log
retention-days: 5
flutter_examples_windows:
name: flutter_examples_windows
runs-on: windows-latest
defaults:
run:
working-directory: examples/flutter
steps:
- uses: actions/checkout@v4
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: master
- run: cd quickstart && flutter pub get && flutter build windows
- run: cd picking && flutter pub get && flutter build windows
- name: Upload logs - name: Upload logs
if: failure() || steps.build.outcome == 'failure' if: failure() || steps.build.outcome == 'failure'
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
@@ -42,41 +138,66 @@ jobs:
name: build-logs name: build-logs
path: | path: |
D:\a\thermion\thermion\thermion_dart\.dart_tool\thermion_dart\log\build.log D:\a\thermion\thermion\thermion_dart\.dart_tool\thermion_dart\log\build.log
# /Users/runner/work/thermion/thermion/thermion_dart//.dart_tool/thermion_dart/log/build.log
retention-days: 5 retention-days: 5
# thermion_dart:
# Capture crash dumps if they exist # name: thermion_dart
- name: Collect crash dumps # runs-on: macos-latest
if: failure() # defaults:
uses: actions/upload-artifact@v3 # run:
with: # working-directory: thermion_dart
name: crash-dumps # steps:
path: | # - uses: actions/checkout@v4
${{ runner.temp }}/*.dmp # - name: Set up Flutter
${{ env.LOCALAPPDATA }}/Temp/*.dmp # uses: subosito/flutter-action@v2
${{ env.LOCALAPPDATA }}/CrashDumps/*.dmp # with:
# channel: master
# - run: flutter pub get
# - run: dart --enable-experiment=native-assets test -j1 test/light_tests.dart
# thermion_flutter: # thermion_flutter:
# name: thermion_flutter # name: thermion_flutter
# runs-on: macos-13 # runs-on: macos-13
# defaults: # defaults:
# run: # run:
# working-directory: thermion_flutter/thermion_flutter # Adjust this path # working-directory: thermion_flutter/thermion_flutter # Adjust this path
# steps: # steps:
# - uses: actions/checkout@v4 # - uses: actions/checkout@v4
# - uses: dart-lang/setup-dart@9a04e6d73cca37bd455e0608d7e5092f881fd603 # - uses: dart-lang/setup-dart@9a04e6d73cca37bd455e0608d7e5092f881fd603
# - name: Install dependencies # - name: Install dependencies
# run: dart pub get # run: dart pub get
#
#
##- uses: actions/checkout@v4
#- name: Setup LLVM
# uses: KyleMayes/install-llvm-action@v1
# with:
# version: "16"
#- name: Add LLVM to PATH
# run: |
# echo "${{ github.workspace }}/llvm/bin" >> $GITHUB_PATH
# echo "LD_LIBRARY_PATH=${{ github.workspace }}/llvm/lib/x86_64-unknown-linux-gnu/" >> $GITHUB_ENV
#- name: Verify installation
# run: clang --version
#- name: Install MESA
# run: |
# sudo apt-get update
# sudo apt-get install -y xvfb
# sudo apt-get install -y libosmesa6-dev
# #sudo apt-get -y build-dep mesa
# #git clone https://gitlab.freedesktop.org/mesa/mesa.git
# #cd mesa
# #git checkout mesa-23.2.1
# #mkdir -p out
# #meson setup builddir/ -Dprefix="$(pwd)/out" -Dosmesa=true -Dglx=xlib -Dgallium-drivers=swrast -Dvulkan-drivers=swrast
# #meson install -C builddir/
#- name: Install Vulkan SDK and dependencies
# run: |
# wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo apt-key add -
# sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-jammy.list https://packages.lunarg.com/vulkan/lunarg-vulkan-jammy.list
# sudo apt-get update
# sudo apt-get install -y vulkan-sdk
#- name: Set up Flutter
# uses: subosito/flutter-action@v2
# with:
# channel: master
# architecture: X64
# # Uncomment this step to verify the use of 'dart format' on each commit.
# # - name: Verify formatting
# # run: dart format --output=none --set-exit-if-changed .
# - name: Analyze project source
# run: dart analyze
# - name: Run tests
# run: dart --enable-experiment=native-assets test
+1 -1
View File
@@ -1,5 +1,4 @@
**/*/.cxx **/*/.cxx
**/.github
**/.idea **/.idea
.dart_tool .dart_tool
**/.dart_tool **/.dart_tool
@@ -10,3 +9,4 @@
pubspec_overrides.yaml pubspec_overrides.yaml
/pubspec.lock /pubspec.lock
*.iml *.iml
**/*/*.filamat
+301
View File
@@ -3,6 +3,307 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## 2025-07-24
### Changes
---
Packages with breaking changes:
- There are no breaking changes in this release.
Packages with other changes:
- [`thermion_dart` - `v0.3.3`](#thermion_dart---v033)
- [`thermion_flutter_method_channel` - `v0.3.3`](#thermion_flutter_method_channel---v033)
- [`thermion_flutter_platform_interface` - `v0.3.3`](#thermion_flutter_platform_interface---v033)
- [`thermion_flutter_web` - `v0.3.3`](#thermion_flutter_web---v033)
- [`thermion_flutter` - `v0.3.3`](#thermion_flutter---v033)
---
#### `thermion_dart` - `v0.3.3`
- Bump "thermion_dart" to `0.3.3`.
#### `thermion_flutter_method_channel` - `v0.3.3`
- Bump "thermion_flutter_method_channel" to `0.3.3`.
#### `thermion_flutter_platform_interface` - `v0.3.3`
- Bump "thermion_flutter_platform_interface" to `0.3.3`.
#### `thermion_flutter_web` - `v0.3.3`
- Bump "thermion_flutter_web" to `0.3.3`.
#### `thermion_flutter` - `v0.3.3`
- Bump "thermion_flutter" to `0.3.3`.
## 2025-07-17
### Changes
---
Packages with breaking changes:
- There are no breaking changes in this release.
Packages with other changes:
- [`thermion_dart` - `v0.3.3-pre`](#thermion_dart---v033-pre)
- [`thermion_flutter` - `v0.3.3-pre`](#thermion_flutter---v033-pre)
- [`thermion_flutter_method_channel` - `v0.3.3-pre`](#thermion_flutter_method_channel---v033-pre)
- [`thermion_flutter_platform_interface` - `v0.3.3-pre`](#thermion_flutter_platform_interface---v033-pre)
- [`thermion_flutter_web` - `v0.3.3-pre`](#thermion_flutter_web---v033-pre)
---
#### `thermion_dart` - `v0.3.3-pre`
- **FIX**: fix Windows build.dart.
- **FIX**: add nan/negative checks inside setLensProjection.
#### `thermion_flutter` - `v0.3.3-pre`
- **DOCS**: replace thermion_flutter README with symlink to thermion_dart README.
#### `thermion_flutter_method_channel` - `v0.3.3-pre`
- **FEAT**: allow passing renderTargetColorTextureFormat via ThermionFlutterOptions.
#### `thermion_flutter_platform_interface` - `v0.3.3-pre`
- **FEAT**: allow passing renderTargetColorTextureFormat via ThermionFlutterOptions.
#### `thermion_flutter_web` - `v0.3.3-pre`
- Bump "thermion_flutter_web" to `0.3.3-pre`.
## 2025-07-08
### Changes
---
Packages with breaking changes:
- There are no breaking changes in this release.
Packages with other changes:
- [`thermion_dart` - `v0.3.2`](#thermion_dart---v032)
- [`thermion_flutter` - `v0.3.2`](#thermion_flutter---v032)
- [`thermion_flutter_method_channel` - `v0.3.2`](#thermion_flutter_method_channel---v032)
- [`thermion_flutter_web` - `v0.3.2`](#thermion_flutter_web---v032)
- [`thermion_flutter_platform_interface` - `v0.3.2`](#thermion_flutter_platform_interface---v032)
---
#### `thermion_dart` - `v0.3.2`
- Bump "thermion_dart" to `0.3.2`.
#### `thermion_flutter` - `v0.3.2`
- Bump "thermion_flutter" to `0.3.2`.
#### `thermion_flutter_method_channel` - `v0.3.2`
- Bump "thermion_flutter_method_channel" to `0.3.2`.
#### `thermion_flutter_web` - `v0.3.2`
- **FIX**: add missing destroySwapchain argument for web.
#### `thermion_flutter_platform_interface` - `v0.3.2`
- Bump "thermion_flutter_platform_interface" to `0.3.2`.
## 2025-07-08
### Changes
---
Packages with breaking changes:
- There are no breaking changes in this release.
Packages with other changes:
- [`thermion_dart` - `v0.3.1`](#thermion_dart---v031)
- [`thermion_flutter` - `v0.3.1`](#thermion_flutter---v031)
- [`thermion_flutter_method_channel` - `v0.3.1`](#thermion_flutter_method_channel---v031)
- [`thermion_flutter_web` - `v0.3.1`](#thermion_flutter_web---v031)
- [`thermion_flutter_platform_interface` - `v0.3.1`](#thermion_flutter_platform_interface---v031)
---
#### `thermion_dart` - `v0.3.1`
- **REFACTOR**: remove covariant keyword from createInstance args.
- **FIX**: add flush() to skybox/IBL destroy methods to ensure that textre upload callbacks are completed to avoid stalling.
- **FIX**: duplicate setting for _grid.
#### `thermion_flutter` - `v0.3.1`
- **FIX**: addDestroySwapchain argument to createViewer() (true by default). This is only used on iOS/macOS where a single swapchain is shared between all render targets.
- **DOCS**: fix typo in link.
- **DOCS**: remove code from thermion_flutter README.md and point to docs/repository example instead.
#### `thermion_flutter_method_channel` - `v0.3.1`
- **FIX**: addDestroySwapchain argument to createViewer() (true by default). This is only used on iOS/macOS where a single swapchain is shared between all render targets.
#### `thermion_flutter_web` - `v0.3.1`
#### `thermion_flutter_platform_interface` - `v0.3.1`
- **FIX**: addDestroySwapchain argument to createViewer() (true by default). This is only used on iOS/macOS where a single swapchain is shared between all render targets.
# Change Log
#### v0.3.0
This release involved considerable internal refactoring, allowing us to expose more Filament functionality on the Dart side. Previously, most of this functionality was
rigidly implemented in C++ and didn't allow for end-users to take advantage of Filament directly.
This also means there are a number of breaking changes from `0.2.1`. To summarize:
- `ViewerWidget` has been introduced. This is a Flutter widget for users who only need basic rendering and don't need/want to deal with camera/materials/etc directly.
- Users who want more fine-grained control than a `ViewerWidget` can still work with `ThermionViewer` and `ThermionWidget`.
- The singleton `FilamentApp.instance` exposes methods for working almost directly with the underlying Filament engine (e.g. loading custom materials from `Uint8List`, creating textures, etc).
- New interfaces have been added for `Material`, `MaterialInstance`, `Texture`, `View`, `Scene` and `Camera`.
- `ThermionAsset` replaces `ThermionEntity` as the main interface for scene objects.
- Transforms/material instances should be set directly by `asset.setTransform`, `asset.setMaterialInstanceAt`
- Material properties can be set directly on the `MaterialInstance`, e.g. `materialInstance.setParameterFloat4("baseColorFactor", 1.0, 0.0, 0.0, 1.0);
- Linux binaries have been added to `thermion_dart`. This package can be run on Linux (which we are using for CI and automated testing) but there are not yet any Flutter bindings, so `thermion_flutter` cannot run on Linux yet.
- On Windows, `thermion_flutter` now uses the Vulkan backend. This is still experimental and will have limited supported on older hardware (pre-2018).
- Web support for `thermion_dart` has now reached parity with other platforms, though should still be considered experimental. Some manual steps are required to run in a Flutter app or a Dart web app.
## 2025-01-08
### Changes
---
Packages with breaking changes:
- There are no breaking changes in this release.
Packages with other changes:
- [`thermion_dart` - `v0.2.1-dev.20.0`](#thermion_dart---v021-dev200)
- [`thermion_flutter` - `v0.2.1-dev.20.0`](#thermion_flutter---v021-dev200)
- [`thermion_flutter_platform_interface` - `v0.2.1-dev.20.0`](#thermion_flutter_platform_interface---v021-dev200)
- [`thermion_flutter_ffi` - `v0.2.1-dev.20.0`](#thermion_flutter_ffi---v021-dev200)
- [`thermion_flutter_web` - `v0.2.0+11`](#thermion_flutter_web---v02011)
Packages with dependency updates only:
> Packages listed below depend on other packages in this workspace that have had changes. Their versions have been incremented to bump the minimum dependency versions of the packages they depend upon in this project.
- `thermion_flutter_web` - `v0.2.0+11`
---
#### `thermion_dart` - `v0.2.1-dev.20.0`
- **FIX**: only use Windows-style ndkRoot when building on Windows.
#### `thermion_flutter` - `v0.2.1-dev.20.0`
- Bump "thermion_flutter" to `0.2.1-dev.20.0`.
#### `thermion_flutter_platform_interface` - `v0.2.1-dev.20.0`
- Bump "thermion_flutter_platform_interface" to `0.2.1-dev.20.0`.
#### `thermion_flutter_ffi` - `v0.2.1-dev.20.0`
- Bump "thermion_flutter_ffi" to `0.2.1-dev.20.0`.
## 2024-11-21
### Changes
---
Packages with breaking changes:
- [`thermion_dart` - `v0.2.1-dev.19.0`](#thermion_dart---v021-dev190)
Packages with other changes:
- [`thermion_flutter` - `v0.2.1-dev.19.0`](#thermion_flutter---v021-dev190)
- [`thermion_flutter_web` - `v0.2.0+10`](#thermion_flutter_web---v02010)
- [`thermion_flutter_platform_interface` - `v0.2.1-dev.19.0`](#thermion_flutter_platform_interface---v021-dev190)
- [`thermion_flutter_ffi` - `v0.2.1-dev.19.0`](#thermion_flutter_ffi---v021-dev190)
Packages with dependency updates only:
> Packages listed below depend on other packages in this workspace that have had changes. Their versions have been incremented to bump the minimum dependency versions of the packages they depend upon in this project.
- `thermion_flutter` - `v0.2.1-dev.19.0`
- `thermion_flutter_web` - `v0.2.0+10`
- `thermion_flutter_platform_interface` - `v0.2.1-dev.19.0`
- `thermion_flutter_ffi` - `v0.2.1-dev.19.0`
---
#### `thermion_dart` - `v0.2.1-dev.19.0`
- **FEAT**: use InputAction.ZOOM for scroll wheel in free flight handler.
- **FEAT**: free flight camera improvements.
- **BREAKING** **FIX**: update Makefile & rebuild materials for Vulkan.
## 2024-11-18
### Changes
---
Packages with breaking changes:
- There are no breaking changes in this release.
Packages with other changes:
- [`thermion_dart` - `v0.2.1-dev.18.0`](#thermion_dart---v021-dev180)
- [`thermion_flutter` - `v0.2.1-dev.18.0`](#thermion_flutter---v021-dev180)
- [`thermion_flutter_web` - `v0.2.0+9`](#thermion_flutter_web---v0209)
- [`thermion_flutter_platform_interface` - `v0.2.1-dev.18.0`](#thermion_flutter_platform_interface---v021-dev180)
- [`thermion_flutter_ffi` - `v0.2.1-dev.18.0`](#thermion_flutter_ffi---v021-dev180)
Packages with dependency updates only:
> Packages listed below depend on other packages in this workspace that have had changes. Their versions have been incremented to bump the minimum dependency versions of the packages they depend upon in this project.
- `thermion_flutter_web` - `v0.2.0+9`
- `thermion_flutter_platform_interface` - `v0.2.1-dev.18.0`
- `thermion_flutter_ffi` - `v0.2.1-dev.18.0`
---
#### `thermion_dart` - `v0.2.1-dev.18.0`
- **FEAT**: add MaterialInstance.setDepthFunc.
#### `thermion_flutter` - `v0.2.1-dev.18.0`
- **FIX**: fix windows import header.
## 2024-11-15 ## 2024-11-15
### Changes ### Changes
+76
View File
@@ -0,0 +1,76 @@
FROM ubuntu:22.04
# Set non-interactive mode for apt
ENV DEBIAN_FRONTEND=noninteractive
# Install dependencies and add LLVM repository
RUN apt-get update && apt-get install -y \
git \
build-essential \
cmake \
ninja-build \
libgl1-mesa-dev \
libc++-dev \
libc++abi-dev \
libsdl2-dev \
libxi-dev \
libtbb-dev \
libassimp-dev \
python3 \
python3-pip \
curl \
wget \
software-properties-common \
lsb-release \
&& rm -rf /var/lib/apt/lists/*
# Add LLVM repository and install Clang 16
RUN wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - \
&& add-apt-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main" \
&& apt-get update \
&& apt-get install -y \
clang-16 \
clang++-16 \
libc++-16-dev \
libc++abi-16-dev \
&& rm -rf /var/lib/apt/lists/*
# Set Clang 16 as default
RUN update-alternatives --install /usr/bin/clang clang /usr/bin/clang-16 100 \
&& update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-16 100
# Set environment variables for Clang
ENV CC=clang-16
ENV CXX=clang++-16
# Set working directory
WORKDIR /opt
# Clone the filament repository
RUN git clone https://github.com/google/filament.git
# Change to filament directory
WORKDIR /opt/filament
# Checkout the specific version
RUN git checkout v1.58.0
# Add CMAKE_POSITION_INDEPENDENT_CODE setting after project() line
RUN sed -i '/^project(/a set(CMAKE_POSITION_INDEPENDENT_CODE ON)\nadd_compile_definitions(GLTFIO_USE_FILESYSTEM=0)' CMakeLists.txt
RUN sed -i -e '/^#define GLTFIO_USE_FILESYSTEM 1$/i\
#ifndef GLTFIO_USE_FILESYSTEM' -e '/^#define GLTFIO_USE_FILESYSTEM 1$/a\
#endif' libs/gltfio/src/FFilamentAsset.h
# Make build script executable
RUN chmod +x build.sh
# Run the build commands
RUN ./build.sh -l -i -f -p desktop release
RUN ./build.sh -l -i -f -p desktop release zstd
RUN ./build.sh -l -i -f -p desktop release tinyexr
RUN ./build.sh -l -i -f -p desktop release imageio
RUN zip -r filament-v1.58.0-linux-release.zip /opt/filament/out/release/filament/lib/x86_64/*.a /opt/filament/out/cmake-release/third_party/tinyexr/tnt/libtinyexr.a /opt/filament/out/cmake-release/libs/imageio/libimageio.a
# Set the working directory to the build output
WORKDIR /opt/filament/out/release
CMD ["/bin/bash"]
+40 -17
View File
@@ -1,36 +1,59 @@
dart-web: wasm:
cd thermion_dart/native/web; mkdir -p build && cd build && emcmake cmake .. && emmake make @if [ ! -f thermion_dart/native/web/lib/release/filament-v1.58.0-web-release.zip ]; then \
dart-web-clean: echo "Downloading filament-v1.58.0-web-release.zip..."; \
mkdir -p thermion_dart/native/web/lib/release; \
curl -L -o thermion_dart/native/web/lib/release/filament-v1.58.0-web-release.zip \
https://pub-c8b6266320924116aaddce03b5313c0a.r2.dev/filament-v1.58.0-web-release.zip; \
echo "Extracting filament-v1.58.0-web-release.zip..."; \
cd thermion_dart/native/web/lib/release && \
unzip filament-v1.58.0-web-release.zip; \
fi
cd thermion_dart/native/web && \
mkdir -p build && \
cd build && \
emcmake cmake .. && \
emmake make
wasm-clean:
cd thermion_dart/native/web && rm -rf build cd thermion_dart/native/web && rm -rf build
dart-wasm-cli-example: dart-web-clean dart-web wasm-example-web:
cd thermion_dart/examples/cli_wasm/bin && dart compile wasm example_cli.dart && node main.js cd examples/dart/js_wasm
dart-web-example: dart-web mkdir -p build
cp thermion_dart/native/web/build/build/out/thermion_dart* examples/web_wasm/bin dart compile js web/example.dart -o build/example.dart.js
cd thermion_dart/examples/web_wasm/bin && dart compile wasm example_web.dart
flutter-example-web: dart-web-clean dart-web flutter-example-web: dart-web-clean dart-web
cd thermion_flutter_federated/thermion_flutter/example/web && dart compile wasm main.dart && cd .. && flutter build web --wasm --profile cd thermion_flutter_federated/thermion_flutter/example/web && dart compile wasm main.dart && cd .. && flutter build web --wasm --profile
flutter-example-macos: flutter-example-macos:
cd thermion_flutter_federated/thermion_flutter/example/web && flutter run -d macos cd thermion_flutter_federated/thermion_flutter/example/web && flutter run -d macos
swift-bindings: swift-bindings:
swiftc -c thermion_flutter/thermion_flutter/macos/Classes/ThermionTexture.swift -module-name swift_module -emit-objc-header-path thermion_dart/native/include/generated/ThermionTextureSwiftObjCAPI.h -emit-library -o thermion_dart/test/libThermionTextureSwift.dylib swiftc -c thermion_dart/native/macos/ThermionTexture.swift -module-name swift_module -emit-objc-header-path thermion_dart/native/include/generated/ThermionTextureSwiftObjCAPI.h -emit-library -o thermion_dart/test/generated/libThermionTextureSwift.dylib
cd thermion_dart/ && dart --enable-experiment=native-assets run ffigen --config ffigen/swift.yaml cd thermion_dart/ && dart --enable-experiment=native-assets run ffigen --config ffigen/swift.yaml
bindings: bindings:
cd thermion_dart/ && dart --enable-experiment=native-assets run ffigen --config ffigen/native.yaml cd thermion_dart/ && dart --enable-experiment=native-assets run ffigen --config ffigen/native.yaml
shared:
cd thermion_dart/native && make
# We compile a small set of custom materials for various helpers (background image, gizmo, etc) # We compile a small set of custom materials for various helpers (background image, gizmo, etc)
# You must specify the `FILAMENT_PATH` environment variable, either the path /out/release # You must specify the `FILAMENT_PATH` environment variable, either the path /out/release
# eg: FILAMENT_PATH=/path/to/filament/out/release/bin make materials # eg: FILAMENT_PATH=/path/to/filament/out/release/bin make materials
# #
materials: FORCE materials: FORCE
ifndef FILAMENT_PATH
@echo "FILAMENT_PATH is not set"
else
@echo "Using Filament build from ${FILAMENT_PATH}" @echo "Using Filament build from ${FILAMENT_PATH}"
@for material in unlit image unlit_fixed_size grid; do \ ./materials/build.sh
${FILAMENT_PATH}/matc -a opengl -a metal -o materials/$$material.filamat materials/$$material.mat; \ endif
$(FILAMENT_PATH)/resgen -c -p $$material -x thermion_dart/native/include/material/ materials/$$material.filamat; \
echo '#include "'$$material'.h"' | cat - thermion_dart/native/include/material/$$material.c > thermion_dart/native/include/material/$$material.c.new; \
mv thermion_dart/native/include/material/$$material.c.new thermion_dart/native/include/material/$$material.c; \
done
#rm materials/*.filamat resources: FORCE
ifndef FILAMENT_PATH
@echo "FILAMENT_PATH is not set"
else
@echo "Using Filament build from ${FILAMENT_PATH}"
@for gizmo in translation rotation; do \
$(FILAMENT_PATH)/resgen -c -p $${gizmo}_gizmo_glb -x thermion_dart/native/include/resources assets/$${gizmo}_gizmo.glb || exit 1; \
echo '#include "'$${gizmo}_gizmo_glb.h'"' | cat - thermion_dart/native/include/resources/$${gizmo}_gizmo_glb.c > thermion_dart/native/include/resources/$${gizmo}_gizmo_glb.c.new; \
mv thermion_dart/native/include/resources/$${gizmo}_gizmo_glb.c.new thermion_dart/native/include/resources/$${gizmo}_gizmo_glb.c; \
done
endif
FORCE: ; FORCE: ;
+27 -40
View File
@@ -15,6 +15,8 @@
<a href="https://discord.gg/h2VdDK3EAQ"><img src="https://img.shields.io/discord/993167615587520602?logo=discord&logoColor=fff&labelColor=333940" alt="discord"></a> <a href="https://discord.gg/h2VdDK3EAQ"><img src="https://img.shields.io/discord/993167615587520602?logo=discord&logoColor=fff&labelColor=333940" alt="discord"></a>
<a href="https://github.com/nmfisher/thermion"><img src="https://img.shields.io/github/contributors/nmfisher/flutter_filament?logo=github&labelColor=333940" alt="contributors"></a> <a href="https://github.com/nmfisher/thermion"><img src="https://img.shields.io/github/contributors/nmfisher/flutter_filament?logo=github&labelColor=333940" alt="contributors"></a>
https://github.com/user-attachments/assets/b0c07b5a-6156-4e42-a09b-5f9bd85fbf32
### Features ### Features
- Supports iOS (arm64), MacOS (arm64/x64), Android (arm64), Windows (x64) (>= 10), Web/WASM - Supports iOS (arm64), MacOS (arm64/x64), Android (arm64), Windows (x64) (>= 10), Web/WASM
@@ -22,6 +24,8 @@
- camera/entity manipulation with mouse (desktop) and gestures (mobile) - camera/entity manipulation with mouse (desktop) and gestures (mobile)
- skinning + morph animations - skinning + morph animations
Uses the Filament PBR engine (currently v1.56.4).
### Quickstart (Flutter) ### Quickstart (Flutter)
From the command line: From the command line:
@@ -35,50 +39,32 @@ flutter config --enable-native-assets
In your Flutter app: In your Flutter app:
```dart ```dart
_thermionViewer = await ThermionFlutterPlugin.createViewer(); @override
// Geometry and models are represented as "entities". Here, we load a glTF
// file containing a plain cube.
// By default, all paths are treated as asset paths. To load from a file
// instead, use file:// URIs.
var entity =
await _thermionViewer!.loadGlb("assets/cube.glb", keepData: true);
// Thermion uses a right-handed coordinate system where +Y is up and -Z is
// "into" the screen.
// By default, the camera is located at (0,0,0) looking at (0,0,-1); this
// would place it directly inside the cube we just loaded.
//
// Let's move the camera to (0,0,10) to ensure the cube is visible in the
// viewport.
await _thermionViewer!.setCameraPosition(0, 0, 10);
// Without a light source, your scene will be totally black. Let's load a skybox
// (a cubemap image that is rendered behind everything else in the scene)
// and an image-based indirect light that has been precomputed from the same
// skybox.
await _thermionViewer!.loadSkybox("assets/default_env_skybox.ktx");
await _thermionViewer!.loadIbl("assets/default_env_ibl.ktx");
// Finally, you need to explicitly enable rendering. Setting rendering to
// false is designed to allow you to pause rendering to conserve battery life
await _thermionViewer!.setRendering(true);
```
and then in your widget tree:
```dart
@override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Stack(children: [ return Scaffold(
if (_thermionViewer != null) body: Stack(children: [
Positioned.fill( Positioned.fill(
child: ThermionWidget( child: ViewerWidget(
viewer: _thermionViewer!, assetPath: "assets/cube.glb",
)), skyboxPath: "assets/default_env_skybox.ktx",
]); iblPath: "assets/default_env_ibl.ktx",
transformToUnitCube: true,
initialCameraPosition: Vector3(0, 0, 6),
background: Colors.blue,
manipulatorType: ManipulatorType.ORBIT,
onViewerAvailable: (viewer) async {
await Future.delayed(const Duration(seconds: 5));
await viewer.removeSkybox();
},
initial: Container(
color: Colors.red,
),
))]));
} }
``` ```
> the first time you build an app that consumes this package, the Dart native-assets build system will download static binaries from Cloudflare. This may take a few minutes (depending on which platform you are compiling for). These will be cached, so subsequent builds will be much faster.
### Sponsors, Contributors & Acknowledgments ### Sponsors, Contributors & Acknowledgments
Thermion uses the [Filament](https://github.com/google/filament) Physically Based Rendering engine under the hood. Thermion uses the [Filament](https://github.com/google/filament) Physically Based Rendering engine under the hood.
@@ -92,4 +78,5 @@ Thank you to the following people:
- @daverin for MacOS library contributions - @daverin for MacOS library contributions
- @LukasPoque for CI/refactoring work - @LukasPoque for CI/refactoring work
- @alexmercerind for his work on integrating ANGLE textures on Flutter Windows - @alexmercerind for his work on integrating ANGLE textures on Flutter Windows
- @BrutalCoding for documentation fixes
- @chenriji for testing and bug fixes
Binary file not shown.
Binary file not shown.
+6
View File
@@ -7,15 +7,21 @@
"Getting Started", "Getting Started",
[ [
["Overview", "/"], ["Overview", "/"],
["Getting Started", "/getting_started"],
["Quick Start", "/quickstart"], ["Quick Start", "/quickstart"],
["Viewer", "/viewer"],
["Camera Manipulation", "/camera_manipulation"] ["Camera Manipulation", "/camera_manipulation"]
] ]
], ],
["Misc.", [ ["Misc.", [
["Debugging", "/debugging"],
["Playground", "https://dartpad.thermion.dev"], ["Playground", "https://dartpad.thermion.dev"],
["Showcase", "/showcase"], ["Showcase", "/showcase"],
["Windows", "/windows"], ["Windows", "/windows"],
["Android", "/android"], ["Android", "/android"],
["iOS", "/ios"],
["Web", "/web"],
["Linux", "/linux"],
["Contributing", "/contributing"], ["Contributing", "/contributing"],
["Discord", "https://discord.gg/h2VdDK3EAQ"] ["Discord", "https://discord.gg/h2VdDK3EAQ"]
]] ]]
-12
View File
@@ -12,15 +12,3 @@ Thermion requires Android SDK version 22, so change your `app/android/build.grad
} }
``` ```
### Shrink/Minify Resources
In release mode, you must add the following to your `app/build.gradle`:
```
buildTypes {
release {
shrinkResources false
minifyEnabled false
}
}
```
-63
View File
@@ -1,63 +0,0 @@
## Camera Manipulation (Flutter)
> You can find the entire project below in the [flutter/quickstart](https://github.com/nmfisher/thermion/examples/flutter/camera_manipulation) folder.
A `ThermionListenerWidget` is one option for manipulating the camera with an input device (e.g. mouse or touchscreen gestures).
This will generally wrap a `ThermionWidget`, meaning the entire viewport will act as a receiver for gesture events.
> You can position this independently (for example, stacked vertically beneath the viewport), but this will not translate picking queries correctly.
```
@override
Widget build(BuildContext context) {
return Stack(children: [
if (_thermionViewer != null)
Positioned.fill(
child: ThermionListenerWidget(
inputHandler:
DelegateInputHandler.fixedOrbit(_thermionViewer!)
..setActionForType(InputType.MMB_HOLD_AND_MOVE, InputAction.ROTATE)
..setActionForType(InputType.SCALE1, InputAction.ROTATE)
..setActionForType(InputType.SCALE2, InputAction.ZOOM)
..setActionForType(InputType.SCROLLWHEEL, InputAction.ZOOM),
child: ThermionWidget(
viewer: _thermionViewer!,
))),
]);
```
`ThermionListenerWidget` is a very simple widget; it simply forwards pointer, gesture and keyboard events to the provided [InputHandler], which must decide how to interpret those events.
For example, one [InputHandler] implementation might interpret mouse pointer movement as "rotate the camera", whereas a separate implementation might interpret it as "translate this specific entity".
Thermion provides two default InputHandler implementations for manipulating the camera: [DelegateInputHandler.fixedOrbit] and [DelegateInputHandler.flight].
[DelegateInputHandler.fixedOrbit] will rotate the camera in a fixed orbit around a target point (the origin, by default), and also allow zooming in/out (subject to a minimum distance, which is configurable).
By default, [DelegateInputHandler.fixedOrbit] will:
- rotate the camera when the middle mouse button is held and the pointer is moved (on desktop), and when a single swipe left/right/up/down is detected (on mobile)
- zoom the camera when the scroll wheel is scrolled up/down (on desktop), and when a pinch gesture is detected (on mobile)
You can change the action for a specific input type by calling `setActionForType`; for example, if you wanted to rotate the camera by moving the mouse pointer while holding the left mouse button, you would call:
```
setActionForType(InputType.LMB_HOLD_AND_MOVE, InputAction.ROTATE)
```
See the [InputType] and [InputAction] enums for available input types and actions.
[DelegateInputHandler.flight] will translate keyboard and mouse/touchscreen gestures to free flight camera manipulation.
By default:
- holding the middle mouse button will control the pitch/roll/yaw of the camera
- holding the left mouse button will pan the camera left/right/up/down
- the middle mouse button will zoom/dolly the camera in/out
- the WASD keys will pan the camera left/right/up/down and dolly the camera forward/backward
If these don't exactly fit your use case, you can create your own [InputHandler] implementation. If you think it would be useful to other users, please feel free to submit a PR for your implementation to be included in the base Thermion package.
+27
View File
@@ -0,0 +1,27 @@
# Debugging
If something is crashing or not working as expected, you can enable verbose logging and/or debug builds (particularly useful for debugging with lldb or getting legible stack traces):
Add a `hooks` section to your app's `pubspec.yaml`, e.g.
```
name: example_cli
description: A sample command-line application.
version: 1.0.0
environment:
sdk: ^3.3.0
# Add the below
hooks:
user_defines:
thermion_dart:
mode: debug
tracing: enabled
```
After changing the `hooks` section, make sure you run `flutter clean` to propagate the changes correctly.
> [!CAUTION]
> Debug builds won't work for Android. This is a known upstream issue with Filament.
Unless `mode: debug` is specified in your `pubspec.yaml`, Thermion will use release builds under the hood, even if your app is compiled/runing in debug mode.
+40
View File
@@ -0,0 +1,40 @@
## Getting Started
Thermion currently requires the Flutter `master` channel with the `native-assets` experiment enabled.
1. Switch to Flutter master channel, upgrade Flutter, create a new project, then add `thermion_flutter` as a dependency
```bash
$ flutter channel master
$ flutter upgrade
$ flutter config --enable-native-assets
$ cd your_flutter_project
$ flutter pub add thermion_flutter
```
2. If running on iOS or MacOS, change the minimum deployment target to OSX 13
<Accordion title="Click to open iOS/MacOS instructions">
Make sure the `platform` entry refers to `13.0` in your Podfile.
In `macos/Podfile` (for macOS):
```
platform :osx, '13.0'
```
In `ios/Podfile`, (for iOS):
```
platform :ios, '13.0'
```
Then open XCode:
```
open macos/Runner.xcworkspace
```
and change the minimum deployment target to 13.0:
![XCode screenshot](images/macos_min_deployment.png)
</Accordion>
+1 -1
View File
@@ -16,7 +16,7 @@ Thermion is divided into two packages:
With this structure, the Flutter-specific components are not coupled to the Dart components, meaning Thermion can be used for rendering in both Flutter and non-Flutter applications. With this structure, the Flutter-specific components are not coupled to the Dart components, meaning Thermion can be used for rendering in both Flutter and non-Flutter applications.
For example, Thermion ships with examples for rendering with Dart only (no Flutter) with a CLI/headless application on MacOS, and with a Javascript/WASM/HTML applicaiton in browsers. For example, Thermion ships with examples for rendering with Dart only (no Flutter) with a CLI/headless application on MacOS, and with a Javascript/WASM/HTML application in browsers.
`thermion_flutter` exports `thermion_dart`, so if you are working with a Flutter application, you will only need to import `thermion_fluttter`. `thermion_flutter` exports `thermion_dart`, so if you are working with a Flutter application, you will only need to import `thermion_fluttter`.
+55
View File
@@ -0,0 +1,55 @@
## iOS
### Min iOS version
Thermion requires a minimum iOS version of 13.0. When building a Flutter application, ensure your application's `ios/Podfile` contains the following:
```ruby
platform :ios, '13.0'
```
and in ios/Info.plist:
```xml
<key>LSMinimumSystemVersion</key>
<string>13.0</string>
```
When submitting to the App Store, you may encounter an error saying `thermion_dart.framework does not supported the minimum deployment target in Info.plist`.
This is because Flutter hardcodes a deployment target of iOS 12.0 when invoking the native assets build, which conflicts with actual requirement.
After running `flutter build ios` (but before archiving the build and submitting to the App Store), run the following script to replace the `MinimumOSVersion`:
```
#!/bin/zsh
# Array of directories containing Info.plist files
directories=(
"./build/ios/iphoneos/Runner.app/Frameworks/thermion_dart.framework"
"./build/ios/Release-iphoneos/Runner.app/Frameworks/thermion_dart.framework"
"./build/native_assets/ios/thermion_dart.framework"
)
# Loop through each directory
for dir in "${directories[@]}"; do
plist_path="$dir/Info.plist"
# Check if Info.plist exists in the directory
if [[ -f "$plist_path" ]]; then
echo "Processing: $plist_path"
# Use PlistBuddy to change the MinimumOSVersion
/usr/libexec/PlistBuddy -c "Set :MinimumOSVersion 13.0" "$plist_path" 2>/dev/null
if [[ $? -eq 0 ]]; then
echo "✓ Successfully updated version to 13.0"
else
echo "✗ Failed to update version in $plist_path"
fi
else
echo "✗ Info.plist not found in $dir"
fi
done
```
+10
View File
@@ -0,0 +1,10 @@
## Linux support
Currently, only the Dart package (`thermion_dart`) will work on Linux (primarily for the automated build/testing pipeline).
Filament has been built for Ubuntu 22.04; other distributions may work, but YMMV.
The Flutter package (`thermion_flutter`) won't work; it's missing the platform glue code necessary to set up the render target. Support will eventually be added, but there is currently no estimated timeline.
Contributions are welcome and it's actually not a lot of work. Join the Discord if you want to help out.
+172 -189
View File
@@ -1,216 +1,199 @@
## Quickstart (Flutter) # Quick Start
> You can find the entire project below in the [flutter/quickstart](https://github.com/nmfisher/thermion_examples/tree/master/flutter/quickstart) folder of the `thermion_examples` repository. If all you need is a quick and easy route to rendering a single 3D model in your Flutter application, start with `ViewerWidget`.
1. Switch to Flutter master channel, upgrade Flutter, create a new project, then add `thermion_flutter` as a dependency This is a simplified, Flutter-only wrapper around the underlying 3D rendering API with sane defaults for most people.
```bash `ViewerWidget` handles all the setup and configuration of the underlying Thermion API, including:
$ flutter channel master - Loading 3D models (glTF assets)
$ flutter upgrade - Configuring skyboxes and image-based lighting
$ flutter config --enable-native-assets - Setting up camera positions and manipulators
$ flutter create thermion_sample_project && cd thermion_sample_project - Managing the rendering lifecycle
$ flutter pub add thermion_flutter
```
2. If running on iOS or MacOS, change the minimum deployment target to OSX 13 ## Setup
<Accordion title="Click to open iOS/MacOS instructions"> Follow the steps listed in [Getting Started](./getting_started) to configure your Flutter installation and project.
Make sure the `platform` entry refers to `13.0` in your Podfile. If you're running Windows, delete the `examples/flutter/quickstart/assets` symlink and copy the `assets` folder from `examples/assets` to `examples/flutter/quickstart/assets`.
In `macos/Podfile` (for macOS): ## Basic Usage
```
platform :osx, '13.0'
```
In `ios/Podfile`, (for iOS):
```
platform :ios, '13.0'
```
Then open XCode:
```
open macos/Runner.xcworkspace
```
and change the minimum deployment target to 13.0:
![XCode screenshot](images/macos_min_deployment.png)
</Accordion>
2. Add a folder containing your assets (glTF model + skybox ktx) to your `pubspec.yaml` asset list
```yaml
...
flutter
uses-material-design: true
assets:
- assets/
```
3. Create an instance of `ThermionFlutterPlugin` in your app.
```dart ```dart
import 'package:flutter/material.dart';
import 'package:thermion_flutter/thermion_flutter.dart';
import 'path_to_your_viewer_widget.dart';
class _MyAppState extends State<MyApp> { class MyApp extends StatelessWidget {
  late ThermionFlutterPlugin _thermionFlutterPlugin;  @override
late Future<ThermionViewer> _thermionViewer; Widget build(BuildContext context) {
  void initState() {    return MaterialApp(
_thermionFlutterPlugin = ThermionFlutterPlugin();    home: Scaffold(
_thermionViewer = _thermionFlutterPlugin.createViewer();  body: ViewerWidget(
assetPath: 'assets/my_model.glb',
initialCameraPosition: Vector3(0, 0, 5),
manipulatorType: ManipulatorType.ORBIT,
),
),
);
} }
} }
``` ```
## Properties
4. Add a `ThermionWidget` to your widget hierarchy | Property | Type | Default | Description |
|----------|------|---------|-------------|
| `initial` | `Widget` | Red decorated box | Widget to display while the viewer is loading |
| `initialCameraPosition` | `Vector3` | `Vector3(0, 0, 5)` | The starting position for the camera (looking towards origin) |
| `showFpsCounter` | `bool` | `false` | Whether to show an FPS counter overlay |
| `assetPath` | `String?` | `null` | Path to the glTF asset to load |
| `skyboxPath` | `String?` | `null` | Path to a KTX skybox image |
| `iblPath` | `String?` | `null` | Path to a KTX image for image-based lighting |
| `directLightType` | `LightType?` | `null` | Type of direct light to add to the scene |
| `transformToUnitCube` | `bool` | `true` | If true, rescales the model to fit within a 1x1x1 cube |
| `postProcessing` | `bool` | `true` | Enables ACES tone mapping and basic anti-aliasing |
| `background` | `Color?` | `null` | Background color (not visible when skybox is provided) |
| `destroyEngineOnUnload` | `bool` | `false` | If true, disposes the engine when widget is disposed |
| `manipulatorType` | `ManipulatorType` | `ORBIT` | Type of camera control to use |
| `onViewerAvailable` | `Future Function(ThermionViewer)?` | `null` | Callback when viewer is ready |
## Camera Manipulators
`ViewerWidget` supports three different camera manipulation modes:
- `ManipulatorType.NONE`: No camera controls, static view
- `ManipulatorType.ORBIT`: Orbit controls (pinch to zoom, swipe to rotate)
- `ManipulatorType.FREE_FLIGHT`: Free flight controls for unrestricted movement
Example:
```dart ```dart
ViewerWidget(
assetPath: 'assets/model.glb',
manipulatorType: ManipulatorType.FREE_FLIGHT,
)
```
class _MyAppState extends State<MyApp> { ## Lighting
You can set up lighting in multiple ways:
### Image-Based Lighting
```dart
ViewerWidget(
assetPath: 'assets/model.glb',
iblPath: 'assets/environment.ktx',
)
```
### Direct Light
```dart
ViewerWidget(
assetPath: 'assets/model.glb',
directLightType: LightType.SUN,
)
```
## Advanced Usage
### Accessing the Viewer
You can get access to the underlying `ThermionViewer` object for more advanced control:
```dart
ViewerWidget(
assetPath: 'assets/model.glb',
onViewerAvailable: (viewer) async {
// Now you can use the viewer directly
final camera = await viewer.getActiveCamera();
await camera.lookAt(Vector3(0, 1, 5));
ThermionViewer? _thermionViewer; // Add custom lights, manipulate materials, etc.
void initState() {    },
_thermionFlutterPlugin.createViewer().then((viewer) { )
setState(() { ```
_thermionViewer = viewer;
});
});
}   
Widget build(BuildContext context) { ### Changing Manipulator at Runtime
return Stack(children:[
if(_thermionViewer != null) The `manipulatorType` is the only property that can be changed after the widget is created:
    Positioned.fill(
child:ThermionWidget( ```dart
plugin:_thermionViewer! class _MyWidgetState extends State<MyWidget> {
        )  ManipulatorType _manipulatorType = ManipulatorType.ORBIT;
    )
    ]);  @override
} Widget build(BuildContext context) {
return Column(
children: [
Expanded(
child: ViewerWidget(
assetPath: 'assets/model.glb',
manipulatorType: _manipulatorType,
),
),
Row(
children: [
ElevatedButton(
onPressed: () {
setState(() {
_manipulatorType = ManipulatorType.ORBIT;
});
},
child: Text('Orbit'),
),
ElevatedButton(
onPressed: () {
setState(() {
_manipulatorType = ManipulatorType.FREE_FLIGHT;
});
},
child: Text('Free Flight'),
),
],
),
],
);
}
} }
``` ```
4. Add a button to load the model when pressed ## Limitations
- Only the `manipulatorType` property can be changed at runtime. For any other property changes, create a new widget.
- The widget requires that you have the correct environment setup for Thermion (Flutter master channel with native assets enabled).
## Example
Here's a complete example showing how to use `ViewerWidget` with multiple configuration options:
```dart ```dart
import 'package:flutter/material.dart';
import 'package:thermion_flutter/thermion_flutter.dart';
import 'package:vector_math/vector_math_64.dart';
... class ModelViewer extends StatelessWidget {
@override
class _MyAppState extends State<MyApp> { Widget build(BuildContext context) {
return Scaffold(
... appBar: AppBar(title: Text('3D Model Viewer')),
body: ViewerWidget(
bool _loaded = false; assetPath: 'assets/robot.glb',
skyboxPath: 'assets/studio_skybox.ktx',
Widget build(BuildContext context) { iblPath: 'assets/studio_ibl.ktx',
return Stack(children:[ initialCameraPosition: Vector3(0, 1.5, 3),
    if(_thermionViewer != null) manipulatorType: ManipulatorType.ORBIT,
    Positioned.fill( showFpsCounter: true,
child:ThermionWidget( background: Colors.grey,
plugin:_thermionViewer! postProcessing: true,
        )  transformToUnitCube: true,
    ), onViewerAvailable: (viewer) async {
if (!_loaded) // You can perform additional setup here
Center( print('Viewer is ready!');
child: ElevatedButton( },
child: const Text("Load"), ),
onPressed: () async { );
// TODO }
_loaded = true;
setState(() {});
}))
    ]); 
}}
```
5. When the button is pressed, load a skybox, lighting and the glb asset
You will need to import the `dart:math` and `package:vector_math` libraries.
```dart
import 'package:vector_math/vector_math_64.dart' as v;
import 'dart:math';
...
class _MyAppState extends State<MyApp> {
...
Widget build(BuildContext context) {
return Stack(children:[
...
if(!_loaded)
Center(
child: ElevatedButton(
child: const Text("Load"),
onPressed: () async {
var viewer = await _thermionViewer;
await viewer.loadIbl("assets/default_env_ibl.ktx");
await viewer.loadSkybox("assets/default_env_skybox.ktx");
await viewer.loadGlb("assets/cube.glb");
await viewer.setCameraPosition(0, 1, 10);
await viewer.setCameraRotation(v.Quaternion.axisAngle(
v.Vector3(1, 0, 0), -30 / 180 * pi) *
v.Quaternion.axisAngle(v.Vector3(0, 1, 0), 15 / 180 * pi));
await viewer.addLight(
LightType.SUN, 7500, 50000, 0, 0, 0, 1, -1, -1);
await viewer.setRendering(true);
_loaded = true;
setState(() {});
}
)
)
]);
}
} }
``` ```
Here, we've added a skybox (the background (cube) image rendered behind all other elements in the scene), image-based lighting (where an image is used to determine the direction and intensity of a light source) and a directional light (Sun).
Anything added to the scene is referred to as an "entity" (including lights and cameras).
Entities are always added to the scene at position (0,0,0).
The default scene camera is located at (0,0,0) (and is looking at -Z, or "into" the screen), so by adding a cube at (0,0,0), the camera will now be inside the cube.
We need to move the camera outside the cube so it's visible.
6. Change the camera orientation
```dart
var viewer = await _thermionViewer;
await viewer.loadSkybox("assets/default_env_skybox.ktx");
await viewer.loadGlb("assets/cube.glb");
await viewer.setCameraPosition(0, 1, 10);
await viewer.setCameraRotation(v.Quaternion.axisAngle(
v.Vector3(1, 0, 0), -30 / 180 * pi) *
v.Quaternion.axisAngle(v.Vector3(0, 1, 0), 15 / 180 * pi));
```
The cube still won't be visible until we add a light to the scene and tell Thermion to start rendering.
7. Add a light and turn rendering on
```dart
...
await viewer.addLight(
LightType.SUN, 7500, 50000, 0, 0, 0, 1, -1, -1);
await viewer.setRendering(true);
...
````
8. Run the project
```
$ flutter run -d macos
```
> You may experience a noticeable delay the very first time you run the project. Don't panic, it's not frozen! This is due to the build system downloading the prebuilt Filament binaries from Cloudflare, which can take some time (particularly on Windows). These binaries will be cached after first download, so subsequent runs will be much faster (though every time you run flutter clean, the binaries will be re-downloaded).
![Screenshot of Thermion Quickstart project](images/thermion_sample_project.png)
Your first Thermion project is complete!
+9 -1
View File
@@ -1,18 +1,25 @@
## Showcase ## Showcase
## KTX Viewer
https://ktxviewer.com
A basic HTML + Dart site for viewing KTX textures in browser.
## DartPad Playground ## DartPad Playground
A custom DartPad that lets you experiment with Thermion from your browser (currently, only Chrome is supported). A custom DartPad that lets you experiment with Thermion from your browser (currently, only Chrome is supported).
[![Screenshot of Thermion Dartpad](images/dartpad.thermion.dev_.png)](https://dartpad.thermion.dev) [![Screenshot of Thermion Dartpad](images/dartpad.thermion.dev_.png)](https://dartpad.thermion.dev)
(Outdated, needs to be upgraded to Thermion `0.3.0`);
## mixreel (Flutter/Web) ## mixreel (Flutter/Web)
Create 3D worlds and translate to AI video. Create 3D worlds and translate to AI video.
[![Screenshot of the mixreeel app](images/ixlabs.app_app.png)](https://mixreel.ai) [![Screenshot of the mixreeel app](images/ixlabs.app_app.png)](https://mixreel.ai)
## Nick Fisher ## Nick Fisher
My personal website, where I create an interactive clone of myself with Avaturn & Cartesia (no Flutter, made with Thermion and the [Jaspr Dart UI framework](https://github.com/schultek/jaspr)). My personal website, where I create an interactive clone of myself with Avaturn & Cartesia (no Flutter, made with Thermion and the [Jaspr Dart UI framework](https://github.com/schultek/jaspr)).
@@ -21,3 +28,4 @@ My personal website, where I create an interactive clone of myself with Avaturn
+186
View File
@@ -0,0 +1,186 @@
## ThermionViewer (Flutter)
If you just want to display a 3D object in the viewport with some basic camera controls, use the [ViewerWidget described in the Quickstart section](./quickstart).
If you need want more fine-grained control
> You can find the entire project below in the [examples/flutter/viewer](https://github.com/nmfisher/thermion/tree/master/examples/flutter/viewer) folder of the repository.
2. Add a folder containing your assets (glTF model + skybox ktx) to your `pubspec.yaml` asset list
```yaml
...
flutter
assets:
- assets/
```
3. Create an instance of `ThermionFlutterPlugin` in your app.
```dart
class _MyAppState extends State<MyApp> {
late Future<ThermionViewer> _thermionViewer;
  void initState() {   
ThermionFlutterPlugin.createViewer().then((viewer) {
_thermionViewer = viewer;
});
}
}
```
4. Add a `ThermionWidget` to your widget hierarchy
```dart
class _MyAppState extends State<MyApp> {
ThermionViewer? _thermionViewer;
void initState() {   
_thermionFlutterPlugin.createViewer().then((viewer) {
setState(() {
_thermionViewer = viewer;
});
});
}   
Widget build(BuildContext context) {
return Stack(children:[
if(_thermionViewer != null)
    Positioned.fill(
child:ThermionWidget(
plugin:_thermionViewer!
        ) 
    )
    ]); 
}
}
```
4. Add a button to load the model when pressed
```dart
...
class _MyAppState extends State<MyApp> {
...
bool _loaded = false;
Widget build(BuildContext context) {
return Stack(children:[
    if(_thermionViewer != null)
    Positioned.fill(
child:ThermionWidget(
plugin:_thermionViewer!
        ) 
    ),
if (!_loaded)
Center(
child: ElevatedButton(
child: const Text("Load"),
onPressed: () async {
// TODO
_loaded = true;
setState(() {});
}))
    ]); 
}}
```
5. When the button is pressed, load a skybox, lighting and the glb asset
You will need to import the `dart:math` and `package:vector_math` libraries.
```dart
import 'package:vector_math/vector_math_64.dart' as v;
import 'dart:math';
...
class _MyAppState extends State<MyApp> {
...
Widget build(BuildContext context) {
return Stack(children:[
...
if(!_loaded)
Center(
child: ElevatedButton(
child: const Text("Load"),
onPressed: () async {
var viewer = await _thermionViewer;
await viewer.loadIbl("assets/default_env_ibl.ktx");
await viewer.loadSkybox("assets/default_env_skybox.ktx");
await viewer.loadGlb("assets/cube.glb");
await viewer.setCameraPosition(0, 1, 10);
await viewer.setCameraRotation(v.Quaternion.axisAngle(
v.Vector3(1, 0, 0), -30 / 180 * pi) *
v.Quaternion.axisAngle(v.Vector3(0, 1, 0), 15 / 180 * pi));
await viewer.addLight(
LightType.SUN, 7500, 50000, 0, 0, 0, 1, -1, -1);
await viewer.setRendering(true);
_loaded = true;
setState(() {});
}
)
)
]);
}
}
```
Here, we've added a skybox (the background (cube) image rendered behind all other elements in the scene), image-based lighting (where an image is used to determine the direction and intensity of a light source) and a directional light (Sun).
Anything added to the scene is referred to as an "entity" (including lights and cameras).
Entities are always added to the scene at position (0,0,0).
The default scene camera is located at (0,0,0) (and is looking at -Z, or "into" the screen), so by adding a cube at (0,0,0), the camera will now be inside the cube.
We need to move the camera outside the cube so it's visible.
6. Change the camera orientation
```dart
var viewer = await _thermionViewer;
await viewer.loadSkybox("assets/default_env_skybox.ktx");
await viewer.loadGlb("assets/cube.glb");
await viewer.setCameraPosition(0, 1, 10);
await viewer.setCameraRotation(v.Quaternion.axisAngle(
v.Vector3(1, 0, 0), -30 / 180 * pi) *
v.Quaternion.axisAngle(v.Vector3(0, 1, 0), 15 / 180 * pi));
```
The cube still won't be visible until we add a light to the scene and tell Thermion to start rendering.
7. Add a light and turn rendering on
```dart
...
await viewer.addLight(
LightType.SUN, 7500, 50000, 0, 0, 0, 1, -1, -1);
await viewer.setRendering(true);
...
````
8. Run the project
```
$ flutter run -d macos
```
> You may experience a noticeable delay the very first time you run the project. Don't panic, it's not frozen! This is due to the build system downloading the prebuilt Filament binaries from Cloudflare, which can take some time (particularly on Windows). These binaries will be cached after first download, so subsequent runs will be much faster (though every time you run flutter clean, the binaries will be re-downloaded).
![Screenshot of Thermion Quickstart project](images/thermion_sample_project.png)
Your first Thermion project is complete!
+42
View File
@@ -0,0 +1,42 @@
## Web
Web support is still experimental and currently requires you to manually compile Thermion to WASM first.
Requirements:
1) GNU Make
2) CMake
3) Emscripten
From the project root directory
```
thermion % ls -l
total 272
drwxr-xr-x 4 nickfisher staff 128 Jul 3 14:06 assets
-rw-r--r-- 1 nickfisher staff 84532 Jul 3 14:06 CHANGELOG.md
-rw-r--r-- 1 nickfisher staff 2349 Jul 3 14:06 Dockerfile
drwxr-xr-x 19 nickfisher staff 608 Jul 3 14:06 docs
-rw-r--r-- 1 nickfisher staff 748 Jul 3 14:06 docs.json
drwxr-xr-x 7 nickfisher staff 224 Jan 8 17:01 examples
-rw-r--r-- 1 nickfisher staff 11341 Oct 23 2024 LICENSE
-rw-r--r-- 1 nickfisher staff 2161 Jul 3 14:06 Makefile
drwxr-xr-x@ 13 nickfisher staff 416 Jul 3 14:06 materials
-rw-r--r--@ 1 nickfisher staff 517 Oct 23 2024 melos_thermion_workspace.iml
-rw-r--r-- 1 nickfisher staff 77 Oct 23 2024 melos.yaml
-rw-r--r--@ 1 nickfisher staff 9865 Jul 1 13:03 pubspec.lock
-rw-r--r-- 1 nickfisher staff 97 Jun 12 11:38 pubspec.yaml
-rw-r--r-- 1 nickfisher staff 3355 Jul 3 14:06 README.md
drwxr-xr-x@ 22 nickfisher staff 704 Jul 3 14:06 thermion_dart
drwxr-xr-x 7 nickfisher staff 224 Jul 3 14:06 thermion_flutter
thermion % make wasm
```
### Flutter
Copy thermion_dart.js and thermion_dart.wasm to the `/web` folder for your target app.
```
flutter run -d chrome --web-header Cross-Origin-Embedder-Policy=require-corp --web-header Cross-Origin-Opener-Policy=same-origin
```
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+121
View File
@@ -0,0 +1,121 @@
{
"asset":{
"generator":"Khronos glTF Blender I/O v4.2.60",
"version":"2.0"
},
"scene":0,
"scenes":[
{
"name":"Scene",
"nodes":[
0
]
}
],
"nodes":[
{
"mesh":0,
"name":"Cube"
}
],
"materials":[
{
"doubleSided":true,
"name":"Material",
"pbrMetallicRoughness":{
"baseColorFactor":[
0.800000011920929,
0.800000011920929,
0.800000011920929,
1
],
"metallicFactor":0,
"roughnessFactor":0.5
}
}
],
"meshes":[
{
"name":"Cube",
"primitives":[
{
"attributes":{
"POSITION":0,
"NORMAL":1,
"TEXCOORD_0":2
},
"indices":3,
"material":0
}
]
}
],
"accessors":[
{
"bufferView":0,
"componentType":5126,
"count":24,
"max":[
1,
1,
1
],
"min":[
-1,
-1,
-1
],
"type":"VEC3"
},
{
"bufferView":1,
"componentType":5126,
"count":24,
"type":"VEC3"
},
{
"bufferView":2,
"componentType":5126,
"count":24,
"type":"VEC2"
},
{
"bufferView":3,
"componentType":5123,
"count":36,
"type":"SCALAR"
}
],
"bufferViews":[
{
"buffer":0,
"byteLength":288,
"byteOffset":0,
"target":34962
},
{
"buffer":0,
"byteLength":288,
"byteOffset":288,
"target":34962
},
{
"buffer":0,
"byteLength":192,
"byteOffset":576,
"target":34962
},
{
"buffer":0,
"byteLength":72,
"byteOffset":768,
"target":34963
}
],
"buffers":[
{
"byteLength":840,
"uri":"cube.bin"
}
]
}

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

+183
View File
@@ -0,0 +1,183 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="200"
height="200"
viewBox="0 0 1 1"
version="1.1"
id="svg10"
sodipodi:docname="cube_texture2.svg"
inkscape:export-filename="cube_texture_512x512.png"
inkscape:export-xdpi="245.75999"
inkscape:export-ydpi="245.75999"
inkscape:version="1.4 (e7c3feb1, 2024-10-09)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs10" />
<sodipodi:namedview
id="namedview10"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:zoom="1.5185118"
inkscape:cx="255.18405"
inkscape:cy="172.86662"
inkscape:window-width="1920"
inkscape:window-height="964"
inkscape:window-x="0"
inkscape:window-y="25"
inkscape:window-maximized="1"
inkscape:current-layer="svg10"
showgrid="false" />
<!-- Background Grid (optional, for visual aid) -->
<rect
x="0"
y="0"
width="1"
height="1"
fill="#f0f0f0"
id="rect1" />
<line
x1="0.333"
y1="0"
x2="0.333"
y2="1"
stroke="#ccc"
stroke-width="0.005"
id="line1" />
<line
x1="0.666"
y1="0"
x2="0.666"
y2="1"
stroke="#ccc"
stroke-width="0.005"
id="line2" />
<line
y1="0.25"
x1="0"
y2="0.25"
x2="1"
stroke="#ccc"
stroke-width="0.005"
id="line3" />
<line
y1="0.5"
x1="0"
y2="0.5"
x2="1"
stroke="#ccc"
stroke-width="0.005"
id="line4" />
<line
y1="0.75"
x1="0"
y2="0.75"
x2="1"
stroke="#ccc"
stroke-width="0.005"
id="line5" />
<!-- Front Face -->
<rect
x="0.333"
y="0"
width="0.333"
height="0.25"
fill="#ff0000"
id="rect5" />
<text
x="0.5"
y="0.125"
text-anchor="middle"
dominant-baseline="middle"
font-size="0.1"
fill="white"
id="text5">Front</text>
<!-- Back Face -->
<rect
x="0.333"
y="0.5"
width="0.333"
height="0.25"
fill="#00ff00"
id="rect6" />
<text
x="0.5"
y="0.625"
text-anchor="middle"
dominant-baseline="middle"
font-size="0.1"
fill="white"
id="text6">Back</text>
<!-- Top Face -->
<rect
x="0.666"
y="0.25"
width="0.333"
height="0.25"
fill="#0000ff"
id="rect7" />
<text
x="0.833"
y="0.375"
text-anchor="middle"
dominant-baseline="middle"
font-size="0.1"
fill="white"
id="text7">Top</text>
<!-- Bottom Face -->
<rect
x="0"
y="0.25"
width="0.333"
height="0.25"
fill="#ffff00"
id="rect8" />
<text
x="0.15610458"
y="0.37936932"
text-anchor="middle"
dominant-baseline="middle"
font-size="0.0733811px"
fill="#000000"
id="text8"
style="stroke-width:0.733811">Bottom</text>
<!-- Right Face -->
<rect
x="0.333"
y="0.25"
width="0.333"
height="0.25"
fill="#ff00ff"
id="rect9" />
<text
x="0.5"
y="0.375"
text-anchor="middle"
dominant-baseline="middle"
font-size="0.1"
fill="white"
id="text9">Right</text>
<!-- Left Face -->
<rect
x="0.333"
y="0.75"
width="0.333"
height="0.25"
fill="#00ffff"
id="rect10" />
<text
x="0.5"
y="0.875"
text-anchor="middle"
dominant-baseline="middle"
font-size="0.1"
fill="black"
id="text10">Left</text>
</svg>

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 960 KiB

+1
View File
@@ -0,0 +1 @@
{"asset":{"version":"2.0","generator":"babylon.js glTF exporter for 3dsmax 2021 v20210607.3"},"scene":0,"scenes":[{"nodes":[0]}],"nodes":[{"mesh":0,"translation":[0.0,-1.14751673,-5.015955E-08],"name":"Cylinder001"}],"meshes":[{"primitives":[{"attributes":{"POSITION":1,"NORMAL":2,"TEXCOORD_0":3},"indices":0,"material":0},{"attributes":{"POSITION":5,"NORMAL":6,"TEXCOORD_0":7},"indices":4,"material":1},{"attributes":{"POSITION":9,"NORMAL":10,"TEXCOORD_0":11},"indices":8,"material":2},{"attributes":{"POSITION":13,"NORMAL":14,"TEXCOORD_0":15},"indices":12,"material":3},{"attributes":{"POSITION":17,"NORMAL":18,"TEXCOORD_0":19},"indices":16,"material":4}],"name":"Cylinder001"}],"accessors":[{"bufferView":0,"componentType":5123,"count":858,"type":"SCALAR","name":"accessorIndices"},{"bufferView":1,"componentType":5126,"count":858,"max":[0.9673312,-0.0665806457,0.9673312],"min":[-0.9673312,-0.09678768,-0.9673312],"type":"VEC3","name":"accessorPositions"},{"bufferView":1,"byteOffset":10296,"componentType":5126,"count":858,"type":"VEC3","name":"accessorNormals"},{"bufferView":2,"componentType":5126,"count":858,"type":"VEC2","name":"accessorUVs"},{"bufferView":0,"byteOffset":1716,"componentType":5123,"count":14592,"type":"SCALAR","name":"accessorIndices"},{"bufferView":1,"byteOffset":20592,"componentType":5126,"count":14592,"max":[1.01214123,2.33892131,1.02725148],"min":[-1.01214123,-0.09678768,-1.01214123],"type":"VEC3","name":"accessorPositions"},{"bufferView":1,"byteOffset":195696,"componentType":5126,"count":14592,"type":"VEC3","name":"accessorNormals"},{"bufferView":2,"byteOffset":6864,"componentType":5126,"count":14592,"type":"VEC2","name":"accessorUVs"},{"bufferView":0,"byteOffset":30900,"componentType":5123,"count":1620,"type":"SCALAR","name":"accessorIndices"},{"bufferView":1,"byteOffset":370800,"componentType":5126,"count":1620,"max":[1.006612,2.3633275,1.006612],"min":[-1.006612,2.338921,-1.006612],"type":"VEC3","name":"accessorPositions"},{"bufferView":1,"byteOffset":390240,"componentType":5126,"count":1620,"type":"VEC3","name":"accessorNormals"},{"bufferView":2,"byteOffset":123600,"componentType":5126,"count":1620,"type":"VEC2","name":"accessorUVs"},{"bufferView":0,"byteOffset":34140,"componentType":5123,"count":318,"type":"SCALAR","name":"accessorIndices"},{"bufferView":1,"byteOffset":409680,"componentType":5126,"count":318,"max":[0.9454922,2.3548696,0.9454922],"min":[-0.9454921,0.0617354736,-0.945492268],"type":"VEC3","name":"accessorPositions"},{"bufferView":1,"byteOffset":413496,"componentType":5126,"count":318,"type":"VEC3","name":"accessorNormals"},{"bufferView":2,"byteOffset":136560,"componentType":5126,"count":318,"type":"VEC2","name":"accessorUVs"},{"bufferView":0,"byteOffset":34776,"componentType":5123,"count":11520,"type":"SCALAR","name":"accessorIndices"},{"bufferView":1,"byteOffset":417312,"componentType":5126,"count":11520,"max":[0.196413681,2.12139344,1.90955186],"min":[-0.196414649,0.165008187,1.00927675],"type":"VEC3","name":"accessorPositions"},{"bufferView":1,"byteOffset":555552,"componentType":5126,"count":11520,"type":"VEC3","name":"accessorNormals"},{"bufferView":2,"byteOffset":139104,"componentType":5126,"count":11520,"type":"VEC2","name":"accessorUVs"}],"bufferViews":[{"buffer":0,"byteLength":57816,"name":"bufferViewScalar"},{"buffer":0,"byteOffset":57816,"byteLength":693792,"byteStride":12,"name":"bufferViewFloatVec3"},{"buffer":0,"byteOffset":751608,"byteLength":231264,"byteStride":8,"name":"bufferViewFloatVec2"}],"buffers":[{"uri":"model.bin","byteLength":982872}],"materials":[{"pbrMetallicRoughness":{"metallicFactor":0.0,"roughnessFactor":0.9},"doubleSided":true,"name":"01 - Default"},{"pbrMetallicRoughness":{"baseColorTexture":{"index":0},"metallicFactor":0.0,"roughnessFactor":0.9},"doubleSided":true,"name":"02 - Default"},{"pbrMetallicRoughness":{"baseColorFactor":[0.0,1.0,0.117647067,1.0],"metallicFactor":0.0,"roughnessFactor":0.9},"doubleSided":true,"name":"03 - Default"},{"pbrMetallicRoughness":{"baseColorFactor":[0.2784314,0.0,0.9921569,1.0],"metallicFactor":0.0,"roughnessFactor":0.9},"doubleSided":true,"name":"04 - Default"},{"pbrMetallicRoughness":{"baseColorFactor":[0.9725491,0.776470661,0.0,1.0],"metallicFactor":0.0,"roughnessFactor":0.9},"doubleSided":true,"name":"05 - Default"}],"textures":[{"sampler":0,"source":0,"name":"texture.jpg"}],"images":[{"uri":"./texture.jpg"}],"samplers":[{"magFilter":9729,"minFilter":9987}]}
Binary file not shown.

After

Width:  |  Height:  |  Size: 720 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 312 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 MiB

Binary file not shown.
+270
View File
@@ -0,0 +1,270 @@
7767517
268 473
Input input.1 0 1 data
Convolution Conv_0 1 1 data 193 0=64 1=3 4=1 5=1 6=1728
Split splitncnn_0 1 8 193 193_splitncnn_0 193_splitncnn_1 193_splitncnn_2 193_splitncnn_3 193_splitncnn_4 193_splitncnn_5 193_splitncnn_6 193_splitncnn_7
Convolution Conv_1 1 1 193_splitncnn_7 195 0=32 1=3 4=1 5=1 6=18432 9=2 -23310=1,2.000000e-01
Split splitncnn_1 1 4 195 195_splitncnn_0 195_splitncnn_1 195_splitncnn_2 195_splitncnn_3
Concat Concat_3 2 1 193_splitncnn_6 195_splitncnn_3 196
Convolution Conv_4 1 1 196 198 0=32 1=3 4=1 5=1 6=27648 9=2 -23310=1,2.000000e-01
Split splitncnn_2 1 3 198 198_splitncnn_0 198_splitncnn_1 198_splitncnn_2
Concat Concat_6 3 1 193_splitncnn_5 195_splitncnn_2 198_splitncnn_2 199
Convolution Conv_7 1 1 199 201 0=32 1=3 4=1 5=1 6=36864 9=2 -23310=1,2.000000e-01
Split splitncnn_3 1 2 201 201_splitncnn_0 201_splitncnn_1
Concat Concat_9 4 1 193_splitncnn_4 195_splitncnn_1 198_splitncnn_1 201_splitncnn_1 202
Convolution Conv_10 1 1 202 204 0=32 1=3 4=1 5=1 6=46080 9=2 -23310=1,2.000000e-01
Concat Concat_12 5 1 193_splitncnn_3 195_splitncnn_0 198_splitncnn_0 201_splitncnn_0 204 205
Convolution Conv_13 1 1 205 206 0=64 1=3 4=1 5=1 6=110592
Eltwise Add_16 2 1 206 193_splitncnn_2 209 0=1 -23301=2,2.000000e-01,1.000000e+00
Split splitncnn_4 1 6 209 209_splitncnn_0 209_splitncnn_1 209_splitncnn_2 209_splitncnn_3 209_splitncnn_4 209_splitncnn_5
Convolution Conv_17 1 1 209_splitncnn_5 211 0=32 1=3 4=1 5=1 6=18432 9=2 -23310=1,2.000000e-01
Split splitncnn_5 1 4 211 211_splitncnn_0 211_splitncnn_1 211_splitncnn_2 211_splitncnn_3
Concat Concat_19 2 1 209_splitncnn_4 211_splitncnn_3 212
Convolution Conv_20 1 1 212 214 0=32 1=3 4=1 5=1 6=27648 9=2 -23310=1,2.000000e-01
Split splitncnn_6 1 3 214 214_splitncnn_0 214_splitncnn_1 214_splitncnn_2
Concat Concat_22 3 1 209_splitncnn_3 211_splitncnn_2 214_splitncnn_2 215
Convolution Conv_23 1 1 215 217 0=32 1=3 4=1 5=1 6=36864 9=2 -23310=1,2.000000e-01
Split splitncnn_7 1 2 217 217_splitncnn_0 217_splitncnn_1
Concat Concat_25 4 1 209_splitncnn_2 211_splitncnn_1 214_splitncnn_1 217_splitncnn_1 218
Convolution Conv_26 1 1 218 220 0=32 1=3 4=1 5=1 6=46080 9=2 -23310=1,2.000000e-01
Concat Concat_28 5 1 209_splitncnn_1 211_splitncnn_0 214_splitncnn_0 217_splitncnn_0 220 221
Convolution Conv_29 1 1 221 222 0=64 1=3 4=1 5=1 6=110592
Eltwise Add_32 2 1 222 209_splitncnn_0 225 0=1 -23301=2,2.000000e-01,1.000000e+00
Split splitncnn_8 1 6 225 225_splitncnn_0 225_splitncnn_1 225_splitncnn_2 225_splitncnn_3 225_splitncnn_4 225_splitncnn_5
Convolution Conv_33 1 1 225_splitncnn_5 227 0=32 1=3 4=1 5=1 6=18432 9=2 -23310=1,2.000000e-01
Split splitncnn_9 1 4 227 227_splitncnn_0 227_splitncnn_1 227_splitncnn_2 227_splitncnn_3
Concat Concat_35 2 1 225_splitncnn_4 227_splitncnn_3 228
Convolution Conv_36 1 1 228 230 0=32 1=3 4=1 5=1 6=27648 9=2 -23310=1,2.000000e-01
Split splitncnn_10 1 3 230 230_splitncnn_0 230_splitncnn_1 230_splitncnn_2
Concat Concat_38 3 1 225_splitncnn_3 227_splitncnn_2 230_splitncnn_2 231
Convolution Conv_39 1 1 231 233 0=32 1=3 4=1 5=1 6=36864 9=2 -23310=1,2.000000e-01
Split splitncnn_11 1 2 233 233_splitncnn_0 233_splitncnn_1
Concat Concat_41 4 1 225_splitncnn_2 227_splitncnn_1 230_splitncnn_1 233_splitncnn_1 234
Convolution Conv_42 1 1 234 236 0=32 1=3 4=1 5=1 6=46080 9=2 -23310=1,2.000000e-01
Concat Concat_44 5 1 225_splitncnn_1 227_splitncnn_0 230_splitncnn_0 233_splitncnn_0 236 237
Convolution Conv_45 1 1 237 238 0=64 1=3 4=1 5=1 6=110592
Eltwise Add_48 2 1 238 225_splitncnn_0 241 0=1 -23301=2,2.000000e-01,1.000000e+00
Eltwise Add_51 2 1 241 193_splitncnn_1 244 0=1 -23301=2,2.000000e-01,1.000000e+00
Split splitncnn_12 1 7 244 244_splitncnn_0 244_splitncnn_1 244_splitncnn_2 244_splitncnn_3 244_splitncnn_4 244_splitncnn_5 244_splitncnn_6
Convolution Conv_52 1 1 244_splitncnn_6 246 0=32 1=3 4=1 5=1 6=18432 9=2 -23310=1,2.000000e-01
Split splitncnn_13 1 4 246 246_splitncnn_0 246_splitncnn_1 246_splitncnn_2 246_splitncnn_3
Concat Concat_54 2 1 244_splitncnn_5 246_splitncnn_3 247
Convolution Conv_55 1 1 247 249 0=32 1=3 4=1 5=1 6=27648 9=2 -23310=1,2.000000e-01
Split splitncnn_14 1 3 249 249_splitncnn_0 249_splitncnn_1 249_splitncnn_2
Concat Concat_57 3 1 244_splitncnn_4 246_splitncnn_2 249_splitncnn_2 250
Convolution Conv_58 1 1 250 252 0=32 1=3 4=1 5=1 6=36864 9=2 -23310=1,2.000000e-01
Split splitncnn_15 1 2 252 252_splitncnn_0 252_splitncnn_1
Concat Concat_60 4 1 244_splitncnn_3 246_splitncnn_1 249_splitncnn_1 252_splitncnn_1 253
Convolution Conv_61 1 1 253 255 0=32 1=3 4=1 5=1 6=46080 9=2 -23310=1,2.000000e-01
Concat Concat_63 5 1 244_splitncnn_2 246_splitncnn_0 249_splitncnn_0 252_splitncnn_0 255 256
Convolution Conv_64 1 1 256 257 0=64 1=3 4=1 5=1 6=110592
Eltwise Add_67 2 1 257 244_splitncnn_1 260 0=1 -23301=2,2.000000e-01,1.000000e+00
Split splitncnn_16 1 6 260 260_splitncnn_0 260_splitncnn_1 260_splitncnn_2 260_splitncnn_3 260_splitncnn_4 260_splitncnn_5
Convolution Conv_68 1 1 260_splitncnn_5 262 0=32 1=3 4=1 5=1 6=18432 9=2 -23310=1,2.000000e-01
Split splitncnn_17 1 4 262 262_splitncnn_0 262_splitncnn_1 262_splitncnn_2 262_splitncnn_3
Concat Concat_70 2 1 260_splitncnn_4 262_splitncnn_3 263
Convolution Conv_71 1 1 263 265 0=32 1=3 4=1 5=1 6=27648 9=2 -23310=1,2.000000e-01
Split splitncnn_18 1 3 265 265_splitncnn_0 265_splitncnn_1 265_splitncnn_2
Concat Concat_73 3 1 260_splitncnn_3 262_splitncnn_2 265_splitncnn_2 266
Convolution Conv_74 1 1 266 268 0=32 1=3 4=1 5=1 6=36864 9=2 -23310=1,2.000000e-01
Split splitncnn_19 1 2 268 268_splitncnn_0 268_splitncnn_1
Concat Concat_76 4 1 260_splitncnn_2 262_splitncnn_1 265_splitncnn_1 268_splitncnn_1 269
Convolution Conv_77 1 1 269 271 0=32 1=3 4=1 5=1 6=46080 9=2 -23310=1,2.000000e-01
Concat Concat_79 5 1 260_splitncnn_1 262_splitncnn_0 265_splitncnn_0 268_splitncnn_0 271 272
Convolution Conv_80 1 1 272 273 0=64 1=3 4=1 5=1 6=110592
Eltwise Add_83 2 1 273 260_splitncnn_0 276 0=1 -23301=2,2.000000e-01,1.000000e+00
Split splitncnn_20 1 6 276 276_splitncnn_0 276_splitncnn_1 276_splitncnn_2 276_splitncnn_3 276_splitncnn_4 276_splitncnn_5
Convolution Conv_84 1 1 276_splitncnn_5 278 0=32 1=3 4=1 5=1 6=18432 9=2 -23310=1,2.000000e-01
Split splitncnn_21 1 4 278 278_splitncnn_0 278_splitncnn_1 278_splitncnn_2 278_splitncnn_3
Concat Concat_86 2 1 276_splitncnn_4 278_splitncnn_3 279
Convolution Conv_87 1 1 279 281 0=32 1=3 4=1 5=1 6=27648 9=2 -23310=1,2.000000e-01
Split splitncnn_22 1 3 281 281_splitncnn_0 281_splitncnn_1 281_splitncnn_2
Concat Concat_89 3 1 276_splitncnn_3 278_splitncnn_2 281_splitncnn_2 282
Convolution Conv_90 1 1 282 284 0=32 1=3 4=1 5=1 6=36864 9=2 -23310=1,2.000000e-01
Split splitncnn_23 1 2 284 284_splitncnn_0 284_splitncnn_1
Concat Concat_92 4 1 276_splitncnn_2 278_splitncnn_1 281_splitncnn_1 284_splitncnn_1 285
Convolution Conv_93 1 1 285 287 0=32 1=3 4=1 5=1 6=46080 9=2 -23310=1,2.000000e-01
Concat Concat_95 5 1 276_splitncnn_1 278_splitncnn_0 281_splitncnn_0 284_splitncnn_0 287 288
Convolution Conv_96 1 1 288 289 0=64 1=3 4=1 5=1 6=110592
Eltwise Add_99 2 1 289 276_splitncnn_0 292 0=1 -23301=2,2.000000e-01,1.000000e+00
Eltwise Add_102 2 1 292 244_splitncnn_0 295 0=1 -23301=2,2.000000e-01,1.000000e+00
Split splitncnn_24 1 7 295 295_splitncnn_0 295_splitncnn_1 295_splitncnn_2 295_splitncnn_3 295_splitncnn_4 295_splitncnn_5 295_splitncnn_6
Convolution Conv_103 1 1 295_splitncnn_6 297 0=32 1=3 4=1 5=1 6=18432 9=2 -23310=1,2.000000e-01
Split splitncnn_25 1 4 297 297_splitncnn_0 297_splitncnn_1 297_splitncnn_2 297_splitncnn_3
Concat Concat_105 2 1 295_splitncnn_5 297_splitncnn_3 298
Convolution Conv_106 1 1 298 300 0=32 1=3 4=1 5=1 6=27648 9=2 -23310=1,2.000000e-01
Split splitncnn_26 1 3 300 300_splitncnn_0 300_splitncnn_1 300_splitncnn_2
Concat Concat_108 3 1 295_splitncnn_4 297_splitncnn_2 300_splitncnn_2 301
Convolution Conv_109 1 1 301 303 0=32 1=3 4=1 5=1 6=36864 9=2 -23310=1,2.000000e-01
Split splitncnn_27 1 2 303 303_splitncnn_0 303_splitncnn_1
Concat Concat_111 4 1 295_splitncnn_3 297_splitncnn_1 300_splitncnn_1 303_splitncnn_1 304
Convolution Conv_112 1 1 304 306 0=32 1=3 4=1 5=1 6=46080 9=2 -23310=1,2.000000e-01
Concat Concat_114 5 1 295_splitncnn_2 297_splitncnn_0 300_splitncnn_0 303_splitncnn_0 306 307
Convolution Conv_115 1 1 307 308 0=64 1=3 4=1 5=1 6=110592
Eltwise Add_118 2 1 308 295_splitncnn_1 311 0=1 -23301=2,2.000000e-01,1.000000e+00
Split splitncnn_28 1 6 311 311_splitncnn_0 311_splitncnn_1 311_splitncnn_2 311_splitncnn_3 311_splitncnn_4 311_splitncnn_5
Convolution Conv_119 1 1 311_splitncnn_5 313 0=32 1=3 4=1 5=1 6=18432 9=2 -23310=1,2.000000e-01
Split splitncnn_29 1 4 313 313_splitncnn_0 313_splitncnn_1 313_splitncnn_2 313_splitncnn_3
Concat Concat_121 2 1 311_splitncnn_4 313_splitncnn_3 314
Convolution Conv_122 1 1 314 316 0=32 1=3 4=1 5=1 6=27648 9=2 -23310=1,2.000000e-01
Split splitncnn_30 1 3 316 316_splitncnn_0 316_splitncnn_1 316_splitncnn_2
Concat Concat_124 3 1 311_splitncnn_3 313_splitncnn_2 316_splitncnn_2 317
Convolution Conv_125 1 1 317 319 0=32 1=3 4=1 5=1 6=36864 9=2 -23310=1,2.000000e-01
Split splitncnn_31 1 2 319 319_splitncnn_0 319_splitncnn_1
Concat Concat_127 4 1 311_splitncnn_2 313_splitncnn_1 316_splitncnn_1 319_splitncnn_1 320
Convolution Conv_128 1 1 320 322 0=32 1=3 4=1 5=1 6=46080 9=2 -23310=1,2.000000e-01
Concat Concat_130 5 1 311_splitncnn_1 313_splitncnn_0 316_splitncnn_0 319_splitncnn_0 322 323
Convolution Conv_131 1 1 323 324 0=64 1=3 4=1 5=1 6=110592
Eltwise Add_134 2 1 324 311_splitncnn_0 327 0=1 -23301=2,2.000000e-01,1.000000e+00
Split splitncnn_32 1 6 327 327_splitncnn_0 327_splitncnn_1 327_splitncnn_2 327_splitncnn_3 327_splitncnn_4 327_splitncnn_5
Convolution Conv_135 1 1 327_splitncnn_5 329 0=32 1=3 4=1 5=1 6=18432 9=2 -23310=1,2.000000e-01
Split splitncnn_33 1 4 329 329_splitncnn_0 329_splitncnn_1 329_splitncnn_2 329_splitncnn_3
Concat Concat_137 2 1 327_splitncnn_4 329_splitncnn_3 330
Convolution Conv_138 1 1 330 332 0=32 1=3 4=1 5=1 6=27648 9=2 -23310=1,2.000000e-01
Split splitncnn_34 1 3 332 332_splitncnn_0 332_splitncnn_1 332_splitncnn_2
Concat Concat_140 3 1 327_splitncnn_3 329_splitncnn_2 332_splitncnn_2 333
Convolution Conv_141 1 1 333 335 0=32 1=3 4=1 5=1 6=36864 9=2 -23310=1,2.000000e-01
Split splitncnn_35 1 2 335 335_splitncnn_0 335_splitncnn_1
Concat Concat_143 4 1 327_splitncnn_2 329_splitncnn_1 332_splitncnn_1 335_splitncnn_1 336
Convolution Conv_144 1 1 336 338 0=32 1=3 4=1 5=1 6=46080 9=2 -23310=1,2.000000e-01
Concat Concat_146 5 1 327_splitncnn_1 329_splitncnn_0 332_splitncnn_0 335_splitncnn_0 338 339
Convolution Conv_147 1 1 339 340 0=64 1=3 4=1 5=1 6=110592
Eltwise Add_150 2 1 340 327_splitncnn_0 343 0=1 -23301=2,2.000000e-01,1.000000e+00
Eltwise Add_153 2 1 343 295_splitncnn_0 346 0=1 -23301=2,2.000000e-01,1.000000e+00
Split splitncnn_36 1 7 346 346_splitncnn_0 346_splitncnn_1 346_splitncnn_2 346_splitncnn_3 346_splitncnn_4 346_splitncnn_5 346_splitncnn_6
Convolution Conv_154 1 1 346_splitncnn_6 348 0=32 1=3 4=1 5=1 6=18432 9=2 -23310=1,2.000000e-01
Split splitncnn_37 1 4 348 348_splitncnn_0 348_splitncnn_1 348_splitncnn_2 348_splitncnn_3
Concat Concat_156 2 1 346_splitncnn_5 348_splitncnn_3 349
Convolution Conv_157 1 1 349 351 0=32 1=3 4=1 5=1 6=27648 9=2 -23310=1,2.000000e-01
Split splitncnn_38 1 3 351 351_splitncnn_0 351_splitncnn_1 351_splitncnn_2
Concat Concat_159 3 1 346_splitncnn_4 348_splitncnn_2 351_splitncnn_2 352
Convolution Conv_160 1 1 352 354 0=32 1=3 4=1 5=1 6=36864 9=2 -23310=1,2.000000e-01
Split splitncnn_39 1 2 354 354_splitncnn_0 354_splitncnn_1
Concat Concat_162 4 1 346_splitncnn_3 348_splitncnn_1 351_splitncnn_1 354_splitncnn_1 355
Convolution Conv_163 1 1 355 357 0=32 1=3 4=1 5=1 6=46080 9=2 -23310=1,2.000000e-01
Concat Concat_165 5 1 346_splitncnn_2 348_splitncnn_0 351_splitncnn_0 354_splitncnn_0 357 358
Convolution Conv_166 1 1 358 359 0=64 1=3 4=1 5=1 6=110592
Eltwise Add_169 2 1 359 346_splitncnn_1 362 0=1 -23301=2,2.000000e-01,1.000000e+00
Split splitncnn_40 1 6 362 362_splitncnn_0 362_splitncnn_1 362_splitncnn_2 362_splitncnn_3 362_splitncnn_4 362_splitncnn_5
Convolution Conv_170 1 1 362_splitncnn_5 364 0=32 1=3 4=1 5=1 6=18432 9=2 -23310=1,2.000000e-01
Split splitncnn_41 1 4 364 364_splitncnn_0 364_splitncnn_1 364_splitncnn_2 364_splitncnn_3
Concat Concat_172 2 1 362_splitncnn_4 364_splitncnn_3 365
Convolution Conv_173 1 1 365 367 0=32 1=3 4=1 5=1 6=27648 9=2 -23310=1,2.000000e-01
Split splitncnn_42 1 3 367 367_splitncnn_0 367_splitncnn_1 367_splitncnn_2
Concat Concat_175 3 1 362_splitncnn_3 364_splitncnn_2 367_splitncnn_2 368
Convolution Conv_176 1 1 368 370 0=32 1=3 4=1 5=1 6=36864 9=2 -23310=1,2.000000e-01
Split splitncnn_43 1 2 370 370_splitncnn_0 370_splitncnn_1
Concat Concat_178 4 1 362_splitncnn_2 364_splitncnn_1 367_splitncnn_1 370_splitncnn_1 371
Convolution Conv_179 1 1 371 373 0=32 1=3 4=1 5=1 6=46080 9=2 -23310=1,2.000000e-01
Concat Concat_181 5 1 362_splitncnn_1 364_splitncnn_0 367_splitncnn_0 370_splitncnn_0 373 374
Convolution Conv_182 1 1 374 375 0=64 1=3 4=1 5=1 6=110592
Eltwise Add_185 2 1 375 362_splitncnn_0 378 0=1 -23301=2,2.000000e-01,1.000000e+00
Split splitncnn_44 1 6 378 378_splitncnn_0 378_splitncnn_1 378_splitncnn_2 378_splitncnn_3 378_splitncnn_4 378_splitncnn_5
Convolution Conv_186 1 1 378_splitncnn_5 380 0=32 1=3 4=1 5=1 6=18432 9=2 -23310=1,2.000000e-01
Split splitncnn_45 1 4 380 380_splitncnn_0 380_splitncnn_1 380_splitncnn_2 380_splitncnn_3
Concat Concat_188 2 1 378_splitncnn_4 380_splitncnn_3 381
Convolution Conv_189 1 1 381 383 0=32 1=3 4=1 5=1 6=27648 9=2 -23310=1,2.000000e-01
Split splitncnn_46 1 3 383 383_splitncnn_0 383_splitncnn_1 383_splitncnn_2
Concat Concat_191 3 1 378_splitncnn_3 380_splitncnn_2 383_splitncnn_2 384
Convolution Conv_192 1 1 384 386 0=32 1=3 4=1 5=1 6=36864 9=2 -23310=1,2.000000e-01
Split splitncnn_47 1 2 386 386_splitncnn_0 386_splitncnn_1
Concat Concat_194 4 1 378_splitncnn_2 380_splitncnn_1 383_splitncnn_1 386_splitncnn_1 387
Convolution Conv_195 1 1 387 389 0=32 1=3 4=1 5=1 6=46080 9=2 -23310=1,2.000000e-01
Concat Concat_197 5 1 378_splitncnn_1 380_splitncnn_0 383_splitncnn_0 386_splitncnn_0 389 390
Convolution Conv_198 1 1 390 391 0=64 1=3 4=1 5=1 6=110592
Eltwise Add_201 2 1 391 378_splitncnn_0 394 0=1 -23301=2,2.000000e-01,1.000000e+00
Eltwise Add_204 2 1 394 346_splitncnn_0 397 0=1 -23301=2,2.000000e-01,1.000000e+00
Split splitncnn_48 1 7 397 397_splitncnn_0 397_splitncnn_1 397_splitncnn_2 397_splitncnn_3 397_splitncnn_4 397_splitncnn_5 397_splitncnn_6
Convolution Conv_205 1 1 397_splitncnn_6 399 0=32 1=3 4=1 5=1 6=18432 9=2 -23310=1,2.000000e-01
Split splitncnn_49 1 4 399 399_splitncnn_0 399_splitncnn_1 399_splitncnn_2 399_splitncnn_3
Concat Concat_207 2 1 397_splitncnn_5 399_splitncnn_3 400
Convolution Conv_208 1 1 400 402 0=32 1=3 4=1 5=1 6=27648 9=2 -23310=1,2.000000e-01
Split splitncnn_50 1 3 402 402_splitncnn_0 402_splitncnn_1 402_splitncnn_2
Concat Concat_210 3 1 397_splitncnn_4 399_splitncnn_2 402_splitncnn_2 403
Convolution Conv_211 1 1 403 405 0=32 1=3 4=1 5=1 6=36864 9=2 -23310=1,2.000000e-01
Split splitncnn_51 1 2 405 405_splitncnn_0 405_splitncnn_1
Concat Concat_213 4 1 397_splitncnn_3 399_splitncnn_1 402_splitncnn_1 405_splitncnn_1 406
Convolution Conv_214 1 1 406 408 0=32 1=3 4=1 5=1 6=46080 9=2 -23310=1,2.000000e-01
Concat Concat_216 5 1 397_splitncnn_2 399_splitncnn_0 402_splitncnn_0 405_splitncnn_0 408 409
Convolution Conv_217 1 1 409 410 0=64 1=3 4=1 5=1 6=110592
Eltwise Add_220 2 1 410 397_splitncnn_1 413 0=1 -23301=2,2.000000e-01,1.000000e+00
Split splitncnn_52 1 6 413 413_splitncnn_0 413_splitncnn_1 413_splitncnn_2 413_splitncnn_3 413_splitncnn_4 413_splitncnn_5
Convolution Conv_221 1 1 413_splitncnn_5 415 0=32 1=3 4=1 5=1 6=18432 9=2 -23310=1,2.000000e-01
Split splitncnn_53 1 4 415 415_splitncnn_0 415_splitncnn_1 415_splitncnn_2 415_splitncnn_3
Concat Concat_223 2 1 413_splitncnn_4 415_splitncnn_3 416
Convolution Conv_224 1 1 416 418 0=32 1=3 4=1 5=1 6=27648 9=2 -23310=1,2.000000e-01
Split splitncnn_54 1 3 418 418_splitncnn_0 418_splitncnn_1 418_splitncnn_2
Concat Concat_226 3 1 413_splitncnn_3 415_splitncnn_2 418_splitncnn_2 419
Convolution Conv_227 1 1 419 421 0=32 1=3 4=1 5=1 6=36864 9=2 -23310=1,2.000000e-01
Split splitncnn_55 1 2 421 421_splitncnn_0 421_splitncnn_1
Concat Concat_229 4 1 413_splitncnn_2 415_splitncnn_1 418_splitncnn_1 421_splitncnn_1 422
Convolution Conv_230 1 1 422 424 0=32 1=3 4=1 5=1 6=46080 9=2 -23310=1,2.000000e-01
Concat Concat_232 5 1 413_splitncnn_1 415_splitncnn_0 418_splitncnn_0 421_splitncnn_0 424 425
Convolution Conv_233 1 1 425 426 0=64 1=3 4=1 5=1 6=110592
Eltwise Add_236 2 1 426 413_splitncnn_0 429 0=1 -23301=2,2.000000e-01,1.000000e+00
Split splitncnn_56 1 6 429 429_splitncnn_0 429_splitncnn_1 429_splitncnn_2 429_splitncnn_3 429_splitncnn_4 429_splitncnn_5
Convolution Conv_237 1 1 429_splitncnn_5 431 0=32 1=3 4=1 5=1 6=18432 9=2 -23310=1,2.000000e-01
Split splitncnn_57 1 4 431 431_splitncnn_0 431_splitncnn_1 431_splitncnn_2 431_splitncnn_3
Concat Concat_239 2 1 429_splitncnn_4 431_splitncnn_3 432
Convolution Conv_240 1 1 432 434 0=32 1=3 4=1 5=1 6=27648 9=2 -23310=1,2.000000e-01
Split splitncnn_58 1 3 434 434_splitncnn_0 434_splitncnn_1 434_splitncnn_2
Concat Concat_242 3 1 429_splitncnn_3 431_splitncnn_2 434_splitncnn_2 435
Convolution Conv_243 1 1 435 437 0=32 1=3 4=1 5=1 6=36864 9=2 -23310=1,2.000000e-01
Split splitncnn_59 1 2 437 437_splitncnn_0 437_splitncnn_1
Concat Concat_245 4 1 429_splitncnn_2 431_splitncnn_1 434_splitncnn_1 437_splitncnn_1 438
Convolution Conv_246 1 1 438 440 0=32 1=3 4=1 5=1 6=46080 9=2 -23310=1,2.000000e-01
Concat Concat_248 5 1 429_splitncnn_1 431_splitncnn_0 434_splitncnn_0 437_splitncnn_0 440 441
Convolution Conv_249 1 1 441 442 0=64 1=3 4=1 5=1 6=110592
Eltwise Add_252 2 1 442 429_splitncnn_0 445 0=1 -23301=2,2.000000e-01,1.000000e+00
Eltwise Add_255 2 1 445 397_splitncnn_0 448 0=1 -23301=2,2.000000e-01,1.000000e+00
Split splitncnn_60 1 7 448 448_splitncnn_0 448_splitncnn_1 448_splitncnn_2 448_splitncnn_3 448_splitncnn_4 448_splitncnn_5 448_splitncnn_6
Convolution Conv_256 1 1 448_splitncnn_6 450 0=32 1=3 4=1 5=1 6=18432 9=2 -23310=1,2.000000e-01
Split splitncnn_61 1 4 450 450_splitncnn_0 450_splitncnn_1 450_splitncnn_2 450_splitncnn_3
Concat Concat_258 2 1 448_splitncnn_5 450_splitncnn_3 451
Convolution Conv_259 1 1 451 453 0=32 1=3 4=1 5=1 6=27648 9=2 -23310=1,2.000000e-01
Split splitncnn_62 1 3 453 453_splitncnn_0 453_splitncnn_1 453_splitncnn_2
Concat Concat_261 3 1 448_splitncnn_4 450_splitncnn_2 453_splitncnn_2 454
Convolution Conv_262 1 1 454 456 0=32 1=3 4=1 5=1 6=36864 9=2 -23310=1,2.000000e-01
Split splitncnn_63 1 2 456 456_splitncnn_0 456_splitncnn_1
Concat Concat_264 4 1 448_splitncnn_3 450_splitncnn_1 453_splitncnn_1 456_splitncnn_1 457
Convolution Conv_265 1 1 457 459 0=32 1=3 4=1 5=1 6=46080 9=2 -23310=1,2.000000e-01
Concat Concat_267 5 1 448_splitncnn_2 450_splitncnn_0 453_splitncnn_0 456_splitncnn_0 459 460
Convolution Conv_268 1 1 460 461 0=64 1=3 4=1 5=1 6=110592
Eltwise Add_271 2 1 461 448_splitncnn_1 464 0=1 -23301=2,2.000000e-01,1.000000e+00
Split splitncnn_64 1 6 464 464_splitncnn_0 464_splitncnn_1 464_splitncnn_2 464_splitncnn_3 464_splitncnn_4 464_splitncnn_5
Convolution Conv_272 1 1 464_splitncnn_5 466 0=32 1=3 4=1 5=1 6=18432 9=2 -23310=1,2.000000e-01
Split splitncnn_65 1 4 466 466_splitncnn_0 466_splitncnn_1 466_splitncnn_2 466_splitncnn_3
Concat Concat_274 2 1 464_splitncnn_4 466_splitncnn_3 467
Convolution Conv_275 1 1 467 469 0=32 1=3 4=1 5=1 6=27648 9=2 -23310=1,2.000000e-01
Split splitncnn_66 1 3 469 469_splitncnn_0 469_splitncnn_1 469_splitncnn_2
Concat Concat_277 3 1 464_splitncnn_3 466_splitncnn_2 469_splitncnn_2 470
Convolution Conv_278 1 1 470 472 0=32 1=3 4=1 5=1 6=36864 9=2 -23310=1,2.000000e-01
Split splitncnn_67 1 2 472 472_splitncnn_0 472_splitncnn_1
Concat Concat_280 4 1 464_splitncnn_2 466_splitncnn_1 469_splitncnn_1 472_splitncnn_1 473
Convolution Conv_281 1 1 473 475 0=32 1=3 4=1 5=1 6=46080 9=2 -23310=1,2.000000e-01
Concat Concat_283 5 1 464_splitncnn_1 466_splitncnn_0 469_splitncnn_0 472_splitncnn_0 475 476
Convolution Conv_284 1 1 476 477 0=64 1=3 4=1 5=1 6=110592
Eltwise Add_287 2 1 477 464_splitncnn_0 480 0=1 -23301=2,2.000000e-01,1.000000e+00
Split splitncnn_68 1 6 480 480_splitncnn_0 480_splitncnn_1 480_splitncnn_2 480_splitncnn_3 480_splitncnn_4 480_splitncnn_5
Convolution Conv_288 1 1 480_splitncnn_5 482 0=32 1=3 4=1 5=1 6=18432 9=2 -23310=1,2.000000e-01
Split splitncnn_69 1 4 482 482_splitncnn_0 482_splitncnn_1 482_splitncnn_2 482_splitncnn_3
Concat Concat_290 2 1 480_splitncnn_4 482_splitncnn_3 483
Convolution Conv_291 1 1 483 485 0=32 1=3 4=1 5=1 6=27648 9=2 -23310=1,2.000000e-01
Split splitncnn_70 1 3 485 485_splitncnn_0 485_splitncnn_1 485_splitncnn_2
Concat Concat_293 3 1 480_splitncnn_3 482_splitncnn_2 485_splitncnn_2 486
Convolution Conv_294 1 1 486 488 0=32 1=3 4=1 5=1 6=36864 9=2 -23310=1,2.000000e-01
Split splitncnn_71 1 2 488 488_splitncnn_0 488_splitncnn_1
Concat Concat_296 4 1 480_splitncnn_2 482_splitncnn_1 485_splitncnn_1 488_splitncnn_1 489
Convolution Conv_297 1 1 489 491 0=32 1=3 4=1 5=1 6=46080 9=2 -23310=1,2.000000e-01
Concat Concat_299 5 1 480_splitncnn_1 482_splitncnn_0 485_splitncnn_0 488_splitncnn_0 491 492
Convolution Conv_300 1 1 492 493 0=64 1=3 4=1 5=1 6=110592
Eltwise Add_303 2 1 493 480_splitncnn_0 496 0=1 -23301=2,2.000000e-01,1.000000e+00
Eltwise Add_306 2 1 496 448_splitncnn_0 499 0=1 -23301=2,2.000000e-01,1.000000e+00
Convolution Conv_307 1 1 499 500 0=64 1=3 4=1 5=1 6=36864
BinaryOp Add_308 2 1 193_splitncnn_0 500 501
Interp Resize_310 1 1 501 506 0=1 1=2.000000e+00 2=2.000000e+00
Convolution Conv_311 1 1 506 508 0=64 1=3 4=1 5=1 6=36864 9=2 -23310=1,2.000000e-01
Interp Resize_314 1 1 508 513 0=1 1=2.000000e+00 2=2.000000e+00
Convolution Conv_315 1 1 513 515 0=64 1=3 4=1 5=1 6=36864 9=2 -23310=1,2.000000e-01
Convolution Conv_317 1 1 515 517 0=64 1=3 4=1 5=1 6=36864 9=2 -23310=1,2.000000e-01
Convolution Conv_319 1 1 517 output 0=3 1=3 4=1 5=1 6=1728
Binary file not shown.
File diff suppressed because it is too large Load Diff
Binary file not shown.

After

Width:  |  Height:  |  Size: 960 KiB

+1
View File
@@ -0,0 +1 @@
{"asset":{"version":"2.0","generator":"babylon.js glTF exporter for 3dsmax 2021 v20210607.3"},"scene":0,"scenes":[{"nodes":[0]}],"nodes":[{"mesh":0,"translation":[0.0,-1.14751673,-5.015955E-08],"name":"Cylinder001"}],"meshes":[{"primitives":[{"attributes":{"POSITION":1,"NORMAL":2,"TEXCOORD_0":3},"indices":0,"material":0},{"attributes":{"POSITION":5,"NORMAL":6,"TEXCOORD_0":7},"indices":4,"material":1},{"attributes":{"POSITION":9,"NORMAL":10,"TEXCOORD_0":11},"indices":8,"material":2},{"attributes":{"POSITION":13,"NORMAL":14,"TEXCOORD_0":15},"indices":12,"material":3},{"attributes":{"POSITION":17,"NORMAL":18,"TEXCOORD_0":19},"indices":16,"material":4}],"name":"Cylinder001"}],"accessors":[{"bufferView":0,"componentType":5123,"count":858,"type":"SCALAR","name":"accessorIndices"},{"bufferView":1,"componentType":5126,"count":858,"max":[0.9673312,-0.0665806457,0.9673312],"min":[-0.9673312,-0.09678768,-0.9673312],"type":"VEC3","name":"accessorPositions"},{"bufferView":1,"byteOffset":10296,"componentType":5126,"count":858,"type":"VEC3","name":"accessorNormals"},{"bufferView":2,"componentType":5126,"count":858,"type":"VEC2","name":"accessorUVs"},{"bufferView":0,"byteOffset":1716,"componentType":5123,"count":14592,"type":"SCALAR","name":"accessorIndices"},{"bufferView":1,"byteOffset":20592,"componentType":5126,"count":14592,"max":[1.01214123,2.33892131,1.02725148],"min":[-1.01214123,-0.09678768,-1.01214123],"type":"VEC3","name":"accessorPositions"},{"bufferView":1,"byteOffset":195696,"componentType":5126,"count":14592,"type":"VEC3","name":"accessorNormals"},{"bufferView":2,"byteOffset":6864,"componentType":5126,"count":14592,"type":"VEC2","name":"accessorUVs"},{"bufferView":0,"byteOffset":30900,"componentType":5123,"count":1620,"type":"SCALAR","name":"accessorIndices"},{"bufferView":1,"byteOffset":370800,"componentType":5126,"count":1620,"max":[1.006612,2.3633275,1.006612],"min":[-1.006612,2.338921,-1.006612],"type":"VEC3","name":"accessorPositions"},{"bufferView":1,"byteOffset":390240,"componentType":5126,"count":1620,"type":"VEC3","name":"accessorNormals"},{"bufferView":2,"byteOffset":123600,"componentType":5126,"count":1620,"type":"VEC2","name":"accessorUVs"},{"bufferView":0,"byteOffset":34140,"componentType":5123,"count":318,"type":"SCALAR","name":"accessorIndices"},{"bufferView":1,"byteOffset":409680,"componentType":5126,"count":318,"max":[0.9454922,2.3548696,0.9454922],"min":[-0.9454921,0.0617354736,-0.945492268],"type":"VEC3","name":"accessorPositions"},{"bufferView":1,"byteOffset":413496,"componentType":5126,"count":318,"type":"VEC3","name":"accessorNormals"},{"bufferView":2,"byteOffset":136560,"componentType":5126,"count":318,"type":"VEC2","name":"accessorUVs"},{"bufferView":0,"byteOffset":34776,"componentType":5123,"count":11520,"type":"SCALAR","name":"accessorIndices"},{"bufferView":1,"byteOffset":417312,"componentType":5126,"count":11520,"max":[0.196413681,2.12139344,1.90955186],"min":[-0.196414649,0.165008187,1.00927675],"type":"VEC3","name":"accessorPositions"},{"bufferView":1,"byteOffset":555552,"componentType":5126,"count":11520,"type":"VEC3","name":"accessorNormals"},{"bufferView":2,"byteOffset":139104,"componentType":5126,"count":11520,"type":"VEC2","name":"accessorUVs"}],"bufferViews":[{"buffer":0,"byteLength":57816,"name":"bufferViewScalar"},{"buffer":0,"byteOffset":57816,"byteLength":693792,"byteStride":12,"name":"bufferViewFloatVec3"},{"buffer":0,"byteOffset":751608,"byteLength":231264,"byteStride":8,"name":"bufferViewFloatVec2"}],"buffers":[{"uri":"model.bin","byteLength":982872}],"materials":[{"pbrMetallicRoughness":{"metallicFactor":0.0,"roughnessFactor":0.9},"doubleSided":true,"name":"01 - Default"},{"pbrMetallicRoughness":{"baseColorTexture":{"index":0},"metallicFactor":0.0,"roughnessFactor":0.9},"doubleSided":true,"name":"02 - Default"},{"pbrMetallicRoughness":{"baseColorFactor":[0.0,1.0,0.117647067,1.0],"metallicFactor":0.0,"roughnessFactor":0.9},"doubleSided":true,"name":"03 - Default"},{"pbrMetallicRoughness":{"baseColorFactor":[0.2784314,0.0,0.9921569,1.0],"metallicFactor":0.0,"roughnessFactor":0.9},"doubleSided":true,"name":"04 - Default"},{"pbrMetallicRoughness":{"baseColorFactor":[0.9725491,0.776470661,0.0,1.0],"metallicFactor":0.0,"roughnessFactor":0.9},"doubleSided":true,"name":"05 - Default"}],"textures":[{"sampler":0,"source":0,"name":"texture.jpg"}],"images":[{"uri":"./texture.jpg"}],"samplers":[{"magFilter":9729,"minFilter":9987}]}
Binary file not shown.
File diff suppressed because it is too large Load Diff
Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 MiB

Binary file not shown.
File diff suppressed because it is too large Load Diff
Binary file not shown.
File diff suppressed because it is too large Load Diff
Binary file not shown.
@@ -0,0 +1,74 @@
7767517
72 73
Input input.1 0 1 data
Split splitncnn_input0 1 2 data input_splitncnn_0 input_splitncnn_1
Convolution Conv_0 1 1 input_splitncnn_1 102 0=64 1=3 4=1 5=1 6=1728
PReLU PRelu_1 1 1 102 105 0=64
Convolution Conv_2 1 1 105 106 0=64 1=3 4=1 5=1 6=36864
PReLU PRelu_3 1 1 106 109 0=64
Convolution Conv_4 1 1 109 110 0=64 1=3 4=1 5=1 6=36864
PReLU PRelu_5 1 1 110 113 0=64
Convolution Conv_6 1 1 113 114 0=64 1=3 4=1 5=1 6=36864
PReLU PRelu_7 1 1 114 117 0=64
Convolution Conv_8 1 1 117 118 0=64 1=3 4=1 5=1 6=36864
PReLU PRelu_9 1 1 118 121 0=64
Convolution Conv_10 1 1 121 122 0=64 1=3 4=1 5=1 6=36864
PReLU PRelu_11 1 1 122 125 0=64
Convolution Conv_12 1 1 125 126 0=64 1=3 4=1 5=1 6=36864
PReLU PRelu_13 1 1 126 129 0=64
Convolution Conv_14 1 1 129 130 0=64 1=3 4=1 5=1 6=36864
PReLU PRelu_15 1 1 130 133 0=64
Convolution Conv_16 1 1 133 134 0=64 1=3 4=1 5=1 6=36864
PReLU PRelu_17 1 1 134 137 0=64
Convolution Conv_18 1 1 137 138 0=64 1=3 4=1 5=1 6=36864
PReLU PRelu_19 1 1 138 141 0=64
Convolution Conv_20 1 1 141 142 0=64 1=3 4=1 5=1 6=36864
PReLU PRelu_21 1 1 142 145 0=64
Convolution Conv_22 1 1 145 146 0=64 1=3 4=1 5=1 6=36864
PReLU PRelu_23 1 1 146 149 0=64
Convolution Conv_24 1 1 149 150 0=64 1=3 4=1 5=1 6=36864
PReLU PRelu_25 1 1 150 153 0=64
Convolution Conv_26 1 1 153 154 0=64 1=3 4=1 5=1 6=36864
PReLU PRelu_27 1 1 154 157 0=64
Convolution Conv_28 1 1 157 158 0=64 1=3 4=1 5=1 6=36864
PReLU PRelu_29 1 1 158 161 0=64
Convolution Conv_30 1 1 161 162 0=64 1=3 4=1 5=1 6=36864
PReLU PRelu_31 1 1 162 165 0=64
Convolution Conv_32 1 1 165 166 0=64 1=3 4=1 5=1 6=36864
PReLU PRelu_33 1 1 166 169 0=64
Convolution Conv_34 1 1 169 170 0=64 1=3 4=1 5=1 6=36864
PReLU PRelu_35 1 1 170 173 0=64
Convolution Conv_36 1 1 173 174 0=64 1=3 4=1 5=1 6=36864
PReLU PRelu_37 1 1 174 177 0=64
Convolution Conv_38 1 1 177 178 0=64 1=3 4=1 5=1 6=36864
PReLU PRelu_39 1 1 178 181 0=64
Convolution Conv_40 1 1 181 182 0=64 1=3 4=1 5=1 6=36864
PReLU PRelu_41 1 1 182 185 0=64
Convolution Conv_42 1 1 185 186 0=64 1=3 4=1 5=1 6=36864
PReLU PRelu_43 1 1 186 189 0=64
Convolution Conv_44 1 1 189 190 0=64 1=3 4=1 5=1 6=36864
PReLU PRelu_45 1 1 190 193 0=64
Convolution Conv_46 1 1 193 194 0=64 1=3 4=1 5=1 6=36864
PReLU PRelu_47 1 1 194 197 0=64
Convolution Conv_48 1 1 197 198 0=64 1=3 4=1 5=1 6=36864
PReLU PRelu_49 1 1 198 201 0=64
Convolution Conv_50 1 1 201 202 0=64 1=3 4=1 5=1 6=36864
PReLU PRelu_51 1 1 202 205 0=64
Convolution Conv_52 1 1 205 206 0=64 1=3 4=1 5=1 6=36864
PReLU PRelu_53 1 1 206 209 0=64
Convolution Conv_54 1 1 209 210 0=64 1=3 4=1 5=1 6=36864
PReLU PRelu_55 1 1 210 213 0=64
Convolution Conv_56 1 1 213 214 0=64 1=3 4=1 5=1 6=36864
PReLU PRelu_57 1 1 214 217 0=64
Convolution Conv_58 1 1 217 218 0=64 1=3 4=1 5=1 6=36864
PReLU PRelu_59 1 1 218 221 0=64
Convolution Conv_60 1 1 221 222 0=64 1=3 4=1 5=1 6=36864
PReLU PRelu_61 1 1 222 225 0=64
Convolution Conv_62 1 1 225 226 0=64 1=3 4=1 5=1 6=36864
PReLU PRelu_63 1 1 226 229 0=64
Convolution Conv_64 1 1 229 230 0=64 1=3 4=1 5=1 6=36864
PReLU PRelu_65 1 1 230 233 0=64
Convolution Conv_66 1 1 233 234 0=48 1=3 4=1 5=1 6=27648
PixelShuffle DepthToSpace_67 1 1 234 235 0=4
Interp Resize_68 1 1 input_splitncnn_0 240 0=1 1=4.000000e+00 2=4.000000e+00
BinaryOp Add_69 2 1 235 240 output
Binary file not shown.
File diff suppressed because it is too large Load Diff
Binary file not shown.

After

Width:  |  Height:  |  Size: 313 B

+30
View File
@@ -0,0 +1,30 @@
#!/bin/zsh
setopt null_glob
INPUT="./images"
OUTPUT="./images_output"
MODELPATH="./models"
MODELNAME="ultramix-balanced-4x"
TARGET_WIDTH="4320"
FORMAT="jpg" # 或 webp
SCALE=3
MAX_SIZE=$((20 * 1024 * 1024)) # 20MB
./bin/mac/upscayl-bin -i "$INPUT" -o "$OUTPUT" -f $FORMAT -m $MODELPATH -n $MODELNAME -w $TARGET_WIDTH -j 4:8:4 -v
echo "\n===== 输入目录: $INPUT ====="
for img in "$INPUT"/*.{png,jpg,jpeg}; do
[ -e "$img" ] || continue
size=$(stat -f%z "$img")
res=$(sips -g pixelWidth -g pixelHeight "$img" 2>/dev/null | awk '/pixelWidth|pixelHeight/ {print $2}' | xargs | sed 's/ /x/')
echo "$(basename "$img"): ${size} bytes, ${res}"
done
echo "\n===== 输出目录: $OUTPUT ====="
for img in "$OUTPUT"/*.{png,jpg,jpeg}; do
[ -e "$img" ] || continue
size=$(stat -f%z "$img")
res=$(sips -g pixelWidth -g pixelHeight "$img" 2>/dev/null | awk '/pixelWidth|pixelHeight/ {print $2}' | xargs | sed 's/ /x/')
echo "$(basename "$img"): ${size} bytes, ${res}"
done
+114
View File
@@ -0,0 +1,114 @@
#!/bin/zsh
setopt null_glob
# 设置默认值或从环境变量获取
INPUT="${INPUT_DIR:-./images}"
OUTPUT="${OUTPUT_DIR:-./images_output}"
MODELPATH="${MODELPATH:-./models}"
MODELNAME="${MODELNAME:-ultramix-balanced-4x}"
BIN_PATH="${BIN_PATH:-./bin/mac/upscayl-bin}"
TARGET_WIDTH=4320
TARGET_HEIGHT=7680
FORMAT="jpg"
THREADS="4:8:4"
TARGET_SIZE=$((10 * 1024 * 1024)) # 10MB
MAX_SIZE=$((20 * 1024 * 1024)) # 20MB
echo "===== 开始批量处理图片 ====="
echo "输入目录: $INPUT"
echo "输出目录: $OUTPUT"
echo "模型路径: $MODELPATH"
echo "模型名称: $MODELNAME"
echo "二进制文件: $BIN_PATH"
# 确保输出目录存在
mkdir -p "$OUTPUT"
# 循环对每个图片单独执行 upscayl-bin,输出路径为文件路径
for img in "$INPUT"/*.{png,jpg,jpeg}; do
[ -e "$img" ] || continue
base=$(basename "$img")
out_img="$OUTPUT/${base%.*}.$FORMAT"
compress=10 # 0为无压缩,100为最大压缩
try=1
echo "\n==== 开始处理: $base ===="
echo "输入文件: $img"
echo "输出文件: $out_img"
echo "模型: $MODELNAME, 模型路径: $MODELPATH"
echo "格式: $FORMAT"
# 获取原图宽高
read orig_w orig_h <<< $(sips -g pixelWidth -g pixelHeight "$img" 2>/dev/null | awk '/pixelWidth/ {w=$2} /pixelHeight/ {h=$2} END{print w,h}')
if [ "$orig_w" -lt "$orig_h" ]; then
short=$orig_w
long=$orig_h
else
short=$orig_h
long=$orig_w
fi
echo "DEBUG: orig_w=$orig_w, orig_h=$orig_h, short=$short, long=$long"
scale1=$(echo "scale=8; 4320/$short" | bc)
scale2=$(echo "scale=8; 7680/$long" | bc)
echo "DEBUG: scale1=$scale1, scale2=$scale2"
# 取scale1和scale2的最大值
scale=$(echo "$scale1 > $scale2" | bc -l)
if [ "$scale" -eq 1 ]; then
use_scale=$scale1
else
use_scale=$scale2
fi
use_scale=$(printf "%f" "$use_scale")
echo "DEBUG: use_scale=$use_scale"
# 保证不缩小
scale_cmp=$(echo "$use_scale > 1" | bc -l)
echo "DEBUG: scale_cmp=$scale_cmp"
if [ "$scale_cmp" -eq 1 ]; then
target_w=$(awk -v w="$orig_w" -v s="$use_scale" 'BEGIN{printf "%d", w*s+0.5}')
target_h=$(awk -v h="$orig_h" -v s="$use_scale" 'BEGIN{printf "%d", h*s+0.5}')
echo "原图分辨率: ${orig_w}x${orig_h}, 目标分辨率: ${target_w}x${target_h} (短边≥4320, 长边≥7680)"
else
target_w=$orig_w
target_h=$orig_h
echo "原图分辨率: ${orig_w}x${orig_h}, 已满足短边≥4320且长边≥7680,无需放大"
fi
while true; do
echo "尝试第 $try 次: compress=$compress"
upscale_cmd="\"$BIN_PATH\" -i \"$img\" -o \"$out_img\" -f $FORMAT -m \"$MODELPATH\" -n $MODELNAME -r \"${target_w}x${target_h}\" -c $compress -j $THREADS -v"
echo "执行命令: $upscale_cmd"
eval $upscale_cmd
if [ ! -f "$out_img" ]; then
echo "$base: 未生成图片,compress=$compress"
break
fi
size=$(stat -f%z "$out_img")
res=$(sips -g pixelWidth -g pixelHeight "$out_img" 2>/dev/null | awk '/pixelWidth|pixelHeight/ {print $2}' | xargs | sed 's/ /x/')
echo "$base: compress=$compress, size=${size} bytes, 分辨率=${res}"
if [ $size -le $MAX_SIZE ] || [ $compress -ge 100 ]; then
echo "$base: 满足大小要求,最终 compress=$compress"
break
fi
# compress 每次递增10,最大不超过100
compress=$((compress + 10))
[ $compress -gt 100 ] && compress=100
try=$((try+1))
[ $try -gt 10 ] && echo "$base: 达到最大尝试次数,停止调整" && break
done
done
echo "\n===== 输入目录: $INPUT ====="
for img in "$INPUT"/*.{png,jpg,jpeg}; do
[ -e "$img" ] || continue
size=$(stat -f%z "$img")
res=$(sips -g pixelWidth -g pixelHeight "$img" 2>/dev/null | awk '/pixelWidth|pixelHeight/ {print $2}' | xargs | sed 's/ /x/')
echo "$(basename "$img"): ${size} bytes, ${res}"
done
echo "\n===== 输出目录: $OUTPUT ====="
for img in "$OUTPUT"/*.{png,jpg,jpeg}; do
[ -e "$img" ] || continue
size=$(stat -f%z "$img")
res=$(sips -g pixelWidth -g pixelHeight "$img" 2>/dev/null | awk '/pixelWidth|pixelHeight/ {print $2}' | xargs | sed 's/ /x/')
echo "$(basename "$img"): ${size} bytes, ${res}"
done
+131
View File
@@ -0,0 +1,131 @@
#!/bin/zsh
setopt null_glob
# 从环境变量或参数获取配置
INPUT_FILE="${INPUT_FILE:-$1}"
OUTPUT_FILE="${OUTPUT_FILE:-$2}"
MODELPATH="${MODELPATH:-./models}"
MODELNAME="${MODELNAME:-ultramix-balanced-4x}"
BIN_PATH="${BIN_PATH:-./bin/mac/upscayl-bin}"
TARGET_WIDTH=4320
TARGET_HEIGHT=7680
FORMAT="jpg"
THREADS="4:8:4"
TARGET_SIZE=$((10 * 1024 * 1024)) # 10MB
MAX_SIZE=$((20 * 1024 * 1024)) # 20MB
# 检查输入参数
if [ -z "$INPUT_FILE" ] || [ -z "$OUTPUT_FILE" ]; then
echo "错误: 需要指定输入和输出文件路径"
echo "用法: $0 <输入文件> <输出文件>"
echo "或者设置环境变量 INPUT_FILE 和 OUTPUT_FILE"
exit 1
fi
if [ ! -f "$INPUT_FILE" ]; then
echo "错误: 输入文件不存在: $INPUT_FILE"
exit 1
fi
echo "===== 开始处理单张图片 ====="
echo "输入文件: $INPUT_FILE"
echo "输出文件: $OUTPUT_FILE"
echo "模型路径: $MODELPATH"
echo "模型名称: $MODELNAME"
echo "二进制文件: $BIN_PATH"
# 确保输出目录存在
output_dir=$(dirname "$OUTPUT_FILE")
mkdir -p "$output_dir"
base=$(basename "$INPUT_FILE")
compress=10 # 0为无压缩,100为最大压缩
try=1
echo "\n==== 开始处理: $base ===="
echo "输入文件: $INPUT_FILE"
echo "输出文件: $OUTPUT_FILE"
echo "模型: $MODELNAME, 模型路径: $MODELPATH"
echo "格式: $FORMAT"
# 获取原图宽高
read orig_w orig_h <<< $(sips -g pixelWidth -g pixelHeight "$INPUT_FILE" 2>/dev/null | awk '/pixelWidth/ {w=$2} /pixelHeight/ {h=$2} END{print w,h}')
if [ "$orig_w" -lt "$orig_h" ]; then
short=$orig_w
long=$orig_h
else
short=$orig_h
long=$orig_w
fi
echo "DEBUG: orig_w=$orig_w, orig_h=$orig_h, short=$short, long=$long"
scale1=$(echo "scale=8; 4320/$short" | bc)
scale2=$(echo "scale=8; 7680/$long" | bc)
echo "DEBUG: scale1=$scale1, scale2=$scale2"
# 取scale1和scale2的最大值
scale=$(echo "$scale1 > $scale2" | bc -l)
if [ "$scale" -eq 1 ]; then
use_scale=$scale1
else
use_scale=$scale2
fi
use_scale=$(printf "%f" "$use_scale")
echo "DEBUG: use_scale=$use_scale"
# 保证不缩小
scale_cmp=$(echo "$use_scale > 1" | bc -l)
echo "DEBUG: scale_cmp=$scale_cmp"
if [ "$scale_cmp" -eq 1 ]; then
target_w=$(awk -v w="$orig_w" -v s="$use_scale" 'BEGIN{printf "%d", w*s+0.5}')
target_h=$(awk -v h="$orig_h" -v s="$use_scale" 'BEGIN{printf "%d", h*s+0.5}')
echo "原图分辨率: ${orig_w}x${orig_h}, 目标分辨率: ${target_w}x${target_h} (短边≥4320, 长边≥7680)"
else
target_w=$orig_w
target_h=$orig_h
echo "原图分辨率: ${orig_w}x${orig_h}, 已满足短边≥4320且长边≥7680,无需放大"
fi
# 处理图片,循环调整压缩率直到满足大小要求
while true; do
echo "尝试第 $try 次: compress=$compress"
upscale_cmd="\"$BIN_PATH\" -i \"$INPUT_FILE\" -o \"$OUTPUT_FILE\" -f $FORMAT -m \"$MODELPATH\" -n $MODELNAME -r \"${target_w}x${target_h}\" -c $compress -j $THREADS -v"
echo "执行命令: $upscale_cmd"
eval $upscale_cmd
if [ ! -f "$OUTPUT_FILE" ]; then
echo "$base: 未生成图片,compress=$compress"
echo "处理失败"
exit 1
fi
size=$(stat -f%z "$OUTPUT_FILE")
res=$(sips -g pixelWidth -g pixelHeight "$OUTPUT_FILE" 2>/dev/null | awk '/pixelWidth|pixelHeight/ {print $2}' | xargs | sed 's/ /x/')
echo "$base: compress=$compress, size=${size} bytes, 分辨率=${res}"
if [ $size -le $MAX_SIZE ] || [ $compress -ge 100 ]; then
echo "$base: 满足大小要求,最终 compress=$compress"
break
fi
# compress 每次递增10,最大不超过100
compress=$((compress + 10))
[ $compress -gt 100 ] && compress=100
try=$((try+1))
[ $try -gt 10 ] && echo "$base: 达到最大尝试次数,停止调整" && break
done
echo "\n===== 处理完成 ====="
if [ -f "$OUTPUT_FILE" ]; then
input_size=$(stat -f%z "$INPUT_FILE")
output_size=$(stat -f%z "$OUTPUT_FILE")
input_res=$(sips -g pixelWidth -g pixelHeight "$INPUT_FILE" 2>/dev/null | awk '/pixelWidth|pixelHeight/ {print $2}' | xargs | sed 's/ /x/')
output_res=$(sips -g pixelWidth -g pixelHeight "$OUTPUT_FILE" 2>/dev/null | awk '/pixelWidth|pixelHeight/ {print $2}' | xargs | sed 's/ /x/')
echo "输入: $(basename "$INPUT_FILE") - ${input_size} bytes, ${input_res}"
echo "输出: $(basename "$OUTPUT_FILE") - ${output_size} bytes, ${output_res}"
echo "处理成功完成!"
else
echo "处理失败:未生成输出文件"
exit 1
fi
+4
View File
@@ -0,0 +1,4 @@
# https://dart.dev/guides/libraries/private-files
# Created by `dart pub`
.dart_tool/
output/**
+3
View File
@@ -0,0 +1,3 @@
## 1.0.0
- Initial version.
+9
View File
@@ -0,0 +1,9 @@
# cli_headless
A simple headless Dart CLI app using Thermion to render to a bitmap.
To run:
`dart --enable-experiment=native-assets run bin/example.dart`
Currently, this will probably only work on a non-virtualized macOS host.
@@ -0,0 +1,30 @@
# This file configures the static analysis results for your project (errors,
# warnings, and lints).
#
# This enables the 'recommended' set of lints from `package:lints`.
# This set helps identify many issues that may lead to problems when running
# or consuming Dart code, and enforces writing Dart using a single, idiomatic
# style and format.
#
# If you want a smaller set of lints you can change this to specify
# 'package:lints/core.yaml'. These are just the most critical lints
# (the recommended set includes the core lints).
# The core lints are also what is used by pub.dev for scoring packages.
include: package:lints/recommended.yaml
# Uncomment the following section to specify additional rules.
# linter:
# rules:
# - camel_case_types
# analyzer:
# exclude:
# - path/to/excluded/files/**
# For more information about the core and recommended set of lints, see
# https://dart.dev/go/core-lints
# For additional information about configuring this file, see
# https://dart.dev/guides/language/analysis-options
@@ -0,0 +1,32 @@
import 'dart:io';
import 'dart:isolate';
import 'package:thermion_dart/thermion_dart.dart';
import 'package:thermion_dart/src/filament/src/implementation/ffi_filament_app.dart';
void main() async {
await FFIFilamentApp.create();
final (width, height) = (500, 500);
final sc = await FilamentApp.instance!.createHeadlessSwapChain(width, height);
var viewer = ThermionViewerFFI();
await viewer.initialized;
await FilamentApp.instance!.register(sc, viewer.view);
await viewer.view.setFrustumCullingEnabled(false);
await viewer.setBackgroundColor(1, 0, 1, 1);
await viewer.setViewport(width, height);
final result = await FilamentApp.instance!.capture(
sc,
view: viewer.view,
);
final bitmap = await pixelBufferToBmp(result.first.$2, width, height,
hasAlpha: true, isFloat: true);
var outfile = File("output/render.bmp");
outfile.parent.create();
outfile.writeAsBytesSync(bitmap);
await FilamentApp.instance!.destroy();
Isolate.current.kill();
}
+21
View File
@@ -0,0 +1,21 @@
name: example_cli
description: A sample command-line application.
version: 1.0.0
environment:
sdk: ^3.3.0
hooks:
user_defines:
thermion_dart:
mode: debug
tracing: enabled
dependencies:
thermion_dart:
path: ../../../thermion_dart
dev_dependencies:
ffigen: ^11.0.0
lints: ^3.0.0
test: ^1.24.0
+12 -25
View File
@@ -1,9 +1,8 @@
import 'dart:ffi'; import 'dart:ffi';
import 'dart:io'; import 'dart:io';
import 'dart:math'; import 'dart:math';
import 'package:ffi/ffi.dart'; import 'package:ffi/ffi.dart';
import 'package:thermion_dart/src/utils/src/dart_resources.dart'; import 'package:thermion_dart/src/viewer/src/ffi/src/ffi_filament_app.dart';
import 'package:thermion_dart/src/viewer/src/ffi/src/thermion_viewer_ffi.dart'; import 'package:thermion_dart/src/viewer/src/ffi/src/thermion_viewer_ffi.dart';
import 'package:thermion_dart/src/viewer/src/ffi/src/thermion_dart.g.dart'; import 'package:thermion_dart/src/viewer/src/ffi/src/thermion_dart.g.dart';
import 'package:thermion_dart/thermion_dart.dart'; import 'package:thermion_dart/thermion_dart.dart';
@@ -13,29 +12,17 @@ import 'package:cli_windows/thermion_window.g.dart';
void main(List<String> arguments) async { void main(List<String> arguments) async {
var hwnd = create_thermion_window(500, 500, 0, 0); var hwnd = create_thermion_window(500, 500, 0, 0);
update(); update();
await FFIFilamentApp.create();
final resourceLoader = calloc<ResourceLoaderWrapper>(1); var viewer = ThermionViewerFFI(
loadAssetFromUri: (path) async => File(path.replaceAll("file://", "")).readAsBytesSync());
var loadToOut = NativeCallable<
Void Function(Pointer<Char>,
Pointer<ResourceBuffer>)>.listener(DartResourceLoader.loadResource);
resourceLoader.ref.loadToOut = loadToOut.nativeFunction;
var freeResource = NativeCallable<Void Function(ResourceBuffer)>.listener(
DartResourceLoader.freeResource);
resourceLoader.ref.freeResource = freeResource.nativeFunction;
var viewer = ThermionViewerFFI(
resourceLoader: resourceLoader.cast<Void>());
await viewer.initialized; await viewer.initialized;
var swapChain = await viewer.createHeadlessSwapChain(500,500); var swapChain = await FilamentApp.instance!.createSwapChain(Pointer<Void>.fromAddress(hwnd));
var view = await viewer.getViewAt(0); var view = viewer.view;
await view.updateViewport(500, 500); await view.setViewport(500, 500);
var camera = await viewer.getMainCamera(); var camera = await viewer.getActiveCamera();
await camera.setLensProjection(); await camera.setLensProjection();
await FilamentApp.instance!.register(swapChain, view);
await view.setRenderable(true, swapChain);
await viewer.setBackgroundColor(1.0, 0.0, 0.0, 1.0); await viewer.setBackgroundColor(1.0, 0.0, 0.0, 1.0);
@@ -49,15 +36,15 @@ void main(List<String> arguments) async {
var last = 0; var last = 0;
await viewer.setCameraPosition(0, 0, 10); await camera.lookAt(Vector3(0, 0, 10));
while(true) { while(true) {
var angle = (stopwatch.elapsedMilliseconds / 1000) * 2 * pi; var angle = (stopwatch.elapsedMilliseconds / 1000) * 2 * pi;
var rotation = Quaternion.axisAngle(Vector3(0,1,0), angle); var rotation = Quaternion.axisAngle(Vector3(0,1,0), angle);
var position = Vector3(10 * sin(angle), 0, 10 * cos(angle)); var position = Vector3(10 * sin(angle), 0, 10 * cos(angle));
var modelMatrix = Matrix4.compose(position, rotation, Vector3.all(1)); var modelMatrix = Matrix4.compose(position, rotation, Vector3.all(1));
await viewer.setCameraModelMatrix4(modelMatrix); await camera.setModelMatrix(modelMatrix);
await viewer.render(); await FilamentApp.instance!.requestFrame();
update(); update();
await Future.delayed(Duration(milliseconds: 17)); await Future.delayed(Duration(milliseconds: 17));
} }
+6 -9
View File
@@ -1,5 +1,3 @@
import 'dart:io';
import 'package:archive/archive.dart';
import 'package:logging/logging.dart'; import 'package:logging/logging.dart';
import 'package:native_assets_cli/native_assets_cli.dart'; import 'package:native_assets_cli/native_assets_cli.dart';
import 'package:native_toolchain_c/native_toolchain_c.dart'; import 'package:native_toolchain_c/native_toolchain_c.dart';
@@ -10,23 +8,22 @@ void main(List<String> args) async {
..level = Level.ALL ..level = Level.ALL
..onRecord.listen((record) => print( ..onRecord.listen((record) => print(
record.message + "\n")); record.message + "\n"));
await build(args, (input, output) async {
await build(args, (config, output) async {
final cbuilder = CBuilder.library( final cbuilder = CBuilder.library(
name: "thermion_window", name: input.packageName,
language: Language.cpp, language: Language.cpp,
assetName: 'thermion_window.dart', assetName: 'cli_windows.dart',
sources: ['native/thermion_window.cpp'], sources: ['native/thermion_window.cpp'],
includes: ['native', '../../../thermion_dart/native/include'], includes: ['native', '../../../thermion_dart/native/include'],
defines: {"UNICODE":"1"}, defines: {"UNICODE":"1"},
flags:[], flags:[],
dartBuildFiles: ['hook/build.dart'], dartBuildFiles: ['hook/build.dart'],
); );
await cbuilder.run( await cbuilder.run(
buildConfig: config, input: input,
buildOutput: output, output: output,
logger: logger, logger: logger,
); );
@@ -2,7 +2,7 @@
// //
// Generated by `package:ffigen`. // Generated by `package:ffigen`.
// ignore_for_file: type=lint // ignore_for_file: type=lint
@ffi.DefaultAsset('package:cli_windows/thermion_window.dart') @ffi.DefaultAsset('package:cli_windows/cli_windows.dart')
library; library;
import 'dart:ffi' as ffi; import 'dart:ffi' as ffi;
+2 -23
View File
@@ -1,42 +1,21 @@
name: cli_windows name: cli_windows
description: A sample command-line application with basic argument parsing. description: A sample command-line application with basic argument parsing.
version: 0.0.1 version: 0.0.1
# repository: https://github.com/my_org/my_repo
environment: environment:
sdk: ^3.6.0-326.0.dev sdk: ^3.6.0-326.0.dev
# Add regular dependencies here.
dependencies: dependencies:
args: ^2.5.0 args: ^2.5.0
thermion_dart: thermion_dart:
path: ../../../thermion_dart path: ../../../thermion_dart
ffi: ^2.1.3 ffi: ^2.1.3
vector_math: ^2.1.4 vector_math: ^2.1.4
native_toolchain_c: ^0.4.2 native_toolchain_c: ^0.9.0
native_assets_cli: ^0.6.1 native_assets_cli: ^0.12.0
dev_dependencies: dev_dependencies:
lints: ^5.0.0 lints: ^5.0.0
test: ^1.24.0 test: ^1.24.0
ffigen: ^13.0.0
ffigen:
output: 'lib/thermion_window.g.dart'
headers:
entry-points:
- 'native/thermion_window.h'
include-directives:
- 'native/thermion_window.h'
ffi-native:
assetId: package:cli_windows/thermion_window.dart
ignore-source-errors: true
llvm-path:
- E:\clang+llvm-19.1.3-x86_64-pc-windows-msvc\bin
- E:\clang+llvm-19.1.3-x86_64-pc-windows-msvc\
- E:\clang+llvm-19.1.3-x86_64-pc-windows-msvc\lib
functions:
leaf:
include:
- '.*'
+19
View File
@@ -0,0 +1,19 @@
name: example_web
description: A sample command-line application.
version: 1.0.0
# repository: https://github.com/my_org/my_repo
environment:
sdk: ^3.3.0
dependencies:
thermion_dart:
path: ../../../thermion_dart
logging: ^1.3.0
dev_dependencies:
lints: ^3.0.0
test: ^1.24.0
build_runner: ^2.4.13
build_test: ^2.2.2
build_web_compilers: ^4.1.5
+1
View File
@@ -0,0 +1 @@
../../../assets/
+101
View File
@@ -0,0 +1,101 @@
import 'dart:async';
import 'dart:js_interop';
import 'dart:math';
import 'package:web/web.dart';
import 'package:logging/logging.dart';
import 'package:thermion_dart/thermion_dart.dart'
hide NativeLibrary, Image_decode;
import 'package:thermion_dart/src/filament/src/implementation/ffi_filament_app.dart';
import 'web_input_handler.dart';
import 'package:thermion_dart/src/bindings/src/thermion_dart_js_interop.g.dart';
void main(List<String> arguments) async {
Logger.root.onRecord.listen((record) {
print(record);
});
NativeLibrary.initBindings("thermion_dart");
final canvas =
document.getElementById("thermion_canvas") as HTMLCanvasElement;
try {
canvas.width = canvas.clientWidth;
canvas.height = canvas.clientHeight;
} catch (err) {
print(err.toString());
}
final config = FFIFilamentConfig(backend: Backend.OPENGL);
await FFIFilamentApp.create(config: config);
var swapChain = await FilamentApp.instance!
.createHeadlessSwapChain(canvas.width, canvas.height);
final viewer = ThermionViewerFFI();
await viewer.initialized;
await FilamentApp.instance!.setClearOptions(1.0, 0.0, 0.0, 1.0);
await FilamentApp.instance!.register(swapChain, viewer.view);
await viewer.setViewport(canvas.width, canvas.height);
await viewer.setRendering(true);
final rnd = Random();
// ignore: prefer_function_declarations_over_variables
bool resizing = false;
// ignore: prefer_function_declarations_over_variables
final resizer = () async {
if (resizing) {
return;
}
try {
resizing = true;
await viewer.setViewport(canvas.clientWidth, canvas.clientHeight);
Thermion_resizeCanvas(canvas.clientWidth, canvas.clientHeight);
} catch (err) {
print(err);
} finally {
resizing = false;
}
};
// ignore: unused_local_variable, prefer_function_declarations_over_variables
final jsWrapper = () {
var promise = resizer().toJS;
return promise;
};
window.addEventListener('resize', jsWrapper.toJS);
// // await FilamentApp.instance!.render();
// // await Future.delayed(Duration(seconds: 1));
// // await FilamentApp.instance!.setClearOptions(1.0, 1.0, 0.0, 1.0);
// // await FilamentApp.instance!.render();
// // await Future.delayed(Duration(seconds: 1));
await viewer.loadSkybox("assets/default_env_skybox.ktx");
await viewer.loadGltf("assets/cube.glb");
final camera = await viewer.getActiveCamera();
var zOffset = 10.0;
final inputHandler = DelegateInputHandler.flight(viewer);
final webInputHandler =
WebInputHandler(inputHandler: inputHandler, canvas: canvas);
await camera.lookAt(Vector3(0, 0, zOffset));
DateTime lastRender = DateTime.now();
while (true) {
var stackPtr = stackSave();
var now = DateTime.now();
await FilamentApp.instance!.requestFrame();
now = DateTime.now();
var timeSinceLast =
now.microsecondsSinceEpoch - lastRender.microsecondsSinceEpoch;
lastRender = now;
if (timeSinceLast < 1667) {
var waitFor = 1667 - timeSinceLast;
await Future.delayed(Duration(microseconds: waitFor));
}
stackRestore(stackPtr);
// inputHandler.keyDown(PhysicalKey.S);
// await camera.lookAt(Vector3(0,0,zOffset));
// zOffset +=0.1;
}
}
+35
View File
@@ -0,0 +1,35 @@
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="./thermion_dart.js"></script>
<script type="module">
try {
window.thermion_dart = await thermion_dart();
} catch(err) {
console.error(err);
}
const script = document.createElement('script')
script.src = 'example.dart.js'
document.head.append(script);
</script>
<style>
html, body {
margin:0;
padding:0;
}
canvas {
position:absolute;
left:0;
right:0;
top:0;
bottom:0;
width:100%;
height:100%;
}
</style>
</head>
<body>
<canvas id="thermion_canvas"></canvas>
</body>
</html>
+35
View File
@@ -0,0 +1,35 @@
<html>
<head>
<script src="thermion_dart.js"></script>
<style>
html, body {
margin:0;
padding:0;
}
canvas {
position:absolute;
left:0;
right:0;
top:0;
bottom:0;
width:100%;
height:100%;
}
</style>
</head>
<script type="module">
try {
window.thermion_dart = await thermion_dart();
} catch(err) {
console.error(err);
}
const dartModulePromise = WebAssembly.compileStreaming(fetch('./example.wasm'));
const imports = {};
const dart2wasm_runtime = await import('./example.mjs');
const moduleInstance = await dart2wasm_runtime.instantiate(dartModulePromise, imports);
await dart2wasm_runtime.invoke(moduleInstance);
</script>
<body>
<canvas id="canvas"></canvas>
</body>
</html>
+22
View File
@@ -0,0 +1,22 @@
import { readFile } from 'fs/promises';
import { compile } from './example.mjs';
import thermion_dart from './thermion_dart.js';
async function runDartWasm() {
globalThis['thermion_dart'] = await thermion_dart();
const wasmBytes = await readFile('example.wasm');
const compiledApp = await compile(wasmBytes);
const instantiatedApp = await compiledApp.instantiate({});
try {
instantiatedApp.invokeMain();
} catch(err) {
console.error("Failed");
console.error(err);
}
}
runDartWasm().catch(console.error);
+1
View File
@@ -0,0 +1 @@
../../../../thermion_dart/native/web/build/build/out/thermion_dart.js
+1
View File
@@ -0,0 +1 @@
../../../../thermion_dart/native/web/build/build/out/thermion_dart.wasm
@@ -0,0 +1,299 @@
import 'dart:js_interop';
import 'package:web/web.dart' as web;
import 'package:thermion_dart/thermion_dart.dart';
class WebInputHandler {
final InputHandler inputHandler;
final web.HTMLCanvasElement canvas;
late double pixelRatio;
final Map<int, Vector2> _touchPositions = {};
WebInputHandler({
required this.inputHandler,
required this.canvas,
}) {
pixelRatio = web.window.devicePixelRatio;
_initializeEventListeners();
}
void _initializeEventListeners() {
canvas.addEventListener('mousedown', _onMouseDown.toJS);
canvas.addEventListener('mousemove', _onMouseMove.toJS);
canvas.addEventListener('mouseup', _onMouseUp.toJS);
canvas.addEventListener('wheel', _onMouseWheel.toJS);
web.window.addEventListener('keydown', _onKeyDown.toJS);
web.window.addEventListener('keyup', _onKeyUp.toJS);
canvas.addEventListener('touchstart', _onTouchStart.toJS);
canvas.addEventListener('touchmove', _onTouchMove.toJS);
canvas.addEventListener('touchend', _onTouchEnd.toJS);
canvas.addEventListener('touchcancel', _onTouchCancel.toJS);
}
void _onMouseDown(web.MouseEvent event) {
final localPos = _getLocalPositionFromEvent(event);
final button = _getMouseButtonFromEvent(event);
inputHandler.handle(MouseEvent(
MouseEventType.buttonDown,
button,
localPos,
Vector2.zero(),
));
event.preventDefault();
}
void _onMouseMove(web.MouseEvent event) {
final localPos = _getLocalPositionFromEvent(event);
final delta = Vector2(event.movementX ?? 0, event.movementY ?? 0);
final button = _getMouseButtonFromEvent(event);
inputHandler.handle(MouseEvent(
MouseEventType.move,
button,
localPos,
delta,
));
event.preventDefault();
}
void _onMouseUp(web.MouseEvent event) {
final localPos = _getLocalPositionFromEvent(event);
final button = _getMouseButtonFromEvent(event);
inputHandler.handle(MouseEvent(
MouseEventType.buttonUp,
button,
localPos,
Vector2.zero(),
));
event.preventDefault();
}
void _onMouseWheel(web.WheelEvent event) {
final localPos = _getLocalPositionFromEvent(event);
final delta = event.deltaY;
inputHandler.handle(ScrollEvent(
localPosition: localPos,
delta: delta,
));
event.preventDefault();
}
void _onKeyDown(web.KeyboardEvent event) {
PhysicalKey? physicalKey = _getPhysicalKeyFromEvent(event);
LogicalKey? logicalKey = _getLogicalKeyFromEvent(event);
if (physicalKey != null && logicalKey != null) {
inputHandler.handle(KeyEvent(KeyEventType.down, logicalKey, physicalKey));
}
event.preventDefault();
}
void _onKeyUp(web.KeyboardEvent event) {
LogicalKey? logicalKey = _getLogicalKeyFromEvent(event);
PhysicalKey? physicalKey = _getPhysicalKeyFromEvent(event);
if (physicalKey != null && logicalKey != null) {
inputHandler.handle(KeyEvent(KeyEventType.up, logicalKey, physicalKey));
}
event.preventDefault();
}
void _onTouchStart(web.TouchEvent event) {
for (var touch in event.changedTouches.toList()) {
final pos = _getLocalPositionFromTouch(touch);
_touchPositions[touch.identifier] = pos;
}
final touchCount = event.touches.toList().length;
if (touchCount == 1) {
final touch = event.touches.toList().first;
final pos = _getLocalPositionFromTouch(touch);
inputHandler.handle(TouchEvent(
TouchEventType.tap,
pos,
null,
));
}
if (touchCount >= 2) {
final focalPoint = _calculateFocalPoint(event.touches.toList());
inputHandler.handle(ScaleStartEvent(
numPointers: touchCount,
localFocalPoint: (focalPoint.x, focalPoint.y),
));
}
event.preventDefault();
}
void _onTouchMove(web.TouchEvent event) {
for (var touch in event.changedTouches.toList()) {
final id = touch.identifier;
final currPos = _getLocalPositionFromTouch(touch);
final prevPos = _touchPositions[id];
if (prevPos != null) {
_touchPositions[id] = currPos;
}
}
final touchCount = event.touches.toList().length;
if (touchCount >= 2) {
final touches = event.touches.toList();
final focalPoint = _calculateFocalPoint(touches);
// Calculate scale
final currPositions = touches.map((t) => _getLocalPositionFromTouch(t)).toList();
final prevPositions = touches.map((t) => _touchPositions[t.identifier] ?? _getLocalPositionFromTouch(t)).toList();
final currDist = (currPositions[0] - currPositions[1]).length;
final prevDist = (prevPositions[0] - prevPositions[1]).length;
final scale = prevDist > 0 ? currDist / prevDist : 1.0;
// Calculate focal point delta
final prevFocalPoint = _calculateFocalPoint(touches, prevPositions);
final focalPointDelta = focalPoint - prevFocalPoint;
inputHandler.handle(ScaleUpdateEvent(
numPointers: touchCount,
localFocalPoint: (focalPoint.x, focalPoint.y),
localFocalPointDelta: (focalPointDelta.x, focalPointDelta.y),
rotation: 0.0, // We don't track rotation in the web implementation
scale: scale,
horizontalScale: scale,
verticalScale: scale,
));
}
event.preventDefault();
}
void _onTouchEnd(web.TouchEvent event) {
for (var touch in event.changedTouches.toList()) {
_touchPositions.remove(touch.identifier);
}
final touchCount = event.touches.toList().length;
inputHandler.handle(ScaleEndEvent(
numPointers: touchCount,
));
event.preventDefault();
}
void _onTouchCancel(web.TouchEvent event) {
for (var touch in event.changedTouches.toList()) {
_touchPositions.remove(touch.identifier);
}
final touchCount = event.touches.toList().length;
inputHandler.handle(ScaleEndEvent(
numPointers: touchCount,
));
event.preventDefault();
}
MouseButton? _getMouseButtonFromEvent(web.MouseEvent event) {
if (event.button == 1 || (event.buttons & 4 != 0)) {
return MouseButton.middle;
} else if (event.button == 0 || (event.buttons & 1 != 0)) {
return MouseButton.left;
} else if (event.button == 2 || (event.buttons & 2 != 0)) {
return MouseButton.right;
}
return null;
}
PhysicalKey? _getPhysicalKeyFromEvent(web.KeyboardEvent event) {
switch (event.code) {
case 'KeyW':
return PhysicalKey.w;
case 'KeyA':
return PhysicalKey.a;
case 'KeyS':
return PhysicalKey.s;
case 'KeyD':
return PhysicalKey.d;
default:
return null;
}
}
LogicalKey? _getLogicalKeyFromEvent(web.KeyboardEvent event) {
switch (event.key) {
case 'KeyW':
return LogicalKey.w;
case 'KeyA':
return LogicalKey.a;
case 'KeyS':
return LogicalKey.s;
case 'KeyD':
return LogicalKey.d;
default:
return null;
}
}
Vector2 _getLocalPositionFromEvent(web.Event event) {
final rect = canvas.getBoundingClientRect();
double clientX = 0, clientY = 0;
if (event is web.MouseEvent) {
clientX = event.clientX.toDouble();
clientY = event.clientY.toDouble();
} else if (event is web.TouchEvent) {
final touch = event.touches.toList().firstOrNull;
if (touch != null) {
clientX = touch.clientX;
clientY = touch.clientY;
}
}
return Vector2(
(clientX - rect.left) * pixelRatio,
(clientY - rect.top) * pixelRatio,
);
}
Vector2 _getLocalPositionFromTouch(web.Touch touch) {
final rect = canvas.getBoundingClientRect();
return Vector2(
(touch.clientX - rect.left) * pixelRatio,
(touch.clientY - rect.top) * pixelRatio,
);
}
Vector2 _calculateFocalPoint(List<web.Touch> touches, [List<Vector2>? positions]) {
if (touches.isEmpty) return Vector2.zero();
final points = positions ?? touches.map((t) => _getLocalPositionFromTouch(t)).toList();
Vector2 sum = Vector2.zero();
for (var point in points) {
sum += point;
}
return sum.scaled(1.0 / points.length);
}
void dispose() {
canvas.removeEventListener('mousedown', _onMouseDown.toJS);
canvas.removeEventListener('mousemove', _onMouseMove.toJS);
canvas.removeEventListener('mouseup', _onMouseUp.toJS);
canvas.removeEventListener('wheel', _onMouseWheel.toJS);
web.window.removeEventListener('keydown', _onKeyDown.toJS);
web.window.removeEventListener('keyup', _onKeyUp.toJS);
canvas.removeEventListener('touchstart', _onTouchStart.toJS);
canvas.removeEventListener('touchmove', _onTouchMove.toJS);
canvas.removeEventListener('touchend', _onTouchEnd.toJS);
canvas.removeEventListener('touchcancel', _onTouchCancel.toJS);
}
}
@@ -0,0 +1,46 @@
plugins {
id "com.android.application"
id "kotlin-android"
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
id "dev.flutter.flutter-gradle-plugin"
}
android {
namespace = "com.example.quickstart"
compileSdk = flutter.compileSdkVersion
ndkVersion = flutter.ndkVersion
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId = "com.example.quickstart"
// You can update the following values to match your application needs.
// For more information, see: https://flutter.dev/to/review-gradle-config.
minSdk = 22
targetSdk = flutter.targetSdkVersion
versionCode = flutter.versionCode
versionName = flutter.versionName
}
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig = signingConfigs.debug
shrinkResources false
minifyEnabled false
}
}
}
flutter {
source = "../.."
}
@@ -0,0 +1,48 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application
android:label="camera_manipulation"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher">
<activity
android:name=".MainActivity"
android:exported="true"
android:launchMode="singleTop"
android:taskAffinity=""
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues
to determine the Window background behind the Flutter UI. -->
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme"
/>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data
android:name="flutterEmbedding"
android:value="2" />
<meta-data
android:name="io.flutter.embedding.android.EnableImpeller"
android:value="false" />
</application>
<!-- Required to query activities that can process text, see:
https://developer.android.com/training/package-visibility and
https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.
In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. -->
<queries>
<intent>
<action android:name="android.intent.action.PROCESS_TEXT"/>
<data android:mimeType="text/plain"/>
</intent>
</queries>
</manifest>

Some files were not shown because too many files have changed in this diff Show More