Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP : Proc tree #430

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 18 additions & 5 deletions guest/rust/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 25 additions & 0 deletions guest/rust/examples/advanced/forest/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[package]
name = "forest"

edition = "2021"
publish = false
rust-version = { workspace = true }
version = { workspace = true }

[dependencies]
ambient_api = { workspace = true }
rand_pcg = "0.3.1"
noise = { version = "0.8.2", features = ["images"] }
palette = "0.7.1"
rand = "0.8.5"
rand_chacha = "0.3.1"
serde = "1.0.163"

[[bin]]
name = "forest_client"
path = "src/client.rs"
required-features = ["client"]

[features]
client = ["ambient_api/client"]
server = ["ambient_api/server"]
40 changes: 40 additions & 0 deletions guest/rust/examples/advanced/forest/ambient.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
[project]
id = "forest"
name = "A forest"
version = "0.0.1"

[components]
rotating_sun = { type = "Bool", name = "Rotating sun", description = "Whether or not rotate the sun automatically" }
tile_seed = { type = "I32", name = "Tile seed", description = "The seed of the tile" }
tile_x = { type = "I32", name = "Tile x", description = "The x index of the tile" }
tile_y = { type = "I32", name = "Tile y", description = "The y index of the tile" }
tile_size = { type = "F32", name = "Tile seed", description = "The size of the tree" }
tree_seed = { type = "I32", name = "Tree seed", description = "The seed of the tree" }
tree_trunk_radius = { type = "F32", name = "Tree trunk radius", description = "The radius of the trunk" }
tree_trunk_height = { type = "F32", name = "Tree trunk height", description = "The height of the trunk" }
tree_trunk_segments = { type = "U32", name = "Tree trunk segments", description = "The number of segments of the trunk" }
tree_branch_length = { type = "F32", name = "Tree branches lenght", description = "The lenght of the branches" }
tree_branch_angle = { type = "F32", name = "Tree branches angle", description = "The angle of the branches" }
tree_branch_segments = { type = "U32", name = "Tree branch segments", description = "The number of segments of the branches" }
tree_foliage_radius = { type = "F32", name = "Tree foliage radius", description = "The radius of the foliage" }
tree_foliage_density = { type = "U32", name = "Tree foliage density", description = "The number of foliage" }
tree_foliage_segments = { type = "U32", name = "Tree foliage segments", description = "The number of segments of the foliage" }


[concepts.tile.components]
tile_seed = 123
tile_size = 1.0
tile_x = 0
tile_y = 0

[concepts.tree.components]
tree_seed = 123
tree_trunk_radius = 3.0
tree_trunk_height = 15.0
tree_trunk_segments = 8
tree_branch_length = 1.0
tree_branch_angle = 1.0
tree_branch_segments = 3
tree_foliage_radius = 2.0
tree_foliage_density = 5
tree_foliage_segments = 5
Loading