Comments (5)
We also considered that array_as_u8_slice
and value_as_u8_slice
unsound with usages of casting. The trait of Sized
doesn't pose the limitation on composite types.
from fyrox.
IMO something like NoUninit
should be added in the trait bounds.
from fyrox.
Noticed this was tagged as a good first issue, I have made some changes to the function referenced by @shinmao. Instead of adding a dependency on bytemuck, I think I was able to handle the padding issue without the use of any unsafe blocks. Ran into a lot of issues trying to handle any possible value, but noticed it is only referenced three times. Out of each case the vec is either a usize or an f32. If other types need to be supported I can add support.
I have run a modified version of the FPS tutorial as well as the RPG tutorial and all the logs appear the same as running off the latest release. All tests are passing, and I added two tests to cover the transmute_vec_as_bytes.
If I am barking up the wrong tree with this approach let me know and I can follow the suggestion by @orzogc.
I have this playground showing the current function as is and its output as well as the updated function.
I linked my PR to my forked repo and it is in the history above, should I open a PR to the main fork to receive feedback? I haven't made any documentation updates as I wanted to check with everyone if this is a valid solution. Once everything looks good to people more familiar with the project I will add a documentation update to the PR.
functions downstream of transmute_vec_as_bytes:
from fyrox.
@shinmao the issue should be fixed by the recent commits, could you please re-check this?
from fyrox.
Yes. It could fix the issue.
from fyrox.
Related Issues (20)
- More hotkeys
- Editor crash when saving terrain HOT 1
- Mixamo mesh import issue HOT 2
- Fyrox-Sound glitchy sounds on Android HOT 2
- Bug found - Clicking in asset browser deleted some files and duplicated the data folder 180+ times until I Ctrl+C the editor process. HOT 2
- thread 'main' panicked HOT 25
- No Texture field in the Inspector HOT 7
- CI uses `actions/checkout@v3`, which uses a `deprecated` version of `Node.js` HOT 1
- `CI / Clippy CI (push) Failing after 1m` on main branch HOT 2
- Editor immediately exits with the exit code 101 and a warning HOT 10
- could this support 3d format like pmx and vmd motion format? HOT 1
- Add gizmos for shape editing for collider shapes HOT 1
- Is it not possible to add seamless script adding like in Unity and Unreal? Is it a Rust limitation?
- Sphere look like cube in play mode
- CI uses `actions/setup-java@v3`, which uses a `deprecated` version of `Node.js` HOT 2
- Replace With node type inspector does not update to match type
- Create a resource folder seperately from the editor and engine folder
- Upgrading the version to nightly causes infinite reloading HOT 2
- Using sccache to avoid compiling each time HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fyrox.