Skip to content

Conversation

aggyomfg
Copy link
Contributor

Hello, thanks for your creation! BMS is very useful engine!

This PR Potentially close #479

New Asset Reference Type: Added ReflectBase::Asset(UntypedHandle, ComponentId)
Asset Creation Functions: Added ReflectReference::new_asset_ref() and ReflectBaseType::new_asset_base()

Added two new world functions:
get_asset(handle_reference, registration) - Retrieves an asset by handle
has_asset(handle_reference) - Checks if an asset exists

Tests, Docs + but didnt get what else needed, please ask.

Copy link

semanticdiff-com bot commented Sep 29, 2025

Copy link
Contributor

github-actions bot commented Oct 1, 2025

🐰 Bencher Report

Branchasset_operations
Testbedlinux-gha
Click to view all benchmark results
BenchmarkLatencyBenchmark Result
nanoseconds (ns)
(Result Δ%)
Upper Boundary
nanoseconds (ns)
(Limit %)
component/access Lua📈 view plot
🚷 view threshold
3,600.30 ns
(-9.83%)Baseline: 3,992.67 ns
4,409.31 ns
(81.65%)
component/access Rhai📈 view plot
🚷 view threshold
5,310.40 ns
(-9.79%)Baseline: 5,886.45 ns
6,478.95 ns
(81.96%)
component/get Lua📈 view plot
🚷 view threshold
2,180.60 ns
(-9.06%)Baseline: 2,397.88 ns
2,659.76 ns
(81.98%)
component/get Rhai📈 view plot
🚷 view threshold
4,067.00 ns
(-7.98%)Baseline: 4,419.49 ns
4,915.00 ns
(82.75%)
conversions/Mut::from📈 view plot
🚷 view threshold
79.10 ns
(-8.54%)Baseline: 86.48 ns
95.04 ns
(83.22%)
conversions/Ref::from📈 view plot
🚷 view threshold
76.11 ns
(-10.32%)Baseline: 84.87 ns
96.92 ns
(78.53%)
conversions/ScriptValue::List📈 view plot
🚷 view threshold
354.65 ns
(+11.74%)Baseline: 317.38 ns
429.95 ns
(82.49%)
conversions/ScriptValue::Map📈 view plot
🚷 view threshold
940.77 ns
(-10.63%)Baseline: 1,052.71 ns
1,203.81 ns
(78.15%)
conversions/ScriptValue::Reference::from_into📈 view plot
🚷 view threshold
24.18 ns
(-5.36%)Baseline: 25.55 ns
31.12 ns
(77.69%)
conversions/Val::from_into📈 view plot
🚷 view threshold
219.51 ns
(-24.55%)Baseline: 290.95 ns
371.42 ns
(59.10%)
function/call 4 args Lua📈 view plot
🚷 view threshold
1,608.00 ns
(-13.40%)Baseline: 1,856.80 ns
2,123.82 ns
(75.71%)
function/call 4 args Rhai📈 view plot
🚷 view threshold
1,374.50 ns
(-8.65%)Baseline: 1,504.66 ns
1,675.74 ns
(82.02%)
function/call Lua📈 view plot
🚷 view threshold
217.46 ns
(-10.50%)Baseline: 242.97 ns
276.58 ns
(78.62%)
function/call Rhai📈 view plot
🚷 view threshold
456.85 ns
(-0.61%)Baseline: 459.65 ns
529.55 ns
(86.27%)
loading/empty Lua📈 view plot
🚷 view threshold
760,050.00 ns
(+250.88%)Baseline: 216,614.30 ns
1,076,858.03 ns
(70.58%)
loading/empty Rhai📈 view plot
🚷 view threshold
842,570.00 ns
(+69.34%)Baseline: 497,555.00 ns
1,111,259.18 ns
(75.82%)
math/vec mat ops Lua📈 view plot
🚷 view threshold
6,664.50 ns
(-15.37%)Baseline: 7,874.89 ns
9,508.61 ns
(70.09%)
math/vec mat ops Rhai📈 view plot
🚷 view threshold
6,027.10 ns
(-9.33%)Baseline: 6,647.02 ns
7,430.56 ns
(81.11%)
query/10 entities Lua📈 view plot
🚷 view threshold
18,885.00 ns
(-7.88%)Baseline: 20,500.50 ns
22,269.36 ns
(84.80%)
query/10 entities Rhai📈 view plot
🚷 view threshold
18,600.00 ns
(-9.87%)Baseline: 20,637.50 ns
22,824.36 ns
(81.49%)
query/100 entities Lua📈 view plot
🚷 view threshold
37,990.00 ns
(-10.62%)Baseline: 42,503.30 ns
47,211.55 ns
(80.47%)
query/100 entities Rhai📈 view plot
🚷 view threshold
30,723.00 ns
(-9.17%)Baseline: 33,826.50 ns
37,548.76 ns
(81.82%)
query/1000 entities Lua📈 view plot
🚷 view threshold
238,960.00 ns
(-13.16%)Baseline: 275,187.00 ns
313,005.31 ns
(76.34%)
query/1000 entities Rhai📈 view plot
🚷 view threshold
187,930.00 ns
(+9.40%)Baseline: 171,784.00 ns
190,665.49 ns
(98.57%)
reflection/10 Lua📈 view plot
🚷 view threshold
5,598.50 ns
(-9.99%)Baseline: 6,220.08 ns
6,930.05 ns
(80.79%)
reflection/10 Rhai📈 view plot
🚷 view threshold
15,127.00 ns
(-4.36%)Baseline: 15,817.20 ns
16,529.57 ns
(91.51%)
reflection/100 Lua📈 view plot
🚷 view threshold
47,672.00 ns
(-8.36%)Baseline: 52,020.10 ns
58,945.24 ns
(80.88%)
reflection/100 Rhai📈 view plot
🚷 view threshold
710,550.00 ns
(-8.04%)Baseline: 772,703.00 ns
868,098.69 ns
(81.85%)
resource/access Lua📈 view plot
🚷 view threshold
3,265.80 ns
(-8.04%)Baseline: 3,551.40 ns
3,865.24 ns
(84.49%)
resource/access Rhai📈 view plot
🚷 view threshold
4,872.60 ns
(-9.00%)Baseline: 5,354.22 ns
5,889.06 ns
(82.74%)
resource/get Lua📈 view plot
🚷 view threshold
1,833.10 ns
(-9.86%)Baseline: 2,033.67 ns
2,260.57 ns
(81.09%)
resource/get Rhai📈 view plot
🚷 view threshold
3,569.10 ns
(-9.36%)Baseline: 3,937.69 ns
4,402.40 ns
(81.07%)
🐰 View full continuous benchmarking report in Bencher

@makspll makspll changed the title feat: Asset operations - working with bevy Assets<T> resource. feat: Asset references, world.get_asset and world.has_asset bindings Oct 4, 2025
@makspll makspll enabled auto-merge (squash) October 4, 2025 11:19
@makspll
Copy link
Owner

makspll commented Oct 4, 2025

Nice work, much appreciated! @aggyomfg

@makspll makspll disabled auto-merge October 5, 2025 08:50
@makspll makspll merged commit 04187b8 into makspll:main Oct 5, 2025
15 of 22 checks passed
@github-actions github-actions bot mentioned this pull request Oct 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Accessing Assets<StandardMaterial> in scripts
2 participants