Skip to content

feat: spring bones validations#3380

Open
RocioCM wants to merge 4 commits intofeat/spring-bonesfrom
feat/spring-bones-validations
Open

feat: spring bones validations#3380
RocioCM wants to merge 4 commits intofeat/spring-bonesfrom
feat/spring-bones-validations

Conversation

@RocioCM
Copy link
Copy Markdown
Member

@RocioCM RocioCM commented Apr 10, 2026

Summary

This pull request introduces several improvements to the Spring Bones editor section, focusing on better UI feedback, stricter parameter validation, and improved maintainability. The main changes include enforcing limits on the number of spring bones, surfacing simulation cost, and centralizing spring bone parameter ranges for consistency across the UI and validation logic.

Spring Bones UI Enhancements

  • Added a BonesCounter component to display the total number of spring bones and their simulation cost, both in the section header and in each spring bone card. This helps users track how many spring bones are configured and how close they are to the allowed maximum. [1] [2] [3] [4]
  • Updated the BoneHierarchyPicker and BoneTreeNode to show the number of bones in each spring bone subtree, and display a bone icon for spring bones. [1] [2] [3] [4] [5] [6]

Validation and Parameter Consistency

  • Enforced a maximum number of spring bones (MAX_SPRING_BONES = 15) and parameter ranges (min/max for stiffness, gravity, drag, etc.) using constants from lib/glbValidation/constants. These are now used both in the UI sliders and in the validation logic, ensuring consistency. [1] [2] [3]
  • Updated the spring bone parameter sliders to use the new centralized min/max constants.

Validation Pipeline Integration

  • Integrated validateSpringBones into the wearable GLTF validation pipeline, so that spring bone limits and parameter ranges are checked during model import. [1] [2]

Testing Improvements

  • Added utility functions and test cases for creating GLTFs with spring bone nodes, supporting more robust validation testing.

Style and Usability Tweaks

  • Improved styles for the spring bones section, including better spacing, color adjustments for disabled nodes, and clearer hierarchy picker sizing. [1] [2]

These changes collectively improve the user experience when configuring spring bones, prevent users from exceeding supported limits, and ensure parameter values are always valid and consistent across the application.

Pending tasks

  • Body shape tabs
  • Fix bone suffix validation

@RocioCM RocioCM self-assigned this Apr 10, 2026
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 10, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
builder Ready Ready Preview, Comment Apr 10, 2026 1:27pm

Request Review

@coveralls
Copy link
Copy Markdown

coveralls commented Apr 10, 2026

Coverage Report for CI Build 24245187347

Coverage increased (+0.2%) to 50.654%

Details

  • Coverage increased (+0.2%) from the base build.
  • Patch coverage: 52 of 52 lines across 4 files are fully covered (100%).
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 12363
Covered Lines: 6888
Line Coverage: 55.71%
Relevant Branches: 5369
Covered Branches: 2094
Branch Coverage: 39.0%
Branches in Coverage %: Yes
Coverage Strength: 31.8 hits per line

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants