Skip to content

Instantly share code, notes, and snippets.

View appgiga-code's full-sized avatar

appgiga appgiga-code

View GitHub Profile
@appgiga-code
appgiga-code / index.html
Created March 28, 2017 08:26
Calligraphrを使ったサンプルコード
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>Calligraphrサンプル</title>
<style>
@font-face {
font-family: 'myfont';
src: url('fonts/myfont.ttf') format('truetype');
}
@appgiga-code
appgiga-code / index.html
Created February 10, 2017 05:59
Scaley.ioのURLをHTMLで使うサンプル
<!doctype html>
<html>
<head>
<title>Scaley.ioサンプル</title>
</head>
<body>
<img src="https://i.scaley.io/300/raw.githubusercontent.com/appgiga-code/freeimg/master/street2.jpg">
</body>
@appgiga-code
appgiga-code / app.js
Created January 11, 2017 06:58
RapidAPIの基本サンプル
rapid.call('【使いたいサービス】', '【使いたいAPI】', {
// ここにオプションを記述
}).on('success', (data)=>{
// データの取得に成功した時の処理
}).on('error', (err)=>{
//画像編集エディタの設定
var Editor = new Aviary.Feather({
//Client IDの設定
apiKey: 'ここにClient IDを入力',
//日本語の設定
language: 'ja',
//必要な機能だけを限定する設定
tools: ['enhance', 'effects'],
//<body>内の画像要素を取得
var image = document.getElementById('image');
//画像編集エディタを利用するための準備
var Editor = new Aviary.Feather({
apiKey: 'ここにClient IDを入力!'
});
//画像要素をクリックしたら、「編集エディタ」を表示
image.addEventListener('click', function () {
//画像編集エディタを利用するための準備
var Editor = new Aviary.Feather({
apiKey: 'ここにClient IDを入力!'
});
<!DOCTYPE html>
<html>
<head>
<title>サンプル</title>
<script src="https://dme0ih8comzn4.cloudfront.net/imaging/v2/editor.js"></script>
</head>
<body>
<img src="ここに画像URL" id="image">
<script src="main.js"></script>
</body>