feat: add RobertEngine — fabric physics module for garment overlay rendering#106
Draft
feat: add RobertEngine — fabric physics module for garment overlay rendering#106
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Agent-Logs-Url: https://github.com/Tryonme-com/tryonyou-app/sessions/568fe885-db4a-47a1-b7d4-e7c8bda927be Co-authored-by: LVT-ENG <214667862+LVT-ENG@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update pilot fabric physics properties
feat: add RobertEngine — fabric physics module for garment overlay rendering
Apr 7, 2026
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.
Implements the TRYONYOU V10 fabric physics engine that computes garment overlay render metrics (width, height, alpha, sheen) from biometrically-detected volumetry — no user-supplied weight or size required.
New:
api/robert_engine.pyPILOT_FABRIC_PHYSICS— 5 Lafayette collection fabrics with physical properties (drape coefficient, GSM, elasticity, friction)calculate_lafayette_factor— silhouette width multiplier derived from drape coefficientcalculate_gravity_stretch— longitudinal elongation from GSM weight, capped at 15% per patent PCT/EP2025/067317calculate_dynamic_alpha— transparency with sinusoidal "breathing" pulse when fit < 95%get_render_metrics— primary API returningwidth,height,alpha,is_shiny,is_scanning,patent_idFixes a falsy-zero bug from the reference spec:
if not timestamp→if timestamp is None, which causedtimestamp=0to be silently discarded.New:
tests/test_robert_engine.py29 unittest cases covering constants, all three physics methods (including GSM floor/ceiling clamping, alpha floor/ceiling), end-to-end
get_render_metrics, and custom fabric injection via the constructor.