Conversation
Add full Codable model support for the VRMC_vrm glTF extension and wire it into GLTFExtensions as "VRMC_vrm". Implement types and enums for VRMCVrm, VRMCVrmMeta, humanoid/bones, firstPerson, lookAt, expressions, morph/material/texture binds, and texture transform defaults. Provide custom decoding fallbacks for meta and expression/default values. Add comprehensive unit tests (VRMCVrmDecodingTests) to verify minimal, optional, and default decoding behavior.
- Add VRM 0.x extension types and decoding to SwiftGLTFCore (VRM0Vrm, VRM0Humanoid, VRM0HumanBone, VRMHumanoidBoneName, node mapping helpers). - Extend GLTF parser to expose VRM humanoid data via MDLObject (GLTFVRM) and new GLTFAssetPath entries. - Propagate humanoid node map into mesh pipeline (PBRMeshBundle, PBRMeshLoader) and map to NodeHierarchyOffset. - Introduce runtime VRM humanoid rotation support: expose vrmHumanoidRotations across GLTFSwiftUIView / GLTFView / RenderingContext and apply rotations in renderer (encodeNodeTransforms) before animation updates. - Add VRMHumanoidDebugHUDView (iOS/macOS) to inspect/edit bone rotations and hook up UI to update rotations; integrate into GLTFView HUD. - Add unit tests for VRM0 decoding. - Minor UI tweak: replace reset button bezelStyle with bezelColor for consistent appearance.
…D3<Float>) - Change VRM humanoid rotation types from simd_quatf to SIMD3<Float> across SwiftGLTF views, GLTFView, VRMHumanoidDebugHUDView, RenderingContext, and PBRRenderer. - Remove quaternion/euler utilities from the debug HUD and add quaternion(fromEulerDegrees:) helper in renderer helper. - Convert Euler-degree vectors to quaternions when applying rotations in PBRRenderer. - Update debug HUD callbacks and reset logic to emit/use SIMD3<Float> (.zero) instead of simd_quatf.
…l, and scrollable debug HUD - Add DebugHUDScrollAdjustingTextField (macOS) to support mouse-wheel value adjustments with configurable scrollStep and fractionDigits; use it in CameraDebugHUDView and VRMHumanoidDebugHUDView. - Wrap debug HUD in scroll views on iOS (UIScrollView) and macOS (NSScrollView) and update layout constraints to use content/frame layout guides. - Add collapsible VRM Humanoid section with a header toggle and separate body stack on both iOS and macOS. - Update field creation and widths to match new HUD layout.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c0cf732963
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Map left/right thumb proximal/intermediate/distal to corresponding VRM names (leftThumbProximal → leftThumbMetacarpal, leftThumbIntermediate → leftThumbProximal, leftThumbDistal → leftThumbDistal; same for right). Update unit tests to assert the new mappings and verify humanoid node map.
…ion transforms so animations can override them
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Preview