@serenityjs/protocol 0.4.3-beta-20240814075643 → 0.4.3-beta-20240815052641
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/index.d.ts +4 -2
- package/dist/index.js +89 -5
- package/package.json +6 -6
package/dist/index.d.ts
CHANGED
|
@@ -3851,10 +3851,12 @@ declare class CameraPreset extends DataType {
|
|
|
3851
3851
|
parent: string;
|
|
3852
3852
|
position?: Vector3f;
|
|
3853
3853
|
rotation?: Vector2f;
|
|
3854
|
+
viewOffset?: Vector2f;
|
|
3855
|
+
radius?: number;
|
|
3854
3856
|
listener?: CameraAudioListener;
|
|
3855
3857
|
effects?: boolean;
|
|
3856
|
-
constructor(name: string, parent: string, position?: Vector3f, rotation?: Vector2f, listener?: CameraAudioListener, effects?: boolean);
|
|
3857
|
-
static read(
|
|
3858
|
+
constructor(name: string, parent: string, position?: Vector3f, rotation?: Vector2f, viewOffset?: Vector2f, radius?: number, listener?: CameraAudioListener, effects?: boolean);
|
|
3859
|
+
static read(stream: BinaryStream): Array<CameraPreset>;
|
|
3858
3860
|
static write(stream: BinaryStream, presets: Array<CameraPreset>): void;
|
|
3859
3861
|
}
|
|
3860
3862
|
|
package/dist/index.js
CHANGED
|
@@ -6756,23 +6756,99 @@ var Optional = class _Optional extends import_raknet75.DataType {
|
|
|
6756
6756
|
// src/proto/types/camera-preset.ts
|
|
6757
6757
|
var import_raknet76 = require("@serenityjs/raknet");
|
|
6758
6758
|
var import_binarystream36 = require("@serenityjs/binarystream");
|
|
6759
|
-
var CameraPreset = class extends import_raknet76.DataType {
|
|
6759
|
+
var CameraPreset = class _CameraPreset extends import_raknet76.DataType {
|
|
6760
6760
|
name;
|
|
6761
6761
|
parent;
|
|
6762
6762
|
position;
|
|
6763
6763
|
rotation;
|
|
6764
|
+
viewOffset;
|
|
6765
|
+
radius;
|
|
6764
6766
|
listener;
|
|
6765
6767
|
effects;
|
|
6766
|
-
constructor(name, parent, position, rotation, listener, effects) {
|
|
6768
|
+
constructor(name, parent, position, rotation, viewOffset, radius, listener, effects) {
|
|
6767
6769
|
super();
|
|
6768
6770
|
this.name = name;
|
|
6769
6771
|
this.parent = parent;
|
|
6770
6772
|
this.position = position;
|
|
6771
6773
|
this.rotation = rotation;
|
|
6774
|
+
this.viewOffset = viewOffset;
|
|
6775
|
+
this.radius = radius;
|
|
6772
6776
|
this.listener = listener;
|
|
6773
6777
|
this.effects = effects;
|
|
6774
6778
|
}
|
|
6775
|
-
static read(
|
|
6779
|
+
static read(stream) {
|
|
6780
|
+
const size = stream.readVarInt();
|
|
6781
|
+
const presets = [];
|
|
6782
|
+
for (let index = 0; index < size; index++) {
|
|
6783
|
+
presets.push(
|
|
6784
|
+
new _CameraPreset(
|
|
6785
|
+
stream.readVarString(),
|
|
6786
|
+
stream.readVarString(),
|
|
6787
|
+
new Vector3f(
|
|
6788
|
+
Optional.read(
|
|
6789
|
+
stream,
|
|
6790
|
+
import_binarystream36.Endianness.Little,
|
|
6791
|
+
void 0,
|
|
6792
|
+
import_binarystream36.Float32
|
|
6793
|
+
),
|
|
6794
|
+
Optional.read(
|
|
6795
|
+
stream,
|
|
6796
|
+
import_binarystream36.Endianness.Little,
|
|
6797
|
+
void 0,
|
|
6798
|
+
import_binarystream36.Float32
|
|
6799
|
+
),
|
|
6800
|
+
Optional.read(
|
|
6801
|
+
stream,
|
|
6802
|
+
import_binarystream36.Endianness.Little,
|
|
6803
|
+
void 0,
|
|
6804
|
+
import_binarystream36.Float32
|
|
6805
|
+
)
|
|
6806
|
+
),
|
|
6807
|
+
new Vector2f(
|
|
6808
|
+
Optional.read(
|
|
6809
|
+
stream,
|
|
6810
|
+
import_binarystream36.Endianness.Little,
|
|
6811
|
+
void 0,
|
|
6812
|
+
import_binarystream36.Float32
|
|
6813
|
+
),
|
|
6814
|
+
Optional.read(
|
|
6815
|
+
stream,
|
|
6816
|
+
import_binarystream36.Endianness.Little,
|
|
6817
|
+
void 0,
|
|
6818
|
+
import_binarystream36.Float32
|
|
6819
|
+
)
|
|
6820
|
+
),
|
|
6821
|
+
new Vector2f(
|
|
6822
|
+
Optional.read(
|
|
6823
|
+
stream,
|
|
6824
|
+
import_binarystream36.Endianness.Little,
|
|
6825
|
+
void 0,
|
|
6826
|
+
import_binarystream36.Float32
|
|
6827
|
+
),
|
|
6828
|
+
Optional.read(
|
|
6829
|
+
stream,
|
|
6830
|
+
import_binarystream36.Endianness.Little,
|
|
6831
|
+
void 0,
|
|
6832
|
+
import_binarystream36.Float32
|
|
6833
|
+
)
|
|
6834
|
+
),
|
|
6835
|
+
Optional.read(
|
|
6836
|
+
stream,
|
|
6837
|
+
import_binarystream36.Endianness.Little,
|
|
6838
|
+
void 0,
|
|
6839
|
+
import_binarystream36.Float32
|
|
6840
|
+
),
|
|
6841
|
+
Optional.read(
|
|
6842
|
+
stream,
|
|
6843
|
+
void 0,
|
|
6844
|
+
void 0,
|
|
6845
|
+
import_binarystream36.Uint8
|
|
6846
|
+
),
|
|
6847
|
+
Optional.read(stream, void 0, void 0, import_binarystream36.Bool)
|
|
6848
|
+
)
|
|
6849
|
+
);
|
|
6850
|
+
}
|
|
6851
|
+
return presets;
|
|
6776
6852
|
}
|
|
6777
6853
|
static write(stream, presets) {
|
|
6778
6854
|
stream.writeVarInt(presets.length);
|
|
@@ -6802,18 +6878,26 @@ var CameraPreset = class extends import_raknet76.DataType {
|
|
|
6802
6878
|
);
|
|
6803
6879
|
Optional.write(
|
|
6804
6880
|
stream,
|
|
6805
|
-
preset.
|
|
6881
|
+
preset.rotation?.x,
|
|
6806
6882
|
import_binarystream36.Endianness.Little,
|
|
6807
6883
|
null,
|
|
6808
6884
|
import_binarystream36.Float32
|
|
6809
6885
|
);
|
|
6810
6886
|
Optional.write(
|
|
6811
6887
|
stream,
|
|
6812
|
-
preset.
|
|
6888
|
+
preset.rotation?.y,
|
|
6813
6889
|
import_binarystream36.Endianness.Little,
|
|
6814
6890
|
null,
|
|
6815
6891
|
import_binarystream36.Float32
|
|
6816
6892
|
);
|
|
6893
|
+
Optional.write(
|
|
6894
|
+
stream,
|
|
6895
|
+
preset.viewOffset,
|
|
6896
|
+
import_binarystream36.Endianness.Little,
|
|
6897
|
+
null,
|
|
6898
|
+
Vector2f
|
|
6899
|
+
);
|
|
6900
|
+
Optional.write(stream, preset.radius, import_binarystream36.Endianness.Little, null, import_binarystream36.Float32);
|
|
6817
6901
|
Optional.write(stream, preset.listener, void 0, null, import_binarystream36.Uint8);
|
|
6818
6902
|
Optional.write(stream, preset.effects, void 0, null, import_binarystream36.Bool);
|
|
6819
6903
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@serenityjs/protocol",
|
|
3
|
-
"version": "0.4.3-beta-
|
|
3
|
+
"version": "0.4.3-beta-20240815052641",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"repository": "https://github.com/SerenityJS/serenity",
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
"preset": "@serenityjs/jest-presets/jest/node"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@serenityjs/eslint-config": "0.4.3-beta-
|
|
22
|
-
"@serenityjs/jest-presets": "0.4.3-beta-
|
|
23
|
-
"@serenityjs/typescript-config": "0.4.3-beta-
|
|
21
|
+
"@serenityjs/eslint-config": "0.4.3-beta-20240815052641",
|
|
22
|
+
"@serenityjs/jest-presets": "0.4.3-beta-20240815052641",
|
|
23
|
+
"@serenityjs/typescript-config": "0.4.3-beta-20240815052641",
|
|
24
24
|
"@types/jest": "^29.5.12",
|
|
25
25
|
"@types/node": "^20.11.24",
|
|
26
26
|
"jest": "^29.7.0",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@serenityjs/binarystream": "^2.6.6",
|
|
32
|
-
"@serenityjs/nbt": "0.4.3-beta-
|
|
33
|
-
"@serenityjs/raknet": "0.4.3-beta-
|
|
32
|
+
"@serenityjs/nbt": "0.4.3-beta-20240815052641",
|
|
33
|
+
"@serenityjs/raknet": "0.4.3-beta-20240815052641"
|
|
34
34
|
}
|
|
35
35
|
}
|