Capítulo 794 de 988

Chapter 794: makeStar()

Core Idea

_Part of the @remotion/shapes package.

Key Concepts

  • Example
  • Arguments
  • Return type
  • See also

Code Examples

const { path, width, height, transformOrigin, instructions } = makeStar({
  innerRadius: 200,
  outerRadius: 150,
  points: 5,
});

console.log(path); // M 200 0 L 288.167787843871 78.64745084375788 L 390.21130325903073 138.19660112501052 L 342.658477444273 246.3525491562421 L 317.55705045849464 361.8033988749895 L 200 350 L 82.4429495415054 361.8033988749895 L 57.34152255572698 246.35254915624213 L 9.788696740969272 138.19660112501055 L 111.83221215612902 78.6474508437579 L 200 0
console.log(width); // 400
console.log(height); // 400
console.log(transformOrigin); // '200 200'
console.log(instructions); // '[{type: "M"}, ...]'
  • What it demonstrates: Usage pattern for makeStar() from the official docs.

Key Takeaways

  1. Understand example when working with makeStar().
  2. Understand arguments when working with makeStar().
  3. Understand return type when working with makeStar().
  4. Understand see also when working with makeStar().

Connects To

  • Arrow: related page in the Shapes (@remotion/shapes) section.
  • Callout: related page in the Shapes (@remotion/shapes) section.
  • Circle: related page in the Shapes (@remotion/shapes) section.