@xpadev-net/niconicomments 0.2.0 → 0.2.1
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.
- package/dist/bundle.js +6 -3
- package/package.json +1 -1
package/dist/bundle.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
niconicomments.js v0.2.
|
|
2
|
+
niconicomments.js v0.2.1
|
|
3
3
|
(c) 2021 xpadev-net https://xpadev.net
|
|
4
4
|
Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -534,7 +534,8 @@
|
|
|
534
534
|
}
|
|
535
535
|
}
|
|
536
536
|
|
|
537
|
-
let posX = (1920 - comment.width_max) / 2
|
|
537
|
+
let posX = (1920 - comment.width_max) / 2,
|
|
538
|
+
posY = comment.posY;
|
|
538
539
|
|
|
539
540
|
if (comment.loc === "naka") {
|
|
540
541
|
if (reverse) {
|
|
@@ -542,9 +543,11 @@
|
|
|
542
543
|
} else {
|
|
543
544
|
posX = 1920 - (1920 + comment.width_max) * (vpos - comment.vpos) / 500;
|
|
544
545
|
}
|
|
546
|
+
} else if (comment.loc === "shita") {
|
|
547
|
+
posY = comment.posY = 1080 - comment.posY - comment.height;
|
|
545
548
|
}
|
|
546
549
|
|
|
547
|
-
this.context.drawImage(comment.image, posX,
|
|
550
|
+
this.context.drawImage(comment.image, posX, posY);
|
|
548
551
|
}
|
|
549
552
|
/**
|
|
550
553
|
* drawTextで毎回fill/strokeすると重いので画像化して再利用できるようにする
|
package/package.json
CHANGED