feat: apply object placement during recompute
This commit is contained in:
@@ -278,6 +278,7 @@ const validatePropertyValue = (document: DocumentSnapshot, property: ObjectPrope
|
||||
validateVectorValue(`${property.label} position`, placement.position)
|
||||
validateVectorValue(`${property.label} rotation axis`, placement.rotation?.axis)
|
||||
if (!placement.rotation || typeof placement.rotation.angle !== 'number' || !Number.isFinite(placement.rotation.angle)) throw new TypeError(`${property.label} rotation angle must be finite.`)
|
||||
if (placement.rotation.angle < 0 || placement.rotation.angle > 360) throw new RangeError(`${property.label} rotation angle must be between 0 and 360 degrees.`)
|
||||
const axis = placement.rotation.axis
|
||||
if (Math.hypot(axis.x, axis.y, axis.z) === 0) throw new RangeError(`${property.label} rotation axis cannot be zero.`)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user