effect-motion
API Referenceeffect-motionNamespacesEntityVariables

Path

const Path: TaggedStruct<"Path", {

Variable: Path

const Path: TaggedStruct<"Path", {
  commands: NonEmptyArray<TaggedUnion<{
     L: TaggedStruct<"L", {
        x: Number;
        y: Number;
        z: optionalKey<Number>;
     }>;
     M: TaggedStruct<"M", {
        x: Number;
        y: Number;
        z: optionalKey<Number>;
     }>;
     Z: TaggedStruct<"Z", {
     }>;
  }>>;
  fillColor: withConstructorDefault<typeof Color>;
  opacity: withConstructorDefault<Number>;
  position: withConstructorDefault<TaggedStruct<"Vec3", {
     x: withConstructorDefault<Number>;
     y: withConstructorDefault<Number>;
     z: withConstructorDefault<Number>;
  }>>;
  rotation: withConstructorDefault<TaggedStruct<"Vec3", {
     x: withConstructorDefault<Number>;
     y: withConstructorDefault<Number>;
     z: withConstructorDefault<Number>;
  }>>;
  scale: withConstructorDefault<TaggedStruct<"Vec3", {
     x: withConstructorDefault<Number>;
     y: withConstructorDefault<Number>;
     z: withConstructorDefault<Number>;
  }>>;
  strokeColor: optionalKey<typeof Color>;
  strokeWidth: withConstructorDefault<Number>;
  visible: withConstructorDefault<Boolean>;
}>;

Defined in: packages/motion/src/Entity.ts:162

A polyline/polygon. Command points are relative to position (see point). The first command must be M — an open vocabulary of M/L/Z; curves and arcs arrive later via deterministic flattening.

On this page