How to use @vuesion/utils - 10 common examples

To help you get started, we’ve selected a few @vuesion/utils 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 vuesion / vuesion / src / app / shared / components / VueDonutChart / VueDonutChart.vue View on Github external
getRandomColor /* istanbul ignore next */() {
      const color = this.$style[`color${getIntInRange(1, this.colorCount)}`];

      if (usedColors.indexOf(color) === -1) {
        usedColors.push(color);
        return color;
      } else if (usedColors.length === this.colorCount) {
        return this.$style[`color${getIntInRange(1, this.colorCount)}`];
      } else {
        return this.getRandomColor();
      }
    },
    getOffset(index: number) {
github vuesion / vuesion / src / app / shared / components / VueNavigationProgress / VueNavigationProgress.vue View on Github external
this.interval = setInterval(() => {
        this.show = true;
        if (this.percent <= 50) {
          this.percent += getIntInRange(30, 40);
        } /* istanbul ignore next */ else if (this.percent <= 70) {
          this.percent += getIntInRange(5, 10);
        } /* istanbul ignore next */ else if (this.percent <= 95) {
          this.percent += getIntInRange(1, 2);
        } else {
          this.percent = 99;
        }
      }, 100);
    },
github vuesion / vuesion / src / app / shared / components / VueNavigationProgress / VueNavigationProgress.vue View on Github external
this.interval = setInterval(() => {
        this.show = true;
        if (this.percent <= 50) {
          this.percent += getIntInRange(30, 40);
        } /* istanbul ignore next */ else if (this.percent <= 70) {
          this.percent += getIntInRange(5, 10);
        } /* istanbul ignore next */ else if (this.percent <= 95) {
          this.percent += getIntInRange(1, 2);
        } else {
          this.percent = 99;
        }
      }, 100);
    },
github vuesion / vuesion / src / app / shared / animations / CircleAnimation.ts View on Github external
constructor(
    private context: CanvasRenderingContext2D | any,
    private radius: number,
    private speed: number,
    private width: number,
    private xPos: number,
    private yPos: number,
  ) {
    this.direction = getIntInRange(0, 1) === 1 ? -1 : 1;
  }
github vuesion / vuesion / src / app / shared / animations / CircleAnimation.ts View on Github external
const getCircles = (
  circleCount: number,
  canvas: HTMLCanvasElement | any,
  context: CanvasRenderingContext2D | any,
): Circle[] => {
  const localCircles: any[] = [];

  for (let i = 0; i < circleCount; i++) {
    localCircles.push(
      new Circle(
        context,
        getIntInRange(50, 350),
        getFloatInRange(0.1, 1),
        getFloatInRange(2, 10),
        getIntInRange(0, canvas.width),
        getIntInRange(0, canvas.height),
      ),
    );
  }

  return localCircles;
};
github vuesion / vuesion / src / app / shared / animations / CircleAnimation.ts View on Github external
const getCircles = (
  circleCount: number,
  canvas: HTMLCanvasElement | any,
  context: CanvasRenderingContext2D | any,
): Circle[] => {
  const localCircles: any[] = [];

  for (let i = 0; i < circleCount; i++) {
    localCircles.push(
      new Circle(
        context,
        getIntInRange(50, 350),
        getFloatInRange(0.1, 1),
        getFloatInRange(2, 10),
        getIntInRange(0, canvas.width),
        getIntInRange(0, canvas.height),
      ),
    );
  }

  return localCircles;
};
github vuesion / vuesion / src / app / shared / animations / CircleAnimation.ts View on Github external
const getCircles = (
  circleCount: number,
  canvas: HTMLCanvasElement | any,
  context: CanvasRenderingContext2D | any,
): Circle[] => {
  const localCircles: any[] = [];

  for (let i = 0; i < circleCount; i++) {
    localCircles.push(
      new Circle(
        context,
        getIntInRange(50, 350),
        getFloatInRange(0.1, 1),
        getFloatInRange(2, 10),
        getIntInRange(0, canvas.width),
        getIntInRange(0, canvas.height),
      ),
    );
  }

  return localCircles;
};
github vuesion / vuesion / src / app / shared / animations / CircleAnimation.ts View on Github external
public update(): void {
    this.counter += this.direction * this.speed;

    const opacityDirection: number = getIntInRange(0, 1) === 1 ? -1 : 1;
    this.opacity += opacityDirection * (getIntInRange(0, 999) / 50000);

    this.context.beginPath();

    this.context.arc(
      this.xPos + Math.cos(this.counter / 100) * this.radius,
      this.yPos + Math.sin(this.counter / 100) * this.radius,
      this.width,
      0,
      Math.PI * 2,
      false,
    );

    this.context.closePath();

    this.context.fillStyle = 'rgba(244, 59, 108,' + this.opacity + ')';
github vuesion / vuesion / src / server / routes / DemoRoutes.ts View on Github external
const getErrorWithProbability = (probability: number) => getIntInRange(0, 100) <= probability;
github vuesion / vuesion / src / app / shared / components / VueDropdownMenu / VueDropdownMenu.vue View on Github external
data(): any {
    return {
      show: false,
      id: getIntInRange(213123123, 98982984398),
      index: -1,
    };
  },
  methods: {

@vuesion/utils

utilities for vuesion

MIT
Latest version published 2 years ago

Package Health Score

48 / 100
Full package analysis