Skip to content

fix: update ADR-316 spring bones implementation#319

Merged
RocioCM merged 3 commits into
mainfrom
feat/spring-bones-metadata
May 6, 2026
Merged

fix: update ADR-316 spring bones implementation#319
RocioCM merged 3 commits into
mainfrom
feat/spring-bones-metadata

Conversation

@RocioCM

@RocioCM RocioCM commented Apr 30, 2026

Copy link
Copy Markdown
Member

Summary

This pull request updates ADR-316 to change where and how spring bone physics parameters are stored for Decentraland wearables. Instead of embedding parameters in the .glb model file via a glTF vendor extension, all spring bone configuration now lives in the wearable item's metadata (wearable.data.springBones), keyed by the GLB content hash. The .glb file only encodes bone names and hierarchy. This approach reduces asset churn, simplifies parameter editing, and streamlines validation. The document is thoroughly revised to reflect this new standard, including vocabulary, examples, schema, and validation rules.

Key changes:

Spring bone parameter storage and identification:

  • Spring bone physics parameters are now stored in the wearable's metadata at wearable.data.springBones, keyed by GLB content hash, rather than as a glTF vendor extension inside the .glb file. The .glb only contains bone names and hierarchy.
  • A spring root bone is identified by a node name containing springbone (case-insensitive) and an isRoot: true entry for that node in the metadata, not by a glTF extension. [1] [2]

Specification and schema updates:

  • The document now describes the chosen approach (metadata storage), details the JSON schema for springBones, and explains the rationale for not using in-GLB storage methods.
  • The metadata schema is defined, including parameter ranges, defaults, and validation requirements. Parameters include stiffness, gravityPower, gravityDir, drag, isRoot, and center.

Explorer and Builder behavior:

  • The Explorer must read spring bone parameters from metadata, not the .glb, and reconstruct chains by matching bone names and hierarchy.
  • The Builder must detect spring bone candidates by name, expose parameters for editing, and write changes to metadata. It must also clean up stale entries and handle shared GLBs for male/female representations.

Validation:

  • Deploy-time validation rules are added: parameters must conform to the schema, all hashes must match current representations, and all bone names must include springbone.

@RocioCM RocioCM self-assigned this Apr 30, 2026
@RocioCM
RocioCM requested a review from a team as a code owner April 30, 2026 18:51
@RocioCM
RocioCM requested a review from aixaCode April 30, 2026 18:51
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented May 6, 2026

Copy link
Copy Markdown

Deploying adr with  Cloudflare Pages  Cloudflare Pages

Latest commit: dc236aa
Status: ✅  Deploy successful!
Preview URL: https://50744705.adr-cvq.pages.dev
Branch Preview URL: https://feat-spring-bones-metadata.adr-cvq.pages.dev

View logs

@decentraland-bot

Copy link
Copy Markdown
Contributor

Added missing max spring bones validation rule (12 per GLB representation) to the Deploy-time Validation section.

@pentreathm pentreathm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@RocioCM RocioCM changed the title feat: spring bones metadata fix: update ADR-316 spring bones implementation May 6, 2026
@RocioCM
RocioCM merged commit 54e66fb into main May 6, 2026
2 checks passed
@RocioCM
RocioCM deleted the feat/spring-bones-metadata branch May 6, 2026 18:49
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.

3 participants