mirror of
https://github.com/kaosat-dev/Blender_bevy_components_workflow.git
synced 2024-12-22 15:44:11 +00:00
chore(examples): minor tweaks
This commit is contained in:
parent
f27c8a078c
commit
1a7ea5bd4a
@ -203,6 +203,19 @@
|
||||
"type": "array",
|
||||
"typeInfo": "List"
|
||||
},
|
||||
"alloc::vec::Vec<blenvy::blueprints::materials::MaterialInfo>": {
|
||||
"isComponent": false,
|
||||
"isResource": false,
|
||||
"items": {
|
||||
"type": {
|
||||
"$ref": "#/$defs/blenvy::blueprints::materials::MaterialInfo"
|
||||
}
|
||||
},
|
||||
"long_name": "alloc::vec::Vec<blenvy::blueprints::materials::MaterialInfo>",
|
||||
"short_name": "Vec<MaterialInfo>",
|
||||
"type": "array",
|
||||
"typeInfo": "List"
|
||||
},
|
||||
"alloc::vec::Vec<f32>": {
|
||||
"isComponent": false,
|
||||
"isResource": false,
|
||||
@ -1410,6 +1423,44 @@
|
||||
"type": "object",
|
||||
"typeInfo": "Enum"
|
||||
},
|
||||
"bevy_asset::handle::Handle<blenvy::blueprints::assets::BlueprintPreloadAssets>": {
|
||||
"isComponent": true,
|
||||
"isResource": false,
|
||||
"long_name": "bevy_asset::handle::Handle<blenvy::blueprints::assets::BlueprintPreloadAssets>",
|
||||
"oneOf": [
|
||||
{
|
||||
"items": false,
|
||||
"long_name": "Strong",
|
||||
"prefixItems": [
|
||||
{
|
||||
"type": {
|
||||
"$ref": "#/$defs/std::sync::Arc<bevy_asset::handle::StrongHandle>"
|
||||
}
|
||||
}
|
||||
],
|
||||
"short_name": "Strong",
|
||||
"type": "array",
|
||||
"typeInfo": "Tuple"
|
||||
},
|
||||
{
|
||||
"items": false,
|
||||
"long_name": "Weak",
|
||||
"prefixItems": [
|
||||
{
|
||||
"type": {
|
||||
"$ref": "#/$defs/bevy_asset::id::AssetId<blenvy::blueprints::assets::BlueprintPreloadAssets>"
|
||||
}
|
||||
}
|
||||
],
|
||||
"short_name": "Weak",
|
||||
"type": "array",
|
||||
"typeInfo": "Tuple"
|
||||
}
|
||||
],
|
||||
"short_name": "Handle<BlueprintPreloadAssets>",
|
||||
"type": "object",
|
||||
"typeInfo": "Enum"
|
||||
},
|
||||
"bevy_asset::id::AssetId<()>": {
|
||||
"isComponent": false,
|
||||
"isResource": false,
|
||||
@ -2422,6 +2473,52 @@
|
||||
"type": "object",
|
||||
"typeInfo": "Enum"
|
||||
},
|
||||
"bevy_asset::id::AssetId<blenvy::blueprints::assets::BlueprintPreloadAssets>": {
|
||||
"isComponent": false,
|
||||
"isResource": false,
|
||||
"long_name": "bevy_asset::id::AssetId<blenvy::blueprints::assets::BlueprintPreloadAssets>",
|
||||
"oneOf": [
|
||||
{
|
||||
"additionalProperties": false,
|
||||
"long_name": "Index",
|
||||
"properties": {
|
||||
"index": {
|
||||
"long_name": "index",
|
||||
"type": {
|
||||
"$ref": "#/$defs/bevy_asset::assets::AssetIndex"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"index"
|
||||
],
|
||||
"short_name": "Index",
|
||||
"type": "object",
|
||||
"typeInfo": "Struct"
|
||||
},
|
||||
{
|
||||
"additionalProperties": false,
|
||||
"long_name": "Uuid",
|
||||
"properties": {
|
||||
"uuid": {
|
||||
"long_name": "uuid",
|
||||
"type": {
|
||||
"$ref": "#/$defs/uuid::Uuid"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"uuid"
|
||||
],
|
||||
"short_name": "Uuid",
|
||||
"type": "object",
|
||||
"typeInfo": "Struct"
|
||||
}
|
||||
],
|
||||
"short_name": "AssetId<BlueprintPreloadAssets>",
|
||||
"type": "object",
|
||||
"typeInfo": "Enum"
|
||||
},
|
||||
"bevy_asset::path::AssetPath": {
|
||||
"isComponent": false,
|
||||
"isResource": false,
|
||||
@ -12353,7 +12450,7 @@
|
||||
},
|
||||
"blenvy::blueprints::materials::MaterialInfo": {
|
||||
"additionalProperties": false,
|
||||
"isComponent": true,
|
||||
"isComponent": false,
|
||||
"isResource": false,
|
||||
"long_name": "blenvy::blueprints::materials::MaterialInfo",
|
||||
"properties": {
|
||||
@ -12376,6 +12473,22 @@
|
||||
"type": "object",
|
||||
"typeInfo": "Struct"
|
||||
},
|
||||
"blenvy::blueprints::materials::MaterialInfos": {
|
||||
"isComponent": true,
|
||||
"isResource": false,
|
||||
"items": false,
|
||||
"long_name": "blenvy::blueprints::materials::MaterialInfos",
|
||||
"prefixItems": [
|
||||
{
|
||||
"type": {
|
||||
"$ref": "#/$defs/alloc::vec::Vec<blenvy::blueprints::materials::MaterialInfo>"
|
||||
}
|
||||
}
|
||||
],
|
||||
"short_name": "MaterialInfos",
|
||||
"type": "array",
|
||||
"typeInfo": "TupleStruct"
|
||||
},
|
||||
"blenvy::blueprints::spawn_from_blueprints::BlueprintInfo": {
|
||||
"additionalProperties": false,
|
||||
"isComponent": true,
|
||||
@ -12401,6 +12514,17 @@
|
||||
"type": "object",
|
||||
"typeInfo": "Struct"
|
||||
},
|
||||
"blenvy::blueprints::spawn_from_blueprints::BlueprintInstanceDisabled": {
|
||||
"additionalProperties": false,
|
||||
"isComponent": true,
|
||||
"isResource": false,
|
||||
"long_name": "blenvy::blueprints::spawn_from_blueprints::BlueprintInstanceDisabled",
|
||||
"properties": {},
|
||||
"required": [],
|
||||
"short_name": "BlueprintInstanceDisabled",
|
||||
"type": "object",
|
||||
"typeInfo": "Struct"
|
||||
},
|
||||
"blenvy::blueprints::spawn_from_blueprints::HideUntilReady": {
|
||||
"additionalProperties": false,
|
||||
"isComponent": true,
|
||||
@ -12541,6 +12665,28 @@
|
||||
"type": "string",
|
||||
"typeInfo": "Enum"
|
||||
},
|
||||
"blenvy::save_load::Dynamic": {
|
||||
"additionalProperties": false,
|
||||
"isComponent": true,
|
||||
"isResource": false,
|
||||
"long_name": "blenvy::save_load::Dynamic",
|
||||
"properties": {},
|
||||
"required": [],
|
||||
"short_name": "Dynamic",
|
||||
"type": "object",
|
||||
"typeInfo": "Struct"
|
||||
},
|
||||
"blenvy::save_load::StaticEntitiesRoot": {
|
||||
"additionalProperties": false,
|
||||
"isComponent": true,
|
||||
"isResource": false,
|
||||
"long_name": "blenvy::save_load::StaticEntitiesRoot",
|
||||
"properties": {},
|
||||
"required": [],
|
||||
"short_name": "StaticEntitiesRoot",
|
||||
"type": "object",
|
||||
"typeInfo": "Struct"
|
||||
},
|
||||
"blenvy_animation_example::Fox": {
|
||||
"additionalProperties": false,
|
||||
"isComponent": true,
|
||||
|
@ -2,11 +2,10 @@ use std::time::Duration;
|
||||
|
||||
use bevy::prelude::*;
|
||||
use blenvy::{
|
||||
AddToGameWorld, BlenvyPlugin, BluePrintBundle, BlueprintAnimationPlayerLink,
|
||||
BlueprintAnimations, BlueprintInfo, DynamicBlueprintInstance, GameWorldTag, HideUntilReady,
|
||||
BlenvyPlugin, BlueprintAnimationPlayerLink,
|
||||
BlueprintAnimations, BlueprintInfo, GameWorldTag, HideUntilReady,
|
||||
SpawnBlueprint,
|
||||
};
|
||||
use rand::Rng;
|
||||
|
||||
mod component_examples;
|
||||
use component_examples::*;
|
||||
|
@ -1,7 +1,6 @@
|
||||
use bevy::prelude::*;
|
||||
use blenvy::{
|
||||
AddToGameWorld, BlenvyPlugin, BluePrintBundle, BlueprintInfo, DynamicBlueprintInstance,
|
||||
GameWorldTag, HideUntilReady, SpawnBlueprint,
|
||||
AddToGameWorld, BlenvyPlugin, BluePrintBundle, BlueprintInfo, Dynamic, GameWorldTag, HideUntilReady, SpawnBlueprint
|
||||
};
|
||||
use rand::Rng;
|
||||
|
||||
@ -36,12 +35,8 @@ fn setup_game(mut commands: Commands) {
|
||||
pub fn spawn_blueprint_instance(
|
||||
keycode: Res<ButtonInput<KeyCode>>,
|
||||
mut commands: Commands,
|
||||
|
||||
mut game_world: Query<(Entity, &Children), With<GameWorldTag>>,
|
||||
) {
|
||||
if keycode.just_pressed(KeyCode::KeyS) {
|
||||
let world = game_world.single_mut();
|
||||
let world = world.1[0];
|
||||
|
||||
let mut rng = rand::thread_rng();
|
||||
let range = 5.5;
|
||||
@ -50,7 +45,7 @@ pub fn spawn_blueprint_instance(
|
||||
|
||||
let name_index: u64 = rng.gen();
|
||||
|
||||
let new_entity = commands
|
||||
let __new_entity = commands
|
||||
.spawn((
|
||||
BluePrintBundle {
|
||||
blueprint: BlueprintInfo {
|
||||
@ -59,7 +54,7 @@ pub fn spawn_blueprint_instance(
|
||||
}, // FIXME
|
||||
..Default::default()
|
||||
},
|
||||
DynamicBlueprintInstance,
|
||||
Dynamic,
|
||||
bevy::prelude::Name::from(format!("test{}", name_index)),
|
||||
HideUntilReady,
|
||||
AddToGameWorld,
|
||||
|
@ -8,7 +8,6 @@ pub mod level_transitions;
|
||||
pub use level_transitions::*;
|
||||
|
||||
use bevy::prelude::*;
|
||||
use bevy_gltf_worlflow_examples_common_rapier::{AppState, GameState};
|
||||
|
||||
pub struct GamePlugin;
|
||||
impl Plugin for GamePlugin {
|
||||
|
@ -1,7 +1,7 @@
|
||||
use std::any::TypeId;
|
||||
|
||||
use bevy::{prelude::*, utils::hashbrown::HashSet};
|
||||
use blenvy::{AddToGameWorld, BlenvyPlugin, BlueprintInfo, BlueprintWorld, Dynamic, DynamicBlueprintInstance, GameWorldTag, HideUntilReady, LoadingRequest, SavingRequest, SpawnBlueprint};
|
||||
use blenvy::{AddToGameWorld, BlenvyPlugin, BlueprintInfo, BlueprintWorld, Dynamic, GameWorldTag, HideUntilReady, LoadingRequest, SavingRequest, SpawnBlueprint};
|
||||
use rand::Rng;
|
||||
|
||||
// mod game;
|
||||
@ -77,7 +77,7 @@ fn spawn_blueprint_instance(
|
||||
.spawn((
|
||||
BlueprintInfo::from_path("blueprints/test.glb"),
|
||||
SpawnBlueprint,
|
||||
DynamicBlueprintInstance,
|
||||
Dynamic,
|
||||
bevy::prelude::Name::from(format!("test{}", name_index)),
|
||||
HideUntilReady,
|
||||
AddToGameWorld,
|
||||
|
Loading…
Reference in New Issue
Block a user