Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
zk-phi committed Dec 20, 2023
1 parent 5c2a13e commit 76a3725
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Readme.org
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ BlobURL で返します。
背景が塗りつぶされたあと、 ~drawImage~ される直前の ~ctx~ が渡ってくる
ので、 ~transform~, ~filter~, ~clip~ など好みの変形をセットしてくださ
い。 エフェクトは複数併用することを想定しているので、 ~setTransform~
など他のエフェクトが加えた効果をアンドゥしてしまうようなメソッドを呼ぶ
など他のエフェクトが加えた効果を上書きしてしまうようなメソッドを呼ぶ
ことは避けてください。

また作成した絵文字がアニメーション無効の環境でも快適に使えるよう、
Expand All @@ -106,13 +106,13 @@ BlobURL で返します。
「1フレーム目固定」を選択してください。

渡ってくる ~canvas~ は、最終的に絵文字としてレンダーされるものの4倍
(縦横それぞれ2倍)の大きさになっていることに注意してください
(縦横それぞれ2倍)の大きさになっています

#+begin_src text
+--------+
| | <- cellHeight / 4 の余白
| +----+ |
| | | | <- cellHeight / 2
| | | | <- cellHeight / 2 の描画エリア
| | | | 最終的に絵文字に使われる部分
| +----+ |
| | <- cellHeight / 4 の余白
Expand Down Expand Up @@ -172,15 +172,15 @@ BlobURL で返します。
+--------+
| | <- cellHeight / 4 の余白
| +----+ |
| | | | <- cellHeight / 2
| | | | <- cellHeight / 2 の描画エリア
| | | | 最終的に絵文字に使われる部分
| +----+ |
| | <- cellHeight / 4 の余白
+--------+
#+end_src

たとえば、ただ画面の中央に通常のサイズで絵文字を描画したいだけの場合
(なにもしないアニメーション)、実装は次のようになります
たとえば、なにもしないアニメーション (ただ画面の中央に、通常のサイズで
絵文字を描画するだけ) の実装は次のようになります

#+begin_src javascript
ctx.drawImage(..., cellWidth / 4, cellHeight / 4, cellWidth / 2, cellHeight / 2);
Expand All @@ -192,7 +192,7 @@ BlobURL で返します。
なくなってしまうので、エフェクトとして同じ効果を実装することができない
か、一度は検討してみてください。

なおエフェクトと同様に、作成した絵文字がアニメーション無効の環境でも
またエフェクトと同様に、作成した絵文字がアニメーション無効の環境でも
快適に使えるよう配慮してください。

*** WebGL エフェクトの追加
Expand Down

0 comments on commit 76a3725

Please sign in to comment.