Commit Graph

8 Commits

Author SHA1 Message Date
GitGhillie fd625ef2e0
chore(lock files ): Delete and ignore Cargo.lock files (#101)
* Delete lock files
* Ignore lock files
2024-01-19 11:49:22 +01:00
Mark Moissette 5429bf4779
feat(Save & load): new crate bevy_gltf_save_load + lots of upgrades & improvements (#95)
* feat(bevy_gltf_save_load): saving & loading implemented
   * created new crate for save & load features, uses & filters out blueprints for efficient loading
   * saving & loading, even with dynamically spawned nested hierarchies works 
   * component filter , resource filter & save path root are configurable
   * for saving: added removal & cleanup logic for children component with children
  that have been filtered out: ie no more invalid children getting stored in the save files !
   * added sending of event once saving is done

* feat(examples/save-load): example for the new crate
   * loading level static & dynamic data as blueprints
   * added a bit of ui when entering saving & loading states & cleanup when exiting

* feat(bevy_gltf_blueprints): significant rewrite of how the crate works
     * simplified spawning process, no more spawning children containing blueprints etc
     * simplified post process : instead of copying original entity  into blueprint root
      we now copy blueprint root data (components & children) into the original entity ! fixes #96 
     * much simpler code wise
     * solves issue with needing to register components that we only use on the bevy side (not gltf)
    since we are not copying the bevy data into the blueprints data
     * added **copyComponents** helper to copy components from one entity to another, excluding existing
     components on the target entity, & some bells & whistles
     * **Name** is now optional when spawning a blueprint: closes #97 
     * **Transform** is now optional when spawning a blueprint: closes #98 
     * removed transform from bundle (BREAKING change)
     * added (optional)  **NoInBlueprint** component to have finer control over whether to inject the **InBlueprint** component inside spawned blueprint entities
     * added (optional) **Library**  component, so we can override library path when we want
     * added (optional) **AddToGameWorld** component for convenience   to automatically add entities to the game world, if there is one

* chore(bevy_gltf_components): removed verbose output, cleaned it up a bit

* feat(tools/auto_export): added option to split out "dynamic" objects in main scenes
   * ie if a collection instance (or its original collection) has a "dynamic" (aka mutable, saveable etc)
     flag it can get exported to a seperate gltf file (essentially acting like an "initial save")
   * the rest of the levels (the "static" data) is exported without the dynamic objects and
     can be reused with save files !
2024-01-10 14:49:29 +01:00
Mark Moissette 20b34dde20
feat(bevy_gltf_blueprints): improved error handling for clone_entity (#82)
* feat(bevy_gltf_blueprints): improved error handling for clone_entity
 * you will now get component name for components that have not been registered & thus cannot be cloned
* added a small example (in examples/bevy_gltf_blueprints/basic), just press 'U' at runtime to try to spawn an entity with unregistered components
* closes #81
2023-12-27 13:14:13 +01:00
Shawn Workman 269a211e1e
fix(bevy_gltf_blueprints): fixed main_menu handling in examples
* restrict main_menu system to only run in AppState::MenuRunning 
* this is desired because hitting enter once we transition to AppState::AppRunning pressing enter will still trigger keycode.just_pressed in main_menu and set state to AppState::AppLoading and crash the game when it tries to create another scene, camera, etc...
2023-11-30 23:11:09 +01:00
Mark Moissette 9a765d5e12
feat(bevy_gltf_blueprints): added ability to generate blueprint/scene aabbs automatically (#57)
* settable via a config flag & systems won't run if the flag is not set
 * caches aabbs per blueprint name so they do not need to be recomputed multiple time for the same blueprint
 * closes #56
2023-11-25 02:35:48 +01:00
Mark Moissette 8e67f76d28
feat(bevy_gltf_blueprints): added ability to also load gltf files, not just glb (#55)
* settable via a new field in the plugin configuration
 * updated examples & README
* closes #55
2023-11-24 12:30:47 +01:00
Mark Moissette 66a3d71fe1
feat(examples): added basic_xpbd_physics example (#45)
* feat(examples): added basic_xpbd_physics example
 * adapted code from rapier physics
 * updated blend file & exported gltf files
 * changes & tweaks to cargo files so the examples are scanned as they should be
 * various minor tweaks
2023-11-13 16:16:31 +01:00
Mark Moissette 32d01eb48f
refactor(examples): restructure examples (#44)
* refactor(examples): moved examples into more logic folders & changed to allow for per example dependencies
* chore(): updated docs, added docs, updated deps , cargo files etc
2023-11-13 14:36:42 +01:00