@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,328 +4,183 @@ 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
|
-
|
|
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
|
+
import { IClientRuntimeBridge } from '../adapter/runtime-bridge';
|
|
11
16
|
let StreamingService = class StreamingService {
|
|
17
|
+
platform;
|
|
18
|
+
runtime;
|
|
12
19
|
loadedAssets = new Map();
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
* Request and load a model.
|
|
18
|
-
*
|
|
19
|
-
* @param model - Model name or hash
|
|
20
|
-
* @param timeout - Maximum wait time in ms
|
|
21
|
-
* @returns Whether the model was loaded successfully
|
|
22
|
-
*/
|
|
20
|
+
constructor(platform, runtime) {
|
|
21
|
+
this.platform = platform;
|
|
22
|
+
this.runtime = runtime;
|
|
23
|
+
}
|
|
23
24
|
async requestModel(model, timeout = 10000) {
|
|
24
|
-
const hash = typeof model === 'string' ?
|
|
25
|
+
const hash = typeof model === 'string' ? this.platform.getHashKey(model) : model;
|
|
25
26
|
const key = `model:${hash}`;
|
|
26
|
-
|
|
27
|
-
if (this.loadedAssets.get(key)?.loaded) {
|
|
27
|
+
if (this.loadedAssets.get(key)?.loaded)
|
|
28
28
|
return true;
|
|
29
|
-
|
|
30
|
-
// Check if valid
|
|
31
|
-
if (!IsModelInCdimage(hash) || !IsModelValid(hash)) {
|
|
29
|
+
if (!this.platform.isModelInCdimage(hash) || !this.platform.isModelValid(hash))
|
|
32
30
|
return false;
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
if (GetGameTimer() - startTime > timeout) {
|
|
31
|
+
this.platform.requestModel(hash);
|
|
32
|
+
const startTime = this.runtime.getGameTimer();
|
|
33
|
+
while (!this.platform.hasModelLoaded(hash)) {
|
|
34
|
+
if (this.runtime.getGameTimer() - startTime > timeout)
|
|
38
35
|
return false;
|
|
39
|
-
}
|
|
40
36
|
await new Promise((r) => setTimeout(r, 0));
|
|
41
37
|
}
|
|
42
38
|
this.loadedAssets.set(key, { type: 'model', asset: String(model), loaded: true, hash });
|
|
43
39
|
return true;
|
|
44
40
|
}
|
|
45
|
-
/**
|
|
46
|
-
* Check if a model is loaded.
|
|
47
|
-
*
|
|
48
|
-
* @param model - Model name or hash
|
|
49
|
-
*/
|
|
50
41
|
isModelLoaded(model) {
|
|
51
|
-
const hash = typeof model === 'string' ?
|
|
52
|
-
return
|
|
42
|
+
const hash = typeof model === 'string' ? this.platform.getHashKey(model) : model;
|
|
43
|
+
return this.platform.hasModelLoaded(hash);
|
|
53
44
|
}
|
|
54
|
-
/**
|
|
55
|
-
* Release a loaded model.
|
|
56
|
-
*
|
|
57
|
-
* @param model - Model name or hash
|
|
58
|
-
*/
|
|
59
45
|
releaseModel(model) {
|
|
60
|
-
const hash = typeof model === 'string' ?
|
|
61
|
-
|
|
46
|
+
const hash = typeof model === 'string' ? this.platform.getHashKey(model) : model;
|
|
47
|
+
this.platform.setModelAsNoLongerNeeded(hash);
|
|
62
48
|
this.loadedAssets.delete(`model:${hash}`);
|
|
63
49
|
}
|
|
64
|
-
/**
|
|
65
|
-
* Check if a model is valid and exists in the game files.
|
|
66
|
-
*
|
|
67
|
-
* @param model - Model name or hash
|
|
68
|
-
*/
|
|
69
50
|
isModelValid(model) {
|
|
70
|
-
const hash = typeof model === 'string' ?
|
|
71
|
-
return
|
|
51
|
+
const hash = typeof model === 'string' ? this.platform.getHashKey(model) : model;
|
|
52
|
+
return this.platform.isModelInCdimage(hash) && this.platform.isModelValid(hash);
|
|
72
53
|
}
|
|
73
|
-
/**
|
|
74
|
-
* Check if a model is a vehicle.
|
|
75
|
-
*
|
|
76
|
-
* @param model - Model name or hash
|
|
77
|
-
*/
|
|
78
54
|
isModelVehicle(model) {
|
|
79
|
-
const hash = typeof model === 'string' ?
|
|
80
|
-
return
|
|
55
|
+
const hash = typeof model === 'string' ? this.platform.getHashKey(model) : model;
|
|
56
|
+
return this.platform.isModelAVehicle(hash);
|
|
81
57
|
}
|
|
82
|
-
/**
|
|
83
|
-
* Check if a model is a ped.
|
|
84
|
-
*
|
|
85
|
-
* @param model - Model name or hash
|
|
86
|
-
*/
|
|
87
58
|
isModelPed(model) {
|
|
88
|
-
const hash = typeof model === 'string' ?
|
|
89
|
-
return
|
|
59
|
+
const hash = typeof model === 'string' ? this.platform.getHashKey(model) : model;
|
|
60
|
+
return this.platform.isModelAPed(hash);
|
|
90
61
|
}
|
|
91
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
92
|
-
// Animation Dictionary Loading
|
|
93
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
94
|
-
/**
|
|
95
|
-
* Request and load an animation dictionary.
|
|
96
|
-
*
|
|
97
|
-
* @param dict - Animation dictionary name
|
|
98
|
-
* @param timeout - Maximum wait time in ms
|
|
99
|
-
* @returns Whether the dictionary was loaded successfully
|
|
100
|
-
*/
|
|
101
62
|
async requestAnimDict(dict, timeout = 10000) {
|
|
102
63
|
const key = `anim:${dict}`;
|
|
103
|
-
|
|
104
|
-
if (this.loadedAssets.get(key)?.loaded) {
|
|
64
|
+
if (this.loadedAssets.get(key)?.loaded)
|
|
105
65
|
return true;
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
if (GetGameTimer() - startTime > timeout) {
|
|
66
|
+
this.platform.requestAnimDict(dict);
|
|
67
|
+
const startTime = this.runtime.getGameTimer();
|
|
68
|
+
while (!this.platform.hasAnimDictLoaded(dict)) {
|
|
69
|
+
if (this.runtime.getGameTimer() - startTime > timeout)
|
|
111
70
|
return false;
|
|
112
|
-
}
|
|
113
71
|
await new Promise((r) => setTimeout(r, 0));
|
|
114
72
|
}
|
|
115
73
|
this.loadedAssets.set(key, { type: 'animDict', asset: dict, loaded: true });
|
|
116
74
|
return true;
|
|
117
75
|
}
|
|
118
|
-
/**
|
|
119
|
-
* Check if an animation dictionary is loaded.
|
|
120
|
-
*
|
|
121
|
-
* @param dict - Animation dictionary name
|
|
122
|
-
*/
|
|
123
76
|
isAnimDictLoaded(dict) {
|
|
124
|
-
return
|
|
77
|
+
return this.platform.hasAnimDictLoaded(dict);
|
|
125
78
|
}
|
|
126
|
-
/**
|
|
127
|
-
* Release a loaded animation dictionary.
|
|
128
|
-
*
|
|
129
|
-
* @param dict - Animation dictionary name
|
|
130
|
-
*/
|
|
131
79
|
releaseAnimDict(dict) {
|
|
132
|
-
|
|
80
|
+
this.platform.removeAnimDict(dict);
|
|
133
81
|
this.loadedAssets.delete(`anim:${dict}`);
|
|
134
82
|
}
|
|
135
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
136
|
-
// Particle Effects (PTFX) Loading
|
|
137
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
138
|
-
/**
|
|
139
|
-
* Request and load a particle effect asset.
|
|
140
|
-
*
|
|
141
|
-
* @param asset - PTFX asset name
|
|
142
|
-
* @param timeout - Maximum wait time in ms
|
|
143
|
-
* @returns Whether the asset was loaded successfully
|
|
144
|
-
*/
|
|
145
83
|
async requestPtfxAsset(asset, timeout = 10000) {
|
|
146
84
|
const key = `ptfx:${asset}`;
|
|
147
|
-
|
|
148
|
-
if (this.loadedAssets.get(key)?.loaded) {
|
|
85
|
+
if (this.loadedAssets.get(key)?.loaded)
|
|
149
86
|
return true;
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
if (GetGameTimer() - startTime > timeout) {
|
|
87
|
+
this.platform.requestNamedPtfxAsset(asset);
|
|
88
|
+
const startTime = this.runtime.getGameTimer();
|
|
89
|
+
while (!this.platform.hasNamedPtfxAssetLoaded(asset)) {
|
|
90
|
+
if (this.runtime.getGameTimer() - startTime > timeout)
|
|
155
91
|
return false;
|
|
156
|
-
}
|
|
157
92
|
await new Promise((r) => setTimeout(r, 0));
|
|
158
93
|
}
|
|
159
94
|
this.loadedAssets.set(key, { type: 'ptfx', asset, loaded: true });
|
|
160
95
|
return true;
|
|
161
96
|
}
|
|
162
|
-
/**
|
|
163
|
-
* Check if a PTFX asset is loaded.
|
|
164
|
-
*
|
|
165
|
-
* @param asset - PTFX asset name
|
|
166
|
-
*/
|
|
167
97
|
isPtfxAssetLoaded(asset) {
|
|
168
|
-
return
|
|
98
|
+
return this.platform.hasNamedPtfxAssetLoaded(asset);
|
|
169
99
|
}
|
|
170
|
-
/**
|
|
171
|
-
* Release a loaded PTFX asset.
|
|
172
|
-
*
|
|
173
|
-
* @param asset - PTFX asset name
|
|
174
|
-
*/
|
|
175
100
|
releasePtfxAsset(asset) {
|
|
176
|
-
|
|
101
|
+
this.platform.removeNamedPtfxAsset(asset);
|
|
177
102
|
this.loadedAssets.delete(`ptfx:${asset}`);
|
|
178
103
|
}
|
|
179
|
-
/**
|
|
180
|
-
* Start a particle effect at a position.
|
|
181
|
-
*
|
|
182
|
-
* @param asset - PTFX asset name
|
|
183
|
-
* @param effectName - Effect name within the asset
|
|
184
|
-
* @param position - World position
|
|
185
|
-
* @param rotation - Rotation
|
|
186
|
-
* @param scale - Scale
|
|
187
|
-
* @param looped - Whether to loop
|
|
188
|
-
* @returns The particle effect handle
|
|
189
|
-
*/
|
|
190
104
|
async startParticleEffect(asset, effectName, position, rotation = { x: 0, y: 0, z: 0 }, scale = 1.0, looped = false) {
|
|
191
105
|
await this.requestPtfxAsset(asset);
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
else {
|
|
197
|
-
return StartParticleFxNonLoopedAtCoord(effectName, position.x, position.y, position.z, rotation.x, rotation.y, rotation.z, scale, false, false, false);
|
|
198
|
-
}
|
|
106
|
+
this.platform.useParticleFxAssetNextCall(asset);
|
|
107
|
+
return looped
|
|
108
|
+
? this.platform.startParticleFxLoopedAtCoord(effectName, position, rotation, scale)
|
|
109
|
+
: this.platform.startParticleFxNonLoopedAtCoord(effectName, position, rotation, scale);
|
|
199
110
|
}
|
|
200
|
-
/**
|
|
201
|
-
* Stop a looped particle effect.
|
|
202
|
-
*
|
|
203
|
-
* @param handle - Particle effect handle
|
|
204
|
-
*/
|
|
205
111
|
stopParticleEffect(handle) {
|
|
206
|
-
|
|
112
|
+
this.platform.stopParticleFxLooped(handle, false);
|
|
207
113
|
}
|
|
208
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
209
|
-
// Texture Dictionary Loading
|
|
210
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
211
|
-
/**
|
|
212
|
-
* Request and load a texture dictionary.
|
|
213
|
-
*
|
|
214
|
-
* @param dict - Texture dictionary name
|
|
215
|
-
* @param timeout - Maximum wait time in ms
|
|
216
|
-
* @returns Whether the dictionary was loaded successfully
|
|
217
|
-
*/
|
|
218
114
|
async requestTextureDict(dict, timeout = 10000) {
|
|
219
115
|
const key = `texture:${dict}`;
|
|
220
|
-
|
|
221
|
-
if (this.loadedAssets.get(key)?.loaded) {
|
|
116
|
+
if (this.loadedAssets.get(key)?.loaded)
|
|
222
117
|
return true;
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
if (GetGameTimer() - startTime > timeout) {
|
|
118
|
+
this.platform.requestStreamedTextureDict(dict, true);
|
|
119
|
+
const startTime = this.runtime.getGameTimer();
|
|
120
|
+
while (!this.platform.hasStreamedTextureDictLoaded(dict)) {
|
|
121
|
+
if (this.runtime.getGameTimer() - startTime > timeout)
|
|
228
122
|
return false;
|
|
229
|
-
}
|
|
230
123
|
await new Promise((r) => setTimeout(r, 0));
|
|
231
124
|
}
|
|
232
125
|
this.loadedAssets.set(key, { type: 'texture', asset: dict, loaded: true });
|
|
233
126
|
return true;
|
|
234
127
|
}
|
|
235
|
-
/**
|
|
236
|
-
* Check if a texture dictionary is loaded.
|
|
237
|
-
*
|
|
238
|
-
* @param dict - Texture dictionary name
|
|
239
|
-
*/
|
|
240
128
|
isTextureDictLoaded(dict) {
|
|
241
|
-
return
|
|
129
|
+
return this.platform.hasStreamedTextureDictLoaded(dict);
|
|
242
130
|
}
|
|
243
|
-
/**
|
|
244
|
-
* Release a loaded texture dictionary.
|
|
245
|
-
*
|
|
246
|
-
* @param dict - Texture dictionary name
|
|
247
|
-
*/
|
|
248
131
|
releaseTextureDict(dict) {
|
|
249
|
-
|
|
132
|
+
this.platform.setStreamedTextureDictAsNoLongerNeeded(dict);
|
|
250
133
|
this.loadedAssets.delete(`texture:${dict}`);
|
|
251
134
|
}
|
|
252
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
253
|
-
// Audio Loading
|
|
254
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
255
|
-
/**
|
|
256
|
-
* Request and load a script audio bank.
|
|
257
|
-
*
|
|
258
|
-
* @param audioBank - Audio bank name
|
|
259
|
-
* @param networked - Whether the audio should be networked
|
|
260
|
-
* @param timeout - Maximum wait time in ms
|
|
261
|
-
* @returns Whether the audio bank was loaded successfully
|
|
262
|
-
*/
|
|
263
135
|
async requestAudioBank(audioBank, networked = false, _timeout = 10000) {
|
|
264
136
|
const key = `audio:${audioBank}`;
|
|
265
|
-
|
|
266
|
-
if (this.loadedAssets.get(key)?.loaded) {
|
|
137
|
+
if (this.loadedAssets.get(key)?.loaded)
|
|
267
138
|
return true;
|
|
268
|
-
|
|
269
|
-
const success = RequestScriptAudioBank(audioBank, networked);
|
|
139
|
+
const success = this.platform.requestScriptAudioBank(audioBank, networked);
|
|
270
140
|
if (!success)
|
|
271
141
|
return false;
|
|
272
142
|
this.loadedAssets.set(key, { type: 'audio', asset: audioBank, loaded: true });
|
|
273
143
|
return true;
|
|
274
144
|
}
|
|
275
|
-
/**
|
|
276
|
-
* Release a loaded audio bank.
|
|
277
|
-
*
|
|
278
|
-
* @param audioBank - Audio bank name
|
|
279
|
-
*/
|
|
280
145
|
releaseAudioBank(audioBank) {
|
|
281
|
-
|
|
146
|
+
this.platform.releaseScriptAudioBank(audioBank);
|
|
282
147
|
this.loadedAssets.delete(`audio:${audioBank}`);
|
|
283
148
|
}
|
|
284
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
285
|
-
// Utility Methods
|
|
286
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
287
|
-
/**
|
|
288
|
-
* Get all currently loaded assets.
|
|
289
|
-
*/
|
|
290
149
|
getLoadedAssets() {
|
|
291
150
|
return Array.from(this.loadedAssets.values());
|
|
292
151
|
}
|
|
293
|
-
/**
|
|
294
|
-
* Release all loaded assets.
|
|
295
|
-
*/
|
|
296
152
|
releaseAll() {
|
|
297
153
|
for (const asset of this.loadedAssets.values()) {
|
|
298
154
|
switch (asset.type) {
|
|
299
155
|
case 'model':
|
|
300
156
|
if (asset.hash)
|
|
301
|
-
|
|
157
|
+
this.platform.setModelAsNoLongerNeeded(asset.hash);
|
|
302
158
|
break;
|
|
303
159
|
case 'animDict':
|
|
304
|
-
|
|
160
|
+
this.platform.removeAnimDict(asset.asset);
|
|
305
161
|
break;
|
|
306
162
|
case 'ptfx':
|
|
307
|
-
|
|
163
|
+
this.platform.removeNamedPtfxAsset(asset.asset);
|
|
308
164
|
break;
|
|
309
165
|
case 'texture':
|
|
310
|
-
|
|
166
|
+
this.platform.setStreamedTextureDictAsNoLongerNeeded(asset.asset);
|
|
311
167
|
break;
|
|
312
168
|
case 'audio':
|
|
313
|
-
|
|
169
|
+
this.platform.releaseScriptAudioBank(asset.asset);
|
|
314
170
|
break;
|
|
315
171
|
}
|
|
316
172
|
}
|
|
317
173
|
this.loadedAssets.clear();
|
|
318
174
|
}
|
|
319
|
-
/**
|
|
320
|
-
* Get hash key for a string.
|
|
321
|
-
*
|
|
322
|
-
* @param str - String to hash
|
|
323
|
-
*/
|
|
324
175
|
getHash(str) {
|
|
325
|
-
return
|
|
176
|
+
return this.platform.getHashKey(str);
|
|
326
177
|
}
|
|
327
178
|
};
|
|
328
179
|
StreamingService = __decorate([
|
|
329
|
-
injectable()
|
|
180
|
+
injectable(),
|
|
181
|
+
__param(0, inject(IClientPlatformBridge)),
|
|
182
|
+
__param(1, inject(IClientRuntimeBridge)),
|
|
183
|
+
__metadata("design:paramtypes", [IClientPlatformBridge,
|
|
184
|
+
IClientRuntimeBridge])
|
|
330
185
|
], StreamingService);
|
|
331
186
|
export { StreamingService };
|
|
@@ -1,81 +1,41 @@
|
|
|
1
1
|
import { Vector3 } from '../../../kernel/utils/vector3';
|
|
2
|
+
import { IClientPlatformBridge } from '../adapter/platform-bridge';
|
|
3
|
+
import { IClientRuntimeBridge } from '../adapter/runtime-bridge';
|
|
2
4
|
export interface TextUIOptions {
|
|
3
|
-
/** Font (0-8) */
|
|
4
5
|
font?: number;
|
|
5
|
-
/** Scale (0.0-1.0+) */
|
|
6
6
|
scale?: number;
|
|
7
|
-
/** Color */
|
|
8
7
|
color?: {
|
|
9
8
|
r: number;
|
|
10
9
|
g: number;
|
|
11
10
|
b: number;
|
|
12
11
|
a: number;
|
|
13
12
|
};
|
|
14
|
-
/** Text alignment (0=center, 1=left, 2=right) */
|
|
15
13
|
alignment?: number;
|
|
16
|
-
/** Drop shadow */
|
|
17
14
|
dropShadow?: boolean;
|
|
18
|
-
/** Text outline */
|
|
19
15
|
outline?: boolean;
|
|
20
|
-
/** Word wrap width (0 = no wrap) */
|
|
21
16
|
wrapWidth?: number;
|
|
22
17
|
}
|
|
23
18
|
export interface Text3DOptions extends TextUIOptions {
|
|
24
|
-
/** Whether to draw a background behind text */
|
|
25
19
|
background?: boolean;
|
|
26
|
-
/** Background color */
|
|
27
20
|
backgroundColor?: {
|
|
28
21
|
r: number;
|
|
29
22
|
g: number;
|
|
30
23
|
b: number;
|
|
31
24
|
a: number;
|
|
32
25
|
};
|
|
33
|
-
/** Background padding */
|
|
34
26
|
backgroundPadding?: number;
|
|
35
27
|
}
|
|
36
|
-
/**
|
|
37
|
-
* Service for rendering text UI elements on screen and in 3D world.
|
|
38
|
-
*/
|
|
39
28
|
export declare class TextUIService {
|
|
29
|
+
private readonly platform;
|
|
30
|
+
private readonly runtime;
|
|
40
31
|
private activeTextUI;
|
|
41
32
|
private tickHandle;
|
|
42
|
-
|
|
43
|
-
* Show persistent text UI at the bottom-right of the screen.
|
|
44
|
-
*
|
|
45
|
-
* @param text - The text to display
|
|
46
|
-
* @param options - Text options
|
|
47
|
-
*/
|
|
33
|
+
constructor(platform: IClientPlatformBridge, runtime: IClientRuntimeBridge);
|
|
48
34
|
show(text: string, options?: TextUIOptions): void;
|
|
49
|
-
/**
|
|
50
|
-
* Hide the persistent text UI.
|
|
51
|
-
*/
|
|
52
35
|
hide(): void;
|
|
53
|
-
/**
|
|
54
|
-
* Check if text UI is currently visible.
|
|
55
|
-
*/
|
|
56
36
|
isVisible(): boolean;
|
|
57
|
-
/**
|
|
58
|
-
* Draw text on screen for one frame.
|
|
59
|
-
* Call this every frame for persistent display.
|
|
60
|
-
*
|
|
61
|
-
* @param text - The text to draw
|
|
62
|
-
* @param x - Screen X position (0.0-1.0)
|
|
63
|
-
* @param y - Screen Y position (0.0-1.0)
|
|
64
|
-
* @param options - Text options
|
|
65
|
-
*/
|
|
66
37
|
drawText(text: string, x: number, y: number, options?: TextUIOptions): void;
|
|
67
|
-
/**
|
|
68
|
-
* Draw 3D text in the game world.
|
|
69
|
-
*
|
|
70
|
-
* @param position - World position
|
|
71
|
-
* @param text - The text to draw
|
|
72
|
-
* @param options - Text options
|
|
73
|
-
*/
|
|
74
38
|
drawText3D(position: Vector3, text: string, options?: Text3DOptions): void;
|
|
75
|
-
/**
|
|
76
|
-
* Get text width for layout calculations.
|
|
77
|
-
* Note: This is an approximation based on character count and scale.
|
|
78
|
-
*/
|
|
79
39
|
getTextWidth(text: string, _font: number, scale: number): number;
|
|
80
40
|
private ensureTickRunning;
|
|
81
41
|
private stopTick;
|