How to use pose-core - 2 common examples

To help you get started, we’ve selected a few pose-core 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 / animated-pose / src / factory.ts View on Github external
export default ({
  convertUnitToPoints,
  unitConverters
}: AnimatedFactoryConfig): AnimatedPoserFactory => {
  const pose: AnimatedPoserFactory = poseFactory<
    Value,
    Action,
    Action,
    AnimatedPoser,
    TransitionConfig
  >({
    /**
     * Bind onChange callbacks
     */
    bindOnChange: (values, onChange) => key => {
      if (!values.has(key)) return;

      const { raw } = values.get(key);
      if (raw) raw.addListener(onChange[key]);
    },
github Popmotion / popmotion / packages / popmotion-pose / dist / popmotion-pose.es.js View on Github external
var pose = function (_a) {
    var transformPose = _a.transformPose,
        addListenerToValue = _a.addListenerToValue,
        extendAPI = _a.extendAPI,
        readValueFromSource = _a.readValueFromSource;
    return poseFactory({
        bindOnChange: function (values, onChange) {
            return function (key) {
                if (!values.has(key)) return;
                var raw = values.get(key).raw;
                raw.subscribe(onChange[key]);
            };
        },
        readValue: function (_a) {
            var raw = _a.raw;
            return raw.get();
        },
        createValue: function (init, key, _a, _b) {
            var elementStyler = _a.elementStyler;
            var _c = _b === void 0 ? {} : _b,
                passiveParent = _c.passiveParent,
                passiveProps = _c.passiveProps;

pose-core

Factory for Pose animation state machines

MIT
Latest version published 5 years ago

Package Health Score

61 / 100
Full package analysis

Popular pose-core functions