Skip to content

Instantly share code, notes, and snippets.

View matsurai25's full-sized avatar

matsurai25 matsurai25

View GitHub Profile
@matsurai25
matsurai25 / index.html
Created December 27, 2018 18:34
Lottieでページ遷移を作ってみる実験
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>Document</title>
<script
src="https://code.jquery.com/jquery-3.3.1.min.js"
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
@matsurai25
matsurai25 / script.js
Created December 19, 2017 03:52
lottie-init-setting
const anim = lottie.loadAnimation({
container: document.getElementById('bodymovin-wrapper'),
renderer: 'svg',
loop: true,
path: 'data.json'
});
###
■■ PutOnNote
MIDIの音(Note)情報にあわせて選択されたアイテムを置きまくります
code by matsurai25
http://matsurai25.info/put-on-note
■■ 使い方
1. 複製したいコンポジションを選択した状態で実行
2. MIDIを選択する
@matsurai25
matsurai25 / get_m3_json.js
Created November 1, 2015 09:16
M3_json_getter
// m3のサイトからjsonデータを出力
var json = [];
var no_tw = {
count:0,
circles:[],
}
$("tr").each(function(i,x){
// if(i > 30){
// return
// }
// コンポジションを選択した状態で実行、文字列を1文字ずつ分解して、その文字数分だけコンポジションを複製して"letter_"+nameの形で保存
// 処理書くの面倒だったんでこのへんでユニーク化してください
// http://kiteretsu-world.info/tool/reduce-character.shtml
var Lyrics = "キミスペクトル君だけの色に染めてよ"; //ここの中身を適度に変えてください
//配列化
Lyrics = Lyrics.split('');
// レイヤーの長さでタイムリマップを制御
var range = 3; //はじめと終わり、本来の秒数
var effectSpeed = 2; //何倍の早さで動かすか
var currentTime;
if(time>outPoint-(range/effectSpeed)){
//終わり
currentTime = (range*2)-(outPoint-time) * effectSpeed;
}else if(time<inPoint+(range/effectSpeed)){
// 配列の中からランダムな色を出す処理
// 16進数のカラーコードを[1,1,1,1]の形に直す
function color16(rgb){
c = 1/256;
red =parseInt(rgb.substring(0, 2), 16);
green =parseInt(rgb.substring(2, 4), 16)
blue =parseInt(rgb.substring(4, 6), 16)
return [c*red,c*green,c*blue,1];
}