diff --git a/extensions/animations/src/index.ts b/extensions/animations/src/index.ts
index 00103fc..98b7df0 100644
--- a/extensions/animations/src/index.ts
+++ b/extensions/animations/src/index.ts
@@ -17,7 +17,7 @@ export const setups = [
];
declare module "@vue-motion/lib" {
- export interface PositionalMixin {
+ export interface PositionalIns {
focusOn: (params?: any) => void;
}
}
diff --git a/extensions/math/src/math-function.vue b/extensions/math/src/math-function.vue
index 1a72ba7..d616051 100644
--- a/extensions/math/src/math-function.vue
+++ b/extensions/math/src/math-function.vue
@@ -41,7 +41,6 @@ function generateSvgPath(
// Convert the values of a mathematical function to SVG coordinates
const svgX = (x - xMin) * scaleX;
const svgY = (yMax - y) * scaleY; // Invert the y-axis to conform to the SVG coordinate system
-
path.push(
`${x === xMin || svgY > 1500 || svgY < -1500 ? "M" : "L"} ${svgX} ${svgY}`,
);
diff --git a/extensions/math/src/number-plane.vue b/extensions/math/src/number-plane.vue
index 949efaf..605ae26 100644
--- a/extensions/math/src/number-plane.vue
+++ b/extensions/math/src/number-plane.vue
@@ -71,35 +71,36 @@ const domain = [options.domainX.sort(), options.domainY.sort()];
diff --git a/extensions/three/src/widget3d.ts b/extensions/three/src/widget3d.ts
index 3c01b5a..5e44f4b 100644
--- a/extensions/three/src/widget3d.ts
+++ b/extensions/three/src/widget3d.ts
@@ -4,11 +4,10 @@ export interface Widget3DOptions extends WidgetOptions {
x?: number;
y?: number;
z?: number;
- rx?: number;
- ry?: number;
- rz?: number;
+ rotationX?: number;
+ rotationY?: number;
+ rotationZ?: number;
scaleX?: number;
scaleY?: number;
scaleZ?: number;
- opacity?: number;
}
diff --git a/packages/lib/src/animations/color.ts b/packages/lib/src/animations/color.ts
index cc0fc3a..95417f7 100644
--- a/packages/lib/src/animations/color.ts
+++ b/packages/lib/src/animations/color.ts
@@ -7,7 +7,7 @@ export interface Colorable {
color?: string;
}
-export interface ColorableMixin {
+export interface ColorableIns {
discolorate: (offset: string) => void;
discolorateTo: (to: string) => void;
discolorateBorder: (offset: string) => void;
diff --git a/packages/lib/src/animations/fade.ts b/packages/lib/src/animations/fade.ts
index 5fc3729..f314b46 100644
--- a/packages/lib/src/animations/fade.ts
+++ b/packages/lib/src/animations/fade.ts
@@ -5,7 +5,7 @@ import { interpolator } from "../interpolator";
export interface HasOpacity {
opacity?: number;
}
-export interface HasOpacityMixin extends HasOpacity {
+export interface HasOpacityIns extends HasOpacity {
fadeTo: (to: number, params?: AnimationParams) => void;
fadeIn: (params?: AnimationParams) => void;
fadeOut: (params?: AnimationParams) => void;
diff --git a/packages/lib/src/animations/grow.ts b/packages/lib/src/animations/grow.ts
index 58468ac..766b281 100644
--- a/packages/lib/src/animations/grow.ts
+++ b/packages/lib/src/animations/grow.ts
@@ -4,7 +4,7 @@ export interface Growable {
progress?: number;
}
-export interface GrowableMixin extends Growable {
+export interface GrowableIns extends Growable {
grow: () => void;
}
diff --git a/packages/lib/src/animations/move.ts b/packages/lib/src/animations/move.ts
index 8d61ddb..3b2b057 100644
--- a/packages/lib/src/animations/move.ts
+++ b/packages/lib/src/animations/move.ts
@@ -7,7 +7,7 @@ export interface Positional {
y?: number;
}
-export interface PositionalMixin extends Positional {
+export interface PositionalIns extends Positional {
move: (offsetX: number, offsetY: number, options?: AnimationParams) => void;
moveTo: (toX: number, toY: number, options?: AnimationParams) => void;
moveOnPath: (path: string, options?: AnimationParams) => void;
diff --git a/packages/lib/src/animations/path.ts b/packages/lib/src/animations/path.ts
index 3a7bf4d..543ae6b 100644
--- a/packages/lib/src/animations/path.ts
+++ b/packages/lib/src/animations/path.ts
@@ -24,11 +24,16 @@ export const moveOnFunction = defineAnimation<
x: number;
y: number;
};
+ divisionX?: number;
+ divisionY?: number;
}
>((target, context) => {
+ const divisionX = context.divisionX ?? 1;
+ const divisionY = context.divisionY ?? 1;
+
return (progress) => {
const point = context.path(progress);
- target.x = point.x;
- target.y = point.y;
+ target.x = point.x * divisionX;
+ target.y = point.y * divisionY;
};
});
diff --git a/packages/lib/src/animations/rotate.ts b/packages/lib/src/animations/rotate.ts
index 50648b5..f6380e0 100644
--- a/packages/lib/src/animations/rotate.ts
+++ b/packages/lib/src/animations/rotate.ts
@@ -6,7 +6,7 @@ export interface Rotatable {
rotation?: number;
}
-export interface RotatableMixin extends Rotatable {
+export interface RotatableIns extends Rotatable {
rotate: (offset: number, options?: AnimationParams) => void;
rotateTo: (to: number, options?: AnimationParams) => void;
}
diff --git a/packages/lib/src/animations/scale.ts b/packages/lib/src/animations/scale.ts
index 3247e93..8880b6f 100644
--- a/packages/lib/src/animations/scale.ts
+++ b/packages/lib/src/animations/scale.ts
@@ -7,7 +7,7 @@ export interface Scalable {
scaleY?: number;
}
-export interface ScalableMixin extends Scalable {
+export interface ScalableIns extends Scalable {
scale: (offsetX: number, offsetY: number, options?: AnimationParams) => void;
scaleTo: (toX: number, toY: number, options?: AnimationParams) => void;
}
diff --git a/packages/lib/src/animations/trace.ts b/packages/lib/src/animations/trace.ts
index 49aea40..edb1074 100644
--- a/packages/lib/src/animations/trace.ts
+++ b/packages/lib/src/animations/trace.ts
@@ -6,7 +6,7 @@ import type { HasOpacity } from "./fade";
export interface Strokable {
borderInterval: number[];
}
-export interface StrokableMixin extends Strokable {
+export interface StrokableIns extends Strokable {
trace: (origin: number, options?: AnimationParams) => void;
traceFill: (origin: number, options?: AnimationParams) => void;
}
diff --git a/packages/lib/src/animations/zoom.ts b/packages/lib/src/animations/zoom.ts
index 3e56f3d..aa4b336 100644
--- a/packages/lib/src/animations/zoom.ts
+++ b/packages/lib/src/animations/zoom.ts
@@ -6,7 +6,7 @@ export interface HasScale {
scaleX?: number;
scaleY?: number;
}
-export interface HasScaleMixin extends HasScale {
+export interface HasScaleIns extends HasScale {
zoomTo: (toX: number, toY: number, options?: AnimationParams) => void;
zoomIn: (options?: AnimationParams) => void;
zoomOut: (options?: AnimationParams) => void;
diff --git a/packages/lib/src/widgets/arc.vue b/packages/lib/src/widgets/arc.vue
index f6340e2..c741cb8 100644
--- a/packages/lib/src/widgets/arc.vue
+++ b/packages/lib/src/widgets/arc.vue
@@ -1,7 +1,7 @@
+
+
+
+
+
+
+
+
+
diff --git a/packages/lib/src/widgets/circle.vue b/packages/lib/src/widgets/circle.vue
index 2448589..11d73bb 100644
--- a/packages/lib/src/widgets/circle.vue
+++ b/packages/lib/src/widgets/circle.vue
@@ -1,7 +1,7 @@
@@ -51,5 +56,7 @@ onMounted(() => {
+
+
diff --git a/test/src/Other.vue b/test/src/Other.vue
index c044281..914c444 100644
--- a/test/src/Other.vue
+++ b/test/src/Other.vue
@@ -1,9 +1,9 @@