fix(runtime): align roundness validation with studio

This commit is contained in:
smontlouis 2026-08-18 14:11:15 +02:00
parent 1b6a0c964c
commit 97127cf07a
2 changed files with 9 additions and 3 deletions

View File

@ -59,7 +59,7 @@
"hexColor": { "type": "string", "pattern": "^#[0-9a-f]{6}$" }, "hexColor": { "type": "string", "pattern": "^#[0-9a-f]{6}$" },
"boundedNumber": { "type": "number", "minimum": -10000, "maximum": 10000 }, "boundedNumber": { "type": "number", "minimum": -10000, "maximum": 10000 },
"dimension": { "type": "number", "minimum": 0.001, "maximum": 10000 }, "dimension": { "type": "number", "minimum": 0.001, "maximum": 10000 },
"roundness": { "type": "number", "minimum": 0, "maximum": 1 }, "roundness": { "type": "number", "minimum": 0, "maximum": 2 },
"surface": { "surface": {
"type": "object", "type": "object",
"additionalProperties": false, "additionalProperties": false,

View File

@ -186,7 +186,7 @@ describe('avatar definition validation', () => {
], ],
[ [
'roundness maximum', 'roundness maximum',
(value: AvatarDefinition) => (value.body.primary.roundness = 1.1), (value: AvatarDefinition) => (value.body.primary.roundness = 2.1),
'maximum', 'maximum',
], ],
[ [
@ -285,7 +285,13 @@ describe('avatar definition validation', () => {
definition.body.primary.width = 0.001 definition.body.primary.width = 0.001
definition.body.primary.height = 10000 definition.body.primary.height = 10000
definition.body.primary.roundness = 0 definition.body.primary.roundness = 0
definition.body.primary.morphRoundness = 1 definition.body.primary.morphRoundness = 2
definition.body.primary.tipRoundness = 2
definition.body.primary.baseRoundness = 2
definition.body.nodes[0].surface.roundness = 2
definition.body.nodes[0].surface.morphRoundness = 2
definition.body.nodes[0].surface.tipRoundness = 2
definition.body.nodes[0].surface.baseRoundness = 2
definition.body.nodes[0].position = [-10000, 0, 10000] definition.body.nodes[0].position = [-10000, 0, 10000]
definition.body.nodes[0].rotation = [-360, 0, 360] definition.body.nodes[0].rotation = [-360, 0, 360]
definition.expressions.neutral.head = { x: -10000, y: 0, z: 10000 } definition.expressions.neutral.head = { x: -10000, y: 0, z: 10000 }