node-insim
Version:
An InSim library for NodeJS with TypeScript support
51 lines (50 loc) • 1.7 kB
TypeScript
import { SendablePacket } from './base';
import type { StateFlags, ViewIdentifier } from './enums';
import { PacketType } from './enums';
import type { PacketData } from './types';
/**
* Cam Pos Pack - Full camera packet (in car OR SHIFT+U mode)
*
* A Camera Position Packet can be used for LFS to report a camera position and state.
* An InSim program can also send one to set LFS camera position in game or SHIFT+U mode.
*/
export declare class IS_CPP extends SendablePacket {
readonly Size = 32;
readonly Type = PacketType.ISP_CPP;
/** Instruction: 0 / or reply: ReqI as received in the {@link TINY_SCP} */
ReqI: number;
readonly Zero = 0;
/** Position vector X coordinate - 65536 means 1 metre */
X: number;
/** Position vector Y coordinate - 65536 means 1 metre */
Y: number;
/** Position vector Z coordinate - 65536 means 1 metre */
Z: number;
/** Heading - 0 points along Y axis */
H: number;
/** Pitch */
P: number;
/** Roll */
R: number;
/**
* Unique ID of viewed player (0 = none).
*
* Set this to 255 to leave that option unchanged.
*/
ViewPLID: number;
/**
* InGameCam (as reported in StatePack).
*
* Set this to 255 to leave that option unchanged.
*/
InGameCam: ViewIdentifier;
/** FOV in degrees */
FOV: number;
/** Time in ms to get there (0 means instant) */
Time: number;
/** ISS state flags */
Flags: AllowedStateFlags | 0;
constructor(data?: IS_CPP_Data);
}
export type IS_CPP_Data = PacketData<IS_CPP>;
export type AllowedStateFlags = StateFlags.ISS_SHIFTU | StateFlags.ISS_SHIFTU_FOLLOW | StateFlags.ISS_VIEW_OVERRIDE;