Giter VIP home page Giter VIP logo

imd-viewer's Introduction

imd谱面预览器

WordPress插件:imd谱面预览器

此代码可以独立于WordPress单独使用

安装

  1. 解压到wp-content/plugins/文件夹
  2. 在WordPress后台插件管理页面启用插件

更新日志

  • 2017-02-16 新增2个参数:“高度与宽度的比值”“一屏时间”
  • 2017-03-02 新增1个参数:“播放速率”

说明

  • 点击播放按钮才开始加载mp3和imd,所以,如果不点击播放,是不会消耗加载MP3的流量的。

使用方法

imd短标签格式

最简单形式:
[imd mp3="/wp-content/plugins/imd-viewer/tests/test.mp3" imd="/wp-content/plugins/imd-viewer/tests/test.imd"]

设置全部参数:
[imd mp3="/wp-content/plugins/imd-viewer/tests/test.mp3" imd="/wp-content/plugins/imd-viewer/tests/test.imd" height="0.5625" one_screen_time="500" rate="1.5"]

参数含义

参数 含义 默认值 其他说明
mp3 MP3链接 (空) 前面需要有http或https。
没有MP3谱面也不能正常播放
imd imd文件链接 (空) 前面需要有http或https。
受浏览器同源策略限制,不可以随意引用imd文件。
没有谱面MP3可以正常播放
height 表示高度与宽度的比值 0.5625 可以省略。
0.5625 == 9/16
one_screen_time 表示一屏时间(毫秒) 900 可以省略,至少100
rate 表示播放速率(倍率) 1 可以省略,1表示原速。

文件说明

imd-viewer                  插件目录
├─README.md                 README文件
├─imd-viewer.php            WordPress插件入口文件
│
├─css                       样式表文件夹
│  └─style.css              样式表
│
└─js                        JavaScript文件夹
   ├─script.js              DOM操作
   ├─ImdFile.js             imd解码器
   └─ImdPainter.js          imd绘制类

LICENSE

AGPL-3.0

Copyright (C) 2017 Ganlv

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.

imd-viewer's People

Contributors

ganlvtech avatar

Stargazers

GreenYoshi (Wang Han) avatar  avatar

Watchers

James Cloos avatar  avatar  avatar

Forkers

2659170494

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.