@xpadev-net/niconicomments 0.2.0 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +12 -4
  2. package/dist/bundle.js +909 -1066
  3. package/package.json +9 -4
package/README.md CHANGED
@@ -2,8 +2,9 @@
2
2
  [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/xpadev-net/niconicomments/blob/master/LICENSE)
3
3
  ニコニコ動画の公式プレイヤーに多少の互換性を持つコメント描画ライブラリです
4
4
  This is a comment drawing library that is somewhat compatible with the official Nico Nico Douga player.
5
- Reference: https://xpadev.net/niconicomments/docs/
5
+ Reference: https://xpadev-net.github.io/niconicomments/
6
6
  Github: https://github.com/xpadev-net/niconicomments
7
+ npm: https://www.npmjs.com/package/@xpadev-net/niconicomments
7
8
 
8
9
  ## Installation
9
10
  ```html
@@ -16,9 +17,16 @@ npm i @xpadev-net/niconicomments
16
17
 
17
18
  ## Examples
18
19
  ```javascript
19
- const niconiComments = new NiconiComments(canvas, comments);
20
- niconiComments.drawCanvas(vpos)
20
+ const canvas = document.getElementById("canvas");
21
+ const video = document.getElementById("video");
22
+ const req = await fetch("sample.json");
23
+ const res = await req.json();
24
+ const niconiComments = new NiconiComments(canvas, res);
25
+ //video.ontimeupdateを使用すると、呼び出し回数の関係でコメントカクつく
26
+ setInterval(() => niconiComments.drawCanvas(Math.floor(video.currentTime * 100)), 10);
21
27
  ```
22
28
 
23
29
  ## Sample
24
- https://xpadev.net/niconicomments/sample.html
30
+ [レッツゴー!陰陽師](https://xpadev.net/niconicomments/sample.html)
31
+ [レッツゴー!陰陽師(CodePen)](https://codepen.io/xpadev-net/pen/mdBdQmX)
32
+ [ニコニコ動画流星群](https://xpadev.net/niconicomments/ryuuseigun.html)