Skip to content

Commit f63068b

Browse files
authored
Merge pull request #3 from motiondeveloper/rounding
Add corner rounding support
2 parents d1191c1 + 3e0cbe6 commit f63068b

File tree

4 files changed

+1325
-493
lines changed

4 files changed

+1325
-493
lines changed

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,15 @@ const eBox = footage('eBox.jsx').sourceData;
4848
const myBox = eBox.createBox({
4949
size: [800, 200],
5050
position: [960, 540],
51+
rounding: [12, 12, 12, 12],
5152
anchor: 'center',
5253
});
5354

5455
// Scale the box in from the left
55-
myBox.setScale([scaleIn, 100], 'topLeft');
56+
myBox.setScale([scaleIn, 100], 'centerLeft');
5657

5758
// Scale the box off from the right
58-
myBox.setScale([scaleOut, 100], 'bottomRight');
59+
myBox.setScale([scaleOut, 100], 'centerRight');
5960

6061
// Return the box path
6162
myBox.getPath();
@@ -107,12 +108,15 @@ myBox.getPath();
107108
- Required: `true`
108109
- **`anchor`:** The anchor point that will be at the given `position`
109110
- Type: `string`
110-
- Options: `topLeft, topRight, bottomLeft, bottomRight, center`
111+
- Options: `topLeft, topCenter, topRight, bottomLeft, bottomCenter, bottomRight, centerLeft, center, centerRight`
111112
- Required: `true`
112113
- **`isClosed`:** Whether the path is closed
113114
- Type: `boolean`
114115
- Required: `false`
115116
- Default: `true`
117+
- **`rounding`:** Radius for each corner
118+
- Type: `array`
119+
- Required : `false`
116120
</details>
117121
<br>
118122

@@ -135,7 +139,7 @@ myBox.getPath();
135139
- Required: `true`
136140
- **`anchor`:** The anchor point that will be at the given `position`
137141
- Type: `string`
138-
- Options: `topLeft, topRight, bottomLeft, bottomRight, center`
142+
- Options: `topLeft, topCenter, topRight, bottomLeft, bottomCenter, bottomRight, centerLeft, center, centerRight`
139143
- Required: `true`
140144
</details>
141145
<br>

0 commit comments

Comments
 (0)