@diffenderfer-games/hub 2.0.0-next.0 → 2.0.0-next.10
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/CHANGELOG.md +163 -0
- package/LICENSE +21 -21
- package/README.md +203 -139
- package/dist/auto.d.ts +8 -8
- package/dist/auto.js +3 -3
- package/dist/avatar-pixi.d.ts +165 -0
- package/dist/avatar-pixi.d.ts.map +1 -0
- package/dist/avatar-pixi.js +299 -0
- package/dist/avatar-pixi.js.map +1 -0
- package/dist/avatar-svg.d.ts +4 -0
- package/dist/avatar-svg.js +5 -0
- package/dist/avatar-three.d.ts +69 -0
- package/dist/avatar-three.d.ts.map +1 -0
- package/dist/avatar-three.js +49 -0
- package/dist/avatar-three.js.map +1 -0
- package/dist/avatar.d.ts +7 -0
- package/dist/avatar.js +500 -0
- package/dist/avatar.js.map +1 -0
- package/dist/daily.d.ts +2 -2
- package/dist/doctor/cli.mjs +119 -28
- package/dist/doctor/cli.mjs.map +1 -1
- package/dist/index.d.ts +8 -8
- package/dist/index.js +3 -3
- package/dist/input.d.ts +2 -2
- package/dist/input.js +2 -2
- package/dist/mp.d.ts +3 -3
- package/dist/race.d.ts +1 -1
- package/dist/rooms.d.ts +3 -3
- package/dist/rooms.js +1 -1
- package/dist/shared/animator.d.ts +104 -0
- package/dist/shared/animator.d.ts.map +1 -0
- package/dist/shared/art.js +1946 -0
- package/dist/shared/art.js.map +1 -0
- package/dist/shared/atlas.d.ts +138 -0
- package/dist/shared/atlas.d.ts.map +1 -0
- package/dist/shared/avatar.d.ts +123 -0
- package/dist/shared/avatar.d.ts.map +1 -0
- package/dist/shared/bridge.js +18 -4
- package/dist/shared/bridge.js.map +1 -1
- package/dist/shared/client-version.gen.js +1 -1
- package/dist/shared/daily.d.ts +145 -19
- package/dist/shared/daily.d.ts.map +1 -1
- package/dist/shared/daily.js +138 -25
- package/dist/shared/daily.js.map +1 -1
- package/dist/shared/defineProperty.js +39 -0
- package/dist/shared/describe.d.ts +32 -0
- package/dist/shared/describe.d.ts.map +1 -0
- package/dist/shared/describe.js +109 -0
- package/dist/shared/describe.js.map +1 -0
- package/dist/shared/globals.js +9 -42
- package/dist/shared/globals.js.map +1 -1
- package/dist/shared/index.d.ts +1122 -46
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/shared/input.d.ts +74 -14
- package/dist/shared/input.d.ts.map +1 -1
- package/dist/shared/input.js +179 -25
- package/dist/shared/input.js.map +1 -1
- package/dist/shared/json-guards.js +48 -0
- package/dist/shared/json-guards.js.map +1 -0
- package/dist/shared/latest-state.js +1 -1
- package/dist/shared/live-canvas.js +62 -0
- package/dist/shared/live-canvas.js.map +1 -0
- package/dist/shared/mp.js +10 -2
- package/dist/shared/mp.js.map +1 -1
- package/dist/shared/multiplayer-types.d.ts +15 -2
- package/dist/shared/multiplayer-types.d.ts.map +1 -1
- package/dist/shared/overlays.js +800 -0
- package/dist/shared/overlays.js.map +1 -0
- package/dist/shared/page-stack.js +2 -1
- package/dist/shared/page-stack.js.map +1 -1
- package/dist/shared/pose-key.js +249 -0
- package/dist/shared/pose-key.js.map +1 -0
- package/dist/shared/race-types.d.ts +1 -1
- package/dist/shared/race.js +1 -1
- package/dist/shared/room-types.d.ts +28 -3
- package/dist/shared/room-types.d.ts.map +1 -1
- package/dist/shared/rooms.d.ts.map +1 -1
- package/dist/shared/rooms.js +23 -4
- package/dist/shared/rooms.js.map +1 -1
- package/dist/shared/runtime-opener.js +1 -1
- package/dist/shared/scene.d.ts +90 -0
- package/dist/shared/scene.d.ts.map +1 -0
- package/dist/shared/social.d.ts +90 -9
- package/dist/shared/social.d.ts.map +1 -1
- package/dist/shared/social.js +6 -1
- package/dist/shared/social.js.map +1 -1
- package/dist/shared/src.js +4563 -667
- package/dist/shared/src.js.map +1 -1
- package/dist/shared/svg-markup.js +2354 -0
- package/dist/shared/svg-markup.js.map +1 -0
- package/dist/shared/svg.js +27 -0
- package/dist/shared/svg.js.map +1 -0
- package/dist/shared/types.d.ts +174 -0
- package/dist/shared/types.d.ts.map +1 -0
- package/dist/shared/wire-types.d.ts +6 -2
- package/dist/shared/wire-types.d.ts.map +1 -1
- package/dist/social.d.ts +5 -5
- package/dist/social.js +2 -2
- package/dist/turns-rules.d.ts +2 -0
- package/dist/turns-rules.js +1 -0
- package/dist/turns.d.ts +61 -0
- package/dist/turns.d.ts.map +1 -0
- package/dist/turns.js +183 -0
- package/dist/turns.js.map +1 -0
- package/package.json +125 -89
- package/src/auto.ts +39 -39
- package/src/avatar/adapters/pixi-avatar.ts +73 -0
- package/src/avatar/adapters/pixi-crowd.ts +329 -0
- package/src/avatar/adapters/pixi-types.ts +84 -0
- package/src/avatar/adapters/three.ts +126 -0
- package/src/avatar/animator/animator.ts +285 -0
- package/src/avatar/animator/reactions.ts +44 -0
- package/src/avatar/animator/schedule.ts +73 -0
- package/src/avatar/art/beard.ts +49 -0
- package/src/avatar/art/glasses.ts +67 -0
- package/src/avatar/art/hair.ts +254 -0
- package/src/avatar/art/headwear.ts +75 -0
- package/src/avatar/art/index.ts +21 -0
- package/src/avatar/art/shape.ts +87 -0
- package/src/avatar/art-store.ts +36 -0
- package/src/avatar/atlas.ts +246 -0
- package/src/avatar/catalog-view.ts +14 -0
- package/src/avatar/colour.ts +109 -0
- package/src/avatar/describe.ts +79 -0
- package/src/avatar/face.ts +187 -0
- package/src/avatar/geom.ts +173 -0
- package/src/avatar/layout.ts +47 -0
- package/src/avatar/look-like.ts +52 -0
- package/src/avatar/outputs/bitmap.ts +75 -0
- package/src/avatar/outputs/canvas-paint.ts +177 -0
- package/src/avatar/outputs/canvas.ts +62 -0
- package/src/avatar/outputs/custom-element.ts +140 -0
- package/src/avatar/outputs/element.ts +58 -0
- package/src/avatar/outputs/live-canvas.ts +57 -0
- package/src/avatar/outputs/overlay-svg.ts +22 -0
- package/src/avatar/outputs/pose-key.ts +30 -0
- package/src/avatar/outputs/svg-markup.ts +113 -0
- package/src/avatar/outputs/svg.ts +41 -0
- package/src/avatar/overlays.ts +128 -0
- package/src/avatar/render/body.ts +116 -0
- package/src/avatar/render/colours.ts +81 -0
- package/src/avatar/render/compose.ts +320 -0
- package/src/avatar/render/context.ts +117 -0
- package/src/avatar/render/eyes.ts +78 -0
- package/src/avatar/render/eyewear.ts +118 -0
- package/src/avatar/render/frame.ts +73 -0
- package/src/avatar/render/head.ts +81 -0
- package/src/avatar/render/mouth.ts +86 -0
- package/src/avatar/render/props.ts +91 -0
- package/src/avatar/render/types.ts +93 -0
- package/src/avatar/render/walker-parts.ts +121 -0
- package/src/avatar/render/walker.ts +199 -0
- package/src/avatar/scene.ts +119 -0
- package/src/avatar-pixi.ts +20 -0
- package/src/avatar-svg.ts +21 -0
- package/src/avatar-three.ts +18 -0
- package/src/avatar.ts +63 -0
- package/src/core/avatar/avatar-cache.ts +95 -0
- package/src/core/avatar/avatar-ref.ts +34 -0
- package/src/core/avatar/avatar-types.ts +43 -0
- package/src/core/avatar/hub-avatar.ts +308 -0
- package/src/core/connection.ts +408 -299
- package/src/core/errors.ts +160 -147
- package/src/core/game-data.ts +40 -38
- package/src/core/hub-economy.ts +216 -179
- package/src/core/hub-progress.ts +269 -205
- package/src/core/hub.ts +352 -131
- package/src/core/menu-control.ts +61 -61
- package/src/core/offline/cloud-saves.ts +62 -0
- package/src/core/offline/events.ts +50 -50
- package/src/core/offline/favorites.ts +21 -21
- package/src/core/offline/hub-kinds/avatar-kind.ts +42 -0
- package/src/core/offline/hub-kinds/daily-kind.ts +68 -0
- package/src/core/offline/hub-kinds/economy-kinds.ts +86 -0
- package/src/core/offline/hub-kinds/game-fields.ts +2 -0
- package/src/core/offline/hub-kinds/index.ts +52 -0
- package/src/core/offline/hub-kinds/legacy-ops.ts +37 -0
- package/src/core/offline/hub-kinds/progress-kinds.ts +165 -0
- package/src/core/offline/hub-kinds/resume-kind.ts +108 -0
- package/src/core/offline/hub-kinds/saved-kind.ts +93 -0
- package/src/core/offline/kind-adapters.ts +48 -0
- package/src/core/offline/local-inventory.ts +64 -0
- package/src/core/offline/local-store.ts +304 -261
- package/src/core/offline/offline-api.ts +65 -0
- package/src/core/offline/outbox-entry.ts +59 -0
- package/src/core/offline/outbox-kinds.ts +78 -0
- package/src/core/offline/outbox-merge.ts +39 -0
- package/src/core/offline/outbox-replayer.ts +141 -0
- package/src/core/offline/outbox-store.ts +85 -0
- package/src/core/offline/outbox.ts +232 -0
- package/src/core/offline/queue.ts +126 -171
- package/src/core/offline/replay-lease.ts +87 -0
- package/src/core/offline/replay-policy.ts +52 -0
- package/src/core/page-account.ts +121 -0
- package/src/core/page.ts +87 -74
- package/src/core/rest/endpoint-types.ts +22 -22
- package/src/core/rest/rest-client.ts +163 -152
- package/src/core/rest/routes.gen.ts +144 -88
- package/src/core/resume/hub-resume.ts +286 -0
- package/src/core/resume/local-resume.ts +130 -0
- package/src/core/resume/resume-list.ts +65 -0
- package/src/core/resume/resume-request.ts +52 -0
- package/src/core/resume/resume-types.ts +64 -0
- package/src/core/saved/daily-saves.ts +196 -0
- package/src/core/saved/daily-seed.ts +16 -0
- package/src/core/saved/hub-saved.ts +221 -0
- package/src/core/saved/local-saved.ts +122 -0
- package/src/core/saved/saved-list.ts +129 -0
- package/src/core/saved/saved-open.ts +104 -0
- package/src/core/saved/saved-order.ts +49 -0
- package/src/core/saved/saved-types.ts +24 -0
- package/src/core/storage/json-guards.ts +80 -74
- package/src/core/storage/key-value.ts +66 -66
- package/src/core/ticket.ts +43 -43
- package/src/core/turns/hub-turns.ts +161 -0
- package/src/core/turns/turn-game.ts +510 -0
- package/src/core/turns/your-turn-buzz.ts +69 -0
- package/src/core/types.ts +134 -134
- package/src/core/version/client-version.gen.ts +2 -2
- package/src/core/version/hub-version.ts +62 -62
- package/src/core/version/semver.ts +97 -97
- package/src/daily/daily-system.ts +276 -161
- package/src/daily/page-daily.ts +36 -36
- package/src/daily/types.ts +105 -67
- package/src/daily.ts +10 -10
- package/src/doctor/checks.ts +86 -76
- package/src/doctor/cli.ts +101 -106
- package/src/doctor/hub-version-fetch.ts +43 -0
- package/src/doctor/tsconfig.json +12 -12
- package/src/doctor/world-check.ts +61 -0
- package/src/globals.ts +115 -110
- package/src/index.ts +68 -50
- package/src/input/device-state.ts +146 -146
- package/src/input/edges.ts +55 -55
- package/src/input/focus-ring.ts +13 -0
- package/src/input/gamepad.ts +61 -61
- package/src/input/input-events.ts +32 -32
- package/src/input/input-registry.ts +171 -164
- package/src/input/input-system.ts +406 -393
- package/src/input/legacy-controls.ts +64 -64
- package/src/input/modality.ts +122 -0
- package/src/input/nav-state.ts +200 -191
- package/src/input/navigator.ts +182 -171
- package/src/input/on-screen-controls.ts +101 -101
- package/src/input/page-control.ts +43 -43
- package/src/input/page-input.ts +193 -193
- package/src/input/player-remaps.ts +77 -77
- package/src/input/source-values.ts +116 -116
- package/src/input/spatial.ts +47 -47
- package/src/input/types.ts +331 -331
- package/src/input/zero-config.ts +164 -177
- package/src/input.ts +26 -22
- package/src/mp.ts +10 -10
- package/src/overlay/controls-panel.ts +163 -163
- package/src/overlay/dom.ts +46 -46
- package/src/overlay/layout-clusters.ts +162 -162
- package/src/overlay/layout-geometry.ts +136 -136
- package/src/overlay/layout.ts +203 -203
- package/src/overlay/listener-scope.ts +23 -23
- package/src/overlay/on-screen-keyboard.ts +137 -137
- package/src/overlay/overlay.ts +234 -208
- package/src/overlay/styles.ts +13 -12
- package/src/overlay/virtual-controls.ts +262 -262
- package/src/race.ts +10 -10
- package/src/realtime/bridge.ts +126 -121
- package/src/realtime/cross-bundle.ts +29 -29
- package/src/realtime/fallback-notice.ts +48 -48
- package/src/realtime/hub-link.ts +65 -65
- package/src/realtime/latest-state.ts +33 -33
- package/src/realtime/multiplayer-forwarder.ts +40 -28
- package/src/realtime/multiplayer-types.ts +66 -52
- package/src/realtime/page-runtime.ts +60 -60
- package/src/realtime/race-forwarder.ts +59 -59
- package/src/realtime/race-types.ts +132 -132
- package/src/realtime/room-types.ts +151 -125
- package/src/realtime/rooms-forwarder.ts +104 -79
- package/src/realtime/runtime-api.ts +74 -49
- package/src/realtime/runtime-opener.ts +61 -61
- package/src/realtime/social-forwarder.ts +77 -72
- package/src/realtime/social-types.ts +86 -78
- package/src/realtime/types.ts +54 -53
- package/src/realtime/wire-types.ts +79 -72
- package/src/realtime/world-types.ts +20 -0
- package/src/rooms.ts +10 -10
- package/src/social.ts +19 -18
- package/src/turns-kit/check-rules.ts +281 -0
- package/src/turns-rules.ts +12 -0
- package/src/turns.ts +14 -0
- package/src/types.ts +13 -13
- package/src/uistack/page-stack.ts +45 -45
- package/src/uistack/play-suspension.ts +82 -82
- package/src/uistack/types.ts +76 -76
- package/src/uistack/ui-stack.ts +144 -144
package/dist/auto.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import {
|
|
3
|
-
import { $ as
|
|
4
|
-
import { a as
|
|
1
|
+
import { A as SAVED_OPEN_EVENT, C as SavedKind, D as TurnSummary, E as SavedStatus, M as SavedOpened, N as savedGameUrl, O as SAVED_CHANGE_EVENT, S as SavedEntry, T as SavedProgress, _ as DailyStartResponse, a as isDailySystem, b as SavedCounts, c as DailyAll, d as DailyCompletionMeta, f as DailyDefinition, g as DailySaveInput, h as DailyHost, i as getDaily, j as SAVED_OPEN_PARAM, k as SAVED_KIND_PARAM, l as DailyChallenge, m as DailyGameStatus, n as DailyCompletions, o as DAILY_START_EVENT, p as DailyEventDetail, r as DAILY_SINGLETON_API, s as DailySystem, t as DailyCompletion, u as DailyCompleteResponse, v as DailyStatus, w as SavedListOptions, x as SavedDaily, y as GamePayload } from "./shared/daily.js";
|
|
2
|
+
import { a as RaceRecordPlayer, c as RealtimeErrorShape, d as RoomSeat, f as RoomSeatChange, g as Snapshot, h as ServerEvents, i as RaceHistory, l as RoomChatLine, m as SchemaOutput, n as InviteLink, o as RaceResultPlayer, p as RoomStateChange, r as Notice, s as RaceStatusEvent, t as InviteCreated, u as RoomMessage } from "./shared/wire-types.js";
|
|
3
|
+
import { $ as NavTarget, A as PageInputControl, B as InputConfig, C as INPUT_SINGLETON_API, D as parseInputOverrides, E as isInputSystem, F as AxisSide, G as InputReading, H as InputEvents, I as DraggedSpot, J as MouseMapping, K as InputSource, L as EdgeOffsets, M as AutoNavigateTarget, N as Anchor, O as InputSystem, P as AxisDef, Q as NavFocusEvent, R as GamepadMapping, S as FOCUS_RING_SHADOW, T as getInput, U as InputHost, V as InputDef, W as InputOverrides, X as NavElement, Y as NavBlurEvent, Z as NavElementKind, _ as boxesTouch, a as OverlayEdge, at as VirtualDef, b as MODALITY_ATTRIBUTE, c as OverlayReason, d as LayoutOptions, et as NavigableDef, f as layoutControls, g as LayoutItem, h as LayoutBox, i as AutoPauseOptions, it as VirtualControlType, j as isPageInputControl, k as InputSystemOptions, l as UiStack, m as Insets, n as getUiStack, nt as TouchMapping, o as OverlayEvent, ot as VirtualInputs, p as Overlay, q as MenuBridge, r as isUiStack, rt as Vector, s as OverlayListener, st as VirtualOverride, t as UI_STACK_VERSION, tt as Rect, u as UiStackHandoff, v as controlSize, w as InputOptions, x as trackInputModality, y as InputModality, z as GroupDef } from "./shared/input.js";
|
|
4
|
+
import { a as InviteResult, i as InviteOptions, n as HubMpApi, o as JoinInfoEvent, r as InviteLinkMethods, t as BusyOptions } from "./shared/multiplayer-types.js";
|
|
5
5
|
import { o as multiplayerForwarder } from "./shared/mp.js";
|
|
6
|
-
import { a as RoomEvents, c as
|
|
6
|
+
import { a as RoomEvents, c as RoomSelf, d as RoomStateOptions, i as RoomCreateOptions, l as RoomSendOptions, n as HubRoomsApi, o as RoomListOptions, r as JoinOptions, s as RoomReclaimMethods, t as HubRoom, u as RoomState } from "./shared/room-types.js";
|
|
7
7
|
import { a as RaceHistoryQuery, c as RaceRuntimeApi, i as RaceEvents, l as RaceStart, n as RaceCreateOptions, o as RaceHistoryViewOptions, r as RaceDefinition, s as RaceHudPlace, t as HubRaceApi } from "./shared/race-types.js";
|
|
8
8
|
import { f as raceForwarder } from "./shared/race.js";
|
|
9
9
|
import { n as roomsForwarder } from "./shared/rooms.js";
|
|
10
|
-
import { $ as
|
|
11
|
-
import { $ as
|
|
10
|
+
import { $ as AvatarRef, A as RacerState, B as SuggestionStatus, C as RaceRecord, D as RaceStats, E as RaceState, F as ReportReason, G as REALTIME_READY_EVENT, H as isRealtimeApi, I as RoomInfo, J as SESSION_EVENT, K as REALTIME_SINGLETON_API, L as SocialConfig, M as Relation, N as ReportInput, O as Racer, P as ReportKind, Q as AvatarChange, R as SocialMe, S as RaceParams, T as RaceStatValue, U as REALTIME_FAILED_EVENT, V as findRealtimeApi, W as REALTIME_FEATURE_VERSION, X as WorldEventName, Y as RuntimeWorldApi, Z as WorldOpName, _ as PlayerLite, a as ErrorBody, at as notifyForwarder, b as PresenceKind, c as JoinInfo, ct as HubNotifyApi, d as Message, dt as OpenInviteOptions, et as DesignerResult, f as MessagesPage, ft as PlayOnlineMethods, g as PlayerCard, h as Party, ht as SocialEvents, i as Counts, it as linkRealtimeToHub, j as RecentPlayer, k as RacerResult, l as Launch, lt as HubPresenceApi, m as NotifyPrefs, mt as SocialCounts, n as ChatMode, nt as RuntimeAvatarApi, o as FriendEntry, ot as presenceForwarder, p as NotifyChange, pt as PlayerRef, q as RealtimeApi, r as Conversation, rt as RealtimeHubLink, s as Invite, st as socialForwarder, t as Audience, tt as OpenDesignerOptions, u as LaunchTicket, ut as HubSocialApi, v as Presence, w as RaceResult, x as RaceOutcome, y as PresenceInput, z as Suggestion } from "./shared/social.js";
|
|
11
|
+
import { $ as TradeListOptions, $t as AvatarModule, A as TurnGame, At as HubOptions, B as HubResume, Bt as ProfileSummary, C as TURN_LINK_PARAM, Ct as Board, D as TURN_POLL_MS, Dt as GameLeaderboards, E as TURN_EVENT, Et as GameInfo, F as HubSaved, Ft as LeaderboardEntry, G as ResumeLoadOptions, Gt as Stats, H as RESUME_MAX_STATE_BYTES, Ht as SaveMeta, I as SAVED_CHANGE_QUIET_MS, It as LeaderboardResult, J as ResumeSaveInput, Jt as User, K as ResumeProgress, Kt as SubmitScoreOptions, L as SavedChangeListener, Lt as MeResponse, M as TurnGameOptions, Mt as Inventory, N as TurnMoveEvent, Nt as InventorySnapshot, O as TURN_QUIET_MS, Ot as GameRecords, P as TurnOutcome, Pt as Json, Q as TradeId, Qt as AvatarHost, R as SavedOpenDetail, Rt as Metrics, S as HubTurns, St as BufferedEvent, T as TURN_CHAT_EVENT, Tt as GameAnalytics, U as ResumeBlocker, Ut as SnapshotResponse, V as RESUME_DEBOUNCE_MS, Vt as Save, W as ResumeEntry, Wt as SortDir, X as GrantBundle, Xt as EndpointName, Y as HubMenuControl, Yt as EndpointFields, Z as TradeBundle, Zt as EndpointReply, _ as UNSUPPORTED_BY_HUB, _t as CLIENT_VERSION_HEADER, a as HUB_CLIENT_VERSION, at as SyncResult, b as hub, bt as QueueOpInput, c as isNewlyDue, ct as OfflineEventDetails, d as ContentRejectedError, dt as OfflineOp, en as HubAvatar, et as TradeNoteOptions, f as HubError, ft as OUTBOX_MAX_CHARS, g as SAVE_UNKNOWN_CODE, gt as ReplayContext, h as OfflineError, ht as OfflineKindDefinition, i as TurnGameView, it as SyncConflict, j as TurnGameEvents, jt as HubStatus, k as TURN_RESYNC_EVENT, kt as GlobalAnalytics, l as readYourTurnBuzz, lt as OfflineEventName, m as HubErrorDetails, mt as OfflineHandler, n as TurnChatLine, nt as ProfileUpdate, o as YOUR_TURN_BUZZ, ot as OfflineApi, p as HubErrorCode, pt as OUTBOX_MAX_ENTRIES, q as ResumeRun, qt as SubmitScoreResult, r as TurnDeadline, rt as StatResult, s as YOUR_TURN_BUZZ_KEY, st as OUTBOX_FULL_CODE, t as OpenTurnGame, tn as CarriesLook, tt as AuthResponse, u as saveYourTurnBuzz, ut as OfflineListener, v as Hub, vt as ProfilePatch, w as TurnCreateOptions, wt as BoardWithTop, x as ClientSupport, xt as QueuedScoreOptions, y as createHub, yt as QueueOp, z as SavedOpenHandler, zt as Profile } from "./shared/index.js";
|
|
12
12
|
//#region src/auto.d.ts
|
|
13
13
|
/** What `window.HubSDK` holds. */
|
|
14
14
|
export interface HubSdkGlobal {
|
|
@@ -32,5 +32,5 @@ declare global {
|
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
//#endregion
|
|
35
|
-
export { type Anchor, type Audience, type AuthResponse, type AutoPauseOptions, type AxisDef, type AxisSide, type Board, type BoardWithTop, type BufferedEvent, type BusyOptions, CLIENT_VERSION_HEADER, type ChatMode, type ClientSupport, ContentRejectedError, type Conversation, type Counts, DAILY_SINGLETON_API, DAILY_START_EVENT, type DailyAll, type DailyChallenge, type DailyCompleteResponse, type DailyCompletion, type DailyCompletionMeta, type DailyCompletions, type DailyDefinition, type DailyEventDetail, type DailyGameStatus, type DailyHost, type DailyStartResponse, type DailyStatus, DailySystem, type DraggedSpot, type EdgeOffsets, type EndpointFields, type EndpointName, type EndpointReply, type ErrorBody, type FriendEntry, type GameAnalytics, type GameInfo, type GameLeaderboards, type GamePayload, type GameRecords, type GamepadMapping, type GlobalAnalytics, type GrantBundle, type GroupDef, HUB_CLIENT_VERSION, Hub, HubError, type HubErrorCode, type HubErrorDetails, type HubMenuControl, type HubMpApi, type HubNotifyApi, type HubOptions, type HubPresenceApi, type HubRaceApi, type HubRoom, type HubRoomsApi, type HubSocialApi, type HubStatus, INPUT_SINGLETON_API, type InputConfig, type InputDef, type InputEvents, type InputHost, type InputOptions, type InputOverrides, type InputReading, type InputSource, InputSystem, type InputSystemOptions, type Insets, type Inventory, type InventorySnapshot, type Invite, type InviteCreated, type InviteOptions, type InviteResult, type JoinInfo, type JoinInfoEvent, type JoinOptions, type Json, type Launch, type LaunchTicket, type LayoutBox, type LayoutItem, type LayoutOptions, type LeaderboardEntry, type LeaderboardResult, type MeResponse, type MenuBridge, type Message, type MessagesPage, type Metrics, type MouseMapping, type NavBlurEvent, type NavElement, type NavElementKind, type NavFocusEvent, type NavTarget, type NavigableDef, type Notice, type NotifyChange, type NotifyPrefs, OfflineError, type OpenInviteOptions, Overlay, type OverlayEdge, type OverlayEvent, type OverlayListener, type OverlayReason, type PageInputControl, type Party, type PlayerCard, type PlayerLite, type PlayerRef, type Presence, type PresenceInput, type PresenceKind, type Profile, type ProfilePatch, type ProfileSummary, type ProfileUpdate, type QueueOp, type QueueOpInput, type QueuedScoreOptions, type REALTIME_FAILED_EVENT, type REALTIME_FEATURE_VERSION, type REALTIME_READY_EVENT, type REALTIME_SINGLETON_API, type RaceCreateOptions, type RaceDefinition, type RaceEvents, type RaceHistory, type RaceHistoryQuery, type RaceHistoryViewOptions, type RaceHudPlace, type RaceOutcome, type RaceParams, type RaceRecord, type RaceRecordPlayer, type RaceResult, type RaceResultPlayer, type RaceRuntimeApi, type RaceStart, type RaceStatValue, type RaceState, type RaceStats, type RaceStatusEvent, type Racer, type RacerResult, type RacerState, type RealtimeApi, type RealtimeErrorShape, type RealtimeHubLink, type RecentPlayer, type Rect, type Relation, type ReportInput, type ReportKind, type ReportReason, type RoomChatLine, type RoomCreateOptions, type RoomEvents, type RoomInfo, type RoomListOptions, type RoomMessage, type RoomSeat, type RoomSelf, type RoomSendOptions, type RoomState, type RoomStateChange, type RoomStateOptions, type Save, type SaveMeta, type SchemaOutput, type ServerEvents, type Snapshot, type SnapshotResponse, type SocialConfig, type SocialCounts, type SocialEvents, type SocialMe, type SortDir, type StatResult, type Stats, type SubmitScoreOptions, type SubmitScoreResult, type Suggestion, type SuggestionStatus, type SyncConflict, type SyncResult, type TouchMapping, type TradeBundle, type TradeId, type TradeListOptions, type TradeNoteOptions, UI_STACK_VERSION, UNSUPPORTED_BY_HUB, type UiStack, type UiStackHandoff, type User, type Vector, type VirtualControlType, type VirtualDef, type VirtualInputs, type VirtualOverride, boxesTouch, controlSize, createHub, type findRealtimeApi, getDaily, getInput, getUiStack, hub, isDailySystem, isInputSystem, isPageInputControl, type isRealtimeApi, isUiStack, layoutControls, type linkRealtimeToHub, type multiplayerForwarder as mp, type notifyForwarder as notify, parseInputOverrides, type presenceForwarder as presence, type raceForwarder as race, type roomsForwarder as rooms, type socialForwarder as social };
|
|
35
|
+
export { type Anchor, type Audience, type AuthResponse, type AutoNavigateTarget, type AutoPauseOptions, type AvatarChange, type AvatarHost, type AvatarModule, type AvatarRef, type AxisDef, type AxisSide, type Board, type BoardWithTop, type BufferedEvent, type BusyOptions, CLIENT_VERSION_HEADER, type CarriesLook, type ChatMode, type ClientSupport, ContentRejectedError, type Conversation, type Counts, DAILY_SINGLETON_API, DAILY_START_EVENT, type DailyAll, type DailyChallenge, type DailyCompleteResponse, type DailyCompletion, type DailyCompletionMeta, type DailyCompletions, type DailyDefinition, type DailyEventDetail, type DailyGameStatus, type DailyHost, type DailySaveInput, type DailyStartResponse, type DailyStatus, DailySystem, type DesignerResult, type DraggedSpot, type EdgeOffsets, type EndpointFields, type EndpointName, type EndpointReply, type ErrorBody, FOCUS_RING_SHADOW, type FriendEntry, type GameAnalytics, type GameInfo, type GameLeaderboards, type GamePayload, type GameRecords, type GamepadMapping, type GlobalAnalytics, type GrantBundle, type GroupDef, HUB_CLIENT_VERSION, Hub, HubAvatar, HubError, type HubErrorCode, type HubErrorDetails, type HubMenuControl, type HubMpApi, type HubNotifyApi, type HubOptions, type HubPresenceApi, type HubRaceApi, HubResume, type HubRoom, type HubRoomsApi, HubSaved, type HubSocialApi, type HubStatus, HubTurns, INPUT_SINGLETON_API, type InputConfig, type InputDef, type InputEvents, type InputHost, type InputModality, type InputOptions, type InputOverrides, type InputReading, type InputSource, InputSystem, type InputSystemOptions, type Insets, type Inventory, type InventorySnapshot, type Invite, type InviteCreated, type InviteLink, type InviteLinkMethods, type InviteOptions, type InviteResult, type JoinInfo, type JoinInfoEvent, type JoinOptions, type Json, type Launch, type LaunchTicket, type LayoutBox, type LayoutItem, type LayoutOptions, type LeaderboardEntry, type LeaderboardResult, MODALITY_ATTRIBUTE, type MeResponse, type MenuBridge, type Message, type MessagesPage, type Metrics, type MouseMapping, type NavBlurEvent, type NavElement, type NavElementKind, type NavFocusEvent, type NavTarget, type NavigableDef, type Notice, type NotifyChange, type NotifyPrefs, OUTBOX_FULL_CODE, OUTBOX_MAX_CHARS, OUTBOX_MAX_ENTRIES, OfflineApi, OfflineError, type OfflineEventDetails, type OfflineEventName, type OfflineHandler, type OfflineKindDefinition, type OfflineListener, type OfflineOp, type OpenDesignerOptions, type OpenInviteOptions, type OpenTurnGame, Overlay, type OverlayEdge, type OverlayEvent, type OverlayListener, type OverlayReason, type PageInputControl, type Party, type PlayOnlineMethods, type PlayerCard, type PlayerLite, type PlayerRef, type Presence, type PresenceInput, type PresenceKind, type Profile, type ProfilePatch, type ProfileSummary, type ProfileUpdate, type QueueOp, type QueueOpInput, type QueuedScoreOptions, type REALTIME_FAILED_EVENT, type REALTIME_FEATURE_VERSION, type REALTIME_READY_EVENT, type REALTIME_SINGLETON_API, RESUME_DEBOUNCE_MS, RESUME_MAX_STATE_BYTES, type RaceCreateOptions, type RaceDefinition, type RaceEvents, type RaceHistory, type RaceHistoryQuery, type RaceHistoryViewOptions, type RaceHudPlace, type RaceOutcome, type RaceParams, type RaceRecord, type RaceRecordPlayer, type RaceResult, type RaceResultPlayer, type RaceRuntimeApi, type RaceStart, type RaceStatValue, type RaceState, type RaceStats, type RaceStatusEvent, type Racer, type RacerResult, type RacerState, type RealtimeApi, type RealtimeErrorShape, type RealtimeHubLink, type RecentPlayer, type Rect, type Relation, type ReplayContext, type ReportInput, type ReportKind, type ReportReason, type ResumeBlocker, type ResumeEntry, type ResumeLoadOptions, type ResumeProgress, type ResumeRun, type ResumeSaveInput, type RoomChatLine, type RoomCreateOptions, type RoomEvents, type RoomInfo, type RoomListOptions, type RoomMessage, type RoomReclaimMethods, type RoomSeat, type RoomSeatChange, type RoomSelf, type RoomSendOptions, type RoomState, type RoomStateChange, type RoomStateOptions, type RuntimeAvatarApi, type RuntimeWorldApi, SAVED_CHANGE_EVENT, SAVED_CHANGE_QUIET_MS, SAVED_KIND_PARAM, SAVED_OPEN_EVENT, SAVED_OPEN_PARAM, SAVE_UNKNOWN_CODE, type SESSION_EVENT, type Save, type SaveMeta, type SavedChangeListener, type SavedCounts, type SavedDaily, type SavedEntry, type SavedKind, type SavedListOptions, type SavedOpenDetail, type SavedOpenHandler, type SavedOpened, type SavedProgress, type SavedStatus, type SchemaOutput, type ServerEvents, type Snapshot, type SnapshotResponse, type SocialConfig, type SocialCounts, type SocialEvents, type SocialMe, type SortDir, type StatResult, type Stats, type SubmitScoreOptions, type SubmitScoreResult, type Suggestion, type SuggestionStatus, type SyncConflict, type SyncResult, TURN_CHAT_EVENT, TURN_EVENT, TURN_LINK_PARAM, TURN_POLL_MS, TURN_QUIET_MS, TURN_RESYNC_EVENT, type TouchMapping, type TradeBundle, type TradeId, type TradeListOptions, type TradeNoteOptions, type TurnChatLine, type TurnCreateOptions, type TurnDeadline, TurnGame, type TurnGameEvents, type TurnGameOptions, type TurnGameView, type TurnMoveEvent, type TurnOutcome, type TurnSummary, UI_STACK_VERSION, UNSUPPORTED_BY_HUB, type UiStack, type UiStackHandoff, type User, type Vector, type VirtualControlType, type VirtualDef, type VirtualInputs, type VirtualOverride, type WorldEventName, type WorldOpName, YOUR_TURN_BUZZ, YOUR_TURN_BUZZ_KEY, boxesTouch, controlSize, createHub, type findRealtimeApi, getDaily, getInput, getUiStack, hub, isDailySystem, isInputSystem, isNewlyDue, isPageInputControl, type isRealtimeApi, isUiStack, layoutControls, type linkRealtimeToHub, type multiplayerForwarder as mp, type notifyForwarder as notify, parseInputOverrides, type presenceForwarder as presence, type raceForwarder as race, readYourTurnBuzz, type roomsForwarder as rooms, saveYourTurnBuzz, savedGameUrl, type socialForwarder as social, trackInputModality };
|
|
36
36
|
//# sourceMappingURL=auto.d.ts.map
|
package/dist/auto.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { a as DailySystem, i as DAILY_START_EVENT, n as getDaily, r as isDailySystem, t as DAILY_SINGLETON_API } from "./shared/daily.js";
|
|
2
2
|
import { t as HUB_CLIENT_VERSION } from "./shared/client-version.gen.js";
|
|
3
|
-
import { a as isPageInputControl, c as layoutControls, i as parseInputOverrides, l as boxesTouch, n as getInput, o as InputSystem, r as isInputSystem, s as Overlay, t as INPUT_SINGLETON_API, u as controlSize } from "./shared/input.js";
|
|
3
|
+
import { a as isPageInputControl, c as layoutControls, d as MODALITY_ATTRIBUTE, f as trackInputModality, i as parseInputOverrides, l as boxesTouch, n as getInput, o as InputSystem, p as FOCUS_RING_SHADOW, r as isInputSystem, s as Overlay, t as INPUT_SINGLETON_API, u as controlSize } from "./shared/input.js";
|
|
4
4
|
import { n as isUiStack, r as UI_STACK_VERSION, t as getUiStack } from "./shared/page-stack.js";
|
|
5
|
-
import {
|
|
5
|
+
import { A as OUTBOX_MAX_ENTRIES, C as savedGameUrl, D as CLIENT_VERSION_HEADER, E as RESUME_MAX_STATE_BYTES, F as SAVE_UNKNOWN_CODE, I as UNSUPPORTED_BY_HUB, L as HubAvatar, M as ContentRejectedError, N as HubError, O as OUTBOX_FULL_CODE, P as OfflineError, S as SAVED_OPEN_PARAM, T as RESUME_DEBOUNCE_MS, _ as HubSaved, a as TURN_LINK_PARAM, b as SAVED_KIND_PARAM, c as TURN_POLL_MS, d as TurnGame, f as YOUR_TURN_BUZZ, g as saveYourTurnBuzz, h as readYourTurnBuzz, i as HubTurns, j as OfflineApi, k as OUTBOX_MAX_CHARS, l as TURN_QUIET_MS, m as isNewlyDue, n as createHub, o as TURN_CHAT_EVENT, p as YOUR_TURN_BUZZ_KEY, r as hub, s as TURN_EVENT, t as Hub, u as TURN_RESYNC_EVENT, v as SAVED_CHANGE_QUIET_MS, w as HubResume, x as SAVED_OPEN_EVENT, y as SAVED_CHANGE_EVENT } from "./shared/src.js";
|
|
6
6
|
//#region src/auto.ts
|
|
7
7
|
/**
|
|
8
8
|
* `@diffenderfer-games/hub/auto`: everything the main entry exports, plus a
|
|
@@ -22,6 +22,6 @@ if (typeof window !== "undefined") window.HubSDK = {
|
|
|
22
22
|
ContentRejectedError
|
|
23
23
|
};
|
|
24
24
|
//#endregion
|
|
25
|
-
export { CLIENT_VERSION_HEADER, ContentRejectedError, DAILY_SINGLETON_API, DAILY_START_EVENT, DailySystem, HUB_CLIENT_VERSION, Hub, HubError, INPUT_SINGLETON_API, InputSystem, OfflineError, Overlay, UI_STACK_VERSION, UNSUPPORTED_BY_HUB, boxesTouch, controlSize, createHub, getDaily, getInput, getUiStack, hub, isDailySystem, isInputSystem, isPageInputControl, isUiStack, layoutControls, parseInputOverrides };
|
|
25
|
+
export { CLIENT_VERSION_HEADER, ContentRejectedError, DAILY_SINGLETON_API, DAILY_START_EVENT, DailySystem, FOCUS_RING_SHADOW, HUB_CLIENT_VERSION, Hub, HubAvatar, HubError, HubResume, HubSaved, HubTurns, INPUT_SINGLETON_API, InputSystem, MODALITY_ATTRIBUTE, OUTBOX_FULL_CODE, OUTBOX_MAX_CHARS, OUTBOX_MAX_ENTRIES, OfflineApi, OfflineError, Overlay, RESUME_DEBOUNCE_MS, RESUME_MAX_STATE_BYTES, SAVED_CHANGE_EVENT, SAVED_CHANGE_QUIET_MS, SAVED_KIND_PARAM, SAVED_OPEN_EVENT, SAVED_OPEN_PARAM, SAVE_UNKNOWN_CODE, TURN_CHAT_EVENT, TURN_EVENT, TURN_LINK_PARAM, TURN_POLL_MS, TURN_QUIET_MS, TURN_RESYNC_EVENT, TurnGame, UI_STACK_VERSION, UNSUPPORTED_BY_HUB, YOUR_TURN_BUZZ, YOUR_TURN_BUZZ_KEY, boxesTouch, controlSize, createHub, getDaily, getInput, getUiStack, hub, isDailySystem, isInputSystem, isNewlyDue, isPageInputControl, isUiStack, layoutControls, parseInputOverrides, readYourTurnBuzz, saveYourTurnBuzz, savedGameUrl, trackInputModality };
|
|
26
26
|
|
|
27
27
|
//# sourceMappingURL=auto.js.map
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import { d as StatusProp, i as Figure, l as Pose, n as BodyPose, r as Facing, s as LookLike, u as RenderOptions } from "./shared/types.js";
|
|
2
|
+
import { r as AvatarAtlas, s as ReactionGlyph } from "./shared/atlas.js";
|
|
3
|
+
import { t as Animator } from "./shared/animator.js";
|
|
4
|
+
//#region src/avatar/adapters/pixi-types.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* The slice of PixiJS the adapters use, typed structurally so the hub has no
|
|
7
|
+
* dependency on pixi. Pixi 8 is the target; Pixi 7 works through the same
|
|
8
|
+
* calls where they exist (`Texture.from(canvas)`, `texture.update()`).
|
|
9
|
+
*/
|
|
10
|
+
/** A canvas-like source Pixi can upload. */
|
|
11
|
+
type PixiSource = HTMLCanvasElement | OffscreenCanvas;
|
|
12
|
+
/** A texture's uploadable source (Pixi 8). */
|
|
13
|
+
interface PixiTextureSource {
|
|
14
|
+
update(): void;
|
|
15
|
+
}
|
|
16
|
+
/** A texture (Pixi 8: `source.update()`; Pixi 7: `update()`). */
|
|
17
|
+
interface PixiTexture {
|
|
18
|
+
readonly source?: PixiTextureSource;
|
|
19
|
+
update?(): void;
|
|
20
|
+
destroy(destroySource?: boolean): void;
|
|
21
|
+
}
|
|
22
|
+
/** A display object's shared fields. */
|
|
23
|
+
interface PixiDisplay {
|
|
24
|
+
x: number;
|
|
25
|
+
y: number;
|
|
26
|
+
visible: boolean;
|
|
27
|
+
alpha: number;
|
|
28
|
+
zIndex: number;
|
|
29
|
+
readonly scale: {
|
|
30
|
+
x: number;
|
|
31
|
+
y: number;
|
|
32
|
+
set(x: number, y?: number): void;
|
|
33
|
+
};
|
|
34
|
+
destroy(options?: {
|
|
35
|
+
children?: boolean;
|
|
36
|
+
}): void;
|
|
37
|
+
}
|
|
38
|
+
/** A sprite showing a `TTexture`. */
|
|
39
|
+
interface PixiSprite<TTexture extends PixiTexture = PixiTexture> extends PixiDisplay {
|
|
40
|
+
texture: TTexture;
|
|
41
|
+
readonly anchor: {
|
|
42
|
+
set(x: number, y?: number): void;
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
/** A container that takes `TChild` sprites. */
|
|
46
|
+
interface PixiContainer<TChild extends PixiDisplay = PixiSprite> extends PixiDisplay {
|
|
47
|
+
sortableChildren: boolean;
|
|
48
|
+
addChild(child: TChild): void;
|
|
49
|
+
removeChild(child: TChild): void;
|
|
50
|
+
}
|
|
51
|
+
/** A frame rectangle. */
|
|
52
|
+
interface PixiRectangle {
|
|
53
|
+
readonly x: number;
|
|
54
|
+
readonly y: number;
|
|
55
|
+
readonly width: number;
|
|
56
|
+
readonly height: number;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* The PIXI namespace, as passed in by the game (`import * as PIXI from
|
|
60
|
+
* 'pixi.js'`, or an object of the named imports). It is generic over the
|
|
61
|
+
* game's own classes, inferred from what is passed, so the sprites and
|
|
62
|
+
* textures that come back are pixi's own types and go straight into a
|
|
63
|
+
* `Container` with no cast.
|
|
64
|
+
*/
|
|
65
|
+
interface PixiNs<TTexture extends PixiTexture = PixiTexture, TSprite extends PixiSprite<TTexture> = PixiSprite<TTexture>, TRectangle extends PixiRectangle = PixiRectangle> {
|
|
66
|
+
readonly Texture: {
|
|
67
|
+
from(source: PixiSource): TTexture;
|
|
68
|
+
new (options: {
|
|
69
|
+
source: NonNullable<TTexture['source']>;
|
|
70
|
+
frame: TRectangle;
|
|
71
|
+
}): TTexture;
|
|
72
|
+
};
|
|
73
|
+
readonly Sprite: new (texture?: TTexture) => TSprite;
|
|
74
|
+
/** Not used by the adapters; accepted so an object of the named imports can include it. */
|
|
75
|
+
readonly Container?: new () => PixiDisplay;
|
|
76
|
+
readonly Rectangle: new (x: number, y: number, width: number, height: number) => TRectangle;
|
|
77
|
+
}
|
|
78
|
+
//#endregion
|
|
79
|
+
//#region src/avatar/adapters/pixi-avatar.d.ts
|
|
80
|
+
/** Options for {@link pixiAvatar}. */
|
|
81
|
+
interface PixiAvatarOptions extends RenderOptions {
|
|
82
|
+
/** Drives the face each `update(t)`; without one the avatar is still. */
|
|
83
|
+
readonly animator?: Animator;
|
|
84
|
+
/** Texture pixels per CSS pixel (default 2). */
|
|
85
|
+
readonly resolution?: number;
|
|
86
|
+
}
|
|
87
|
+
/** A live Pixi avatar; `view` is the game's own pixi `Sprite`. */
|
|
88
|
+
interface PixiAvatar<TSprite extends PixiSprite = PixiSprite> {
|
|
89
|
+
/** The sprite to add to the stage (anchored at its centre). */
|
|
90
|
+
readonly view: TSprite;
|
|
91
|
+
/** Renders the animator's pose at `t` (or a given pose). */
|
|
92
|
+
update(t: number | Pose): void;
|
|
93
|
+
/** Swaps the look. */
|
|
94
|
+
setLook(like: LookLike): void;
|
|
95
|
+
destroy(): void;
|
|
96
|
+
}
|
|
97
|
+
/** A live avatar sprite: `pixiAvatar(pixi, seat.look, { size: 64, animator })`. */
|
|
98
|
+
export declare function pixiAvatar<TTexture extends PixiTexture, TSprite extends PixiSprite<TTexture>, TRectangle extends PixiRectangle>(pixi: PixiNs<TTexture, TSprite, TRectangle>, like: LookLike, opts?: PixiAvatarOptions): PixiAvatar<TSprite>;
|
|
99
|
+
/** A still avatar texture (Pixi 7 games use this from a bitmap-like canvas). */
|
|
100
|
+
export declare function avatarTexture<TTexture extends PixiTexture, TSprite extends PixiSprite<TTexture>, TRectangle extends PixiRectangle>(pixi: PixiNs<TTexture, TSprite, TRectangle>, like: LookLike, opts?: RenderOptions): TTexture;
|
|
101
|
+
//#endregion
|
|
102
|
+
//#region src/avatar/adapters/pixi-crowd.d.ts
|
|
103
|
+
/** One avatar's state in the crowd (the world's own protocol fills it). */
|
|
104
|
+
interface CrowdMember {
|
|
105
|
+
readonly look: LookLike;
|
|
106
|
+
readonly x: number;
|
|
107
|
+
readonly y: number;
|
|
108
|
+
readonly facing?: Facing;
|
|
109
|
+
readonly body?: BodyPose;
|
|
110
|
+
readonly status?: StatusProp | null;
|
|
111
|
+
/** The username for the name tag (omit for no tag). */
|
|
112
|
+
readonly name?: string;
|
|
113
|
+
readonly friend?: boolean;
|
|
114
|
+
readonly you?: boolean;
|
|
115
|
+
/** "Playing Uno": the game's catalog title. */
|
|
116
|
+
readonly activity?: string;
|
|
117
|
+
/** A quick-chat emote to pop (shown for 2.5 s from when it's set). */
|
|
118
|
+
readonly emote?: string;
|
|
119
|
+
readonly reaction?: ReactionGlyph;
|
|
120
|
+
/** Ask for live vector rendering (granted to at most `liveMax`). */
|
|
121
|
+
readonly live?: boolean;
|
|
122
|
+
/** Hide the tag (the world fades tags by distance and hides them when crowded). */
|
|
123
|
+
readonly tagHidden?: boolean;
|
|
124
|
+
/** Moves the tag and bubble up by this much (container units), so a world can stack tags that would overlap. */
|
|
125
|
+
readonly tagLift?: number;
|
|
126
|
+
}
|
|
127
|
+
/** Crowd options; `container` is the game's own pixi `Container`. */
|
|
128
|
+
interface CrowdOptions<TSprite extends PixiSprite = PixiSprite> {
|
|
129
|
+
readonly atlas: AvatarAtlas;
|
|
130
|
+
/** The container avatars go into (it is made y-sortable). */
|
|
131
|
+
readonly container: PixiContainer<TSprite>;
|
|
132
|
+
/** Live vector avatars at most (default 6; 2 on low-end devices). */
|
|
133
|
+
readonly liveMax?: number;
|
|
134
|
+
/** Atlas baking budget per update, ms (default 4). */
|
|
135
|
+
readonly bakeMs?: number;
|
|
136
|
+
/**
|
|
137
|
+
* Where name tags and bubbles go (default `container`). A world puts them in
|
|
138
|
+
* a container above its lighting so tags stay readable at night.
|
|
139
|
+
*/
|
|
140
|
+
readonly overlays?: PixiContainer<TSprite>;
|
|
141
|
+
/**
|
|
142
|
+
* Draws atlas avatars at this scale (default 1). Bake the atlas at
|
|
143
|
+
* `scale × devicePixelRatio` and pass `1 / devicePixelRatio` for crisp
|
|
144
|
+
* avatars on high-density screens; positions stay in the container's units.
|
|
145
|
+
*/
|
|
146
|
+
readonly displayScale?: number;
|
|
147
|
+
/**
|
|
148
|
+
* The figure the atlas draws (default `blob`). Pass the atlas's own
|
|
149
|
+
* figure, so name tags sit on the right heads and walks step in time.
|
|
150
|
+
*/
|
|
151
|
+
readonly figure?: Figure;
|
|
152
|
+
}
|
|
153
|
+
/** The crowd. */
|
|
154
|
+
interface AvatarCrowd {
|
|
155
|
+
set(id: string | number, member: CrowdMember): void;
|
|
156
|
+
remove(id: string | number): void;
|
|
157
|
+
/** Advances animation to `t` (ms), bakes, and lays everyone out. Call once per frame. */
|
|
158
|
+
update(t: number): void;
|
|
159
|
+
destroy(): void;
|
|
160
|
+
}
|
|
161
|
+
/** A crowd over an atlas: `createCrowd(pixi, { atlas, container })`. */
|
|
162
|
+
export declare function createCrowd<TTexture extends PixiTexture, TSprite extends PixiSprite<TTexture>, TRectangle extends PixiRectangle>(pixi: PixiNs<TTexture, TSprite, TRectangle>, opts: CrowdOptions<NoInfer<TSprite>>): AvatarCrowd;
|
|
163
|
+
//#endregion
|
|
164
|
+
export type { AvatarCrowd, CrowdMember, CrowdOptions, PixiAvatar, PixiAvatarOptions, PixiContainer, PixiNs, PixiSprite, PixiTexture };
|
|
165
|
+
//# sourceMappingURL=avatar-pixi.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"avatar-pixi.d.ts","names":[],"sources":["../src/avatar/adapters/pixi-types.ts","../src/avatar/adapters/pixi-avatar.ts","../src/avatar/adapters/pixi-crowd.ts"],"mappings":";;;;;;;;;;KAOY,aAAa,oBAAoB;;UAG5B;EACf;;;UAIe;WACN,SAAS;EAClB;EACA,QAAQ;;;UAIO;EACf;EACA;EACA;EACA;EACA;WACS;IAAS;IAAW;IAAW,IAAI,WAAW;;EACvD,QAAQ;IAAY;;;;UAIL,WAAW,iBAAiB,cAAc,qBAAqB;EAC9E,SAAS;WACA;IAAU,IAAI,WAAW;;;;UAInB,cAAc,eAAe,cAAc,oBAAoB;EAC9E;EACA,SAAS,OAAO;EAChB,YAAY,OAAO;;;UAIJ;WACN;WACA;WACA;WACA;;;;;;;;;UAUM,OACf,iBAAiB,cAAc,aAC/B,gBAAgB,WAAW,YAAY,WAAW,WAClD,mBAAmB,gBAAgB;WAE1B;IACP,KAAK,QAAQ,aAAa;SACrB;MAAW,QAAQ,YAAY;MAAqB,OAAO;QAAe;;WAExE,aAAa,UAAU,aAAa;;WAEpC,sBAAsB;WACtB,gBAAgB,WAAW,WAAW,eAAe,mBAAmB;;;;;UC5DlE,0BAA0B;;WAEhC,WAAW;;WAEX;;;UAIM,WAAW,gBAAgB,aAAa;;WAE9C,MAAM;;EAEf,OAAO,YAAY;;EAEnB,QAAQ,MAAM;EACd;;;wBAIc,WAAW,iBAAiB,aAAa,gBAAgB,WAAW,WAAW,mBAAmB,eAChH,MAAM,OAAO,UAAU,SAAS,aAChC,MAAM,UACN,OAAM,oBACL,WAAW;;wBA+BE,cAAc,iBAAiB,aAAa,gBAAgB,WAAW,WAAW,mBAAmB,eACnH,MAAM,OAAO,UAAU,SAAS,aAChC,MAAM,UACN,OAAM,gBACL;;;;UC/Cc;WACN,MAAM;WACN;WACA;WACA,SAAS;WACT,OAAO;WACP,SAAS;;WAET;WACA;WACA;;WAEA;;WAEA;WACA,WAAW;;WAEX;;WAEA;;WAEA;;;UAIM,aAAa,gBAAgB,aAAa;WAChD,OAAO;;WAEP,WAAW,cAAc;;WAEzB;;WAEA;;;;;WAKA,WAAW,cAAc;;;;;;WAMzB;;;;;WAKA,SAAS;;;UAIH;EACf,IAAI,qBAAqB,QAAQ;EACjC,OAAO;;EAEP,OAAO;EACP;;;wBA4Bc,YAAY,iBAAiB,aAAa,gBAAgB,WAAW,WAAW,mBAAmB,eACjH,MAAM,OAAO,UAAU,SAAS,aAChC,MAAM,aAAa,QAAQ,YAC1B"}
|
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
import { C as frameBox, I as toCode, g as expressionFromEmote } from "./shared/svg-markup.js";
|
|
2
|
+
import { a as paintNodes, n as defaultLayer } from "./shared/pose-key.js";
|
|
3
|
+
import { c as drawToCanvas, o as animator, r as layout, t as overlays } from "./shared/overlays.js";
|
|
4
|
+
import { t as liveCanvas } from "./shared/live-canvas.js";
|
|
5
|
+
//#region src/avatar/adapters/pixi-types.ts
|
|
6
|
+
/** Re-uploads a texture after its canvas changed (Pixi 8 and 7). */
|
|
7
|
+
function refresh(texture) {
|
|
8
|
+
if (texture.source) texture.source.update();
|
|
9
|
+
else texture.update?.();
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
12
|
+
//#region src/avatar/adapters/pixi-avatar.ts
|
|
13
|
+
/** A live avatar sprite: `pixiAvatar(pixi, seat.look, { size: 64, animator })`. */
|
|
14
|
+
function pixiAvatar(pixi, like, opts = {}) {
|
|
15
|
+
const resolution = opts.resolution ?? 2;
|
|
16
|
+
const live = liveCanvas(like, opts, resolution);
|
|
17
|
+
live.draw(opts.pose);
|
|
18
|
+
const texture = pixi.Texture.from(live.canvas);
|
|
19
|
+
const view = new pixi.Sprite(texture);
|
|
20
|
+
view.anchor.set(.5);
|
|
21
|
+
view.scale.set(1 / resolution);
|
|
22
|
+
return {
|
|
23
|
+
view,
|
|
24
|
+
update(t) {
|
|
25
|
+
const pose = typeof t === "number" ? opts.animator?.pose(t) : t;
|
|
26
|
+
if (live.draw(pose ?? opts.pose)) refresh(texture);
|
|
27
|
+
},
|
|
28
|
+
setLook(next) {
|
|
29
|
+
live.setLook(next);
|
|
30
|
+
opts.animator?.setLook(next);
|
|
31
|
+
if (live.draw(opts.pose)) refresh(texture);
|
|
32
|
+
},
|
|
33
|
+
destroy() {
|
|
34
|
+
view.destroy();
|
|
35
|
+
texture.destroy(true);
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
/** A still avatar texture (Pixi 7 games use this from a bitmap-like canvas). */
|
|
40
|
+
function avatarTexture(pixi, like, opts = {}) {
|
|
41
|
+
return pixi.Texture.from(drawToCanvas(like, opts));
|
|
42
|
+
}
|
|
43
|
+
//#endregion
|
|
44
|
+
//#region src/avatar/adapters/pixi-crowd.ts
|
|
45
|
+
/**
|
|
46
|
+
* `createCrowd` (§3.11): the world's whole avatar layer in Pixi 8. One
|
|
47
|
+
* y-sorted container; most avatars are atlas frames (shared page textures,
|
|
48
|
+
* so Pixi batches them), and up to `liveMax` flagged ones (nearest, hovered,
|
|
49
|
+
* talking, friends; the world decides) are live vector avatars with full
|
|
50
|
+
* expressions. Name tags and bubbles are cached textures, re-rendered only
|
|
51
|
+
* when their text changes. Baking is time-sliced; an avatar without a baked
|
|
52
|
+
* frame yet shows the silhouette.
|
|
53
|
+
*/
|
|
54
|
+
const EMOTE_MS = 2500;
|
|
55
|
+
const CYCLE = {
|
|
56
|
+
walk: 520,
|
|
57
|
+
run: 320,
|
|
58
|
+
dance: 900,
|
|
59
|
+
jump: 700,
|
|
60
|
+
cheer: 600,
|
|
61
|
+
idle: 2400
|
|
62
|
+
};
|
|
63
|
+
/** The walker's shorter legs step quicker. */
|
|
64
|
+
const WALKER_CYCLE = {
|
|
65
|
+
...CYCLE,
|
|
66
|
+
walk: 440,
|
|
67
|
+
run: 300,
|
|
68
|
+
idle: 2800
|
|
69
|
+
};
|
|
70
|
+
/** A crowd over an atlas: `createCrowd(pixi, { atlas, container })`. */
|
|
71
|
+
function createCrowd(pixi, opts) {
|
|
72
|
+
const { atlas, container } = opts;
|
|
73
|
+
const overlayLayer = opts.overlays ?? container;
|
|
74
|
+
const displayScale = opts.displayScale ?? 1;
|
|
75
|
+
container.sortableChildren = true;
|
|
76
|
+
overlayLayer.sortableChildren = true;
|
|
77
|
+
const liveMax = opts.liveMax ?? 6;
|
|
78
|
+
const figure = opts.figure ?? "blob";
|
|
79
|
+
const cycles = figure === "walker" ? WALKER_CYCLE : CYCLE;
|
|
80
|
+
const [, liveTop, , liveHeight] = frameBox({
|
|
81
|
+
frame: "full",
|
|
82
|
+
figure
|
|
83
|
+
});
|
|
84
|
+
const entries = /* @__PURE__ */ new Map();
|
|
85
|
+
const pageTextures = [];
|
|
86
|
+
const frameTextures = /* @__PURE__ */ new Map();
|
|
87
|
+
const overlayTextures = /* @__PURE__ */ new Map();
|
|
88
|
+
/** Where the name plate sits above the feet (rig units), cached per look, pose and prop. */
|
|
89
|
+
const nameplates = /* @__PURE__ */ new Map();
|
|
90
|
+
const nameplateY = (look, body, status) => {
|
|
91
|
+
const key = `${toCode(look)}|${body}|${status ?? ""}`;
|
|
92
|
+
let plateY = nameplates.get(key);
|
|
93
|
+
if (plateY === void 0) {
|
|
94
|
+
plateY = layout(look, {
|
|
95
|
+
figure,
|
|
96
|
+
pose: {
|
|
97
|
+
body,
|
|
98
|
+
status
|
|
99
|
+
}
|
|
100
|
+
}).nameplate.y;
|
|
101
|
+
nameplates.set(key, plateY);
|
|
102
|
+
}
|
|
103
|
+
return plateY;
|
|
104
|
+
};
|
|
105
|
+
const overlayTexture = (key, overlay) => {
|
|
106
|
+
const hit = overlayTextures.get(key);
|
|
107
|
+
if (hit) return hit;
|
|
108
|
+
const [left, top, w, h] = overlay.box;
|
|
109
|
+
const resolution = 2;
|
|
110
|
+
const made = defaultLayer(Math.ceil(w * resolution), Math.ceil(h * resolution));
|
|
111
|
+
if (!made || !("getContext" in made.canvas)) return null;
|
|
112
|
+
made.ctx.scale(resolution, resolution);
|
|
113
|
+
made.ctx.translate(-left, -top);
|
|
114
|
+
paintNodes(made.ctx, overlay.nodes);
|
|
115
|
+
const out = {
|
|
116
|
+
texture: pixi.Texture.from(made.canvas),
|
|
117
|
+
ax: -left / w,
|
|
118
|
+
ay: -top / h
|
|
119
|
+
};
|
|
120
|
+
overlayTextures.set(key, out);
|
|
121
|
+
return out;
|
|
122
|
+
};
|
|
123
|
+
const textureFor = (page, left, top, w, h) => {
|
|
124
|
+
const sources = atlas.sources;
|
|
125
|
+
while (pageTextures.length < sources.length) {
|
|
126
|
+
const source = sources[pageTextures.length];
|
|
127
|
+
if (!source || !("getContext" in source)) return null;
|
|
128
|
+
pageTextures.push(pixi.Texture.from(source));
|
|
129
|
+
}
|
|
130
|
+
const base = pageTextures[page]?.source;
|
|
131
|
+
if (!base) return null;
|
|
132
|
+
const key = `${String(page)}:${String(left)}:${String(top)}`;
|
|
133
|
+
let tex = frameTextures.get(key);
|
|
134
|
+
if (!tex) {
|
|
135
|
+
tex = new pixi.Texture({
|
|
136
|
+
source: base,
|
|
137
|
+
frame: new pixi.Rectangle(left, top, w, h)
|
|
138
|
+
});
|
|
139
|
+
frameTextures.set(key, tex);
|
|
140
|
+
}
|
|
141
|
+
return tex;
|
|
142
|
+
};
|
|
143
|
+
const placeOverlay = (slot, key, make, atX, atY) => {
|
|
144
|
+
if (key === "") {
|
|
145
|
+
if (slot.sprite) slot.sprite.visible = false;
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
let sprite = slot.sprite;
|
|
149
|
+
if (slot.key !== key || !sprite) {
|
|
150
|
+
const overlay = make();
|
|
151
|
+
const made = overlay ? overlayTexture(key, overlay) : null;
|
|
152
|
+
if (!made) return;
|
|
153
|
+
if (!sprite) {
|
|
154
|
+
sprite = new pixi.Sprite(made.texture);
|
|
155
|
+
overlayLayer.addChild(sprite);
|
|
156
|
+
}
|
|
157
|
+
slot.sprite = sprite;
|
|
158
|
+
sprite.texture = made.texture;
|
|
159
|
+
sprite.anchor.set(made.ax, made.ay);
|
|
160
|
+
sprite.scale.set(.5);
|
|
161
|
+
slot.key = key;
|
|
162
|
+
}
|
|
163
|
+
sprite.visible = true;
|
|
164
|
+
sprite.x = atX;
|
|
165
|
+
sprite.y = atY;
|
|
166
|
+
sprite.zIndex = 1e6 + atY;
|
|
167
|
+
};
|
|
168
|
+
return {
|
|
169
|
+
set(id, member) {
|
|
170
|
+
const key = String(id);
|
|
171
|
+
const entry = entries.get(key);
|
|
172
|
+
if (entry) {
|
|
173
|
+
if (member.emote && member.emote !== entry.member.emote) {
|
|
174
|
+
entry.emoteAt = -1;
|
|
175
|
+
const face = expressionFromEmote(member.emote);
|
|
176
|
+
if (face) entry.anim.express(face);
|
|
177
|
+
}
|
|
178
|
+
if (member.look !== entry.member.look) entry.live?.setLook(member.look);
|
|
179
|
+
entry.member = member;
|
|
180
|
+
return;
|
|
181
|
+
}
|
|
182
|
+
const sprite = new pixi.Sprite();
|
|
183
|
+
container.addChild(sprite);
|
|
184
|
+
entries.set(key, {
|
|
185
|
+
member,
|
|
186
|
+
sprite,
|
|
187
|
+
tag: {
|
|
188
|
+
sprite: null,
|
|
189
|
+
key: ""
|
|
190
|
+
},
|
|
191
|
+
bubble: {
|
|
192
|
+
sprite: null,
|
|
193
|
+
key: ""
|
|
194
|
+
},
|
|
195
|
+
emoteAt: member.emote ? -1 : 0,
|
|
196
|
+
hasFrame: false,
|
|
197
|
+
live: null,
|
|
198
|
+
body: null,
|
|
199
|
+
anim: animator(member.look, { seed: key })
|
|
200
|
+
});
|
|
201
|
+
},
|
|
202
|
+
remove(id) {
|
|
203
|
+
const entry = entries.get(String(id));
|
|
204
|
+
if (!entry) return;
|
|
205
|
+
entry.sprite.destroy();
|
|
206
|
+
entry.tag.sprite?.destroy();
|
|
207
|
+
entry.bubble.sprite?.destroy();
|
|
208
|
+
entry.live?.destroy();
|
|
209
|
+
entries.delete(String(id));
|
|
210
|
+
},
|
|
211
|
+
update(t) {
|
|
212
|
+
if (atlas.bake(opts.bakeMs ?? 4) > 0) pageTextures.forEach(refresh);
|
|
213
|
+
const wantsLive = [...entries.values()].filter((e) => e.member.live === true).slice(0, liveMax);
|
|
214
|
+
const liveSet = new Set(wantsLive);
|
|
215
|
+
for (const entry of entries.values()) {
|
|
216
|
+
const m = entry.member;
|
|
217
|
+
const body = m.body ?? "idle";
|
|
218
|
+
if (entry.emoteAt === -1) entry.emoteAt = t;
|
|
219
|
+
const isEmoting = m.emote !== void 0 && t - entry.emoteAt < EMOTE_MS;
|
|
220
|
+
if (liveSet.has(entry)) {
|
|
221
|
+
if (!entry.live) {
|
|
222
|
+
entry.live = pixiAvatar(pixi, m.look, {
|
|
223
|
+
frame: "full",
|
|
224
|
+
figure,
|
|
225
|
+
size: 64,
|
|
226
|
+
rim: true,
|
|
227
|
+
shadow: false,
|
|
228
|
+
animator: entry.anim
|
|
229
|
+
});
|
|
230
|
+
container.addChild(entry.live.view);
|
|
231
|
+
}
|
|
232
|
+
entry.sprite.visible = false;
|
|
233
|
+
const view = entry.live.view;
|
|
234
|
+
if (entry.body !== body) {
|
|
235
|
+
entry.body = body;
|
|
236
|
+
entry.anim.setBody(body, { at: t });
|
|
237
|
+
}
|
|
238
|
+
entry.live.update({
|
|
239
|
+
...entry.anim.pose(t),
|
|
240
|
+
body,
|
|
241
|
+
status: m.status ?? null,
|
|
242
|
+
phase: t / (cycles[body] ?? 600) % 1
|
|
243
|
+
});
|
|
244
|
+
view.x = m.x;
|
|
245
|
+
view.y = m.y + (figure === "walker" ? (liveTop + liveHeight / 2) * (64 / liveHeight) : -32);
|
|
246
|
+
view.zIndex = m.y;
|
|
247
|
+
view.visible = true;
|
|
248
|
+
} else {
|
|
249
|
+
if (entry.live) entry.live.view.visible = false;
|
|
250
|
+
const frame = atlas.frame({
|
|
251
|
+
look: m.look,
|
|
252
|
+
facing: m.facing ?? "S",
|
|
253
|
+
body,
|
|
254
|
+
status: m.status ?? null,
|
|
255
|
+
phase: t / (cycles[body] ?? 600) % 1,
|
|
256
|
+
face: isEmoting ? "happy" : "neutral"
|
|
257
|
+
});
|
|
258
|
+
const shown = frame ?? (entry.hasFrame ? null : atlas.frame({ look: null }));
|
|
259
|
+
entry.hasFrame || (entry.hasFrame = frame !== null);
|
|
260
|
+
const tex = shown ? textureFor(shown.page, shown.x, shown.y, shown.w, shown.h) : null;
|
|
261
|
+
if (tex) {
|
|
262
|
+
entry.sprite.texture = tex;
|
|
263
|
+
entry.sprite.visible = true;
|
|
264
|
+
}
|
|
265
|
+
if (shown) {
|
|
266
|
+
entry.sprite.anchor.set(shown.footX / shown.w, shown.footY / shown.h);
|
|
267
|
+
entry.sprite.scale.set(shown.mirror ? -displayScale : displayScale, displayScale);
|
|
268
|
+
}
|
|
269
|
+
entry.sprite.x = m.x;
|
|
270
|
+
entry.sprite.y = m.y;
|
|
271
|
+
entry.sprite.zIndex = m.y;
|
|
272
|
+
}
|
|
273
|
+
const top = m.y - (m.tagLift ?? 0) + nameplateY(m.look, body, m.status ?? null) * (entry.live?.view.visible === true ? 64 / liveHeight : atlas.scale * displayScale);
|
|
274
|
+
const tagKey = m.name && !m.tagHidden ? `tag:${m.name}:${m.friend ? 1 : 0}:${m.you ? 1 : 0}` : "";
|
|
275
|
+
placeOverlay(entry.tag, tagKey, () => m.name ? overlays.nameTag({
|
|
276
|
+
name: m.name,
|
|
277
|
+
friend: m.friend === true,
|
|
278
|
+
you: m.you === true
|
|
279
|
+
}) : null, m.x, top);
|
|
280
|
+
const bubbleKey = isEmoting && m.emote ? `emote:${m.emote}` : m.reaction ? `react:${m.reaction}` : m.activity ? `act:${m.activity}` : "";
|
|
281
|
+
placeOverlay(entry.bubble, bubbleKey, () => {
|
|
282
|
+
if (isEmoting && m.emote) return overlays.emoteBubble(m.emote);
|
|
283
|
+
if (m.reaction) return overlays.reactionBubble(m.reaction);
|
|
284
|
+
return m.activity ? overlays.activityBubble({ game: m.activity }) : null;
|
|
285
|
+
}, m.x, top - 12);
|
|
286
|
+
}
|
|
287
|
+
},
|
|
288
|
+
destroy() {
|
|
289
|
+
for (const id of [...entries.keys()]) this.remove(id);
|
|
290
|
+
for (const tex of frameTextures.values()) tex.destroy(false);
|
|
291
|
+
for (const tex of pageTextures) tex.destroy(true);
|
|
292
|
+
for (const o of overlayTextures.values()) o.texture.destroy(true);
|
|
293
|
+
}
|
|
294
|
+
};
|
|
295
|
+
}
|
|
296
|
+
//#endregion
|
|
297
|
+
export { avatarTexture, createCrowd, pixiAvatar };
|
|
298
|
+
|
|
299
|
+
//# sourceMappingURL=avatar-pixi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"avatar-pixi.js","names":[],"sources":["../src/avatar/adapters/pixi-types.ts","../src/avatar/adapters/pixi-avatar.ts","../src/avatar/adapters/pixi-crowd.ts"],"mappings":";;;;;;AA4EA,SAAgB,QAAQ,SAA4B;CAClD,IAAI,QAAQ,QACV,QAAQ,OAAO,OAAO;MAEtB,QAAQ,SAAS;AAErB;;;;ACnDA,SAAgB,WACd,MAC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KAAK,CAAC,GACjC,KAAK,OAAO,EAAE;GAEhB,KAAK,MAAM,OAAO,cAAc,OAAO,GACrC,IAAI,QAAQ,KAAK;GAEnB,KAAK,MAAM,OAAO,cAChB,IAAI,QAAQ,IAAI;GAElB,KAAK,MAAM,KAAK,gBAAgB,OAAO,GACrC,EAAE,QAAQ,QAAQ,IAAI;EAE1B;CACF;AACF"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { a as Frame, g as Expression, h as EXPRESSION_NAMES, l as Pose, r as Facing, s as LookLike, u as RenderOptions, x as isExpression } from "./shared/types.js";
|
|
2
|
+
import { a as renderSvg, i as ready, n as describe } from "./shared/describe.js";
|
|
3
|
+
import { AvatarLook, decodeLook, defaultLook, encodeLook } from "@diffenderfer-games/hub-contract/avatar";
|
|
4
|
+
export { type AvatarLook, EXPRESSION_NAMES, type Expression, type Facing, type Frame, type LookLike, type Pose, type RenderOptions, decodeLook, defaultLook, describe, encodeLook, isExpression, ready, renderSvg };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { h as EXPRESSION_NAMES, v as isExpression, x as ready } from "./shared/svg-markup.js";
|
|
2
|
+
import { n as renderSvg } from "./shared/svg.js";
|
|
3
|
+
import { n as describe } from "./shared/describe.js";
|
|
4
|
+
import { decodeLook, defaultLook, encodeLook } from "@diffenderfer-games/hub-contract/avatar";
|
|
5
|
+
export { EXPRESSION_NAMES, decodeLook, defaultLook, describe, encodeLook, isExpression, ready, renderSvg };
|