Skip to content

Commit

Permalink
feat: update scene exports to json format
Browse files Browse the repository at this point in the history
  • Loading branch information
mrchantey committed Aug 23, 2024
1 parent 982fc7f commit 06d79ba
Show file tree
Hide file tree
Showing 28 changed files with 38,150 additions and 30,659 deletions.
24 changes: 12 additions & 12 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -258,15 +258,15 @@ app.wasm-url = "https://storage.googleapis.com/beet-examples/app_full/main_bg.wa
name = "beet-debug"
thumb-text = "🐛"
description = "Enable debugging for printing to the console, and screen if used with beetmash/ui-terminal."
ron-path = "scenes/beet-debug.ron"
path = "scenes/beet-debug.json"

[[package.metadata.scene]]
name = "hello-world"
thumb-text = "🌍"
thumb-url = "https://storage.googleapis.com/beet-examples/screenshots/hello-world.png"
description = "A simple behavior that prints 'Hello' then 'World' to the console."
app = "app"
ron-path = "scenes/hello-world.ron"
path = "scenes/hello-world.json"
include = ["beet-debug", "beetmash/camera-2d", "beetmash/ui-terminal"]


Expand All @@ -275,23 +275,23 @@ name = "flock"
description = "Demonstration of flocking behaviors."
thumb-url = "https://storage.googleapis.com/beet-examples/screenshots/flock.png"
app = "app"
ron-path = "scenes/flock.ron"
path = "scenes/flock.json"
include = ["beet-debug", "beetmash/camera-2d", "beetmash/space-scene"]

[[package.metadata.scene]]
name = "seek"
description = "Demonstration of the seek behavior."
thumb-url = "https://storage.googleapis.com/beet-examples/screenshots/seek.png"
app = "app"
ron-path = "scenes/seek.ron"
path = "scenes/seek.json"
include = ["beet-debug", "beetmash/camera-2d", "beetmash/space-scene"]

[[package.metadata.scene]]
name = "seek-3d"
description = "A 3D demonstration of the seek behavior."
thumb-url = "https://storage.googleapis.com/beet-examples/screenshots/seek-3d.png"
app = "app"
ron-path = "scenes/seek-3d.ron"
path = "scenes/seek-3d.json"
include = ["beet-debug", "beetmash/lighting-3d", "beetmash/ground-3d"]


Expand All @@ -300,7 +300,7 @@ name = "hello-animation"
description = "A simple behavior demonstrating animation control."
thumb-url = "https://storage.googleapis.com/beet-examples/screenshots/hello-animation.png"
app = "app"
ron-path = "scenes/hello-animation.ron"
path = "scenes/hello-animation.json"
include = [
"beetmash/ui-terminal",
"beetmash/lighting-3d",
Expand All @@ -312,21 +312,21 @@ include = [
name = "hello-ml"
description = "A behavior that uses a Sentence Selector to score child behaviors, deciding which will run next."
thumb-url = "https://storage.googleapis.com/beet-examples/screenshots/hello-llm.png"
ron-path = "scenes/hello-ml.ron"
path = "scenes/hello-ml.json"
include = ["beetmash/camera-2d", "beetmash/ui-terminal", "beet-debug"]

[[package.metadata.scene]]
name = "fetch-scene"
thumb-text = "🏠"
description = "A camera and the items that the fetch character can go to."
ron-path = "scenes/fetch-scene.ron"
path = "scenes/fetch-scene.json"

[[package.metadata.scene]]
name = "fetch"
description = "Combining LLM, steering and animation behaviors."
thumb-url = "https://storage.googleapis.com/beet-examples/screenshots/fetch.png"
app = "app-ml"
ron-path = "scenes/fetch-npc.ron"
path = "scenes/fetch-npc.json"
include = [
"beetmash/ui-terminal-input",
"beetmash/lighting-3d",
Expand All @@ -340,15 +340,15 @@ events.playerMessage.initial = "I'm hungry!"
name = "frozen-lake-scene"
thumb-text = "❄️"
description = "The static scene for the frozen lake environment."
ron-path = "scenes/frozen-lake-scene.ron"
path = "scenes/frozen-lake-scene.json"


[[package.metadata.scene]]
name = "frozen-lake-train"
description = "Train a Q-learning agent to navigate the frozen lake environment."
thumb-url = "https://storage.googleapis.com/beet-examples/screenshots/frozen-lake-run.png"
app = "app-ml"
ron-path = "scenes/frozen-lake-train.ron"
path = "scenes/frozen-lake-train.json"
include = [
"beetmash/ui-terminal",
"beetmash/lighting-3d",
Expand All @@ -361,7 +361,7 @@ name = "frozen-lake-run"
description = "Use a trained Q-learning agent to navigate the frozen lake environment."
thumb-url = "https://storage.googleapis.com/beet-examples/screenshots/frozen-lake-run.png"
app = "app-ml"
ron-path = "scenes/frozen-lake-run.ron"
path = "scenes/frozen-lake-run.json"
include = [
"beetmash/ui-terminal",
"beetmash/lighting-3d",
Expand Down
1 change: 0 additions & 1 deletion examples/export_scenes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ fn plugin(app: &mut App) {

fn main() -> Result<()> {
let config = SceneExportConfig {
format: SceneFormat::Ron,
checks: DynamicSceneChecks {
resource_checks: false,
entity_checks: true,
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
}

async function loadScene(name) {
const response = await fetch(`/target/scenes/${name}.ron`)
const response = await fetch(`/target/scenes/${name}.json`)
const json = await response.text()
let hashmap = await sendMessage(
"beetmash_net::events::spawn_scene_file::SpawnSceneFile",
Expand Down
8 changes: 4 additions & 4 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ app *args:
# blocked on #https://github.com/bevyengine/bevy/issues/14300
hello-world:
cargo run --example app \
./scenes/beet-debug.ron \
../beetmash/scenes/camera-2d.ron \
../beetmash/scenes/ui-terminal-input.ron \
./scenes/hello-world.ron
./scenes/beet-debug.json \
../beetmash/scenes/camera-2d.json \
../beetmash/scenes/ui-terminal-input.json \
./scenes/hello-world.json

doc:
just watch 'cargo doc'
Expand Down
11 changes: 11 additions & 0 deletions scenes/beet-debug.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"resources": {
"beet_flow::lifecycle::beet_debug_plugin::BeetDebugConfig": {
"log_on_start": true,
"log_on_update": false,
"log_on_stop": false,
"log_to_stdout": true
}
},
"entities": {}
}
11 changes: 0 additions & 11 deletions scenes/beet-debug.ron

This file was deleted.

Loading

0 comments on commit 06d79ba

Please sign in to comment.