0.1.1 • Published 4 years ago

partica v0.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

particalizor-5000

originalparticalized-5000
testImagetestImage

settings used to create the example image above

import React from "react";
import MovingPicture from "particalizor-5000";
import testImage from "./testImage.png";

export const MovingPictureApp: React.FC<IMovingPictureAppProps> = ({}) => {
  return (
    <MovingPicture
      directionChannel={"saturation"}
      particleVelocity={0.5}
      hueChannel={"blue"}
      hueReverse={false}
      particleTraceWidth={2}
      particleLifeTime={7000}
      particleNumber={700}
      imageSource={testImage}
    />
  );
}

api

propertytyperequireddefaultdescription
imageSourcestringyes--source of the image, either imported image (.png, .jpg), either base64 representation
particleNumbernumberno7000number of particles
particleTraceWidthnumberno1width of a particle trace
particleLifeTimenumberno700lifetime of a particle
particleVelocitynumberno0.5velocity of particles
directionChannelstringno"hue"enum of {"red","green","blue","hue","saturation","light"}
hueChannelstringno"blue"enum of {"red","green","blue","hue","saturation","light"}
directionReversebooleannofalsereversed direction
hueReversebooleannofalsereversed hue
randomizeSettingsbooleannofalserandomize properties that are not passed in

example usage

import React from "react";
import MovingPicture from "particalizor-5000";
import testImage from "./testImage.png";

export const MovingPictureApp: React.FC<IMovingPictureAppProps> = ({}) => {
  return (
    <MovingPicture
      imageSource={testImage}
    />
  );
}