How to use the style-value-types.number.test function in style-value-types

To help you get started, we’ve selected a few style-value-types examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Popmotion / popmotion / packages / popmotion / src / animations / physics / index.ts View on Github external
setSpringTarget(v) {
          to = v;
          return this;
        },
        setVelocity(v) {
          velocity = v;
          return this;
        },
        stop: () => cancelSync.update(process)
      };
    }
  );

const vectorPhysics: ActionFactory = vectorAction(physics, {
  acceleration: number.test,
  friction: number.test,
  velocity: number.test,
  from: number.test,
  to: number.test,
  springStrength: number.test
});

export default vectorPhysics;
github Popmotion / popmotion / packages / popmotion / src / animations / spring / index.ts View on Github external
} else {
          update(position);
        }
      }, true);

      return {
        stop: () => cancelSync.update(process)
      };
    }
  );

const vectorSpring: ActionFactory = vectorAction(spring, {
  from: number.test,
  to: number.test,
  stiffness: number.test,
  damping: number.test,
  mass: number.test,
  velocity: number.test
});

export default vectorSpring;
github Popmotion / popmotion / packages / popmotion / src / animations / spring / index.ts View on Github external
}
      }, true);

      return {
        stop: () => cancelSync.update(process)
      };
    }
  );

const vectorSpring: ActionFactory = vectorAction(spring, {
  from: number.test,
  to: number.test,
  stiffness: number.test,
  damping: number.test,
  mass: number.test,
  velocity: number.test
});

export default vectorSpring;
github Popmotion / popmotion / packages / popmotion / src / animations / tween / scrubber.ts View on Github external
ease = createReversedEasing(ease);
  }
  return action(
    ({ update }): ScrubberSubscription => ({
      seek: progress => update(progress)
    })
  ).pipe(
    ease,
    (v: number) => mix(from, to, v)
  );
};

const vectorScrubber: ActionFactory = vectorAction(scrubber, {
  ease: (func: any) => typeof func === 'function',
  from: number.test,
  to: number.test
});

export default vectorScrubber;
github Popmotion / popmotion / packages / popmotion / src / animations / spring / index.ts View on Github external
complete();
        } else {
          update(position);
        }
      }, true);

      return {
        stop: () => cancelSync.update(process)
      };
    }
  );

const vectorSpring: ActionFactory = vectorAction(spring, {
  from: number.test,
  to: number.test,
  stiffness: number.test,
  damping: number.test,
  mass: number.test,
  velocity: number.test
});

export default vectorSpring;
github Popmotion / popmotion / packages / popmotion / src / animations / physics / index.ts View on Github external
to = v;
          return this;
        },
        setVelocity(v) {
          velocity = v;
          return this;
        },
        stop: () => cancelSync.update(process)
      };
    }
  );

const vectorPhysics: ActionFactory = vectorAction(physics, {
  acceleration: number.test,
  friction: number.test,
  velocity: number.test,
  from: number.test,
  to: number.test,
  springStrength: number.test
});

export default vectorPhysics;
github Popmotion / popmotion / packages / popmotion / src / animations / spring / index.ts View on Github external
update(position);
          cancelSync.update(process);
          complete();
        } else {
          update(position);
        }
      }, true);

      return {
        stop: () => cancelSync.update(process)
      };
    }
  );

const vectorSpring: ActionFactory = vectorAction(spring, {
  from: number.test,
  to: number.test,
  stiffness: number.test,
  damping: number.test,
  mass: number.test,
  velocity: number.test
});

export default vectorSpring;
github Popmotion / popmotion / packages / popmotion / src / animations / inertia / index.ts View on Github external
}
      });
    } else {
      complete();
    }

    return {
      stop: () => activeAnimation && activeAnimation.stop()
    };
  });

export default vectorAction(inertia, {
  from: number.test,
  velocity: number.test,
  min: number.test,
  max: number.test,
  damping: number.test,
  stiffness: number.test,
  modifyTarget: (func: any) => typeof func === 'function'
}) as ActionFactory;
github Popmotion / popmotion / packages / popmotion / src / animations / decay / index.ts View on Github external
update(current);

      if (!isMoving) {
        cancelSync.update(process);
        complete();
      }
    }, true);

    return {
      stop: () => cancelSync.update(process)
    };
  });

const vectorDecay: ActionFactory = vectorAction(decay, {
  from: number.test,
  modifyTarget: (func: any) => typeof func === 'function',
  velocity: number.test
});

export default vectorDecay;
github Popmotion / popmotion / packages / popmotion / src / animations / spring / index.ts View on Github external
cancelSync.update(process);
          complete();
        } else {
          update(position);
        }
      }, true);

      return {
        stop: () => cancelSync.update(process)
      };
    }
  );

const vectorSpring: ActionFactory = vectorAction(spring, {
  from: number.test,
  to: number.test,
  stiffness: number.test,
  damping: number.test,
  mass: number.test,
  velocity: number.test
});

export default vectorSpring;