@series-inc/rundot-game-sdk 5.21.0-beta.2 → 5.22.0-beta.0
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/{AdsApi-Jg7yvQ3K.d.ts → AdsApi-BjhGPCAI.d.ts} +73 -1
- package/dist/{chunk-4XV76EBE.js → chunk-FWSKWJ64.js} +500 -3
- package/dist/chunk-FWSKWJ64.js.map +1 -0
- package/dist/{chunk-S6HGCIIK.js → chunk-RKRXON75.js} +19 -4
- package/dist/chunk-RKRXON75.js.map +1 -0
- package/dist/index.d.ts +153 -3
- package/dist/index.js +2 -2
- package/dist/rundot-game-api/index.d.ts +2 -2
- package/dist/rundot-game-api/index.js +3 -2
- package/dist/rundot-game-api/index.js.map +1 -1
- package/dist/sandbox/index.js +3 -1
- package/dist/sandbox/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-4XV76EBE.js.map +0 -1
- package/dist/chunk-S6HGCIIK.js.map +0 -1
|
@@ -853,6 +853,76 @@ interface HapticsApi {
|
|
|
853
853
|
triggerHapticAsync(style: HapticFeedbackStyle): Promise<void>;
|
|
854
854
|
}
|
|
855
855
|
|
|
856
|
+
type GamepadSource = 'web-gamepad' | 'steam-input' | 'ios-gamecontroller' | 'android-input';
|
|
857
|
+
type GamepadButtonName = 'a' | 'b' | 'x' | 'y' | 'leftBumper' | 'rightBumper' | 'leftTrigger' | 'rightTrigger' | 'select' | 'start' | 'guide' | 'leftStick' | 'rightStick' | 'dpadUp' | 'dpadDown' | 'dpadLeft' | 'dpadRight';
|
|
858
|
+
interface GamepadButtonState {
|
|
859
|
+
pressed: boolean;
|
|
860
|
+
/** Analog 0..1 (triggers); 0/1 for digital buttons. */
|
|
861
|
+
value: number;
|
|
862
|
+
}
|
|
863
|
+
interface GamepadAxes {
|
|
864
|
+
leftX: number;
|
|
865
|
+
leftY: number;
|
|
866
|
+
rightX: number;
|
|
867
|
+
rightY: number;
|
|
868
|
+
}
|
|
869
|
+
interface GamepadSnapshot {
|
|
870
|
+
index: number;
|
|
871
|
+
id: string;
|
|
872
|
+
connected: boolean;
|
|
873
|
+
source: GamepadSource;
|
|
874
|
+
/** True when buttons map to the standard layout above; false = best-effort. */
|
|
875
|
+
standardMapping: boolean;
|
|
876
|
+
buttons: Record<GamepadButtonName, GamepadButtonState>;
|
|
877
|
+
/** Each axis normalized to -1..1. */
|
|
878
|
+
axes: GamepadAxes;
|
|
879
|
+
/** Monotonic ms (performance.now) when the provider sampled the device. */
|
|
880
|
+
sourceTimestamp: number;
|
|
881
|
+
/**
|
|
882
|
+
* Monotonic ms when the SDK cached/served this snapshot. Equals
|
|
883
|
+
* `sourceTimestamp` on Tier 1 (direct read); larger by the transport cost on
|
|
884
|
+
* Tier 2. `deliveredTimestamp - sourceTimestamp` is the added input latency.
|
|
885
|
+
*/
|
|
886
|
+
deliveredTimestamp: number;
|
|
887
|
+
}
|
|
888
|
+
interface GamepadConnectionEvent {
|
|
889
|
+
index: number;
|
|
890
|
+
id: string;
|
|
891
|
+
source: GamepadSource;
|
|
892
|
+
}
|
|
893
|
+
interface InputLatencyStats {
|
|
894
|
+
p50: number;
|
|
895
|
+
p95: number;
|
|
896
|
+
max: number;
|
|
897
|
+
sampleCount: number;
|
|
898
|
+
}
|
|
899
|
+
interface InputApi {
|
|
900
|
+
/**
|
|
901
|
+
* True when the SDK can read controllers on this surface (capability —
|
|
902
|
+
* independent of whether a pad is currently connected). Determined solely by
|
|
903
|
+
* the one-time `INPUT_SUBSCRIBE` handshake: `true` iff the host returned a
|
|
904
|
+
* valid `{ supported: true, mode: 'tier1' | 'tier2' }`. The SDK never infers
|
|
905
|
+
* this from `navigator.getGamepads` (which exists yet is broken under Steam
|
|
906
|
+
* Input). Returns `false` before the handshake resolves and on
|
|
907
|
+
* timeout/reject/`supported: false`/unknown `mode`. Never hangs.
|
|
908
|
+
*/
|
|
909
|
+
isSupported(): boolean;
|
|
910
|
+
/**
|
|
911
|
+
* Synchronous snapshot of currently-connected pads (empty if none; never
|
|
912
|
+
* `null`/disconnected slots). Tier 1 reads `navigator.getGamepads()` live on
|
|
913
|
+
* each call (filtering empty slots); Tier 2 returns the latest host-pushed
|
|
914
|
+
* cache. Exactly one tier per instance; no RPC in either tier.
|
|
915
|
+
*/
|
|
916
|
+
getGamepads(): GamepadSnapshot[];
|
|
917
|
+
onConnected(callback: (event: GamepadConnectionEvent) => void): Subscription;
|
|
918
|
+
onDisconnected(callback: (event: GamepadConnectionEvent) => void): Subscription;
|
|
919
|
+
/** Performance telemetry, off unless the input debug flag is enabled. */
|
|
920
|
+
readonly __debug: {
|
|
921
|
+
getLatencyStats(): InputLatencyStats;
|
|
922
|
+
};
|
|
923
|
+
}
|
|
924
|
+
declare const GAMEPAD_BUTTON_NAMES: readonly GamepadButtonName[];
|
|
925
|
+
|
|
856
926
|
interface Experiment {
|
|
857
927
|
readonly name: string;
|
|
858
928
|
readonly ruleID: string;
|
|
@@ -3406,6 +3476,7 @@ interface Host {
|
|
|
3406
3476
|
readonly ai: AiApi;
|
|
3407
3477
|
readonly textGen: TextGenApi;
|
|
3408
3478
|
readonly haptics: HapticsApi;
|
|
3479
|
+
readonly input: InputApi;
|
|
3409
3480
|
readonly features: FeaturesApi;
|
|
3410
3481
|
readonly lifecycle: LifecycleApi;
|
|
3411
3482
|
readonly simulation: SimulationApi;
|
|
@@ -3739,6 +3810,7 @@ interface RundotGameAPI {
|
|
|
3739
3810
|
simulation: SimulationApi;
|
|
3740
3811
|
leaderboard: LeaderboardApi;
|
|
3741
3812
|
ugc: UgcApi;
|
|
3813
|
+
input: InputApi;
|
|
3742
3814
|
log(message: string, ...args: any[]): void;
|
|
3743
3815
|
error(message: string, ...args: any[]): void;
|
|
3744
3816
|
isAvailable(): boolean;
|
|
@@ -3965,4 +4037,4 @@ interface AdsApi {
|
|
|
3965
4037
|
showInterstitialAd(options?: ShowInterstitialAdOptions): Promise<boolean>;
|
|
3966
4038
|
}
|
|
3967
4039
|
|
|
3968
|
-
export { type AddToHomeScreenResult as $, type AnalyticsApi as A, type BatchRecipeRequirementsResult as B, type NotificationsApi as C, type ScheduleLocalNotification as D, type ScheduleNotificationOptions as E, type RCSAvailabilityStatus as F, type ScheduleRCSInput as G, type Host as H, type ScheduleRCSResult as I, type RequestRCSOptInInput as J, type RequestRCSOptInResult as K, type PopupsApi as L, type ShowToastOptions as M, type NavigationApi as N, type ShowInterstitialAdOptions as O, type Profile as P, type QuitOptions as Q, type RundotGameAPI as R, type SimulationActiveRunsUpdate as S, type ShowRewardedAdOptions as T, type ProfileApi as U, type DeviceApi as V, type DeviceInfo as W, type EnvironmentApi as X, type EnvironmentInfo as Y, type SystemApi as Z, type SafeArea as _, type RecipeRequirementQuery as a, type
|
|
4040
|
+
export { type AddToHomeScreenResult as $, type AnalyticsApi as A, type BatchRecipeRequirementsResult as B, type NotificationsApi as C, type ScheduleLocalNotification as D, type ScheduleNotificationOptions as E, type RCSAvailabilityStatus as F, type ScheduleRCSInput as G, type Host as H, type ScheduleRCSResult as I, type RequestRCSOptInInput as J, type RequestRCSOptInResult as K, type PopupsApi as L, type ShowToastOptions as M, type NavigationApi as N, type ShowInterstitialAdOptions as O, type Profile as P, type QuitOptions as Q, type RundotGameAPI as R, type SimulationActiveRunsUpdate as S, type ShowRewardedAdOptions as T, type ProfileApi as U, type DeviceApi as V, type DeviceInfo as W, type EnvironmentApi as X, type EnvironmentInfo as Y, type SystemApi as Z, type SafeArea as _, type RecipeRequirementQuery as a, type ProposeMoveResult as a$, type CdnApi as a0, type FetchFromCdnOptions as a1, type AssetUrlResult as a2, type TimeApi as a3, type ServerTimeData as a4, type GetFutureTimeOptions as a5, type AiApi as a6, type AiChatCompletionRequest as a7, type AiChatCompletionData as a8, type AiChatCompletionStreamOptions as a9, type SimulationState as aA, type ExecuteRecipeOptions as aB, type ExecuteRecipeResponse as aC, type CollectRecipeResult as aD, type ResetStateOptions as aE, type ResetStateResult as aF, type GetActiveRunsOptions as aG, type ExecuteScopedRecipeOptions as aH, type ExecuteScopedRecipeResult as aI, type GetAvailableRecipesOptions as aJ, type GetAvailableRecipesResult as aK, type Recipe as aL, type GetBatchRecipeRequirements as aM, type TriggerRecipeChainOptions as aN, type RoomDataUpdate as aO, type RoomMessageEvent as aP, type ProposedMoveEvent as aQ, RundotGameTransport as aR, type RoomsApi as aS, type CreateRoomOptions as aT, type JoinOrCreateRoomOptions as aU, type JoinOrCreateResult as aV, type ListRoomsOptions as aW, type UpdateRoomDataOptions as aX, type RoomMessageRequest as aY, type StartRoomGameOptions as aZ, type ProposeMoveRequest as a_, type AiChatCompletionStreamChunk as aa, type HapticsApi as ab, HapticFeedbackStyle as ac, type GamepadSnapshot as ad, type GamepadConnectionEvent as ae, type Subscription as af, type InputApi as ag, type InputLatencyStats as ah, type FeaturesApi as ai, type Experiment as aj, type LifecycleApi as ak, type SleepCallback as al, type AwakeCallback as am, type PauseCallback as an, type ResumeCallback as ao, type QuitCallback as ap, type BackButtonCallback as aq, type SimulationApi as ar, type SimulationSlotValidationResult as as, type SimulationBatchOperation as at, type SimulationBatchOperationsResult as au, type SimulationAvailableItem as av, type SimulationPowerPreview as aw, type SimulationSlotMutationResult as ax, type SimulationSlotContainer as ay, type SimulationAssignment as az, type RecipeRequirementResult as b, type ThreeDGenEntry as b$, type ValidateMoveVerdict as b0, type ValidateMoveResult as b1, type RoomSubscriptionOptions as b2, type LoggingApi as b3, type IapApi as b4, type SpendCurrencyOptions as b5, type SpendCurrencyResult as b6, type SubscriptionTier as b7, type RunSubscriptionsResponse as b8, type SubscriptionInterval as b9, type UgcApi as bA, type MultiplayerApi as bB, type VideoApi as bC, type AppApi as bD, type AdminUgcApi as bE, type AdminImageGenApi as bF, type AdminVideoGenApi as bG, type AdminSpriteGenApi as bH, type AdminAudioGenApi as bI, type AdminThreeDGenApi as bJ, type AppRole as bK, type ResolveLaunchIntentOptions as bL, type LaunchIntent as bM, type AdminUgcBrowseParams as bN, type AdminUgcBrowseResponse as bO, type AdminUgcListReportsParams as bP, type AdminUgcListReportsResponse as bQ, type AdminUgcResolveAction as bR, type AdminGenBrowseParams as bS, type AdminGenBrowseResponse as bT, type ImageGenEntry as bU, type AdminGenListReportsParams as bV, type AdminGenListReportsResponse as bW, type ImageGenReport as bX, type AdminGenResolveAction as bY, type SpriteGenEntry as bZ, type SpriteGenReport as b_, type PurchaseSubscriptionResponse as ba, type OpenStoreResult as bb, type LoadEmbeddedAssetsResponse as bc, type SharedAssetsApi as bd, type PreloaderApi as be, type SocialApi as bf, type ShareMetadata as bg, type ShareLinkResult as bh, type SocialQRCodeOptions as bi, type QRCodeResult as bj, type ShareClickData as bk, type ShareFileOptions as bl, type ShareFileResult as bm, type CanShareFileResult as bn, type EntitlementApi as bo, type Entitlement as bp, type LedgerEntry as bq, type ShopApi as br, type StorefrontResponse as bs, type StorefrontItem as bt, type ShopPurchaseResponse as bu, type ShopOrderHistoryResponse as bv, type PromptLoginResult as bw, type AccessTier as bx, type AccessGateApi as by, type TextGenApi as bz, type RundotGameAvailableRecipe as c, type GamepadAxes as c$, type ThreeDGenReport as c0, type Avatar3dApi as c1, type AssetManifest as c2, type Avatar3dConfig as c3, type ShowEditorOptions as c4, type Avatar3dEdits as c5, type AdsApi as c6, type SharedStorageHostApi as c7, type FilesApi as c8, type ClipsApi as c9, type AdminThreeDGenListReportsResponse as cA, type AdminThreeDGenResolveAction as cB, type AdminUgcEntry as cC, type AdminVideoGenBrowseParams as cD, type AdminVideoGenBrowseResponse as cE, type AdminVideoGenListReportsParams as cF, type AdminVideoGenListReportsResponse as cG, type AdminVideoGenResolveAction as cH, type AiContentBlock as cI, type AiImageContent as cJ, type AiImageUrlContent as cK, type AiMessage as cL, type AiResponseFormat as cM, type AiTextContent as cN, type AiToolResultContent as cO, type AiToolUseContent as cP, type Asset as cQ, type AudioGenEntry as cR, type AudioGenReport as cS, CLIP_CONTENT_TYPE as cT, type Category as cU, type ClipAudioOptions as cV, type ClipCameraOptions as cW, type ClipPipLayout as cX, type ClipPipPosition as cY, type ConnectionState as cZ, GAMEPAD_BUTTON_NAMES as c_, type AttributionApi as ca, type InitializationContext as cb, type InitializationOptions as cc, type CaptureConsent as cd, type StartClipRecordingOptions as ce, type ClipBlob as cf, type ClipsSupport as cg, type ClipPersistOptions as ch, type ClipResult as ci, type UgcEntry as cj, type CaptureConsentStatus as ck, AccessDeniedError as cl, type AdminGenApi as cm, type AdminImageGenBrowseParams as cn, type AdminImageGenBrowseResponse as co, type AdminImageGenListReportsParams as cp, type AdminImageGenListReportsResponse as cq, type AdminImageGenResolveAction as cr, type AdminSpriteGenBrowseParams as cs, type AdminSpriteGenBrowseResponse as ct, type AdminSpriteGenListReportsParams as cu, type AdminSpriteGenListReportsResponse as cv, type AdminSpriteGenResolveAction as cw, type AdminThreeDGenBrowseParams as cx, type AdminThreeDGenBrowseResponse as cy, type AdminThreeDGenListReportsParams as cz, type RundotGameCollectRecipeResult as d, type VideoGenEntry as d$, type GamepadButtonName as d0, type GamepadButtonState as d1, type GamepadSource as d2, type GetSubscriptionsForTierRequest as d3, type HudInsets as d4, type InboundForKeyEntry as d5, type InboundMethodIds as d6, type InboundStorageApi as d7, type IsPlayerSubscribedRequest as d8, type JoinOrCreateRoomEnvelopeResponse as d9, type RpcTransport as dA, type RunSubscription as dB, type RundotGameRoomCustomMetadata as dC, type RundotGameRoomPayload as dD, type RundotGameRoomRules as dE, type RundotGameRoomRulesGameState as dF, SHARE_FILE_ALLOWED_MIME_TYPES as dG, SHARE_FILE_MAX_SIZE_BYTES as dH, type ScheduleRCSStatus as dI, type ServerPlayer as dJ, type ServerRoom as dK, type ShareFileMimeType as dL, type ShopOrder as dM, type SimulationBatchOperationAssign as dN, type SimulationBatchOperationRemove as dO, type SimulationBatchOperationResult as dP, type SimulationPersonalState as dQ, type SimulationRoomActiveRecipe as dR, type SimulationRoomState as dS, type StorefrontCollection as dT, type StorefrontCollectionItem as dU, type SubPath as dV, type Tool as dW, type ToolChoice as dX, type ToolUse as dY, type TimeIntervalTriggerInput as dZ, type UgcReport as d_, type JoinRoomMatchCriteria as da, type LaunchIntentKind as db, type ListUserRoomsOptions as dc, type LoadEmbeddedAssetsRequest as dd, MockAvatarApi as de, type NotificationTriggerInput as df, type OnNotificationCallback as dg, type OnRequestCallback as dh, type OnResponseCallback as di, type ProposedMovePayload as dj, type Protocol as dk, type PurchaseSubscriptionRequest as dl, type RCSAvailabilityReason as dm, type RCSOptInStatus as dn, ROOM_GAME_PHASES as dp, type RealtimeRoomSummary as dq, type RecipeInfo as dr, type RoomEnvelopeResponse as ds, type RoomEvents as dt, type RoomGamePhase as du, type RoomMessageEventType as dv, type RoomMessagePayload as dw, type RoomsEnvelopeResponse as dx, RpcInboundStorageApi as dy, RpcSharedAssetsApi as dz, type RundotGameExecuteRecipeOptions as e, type VideoGenReport as e0, createHost as e1, resolveCollectionItemPrice as e2, type RundotGameExecuteRecipeResult as f, type RundotGameExecuteScopedRecipeOptions as g, RundotGameRoom as h, type RundotGameSimulationConfig as i, type RundotGameSimulationEffect as j, type RundotGameSimulationRecipe as k, type RundotGameSimulationStateResponse as l, type SimulationEntityUpdate as m, type SimulationRunSummary as n, type SimulationSnapshotUpdate as o, type SimulationSubscribeOptions as p, type SimulationUpdateData as q, type SimulationUpdateType as r, type RpcRequest as s, type RpcResponse as t, type RpcNotification as u, RpcClient as v, type StorageApi as w, type NavigationStackInfo as x, type PushAppOptions as y, type NavigateToGameOptions as z };
|