feat: Modify GMLIB_BinaryStream writeVec2 method to accept an object with x and z properties
This commit is contained in:
Vendored
+3
-3
@@ -1217,10 +1217,10 @@ declare class GMLIB_BinaryStream {
|
|||||||
value: IntPos
|
value: IntPos
|
||||||
): GMLIB_BinaryStream;
|
): GMLIB_BinaryStream;
|
||||||
|
|
||||||
/** 写入方向角对象 */
|
/** */
|
||||||
writeVec2(
|
writeVec2(
|
||||||
/** 方向角对象 */
|
/** 数据 */
|
||||||
value: DirectionAngle
|
value: { "x": number, "z": number }
|
||||||
): GMLIB_BinaryStream;
|
): GMLIB_BinaryStream;
|
||||||
|
|
||||||
/** 写入字符串 */
|
/** 写入字符串 */
|
||||||
|
|||||||
+5
-5
@@ -2372,14 +2372,14 @@ class GMLIB_BinaryStream {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 写入方向角对象
|
*
|
||||||
* @param {DirectionAngle} value 方向角对象
|
* @param {{"x":number,"z":number}} value 数值
|
||||||
* @returns {GMLIB_BinaryStream}
|
* @returns {GMLIB_BinaryStream}
|
||||||
*/
|
*/
|
||||||
writeVec2({ pitch, yaw }) {
|
writeVec2({ x, z }) {
|
||||||
if (this.#destroy) throw new Error("The BinaryStream has been destroyed");
|
if (this.#destroy) throw new Error("The BinaryStream has been destroyed");
|
||||||
this.writeFloat(pitch);
|
this.writeFloat(x);
|
||||||
this.writeFloat(yaw);
|
this.writeFloat(z);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user