GithubHelp home page GithubHelp logo

hhy5277 / aquarelle Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ramotion/aquarelle

0.0 1.0 0.0 10.65 MB

:octocat: ๐ŸŽจ Aquarelle is a watercolor effect component. Javascript library by @Ramotion

Home Page: https://dev.ramotion.com

License: MIT License

JavaScript 97.77% Shell 2.23%

aquarelle's Introduction

Header preview

Aquarelle

Codacy Badge Bower Twitter Travis Donate

About

This project is maintained by Ramotion, Inc.
We specialize in the designing and coding of custom UI for Mobile Apps and Websites.

Looking for developers for your project?
This project is maintained by Ramotion, Inc. We specialize in the designing and coding of custom UI for Mobile Apps and Websites.


Browser support

  • Chrome
  • Safari
  • Opera
  • Firefox
  • IE 11

Installation

bower install aquarelle

Then insert in your html:

<script src="bower_components/three.js/build/three.js"></script>

<script src="bower_components/aquarelle/Aquarelle.js"></script>

<script src="bower_components/three.js/examples/js/postprocessing/EffectComposer.js"></script>

<script src="bower_components/three.js/examples/js/postprocessing/ClearPass.js"></script>
<script src="bower_components/aquarelle/AquarellePass.js"></script>
<script src="bower_components/three.js/examples/js/postprocessing/ShaderPass.js"></script>
<script src="bower_components/three.js/examples/js/shaders/CopyShader.js"></script>

API

Constructor

new Aquarelle(textureImage, maskImage[, options]);

Names Required Type Description
textureImage true string, Image or <img> background image
maskImage true string, Image or <img> background image mask
options false object initial options

Options

Names Defaults Description
fromAmplitude 50 initial noise amplitude value
toAmplitude 0 final noise amplitude value
fromFrequency 8 initial noise frequiency
toFrequency 7 final noise frequiency
fromOffset -30 initial mask size
autoplay false true - start animation before first frame is being rendered
loop false true - repeat animation in loop
duration 8000 animation duration

Events

Names Description
created triggered before first frame is rendered
changed triggered before rendering of a frame
completed triggered before latest frame is rendered
started triggered before animation is started
played triggered after animation is started
paused triggered before pause of animation
stopped triggered before reset of animation

Methods

Names Description
pause() pause animation
play() start animation
stop() stop and reset animation
start() start animation over
reverse() reverse animation
reset() re-render frame
setOptions([object]) set animation options
transitionInRange(startValue, endValue[, startTimeMS[, endTimeMS]]) return value between startValue..endValue in range startTimeMS..endTimeMS
addEventListener(type, listener) add listener (listener) of event (type)
removeEventListener(type, listener) remove (listener) of event (type)

Usage

โ‰ˆ

var aquarelle = new Aquarelle(textureImage, maskImage[, options]);
Listeners
function listener(event) {}

aquarelle.addEventListener('created', listener);

aquarelle.removeEventListener('created', listener);
Demos

Static demo

Dynamic demo

Licence

Aquarelle is released under the MIT license. See LICENSE for details.

Get the Showroom App for iOS to give it a try

Try our UI components in our iOS app. Contact us if interested.



Follow us for the latest updates

aquarelle's People

Contributors

aleksei1000000 avatar alexmik89 avatar juriv avatar ramotiondev avatar ramotionrussell avatar ronnielsen avatar yurypaleev avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.