(ctx: &mut ScriptContext<'_, API>, idx: usize)
| 751 | }; |
| 752 | if count == 0 { |
| 753 | state.log = format!("glb {kind}\nnone"); |
| 754 | return; |
| 755 | } |
| 756 | let current = match kind { |
| 757 | "mesh" => state.active_glb_mesh_index, |
| 758 | "mat" => state.active_glb_mat_index, |
| 759 | "animation" => state.active_glb_anim_index, |
| 760 | _ => 0, |
| 761 | }; |
| 762 | let next = offset_index(current.min(count - 1), count, dir); |
| 763 | match kind { |
| 764 | "mesh" => state.active_glb_mesh_index = next, |
| 765 | "mat" => state.active_glb_mat_index = next, |
| 766 | "animation" => state.active_glb_anim_index = next, |
| 767 | _ => {} |
| 768 | } |
| 769 | state.active_glb_summary = gltf_summary( |
| 770 | &path, |
| 771 | info.mesh_count, |
| 772 | info.material_count, |
| 773 | info.animation_count, |
| 774 | info.skeleton_count, |
| 775 | info.texture_count, |
| 776 | state.active_glb_mesh_index, |
| 777 | state.active_glb_mat_index, |
| 778 | state.active_glb_anim_index, |
no test coverage detected