Capítulo 793 de 988

Chapter 793: makeSpark()

Core Idea

_Part of the @remotion/shapes package.

Key Concepts

  • Example
  • Arguments
  • Return type
  • See also

Code Examples

const { path, width, height, transformOrigin, instructions } = makeSpark({
  width: 240,
  height: 336,
  edgeRoundness: 1,
  cornerRadius: 0,
});

console.log(path); // M 120 0 C 120 92.78383797157332 173.72583002030478 168 240 168 C 173.72583002030478 168 120 243.21616202842668 120 336 C 120 243.21616202842668 66.27416997969523 168 0 168 C 66.27416997969523 168 120 92.78383797157332 120 0 Z
console.log(width); // 240
console.log(height); // 336
console.log(transformOrigin); // '120 168'
console.log(instructions); // '[{type: "M"}, ...]'
  • What it demonstrates: Usage pattern for makeSpark() from the official docs.

Key Takeaways

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

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.