@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
|
@@ -4,155 +4,99 @@ 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
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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';
|
|
15
15
|
let Camera = class Camera {
|
|
16
|
+
platform;
|
|
16
17
|
activeCam = null;
|
|
17
18
|
rendering = false;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
constructor(platform) {
|
|
20
|
+
this.platform = platform;
|
|
21
|
+
}
|
|
21
22
|
create(options = {}) {
|
|
22
|
-
const cam =
|
|
23
|
-
if (options.transform)
|
|
23
|
+
const cam = this.platform.createCam(options.camName ?? 'DEFAULT_SCRIPTED_CAMERA', options.active ?? false);
|
|
24
|
+
if (options.transform)
|
|
24
25
|
this.setTransform(cam, options.transform);
|
|
25
|
-
|
|
26
|
-
if (options.active) {
|
|
26
|
+
if (options.active)
|
|
27
27
|
this.activeCam = cam;
|
|
28
|
-
}
|
|
29
28
|
return cam;
|
|
30
29
|
}
|
|
31
|
-
/**
|
|
32
|
-
* Returns the currently tracked active camera handle.
|
|
33
|
-
*/
|
|
34
30
|
getActiveCam() {
|
|
35
31
|
return this.activeCam;
|
|
36
32
|
}
|
|
37
|
-
/**
|
|
38
|
-
* Sets camera active state and tracks active handle.
|
|
39
|
-
*/
|
|
40
33
|
setActive(cam, active) {
|
|
41
|
-
|
|
42
|
-
if (active)
|
|
34
|
+
this.platform.setCamActive(cam, active);
|
|
35
|
+
if (active)
|
|
43
36
|
this.activeCam = cam;
|
|
44
|
-
|
|
45
|
-
else if (this.activeCam === cam) {
|
|
37
|
+
else if (this.activeCam === cam)
|
|
46
38
|
this.activeCam = null;
|
|
47
|
-
}
|
|
48
39
|
}
|
|
49
|
-
/**
|
|
50
|
-
* Enables or disables scripted camera rendering.
|
|
51
|
-
*/
|
|
52
40
|
render(enable, options = {}) {
|
|
53
|
-
|
|
41
|
+
this.platform.renderScriptCams(enable, options.ease ?? false, options.easeTimeMs ?? 0, true, true);
|
|
54
42
|
this.rendering = enable;
|
|
55
43
|
}
|
|
56
|
-
/**
|
|
57
|
-
* Returns whether scripted camera rendering is currently enabled.
|
|
58
|
-
*/
|
|
59
44
|
isRendering() {
|
|
60
45
|
return this.rendering;
|
|
61
46
|
}
|
|
62
|
-
/**
|
|
63
|
-
* Destroys a single camera.
|
|
64
|
-
*/
|
|
65
47
|
destroy(cam, destroyActiveCam = false) {
|
|
66
|
-
|
|
67
|
-
if (this.activeCam === cam)
|
|
48
|
+
this.platform.destroyCam(cam, destroyActiveCam);
|
|
49
|
+
if (this.activeCam === cam)
|
|
68
50
|
this.activeCam = null;
|
|
69
|
-
}
|
|
70
51
|
}
|
|
71
|
-
/**
|
|
72
|
-
* Destroys all scripted cameras managed by the game runtime.
|
|
73
|
-
*/
|
|
74
52
|
destroyAll(destroyActiveCam = false) {
|
|
75
|
-
|
|
53
|
+
this.platform.destroyAllCams(destroyActiveCam);
|
|
76
54
|
this.activeCam = null;
|
|
77
55
|
}
|
|
78
|
-
/**
|
|
79
|
-
* Sets camera world position.
|
|
80
|
-
*/
|
|
81
56
|
setPosition(cam, position) {
|
|
82
|
-
|
|
57
|
+
this.platform.setCamCoord(cam, position);
|
|
83
58
|
}
|
|
84
|
-
/**
|
|
85
|
-
* Sets camera world rotation.
|
|
86
|
-
*/
|
|
87
59
|
setRotation(cam, rotation, rotationOrder = 2) {
|
|
88
|
-
|
|
60
|
+
this.platform.setCamRot(cam, rotation, rotationOrder);
|
|
89
61
|
}
|
|
90
|
-
/**
|
|
91
|
-
* Sets camera field of view.
|
|
92
|
-
*/
|
|
93
62
|
setFov(cam, fov) {
|
|
94
|
-
|
|
63
|
+
this.platform.setCamFov(cam, fov);
|
|
95
64
|
}
|
|
96
|
-
/**
|
|
97
|
-
* Applies a full transform to a camera in a single call path.
|
|
98
|
-
*/
|
|
99
65
|
setTransform(cam, transform) {
|
|
100
66
|
this.setPosition(cam, transform.position);
|
|
101
|
-
if (transform.rotation)
|
|
67
|
+
if (transform.rotation)
|
|
102
68
|
this.setRotation(cam, transform.rotation);
|
|
103
|
-
|
|
104
|
-
if (typeof transform.fov === 'number') {
|
|
69
|
+
if (typeof transform.fov === 'number')
|
|
105
70
|
this.setFov(cam, transform.fov);
|
|
106
|
-
}
|
|
107
71
|
}
|
|
108
|
-
/**
|
|
109
|
-
* Points a camera at world coordinates.
|
|
110
|
-
*/
|
|
111
72
|
pointAtCoords(cam, position) {
|
|
112
|
-
|
|
73
|
+
this.platform.pointCamAtCoord(cam, position);
|
|
113
74
|
}
|
|
114
|
-
/**
|
|
115
|
-
* Points a camera at an entity with an optional offset.
|
|
116
|
-
*/
|
|
117
75
|
pointAtEntity(cam, entity, offset = { x: 0, y: 0, z: 0 }) {
|
|
118
|
-
|
|
76
|
+
this.platform.pointCamAtEntity(cam, entity, offset);
|
|
119
77
|
}
|
|
120
|
-
/**
|
|
121
|
-
* Removes point-at target from the camera.
|
|
122
|
-
*/
|
|
123
78
|
stopPointing(cam) {
|
|
124
|
-
|
|
79
|
+
this.platform.stopCamPointing(cam);
|
|
125
80
|
}
|
|
126
|
-
/**
|
|
127
|
-
* Interpolates from one camera to another using native interpolation.
|
|
128
|
-
*/
|
|
129
81
|
interpolate(fromCam, toCam, durationMs, easeLocation = true, easeRotation = true) {
|
|
130
|
-
|
|
82
|
+
this.platform.setCamActiveWithInterp(toCam, fromCam, durationMs, easeLocation ? 1 : 0, easeRotation ? 1 : 0);
|
|
131
83
|
this.activeCam = toCam;
|
|
132
84
|
}
|
|
133
|
-
/**
|
|
134
|
-
* Starts a camera shake effect.
|
|
135
|
-
*/
|
|
136
85
|
shake(cam, options) {
|
|
137
|
-
|
|
86
|
+
this.platform.shakeCam(cam, options.type, options.amplitude);
|
|
138
87
|
}
|
|
139
|
-
/**
|
|
140
|
-
* Stops camera shake for a camera.
|
|
141
|
-
*/
|
|
142
88
|
stopShaking(cam, stopImmediately = true) {
|
|
143
|
-
|
|
89
|
+
this.platform.stopCamShaking(cam, stopImmediately);
|
|
144
90
|
}
|
|
145
|
-
/**
|
|
146
|
-
* Fully resets camera rendering and internal camera tracking.
|
|
147
|
-
*/
|
|
148
91
|
reset(options = {}) {
|
|
149
|
-
if (this.rendering)
|
|
92
|
+
if (this.rendering)
|
|
150
93
|
this.render(false, options);
|
|
151
|
-
}
|
|
152
94
|
this.destroyAll(false);
|
|
153
95
|
}
|
|
154
96
|
};
|
|
155
97
|
Camera = __decorate([
|
|
156
|
-
injectable()
|
|
98
|
+
injectable(),
|
|
99
|
+
__param(0, inject(IClientPlatformBridge)),
|
|
100
|
+
__metadata("design:paramtypes", [IClientPlatformBridge])
|
|
157
101
|
], Camera);
|
|
158
102
|
export { Camera };
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { Vector3 } from '../../../kernel/utils/vector3';
|
|
2
|
+
import { IClientPlatformBridge } from '../adapter/platform-bridge';
|
|
3
|
+
import { IClientRuntimeBridge } from '../adapter/runtime-bridge';
|
|
2
4
|
import { type CameraEffectDefinition, type CameraEffectReference, CameraEffectsRegistry } from './camera-effects.registry';
|
|
3
5
|
import { type CameraRotation, Camera } from './camera';
|
|
4
6
|
import { SceneBuilder, type SceneBuildable } from './cinematic-builder';
|
|
@@ -227,12 +229,14 @@ export declare class CinematicHandle {
|
|
|
227
229
|
*/
|
|
228
230
|
export declare class Cinematic {
|
|
229
231
|
private readonly camera;
|
|
232
|
+
private readonly platform;
|
|
233
|
+
private readonly runtimeBridge;
|
|
230
234
|
/**
|
|
231
235
|
* Exposes the registry so consumers can add custom effects and presets.
|
|
232
236
|
*/
|
|
233
237
|
readonly effects: CameraEffectsRegistry;
|
|
234
238
|
private activeRuntime;
|
|
235
|
-
constructor(camera: Camera, effectsRegistry: CameraEffectsRegistry);
|
|
239
|
+
constructor(camera: Camera, effectsRegistry: CameraEffectsRegistry, platform: IClientPlatformBridge, runtimeBridge: IClientRuntimeBridge);
|
|
236
240
|
/**
|
|
237
241
|
* Creates a fluent cinematic scene builder bound to this service.
|
|
238
242
|
*/
|
|
@@ -7,7 +7,12 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
9
|
};
|
|
10
|
-
|
|
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';
|
|
15
|
+
import { IClientRuntimeBridge } from '../adapter/runtime-bridge';
|
|
11
16
|
import { CameraEffectsRegistry, } from './camera-effects.registry';
|
|
12
17
|
import { Camera } from './camera';
|
|
13
18
|
import { SceneBuilder } from './cinematic-builder';
|
|
@@ -46,7 +51,7 @@ export class CinematicHandle {
|
|
|
46
51
|
if (this.runtime.paused)
|
|
47
52
|
return;
|
|
48
53
|
this.runtime.paused = true;
|
|
49
|
-
this.runtime.pauseStartedAt =
|
|
54
|
+
this.runtime.pauseStartedAt = Date.now();
|
|
50
55
|
this.emit('paused', undefined);
|
|
51
56
|
}
|
|
52
57
|
/**
|
|
@@ -144,19 +149,23 @@ export class CinematicHandle {
|
|
|
144
149
|
*/
|
|
145
150
|
let Cinematic = class Cinematic {
|
|
146
151
|
camera;
|
|
152
|
+
platform;
|
|
153
|
+
runtimeBridge;
|
|
147
154
|
/**
|
|
148
155
|
* Exposes the registry so consumers can add custom effects and presets.
|
|
149
156
|
*/
|
|
150
157
|
effects;
|
|
151
158
|
activeRuntime = null;
|
|
152
|
-
constructor(camera, effectsRegistry) {
|
|
159
|
+
constructor(camera, effectsRegistry, platform, runtimeBridge) {
|
|
153
160
|
this.camera = camera;
|
|
161
|
+
this.platform = platform;
|
|
162
|
+
this.runtimeBridge = runtimeBridge;
|
|
154
163
|
this.effects = effectsRegistry;
|
|
155
164
|
if (!this.effects.has('fadeIn')) {
|
|
156
165
|
this.effects.registerBuiltins();
|
|
157
166
|
}
|
|
158
|
-
const currentResource =
|
|
159
|
-
on('onClientResourceStop', (resourceName) => {
|
|
167
|
+
const currentResource = this.runtimeBridge.getCurrentResourceName();
|
|
168
|
+
this.runtimeBridge.on('onClientResourceStop', (resourceName) => {
|
|
160
169
|
if (resourceName !== currentResource)
|
|
161
170
|
return;
|
|
162
171
|
this.cancel();
|
|
@@ -254,7 +263,7 @@ let Cinematic = class Cinematic {
|
|
|
254
263
|
this.effects.register(effect);
|
|
255
264
|
}
|
|
256
265
|
async run(runtime, handle) {
|
|
257
|
-
const ped =
|
|
266
|
+
const ped = this.platform.getLocalPlayerPed();
|
|
258
267
|
try {
|
|
259
268
|
this.applyRuntimeFlags(runtime.definition, ped);
|
|
260
269
|
let shotIndex = 0;
|
|
@@ -317,16 +326,16 @@ let Cinematic = class Cinematic {
|
|
|
317
326
|
}
|
|
318
327
|
applyRuntimeFlags(definition, ped) {
|
|
319
328
|
if (definition.freezePlayer) {
|
|
320
|
-
|
|
329
|
+
this.platform.freezeEntityPosition(ped, true);
|
|
321
330
|
}
|
|
322
331
|
if (definition.invinciblePlayer) {
|
|
323
|
-
|
|
332
|
+
this.platform.setEntityInvincible(ped, true);
|
|
324
333
|
}
|
|
325
334
|
if (definition.hideHud) {
|
|
326
|
-
|
|
335
|
+
this.platform.displayHud(false);
|
|
327
336
|
}
|
|
328
337
|
if (definition.hideRadar) {
|
|
329
|
-
|
|
338
|
+
this.platform.displayRadar(false);
|
|
330
339
|
}
|
|
331
340
|
}
|
|
332
341
|
cleanupRuntime(runtime, ped) {
|
|
@@ -335,18 +344,18 @@ let Cinematic = class Cinematic {
|
|
|
335
344
|
this.camera.render(false, { ease: true, easeTimeMs: 250 });
|
|
336
345
|
this.camera.destroy(runtime.camHandle, false);
|
|
337
346
|
if (runtime.definition.freezePlayer) {
|
|
338
|
-
|
|
347
|
+
this.platform.freezeEntityPosition(ped, false);
|
|
339
348
|
}
|
|
340
349
|
if (runtime.definition.invinciblePlayer) {
|
|
341
|
-
|
|
350
|
+
this.platform.setEntityInvincible(ped, false);
|
|
342
351
|
}
|
|
343
352
|
if (runtime.definition.hideHud) {
|
|
344
|
-
|
|
353
|
+
this.platform.displayHud(true);
|
|
345
354
|
}
|
|
346
355
|
if (runtime.definition.hideRadar) {
|
|
347
|
-
|
|
356
|
+
this.platform.displayRadar(true);
|
|
348
357
|
}
|
|
349
|
-
|
|
358
|
+
this.platform.clearTimecycleModifier();
|
|
350
359
|
}
|
|
351
360
|
resolveGlobalEffects(definition) {
|
|
352
361
|
const direct = definition.effects ?? [];
|
|
@@ -373,7 +382,7 @@ let Cinematic = class Cinematic {
|
|
|
373
382
|
return effects;
|
|
374
383
|
}
|
|
375
384
|
async runShot(runtime, handle, shotIndex, shot, nodes, effects, durationMs) {
|
|
376
|
-
const start =
|
|
385
|
+
const start = this.runtimeBridge.getGameTimer();
|
|
377
386
|
let previousTime = start;
|
|
378
387
|
while (true) {
|
|
379
388
|
if (runtime.cancelled) {
|
|
@@ -381,17 +390,18 @@ let Cinematic = class Cinematic {
|
|
|
381
390
|
return;
|
|
382
391
|
}
|
|
383
392
|
if (runtime.paused) {
|
|
384
|
-
previousTime =
|
|
393
|
+
previousTime = this.runtimeBridge.getGameTimer();
|
|
385
394
|
await delay(0);
|
|
386
395
|
continue;
|
|
387
396
|
}
|
|
388
|
-
if (runtime.definition.skippable &&
|
|
397
|
+
if (runtime.definition.skippable &&
|
|
398
|
+
this.platform.isControlJustPressed(0, runtime.options.skipControlId)) {
|
|
389
399
|
runtime.cancelled = true;
|
|
390
400
|
runtime.interruptStatus = 'cancelled';
|
|
391
401
|
await this.finalizeEffects(runtime, effects, 'cancelled', durationMs);
|
|
392
402
|
return;
|
|
393
403
|
}
|
|
394
|
-
const now =
|
|
404
|
+
const now = this.runtimeBridge.getGameTimer();
|
|
395
405
|
const elapsedMs = now - start;
|
|
396
406
|
const deltaMs = now - previousTime;
|
|
397
407
|
previousTime = now;
|
|
@@ -418,15 +428,16 @@ let Cinematic = class Cinematic {
|
|
|
418
428
|
}
|
|
419
429
|
}
|
|
420
430
|
async waitStep(runtime, waitMs) {
|
|
421
|
-
const started =
|
|
422
|
-
while (
|
|
431
|
+
const started = this.runtimeBridge.getGameTimer();
|
|
432
|
+
while (this.runtimeBridge.getGameTimer() - started < waitMs) {
|
|
423
433
|
if (runtime.cancelled)
|
|
424
434
|
return;
|
|
425
435
|
if (runtime.paused) {
|
|
426
436
|
await delay(0);
|
|
427
437
|
continue;
|
|
428
438
|
}
|
|
429
|
-
if (runtime.definition.skippable &&
|
|
439
|
+
if (runtime.definition.skippable &&
|
|
440
|
+
this.platform.isControlJustPressed(0, runtime.options.skipControlId)) {
|
|
430
441
|
runtime.cancelled = true;
|
|
431
442
|
runtime.interruptStatus = 'cancelled';
|
|
432
443
|
return;
|
|
@@ -476,15 +487,15 @@ let Cinematic = class Cinematic {
|
|
|
476
487
|
normalized,
|
|
477
488
|
deltaMs,
|
|
478
489
|
drawSubtitle: (text) => {
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
490
|
+
this.platform.beginTextCommandDisplayText('STRING');
|
|
491
|
+
this.platform.addTextComponentSubstringPlayerName(text);
|
|
492
|
+
this.platform.endTextCommandDisplayText(0.5, 0.92);
|
|
482
493
|
},
|
|
483
494
|
drawLetterbox: (top, bottom, alpha = 230) => {
|
|
484
495
|
const topHeight = Math.max(0, Math.min(0.5, top));
|
|
485
496
|
const bottomHeight = Math.max(0, Math.min(0.5, bottom));
|
|
486
|
-
|
|
487
|
-
|
|
497
|
+
this.platform.drawRect(0.5, topHeight / 2, 1.0, topHeight, 0, 0, 0, alpha);
|
|
498
|
+
this.platform.drawRect(0.5, 1 - bottomHeight / 2, 1.0, bottomHeight, 0, 0, 0, alpha);
|
|
488
499
|
},
|
|
489
500
|
};
|
|
490
501
|
}
|
|
@@ -536,7 +547,7 @@ let Cinematic = class Cinematic {
|
|
|
536
547
|
case 'coords':
|
|
537
548
|
return { x: input.x, y: input.y, z: input.z };
|
|
538
549
|
case 'entity': {
|
|
539
|
-
const
|
|
550
|
+
const { x, y, z } = this.platform.getEntityCoords(input.entity);
|
|
540
551
|
return {
|
|
541
552
|
x: x + (input.offset?.x ?? 0),
|
|
542
553
|
y: y + (input.offset?.y ?? 0),
|
|
@@ -544,7 +555,7 @@ let Cinematic = class Cinematic {
|
|
|
544
555
|
};
|
|
545
556
|
}
|
|
546
557
|
case 'entityBone': {
|
|
547
|
-
const
|
|
558
|
+
const { x, y, z } = this.platform.getWorldPositionOfEntityBone(input.entity, input.bone);
|
|
548
559
|
return {
|
|
549
560
|
x: x + (input.offset?.x ?? 0),
|
|
550
561
|
y: y + (input.offset?.y ?? 0),
|
|
@@ -777,7 +788,11 @@ let Cinematic = class Cinematic {
|
|
|
777
788
|
};
|
|
778
789
|
Cinematic = __decorate([
|
|
779
790
|
injectable(),
|
|
791
|
+
__param(2, inject(IClientPlatformBridge)),
|
|
792
|
+
__param(3, inject(IClientRuntimeBridge)),
|
|
780
793
|
__metadata("design:paramtypes", [Camera,
|
|
781
|
-
CameraEffectsRegistry
|
|
794
|
+
CameraEffectsRegistry,
|
|
795
|
+
IClientPlatformBridge,
|
|
796
|
+
IClientRuntimeBridge])
|
|
782
797
|
], Cinematic);
|
|
783
798
|
export { Cinematic };
|
|
@@ -7,6 +7,7 @@ export * from './marker.service';
|
|
|
7
7
|
export * from './notification.service';
|
|
8
8
|
export * from './ped.service';
|
|
9
9
|
export * from './progress.service';
|
|
10
|
+
export * from './session-bridge.service';
|
|
10
11
|
export * from './spawn.service';
|
|
11
12
|
export * from './streaming.service';
|
|
12
13
|
export * from './textui.service';
|
|
@@ -7,6 +7,7 @@ export * from './marker.service';
|
|
|
7
7
|
export * from './notification.service';
|
|
8
8
|
export * from './ped.service';
|
|
9
9
|
export * from './progress.service';
|
|
10
|
+
export * from './session-bridge.service';
|
|
10
11
|
export * from './spawn.service';
|
|
11
12
|
export * from './streaming.service';
|
|
12
13
|
export * from './textui.service';
|
|
@@ -1,94 +1,43 @@
|
|
|
1
1
|
import { Vector3 } from '../../../kernel/utils/vector3';
|
|
2
|
+
import { IClientMarkerBridge, type ClientMarkerDefinition } from '../../../adapters/contracts/client/ui/IClientMarkerBridge';
|
|
2
3
|
export interface MarkerOptions {
|
|
3
|
-
|
|
4
|
+
variant?: number;
|
|
4
5
|
type?: number;
|
|
5
|
-
|
|
6
|
+
size?: Vector3;
|
|
6
7
|
scale?: Vector3;
|
|
7
|
-
/** Rotation of the marker */
|
|
8
8
|
rotation?: Vector3;
|
|
9
|
-
/** Color (RGBA) */
|
|
10
9
|
color?: {
|
|
11
10
|
r: number;
|
|
12
11
|
g: number;
|
|
13
12
|
b: number;
|
|
14
13
|
a: number;
|
|
15
14
|
};
|
|
16
|
-
|
|
15
|
+
bob?: boolean;
|
|
17
16
|
bobUpAndDown?: boolean;
|
|
18
|
-
/** Whether the marker should face the camera */
|
|
19
17
|
faceCamera?: boolean;
|
|
20
|
-
/** Whether the marker should rotate */
|
|
21
18
|
rotate?: boolean;
|
|
22
|
-
/** Draw on entities */
|
|
23
19
|
drawOnEnts?: boolean;
|
|
20
|
+
visible?: boolean;
|
|
24
21
|
}
|
|
25
22
|
export interface ManagedMarker {
|
|
26
23
|
id: string;
|
|
27
|
-
|
|
28
|
-
options: Required<MarkerOptions>;
|
|
29
|
-
visible: boolean;
|
|
24
|
+
definition: ClientMarkerDefinition;
|
|
30
25
|
}
|
|
31
|
-
/**
|
|
32
|
-
* Service for managing and rendering markers in the game world.
|
|
33
|
-
* Handles automatic rendering via tick.
|
|
34
|
-
*/
|
|
35
26
|
export declare class MarkerService {
|
|
36
|
-
private markers;
|
|
37
|
-
private
|
|
27
|
+
private readonly markers;
|
|
28
|
+
private activeMarkers;
|
|
38
29
|
private idCounter;
|
|
39
|
-
|
|
40
|
-
* Create a new managed marker.
|
|
41
|
-
*
|
|
42
|
-
* @param position - World position for the marker
|
|
43
|
-
* @param options - Marker appearance options
|
|
44
|
-
* @returns The marker ID
|
|
45
|
-
*/
|
|
30
|
+
constructor(markers: IClientMarkerBridge);
|
|
46
31
|
create(position: Vector3, options?: MarkerOptions): string;
|
|
47
|
-
/**
|
|
48
|
-
* Remove a marker by ID.
|
|
49
|
-
*
|
|
50
|
-
* @param id - The marker ID to remove
|
|
51
|
-
*/
|
|
52
32
|
remove(id: string): boolean;
|
|
53
|
-
/**
|
|
54
|
-
* Remove all markers.
|
|
55
|
-
*/
|
|
56
33
|
removeAll(): void;
|
|
57
|
-
/**
|
|
58
|
-
* Update a marker's position.
|
|
59
|
-
*
|
|
60
|
-
* @param id - The marker ID
|
|
61
|
-
* @param position - New position
|
|
62
|
-
*/
|
|
63
34
|
setPosition(id: string, position: Vector3): boolean;
|
|
64
|
-
/**
|
|
65
|
-
* Update marker options.
|
|
66
|
-
*
|
|
67
|
-
* @param id - The marker ID
|
|
68
|
-
* @param options - Options to update
|
|
69
|
-
*/
|
|
70
35
|
setOptions(id: string, options: Partial<MarkerOptions>): boolean;
|
|
71
|
-
/**
|
|
72
|
-
* Set marker visibility.
|
|
73
|
-
*
|
|
74
|
-
* @param id - The marker ID
|
|
75
|
-
* @param visible - Whether the marker should be visible
|
|
76
|
-
*/
|
|
77
36
|
setVisible(id: string, visible: boolean): boolean;
|
|
78
|
-
/**
|
|
79
|
-
* Get a marker by ID.
|
|
80
|
-
*/
|
|
81
37
|
get(id: string): ManagedMarker | undefined;
|
|
82
|
-
/**
|
|
83
|
-
* Get all managed markers.
|
|
84
|
-
*/
|
|
85
38
|
getAll(): ManagedMarker[];
|
|
86
|
-
/**
|
|
87
|
-
* Draw a marker immediately (one frame only).
|
|
88
|
-
* For persistent markers, use create() instead.
|
|
89
|
-
*/
|
|
90
39
|
drawOnce(position: Vector3, options?: MarkerOptions): void;
|
|
91
|
-
|
|
92
|
-
private
|
|
93
|
-
private
|
|
40
|
+
exists(id: string): boolean;
|
|
41
|
+
private buildDefinition;
|
|
42
|
+
private normalizeOptions;
|
|
94
43
|
}
|