Skip to content

Visualize Your Ideas With Code

fix(2d): fix tweening cardinal points (#829)

Jacobcc16737cd590
diff --git a/packages/2d/src/components/Layout.ts b/packages/2d/src/components/Layout.ts
index 5f6329eb..82ab542e 100644
--- a/packages/2d/src/components/Layout.ts
+++ b/packages/2d/src/components/Layout.ts
@@ -1022,6 +1022,7 @@ function originSignal(origin: Origin): PropertyDecorator {
signal()(target, key);
cloneable(false)(target, key);
const meta = getPropertyMeta<any>(target, key);
+ meta!.parser = value => new Vector2(value);
meta!.getter = function (this: Layout) {
return this.getOriginDelta(origin).transformAsPoint(this.localToParent());
};