Merge VRM1.0 rendering (#47)#48
Conversation
* Add VRM1.0 rendering * Address VRM1 rendering review feedback * Fix VRM1 first-person and spring bone review issues * Fix SceneKit VRM0 material lighting regression * Add MacExample renderer and expression controls
There was a problem hiding this comment.
Code Review
This pull request adds comprehensive VRM 1.0 support to VRMKit, VRMRealityKit, and VRMSceneKit, including support for VRM 1.0 expressions, first-person annotations, node constraints, spring bones with capsule colliders, and MToon materials. It also updates the Mac example app to support switching between SceneKit and RealityKit renderers. Feedback on the changes focuses on improving robustness and preventing crashes or physics simulation failures. Key recommendations include replacing a force-unwrap of parent.parent with a safe optional binding, handling zero-distance collisions to avoid NaN propagation in spring bone physics, using Float.ulpOfOne as a safe epsilon threshold for vector length checks, and using try? to gracefully skip invalid material indices in custom expressions instead of failing the entire avatar load.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
- Introduced `ExampleExpression` and `MacExampleExpression` enums to manage expressions for VRM 1.0 models. - Updated `VRMEntity` and `VRMNode` classes to support setting and retrieving expressions using the new `setExampleExpression` and `expression` methods. - Refactored UI components in `RealityKitViewController` and `ViewController` to utilize the new expression handling. - Removed legacy `Expression` enum and related code to streamline the expression management. - Updated documentation to reflect changes in expression handling for VRM 1.0. - Added compatibility bridges for legacy blend shape keys to ensure backward compatibility with VRM 0.x models.
…ading in VRMEntity and VRMSceneLoader
…pe enum and simplify expression handling - Removed the FirstPersonAnnotationType enum from VRMEntity.swift and its associated methods. - Simplified the color handling in VRMEntityLoader by removing unnecessary checks for explicit color factors. - Updated VRMNode to ensure expression values are clamped between 0.0 and 1.0. - Enhanced VRM1Tests to allow for missing entries in expressions presets and updated assertions for optional chaining.
Add VRM1.0 rendering
Address VRM1 rendering review feedback
Fix VRM1 first-person and spring bone review issues
Fix SceneKit VRM0 material lighting regression
Add MacExample renderer and expression controls