2.1.0 • Published 2 years ago

lucas-silbernagel-smoke-effect-react v2.1.0

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

Cloned from https://github.com/hsyuting/smoke-effect-react

What's this

A smoke effect React component. A step in learning three.js with React. Ported from original creator Teo Litto's experiment on CodePen https://codepen.io/teolitto/pen/KwOVvL. Demo of the use of this component is at https://github.com/hsyuting/smoke-effect-react-demo.

Installation

npm i lucas-silbernagel-smoke-effect-react

How to use

Import the package in your React project.

import SmokeElement from "lucas-silbernagel-smoke-effect-react";

Put the component in render and give these properties a value. Important: These properties all require a value for it to work. You can also specify a value width and height properties but must in px atm for it to work.

 <SmokeElement
          src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/95637/quickText.png"
          opacity="1"
          smokeSrc="https://s3-us-west-2.amazonaws.com/s.cdpn.io/95637/Smoke-Element.png"
          smokeOpacity="0.3"
        />

Smoke image used: smoke image

Example

A different smoke image used with different opacity settings could give different results. smoke image

<SmokeElement src="./images/quickText.png"
          opacity="2"
          smokeSrc="./images/smoke_PNG55217.png"
          smokeOpacity="0.2"
          />

Result: smoke over image

2.1.0

2 years ago

2.0.0

2 years ago

1.0.4

2 years ago