Rythm.js 让页面跳舞的 Javascript 库开源项目

我要开发同款
匿名用户2017年03月23日
136阅读

技术信息

开源地址
https://github.com/Okazari/Rythm.js
授权协议
GPL

作品详情

简介

Rythm.js是一款能够让页面“跳舞”的Javascript库,它能够让页面支持脉冲、跳跃、摇动、扭动、淡入淡出、变换颜色等特效,同时还可以播放音频,使页面更有趣。

查看演示

API文档var rythm = ew Rythm();/* The startig scale is the miimum scale your elemets will take (Scale ratio is startigScale + (pulseRatio * curretPulse)); * Value i percetage betwee 0-1 * Default 0.75 */rythm.startigScale = value;/* The pulse ratio is be the maximum additioal scale your elemet will take (Scale ratio is startigScale + (pulseRatio * curretPulse)) * Value i percetage betwee 0-1 * Default 0.30 */rythm.pulseRatio = value;/* The max value history represet the umber of passed value that will be stored to evaluate the curret pulse. * It value, miimum 1 * Default 100 */rythm.maxValueHistory = value;/* Set the music the page will dace to. * @audioUrl : '../example/mysog.mp3' */rythm.setMusic(audioUrl);/* Used to collaborate with other players library * You ca coect Rythm to a audioElemet, ad the cotrol the audio with your other player */rythm.coectExteralAudioElemet(audioElemet)/* Adjust music's gai. * @value : Number */rythm.setGai(value);/* Add your ow rythm-class * @elemetClass: Class that you wat to lik your rythm to. * @daceType : Use ay of the build i effect or give your ow fuctio; * @startValue: The startig frequece of your rythm. * @bValue: The umber of frequeces of your rythm. * 1024 Frequeces, your rythm will react to the average of your selected frequeces. * Exemples : bass 0-10 ; medium 150-40 ; high 500-100 */rythm.addRythm(elemetClass, daceType, startValue, bValue);/* Plug your computer microphoe to rythm.js * This fuctio retur a promise resolved whe the microphoe is up. * Require your website to be ru i HTTPS */rythm.plugMicrophoe().the(fuctio(){...})//Let's dacerythm.start();//Stop the partyrythm.stop();

功能介绍

简介 Rythm.js 是一款能够让页面“跳舞”的 Javascript 库,它能够让页面支持脉冲、跳跃、摇动、扭动、淡入淡出、变换颜色等特效,同时还可以播放音频,使页面更有趣。 查看演示 AP...

示例图片

声明:本文仅代表作者观点,不代表本站立场。如果侵犯到您的合法权益,请联系我们删除侵权资源!如果遇到资源链接失效,请您通过评论或工单的方式通知管理员。未经允许,不得转载,本站所有资源文章禁止商业使用运营!
下载安装【程序员客栈】APP
实时对接需求、及时收发消息、丰富的开放项目需求、随时随地查看项目状态

评论