@mtgame/core 0.2.33 → 0.2.35
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/bundles/mtgame-core.umd.js +38 -1
- package/bundles/mtgame-core.umd.js.map +1 -1
- package/esm2015/models/basketball-game-log.js +13 -3
- package/esm2015/models/basketball-game-statistic.js +13 -1
- package/esm2015/models/basketball-statistic.js +8 -1
- package/esm2015/models/sport.js +5 -1
- package/fesm2015/mtgame-core.js +35 -2
- package/fesm2015/mtgame-core.js.map +1 -1
- package/models/basketball-game-log.d.ts +8 -2
- package/models/basketball-game-statistic.d.ts +7 -0
- package/models/basketball-statistic.d.ts +7 -0
- package/models/sport.d.ts +3 -1
- package/mtgame-core.metadata.json +1 -1
- package/package.json +1 -1
|
@@ -779,6 +779,7 @@
|
|
|
779
779
|
SportTypes[SportTypes["waterpolo"] = 19] = "waterpolo";
|
|
780
780
|
SportTypes[SportTypes["classic_waterpolo"] = 20] = "classic_waterpolo";
|
|
781
781
|
SportTypes[SportTypes["mini_waterpolo"] = 21] = "mini_waterpolo";
|
|
782
|
+
SportTypes[SportTypes["media_basket"] = 22] = "media_basket";
|
|
782
783
|
})(exports.SportTypes || (exports.SportTypes = {}));
|
|
783
784
|
exports.Sport = /** @class */ (function (_super) {
|
|
784
785
|
__extends(Sport, _super);
|
|
@@ -797,6 +798,9 @@
|
|
|
797
798
|
Sport.prototype.isBasketball1x1 = function () {
|
|
798
799
|
return this.id === exports.SportTypes.basketball_1x1;
|
|
799
800
|
};
|
|
801
|
+
Sport.prototype.isMediaBasket = function () {
|
|
802
|
+
return this.id === exports.SportTypes.media_basket;
|
|
803
|
+
};
|
|
800
804
|
Sport.prototype.isVolleyball = function () {
|
|
801
805
|
return this.id === exports.SportTypes.volleyball || this.parentId === exports.SportTypes.volleyball;
|
|
802
806
|
};
|
|
@@ -3615,6 +3619,13 @@
|
|
|
3615
3619
|
drawn_fouls: 'drawnFouls',
|
|
3616
3620
|
player_efficiency: 'playerEfficiency',
|
|
3617
3621
|
shots_blocked: 'shotsBlocked',
|
|
3622
|
+
four_point_attempts: 'fourPointAttempts',
|
|
3623
|
+
four_points_made: 'fourPointsMade',
|
|
3624
|
+
four_point_percent: 'fourPointPercent',
|
|
3625
|
+
dunk_attempts: 'dunkAttempts',
|
|
3626
|
+
dunks_made: 'dunksMade',
|
|
3627
|
+
shootouts_won: 'shootoutsWon',
|
|
3628
|
+
shootouts_lost: 'shootoutsLost',
|
|
3618
3629
|
game_time: 'gameTime',
|
|
3619
3630
|
newbie: 'newbie',
|
|
3620
3631
|
rank: 'rank',
|
|
@@ -3727,6 +3738,16 @@
|
|
|
3727
3738
|
enumerable: false,
|
|
3728
3739
|
configurable: true
|
|
3729
3740
|
});
|
|
3741
|
+
Object.defineProperty(BasketballGameStatistic.prototype, "fourPointPercent", {
|
|
3742
|
+
get: function () {
|
|
3743
|
+
if (!this.fourPointAttempts || !this.fourPointsMade) {
|
|
3744
|
+
return 0;
|
|
3745
|
+
}
|
|
3746
|
+
return Math.round(1000 * this.fourPointsMade / this.fourPointAttempts) / 10;
|
|
3747
|
+
},
|
|
3748
|
+
enumerable: false,
|
|
3749
|
+
configurable: true
|
|
3750
|
+
});
|
|
3730
3751
|
return BasketballGameStatistic;
|
|
3731
3752
|
}(BaseModel));
|
|
3732
3753
|
__decorate([
|
|
@@ -3762,6 +3783,12 @@
|
|
|
3762
3783
|
drawn_fouls: 'drawnFouls',
|
|
3763
3784
|
player_efficiency: 'playerEfficiency',
|
|
3764
3785
|
shots_blocked: 'shotsBlocked',
|
|
3786
|
+
four_point_attempts: 'fourPointAttempts',
|
|
3787
|
+
four_points_made: 'fourPointsMade',
|
|
3788
|
+
dunk_attempts: 'dunkAttempts',
|
|
3789
|
+
dunks_made: 'dunksMade',
|
|
3790
|
+
shootouts_won: 'shootoutsWon',
|
|
3791
|
+
shootouts_lost: 'shootoutsLost',
|
|
3765
3792
|
updated_at: 'updatedAt',
|
|
3766
3793
|
},
|
|
3767
3794
|
relation: {
|
|
@@ -3796,6 +3823,11 @@
|
|
|
3796
3823
|
BasketballGameLogTypes[BasketballGameLogTypes["one_point_made"] = 22] = "one_point_made";
|
|
3797
3824
|
BasketballGameLogTypes[BasketballGameLogTypes["timeout"] = 23] = "timeout";
|
|
3798
3825
|
BasketballGameLogTypes[BasketballGameLogTypes["team_rebound"] = 24] = "team_rebound";
|
|
3826
|
+
BasketballGameLogTypes[BasketballGameLogTypes["four_point_attempt"] = 25] = "four_point_attempt";
|
|
3827
|
+
BasketballGameLogTypes[BasketballGameLogTypes["four_point_made"] = 26] = "four_point_made";
|
|
3828
|
+
BasketballGameLogTypes[BasketballGameLogTypes["dunk_attempt"] = 27] = "dunk_attempt";
|
|
3829
|
+
BasketballGameLogTypes[BasketballGameLogTypes["dunk_made"] = 28] = "dunk_made";
|
|
3830
|
+
BasketballGameLogTypes[BasketballGameLogTypes["shootout"] = 29] = "shootout";
|
|
3799
3831
|
})(exports.BasketballGameLogTypes || (exports.BasketballGameLogTypes = {}));
|
|
3800
3832
|
exports.BasketballSubLogTypes = void 0;
|
|
3801
3833
|
(function (BasketballSubLogTypes) {
|
|
@@ -3871,6 +3903,8 @@
|
|
|
3871
3903
|
exports.BasketballGameLogTypes.three_point_made,
|
|
3872
3904
|
exports.BasketballGameLogTypes.free_throw_made,
|
|
3873
3905
|
exports.BasketballGameLogTypes.one_point_made,
|
|
3906
|
+
exports.BasketballGameLogTypes.four_point_made,
|
|
3907
|
+
exports.BasketballGameLogTypes.dunk_made,
|
|
3874
3908
|
].indexOf(this.logType) > -1;
|
|
3875
3909
|
};
|
|
3876
3910
|
BasketballGameLog.prototype.isReboundType = function () {
|
|
@@ -3896,8 +3930,10 @@
|
|
|
3896
3930
|
_a[exports.BasketballGameLogTypes.free_throw_made] = 1,
|
|
3897
3931
|
_a[exports.BasketballGameLogTypes.two_point_made] = 2,
|
|
3898
3932
|
_a[exports.BasketballGameLogTypes.three_point_made] = 3,
|
|
3933
|
+
_a[exports.BasketballGameLogTypes.four_point_made] = 4,
|
|
3934
|
+
_a[exports.BasketballGameLogTypes.dunk_made] = 3,
|
|
3899
3935
|
_a);
|
|
3900
|
-
return scoreMapping[this.logType];
|
|
3936
|
+
return scoreMapping[this.logType] * (this.isShootout ? 2 : 1);
|
|
3901
3937
|
};
|
|
3902
3938
|
BasketballGameLog.prototype.compare = function (model) {
|
|
3903
3939
|
if (this.time === model.time && this.period === model.period) {
|
|
@@ -3955,6 +3991,7 @@
|
|
|
3955
3991
|
group: 'group',
|
|
3956
3992
|
marked: 'marked',
|
|
3957
3993
|
coords: 'coords',
|
|
3994
|
+
is_shootout: 'isShootout',
|
|
3958
3995
|
},
|
|
3959
3996
|
relation: {
|
|
3960
3997
|
datetime: DateTimeField,
|