@open-core/framework 1.0.5-beta.1 → 1.0.5-beta.2
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/adapters/contracts/IEngineEvents.d.ts +3 -0
- package/dist/adapters/contracts/IEngineEvents.js +7 -0
- package/dist/adapters/contracts/IPlatformContext.d.ts +43 -0
- package/dist/adapters/contracts/IPlatformContext.js +8 -0
- package/dist/adapters/contracts/client/IClientLocalPlayerBridge.d.ts +4 -0
- package/dist/adapters/contracts/client/IClientLocalPlayerBridge.js +2 -0
- package/dist/adapters/contracts/client/IClientLogConsole.d.ts +13 -0
- package/dist/adapters/contracts/client/IClientLogConsole.js +2 -0
- package/dist/adapters/contracts/client/IClientPlatformBridge.d.ts +195 -0
- package/dist/adapters/contracts/client/IClientPlatformBridge.js +282 -0
- package/dist/adapters/contracts/client/IClientRuntimeBridge.d.ts +18 -0
- package/dist/adapters/contracts/client/IClientRuntimeBridge.js +14 -0
- package/dist/adapters/contracts/client/IGtaPedAppearanceBridge.d.ts +26 -0
- package/dist/adapters/contracts/client/IGtaPedAppearanceBridge.js +2 -0
- package/dist/adapters/contracts/client/index.d.ts +7 -0
- package/dist/adapters/contracts/client/index.js +7 -0
- package/dist/adapters/contracts/client/spawn/IClientSpawnBridge.d.ts +7 -0
- package/dist/adapters/contracts/client/spawn/IClientSpawnBridge.js +2 -0
- package/dist/adapters/contracts/client/spawn/index.d.ts +2 -0
- package/dist/adapters/contracts/client/spawn/index.js +2 -0
- package/dist/adapters/contracts/client/spawn/types.d.ts +14 -0
- package/dist/adapters/contracts/client/ui/IClientBlipBridge.d.ts +25 -0
- package/dist/adapters/contracts/client/ui/IClientBlipBridge.js +2 -0
- package/dist/adapters/contracts/client/ui/IClientMarkerBridge.d.ts +31 -0
- package/dist/adapters/contracts/client/ui/IClientMarkerBridge.js +2 -0
- package/dist/adapters/contracts/client/ui/IClientNotificationBridge.d.ts +21 -0
- package/dist/adapters/contracts/client/ui/IClientNotificationBridge.js +2 -0
- package/dist/adapters/contracts/client/ui/index.d.ts +4 -0
- package/dist/adapters/contracts/client/ui/index.js +4 -0
- package/dist/adapters/contracts/client/ui/webview/IClientWebViewBridge.d.ts +13 -0
- package/dist/adapters/contracts/client/ui/webview/IClientWebViewBridge.js +2 -0
- package/dist/adapters/contracts/client/ui/webview/index.d.ts +2 -0
- package/dist/adapters/contracts/client/ui/webview/index.js +2 -0
- package/dist/adapters/contracts/client/ui/webview/types.d.ts +25 -0
- package/dist/adapters/contracts/client/ui/webview/types.js +0 -0
- package/dist/adapters/contracts/index.d.ts +4 -2
- package/dist/adapters/contracts/index.js +4 -3
- package/dist/adapters/contracts/runtime/index.d.ts +1 -0
- package/dist/adapters/contracts/runtime/index.js +1 -0
- package/dist/adapters/contracts/runtime/runtime-events.d.ts +9 -0
- package/dist/adapters/contracts/runtime/runtime-events.js +7 -0
- package/dist/adapters/contracts/server/IEntityServer.d.ts +4 -28
- package/dist/adapters/contracts/server/IEntityServer.js +0 -26
- package/dist/adapters/contracts/server/IPlayerServer.d.ts +7 -26
- package/dist/adapters/contracts/server/IPlayerServer.js +0 -26
- package/dist/adapters/contracts/server/index.d.ts +10 -0
- package/dist/adapters/contracts/server/index.js +10 -0
- package/dist/adapters/contracts/server/npc-lifecycle/INpcLifecycleServer.d.ts +5 -0
- package/dist/adapters/contracts/server/npc-lifecycle/INpcLifecycleServer.js +2 -0
- package/dist/adapters/contracts/server/npc-lifecycle/index.d.ts +2 -0
- package/dist/adapters/contracts/server/npc-lifecycle/index.js +2 -0
- package/dist/adapters/contracts/server/npc-lifecycle/types.d.ts +17 -0
- package/dist/adapters/contracts/server/npc-lifecycle/types.js +0 -0
- package/dist/adapters/contracts/server/player-appearance/IPlayerAppearanceLifecycleServer.d.ts +11 -0
- package/dist/adapters/contracts/server/player-appearance/IPlayerAppearanceLifecycleServer.js +2 -0
- package/dist/adapters/contracts/server/player-appearance/index.d.ts +1 -0
- package/dist/adapters/contracts/server/player-appearance/index.js +1 -0
- package/dist/adapters/contracts/server/player-lifecycle/IPlayerLifecycleServer.d.ts +6 -0
- package/dist/adapters/contracts/server/player-lifecycle/IPlayerLifecycleServer.js +2 -0
- package/dist/adapters/contracts/server/player-lifecycle/index.d.ts +2 -0
- package/dist/adapters/contracts/server/player-lifecycle/index.js +2 -0
- package/dist/adapters/contracts/server/player-lifecycle/types.d.ts +17 -0
- package/dist/adapters/contracts/server/player-lifecycle/types.js +0 -0
- package/dist/adapters/contracts/server/player-state/IPlayerStateSyncServer.d.ts +6 -0
- package/dist/adapters/contracts/server/player-state/IPlayerStateSyncServer.js +2 -0
- package/dist/adapters/contracts/server/player-state/index.d.ts +1 -0
- package/dist/adapters/contracts/server/player-state/index.js +1 -0
- package/dist/adapters/contracts/server/vehicle-lifecycle/IVehicleLifecycleServer.d.ts +5 -0
- package/dist/adapters/contracts/server/vehicle-lifecycle/IVehicleLifecycleServer.js +2 -0
- package/dist/adapters/contracts/server/vehicle-lifecycle/index.d.ts +2 -0
- package/dist/adapters/contracts/server/vehicle-lifecycle/index.js +2 -0
- package/dist/adapters/contracts/server/vehicle-lifecycle/types.d.ts +16 -0
- package/dist/adapters/contracts/server/vehicle-lifecycle/types.js +0 -0
- package/dist/adapters/contracts/transport/index.d.ts +4 -0
- package/dist/adapters/contracts/transport/index.js +4 -0
- package/dist/adapters/index.d.ts +3 -14
- package/dist/adapters/index.js +3 -20
- package/dist/adapters/node/node-capabilities.d.ts +11 -11
- package/dist/adapters/node/node-capabilities.js +15 -27
- package/dist/adapters/node/node-engine-events.d.ts +1 -1
- package/dist/adapters/node/node-engine-events.js +2 -1
- package/dist/adapters/node/node-entity-server.d.ts +2 -2
- package/dist/adapters/node/node-entity-server.js +2 -2
- package/dist/adapters/node/node-ped-appearance-client.d.ts +2 -2
- package/dist/adapters/node/node-ped-appearance-client.js +2 -2
- package/dist/adapters/node/node-platform.js +4 -4
- package/dist/adapters/node/node-player-server.d.ts +3 -2
- package/dist/adapters/node/node-player-server.js +8 -2
- package/dist/adapters/register-capabilities.d.ts +1 -1
- package/dist/adapters/register-capabilities.js +1 -3
- package/dist/adapters/register-client-capabilities.d.ts +3 -2
- package/dist/adapters/register-client-capabilities.js +16 -41
- package/dist/contracts/client.d.ts +5 -0
- package/dist/contracts/client.js +5 -0
- package/dist/contracts/server.d.ts +19 -0
- package/dist/contracts/server.js +19 -0
- package/dist/contracts.d.ts +4 -0
- package/dist/contracts.js +4 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/kernel/logger/client-log-console.d.ts +4 -0
- package/dist/kernel/logger/client-log-console.js +43 -0
- package/dist/kernel/logger/core-logger.d.ts +3 -1
- package/dist/kernel/logger/core-logger.js +4 -2
- package/dist/kernel/logger/index.d.ts +2 -0
- package/dist/kernel/logger/index.js +1 -0
- package/dist/kernel/logger/transports/dev-transport.factory.js +1 -1
- package/dist/kernel/logger/transports/simple-console.transport.js +13 -8
- package/dist/kernel-public.d.ts +1 -0
- package/dist/kernel-public.js +1 -0
- package/dist/runtime/client/adapter/client-adapter.d.ts +25 -0
- package/dist/runtime/client/adapter/client-adapter.js +11 -0
- package/dist/runtime/client/adapter/index.d.ts +15 -0
- package/dist/runtime/client/adapter/index.js +15 -0
- package/dist/runtime/client/adapter/local-player-bridge.d.ts +1 -0
- package/dist/runtime/client/adapter/local-player-bridge.js +1 -0
- package/dist/runtime/client/adapter/node-blip-bridge.d.ts +9 -0
- package/dist/runtime/client/adapter/node-blip-bridge.js +34 -0
- package/dist/runtime/client/adapter/node-client-adapter.d.ts +5 -0
- package/dist/runtime/client/adapter/node-client-adapter.js +50 -0
- package/dist/runtime/client/adapter/node-local-player-bridge.d.ts +8 -0
- package/dist/{adapters/fivem/fivem-hasher.js → runtime/client/adapter/node-local-player-bridge.js} +7 -9
- package/dist/runtime/client/adapter/node-log-console.d.ts +11 -0
- package/dist/runtime/client/adapter/node-log-console.js +48 -0
- package/dist/runtime/client/adapter/node-marker-bridge.d.ts +10 -0
- package/dist/runtime/client/adapter/node-marker-bridge.js +35 -0
- package/dist/runtime/client/adapter/node-notification-bridge.d.ts +5 -0
- package/dist/runtime/client/adapter/node-notification-bridge.js +16 -0
- package/dist/runtime/client/adapter/node-platform-bridge.d.ts +3 -0
- package/dist/{adapters/fivem/fivem-tick.js → runtime/client/adapter/node-platform-bridge.js} +5 -10
- package/dist/runtime/client/adapter/node-runtime-bridge.d.ts +24 -0
- package/dist/runtime/client/adapter/node-runtime-bridge.js +58 -0
- package/dist/runtime/client/adapter/node-spawn-bridge.d.ts +8 -0
- package/dist/runtime/client/adapter/node-spawn-bridge.js +18 -0
- package/dist/runtime/client/adapter/node-webview-bridge.d.ts +15 -0
- package/dist/runtime/client/adapter/node-webview-bridge.js +43 -0
- package/dist/runtime/client/adapter/platform-bridge.d.ts +1 -0
- package/dist/runtime/client/adapter/platform-bridge.js +1 -0
- package/dist/runtime/client/adapter/registry.d.ts +9 -0
- package/dist/runtime/client/adapter/registry.js +85 -0
- package/dist/runtime/client/adapter/runtime-bridge.d.ts +1 -0
- package/dist/runtime/client/adapter/runtime-bridge.js +1 -0
- package/dist/runtime/client/api.d.ts +2 -1
- package/dist/runtime/client/api.js +2 -1
- package/dist/runtime/client/client-bootstrap.js +51 -44
- package/dist/runtime/client/client-core.d.ts +2 -0
- package/dist/runtime/client/client-core.js +9 -0
- package/dist/runtime/client/client-runtime.d.ts +3 -0
- package/dist/runtime/client/client-runtime.js +3 -0
- package/dist/runtime/client/controllers/appearance.controller.d.ts +3 -1
- package/dist/runtime/client/controllers/appearance.controller.js +14 -4
- package/dist/runtime/client/controllers/spawner.controller.js +2 -0
- package/dist/runtime/client/decorators/controller.js +2 -10
- package/dist/runtime/client/decorators/onView.d.ts +3 -3
- package/dist/runtime/client/decorators/onView.js +3 -3
- package/dist/runtime/client/index.d.ts +1 -0
- package/dist/runtime/client/index.js +1 -0
- package/dist/runtime/client/library/create-client-library.js +9 -1
- package/dist/runtime/client/services/appearance.service.d.ts +2 -2
- package/dist/runtime/client/services/appearance.service.js +7 -4
- package/dist/runtime/client/services/blip.service.d.ts +6 -93
- package/dist/runtime/client/services/blip.service.js +58 -153
- package/dist/runtime/client/services/camera-effects.registry.d.ts +3 -0
- package/dist/runtime/client/services/camera-effects.registry.js +20 -7
- package/dist/runtime/client/services/camera.d.ts +3 -83
- package/dist/runtime/client/services/camera.js +37 -93
- package/dist/runtime/client/services/cinematic.d.ts +5 -1
- package/dist/runtime/client/services/cinematic.js +45 -30
- package/dist/runtime/client/services/index.d.ts +1 -0
- package/dist/runtime/client/services/index.js +1 -0
- package/dist/runtime/client/services/marker.service.d.ts +12 -63
- package/dist/runtime/client/services/marker.service.js +62 -97
- package/dist/runtime/client/services/notification.service.d.ts +6 -57
- package/dist/runtime/client/services/notification.service.js +43 -81
- package/dist/runtime/client/services/ped.service.d.ts +3 -130
- package/dist/runtime/client/services/ped.service.js +66 -198
- package/dist/runtime/client/services/progress.service.d.ts +5 -30
- package/dist/runtime/client/services/progress.service.js +73 -99
- package/dist/runtime/client/services/session-bridge.service.d.ts +15 -0
- package/dist/runtime/client/services/session-bridge.service.js +61 -0
- package/dist/runtime/client/services/spawn.service.d.ts +6 -56
- package/dist/runtime/client/services/spawn.service.js +34 -191
- package/dist/runtime/client/services/streaming.service.d.ts +5 -126
- package/dist/runtime/client/services/streaming.service.js +72 -217
- package/dist/runtime/client/services/textui.service.d.ts +5 -45
- package/dist/runtime/client/services/textui.service.js +55 -88
- package/dist/runtime/client/services/vehicle-client.service.d.ts +12 -149
- package/dist/runtime/client/services/vehicle-client.service.js +180 -326
- package/dist/runtime/client/services/vehicle.service.d.ts +3 -109
- package/dist/runtime/client/services/vehicle.service.js +94 -194
- package/dist/runtime/client/system/processors/export.processor.d.ts +3 -0
- package/dist/runtime/client/system/processors/export.processor.js +16 -3
- package/dist/runtime/client/system/processors/gameEvent.processor.d.ts +3 -0
- package/dist/runtime/client/system/processors/gameEvent.processor.js +16 -3
- package/dist/runtime/client/system/processors/interval.processor.d.ts +3 -0
- package/dist/runtime/client/system/processors/interval.processor.js +17 -4
- package/dist/runtime/client/system/processors/key.processor.d.ts +3 -0
- package/dist/runtime/client/system/processors/key.processor.js +18 -5
- package/dist/runtime/client/system/processors/localEvent.processor.d.ts +3 -0
- package/dist/runtime/client/system/processors/localEvent.processor.js +16 -3
- package/dist/runtime/client/system/processors/netEvent.processor.d.ts +3 -0
- package/dist/runtime/client/system/processors/netEvent.processor.js +16 -3
- package/dist/runtime/client/system/processors/onRpc.processor.js +1 -1
- package/dist/runtime/client/system/processors/resourceLifecycle.processor.d.ts +5 -0
- package/dist/runtime/client/system/processors/resourceLifecycle.processor.js +26 -7
- package/dist/runtime/client/system/processors/tick.processor.d.ts +3 -0
- package/dist/runtime/client/system/processors/tick.processor.js +16 -3
- package/dist/runtime/client/system/processors/view.processor.d.ts +3 -0
- package/dist/runtime/client/system/processors/view.processor.js +21 -10
- package/dist/runtime/client/system/processors.register.d.ts +1 -0
- package/dist/runtime/client/system/processors.register.js +8 -0
- package/dist/runtime/client/ui-bridge.d.ts +2 -114
- package/dist/runtime/client/ui-bridge.js +2 -194
- package/dist/runtime/client/webview-bridge.d.ts +31 -0
- package/dist/runtime/client/webview-bridge.js +97 -0
- package/dist/runtime/client/webview.service.d.ts +14 -0
- package/dist/runtime/client/webview.service.js +98 -0
- package/dist/runtime/server/adapter/index.d.ts +5 -0
- package/dist/runtime/server/adapter/index.js +5 -0
- package/dist/runtime/server/adapter/node-npc-lifecycle-server.d.ts +12 -0
- package/dist/runtime/server/adapter/node-npc-lifecycle-server.js +52 -0
- package/dist/runtime/server/adapter/node-player-appearance-lifecycle-server.d.ts +22 -0
- package/dist/runtime/server/adapter/node-player-appearance-lifecycle-server.js +94 -0
- package/dist/runtime/server/adapter/node-player-lifecycle-server.d.ts +11 -0
- package/dist/runtime/server/adapter/node-player-lifecycle-server.js +55 -0
- package/dist/runtime/server/adapter/node-player-state-sync-server.d.ts +12 -0
- package/dist/runtime/server/adapter/node-player-state-sync-server.js +49 -0
- package/dist/runtime/server/adapter/node-server-adapter.d.ts +5 -0
- package/dist/runtime/server/adapter/node-server-adapter.js +67 -0
- package/dist/runtime/server/adapter/node-vehicle-lifecycle-server.d.ts +13 -0
- package/dist/runtime/server/adapter/node-vehicle-lifecycle-server.js +57 -0
- package/dist/runtime/server/adapter/player-adapter.d.ts +28 -0
- package/dist/runtime/server/adapter/player-adapter.js +28 -0
- package/dist/runtime/server/adapter/registry.d.ts +26 -0
- package/dist/runtime/server/adapter/registry.js +101 -0
- package/dist/runtime/server/adapter/serialization.d.ts +6 -0
- package/dist/runtime/server/adapter/serialization.js +9 -0
- package/dist/runtime/server/adapter/server-adapter.d.ts +28 -0
- package/dist/runtime/server/adapter/server-adapter.js +14 -0
- package/dist/runtime/server/api.d.ts +2 -1
- package/dist/runtime/server/api.js +2 -1
- package/dist/runtime/server/apis/appearance.api.d.ts +5 -3
- package/dist/runtime/server/apis/appearance.api.js +20 -7
- package/dist/runtime/server/apis/npcs.api.d.ts +3 -4
- package/dist/runtime/server/apis/npcs.api.js +26 -56
- package/dist/runtime/server/apis/vehicle-modification.api.d.ts +3 -1
- package/dist/runtime/server/apis/vehicle-modification.api.js +9 -4
- package/dist/runtime/server/apis/vehicles.api.d.ts +12 -6
- package/dist/runtime/server/apis/vehicles.api.js +48 -36
- package/dist/runtime/server/bootstrap.js +15 -7
- package/dist/runtime/server/controllers/channel.controller.js +2 -1
- package/dist/runtime/server/controllers/command-export.controller.js +1 -1
- package/dist/runtime/server/controllers/player-export.controller.js +5 -4
- package/dist/runtime/server/controllers/session.controller.js +3 -2
- package/dist/runtime/server/controllers/vehicle.controller.d.ts +3 -1
- package/dist/runtime/server/controllers/vehicle.controller.js +10 -5
- package/dist/runtime/server/core.d.ts +2 -0
- package/dist/runtime/server/core.js +9 -1
- package/dist/runtime/server/decorators/onRuntimeEvent.d.ts +2 -1
- package/dist/runtime/server/entities/npc.d.ts +2 -0
- package/dist/runtime/server/entities/npc.js +3 -3
- package/dist/runtime/server/entities/player.d.ts +8 -11
- package/dist/runtime/server/entities/player.js +39 -28
- package/dist/runtime/server/entities/vehicle.js +2 -2
- package/dist/runtime/server/error-handler.js +13 -2
- package/dist/runtime/server/helpers/command-validation.helper.js +1 -1
- package/dist/runtime/server/implementations/local/player.local.d.ts +7 -3
- package/dist/runtime/server/implementations/local/player.local.js +23 -11
- package/dist/runtime/server/implementations/remote/channel.remote.d.ts +2 -1
- package/dist/runtime/server/implementations/remote/channel.remote.js +5 -2
- package/dist/runtime/server/implementations/remote/command.remote.d.ts +3 -1
- package/dist/runtime/server/implementations/remote/command.remote.js +9 -4
- package/dist/runtime/server/implementations/remote/player.remote.d.ts +7 -10
- package/dist/runtime/server/implementations/remote/player.remote.js +24 -29
- package/dist/runtime/server/library/create-server-library.js +17 -2
- package/dist/runtime/server/runtime.d.ts +3 -0
- package/dist/runtime/server/runtime.js +1 -15
- package/dist/runtime/server/services/appearance.service.d.ts +0 -95
- package/dist/runtime/server/services/appearance.service.js +15 -192
- package/dist/runtime/server/services/services.register.js +56 -24
- package/dist/runtime/server/system/processors/netEvent.processor.js +1 -1
- package/dist/runtime/server/system/processors/onRpc.processor.js +1 -1
- package/dist/runtime/server/system/processors/runtimeEvent.processor.d.ts +2 -1
- package/dist/runtime/server/system/processors/runtimeEvent.processor.js +1 -1
- package/dist/runtime/server/types/core-exports.types.d.ts +5 -0
- package/dist/runtime/shared/helpers/process-tuple-schema.d.ts +2 -0
- package/dist/runtime/shared/helpers/process-tuple-schema.js +29 -0
- package/package.json +21 -3
- package/dist/adapters/cfx/cfx-capabilities.d.ts +0 -16
- package/dist/adapters/cfx/cfx-capabilities.js +0 -70
- package/dist/adapters/cfx/cfx-platform.d.ts +0 -2
- package/dist/adapters/cfx/cfx-platform.js +0 -85
- package/dist/adapters/cfx/index.d.ts +0 -3
- package/dist/adapters/cfx/index.js +0 -3
- package/dist/adapters/cfx/runtime-profile.d.ts +0 -3
- package/dist/adapters/cfx/runtime-profile.js +0 -37
- package/dist/adapters/contracts/IPlatformCapabilities.d.ts +0 -79
- package/dist/adapters/contracts/IPlatformCapabilities.js +0 -27
- package/dist/adapters/contracts/client/IPedAppearanceClient.d.ts +0 -206
- package/dist/adapters/contracts/client/IPedAppearanceClient.js +0 -12
- package/dist/adapters/fivem/fivem-capabilities.d.ts +0 -18
- package/dist/adapters/fivem/fivem-capabilities.js +0 -61
- package/dist/adapters/fivem/fivem-engine-events.d.ts +0 -5
- package/dist/adapters/fivem/fivem-engine-events.js +0 -24
- package/dist/adapters/fivem/fivem-entity-server.d.ts +0 -26
- package/dist/adapters/fivem/fivem-entity-server.js +0 -87
- package/dist/adapters/fivem/fivem-exports.d.ts +0 -5
- package/dist/adapters/fivem/fivem-exports.js +0 -9
- package/dist/adapters/fivem/fivem-hasher.d.ts +0 -7
- package/dist/adapters/fivem/fivem-net-transport.d.ts +0 -1
- package/dist/adapters/fivem/fivem-ped-appearance-client.d.ts +0 -34
- package/dist/adapters/fivem/fivem-ped-appearance-client.js +0 -79
- package/dist/adapters/fivem/fivem-ped-appearance-server.d.ts +0 -14
- package/dist/adapters/fivem/fivem-ped-appearance-server.js +0 -22
- package/dist/adapters/fivem/fivem-ped-server.d.ts +0 -9
- package/dist/adapters/fivem/fivem-ped-server.js +0 -30
- package/dist/adapters/fivem/fivem-platform.d.ts +0 -5
- package/dist/adapters/fivem/fivem-platform.js +0 -74
- package/dist/adapters/fivem/fivem-player-server.d.ts +0 -24
- package/dist/adapters/fivem/fivem-player-server.js +0 -83
- package/dist/adapters/fivem/fivem-playerinfo.d.ts +0 -6
- package/dist/adapters/fivem/fivem-playerinfo.js +0 -10
- package/dist/adapters/fivem/fivem-resourceinfo.d.ts +0 -5
- package/dist/adapters/fivem/fivem-resourceinfo.js +0 -24
- package/dist/adapters/fivem/fivem-tick.d.ts +0 -7
- package/dist/adapters/fivem/fivem-vehicle-server.d.ts +0 -15
- package/dist/adapters/fivem/fivem-vehicle-server.js +0 -44
- package/dist/adapters/fivem/index.d.ts +0 -14
- package/dist/adapters/fivem/index.js +0 -16
- package/dist/adapters/fivem/transport/adapter.d.ts +0 -8
- package/dist/adapters/fivem/transport/adapter.js +0 -8
- package/dist/adapters/fivem/transport/fivem.events.d.ts +0 -8
- package/dist/adapters/fivem/transport/fivem.events.js +0 -36
- package/dist/adapters/fivem/transport/fivem.rpc.d.ts +0 -28
- package/dist/adapters/fivem/transport/fivem.rpc.js +0 -183
- package/dist/runtime/client/controllers/player-sync.controller.d.ts +0 -11
- package/dist/runtime/client/controllers/player-sync.controller.js +0 -51
- package/dist/runtime/client/player/player.d.ts +0 -262
- package/dist/runtime/client/player/player.js +0 -474
- package/dist/runtime/client/player/player.loader.d.ts +0 -1
- package/dist/runtime/client/player/player.loader.js +0 -18
- package/dist/runtime/server/helpers/process-tuple-schema.d.ts +0 -20
- package/dist/runtime/server/helpers/process-tuple-schema.js +0 -56
- /package/dist/adapters/{fivem/fivem-net-transport.js → contracts/client/spawn/types.js} +0 -0
|
@@ -1,112 +1,25 @@
|
|
|
1
1
|
import { Vector3 } from '../../../kernel/utils/vector3';
|
|
2
|
-
|
|
3
|
-
/** Blip sprite ID (icon) */
|
|
4
|
-
sprite?: number;
|
|
5
|
-
/** Blip color ID */
|
|
6
|
-
color?: number;
|
|
7
|
-
/** Blip scale */
|
|
8
|
-
scale?: number;
|
|
9
|
-
/** Short range blip (only visible nearby) */
|
|
10
|
-
shortRange?: boolean;
|
|
11
|
-
/** Blip label/name */
|
|
12
|
-
label?: string;
|
|
13
|
-
/** Display category (affects visibility on map) */
|
|
14
|
-
display?: number;
|
|
15
|
-
/** Blip category */
|
|
16
|
-
category?: number;
|
|
17
|
-
/** Flash the blip */
|
|
18
|
-
flash?: boolean;
|
|
19
|
-
/** Blip alpha (0-255) */
|
|
20
|
-
alpha?: number;
|
|
21
|
-
/** Route to this blip */
|
|
22
|
-
route?: boolean;
|
|
23
|
-
/** Route color */
|
|
24
|
-
routeColor?: number;
|
|
25
|
-
}
|
|
2
|
+
import { IClientBlipBridge, type ClientBlipDefinition, type ClientBlipOptions as BlipOptions } from '../../../adapters/contracts/client/ui/IClientBlipBridge';
|
|
26
3
|
export interface ManagedBlip {
|
|
27
4
|
id: string;
|
|
28
|
-
|
|
29
|
-
position: Vector3;
|
|
30
|
-
options: BlipOptions;
|
|
5
|
+
definition: ClientBlipDefinition;
|
|
31
6
|
}
|
|
32
|
-
/**
|
|
33
|
-
* Service for creating and managing map blips.
|
|
34
|
-
*/
|
|
35
7
|
export declare class BlipService {
|
|
8
|
+
private readonly bridge;
|
|
36
9
|
private blips;
|
|
37
10
|
private idCounter;
|
|
38
|
-
|
|
39
|
-
* Create a blip at a world position.
|
|
40
|
-
*
|
|
41
|
-
* @param position - World position
|
|
42
|
-
* @param options - Blip options
|
|
43
|
-
* @returns The blip ID
|
|
44
|
-
*/
|
|
11
|
+
constructor(bridge: IClientBlipBridge);
|
|
45
12
|
create(position: Vector3, options?: BlipOptions): string;
|
|
46
|
-
/**
|
|
47
|
-
* Create a blip attached to an entity.
|
|
48
|
-
*
|
|
49
|
-
* @param entity - Entity handle
|
|
50
|
-
* @param options - Blip options
|
|
51
|
-
* @returns The blip ID
|
|
52
|
-
*/
|
|
53
13
|
createForEntity(entity: number, options?: BlipOptions): string;
|
|
54
|
-
/**
|
|
55
|
-
* Create a blip for a radius/area.
|
|
56
|
-
*
|
|
57
|
-
* @param position - Center position
|
|
58
|
-
* @param radius - Radius of the area
|
|
59
|
-
* @param options - Blip options
|
|
60
|
-
* @returns The blip ID
|
|
61
|
-
*/
|
|
62
14
|
createForRadius(position: Vector3, radius: number, options?: BlipOptions): string;
|
|
63
|
-
/**
|
|
64
|
-
* Remove a blip by ID.
|
|
65
|
-
*
|
|
66
|
-
* @param id - The blip ID
|
|
67
|
-
*/
|
|
68
15
|
remove(id: string): boolean;
|
|
69
|
-
/**
|
|
70
|
-
* Remove all managed blips.
|
|
71
|
-
*/
|
|
72
16
|
removeAll(): void;
|
|
73
|
-
/**
|
|
74
|
-
* Update blip options.
|
|
75
|
-
*
|
|
76
|
-
* @param id - The blip ID
|
|
77
|
-
* @param options - New options to apply
|
|
78
|
-
*/
|
|
79
17
|
update(id: string, options: Partial<BlipOptions>): boolean;
|
|
80
|
-
/**
|
|
81
|
-
* Set blip position.
|
|
82
|
-
*
|
|
83
|
-
* @param id - The blip ID
|
|
84
|
-
* @param position - New position
|
|
85
|
-
*/
|
|
86
18
|
setPosition(id: string, position: Vector3): boolean;
|
|
87
|
-
/**
|
|
88
|
-
* Set whether a route should be drawn to the blip.
|
|
89
|
-
*
|
|
90
|
-
* @param id - The blip ID
|
|
91
|
-
* @param enabled - Whether to show the route
|
|
92
|
-
* @param color - Optional route color
|
|
93
|
-
*/
|
|
94
19
|
setRoute(id: string, enabled: boolean, color?: number): boolean;
|
|
95
|
-
/**
|
|
96
|
-
* Get blip by ID.
|
|
97
|
-
*/
|
|
98
20
|
get(id: string): ManagedBlip | undefined;
|
|
99
|
-
/**
|
|
100
|
-
* Get all managed blips.
|
|
101
|
-
*/
|
|
102
21
|
getAll(): ManagedBlip[];
|
|
103
|
-
/**
|
|
104
|
-
* Get the native blip handle by ID.
|
|
105
|
-
*/
|
|
106
|
-
getHandle(id: string): number | undefined;
|
|
107
|
-
/**
|
|
108
|
-
* Check if a blip still exists in the game world.
|
|
109
|
-
*/
|
|
110
22
|
exists(id: string): boolean;
|
|
111
|
-
private
|
|
23
|
+
private buildDefinition;
|
|
24
|
+
private normalizeOptions;
|
|
112
25
|
}
|
|
@@ -4,206 +4,111 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
11
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
12
|
+
};
|
|
13
|
+
import { inject, injectable } from 'tsyringe';
|
|
14
|
+
import { IClientBlipBridge, } from '../../../adapters/contracts/client/ui/IClientBlipBridge';
|
|
8
15
|
const DEFAULT_OPTIONS = {
|
|
9
|
-
|
|
16
|
+
icon: 1,
|
|
10
17
|
color: 1,
|
|
11
18
|
scale: 1.0,
|
|
12
19
|
shortRange: true,
|
|
13
|
-
display: 4,
|
|
14
|
-
category: 0,
|
|
15
|
-
flash: false,
|
|
16
20
|
alpha: 255,
|
|
17
21
|
route: false,
|
|
22
|
+
visible: true,
|
|
18
23
|
};
|
|
19
|
-
/**
|
|
20
|
-
* Service for creating and managing map blips.
|
|
21
|
-
*/
|
|
22
24
|
let BlipService = class BlipService {
|
|
25
|
+
bridge;
|
|
23
26
|
blips = new Map();
|
|
24
27
|
idCounter = 0;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
* @param position - World position
|
|
29
|
-
* @param options - Blip options
|
|
30
|
-
* @returns The blip ID
|
|
31
|
-
*/
|
|
28
|
+
constructor(bridge) {
|
|
29
|
+
this.bridge = bridge;
|
|
30
|
+
}
|
|
32
31
|
create(position, options = {}) {
|
|
33
32
|
const id = `blip_${++this.idCounter}`;
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
this.
|
|
37
|
-
this.blips.set(id, { id, handle, position, options: opts });
|
|
33
|
+
const definition = this.buildDefinition({ position }, options);
|
|
34
|
+
this.bridge.create(id, definition);
|
|
35
|
+
this.blips.set(id, { id, definition });
|
|
38
36
|
return id;
|
|
39
37
|
}
|
|
40
|
-
/**
|
|
41
|
-
* Create a blip attached to an entity.
|
|
42
|
-
*
|
|
43
|
-
* @param entity - Entity handle
|
|
44
|
-
* @param options - Blip options
|
|
45
|
-
* @returns The blip ID
|
|
46
|
-
*/
|
|
47
38
|
createForEntity(entity, options = {}) {
|
|
48
39
|
const id = `blip_${++this.idCounter}`;
|
|
49
|
-
const
|
|
50
|
-
|
|
51
|
-
this.
|
|
52
|
-
const [x, y, z] = GetEntityCoords(entity, true);
|
|
53
|
-
this.blips.set(id, { id, handle, position: { x, y, z }, options: opts });
|
|
40
|
+
const definition = this.buildDefinition({ entity }, options);
|
|
41
|
+
this.bridge.create(id, definition);
|
|
42
|
+
this.blips.set(id, { id, definition });
|
|
54
43
|
return id;
|
|
55
44
|
}
|
|
56
|
-
/**
|
|
57
|
-
* Create a blip for a radius/area.
|
|
58
|
-
*
|
|
59
|
-
* @param position - Center position
|
|
60
|
-
* @param radius - Radius of the area
|
|
61
|
-
* @param options - Blip options
|
|
62
|
-
* @returns The blip ID
|
|
63
|
-
*/
|
|
64
45
|
createForRadius(position, radius, options = {}) {
|
|
65
46
|
const id = `blip_${++this.idCounter}`;
|
|
66
|
-
const
|
|
67
|
-
|
|
68
|
-
this.
|
|
69
|
-
this.blips.set(id, { id, handle, position, options: opts });
|
|
47
|
+
const definition = this.buildDefinition({ position, radius }, options);
|
|
48
|
+
this.bridge.create(id, definition);
|
|
49
|
+
this.blips.set(id, { id, definition });
|
|
70
50
|
return id;
|
|
71
51
|
}
|
|
72
|
-
/**
|
|
73
|
-
* Remove a blip by ID.
|
|
74
|
-
*
|
|
75
|
-
* @param id - The blip ID
|
|
76
|
-
*/
|
|
77
52
|
remove(id) {
|
|
78
|
-
const
|
|
79
|
-
if (
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
RemoveBlip(blip.handle);
|
|
83
|
-
}
|
|
84
|
-
this.blips.delete(id);
|
|
85
|
-
return true;
|
|
53
|
+
const removed = this.bridge.remove(id);
|
|
54
|
+
if (removed)
|
|
55
|
+
this.blips.delete(id);
|
|
56
|
+
return removed;
|
|
86
57
|
}
|
|
87
|
-
/**
|
|
88
|
-
* Remove all managed blips.
|
|
89
|
-
*/
|
|
90
58
|
removeAll() {
|
|
91
|
-
|
|
92
|
-
if (DoesBlipExist(blip.handle)) {
|
|
93
|
-
RemoveBlip(blip.handle);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
59
|
+
this.bridge.clear();
|
|
96
60
|
this.blips.clear();
|
|
97
61
|
}
|
|
98
|
-
/**
|
|
99
|
-
* Update blip options.
|
|
100
|
-
*
|
|
101
|
-
* @param id - The blip ID
|
|
102
|
-
* @param options - New options to apply
|
|
103
|
-
*/
|
|
104
62
|
update(id, options) {
|
|
105
63
|
const blip = this.blips.get(id);
|
|
106
|
-
if (!blip
|
|
64
|
+
if (!blip)
|
|
65
|
+
return false;
|
|
66
|
+
const patch = this.normalizeOptions(options);
|
|
67
|
+
const updated = this.bridge.update(id, patch);
|
|
68
|
+
if (!updated)
|
|
107
69
|
return false;
|
|
108
|
-
blip.
|
|
109
|
-
|
|
110
|
-
return true;
|
|
70
|
+
blip.definition = { ...blip.definition, ...patch };
|
|
71
|
+
return updated;
|
|
111
72
|
}
|
|
112
|
-
/**
|
|
113
|
-
* Set blip position.
|
|
114
|
-
*
|
|
115
|
-
* @param id - The blip ID
|
|
116
|
-
* @param position - New position
|
|
117
|
-
*/
|
|
118
73
|
setPosition(id, position) {
|
|
119
74
|
const blip = this.blips.get(id);
|
|
120
|
-
if (!blip
|
|
75
|
+
if (!blip)
|
|
76
|
+
return false;
|
|
77
|
+
const updated = this.bridge.update(id, { position, entity: undefined, radius: undefined });
|
|
78
|
+
if (!updated)
|
|
121
79
|
return false;
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
return true;
|
|
80
|
+
blip.definition = { ...blip.definition, position, entity: undefined, radius: undefined };
|
|
81
|
+
return updated;
|
|
125
82
|
}
|
|
126
|
-
/**
|
|
127
|
-
* Set whether a route should be drawn to the blip.
|
|
128
|
-
*
|
|
129
|
-
* @param id - The blip ID
|
|
130
|
-
* @param enabled - Whether to show the route
|
|
131
|
-
* @param color - Optional route color
|
|
132
|
-
*/
|
|
133
83
|
setRoute(id, enabled, color) {
|
|
134
|
-
|
|
135
|
-
if (!blip || !DoesBlipExist(blip.handle))
|
|
136
|
-
return false;
|
|
137
|
-
SetBlipRoute(blip.handle, enabled);
|
|
138
|
-
if (color !== undefined) {
|
|
139
|
-
SetBlipRouteColour(blip.handle, color);
|
|
140
|
-
}
|
|
141
|
-
return true;
|
|
84
|
+
return this.update(id, { route: enabled, routeColor: color });
|
|
142
85
|
}
|
|
143
|
-
/**
|
|
144
|
-
* Get blip by ID.
|
|
145
|
-
*/
|
|
146
86
|
get(id) {
|
|
147
87
|
return this.blips.get(id);
|
|
148
88
|
}
|
|
149
|
-
/**
|
|
150
|
-
* Get all managed blips.
|
|
151
|
-
*/
|
|
152
89
|
getAll() {
|
|
153
90
|
return Array.from(this.blips.values());
|
|
154
91
|
}
|
|
155
|
-
/**
|
|
156
|
-
* Get the native blip handle by ID.
|
|
157
|
-
*/
|
|
158
|
-
getHandle(id) {
|
|
159
|
-
return this.blips.get(id)?.handle;
|
|
160
|
-
}
|
|
161
|
-
/**
|
|
162
|
-
* Check if a blip still exists in the game world.
|
|
163
|
-
*/
|
|
164
92
|
exists(id) {
|
|
165
|
-
|
|
166
|
-
|
|
93
|
+
return this.bridge.exists(id);
|
|
94
|
+
}
|
|
95
|
+
buildDefinition(base, options) {
|
|
96
|
+
return {
|
|
97
|
+
...base,
|
|
98
|
+
...this.normalizeOptions({ ...DEFAULT_OPTIONS, ...options }),
|
|
99
|
+
};
|
|
167
100
|
}
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
}
|
|
175
|
-
if (options.scale !== undefined) {
|
|
176
|
-
SetBlipScale(handle, options.scale);
|
|
177
|
-
}
|
|
178
|
-
if (options.shortRange !== undefined) {
|
|
179
|
-
SetBlipAsShortRange(handle, options.shortRange);
|
|
180
|
-
}
|
|
181
|
-
if (options.label) {
|
|
182
|
-
BeginTextCommandSetBlipName('STRING');
|
|
183
|
-
AddTextComponentString(options.label);
|
|
184
|
-
EndTextCommandSetBlipName(handle);
|
|
185
|
-
}
|
|
186
|
-
if (options.display !== undefined) {
|
|
187
|
-
SetBlipDisplay(handle, options.display);
|
|
188
|
-
}
|
|
189
|
-
if (options.category !== undefined) {
|
|
190
|
-
SetBlipCategory(handle, options.category);
|
|
191
|
-
}
|
|
192
|
-
if (options.flash !== undefined) {
|
|
193
|
-
SetBlipFlashes(handle, options.flash);
|
|
194
|
-
}
|
|
195
|
-
if (options.alpha !== undefined) {
|
|
196
|
-
SetBlipAlpha(handle, options.alpha);
|
|
197
|
-
}
|
|
198
|
-
if (options.route !== undefined) {
|
|
199
|
-
SetBlipRoute(handle, options.route);
|
|
200
|
-
if (options.routeColor !== undefined) {
|
|
201
|
-
SetBlipRouteColour(handle, options.routeColor);
|
|
202
|
-
}
|
|
203
|
-
}
|
|
101
|
+
normalizeOptions(options) {
|
|
102
|
+
const { sprite, icon, ...rest } = options;
|
|
103
|
+
return {
|
|
104
|
+
...rest,
|
|
105
|
+
icon: icon ?? sprite,
|
|
106
|
+
};
|
|
204
107
|
}
|
|
205
108
|
};
|
|
206
109
|
BlipService = __decorate([
|
|
207
|
-
injectable()
|
|
110
|
+
injectable(),
|
|
111
|
+
__param(0, inject(IClientBlipBridge)),
|
|
112
|
+
__metadata("design:paramtypes", [IClientBlipBridge])
|
|
208
113
|
], BlipService);
|
|
209
114
|
export { BlipService };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IClientPlatformBridge } from '../adapter/platform-bridge';
|
|
1
2
|
import { Camera } from './camera';
|
|
2
3
|
/**
|
|
3
4
|
* Reason reported when an effect instance is finalized.
|
|
@@ -61,8 +62,10 @@ export interface CameraEffectPreset {
|
|
|
61
62
|
* Registry for built-in and custom cinematic camera effects.
|
|
62
63
|
*/
|
|
63
64
|
export declare class CameraEffectsRegistry {
|
|
65
|
+
private readonly platform;
|
|
64
66
|
private effects;
|
|
65
67
|
private presets;
|
|
68
|
+
constructor(platform: IClientPlatformBridge);
|
|
66
69
|
/**
|
|
67
70
|
* Registers a single effect definition.
|
|
68
71
|
*/
|
|
@@ -4,13 +4,24 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
11
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
12
|
+
};
|
|
13
|
+
import { inject, injectable } from 'tsyringe';
|
|
14
|
+
import { IClientPlatformBridge } from '../adapter/platform-bridge';
|
|
8
15
|
/**
|
|
9
16
|
* Registry for built-in and custom cinematic camera effects.
|
|
10
17
|
*/
|
|
11
18
|
let CameraEffectsRegistry = class CameraEffectsRegistry {
|
|
19
|
+
platform;
|
|
12
20
|
effects = new Map();
|
|
13
21
|
presets = new Map();
|
|
22
|
+
constructor(platform) {
|
|
23
|
+
this.platform = platform;
|
|
24
|
+
}
|
|
14
25
|
/**
|
|
15
26
|
* Registers a single effect definition.
|
|
16
27
|
*/
|
|
@@ -59,7 +70,7 @@ let CameraEffectsRegistry = class CameraEffectsRegistry {
|
|
|
59
70
|
defaults: { ms: 500 },
|
|
60
71
|
setup: (_ctx, params) => {
|
|
61
72
|
const ms = Number(params.ms ?? 500);
|
|
62
|
-
|
|
73
|
+
this.platform.doScreenFadeIn(ms);
|
|
63
74
|
},
|
|
64
75
|
});
|
|
65
76
|
this.register({
|
|
@@ -67,7 +78,7 @@ let CameraEffectsRegistry = class CameraEffectsRegistry {
|
|
|
67
78
|
defaults: { ms: 500 },
|
|
68
79
|
setup: (_ctx, params) => {
|
|
69
80
|
const ms = Number(params.ms ?? 500);
|
|
70
|
-
|
|
81
|
+
this.platform.doScreenFadeOut(ms);
|
|
71
82
|
},
|
|
72
83
|
});
|
|
73
84
|
this.register({
|
|
@@ -90,11 +101,11 @@ let CameraEffectsRegistry = class CameraEffectsRegistry {
|
|
|
90
101
|
const p = params;
|
|
91
102
|
const name = String(p.name ?? 'default');
|
|
92
103
|
const strength = Number(p.strength ?? 1);
|
|
93
|
-
|
|
94
|
-
|
|
104
|
+
this.platform.setTimecycleModifier(name);
|
|
105
|
+
this.platform.setTimecycleModifierStrength(strength);
|
|
95
106
|
},
|
|
96
107
|
teardown: () => {
|
|
97
|
-
|
|
108
|
+
this.platform.clearTimecycleModifier();
|
|
98
109
|
},
|
|
99
110
|
});
|
|
100
111
|
this.register({
|
|
@@ -140,6 +151,8 @@ let CameraEffectsRegistry = class CameraEffectsRegistry {
|
|
|
140
151
|
}
|
|
141
152
|
};
|
|
142
153
|
CameraEffectsRegistry = __decorate([
|
|
143
|
-
injectable()
|
|
154
|
+
injectable(),
|
|
155
|
+
__param(0, inject(IClientPlatformBridge)),
|
|
156
|
+
__metadata("design:paramtypes", [IClientPlatformBridge])
|
|
144
157
|
], CameraEffectsRegistry);
|
|
145
158
|
export { CameraEffectsRegistry };
|
|
@@ -1,129 +1,49 @@
|
|
|
1
1
|
import { Vector3 } from '../../../kernel/utils/vector3';
|
|
2
|
-
|
|
3
|
-
* Camera rotation represented in degrees.
|
|
4
|
-
*/
|
|
2
|
+
import { IClientPlatformBridge } from '../adapter/platform-bridge';
|
|
5
3
|
export interface CameraRotation {
|
|
6
4
|
x: number;
|
|
7
5
|
y: number;
|
|
8
6
|
z: number;
|
|
9
7
|
}
|
|
10
|
-
/**
|
|
11
|
-
* Full camera transform in world space.
|
|
12
|
-
*/
|
|
13
8
|
export interface CameraTransform {
|
|
14
9
|
position: Vector3;
|
|
15
10
|
rotation?: CameraRotation;
|
|
16
11
|
fov?: number;
|
|
17
12
|
}
|
|
18
|
-
/**
|
|
19
|
-
* Configuration used when creating and activating a scripted camera.
|
|
20
|
-
*/
|
|
21
13
|
export interface CameraCreateOptions {
|
|
22
|
-
/** Native camera name, defaults to DEFAULT_SCRIPTED_CAMERA. */
|
|
23
14
|
camName?: string;
|
|
24
|
-
/** Whether the created camera should become active immediately. */
|
|
25
15
|
active?: boolean;
|
|
26
|
-
/** Optional initial transform. */
|
|
27
16
|
transform?: CameraTransform;
|
|
28
17
|
}
|
|
29
|
-
/**
|
|
30
|
-
* Render options used when enabling/disabling scripted camera rendering.
|
|
31
|
-
*/
|
|
32
18
|
export interface CameraRenderOptions {
|
|
33
|
-
/** Smooth transition in or out. */
|
|
34
19
|
ease?: boolean;
|
|
35
|
-
/** Transition duration in milliseconds. */
|
|
36
20
|
easeTimeMs?: number;
|
|
37
21
|
}
|
|
38
|
-
/**
|
|
39
|
-
* Shake configuration for scripted camera effects.
|
|
40
|
-
*/
|
|
41
22
|
export interface CameraShakeOptions {
|
|
42
|
-
/** Native shake type name, e.g. HAND_SHAKE. */
|
|
43
23
|
type: string;
|
|
44
|
-
/** Shake amplitude. */
|
|
45
24
|
amplitude: number;
|
|
46
25
|
}
|
|
47
|
-
/**
|
|
48
|
-
* Injectable camera API that wraps FiveM scripted camera natives.
|
|
49
|
-
*
|
|
50
|
-
* @remarks
|
|
51
|
-
* This class intentionally exposes low-level camera primitives so higher-level
|
|
52
|
-
* systems can build cinematic workflows on top of it.
|
|
53
|
-
*/
|
|
54
26
|
export declare class Camera {
|
|
27
|
+
private readonly platform;
|
|
55
28
|
private activeCam;
|
|
56
29
|
private rendering;
|
|
57
|
-
|
|
58
|
-
* Creates a scripted camera and optionally initializes its transform.
|
|
59
|
-
*/
|
|
30
|
+
constructor(platform: IClientPlatformBridge);
|
|
60
31
|
create(options?: CameraCreateOptions): number;
|
|
61
|
-
/**
|
|
62
|
-
* Returns the currently tracked active camera handle.
|
|
63
|
-
*/
|
|
64
32
|
getActiveCam(): number | null;
|
|
65
|
-
/**
|
|
66
|
-
* Sets camera active state and tracks active handle.
|
|
67
|
-
*/
|
|
68
33
|
setActive(cam: number, active: boolean): void;
|
|
69
|
-
/**
|
|
70
|
-
* Enables or disables scripted camera rendering.
|
|
71
|
-
*/
|
|
72
34
|
render(enable: boolean, options?: CameraRenderOptions): void;
|
|
73
|
-
/**
|
|
74
|
-
* Returns whether scripted camera rendering is currently enabled.
|
|
75
|
-
*/
|
|
76
35
|
isRendering(): boolean;
|
|
77
|
-
/**
|
|
78
|
-
* Destroys a single camera.
|
|
79
|
-
*/
|
|
80
36
|
destroy(cam: number, destroyActiveCam?: boolean): void;
|
|
81
|
-
/**
|
|
82
|
-
* Destroys all scripted cameras managed by the game runtime.
|
|
83
|
-
*/
|
|
84
37
|
destroyAll(destroyActiveCam?: boolean): void;
|
|
85
|
-
/**
|
|
86
|
-
* Sets camera world position.
|
|
87
|
-
*/
|
|
88
38
|
setPosition(cam: number, position: Vector3): void;
|
|
89
|
-
/**
|
|
90
|
-
* Sets camera world rotation.
|
|
91
|
-
*/
|
|
92
39
|
setRotation(cam: number, rotation: CameraRotation, rotationOrder?: number): void;
|
|
93
|
-
/**
|
|
94
|
-
* Sets camera field of view.
|
|
95
|
-
*/
|
|
96
40
|
setFov(cam: number, fov: number): void;
|
|
97
|
-
/**
|
|
98
|
-
* Applies a full transform to a camera in a single call path.
|
|
99
|
-
*/
|
|
100
41
|
setTransform(cam: number, transform: CameraTransform): void;
|
|
101
|
-
/**
|
|
102
|
-
* Points a camera at world coordinates.
|
|
103
|
-
*/
|
|
104
42
|
pointAtCoords(cam: number, position: Vector3): void;
|
|
105
|
-
/**
|
|
106
|
-
* Points a camera at an entity with an optional offset.
|
|
107
|
-
*/
|
|
108
43
|
pointAtEntity(cam: number, entity: number, offset?: Vector3): void;
|
|
109
|
-
/**
|
|
110
|
-
* Removes point-at target from the camera.
|
|
111
|
-
*/
|
|
112
44
|
stopPointing(cam: number): void;
|
|
113
|
-
/**
|
|
114
|
-
* Interpolates from one camera to another using native interpolation.
|
|
115
|
-
*/
|
|
116
45
|
interpolate(fromCam: number, toCam: number, durationMs: number, easeLocation?: boolean, easeRotation?: boolean): void;
|
|
117
|
-
/**
|
|
118
|
-
* Starts a camera shake effect.
|
|
119
|
-
*/
|
|
120
46
|
shake(cam: number, options: CameraShakeOptions): void;
|
|
121
|
-
/**
|
|
122
|
-
* Stops camera shake for a camera.
|
|
123
|
-
*/
|
|
124
47
|
stopShaking(cam: number, stopImmediately?: boolean): void;
|
|
125
|
-
/**
|
|
126
|
-
* Fully resets camera rendering and internal camera tracking.
|
|
127
|
-
*/
|
|
128
48
|
reset(options?: CameraRenderOptions): void;
|
|
129
49
|
}
|