Skip to content

Commit 2dc8a85

Browse files
committed
Style updates
1 parent d0fd23e commit 2dc8a85

33 files changed

Lines changed: 789 additions & 393 deletions

dist/CommentCoreLibrary.js

Lines changed: 48 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -126,38 +126,41 @@ var CommentUtils;
126126
}
127127
return 'matrix3d(' + matrix.join(',') + ')';
128128
};
129-
Matrix3D.identity = function () {
130-
return new Matrix3D([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]);
131-
};
132-
Matrix3D.createScaleMatrix = function (xscale, yscale, zscale) {
133-
return new Matrix3D([xscale, 0, 0, 0, 0, yscale, 0, 0, 0, 0, zscale, 0, 0, 0, 0, 1]);
134-
};
135-
Matrix3D.createRotationMatrix = function (xrot, yrot, zrot) {
136-
var DEG2RAD = Math.PI / 180;
137-
var yr = yrot * DEG2RAD;
138-
var zr = zrot * DEG2RAD;
139-
var COS = Math.cos;
140-
var SIN = Math.sin;
141-
var matrix = [
142-
COS(yr) * COS(zr), COS(yr) * SIN(zr), SIN(yr), 0,
143-
(-SIN(zr)), COS(zr), 0, 0,
144-
(-SIN(yr) * COS(zr)), (-SIN(yr) * SIN(zr)), COS(yr), 0,
145-
0, 0, 0, 1
146-
];
147-
return new Matrix3D(matrix.map(function (v) {
148-
return Math.round(v * 1e10) * 1e-10;
149-
}));
150-
};
151129
return Matrix3D;
152130
}());
131+
Matrix3D.identity = function () {
132+
return new Matrix3D([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]);
133+
};
134+
Matrix3D.createScaleMatrix = function (xscale, yscale, zscale) {
135+
return new Matrix3D([xscale, 0, 0, 0, 0, yscale, 0, 0, 0, 0, zscale, 0, 0, 0, 0, 1]);
136+
};
137+
Matrix3D.createRotationMatrix = function (xrot, yrot, zrot) {
138+
var DEG2RAD = Math.PI / 180;
139+
var yr = yrot * DEG2RAD;
140+
var zr = zrot * DEG2RAD;
141+
var COS = Math.cos;
142+
var SIN = Math.sin;
143+
var matrix = [
144+
COS(yr) * COS(zr), COS(yr) * SIN(zr), SIN(yr), 0,
145+
(-SIN(zr)), COS(zr), 0, 0,
146+
(-SIN(yr) * COS(zr)), (-SIN(yr) * SIN(zr)), COS(yr), 0,
147+
0, 0, 0, 1
148+
];
149+
return new Matrix3D(matrix.map(function (v) { return Math.round(v * 1e10) * 1e-10; }));
150+
};
153151
CommentUtils.Matrix3D = Matrix3D;
154152
})(CommentUtils || (CommentUtils = {}));
155153
//# sourceMappingURL=CommentUtils.js.map
156-
var __extends = (this && this.__extends) || function (d, b) {
157-
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
158-
function __() { this.constructor = d; }
159-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
160-
};
154+
var __extends = (this && this.__extends) || (function () {
155+
var extendStatics = Object.setPrototypeOf ||
156+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
157+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
158+
return function (d, b) {
159+
extendStatics(d, b);
160+
function __() { this.constructor = d; }
161+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
162+
};
163+
})();
161164
var CoreComment = (function () {
162165
function CoreComment(parent, init) {
163166
if (init === void 0) { init = {}; }
@@ -581,17 +584,18 @@ var CoreComment = (function () {
581584
CoreComment.prototype.toString = function () {
582585
return ['[', this.stime, '|', this.ttl, '/', this.dur, ']', '(', this.mode, ')', this.text].join('');
583586
};
584-
CoreComment.LINEAR = function (t, b, c, d) {
585-
return t * c / d + b;
586-
};
587587
return CoreComment;
588588
}());
589+
CoreComment.LINEAR = function (t, b, c, d) {
590+
return t * c / d + b;
591+
};
589592
var ScrollComment = (function (_super) {
590593
__extends(ScrollComment, _super);
591594
function ScrollComment(parent, data) {
592-
_super.call(this, parent, data);
593-
this.dur *= this.parent.options.scroll.scale;
594-
this.ttl *= this.parent.options.scroll.scale;
595+
var _this = _super.call(this, parent, data) || this;
596+
_this.dur *= _this.parent.options.scroll.scale;
597+
_this.ttl *= _this.parent.options.scroll.scale;
598+
return _this;
595599
}
596600
Object.defineProperty(ScrollComment.prototype, "alpha", {
597601
set: function (a) {
@@ -697,11 +701,16 @@ var CommentFactory = (function () {
697701
return CommentFactory;
698702
}());
699703
//# sourceMappingURL=CommentFactory.js.map
700-
var __extends = (this && this.__extends) || function (d, b) {
701-
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
702-
function __() { this.constructor = d; }
703-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
704-
};
704+
var __extends = (this && this.__extends) || (function () {
705+
var extendStatics = Object.setPrototypeOf ||
706+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
707+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
708+
return function (d, b) {
709+
extendStatics(d, b);
710+
function __() { this.constructor = d; }
711+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
712+
};
713+
})();
705714
var CommentSpaceAllocator = (function () {
706715
function CommentSpaceAllocator(width, height) {
707716
if (width === void 0) { width = 0; }
@@ -804,7 +813,7 @@ var CommentSpaceAllocator = (function () {
804813
var AnchorCommentSpaceAllocator = (function (_super) {
805814
__extends(AnchorCommentSpaceAllocator, _super);
806815
function AnchorCommentSpaceAllocator() {
807-
_super.apply(this, arguments);
816+
return _super !== null && _super.apply(this, arguments) || this;
808817
}
809818
AnchorCommentSpaceAllocator.prototype.add = function (comment) {
810819
_super.prototype.add.call(this, comment);

dist/CommentCoreLibrary.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)