Rythm.js

让页面跳舞的 Javascript 库
授权协议 GPL
开发语言 JavaScript HTML/CSS
所属分类 Web应用开发、 常用JavaScript包
软件类型 开源软件
地区 不详
投 递 者 壤驷兴朝
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

简介

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

查看演示


API 文档

var rythm = new Rythm();

/* The starting scale is the minimum scale your elements will take (Scale ratio is startingScale + (pulseRatio * currentPulse));
 * Value in percentage between 0-1
 * Default 0.75
 */
rythm.startingScale = value;

/* The pulse ratio is be the maximum additionnal scale your element will take (Scale ratio is startingScale + (pulseRatio * currentPulse))
 * Value in percentage between 0-1
 * Default 0.30
 */
rythm.pulseRatio = value;

/* The max value history represent the number of passed value that will be stored to evaluate the current pulse.
 * Int value, minimum 1
 * Default 100
 */
rythm.maxValueHistory = value;

/* Set the music the page will dance to.
 * @audioUrl : '../example/mysong.mp3'
 */
rythm.setMusic(audioUrl);

/* Used to collaborate with other players library
 * You can connect Rythm to an audioElement, and then control the audio with your other player
 */
rythm.connectExternalAudioElement(audioElement)

/* Adjust music's gain.
 * @value : Number
 */
rythm.setGain(value);

/* Add your own rythm-class
 * @elementClass: Class that you want to link your rythm to.
 * @danceType : Use any of the build in effect or give your own function;
 * @startValue: The starting frequence of your rythm.
 * @nbValue: The number of frequences of your rythm.
 * 1024 Frequences, your rythm will react to the average of your selected frequences.
 * Exemples : bass 0-10 ; medium 150-40 ; high 500-100
 */
rythm.addRythm(elementClass, danceType, startValue, nbValue);

/* Plug your computer microphone to rythm.js
 * This function return a promise resolved when the microphone is up.
 * Require your website to be run in HTTPS
 */
rythm.plugMicrophone().then(function(){...})

//Let's dance
rythm.start();

//Stop the party
rythm.stop();
  • 转载自 http://blog.csdn.net/qq_26536483/article/details/78261515 简介 rythm.js是一款让页面元素跳动起来的插件,并且带音乐,共7种用法,包括脉冲、跳跃、摇动、扭动、淡入淡出、变换颜色等特效 基本用法 1 <div class="rythm pulse"></div> 2 3 var rythm = new Rythm(); 4

  • javascript知识点 几乎是一个数据库的奇怪故事 (The Strange Tale of the Almost-a-Database) 这不是教程,这是一个警告性的故事。 (This is not a tutorial, it’s a cautionary tale.) This is the story of my first web development project, under

  • 为大家推荐GitHub上25个今年最值得关注学习的JavaScript开源项目,这些项目的平均star数达到5000个。 No.1 Prettier:一款帮你解决代码风格问题的代码格式化工具,功能强大,简单易用,支持多语言,减少配置项。[GitHub上26755个star] 项目地址: github.com/prettier/pr… No.2 Parcel:运行极快的零配置web应用打包工具。[G

  • No.1 Prettier:一款帮你解决代码风格问题的代码格式化工具,功能强大,简单易用,支持多语言,减少配置项。[GitHub上26755个star] 项目地址: github.com/prettier/pr… No.2 Parcel:运行极快的零配置web应用打包工具。[GitHub上25811个star] 项目地址: github.com/parcel-bund… No.3 Prepack:

  • 供学习记录,可能有错误。 模板引擎 controller请求,后端怎么传数据,前端怎么获取。 比如:japidview, rythm。 以japidview为例。后端controller继承JapidController,render数据,前端@args获取, html页面上可以写java代码, 有if , for等标签写法 js框架 对js进行了封装, 通过新的属性和表达扩展了html 比如:a

 相关资料
  • 有多个菜单页面,页面上方都有查询,封装了查询组件,切换页面的时候要重置查询条件-searchObj 我用pinia来存查询条件,searchObj,然后每个页面监听searchObj,条件变化就发起查询 问题是: 当我切换页面的时候把查询条件重置,这时候就会触发当前页面的watch,然后发起查询,就是跳转前就发起了查询 请问怎么解决这种问题,或者怎么这样的布局还有什么其他方法实现

  • 页面跳转可以是打开新的一页,也可以是当前页重定向,还可以是跳转到当前页的某个状态,下面会从打开w文件,打开其它后缀文件,使用路由等几个方面分别介绍一下在X5中的页面跳转。 目录 1、打开w文件 1.1、使用Shell提供的方法 1.2、使用弹出窗口打开 1.3、模拟门户的做法 2、打开html等其它类型的文件 2.1、使用打开w文件的方法 2.2、使用a链接跳转 2.3、页面重定向 2.4、使用w

  • 页面跳转可以是打开新的一页,也可以是当前页重定向,还可以是跳转到当前页的某个状态,下面会从打开w文件,打开其它后缀文件,使用路由等几个方面分别介绍一下在X5中的页面跳转。 目录 1、打开w文件 1.1、使用Shell提供的方法 1.2、使用弹出窗口打开 1.3、模拟门户的做法 2、打开html等其它类型的文件 2.1、使用打开w文件的方法 2.2、使用a链接跳转 2.3、页面重定向 2.4、使用w

  • 本文向大家介绍怎么让整个页面从iframe中跳出来?相关面试题,主要包含被问及怎么让整个页面从iframe中跳出来?时的应答技巧和注意事项,需要的朋友参考一下

  • 每当我在android emulator上运行我的应用程序时,它都会显示繁忙(我的意思是它会旋转),而且它确实需要很多时间,有时甚至会一直很繁忙 好心的人能帮帮我吗? 有没有运行速度快的android emulator版本?我的很慢?

  • 我正在尝试使用JSOUP解析一个网页并提取数据。但该链接是动态的,在显示详细信息之前会弹出一个等待加载页面。因此Jsoup似乎处理等待页面而不是详细信息页面。有没有让它等到页面完全加载?