Skip to content

🎥 Make videos programmatically with React

simplify instructions

Jonny Burgerbbb5b6ceeb17
diff --git a/packages/docs/components/demos/Circle.tsx b/packages/docs/components/demos/Circle.tsx
index 51793c0658..548d976a64 100644
--- a/packages/docs/components/demos/Circle.tsx
+++ b/packages/docs/components/demos/Circle.tsx
@@ -14,7 +14,8 @@ export const CircleDemo: React.FC<{
}}
>
<Circle
- fill={darkMode ? "white" : "var(--ifm-link-color)"}
+ strokeWidth={5}
+ stroke={darkMode ? "white" : "var(--ifm-link-color)"}
radius={radius}
/>
</AbsoluteFill>
diff --git a/packages/shapes/src/utils/instructions.ts b/packages/shapes/src/utils/instructions.ts
index f12863d602..8340f85249 100644
--- a/packages/shapes/src/utils/instructions.ts
+++ b/packages/shapes/src/utils/instructions.ts
@@ -18,11 +18,6 @@ export type Instruction =
x: number;
y: number;
}
- | {
- type: 'm';
- x: number;
- y: number;
- }
| {
type: 'a';
rx: number;
@@ -54,10 +49,6 @@ export const serializeInstruction = (instruction: Instruction) => {
return `C ${instruction.cp1x} ${instruction.cp1y} ${instruction.cp2x} ${instruction.cp2y} ${instruction.x} ${instruction.y}`;
}
- if (instruction.type === 'm') {
- return `m ${instruction.x} ${instruction.y}`;
- }
-
if (instruction.type === 'a') {
return `a ${instruction.rx} ${instruction.ry} ${
instruction.xAxisRotation
diff --git a/packages/shapes/src/utils/make-circle.ts b/packages/shapes/src/utils/make-circle.ts
index a2293d7407..f546233725 100644
--- a/packages/shapes/src/utils/make-circle.ts
+++ b/packages/shapes/src/utils/make-circle.ts
@@ -10,14 +10,9 @@ export const makeCircle = ({radius}: MakeCircleProps): ShapeInfo => {
const instructions: Instruction[] = [
{
type: 'M',
- x: radius,
+ x: 0,
y: radius,
},
- {
- type: 'm',
- x: -radius,
- y: 0,
- },
{
type: 'a',
rx: radius,