-
When loading a gltf asset (as a glb) I get the following error when compiling to wasm for the web. Is there way of resampling the image such that it's compatible with more devices? The error doesn't happen with non-WASM binaries. I load the asset as follows fn setup_player(
mut commands: Commands,
asset_server: Res<AssetServer>,
mut _meshes: ResMut<Assets<Mesh>>,
mut _materials: ResMut<Assets<StandardMaterial>>,
) {
let anoncat_handle = asset_server.load("cat4.glb#Scene0");
commands.spawn((
SceneBundle {
scene: anoncat_handle,
transform: Transform::from_xyz(0.0, 0.0, 0.0),
..Default::default()
},
RigidBody::Dynamic,
Collider::capsule(0.5, 0.8),
TnuaControllerBundle::default(),
TnuaAvian3dSensorShape(Collider::cylinder(0.49, 0.0)),
LockedAxes::ROTATION_LOCKED,
));
} Here's the .glb file in question, I promise there are no viruses inside! Error trace is attached.
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Currently bevy does not support texture resampling, but you should be able to use whatever you made glb in to change original texture depth. You can also query |
Beta Was this translation helpful? Give feedback.
Currently bevy does not support texture resampling, but you should be able to use whatever you made glb in to change original texture depth. You can also query
RenderDevice::features()
to choose which depth glb to load. If you are using blender you'll probably have to edit the texture in an image editor (gimp) first and save it at 8bpp, then reimport it in blender, then export new glb.