@mtgame/core 0.2.33 → 0.2.34
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 +35 -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 +2 -1
- package/fesm2015/mtgame-core.js +32 -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 +2 -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);
|
|
@@ -3615,6 +3616,13 @@
|
|
|
3615
3616
|
drawn_fouls: 'drawnFouls',
|
|
3616
3617
|
player_efficiency: 'playerEfficiency',
|
|
3617
3618
|
shots_blocked: 'shotsBlocked',
|
|
3619
|
+
four_point_attempts: 'fourPointAttempts',
|
|
3620
|
+
four_points_made: 'fourPointsMade',
|
|
3621
|
+
four_point_percent: 'fourPointPercent',
|
|
3622
|
+
dunk_attempts: 'dunkAttempts',
|
|
3623
|
+
dunks_made: 'dunksMade',
|
|
3624
|
+
shootouts_won: 'shootoutsWon',
|
|
3625
|
+
shootouts_lost: 'shootoutsLost',
|
|
3618
3626
|
game_time: 'gameTime',
|
|
3619
3627
|
newbie: 'newbie',
|
|
3620
3628
|
rank: 'rank',
|
|
@@ -3727,6 +3735,16 @@
|
|
|
3727
3735
|
enumerable: false,
|
|
3728
3736
|
configurable: true
|
|
3729
3737
|
});
|
|
3738
|
+
Object.defineProperty(BasketballGameStatistic.prototype, "fourPointPercent", {
|
|
3739
|
+
get: function () {
|
|
3740
|
+
if (!this.fourPointAttempts || !this.fourPointsMade) {
|
|
3741
|
+
return 0;
|
|
3742
|
+
}
|
|
3743
|
+
return Math.round(1000 * this.fourPointsMade / this.fourPointAttempts) / 10;
|
|
3744
|
+
},
|
|
3745
|
+
enumerable: false,
|
|
3746
|
+
configurable: true
|
|
3747
|
+
});
|
|
3730
3748
|
return BasketballGameStatistic;
|
|
3731
3749
|
}(BaseModel));
|
|
3732
3750
|
__decorate([
|
|
@@ -3762,6 +3780,12 @@
|
|
|
3762
3780
|
drawn_fouls: 'drawnFouls',
|
|
3763
3781
|
player_efficiency: 'playerEfficiency',
|
|
3764
3782
|
shots_blocked: 'shotsBlocked',
|
|
3783
|
+
four_point_attempts: 'fourPointAttempts',
|
|
3784
|
+
four_points_made: 'fourPointsMade',
|
|
3785
|
+
dunk_attempts: 'dunkAttempts',
|
|
3786
|
+
dunks_made: 'dunksMade',
|
|
3787
|
+
shootouts_won: 'shootoutsWon',
|
|
3788
|
+
shootouts_lost: 'shootoutsLost',
|
|
3765
3789
|
updated_at: 'updatedAt',
|
|
3766
3790
|
},
|
|
3767
3791
|
relation: {
|
|
@@ -3796,6 +3820,11 @@
|
|
|
3796
3820
|
BasketballGameLogTypes[BasketballGameLogTypes["one_point_made"] = 22] = "one_point_made";
|
|
3797
3821
|
BasketballGameLogTypes[BasketballGameLogTypes["timeout"] = 23] = "timeout";
|
|
3798
3822
|
BasketballGameLogTypes[BasketballGameLogTypes["team_rebound"] = 24] = "team_rebound";
|
|
3823
|
+
BasketballGameLogTypes[BasketballGameLogTypes["four_point_attempt"] = 25] = "four_point_attempt";
|
|
3824
|
+
BasketballGameLogTypes[BasketballGameLogTypes["four_point_made"] = 26] = "four_point_made";
|
|
3825
|
+
BasketballGameLogTypes[BasketballGameLogTypes["dunk_attempt"] = 27] = "dunk_attempt";
|
|
3826
|
+
BasketballGameLogTypes[BasketballGameLogTypes["dunk_made"] = 28] = "dunk_made";
|
|
3827
|
+
BasketballGameLogTypes[BasketballGameLogTypes["shootout"] = 29] = "shootout";
|
|
3799
3828
|
})(exports.BasketballGameLogTypes || (exports.BasketballGameLogTypes = {}));
|
|
3800
3829
|
exports.BasketballSubLogTypes = void 0;
|
|
3801
3830
|
(function (BasketballSubLogTypes) {
|
|
@@ -3871,6 +3900,8 @@
|
|
|
3871
3900
|
exports.BasketballGameLogTypes.three_point_made,
|
|
3872
3901
|
exports.BasketballGameLogTypes.free_throw_made,
|
|
3873
3902
|
exports.BasketballGameLogTypes.one_point_made,
|
|
3903
|
+
exports.BasketballGameLogTypes.four_point_made,
|
|
3904
|
+
exports.BasketballGameLogTypes.dunk_made,
|
|
3874
3905
|
].indexOf(this.logType) > -1;
|
|
3875
3906
|
};
|
|
3876
3907
|
BasketballGameLog.prototype.isReboundType = function () {
|
|
@@ -3896,8 +3927,10 @@
|
|
|
3896
3927
|
_a[exports.BasketballGameLogTypes.free_throw_made] = 1,
|
|
3897
3928
|
_a[exports.BasketballGameLogTypes.two_point_made] = 2,
|
|
3898
3929
|
_a[exports.BasketballGameLogTypes.three_point_made] = 3,
|
|
3930
|
+
_a[exports.BasketballGameLogTypes.four_point_made] = 4,
|
|
3931
|
+
_a[exports.BasketballGameLogTypes.dunk_made] = 3,
|
|
3899
3932
|
_a);
|
|
3900
|
-
return scoreMapping[this.logType];
|
|
3933
|
+
return scoreMapping[this.logType] * (this.isShootout ? 2 : 1);
|
|
3901
3934
|
};
|
|
3902
3935
|
BasketballGameLog.prototype.compare = function (model) {
|
|
3903
3936
|
if (this.time === model.time && this.period === model.period) {
|
|
@@ -3955,6 +3988,7 @@
|
|
|
3955
3988
|
group: 'group',
|
|
3956
3989
|
marked: 'marked',
|
|
3957
3990
|
coords: 'coords',
|
|
3991
|
+
is_shootout: 'isShootout',
|
|
3958
3992
|
},
|
|
3959
3993
|
relation: {
|
|
3960
3994
|
datetime: DateTimeField,
|