How to use the @swim/transform.TransformList function in @swim/transform

To help you get started, we’ve selected a few @swim/transform 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 swimos / swim / swim-system-js / swim-ui-js / @swim / interpolate / main / transform / TransformListInterpolator.ts View on Github external
interpolate(u: number): TransformList {
    const transforms = [];
    for (let i = 0; i < this.interpolators.length; i += 1) {
      transforms.push(this.interpolators[i].interpolate(u));
    }
    return new TransformList(transforms);
  }
github swimos / swim / swim-system-js / swim-ui-js / @swim / interpolate / main / transform / TransformListInterpolator.ts View on Github external
constructor(f0: TransformList | string | undefined, f1: TransformList | string | undefined) {
    super();
    if (f0 !== void 0) {
      f0 = TransformList.fromAny(f0);
    }
    if (f1 !== void 0) {
      f1 = TransformList.fromAny(f1);
    }
    if (!f0 && !f1) {
      f1 = f0 = new TransformList([]);
    } else if (!f1) {
      f1 = f0;
    } else if (!f0) {
      f0 = f1;
    }
    this.interpolators = [];
    const n = Math.min(f0!.transforms.length, f1!.transforms.length);
    for (let i = 0; i < n; i += 1) {
      this.interpolators.push(Interpolator.transform(f0!.transforms[i], f1!.transforms[i]));
    }
  }

@swim/transform

CSS and SVG compatible transform types with unit-aware algebraic operators and parsers

Apache-2.0
Latest version published 4 years ago

Package Health Score

61 / 100
Full package analysis

Similar packages