1.2.1 • Published 4 years ago

particalizor-3000 v1.2.1

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

particalizor-3000

react library capable of particalizing images; particalize your image right away!

build status coverage status codacy quality status npm version license npm downloads

installation

yarn add particalizor-3000

live demo

components

moving picture

originalparticalized-3000
testImageparticalizedImage
import React from "react";
import { MovingPicture } from "particalizor-3000";
import testImage from "./testImage.png";

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

api

propertytyperequireddefaultacceptable valuesdescription
imageSourcestringyes--valid image sourcesource of the image,either imported image (.png, .jpg),either base64 representation (i.e. "data:image/jpeg;base64,/9j/4A..")
particleNumbernumberno7000> 0number of particles
particleTraceWidthnumberno1> 0width of a particle trace, essentially canvas lineWidth
particleLifeTimenumberno700> 0lifetime of a particle
particleVelocitynumberno1> 0velocity of particles
directionChannelstringno"hue""red","green","blue","hue","saturation","light"enum of {"red","green","blue","hue","saturation","light"}
hueChannelstringno"blue""red","green","blue","hue","saturation","light"enum of {"red","green","blue","hue","saturation","light"}
reverseDirectionbooleannofalsetrue,falsereverse direction
reverseHuebooleannofalsetrue,falsereverse hue
randomizeSettings*booleannofalsetrue,falserandomize properties that are not passed in

* not available yet

property value falls back to default if provided proprety value is not acceptable

example usage

import React from "react";
import { MovingPicture } from "particalizor-3000";
import testImage from "./testImage.png";

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

or

import React from "react";
import "./App.css";
import { MovingPicture } from "particalizor-3000";
import testImage from "./testImage.png";

function App() {
  return <MovingPicture imageSource={testImage} />;
}

export default App; 

particle vortex

particalized-3000
particalizedImage
particalizedImage

description

creates randomized particalized image with vortexes

settings used to create first example image above

import React from "react";
import { ParticleVortex } from "particalizor-3000";

export const ParticleVortexApp: React.FC<IParticleVortexAppProps> = ({}) => {
  return (
    <ParticleVortex
      imageWidth={840}
      imageHeight={384}
      vortexNumber={3}
      particleTraceWidth={600}
      particleNumber={30}
      particleLifeTime={1100}
    />
  );
}

settings used to create second example image above

import React from "react";
import { ParticleVortex } from "particalizor-3000";

export const ParticleVortexApp: React.FC<IParticleVortexAppProps> = ({}) => {
  return (
    <ParticleVortex
      imageWidth={840}
      imageHeight={384}
      vortexNumber={7}
      particleTraceWidth={2}
      particleNumber={2400}
      particleLifeTime={100}
    />
  );
}

api

propertytyperequireddefaultacceptable valuesdescription
vortexNumbernumberno7> 0number of vortexes
imageWidthnumberno400> 0width of the resulting image
imageHeightnumberno400> 0height of the resulting image
particleNumbernumberno7000> 0number of particles
particleTraceWidthnumberno1> 0width of a particle trace, essentially canvas lineWidth
particleLifeTimenumberno700> 0lifetime of a particle
backgroundColorstringno"#777"valid color stringbackground color, ie "red", "#333", "#333333"
randomizeSettings*booleannofalsetrue,falserandomize properties that are not passed in

* not available yet

property value falls back to default if provided proprety value is not acceptable

example usage

import React from "react";
import { ParticleVortex } from "particalizor-3000";

export const ParticleVortexApp: React.FC<IParticleVortexAppProps> = ({}) => {
  return (
    <ParticleVortex
      imageWidth={840}
      imageHeight={384}
      vortexNumber={7}
    />
  );
}

or

import React from "react";
import "./App.css";
import { ParticleVortex } from "particalizor-3000";
import testImage from "./testImage.png";

function App() {
  return <ParticleVortex imageWidth={840} imageHeight={384}/>;
}

export default App; 

license

MIT License

1.2.1

4 years ago

1.2.0

4 years ago

1.1.7

4 years ago

1.1.6

4 years ago

1.1.5

4 years ago

1.1.4

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.1

4 years ago

0.5.10

4 years ago

0.5.9

4 years ago

0.5.8

4 years ago

0.5.7

4 years ago

0.5.6

4 years ago

0.5.4

4 years ago

0.5.5

4 years ago

0.5.3

4 years ago

0.5.2

4 years ago

1.0.0

4 years ago

0.5.0

4 years ago

0.4.5

4 years ago

0.4.4

4 years ago

0.4.3

4 years ago

0.4.2

4 years ago

0.4.1

4 years ago

0.3.0

4 years ago

0.2.7

4 years ago

0.3.2

4 years ago

0.3.1

4 years ago

0.3.4

4 years ago

0.3.3

4 years ago

0.2.6

4 years ago

0.2.5

4 years ago

0.2.4

4 years ago

0.2.3

4 years ago

0.2.2

4 years ago

0.2.1

4 years ago

0.2.0

4 years ago

0.1.9

4 years ago

0.1.8

4 years ago

0.1.7

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.0

4 years ago

0.1.1

4 years ago

0.0.1-security

4 years ago