Skip to content

Commit 9bdfd84

Browse files
authored
chore: Update 0.11.0.md
1 parent 99e8682 commit 9bdfd84

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

release-notes/0.11.0.md

+46
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,52 @@
44

55
## Summary
66

7+
### :sparkles: Dynamic Components
8+
To compliment dynamic systems introduced in the previous updates, scripts can now register their own, fully legit bevy components!
9+
10+
```lua
11+
local NewComponent = world.register_new_component("ScriptComponentA")
12+
13+
local new_entity = world.spawn()
14+
world.insert_component(new_entity, NewComponent, construct(types.DynamicComponent, {
15+
data = "Hello World"
16+
}))
17+
18+
local component_instance = world.get_component(new_entity, NewComponent)
19+
assert(component_instance.data == "Hello World", "unexpected value: " .. component_instance.data)
20+
21+
component_instance.data = {
22+
foo = "bar"
23+
}
24+
25+
assert(component_instance.data.foo == "bar", "unexpected value: " .. component_instance.data.foo)
26+
```
27+
28+
These are backed by the `DynamicComponent` type which looks like this:
29+
```rust
30+
pub struct DynamicComponent {
31+
data: ScriptValue,
32+
}
33+
```
34+
scripts can freely set this data payload to anything that is supported by `ScriptValue`'s !.
35+
36+
These can also be queried as normal!
37+
38+
### Mdbook Preprocessor Prettified
39+
The documentation you can generate via exported `ladfile`s now looks much better, types have nested links to other types, and things generally look better!
40+
![424231364-a4bfa889-771d-4faf-825d-29143851aeb6](https://github.com/user-attachments/assets/f963bcae-7f4b-4088-b38e-6095b7fde3a9)
41+
42+
43+
### Continous Benchmarking
44+
BMS now runs and publishes the results of a variety of benchmarks over at [bencher](https://bencher.dev/console/projects/bms/plots)
45+
46+
### Performance & Profiling Improvements
47+
You can now easilly profile BMS using the new `profile_with_tracy` feature which will also enable bevy's equivalent. Tracing spans have generally been improved, giving you lots of great detail into where most time is spent!
48+
49+
The `get` and `set` indexer functions have been extracted into a `MagicFunctions` sub-registry to improve the performance of reflection.
50+
51+
Various internal hashmaps have been tuned to get free performance wins.
52+
753
## Changelog
854
See a detailed changelog [here](https://github.com/makspll/bevy_mod_scripting/blob/main/CHANGELOG.md)
955

0 commit comments

Comments
 (0)