@nativewrappers/fivem 0.0.42 → 0.0.44

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.
Files changed (438) hide show
  1. package/{client/Audio.d.ts → Audio.d.ts} +3 -3
  2. package/{client/Audio.js → Audio.js} +44 -43
  3. package/{client/Blip.d.ts → Blip.d.ts} +3 -3
  4. package/{client/Blip.js → Blip.js} +4 -3
  5. package/{client/Camera.d.ts → Camera.d.ts} +4 -4
  6. package/{client/Camera.js → Camera.js} +18 -17
  7. package/{client/Checkpoint.d.ts → Checkpoint.d.ts} +2 -2
  8. package/{client/Checkpoint.js → Checkpoint.js} +7 -6
  9. package/{client/Events.js → Events.js} +23 -23
  10. package/{client/Game.d.ts → Game.d.ts} +4 -3
  11. package/{client/Game.js → Game.js} +16 -10
  12. package/{client/GameplayCamera.d.ts → GameplayCamera.d.ts} +2 -2
  13. package/{client/GameplayCamera.js → GameplayCamera.js} +2 -2
  14. package/{client/Model.d.ts → Model.d.ts} +4 -2
  15. package/{client/Model.js → Model.js} +19 -5
  16. package/{client/NetworkedScene.d.ts → NetworkedScene.d.ts} +2 -2
  17. package/{client/NetworkedScene.js → NetworkedScene.js} +1 -0
  18. package/{client/ParticleEffect.d.ts → ParticleEffect.d.ts} +3 -3
  19. package/{client/ParticleEffect.js → ParticleEffect.js} +11 -8
  20. package/{client/ParticleEffectAsset.d.ts → ParticleEffectAsset.d.ts} +3 -3
  21. package/{client/ParticleEffectAsset.js → ParticleEffectAsset.js} +4 -3
  22. package/{client/Pickup.d.ts → Pickup.d.ts} +1 -1
  23. package/{client/Pickup.js → Pickup.js} +2 -1
  24. package/{client/Raycast.d.ts → Raycast.d.ts} +3 -3
  25. package/{client/Raycast.js → Raycast.js} +10 -3
  26. package/{client/RelationshipGroup.d.ts → RelationshipGroup.d.ts} +1 -1
  27. package/{client/RelationshipGroup.js → RelationshipGroup.js} +4 -0
  28. package/{client/Rope.d.ts → Rope.d.ts} +2 -2
  29. package/{client/Rope.js → Rope.js} +6 -2
  30. package/{client/TaskSequence.d.ts → TaskSequence.d.ts} +1 -1
  31. package/{client/TaskSequence.js → TaskSequence.js} +5 -2
  32. package/{client/Tasks.d.ts → Tasks.d.ts} +5 -5
  33. package/{client/Tasks.js → Tasks.js} +7 -6
  34. package/{client/World.d.ts → World.d.ts} +20 -12
  35. package/{client/World.js → World.js} +66 -62
  36. package/{client/cfx → cfx}/index.d.ts +1 -1
  37. package/{client/enums → enums}/RaycastEnums.js +3 -1
  38. package/enums/index.d.ts +42 -0
  39. package/enums/index.js +42 -0
  40. package/hashes/index.d.ts +5 -0
  41. package/hashes/index.js +5 -0
  42. package/index.d.ts +24 -0
  43. package/index.js +25 -0
  44. package/{client/interfaces → interfaces}/Dimensions.d.ts +1 -1
  45. package/{client/models → models}/BaseEntity.d.ts +26 -26
  46. package/{client/models → models}/BaseEntity.js +32 -30
  47. package/{client/models → models}/EntityBone.d.ts +2 -2
  48. package/{client/models → models}/EntityBone.js +4 -2
  49. package/{client/models → models}/EntityBoneCollection.d.ts +2 -2
  50. package/{client/models → models}/EntityBoneCollection.js +5 -2
  51. package/{client/models → models}/Ped.d.ts +20 -9
  52. package/{client/models → models}/Ped.js +66 -56
  53. package/{client/models → models}/PedBone.d.ts +2 -2
  54. package/{client/models → models}/PedBone.js +1 -1
  55. package/{client/models → models}/PedBoneCollection.d.ts +1 -1
  56. package/{client/models → models}/PedBoneCollection.js +4 -2
  57. package/{client/models → models}/Player.d.ts +3 -3
  58. package/{client/models → models}/Player.js +12 -9
  59. package/{client/models → models}/Prop.d.ts +2 -2
  60. package/{client/models → models}/Prop.js +4 -4
  61. package/{client/models → models}/Vehicle.d.ts +6 -6
  62. package/{client/models → models}/Vehicle.js +22 -16
  63. package/{client/models → models}/VehicleDoor.d.ts +2 -2
  64. package/{client/models → models}/VehicleDoor.js +2 -0
  65. package/{client/models → models}/VehicleDoorCollection.d.ts +3 -3
  66. package/{client/models → models}/VehicleDoorCollection.js +16 -15
  67. package/{client/models → models}/VehicleMod.d.ts +2 -2
  68. package/{client/models → models}/VehicleMod.js +2 -0
  69. package/{client/models → models}/VehicleModCollection.d.ts +5 -5
  70. package/{client/models → models}/VehicleModCollection.js +20 -19
  71. package/{client/models → models}/VehicleToggleMod.d.ts +2 -2
  72. package/{client/models → models}/VehicleToggleMod.js +2 -0
  73. package/{client/models → models}/VehicleWheel.d.ts +1 -1
  74. package/{client/models → models}/VehicleWheel.js +2 -0
  75. package/{client/models → models}/VehicleWheelCollection.d.ts +3 -3
  76. package/{client/models → models}/VehicleWheelCollection.js +15 -14
  77. package/{client/models → models}/VehicleWindow.d.ts +2 -2
  78. package/{client/models → models}/VehicleWindow.js +2 -0
  79. package/{client/models → models}/VehicleWindowCollection.d.ts +3 -3
  80. package/{client/models → models}/VehicleWindowCollection.js +13 -12
  81. package/models/index.d.ts +18 -0
  82. package/models/index.js +19 -0
  83. package/package.json +6 -30
  84. package/{client/ui → ui}/Container.d.ts +2 -2
  85. package/{client/ui → ui}/Container.js +6 -3
  86. package/{client/ui → ui}/Effects.d.ts +1 -1
  87. package/ui/Effects.js +106 -0
  88. package/{client/ui → ui}/Fading.js +2 -2
  89. package/{client/ui → ui}/Hud.d.ts +2 -2
  90. package/{client/ui → ui}/Hud.js +1 -1
  91. package/{client/ui → ui}/InstructionalButtons.d.ts +1 -1
  92. package/{client/ui → ui}/InstructionalButtons.js +8 -7
  93. package/{client/ui → ui}/LoadingPrompt.d.ts +1 -1
  94. package/{client/ui → ui}/LoadingPrompt.js +5 -5
  95. package/{client/ui → ui}/Notification.js +1 -0
  96. package/{client/ui → ui}/Rectangle.d.ts +2 -2
  97. package/{client/ui → ui}/Rectangle.js +5 -2
  98. package/{client/ui → ui}/Scaleform.d.ts +1 -1
  99. package/{client/ui → ui}/Scaleform.js +10 -8
  100. package/{client/ui → ui}/Screen.d.ts +3 -3
  101. package/{client/ui → ui}/Screen.js +13 -13
  102. package/{client/ui → ui}/Sprite.d.ts +1 -1
  103. package/{client/ui → ui}/Sprite.js +10 -3
  104. package/{client/ui → ui}/Text.d.ts +3 -3
  105. package/{client/ui → ui}/Text.js +19 -7
  106. package/{client/ui → ui}/Timerbar.d.ts +1 -1
  107. package/{client/ui → ui}/Timerbar.js +37 -30
  108. package/ui/index.d.ts +15 -0
  109. package/ui/index.js +15 -0
  110. package/{client/ui → ui}/interfaces/IButton.d.ts +1 -1
  111. package/{client/ui → ui}/interfaces/IDrawable.d.ts +1 -1
  112. package/ui/interfaces/index.d.ts +2 -0
  113. package/{client/ui → ui}/menu/Menu.d.ts +4 -4
  114. package/{client/ui → ui}/menu/Menu.js +96 -67
  115. package/{client/ui → ui}/menu/MenuControl.js +1 -0
  116. package/{client/ui → ui}/menu/MenuControls.d.ts +1 -1
  117. package/ui/menu/MenuControls.js +9 -0
  118. package/{client/ui → ui}/menu/MenuSettings.d.ts +1 -1
  119. package/ui/menu/MenuSettings.js +54 -0
  120. package/ui/menu/index.d.ts +6 -0
  121. package/ui/menu/index.js +6 -0
  122. package/{client/ui → ui}/menu/items/UIMenuCheckboxItem.d.ts +3 -3
  123. package/{client/ui → ui}/menu/items/UIMenuCheckboxItem.js +17 -15
  124. package/{client/ui → ui}/menu/items/UIMenuItem.d.ts +4 -4
  125. package/{client/ui → ui}/menu/items/UIMenuItem.js +276 -255
  126. package/{client/ui → ui}/menu/items/UIMenuListItem.d.ts +3 -3
  127. package/{client/ui → ui}/menu/items/UIMenuListItem.js +28 -19
  128. package/{client/ui → ui}/menu/items/UIMenuSeparatorItem.d.ts +1 -1
  129. package/{client/ui → ui}/menu/items/UIMenuSeparatorItem.js +10 -10
  130. package/{client/ui → ui}/menu/items/UIMenuSliderItem.d.ts +3 -3
  131. package/{client/ui → ui}/menu/items/UIMenuSliderItem.js +45 -27
  132. package/ui/menu/items/index.d.ts +6 -0
  133. package/ui/menu/items/index.js +6 -0
  134. package/{client/ui → ui}/menu/items/panels/AbstractUIMenuPanel.d.ts +3 -3
  135. package/{client/ui → ui}/menu/items/panels/AbstractUIMenuPanel.js +9 -8
  136. package/{client/ui → ui}/menu/items/panels/UIMenuColorPanel.d.ts +3 -3
  137. package/{client/ui → ui}/menu/items/panels/UIMenuColorPanel.js +29 -23
  138. package/{client/ui → ui}/menu/items/panels/UIMenuGridPanel.d.ts +3 -3
  139. package/{client/ui → ui}/menu/items/panels/UIMenuGridPanel.js +86 -40
  140. package/{client/ui → ui}/menu/items/panels/UIMenuPercentagePanel.d.ts +2 -2
  141. package/{client/ui → ui}/menu/items/panels/UIMenuPercentagePanel.js +27 -18
  142. package/{client/ui → ui}/menu/items/panels/UIMenuStatisticsPanel.d.ts +2 -2
  143. package/{client/ui → ui}/menu/items/panels/UIMenuStatisticsPanel.js +10 -8
  144. package/{client/ui → ui}/menu/items/panels/UIMenuStatisticsPanelItem.d.ts +1 -1
  145. package/{client/ui → ui}/menu/items/panels/UIMenuStatisticsPanelItem.js +10 -7
  146. package/ui/menu/items/panels/index.d.ts +6 -0
  147. package/ui/menu/items/panels/index.js +6 -0
  148. package/{client/ui → ui}/menu/modules/ListItem.js +4 -2
  149. package/ui/menu/modules/index.d.ts +1 -0
  150. package/ui/menu/modules/index.js +1 -0
  151. package/{client/utils → utils}/Animations.js +2 -2
  152. package/{client/utils → utils}/Crypto.js +5 -5
  153. package/{client/utils → utils}/LiteEvent.js +3 -5
  154. package/{client/utils → utils}/Point.js +5 -3
  155. package/{common/utils → utils}/PointF.js +3 -0
  156. package/{client/utils → utils}/Quaternion.d.ts +1 -1
  157. package/{client/utils → utils}/Quaternion.js +5 -1
  158. package/{client/utils → utils}/Size.js +2 -0
  159. package/{client/utils → utils}/String.d.ts +1 -1
  160. package/{client/utils → utils}/String.js +3 -3
  161. package/{client/utils → utils}/enumValues.js +2 -2
  162. package/{client/utils → utils}/getStringFromUInt8Array.js +1 -1
  163. package/utils/index.d.ts +9 -0
  164. package/utils/index.js +9 -0
  165. package/{client/weapon → weapon}/DlcWeaponData.d.ts +1 -1
  166. package/{client/weapon → weapon}/DlcWeaponData.js +3 -3
  167. package/{client/weapon → weapon}/Weapon.d.ts +10 -10
  168. package/{client/weapon → weapon}/Weapon.js +17 -14
  169. package/{client/weapon → weapon}/WeaponAsset.d.ts +1 -1
  170. package/{client/weapon → weapon}/WeaponAsset.js +4 -3
  171. package/{client/weapon → weapon}/WeaponCollection.d.ts +3 -3
  172. package/{client/weapon → weapon}/WeaponCollection.js +4 -3
  173. package/{client/weapon → weapon}/WeaponDisplayNameByHash.d.ts +1 -1
  174. package/weapon/WeaponDisplayNameByHash.js +75 -0
  175. package/{client/weapon → weapon}/WeaponHudStats.d.ts +1 -1
  176. package/{client/weapon → weapon}/WeaponHudStats.js +4 -4
  177. package/weapon/index.d.ts +8 -0
  178. package/weapon/index.js +8 -0
  179. package/{client/weaponComponent → weaponComponent}/ComponentAttachmentPointByHash.d.ts +2 -2
  180. package/{client/weaponComponent → weaponComponent}/ComponentAttachmentPointByHash.js +355 -91
  181. package/{client/weaponComponent → weaponComponent}/ComponentDisplayNameByHash.d.ts +1 -1
  182. package/weaponComponent/ComponentDisplayNameByHash.js +280 -0
  183. package/{client/weaponComponent → weaponComponent}/DlcWeaponComponentData.d.ts +1 -1
  184. package/{client/weaponComponent → weaponComponent}/DlcWeaponComponentData.js +2 -2
  185. package/{client/weaponComponent → weaponComponent}/InvalidWeaponComponent.d.ts +4 -4
  186. package/{client/weaponComponent → weaponComponent}/InvalidWeaponComponent.js +5 -5
  187. package/{client/weaponComponent → weaponComponent}/WeaponComponent.d.ts +6 -6
  188. package/{client/weaponComponent → weaponComponent}/WeaponComponent.js +15 -11
  189. package/{client/weaponComponent → weaponComponent}/WeaponComponentCollection.d.ts +4 -4
  190. package/{client/weaponComponent → weaponComponent}/WeaponComponentCollection.js +13 -11
  191. package/{client/weaponComponent → weaponComponent}/WeaponComponentHashesByWeaponHash.d.ts +2 -2
  192. package/{client/weaponComponent → weaponComponent}/WeaponComponentHashesByWeaponHash.js +13 -7
  193. package/{client/weaponComponent → weaponComponent}/WeaponComponentHudStats.d.ts +1 -1
  194. package/{client/weaponComponent → weaponComponent}/WeaponComponentHudStats.js +4 -4
  195. package/weaponComponent/index.d.ts +5 -0
  196. package/weaponComponent/index.js +5 -0
  197. package/README.md +0 -41
  198. package/client/enums/index.d.ts +0 -42
  199. package/client/enums/index.js +0 -42
  200. package/client/hashes/index.d.ts +0 -5
  201. package/client/hashes/index.js +0 -5
  202. package/client/index.d.ts +0 -24
  203. package/client/index.js +0 -25
  204. package/client/models/index.d.ts +0 -18
  205. package/client/models/index.js +0 -19
  206. package/client/ui/Effects.js +0 -106
  207. package/client/ui/index.d.ts +0 -15
  208. package/client/ui/index.js +0 -15
  209. package/client/ui/interfaces/index.d.ts +0 -2
  210. package/client/ui/menu/MenuControls.js +0 -11
  211. package/client/ui/menu/MenuSettings.js +0 -51
  212. package/client/ui/menu/index.d.ts +0 -6
  213. package/client/ui/menu/index.js +0 -6
  214. package/client/ui/menu/items/index.d.ts +0 -6
  215. package/client/ui/menu/items/index.js +0 -6
  216. package/client/ui/menu/items/panels/index.d.ts +0 -6
  217. package/client/ui/menu/items/panels/index.js +0 -6
  218. package/client/ui/menu/modules/index.d.ts +0 -1
  219. package/client/ui/menu/modules/index.js +0 -1
  220. package/client/utils/PointF.js +0 -11
  221. package/client/utils/index.d.ts +0 -9
  222. package/client/utils/index.js +0 -9
  223. package/client/weapon/WeaponDisplayNameByHash.js +0 -75
  224. package/client/weapon/index.d.ts +0 -8
  225. package/client/weapon/index.js +0 -8
  226. package/client/weaponComponent/ComponentDisplayNameByHash.js +0 -280
  227. package/client/weaponComponent/index.d.ts +0 -5
  228. package/client/weaponComponent/index.js +0 -5
  229. package/common/Convar.d.ts +0 -8
  230. package/common/Convar.js +0 -20
  231. package/common/Kvp.d.ts +0 -91
  232. package/common/Kvp.js +0 -161
  233. package/common/Resource.d.ts +0 -14
  234. package/common/Resource.js +0 -35
  235. package/common/index.d.ts +0 -5
  236. package/common/index.js +0 -5
  237. package/common/types.d.ts +0 -5
  238. package/common/types.js +0 -1
  239. package/common/utils/ClassTypes.d.ts +0 -11
  240. package/common/utils/ClassTypes.js +0 -12
  241. package/common/utils/Color.d.ts +0 -14
  242. package/common/utils/Color.js +0 -21
  243. package/common/utils/Maths.d.ts +0 -4
  244. package/common/utils/Maths.js +0 -10
  245. package/common/utils/PointF.d.ts +0 -12
  246. package/common/utils/Quaternion.d.ts +0 -10
  247. package/common/utils/Quaternion.js +0 -23
  248. package/common/utils/Vector.d.ts +0 -390
  249. package/common/utils/Vector.js +0 -546
  250. package/common/utils/Vector2.d.ts +0 -1
  251. package/common/utils/Vector2.js +0 -1
  252. package/common/utils/Vector3.d.ts +0 -1
  253. package/common/utils/Vector3.js +0 -1
  254. package/common/utils/Vector4.d.ts +0 -1
  255. package/common/utils/Vector4.js +0 -1
  256. package/common/utils/cleanPlayerName.d.ts +0 -6
  257. package/common/utils/cleanPlayerName.js +0 -27
  258. package/common/utils/enumValues.d.ts +0 -12
  259. package/common/utils/enumValues.js +0 -14
  260. package/common/utils/getStringFromUInt8Array.d.ts +0 -8
  261. package/common/utils/getStringFromUInt8Array.js +0 -10
  262. package/common/utils/getUInt32FromUint8Array.d.ts +0 -8
  263. package/common/utils/getUInt32FromUint8Array.js +0 -8
  264. package/common/utils/index.d.ts +0 -12
  265. package/common/utils/index.js +0 -12
  266. package/server/Events.d.ts +0 -16
  267. package/server/Events.js +0 -79
  268. package/server/Game.d.ts +0 -25
  269. package/server/Game.js +0 -55
  270. package/server/cfx/StateBagChangeHandler.d.ts +0 -3
  271. package/server/cfx/StateBagChangeHandler.js +0 -1
  272. package/server/cfx/index.d.ts +0 -6
  273. package/server/cfx/index.js +0 -1
  274. package/server/entities/BaseEntity.d.ts +0 -47
  275. package/server/entities/BaseEntity.js +0 -109
  276. package/server/entities/Entity.d.ts +0 -6
  277. package/server/entities/Entity.js +0 -12
  278. package/server/entities/Ped.d.ts +0 -32
  279. package/server/entities/Ped.js +0 -81
  280. package/server/entities/Player.d.ts +0 -63
  281. package/server/entities/Player.js +0 -135
  282. package/server/entities/Prop.d.ts +0 -14
  283. package/server/entities/Prop.js +0 -32
  284. package/server/entities/Vehicle.d.ts +0 -67
  285. package/server/entities/Vehicle.js +0 -175
  286. package/server/entities/index.d.ts +0 -5
  287. package/server/entities/index.js +0 -5
  288. package/server/enum/PopulationType.d.ts +0 -13
  289. package/server/enum/PopulationType.js +0 -14
  290. package/server/enum/VehicleLockStatus.d.ts +0 -9
  291. package/server/enum/VehicleLockStatus.js +0 -10
  292. package/server/enum/VehicleType.d.ts +0 -10
  293. package/server/enum/VehicleType.js +0 -11
  294. package/server/enum/eEntityType.d.ts +0 -5
  295. package/server/enum/eEntityType.js +0 -6
  296. package/server/enum/index.d.ts +0 -4
  297. package/server/enum/index.js +0 -4
  298. package/server/index.d.ts +0 -7
  299. package/server/index.js +0 -7
  300. package/server/type/Anticheat.d.ts +0 -153
  301. package/server/type/Anticheat.js +0 -1
  302. package/server/type/Hash.d.ts +0 -1
  303. package/server/type/Hash.js +0 -1
  304. package/server/utils/index.d.ts +0 -1
  305. package/server/utils/index.js +0 -1
  306. /package/{client/Events.d.ts → Events.d.ts} +0 -0
  307. /package/{client/cfx → cfx}/StateBagChangeHandler.d.ts +0 -0
  308. /package/{client/cfx → cfx}/StateBagChangeHandler.js +0 -0
  309. /package/{client/cfx → cfx}/index.js +0 -0
  310. /package/{client/enums → enums}/Alignment.d.ts +0 -0
  311. /package/{client/enums → enums}/Alignment.js +0 -0
  312. /package/{client/enums → enums}/AnimationFlags.d.ts +0 -0
  313. /package/{client/enums → enums}/AnimationFlags.js +0 -0
  314. /package/{client/enums → enums}/AudioFlag.d.ts +0 -0
  315. /package/{client/enums → enums}/AudioFlag.js +0 -0
  316. /package/{client/enums → enums}/BadgeStyle.d.ts +0 -0
  317. /package/{client/enums → enums}/BadgeStyle.js +0 -0
  318. /package/{client/enums → enums}/Blip.d.ts +0 -0
  319. /package/{client/enums → enums}/Blip.js +0 -0
  320. /package/{client/enums → enums}/Bone.d.ts +0 -0
  321. /package/{client/enums → enums}/Bone.js +0 -0
  322. /package/{client/enums → enums}/CameraShake.d.ts +0 -0
  323. /package/{client/enums → enums}/CameraShake.js +0 -0
  324. /package/{client/enums → enums}/CameraTypes.d.ts +0 -0
  325. /package/{client/enums → enums}/CameraTypes.js +0 -0
  326. /package/{client/enums → enums}/CheckboxStyle.d.ts +0 -0
  327. /package/{client/enums → enums}/CheckboxStyle.js +0 -0
  328. /package/{client/enums → enums}/Checkpoint.d.ts +0 -0
  329. /package/{client/enums → enums}/Checkpoint.js +0 -0
  330. /package/{client/enums → enums}/CloudHat.d.ts +0 -0
  331. /package/{client/enums → enums}/CloudHat.js +0 -0
  332. /package/{client/enums → enums}/Control.d.ts +0 -0
  333. /package/{client/enums → enums}/Control.js +0 -0
  334. /package/{client/enums → enums}/CursorSprite.d.ts +0 -0
  335. /package/{client/enums → enums}/CursorSprite.js +0 -0
  336. /package/{client/enums → enums}/Driving.d.ts +0 -0
  337. /package/{client/enums → enums}/Driving.js +0 -0
  338. /package/{client/enums → enums}/ExplosionType.d.ts +0 -0
  339. /package/{client/enums → enums}/ExplosionType.js +0 -0
  340. /package/{client/enums → enums}/FiringPattern.d.ts +0 -0
  341. /package/{client/enums → enums}/FiringPattern.js +0 -0
  342. /package/{client/enums → enums}/Font.d.ts +0 -0
  343. /package/{client/enums → enums}/Font.js +0 -0
  344. /package/{client/enums → enums}/ForceType.d.ts +0 -0
  345. /package/{client/enums → enums}/ForceType.js +0 -0
  346. /package/{client/enums → enums}/Gender.d.ts +0 -0
  347. /package/{client/enums → enums}/Gender.js +0 -0
  348. /package/{client/enums → enums}/HelmetType.d.ts +0 -0
  349. /package/{client/enums → enums}/HelmetType.js +0 -0
  350. /package/{client/enums → enums}/HudColor.d.ts +0 -0
  351. /package/{client/enums → enums}/HudColor.js +0 -0
  352. /package/{client/enums → enums}/HudComponent.d.ts +0 -0
  353. /package/{client/enums → enums}/HudComponent.js +0 -0
  354. /package/{client/enums → enums}/InputMode.d.ts +0 -0
  355. /package/{client/enums → enums}/InputMode.js +0 -0
  356. /package/{client/enums → enums}/InvertAxis.d.ts +0 -0
  357. /package/{client/enums → enums}/InvertAxis.js +0 -0
  358. /package/{client/enums → enums}/Language.d.ts +0 -0
  359. /package/{client/enums → enums}/Language.js +0 -0
  360. /package/{client/enums → enums}/LeaveVehicleFlags.d.ts +0 -0
  361. /package/{client/enums → enums}/LeaveVehicleFlags.js +0 -0
  362. /package/{client/enums → enums}/LoadingSpinnerType.d.ts +0 -0
  363. /package/{client/enums → enums}/LoadingSpinnerType.js +0 -0
  364. /package/{client/enums → enums}/MarkerType.d.ts +0 -0
  365. /package/{client/enums → enums}/MarkerType.js +0 -0
  366. /package/{client/enums → enums}/MenuAlignment.d.ts +0 -0
  367. /package/{client/enums → enums}/MenuAlignment.js +0 -0
  368. /package/{client/enums → enums}/NotificationType.d.ts +0 -0
  369. /package/{client/enums → enums}/NotificationType.js +0 -0
  370. /package/{client/enums → enums}/Parachute.d.ts +0 -0
  371. /package/{client/enums → enums}/Parachute.js +0 -0
  372. /package/{client/enums → enums}/PickupType.d.ts +0 -0
  373. /package/{client/enums → enums}/PickupType.js +0 -0
  374. /package/{client/enums → enums}/RadioStation.d.ts +0 -0
  375. /package/{client/enums → enums}/RadioStation.js +0 -0
  376. /package/{client/enums → enums}/RagdollType.d.ts +0 -0
  377. /package/{client/enums → enums}/RagdollType.js +0 -0
  378. /package/{client/enums → enums}/RaycastEnums.d.ts +0 -0
  379. /package/{client/enums → enums}/Relationship.d.ts +0 -0
  380. /package/{client/enums → enums}/Relationship.js +0 -0
  381. /package/{client/enums → enums}/RopeType.d.ts +0 -0
  382. /package/{client/enums → enums}/RopeType.js +0 -0
  383. /package/{client/enums → enums}/ScreenEffect.d.ts +0 -0
  384. /package/{client/enums → enums}/ScreenEffect.js +0 -0
  385. /package/{client/enums → enums}/SpeechModifier.d.ts +0 -0
  386. /package/{client/enums → enums}/SpeechModifier.js +0 -0
  387. /package/{client/enums → enums}/Vehicle.d.ts +0 -0
  388. /package/{client/enums → enums}/Vehicle.js +0 -0
  389. /package/{client/enums → enums}/Weather.d.ts +0 -0
  390. /package/{client/enums → enums}/Weather.js +0 -0
  391. /package/{client/enums → enums}/ZoneID.d.ts +0 -0
  392. /package/{client/enums → enums}/ZoneID.js +0 -0
  393. /package/{client/hashes → hashes}/MaterialHash.d.ts +0 -0
  394. /package/{client/hashes → hashes}/MaterialHash.js +0 -0
  395. /package/{client/hashes → hashes}/PedHash.d.ts +0 -0
  396. /package/{client/hashes → hashes}/PedHash.js +0 -0
  397. /package/{client/hashes → hashes}/VehicleHash.d.ts +0 -0
  398. /package/{client/hashes → hashes}/VehicleHash.js +0 -0
  399. /package/{client/hashes → hashes}/WeaponHash.d.ts +0 -0
  400. /package/{client/hashes → hashes}/WeaponHash.js +0 -0
  401. /package/{client/hashes → hashes}/WeatherTypeHash.d.ts +0 -0
  402. /package/{client/hashes → hashes}/WeatherTypeHash.js +0 -0
  403. /package/{client/interfaces → interfaces}/Dimensions.js +0 -0
  404. /package/{client/models → models}/Entity.d.ts +0 -0
  405. /package/{client/models → models}/Entity.js +0 -0
  406. /package/{client/ui → ui}/Fading.d.ts +0 -0
  407. /package/{client/ui → ui}/Notification.d.ts +0 -0
  408. /package/{client/ui → ui}/interfaces/IButton.js +0 -0
  409. /package/{client/ui → ui}/interfaces/IDrawable.js +0 -0
  410. /package/{client/ui → ui}/interfaces/index.js +0 -0
  411. /package/{client/ui → ui}/menu/MenuControl.d.ts +0 -0
  412. /package/{client/ui → ui}/menu/modules/ListItem.d.ts +0 -0
  413. /package/{client/utils → utils}/Animations.d.ts +0 -0
  414. /package/{client/utils → utils}/Crypto.d.ts +0 -0
  415. /package/{client/utils → utils}/LiteEvent.d.ts +0 -0
  416. /package/{client/utils → utils}/Maths.d.ts +0 -0
  417. /package/{client/utils → utils}/Maths.js +0 -0
  418. /package/{client/utils → utils}/Point.d.ts +0 -0
  419. /package/{client/utils → utils}/PointF.d.ts +0 -0
  420. /package/{client/utils → utils}/Size.d.ts +0 -0
  421. /package/{client/utils → utils}/enumValues.d.ts +0 -0
  422. /package/{client/utils → utils}/getStringFromUInt8Array.d.ts +0 -0
  423. /package/{client/utils → utils}/getUInt32FromUint8Array.d.ts +0 -0
  424. /package/{client/utils → utils}/getUInt32FromUint8Array.js +0 -0
  425. /package/{client/weapon → weapon}/Mk2WeaponHash.d.ts +0 -0
  426. /package/{client/weapon → weapon}/Mk2WeaponHash.js +0 -0
  427. /package/{client/weapon → weapon}/WeaponGroup.d.ts +0 -0
  428. /package/{client/weapon → weapon}/WeaponGroup.js +0 -0
  429. /package/{client/weapon → weapon}/WeaponLivery.d.ts +0 -0
  430. /package/{client/weapon → weapon}/WeaponLivery.js +0 -0
  431. /package/{client/weapon → weapon}/WeaponLiveryColor.d.ts +0 -0
  432. /package/{client/weapon → weapon}/WeaponLiveryColor.js +0 -0
  433. /package/{client/weapon → weapon}/WeaponTint.d.ts +0 -0
  434. /package/{client/weapon → weapon}/WeaponTint.js +0 -0
  435. /package/{client/weaponComponent → weaponComponent}/ComponentAttachmentPoint.d.ts +0 -0
  436. /package/{client/weaponComponent → weaponComponent}/ComponentAttachmentPoint.js +0 -0
  437. /package/{client/weaponComponent → weaponComponent}/WeaponComponentHash.d.ts +0 -0
  438. /package/{client/weaponComponent → weaponComponent}/WeaponComponentHash.js +0 -0
@@ -1,546 +0,0 @@
1
- // Adapted from https://raw.githubusercontent.com/you21979/typescript-vector/master/vector3.ts
2
- import { ClassTypes } from './ClassTypes';
3
- /**
4
- * A base vector class inherited by all vector classes.
5
- */
6
- export class Vector {
7
- /**
8
- * Creates a new vector based on the provided parameters.
9
- * @param x The x-component of the vector.
10
- * @param y The y-component of the vector (optional, defaults to the value of x).
11
- * @param z The z-component of the vector (optional, defaults to the value of y).
12
- * @param w The w-component of the vector (optional, defaults to the value of z).
13
- * @returns A new vector instance.
14
- */
15
- static create(x, y, z, w) {
16
- if (y === undefined && typeof x === 'number')
17
- return new Vector2(x, x);
18
- if (typeof x === 'object')
19
- ({ x, y, z, w } = x);
20
- const size = this instanceof Vector ? this.size : [x, y, z, w].filter(arg => arg !== undefined).length;
21
- switch (size) {
22
- default:
23
- case 2:
24
- return new Vector2(x, y);
25
- case 3:
26
- return new Vector3(x, y, z);
27
- case 4:
28
- return new Vector4(x, y, z, w);
29
- }
30
- }
31
- /**
32
- * Creates a vector from binary data in a MsgpackBuffer.
33
- * @param msgpackBuffer The buffer containing binary data.
34
- * @returns A new vector instance.
35
- */
36
- static fromBuffer({ buffer }) {
37
- const arr = [];
38
- for (let offset = 0; offset < buffer.length; offset += 4)
39
- arr.push(buffer.readFloatLE(offset));
40
- return this.fromArray(arr);
41
- }
42
- /**
43
- * Creates a deep copy of the provided vector.
44
- * @param obj The vector to clone.
45
- * @returns A new vector instance that is a copy of the provided vector.
46
- */
47
- static clone(obj) {
48
- return this.create(obj);
49
- }
50
- /**
51
- * Performs an operation between a vector and either another vector or scalar value.
52
- * @param a - The first vector.
53
- * @param b - The second vector or scalar value.
54
- * @param operator - The function defining the operation to perform.
55
- * @returns A new vector resulting from the operation.
56
- */
57
- static operate(a, b, operator) {
58
- let { x, y, z, w } = a;
59
- const isNumber = typeof b === 'number';
60
- x = operator(x, isNumber ? b : (b.x ?? 0));
61
- y = operator(y, isNumber ? b : (b.y ?? 0));
62
- if (z !== undefined)
63
- z = operator(z, isNumber ? b : (b.z ?? 0));
64
- if (w !== undefined)
65
- w = operator(w, isNumber ? b : (b.w ?? 0));
66
- return this.create(x, y, z, w);
67
- }
68
- /**
69
- * Adds two vectors or a scalar value to a vector.
70
- * @param a - The first vector or scalar value.
71
- * @param b - The second vector or scalar value.
72
- * @returns A new vector with incremented components.
73
- */
74
- static add(a, b) {
75
- return this.operate(a, b, (x, y) => x + y);
76
- }
77
- /**
78
- * Adds a scalar value to the x-component of a vector.
79
- * @param obj - The vector.
80
- * @param x - The value to add to the x-component.
81
- * @returns A new vector with the x-component incremented.
82
- */
83
- static addX(obj, x) {
84
- const vec = this.clone(obj);
85
- vec.x += x;
86
- return vec;
87
- }
88
- /**
89
- * Adds a scalar value to the y-component of a vector.
90
- * @param obj - The vector.
91
- * @param y - The value to add to the y-component.
92
- * @returns A new vector with the y-component incremented.
93
- */
94
- static addY(obj, y) {
95
- const vec = this.clone(obj);
96
- vec.y += y;
97
- return vec;
98
- }
99
- /**
100
- * Adds a scalar value to the z-component of a vector.
101
- * @param obj - The vector.
102
- * @param z - The value to add to the z-component.
103
- * @returns A new vector with the z-component incremented.
104
- */
105
- static addZ(obj, z) {
106
- const vec = this.clone(obj);
107
- vec.z += z;
108
- return vec;
109
- }
110
- /**
111
- * Adds a scalar value to the w-component of a vector.
112
- * @param obj - The vector.
113
- * @param w - The value to add to the w-component.
114
- * @returns A new vector with the w-component incremented.
115
- */
116
- static addW(obj, w) {
117
- const vec = this.clone(obj);
118
- vec.w += w;
119
- return vec;
120
- }
121
- /**
122
- * Subtracts one vector from another or subtracts a scalar value from a vector.
123
- * @param a - The vector.
124
- * @param b - The second vector or scalar value.
125
- * @returns A new vector with subtracted components.
126
- */
127
- static subtract(a, b) {
128
- return this.operate(a, b, (x, y) => x - y);
129
- }
130
- /**
131
- * Multiplies two vectors by their components, or multiplies a vector by a scalar value.
132
- * @param a - The vector.
133
- * @param b - The second vector or scalar value.
134
- * @returns A new vector with multiplied components.
135
- */
136
- static multiply(a, b) {
137
- return this.operate(a, b, (x, y) => x * y);
138
- }
139
- /**
140
- * Divides two vectors by their components, or divides a vector by a scalar value.
141
- * @param a - The vector.
142
- * @param b - The second vector or scalar vector.
143
- * @returns A new vector with divided components.
144
- */
145
- static divide(a, b) {
146
- return this.operate(a, b, (x, y) => x / y);
147
- }
148
- /**
149
- * Performs an operation between a vector and either another vector or scalar value converting the vector into absolute values.
150
- * @param a - The first vector.
151
- * @param b - The second vector or scalar value.
152
- * @param operator - The function defining the operation to perform.
153
- * @returns A new vector resulting from the operation.
154
- */
155
- static operateAbsolute(a, b, operator) {
156
- let { x, y, z, w } = a;
157
- const isNumber = typeof b === 'number';
158
- x = operator(Math.abs(x), isNumber ? b : Math.abs(b.x ?? 0));
159
- y = operator(Math.abs(y), isNumber ? b : Math.abs(b.y ?? 0));
160
- if (z !== undefined)
161
- z = operator(Math.abs(z), isNumber ? b : Math.abs(b.z ?? 0));
162
- if (w !== undefined)
163
- w = operator(Math.abs(w), isNumber ? b : Math.abs(b.w ?? 0));
164
- return this.create(x, y, z, w);
165
- }
166
- /**
167
- * Adds two vectors or a scalar value to a vector.
168
- * @param a - The first vector or scalar value.
169
- * @param b - The second vector or scalar value.
170
- * @returns A new vector with incremented components.
171
- */
172
- static addAbsolute(a, b) {
173
- return this.operateAbsolute(a, b, (x, y) => x + y);
174
- }
175
- /**
176
- * Subtracts one vector from another or subtracts a scalar value from a vector.
177
- * @param a - The vector.
178
- * @param b - The second vector or scalar value.
179
- * @returns A new vector with subtracted components.
180
- */
181
- static subtractAbsolute(a, b) {
182
- return this.operateAbsolute(a, b, (x, y) => x - y);
183
- }
184
- /**
185
- * Multiplies two vectors by their components, or multiplies a vector by a scalar value.
186
- * @param a - The vector.
187
- * @param b - The second vector or scalar value.
188
- * @returns A new vector with multiplied components.
189
- */
190
- static multiplyAbsolute(a, b) {
191
- return this.operateAbsolute(a, b, (x, y) => x * y);
192
- }
193
- /**
194
- * Divides two vectors by their components, or divides a vector by a scalar value
195
- * @param a - The vector.
196
- * @param b - The second vector or scalar vector.
197
- * @returns A new vector with divided components.
198
- */
199
- static divideAbsolute(a, b) {
200
- return this.operateAbsolute(a, b, (x, y) => x / y);
201
- }
202
- /**
203
- * Calculates the dot product of two vectors.
204
- * @param a - The first vector.
205
- * @param b - The second vector.
206
- * @returns A scalar value representing the degree of alignment between the input vectors.
207
- */
208
- static dotProduct(a, b) {
209
- let result = 0;
210
- for (const key of ['x', 'y', 'z', 'w']) {
211
- const x = a[key];
212
- const y = b[key];
213
- if (!!x && !!y)
214
- result += x * y;
215
- else if (x || y)
216
- throw new Error('Vectors must have the same dimensions');
217
- }
218
- return result;
219
- }
220
- /**
221
- * Calculates the cross product of two vectors in three-dimensional space.
222
- * @param a - The first vector.
223
- * @param b - The second vector.
224
- * @returns A new vector perpendicular to both input vectors.
225
- */
226
- static crossProduct(a, b) {
227
- const { x: ax, y: ay, z: az, w: aw } = a;
228
- const { x: bx, y: by, z: bz } = b;
229
- if (ax === undefined ||
230
- ay === undefined ||
231
- az === undefined ||
232
- bx === undefined ||
233
- by === undefined ||
234
- bz === undefined)
235
- throw new Error('Vector.crossProduct requires two three-dimensional vectors.');
236
- return this.create(ay * bz - az * by, az * bx - ax * bz, ax * by - ay * bx, aw);
237
- }
238
- /**
239
- * Normalizes a vector, producing a new vector with the same direction but with a magnitude of 1.
240
- * @param vector - The vector to be normalized.
241
- * @returns The new normalized vector.
242
- */
243
- static normalize(a) {
244
- const length = a instanceof Vector ? a.Length : this.Length(a);
245
- return this.divide(a, length);
246
- }
247
- /**
248
- * Creates a vector from an array of numbers.
249
- * @param primitive An array of numbers (usually returned by a native).
250
- */
251
- static fromArray(primitive) {
252
- const [x, y, z, w] = primitive;
253
- return this.create(x, y, z, w);
254
- }
255
- /**
256
- * Creates a vector from an array or object containing vector components.
257
- * @param primitive The object to use as a vector.
258
- */
259
- static fromObject(primitive) {
260
- if (Array.isArray(primitive))
261
- return this.fromArray(primitive);
262
- if ('buffer' in primitive && 'type' in primitive)
263
- return this.fromBuffer(primitive);
264
- const { x, y, z, w } = primitive;
265
- return this.create(x, y, z, w);
266
- }
267
- /**
268
- * Creates an array of vectors from an array of number arrays
269
- * @param primitives A multi-dimensional array of number arrays
270
- */
271
- static fromArrays(primitives) {
272
- return primitives.map(this.fromArray);
273
- }
274
- /**
275
- * Calculates the length (magnitude) of a vector.
276
- * @param obj - The vector for which to calculate the length.
277
- * @returns The magnitude of the vector.
278
- */
279
- static Length(obj) {
280
- let sum = 0;
281
- for (const key of ['x', 'y', 'z', 'w']) {
282
- if (key in obj) {
283
- const value = obj[key];
284
- sum += value * value;
285
- }
286
- }
287
- return Math.sqrt(sum);
288
- }
289
- /**
290
- * Constructs a new vector.
291
- * @param size The size of the vector (number of components).
292
- * @param x The x-component of the vector.
293
- * @param y The y-component of the vector (optional, defaults to x).
294
- * @param z The z-component of the vector (optional).
295
- * @param w The w-component of the vector (optional).
296
- */
297
- constructor(size, x = 0, y = x, z, w) {
298
- this.size = size;
299
- this.x = x;
300
- this.y = y;
301
- this.z = z;
302
- this.w = w;
303
- // DO NOT USE, ONLY EXPOSED BECAUSE TS IS TRASH, THIS TYPE IS NOT GUARANTEED
304
- // TO EXIST
305
- this.type = ClassTypes.Vector2;
306
- }
307
- *[Symbol.iterator]() {
308
- yield this.x;
309
- yield this.y;
310
- if (this.z !== undefined)
311
- yield this.z;
312
- if (this.w !== undefined)
313
- yield this.w;
314
- }
315
- toString() {
316
- return `vector${this.size}(${this.toArray().join(', ')})`;
317
- }
318
- /**
319
- * @see Vector.clone
320
- */
321
- clone() {
322
- return Vector.clone(this);
323
- }
324
- /**
325
- * The product of the Euclidean magnitudes of this and another Vector.
326
- *
327
- * @param v Vector to find Euclidean magnitude between.
328
- * @returns Euclidean magnitude with another vector.
329
- */
330
- distanceSquared(v) {
331
- const w = this.subtract(v);
332
- return Vector.dotProduct(w, w);
333
- }
334
- /**
335
- * The distance between two Vectors.
336
- *
337
- * @param v Vector to find distance between.
338
- * @returns Distance between this and another vector.
339
- */
340
- distance(v) {
341
- return Math.sqrt(this.distanceSquared(v));
342
- }
343
- /**
344
- * @see Vector.normalize
345
- */
346
- normalize() {
347
- return Vector.normalize(this);
348
- }
349
- /**
350
- * @see Vector.dotProduct
351
- */
352
- dotProduct(v) {
353
- return Vector.dotProduct(this, v);
354
- }
355
- /**
356
- * @see Vector.add
357
- */
358
- add(v) {
359
- return Vector.add(this, v);
360
- }
361
- /**
362
- * @see Vector.addX
363
- */
364
- addX(x) {
365
- return Vector.addX(this, x);
366
- }
367
- /**
368
- * @see Vector.addY
369
- */
370
- addY(y) {
371
- return Vector.addY(this, y);
372
- }
373
- /**
374
- * @see Vector.subtract
375
- */
376
- subtract(v) {
377
- return Vector.subtract(this, v);
378
- }
379
- /**
380
- * @see Vector.multiply
381
- */
382
- multiply(v) {
383
- return Vector.multiply(this, v);
384
- }
385
- /**
386
- * @see Vector.divide
387
- */
388
- divide(v) {
389
- return Vector.divide(this, v);
390
- }
391
- /**
392
- * @see Vector.addAbsolute
393
- */
394
- addAbsolute(v) {
395
- return Vector.addAbsolute(this, v);
396
- }
397
- /**
398
- * @see Vector.subtractAbsolute
399
- */
400
- subtractAbsolute(v) {
401
- return Vector.subtractAbsolute(this, v);
402
- }
403
- /**
404
- * @see Vector.multiply
405
- */
406
- multiplyAbsolute(v) {
407
- return Vector.multiplyAbsolute(this, v);
408
- }
409
- /**
410
- * @see Vector.divide
411
- */
412
- divideAbsolute(v) {
413
- return Vector.divideAbsolute(this, v);
414
- }
415
- /**
416
- * Converts the vector to an array of its components.
417
- */
418
- toArray() {
419
- return [...this];
420
- }
421
- /**
422
- * Replaces the components of the vector with the components of another vector object.
423
- * @param v - The object whose components will replace the current vector's components.
424
- */
425
- replace(v) {
426
- for (const key of ['x', 'y', 'z', 'w']) {
427
- if (key in this && key in v)
428
- this[key] = v[key];
429
- }
430
- }
431
- /**
432
- * Calculates the length (magnitude) of a vector.
433
- * @returns The magnitude of the vector.
434
- */
435
- get Length() {
436
- let sum = 0;
437
- for (let value of this)
438
- sum += value * value;
439
- return Math.sqrt(sum);
440
- }
441
- }
442
- /**
443
- * Represents a 2-dimensional vector.
444
- */
445
- export class Vector2 extends Vector {
446
- /**
447
- * Constructs a new 2D vector.
448
- * @param x The x-component of the vector.
449
- * @param y The y-component of the vector (optional, defaults to x).
450
- */
451
- constructor(x, y = x) {
452
- super(2, x, y);
453
- // DO NOT USE, ONLY EXPOSED BECAUSE TS IS TRASH, THIS TYPE IS NOT GUARANTEED
454
- // TO EXIST, CHANGING IT WILL BREAK STUFF
455
- this.type = ClassTypes.Vector2;
456
- }
457
- }
458
- Vector2.Zero = new Vector2(0, 0);
459
- /**
460
- * Represents a 3-dimensional vector.
461
- */
462
- export class Vector3 extends Vector {
463
- /**
464
- * Constructs a new 3D vector.
465
- * @param x The x-component of the vector.
466
- * @param y The y-component of the vector (optional, defaults to x).
467
- * @param z The z-component of the vector (optional, defaults to y).
468
- */
469
- constructor(x, y = x, z = y) {
470
- super(3, x, y, z);
471
- // DO NOT USE, ONLY EXPOSED BECAUSE TS IS TRASH, THIS TYPE IS NOT GUARANTEED
472
- // TO EXIST, CHANGING IT WILL BREAK STUFF
473
- this.type = ClassTypes.Vector3;
474
- this.z = z;
475
- }
476
- /**
477
- * @see Vector.addZ
478
- */
479
- addZ(z) {
480
- return Vector.addZ(this, z);
481
- }
482
- /**
483
- * @see Vector.crossProduct
484
- */
485
- crossProduct(v) {
486
- return Vector.crossProduct(this, v);
487
- }
488
- /**
489
- * @returns the x and y values as Vec2
490
- */
491
- toVec2() {
492
- return new Vector2(this.x, this.y);
493
- }
494
- }
495
- Vector3.Zero = new Vector3(0, 0, 0);
496
- /**
497
- * Represents a 4-dimensional vector.
498
- */
499
- export class Vector4 extends Vector {
500
- /**
501
- * Constructs a new 4D vector.
502
- * @param x The x-component of the vector.
503
- * @param y The y-component of the vector (optional, defaults to x).
504
- * @param z The z-component of the vector (optional, defaults to y).
505
- * @param w The w-component of the vector (optional, defaults to z).
506
- */
507
- constructor(x, y = x, z = y, w = z) {
508
- super(4, x, y, z, w);
509
- // DO NOT USE, ONLY EXPOSED BECAUSE TS IS TRASH, THIS TYPE IS NOT GUARANTEED
510
- // TO EXIST, CHANGING IT WILL BREAK STUFF
511
- this.type = ClassTypes.Vector4;
512
- this.z = z;
513
- this.w = w;
514
- }
515
- /**
516
- * @see Vector.addZ
517
- */
518
- addZ(z) {
519
- return Vector.addZ(this, z);
520
- }
521
- /**
522
- * @see Vector.addW
523
- */
524
- addW(w) {
525
- return Vector.addW(this, w);
526
- }
527
- /**
528
- * @see Vector.crossProduct
529
- */
530
- crossProduct(v) {
531
- return Vector.crossProduct(this, v);
532
- }
533
- /**
534
- * @returns the x and y values as Vec2
535
- */
536
- toVec2() {
537
- return new Vector2(this.x, this.y);
538
- }
539
- /**
540
- * @returns the x and y values as Vec3
541
- */
542
- toVec3() {
543
- return new Vector3(this.x, this.y, this.z);
544
- }
545
- }
546
- Vector4.Zero = new Vector4(0, 0, 0, 0);
@@ -1 +0,0 @@
1
- export { Vector2 } from './Vector';
@@ -1 +0,0 @@
1
- export { Vector2 } from './Vector';
@@ -1 +0,0 @@
1
- export { Vector3 } from './Vector';
@@ -1 +0,0 @@
1
- export { Vector3 } from './Vector';
@@ -1 +0,0 @@
1
- export { Vector4 } from './Vector';
@@ -1 +0,0 @@
1
- export { Vector4 } from './Vector';
@@ -1,6 +0,0 @@
1
- /**
2
- * Cleans up a player name and returns one version to be displayed, and one pure version to be used for fuzzy matching.
3
- * In case the name has no ascii characters, the pure name will be "empty name".
4
- * NOTE: this is not perfect, but took me two hours to arrive to this point.
5
- */
6
- export declare const cleanPlayerName: (original: string) => string;
@@ -1,27 +0,0 @@
1
- /* eslint-disable */
2
- // Spooky shit happens in here, don't let eslint get angry
3
- // Shamlessly ripped from txAdmin, MIT license
4
- /**
5
- * Cleans up a player name and returns one version to be displayed, and one pure version to be used for fuzzy matching.
6
- * In case the name has no ascii characters, the pure name will be "empty name".
7
- * NOTE: this is not perfect, but took me two hours to arrive to this point.
8
- */
9
- export const cleanPlayerName = (original) => {
10
- // \u0000-\u001F > C0 controls
11
- // \u007F-\u009F > delete + C1 controls
12
- // \u200B-\u200D\uFEFF > zero width spaces
13
- // \u200E > RTL mark
14
- // \uA9C1-\uA9C5 > javanese text adornation (oversized)
15
- // \u239B-\u23AD > Miscellaneous Technical — Bracket pieces items (oversized)
16
- let displayName = original
17
- .substring(0, 75) //lua should have truncated it first, but double checking
18
- .replace(/[\u0000-\u001F\u007F-\u009F\u200B-\u200D\uFEFF\u200E\uA9C1-\uA9C5\u239B-\u23AD]/g, '')
19
- .replace(/~(HUD_\S+|HC_\S+|[a-z]|[a1]_\d+|bold|italic|ws|wanted_star|nrt|EX_R\*|BLIP_\S+|ACCEPT|CANCEL|PAD_\S+|INPUT_\S+|INPUTGROUP_\S+)~/gi, '') // https://docs.fivem.net/docs/game-references/text-formatting/
20
- .replace(/\^\d/gi, '') //console color codes
21
- .replace(/\p{Mark}{2,}/gu, '') //2+ consecutive marks (zalgo text)
22
- .replace(/\s+/g, ' ')
23
- .trim();
24
- if (!displayName.length)
25
- displayName = 'empty name';
26
- return displayName;
27
- };
@@ -1,12 +0,0 @@
1
- /**
2
- * EnumValues - iterate over enum values
3
- * Just copy&paste from https://github.com/microsoft/TypeScript/issues/4753#issuecomment-694557208
4
- *
5
- * @param enumObj
6
- */
7
- export declare function enumValues<T extends string>(enumObj: {
8
- [key: string]: T;
9
- }): IterableIterator<T>;
10
- export declare function enumValues<T extends string | number>(enumObj: {
11
- [key: string]: T;
12
- }): IterableIterator<Exclude<T, string>>;
@@ -1,14 +0,0 @@
1
- export function* enumValues(enumObj) {
2
- let isStringEnum = true;
3
- for (const property in enumObj) {
4
- if (typeof enumObj[property] === 'number') {
5
- isStringEnum = false;
6
- break;
7
- }
8
- }
9
- for (const property in enumObj) {
10
- if (isStringEnum || typeof enumObj[property] === 'number') {
11
- yield enumObj[property];
12
- }
13
- }
14
- }
@@ -1,8 +0,0 @@
1
- /**
2
- * get string from uint8 array
3
- *
4
- * @param buffer - Uint8Array
5
- * @param start - The beginning of the specified portion of the array
6
- * @param end - The end of the specified portion of the array
7
- */
8
- export declare const getStringFromUInt8Array: (buffer: Uint8Array, start: number, end: number) => string;
@@ -1,10 +0,0 @@
1
- /**
2
- * get string from uint8 array
3
- *
4
- * @param buffer - Uint8Array
5
- * @param start - The beginning of the specified portion of the array
6
- * @param end - The end of the specified portion of the array
7
- */
8
- export const getStringFromUInt8Array = (buffer, start, end) => String.fromCharCode(...buffer.slice(start, end))
9
- // eslint-disable-next-line no-control-regex
10
- .replace(/\u0000/g, '');
@@ -1,8 +0,0 @@
1
- /**
2
- * get uint32 from uint8 array
3
- *
4
- * @param buffer - Uint8Array
5
- * @param start - The beginning of the specified portion of the array
6
- * @param end - The end of the specified portion of the array
7
- */
8
- export declare const getUInt32FromUint8Array: (buffer: Uint8Array, start: number, end: number) => number;
@@ -1,8 +0,0 @@
1
- /**
2
- * get uint32 from uint8 array
3
- *
4
- * @param buffer - Uint8Array
5
- * @param start - The beginning of the specified portion of the array
6
- * @param end - The end of the specified portion of the array
7
- */
8
- export const getUInt32FromUint8Array = (buffer, start, end) => new Uint32Array(buffer.slice(start, end).buffer)[0];
@@ -1,12 +0,0 @@
1
- export * from './Vector2';
2
- export * from './Vector3';
3
- export * from './Vector4';
4
- export * from './PointF';
5
- export * from './Maths';
6
- export * from './Quaternion';
7
- export * from './Color';
8
- export { cleanPlayerName } from './cleanPlayerName';
9
- export declare const Delay: (milliseconds: number) => Promise<void>;
10
- export { enumValues } from './enumValues';
11
- export { getStringFromUInt8Array } from './getStringFromUInt8Array';
12
- export { getUInt32FromUint8Array } from './getUInt32FromUint8Array';