@xpadev-net/niconicomments 0.2.10 → 0.2.11

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/README.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # [niconicomments](https://xpadev.net/niconicomments/)
2
- [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/xpadev-net/niconicomments/blob/master/LICENSE)
2
+ [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/xpadev-net/niconicomments/blob/master/LICENSE)
3
+ [![Total alerts](https://img.shields.io/lgtm/alerts/g/xpadev-net/niconicomments.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/xpadev-net/niconicomments/alerts/)
4
+ [![Language grade: JavaScript](https://img.shields.io/lgtm/grade/javascript/g/xpadev-net/niconicomments.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/xpadev-net/niconicomments/context:javascript)
5
+
3
6
  ニコニコ動画の公式プレイヤー互換の高パフォーマンスなコメント描画ライブラリ
4
7
  High peformance High compatibility comment drawing library
5
8
  Reference: https://xpadev-net.github.io/niconicomments/
package/dist/bundle.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- niconicomments.js v0.2.10
2
+ niconicomments.js v0.2.11
3
3
  (c) 2021 xpadev-net https://xpadev.net
4
4
  Released under the MIT License.
5
5
  */
@@ -25,6 +25,7 @@
25
25
  return _assign.apply(this, arguments);
26
26
  };
27
27
 
28
+ var isDebug = false;
28
29
  var NiconiComments = (function () {
29
30
  function NiconiComments(canvas, data, options) {
30
31
  if (options === void 0) { options = {
@@ -34,9 +35,12 @@
34
35
  showCollision: false,
35
36
  showFPS: false,
36
37
  showCommentCount: false,
37
- drawAllImageOnLoad: false
38
+ drawAllImageOnLoad: false,
39
+ debug: false
38
40
  }; }
39
41
  var _this = this;
42
+ isDebug = options.debug;
43
+ var constructorStart = performance.now();
40
44
  this.canvas = canvas;
41
45
  var context = canvas.getContext("2d");
42
46
  if (!context)
@@ -62,6 +66,20 @@
62
66
  "resized": 61
63
67
  }
64
68
  };
69
+ this.lineHeight = {
70
+ "small": {
71
+ "default": 1,
72
+ "resized": 1
73
+ },
74
+ "medium": {
75
+ "default": 1,
76
+ "resized": 1
77
+ },
78
+ "big": {
79
+ "default": 1,
80
+ "resized": 1.01
81
+ }
82
+ };
65
83
  this.doubleResizeMaxWidth = {
66
84
  full: {
67
85
  legacy: 3020,
@@ -93,8 +111,10 @@
93
111
  _this.fps = _this.fpsCount * 2;
94
112
  _this.fpsCount = 0;
95
113
  }, 500);
114
+ logger("constructor complete: ".concat(performance.now() - constructorStart, "ms"));
96
115
  }
97
116
  NiconiComments.prototype.parseData = function (data) {
117
+ var parseDataStart = performance.now();
98
118
  var data_ = [];
99
119
  for (var i = 0; i < data.length; i++) {
100
120
  for (var key in data[i]) {
@@ -138,9 +158,11 @@
138
158
  return 1;
139
159
  return 0;
140
160
  });
161
+ logger("parseData complete: ".concat(performance.now() - parseDataStart, "ms"));
141
162
  return data_;
142
163
  };
143
164
  NiconiComments.prototype.preRendering = function (rawData, drawAll) {
165
+ var preRenderingStart = performance.now();
144
166
  var parsedData = this.getCommentPos(this.getCommentSize(this.getFont(rawData)));
145
167
  this.data = this.sortComment(parsedData);
146
168
  if (drawAll) {
@@ -148,8 +170,10 @@
148
170
  this.getTextImage(Number(i));
149
171
  }
150
172
  }
173
+ logger("preRendering complete: ".concat(performance.now() - preRenderingStart, "ms"));
151
174
  };
152
175
  NiconiComments.prototype.getFont = function (parsedData) {
176
+ var getFontStart = performance.now();
153
177
  var result = [];
154
178
  for (var i in parsedData) {
155
179
  var value = parsedData[i];
@@ -158,9 +182,11 @@
158
182
  value.content = value.content.replace(/\t/g, "\u2003\u2003");
159
183
  result[i] = this.parseCommandAndNicoscript(value);
160
184
  }
185
+ logger("getFont complete: ".concat(performance.now() - getFontStart, "ms"));
161
186
  return result;
162
187
  };
163
188
  NiconiComments.prototype.getCommentSize = function (parsedData) {
189
+ var getCommentSizeStart = performance.now();
164
190
  var tmpData = groupBy(parsedData, "font", "fontSize");
165
191
  var result = [];
166
192
  for (var i in tmpData) {
@@ -177,6 +203,7 @@
177
203
  size.width = measure.width;
178
204
  size.width_max = measure.width_max;
179
205
  size.width_min = measure.width_min;
206
+ size.lineHeight = measure.lineHeight;
180
207
  if (measure.resized) {
181
208
  size.fontSize = measure.fontSize;
182
209
  this.context.font = parseFont(i, j, this.useLegacy);
@@ -185,9 +212,11 @@
185
212
  }
186
213
  }
187
214
  }
215
+ logger("getCommentSize complete: ".concat(performance.now() - getCommentSizeStart, "ms"));
188
216
  return result;
189
217
  };
190
218
  NiconiComments.prototype.getCommentPos = function (parsedData) {
219
+ var getCommentPosStart = performance.now();
191
220
  var data = parsedData;
192
221
  for (var i in data) {
193
222
  var comment = data[i];
@@ -277,6 +306,9 @@
277
306
  break;
278
307
  }
279
308
  }
309
+ if (is_break) {
310
+ break;
311
+ }
280
312
  }
281
313
  }
282
314
  for (var j = 0; j < 500; j++) {
@@ -342,45 +374,51 @@
342
374
  parsedData[i].posY = posY;
343
375
  }
344
376
  }
377
+ logger("getCommentPos complete: ".concat(performance.now() - getCommentPosStart, "ms"));
345
378
  return parsedData;
346
379
  };
347
380
  NiconiComments.prototype.sortComment = function (parsedData) {
381
+ var sortCommentStart = performance.now();
348
382
  for (var vpos in this.timeline) {
349
383
  if (!this.timeline[vpos])
350
384
  continue;
351
- this.timeline[vpos].sort(function (a, b) {
352
- var A = parsedData[a];
353
- var B = parsedData[b];
354
- if (!A.owner && B.owner) {
355
- return -1;
356
- }
357
- else if (A.owner && !B.owner) {
358
- return 1;
385
+ var owner = [], user = [];
386
+ for (var _i = 0, _a = this.timeline[vpos]; _i < _a.length; _i++) {
387
+ var i = _a[_i];
388
+ if (parsedData[i].owner) {
389
+ owner.push(i);
359
390
  }
360
391
  else {
361
- return 0;
392
+ user.push(i);
362
393
  }
363
- });
394
+ }
395
+ this.timeline[vpos] = owner.concat(user);
364
396
  }
397
+ logger("parseData complete: ".concat(performance.now() - sortCommentStart, "ms"));
365
398
  return parsedData;
366
399
  };
367
400
  NiconiComments.prototype.measureText = function (comment) {
368
401
  var width, width_max, width_min, height, width_arr = [], lines = comment.content.split("\n");
402
+ if (!comment.lineHeight)
403
+ comment.lineHeight = this.lineHeight[comment.size].default;
369
404
  if (!comment.resized && !comment.ender) {
370
405
  if (comment.size === "big" && lines.length > 2) {
371
406
  comment.fontSize = this.fontSize.big.resized;
407
+ comment.lineHeight = this.lineHeight.big.resized;
372
408
  comment.resized = true;
373
409
  comment.tateresized = true;
374
410
  this.context.font = parseFont(comment.font, comment.fontSize, this.useLegacy);
375
411
  }
376
412
  else if (comment.size === "medium" && lines.length > 4) {
377
413
  comment.fontSize = this.fontSize.medium.resized;
414
+ comment.lineHeight = this.lineHeight.medium.resized;
378
415
  comment.resized = true;
379
416
  comment.tateresized = true;
380
417
  this.context.font = parseFont(comment.font, comment.fontSize, this.useLegacy);
381
418
  }
382
419
  else if (comment.size === "small" && lines.length > 6) {
383
420
  comment.fontSize = this.fontSize.small.resized;
421
+ comment.lineHeight = this.lineHeight.small.resized;
384
422
  comment.resized = true;
385
423
  comment.tateresized = true;
386
424
  this.context.font = parseFont(comment.font, comment.fontSize, this.useLegacy);
@@ -393,7 +431,7 @@
393
431
  width = width_arr.reduce(function (p, c) { return p + c; }, 0) / width_arr.length;
394
432
  width_max = Math.max.apply(Math, width_arr);
395
433
  width_min = Math.min.apply(Math, width_arr);
396
- height = (comment.fontSize * (1 + this.commentYPaddingTop) * lines.length) + (this.commentYMarginBottom * comment.fontSize);
434
+ height = (comment.fontSize * comment.lineHeight * (1 + this.commentYPaddingTop) * lines.length) + (this.commentYMarginBottom * comment.fontSize);
397
435
  if (comment.loc !== "naka" && !comment.tateresized) {
398
436
  if (comment.full && width_max > 1920) {
399
437
  comment.fontSize -= 2;
@@ -415,7 +453,6 @@
415
453
  comment.resized = true;
416
454
  comment.yokoResized = true;
417
455
  this.context.font = parseFont(comment.font, comment.fontSize, this.useLegacy);
418
- console.log(comment);
419
456
  return this.measureText(comment);
420
457
  }
421
458
  else if (comment.loc !== "naka" && comment.tateresized && comment.yokoResized) {
@@ -425,7 +462,7 @@
425
462
  return this.measureText(comment);
426
463
  }
427
464
  else if (!comment.full && width_max > this.doubleResizeMaxWidth.normal[this.useLegacy ? "legacy" : "default"]) {
428
- comment.fontSize -= 1.;
465
+ comment.fontSize -= 1;
429
466
  this.context.font = parseFont(comment.font, comment.fontSize, this.useLegacy);
430
467
  return this.measureText(comment);
431
468
  }
@@ -436,7 +473,8 @@
436
473
  "width_min": width_min,
437
474
  "height": height,
438
475
  "resized": comment.resized,
439
- "fontSize": comment.fontSize
476
+ "fontSize": comment.fontSize,
477
+ "lineHeight": comment.lineHeight
440
478
  };
441
479
  };
442
480
  NiconiComments.prototype.drawText = function (comment, vpos) {
@@ -468,14 +506,15 @@
468
506
  else if (comment.loc === "shita") {
469
507
  posY = 1080 - comment.posY - comment.height;
470
508
  }
471
- if (comment.image)
509
+ if (comment.image && comment.image !== true) {
472
510
  this.context.drawImage(comment.image, posX, posY);
511
+ }
473
512
  };
474
513
  NiconiComments.prototype.getTextImage = function (i) {
514
+ var _this = this;
475
515
  var value = this.data[i];
476
- if (!value || value.invisible) {
516
+ if (!value || value.invisible || value.content.match(/^\s*$/))
477
517
  return;
478
- }
479
518
  var image = document.createElement("canvas");
480
519
  image.width = value.width_max;
481
520
  image.height = value.height;
@@ -510,12 +549,12 @@
510
549
  var lines = value.content.split("\n");
511
550
  for (var i_1 in lines) {
512
551
  var line = lines[i_1], posY = void 0;
513
- posY = (Number(i_1) + 1) * (value.fontSize) * (1 + this.commentYPaddingTop);
552
+ posY = (Number(i_1) + 1) * (value.fontSize * value.lineHeight) * (1 + this.commentYPaddingTop);
514
553
  context.strokeText(line, 0, posY);
515
554
  context.fillText(line, 0, posY);
516
555
  if (this.showCollision) {
517
556
  context.strokeStyle = "rgba(255,255,0,0.5)";
518
- context.strokeRect(0, posY, value.width_max, value.fontSize * -1);
557
+ context.strokeRect(0, posY, value.width_max, value.fontSize * value.lineHeight * -1);
519
558
  if (value.color === "#000000") {
520
559
  context.strokeStyle = "rgba(255,255,255,0.7)";
521
560
  }
@@ -525,6 +564,10 @@
525
564
  }
526
565
  }
527
566
  this.data[i].image = image;
567
+ setTimeout(function () {
568
+ if (_this.data[i].image)
569
+ delete _this.data[i].image;
570
+ }, 5000);
528
571
  };
529
572
  NiconiComments.prototype.parseCommand = function (comment) {
530
573
  var metadata = comment.mail, loc = null, size = null, fontSize = null, color = null, font = null, full = false, ender = false, _live = false, invisible = false, long = null;
@@ -817,6 +860,7 @@
817
860
  return _assign(_assign({}, comment), data);
818
861
  };
819
862
  NiconiComments.prototype.drawCanvas = function (vpos) {
863
+ var drawCanvasStart = performance.now();
820
864
  if (this.lastVpos === vpos)
821
865
  return;
822
866
  this.lastVpos = vpos;
@@ -838,13 +882,18 @@
838
882
  for (var i in this.timeline[vpos]) {
839
883
  var index = this.timeline[vpos][Number(i)];
840
884
  var comment = this.data[index];
841
- if (!comment || comment.invisible) {
885
+ if (!comment || comment.invisible || comment.content.match(/^[\u200B-\u200D\uFEFF\u3164\s]*$/)) {
842
886
  continue;
843
887
  }
844
- if (!comment.image) {
888
+ if (comment.image === undefined) {
845
889
  this.getTextImage(index);
846
890
  }
847
- this.drawText(comment, vpos);
891
+ try {
892
+ this.drawText(comment, vpos);
893
+ }
894
+ catch (e) {
895
+ comment.image = false;
896
+ }
848
897
  }
849
898
  }
850
899
  if (this.showFPS) {
@@ -865,6 +914,7 @@
865
914
  this.context.fillText("Count:0", 100, 200);
866
915
  }
867
916
  }
917
+ logger("drawCanvas complete: ".concat(performance.now() - drawCanvasStart, "ms"));
868
918
  };
869
919
  NiconiComments.prototype.clear = function () {
870
920
  this.context.clearRect(0, 0, 1920, 1080);
@@ -929,6 +979,10 @@
929
979
  var isApiChat = function (item) {
930
980
  return !!item.chat;
931
981
  };
982
+ var logger = function (msg) {
983
+ if (isDebug)
984
+ console.debug(msg);
985
+ };
932
986
 
933
987
  return NiconiComments;
934
988
 
@@ -6,6 +6,7 @@ declare type InitOptions = {
6
6
  showFPS: boolean;
7
7
  showCommentCount: boolean;
8
8
  drawAllImageOnLoad: boolean;
9
+ debug: boolean;
9
10
  };
10
11
  declare type rawApiResponse = {
11
12
  [key: string]: apiPing | apiThread | apiLeaf | apiGlobalNumRes | apiChat;
@@ -69,10 +70,11 @@ declare type formattedCommentWithSize = formattedCommentWithFont & {
69
70
  "width": number;
70
71
  "width_max": number;
71
72
  "width_min": number;
73
+ "lineHeight": number;
72
74
  };
73
75
  declare type parsedComment = formattedCommentWithSize & {
74
76
  posY: number;
75
- image?: HTMLCanvasElement;
77
+ image?: HTMLCanvasElement | boolean;
76
78
  };
77
79
  declare type measureTextResult = {
78
80
  "width": number;
@@ -81,6 +83,7 @@ declare type measureTextResult = {
81
83
  "height": number;
82
84
  "resized": boolean;
83
85
  "fontSize": number;
86
+ "lineHeight": number;
84
87
  };
85
88
  declare class NiconiComments {
86
89
  private canvas;
@@ -88,6 +91,7 @@ declare class NiconiComments {
88
91
  private readonly commentYPaddingTop;
89
92
  private readonly commentYMarginBottom;
90
93
  private readonly fontSize;
94
+ private readonly lineHeight;
91
95
  private readonly doubleResizeMaxWidth;
92
96
  private video;
93
97
  private showCollision;
@@ -122,6 +126,7 @@ declare class NiconiComments {
122
126
  loc: string;
123
127
  full: any;
124
128
  yokoResized: boolean;
129
+ lineHeight: number | undefined;
125
130
  }): measureTextResult;
126
131
  drawText(comment: parsedComment, vpos: number): void;
127
132
  getTextImage(i: number): void;
@@ -1 +1 @@
1
- {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/main.ts"],"names":[],"mappings":"AAAA,aAAK,WAAW,GAAG;IACf,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAC/B,aAAa,EAAE,OAAO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.11",
4
4
  "description": "NiconiComments is a comment drawing library that is somewhat compatible with the official Nico Nico Douga player.",
5
5
  "main": "dist/bundle.js",
6
6
  "types": "dist/dts/main.d.ts",
@@ -31,12 +31,12 @@
31
31
  "homepage": "https://xpadev.net/niconicomments/docs/",
32
32
  "license": "MIT",
33
33
  "devDependencies": {
34
+ "@babel/preset-env": "^7.18.2",
34
35
  "@rollup/plugin-babel": "^5.3.0",
35
36
  "@rollup/plugin-typescript": "^8.3.2",
36
37
  "rollup": "^2.75.6",
37
38
  "typedoc": "^0.22.17",
38
39
  "typedoc-plugin-missing-exports": "^0.22.6",
39
- "typescript": "^4.7.3",
40
- "@babel/preset-env": "^7.18.2"
40
+ "typescript": "^4.7.3"
41
41
  }
42
42
  }