@diffenderfer-games/hub 2.0.0-next.7 → 2.0.0-next.9
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 +43 -4
- package/dist/auto.d.ts +3 -3
- package/dist/auto.js +2 -2
- package/dist/avatar-pixi.d.ts +19 -1
- package/dist/avatar-pixi.d.ts.map +1 -1
- package/dist/avatar-pixi.js +37 -18
- package/dist/avatar-pixi.js.map +1 -1
- package/dist/avatar-svg.d.ts +1 -1
- package/dist/avatar-svg.js +1 -1
- package/dist/avatar-three.d.ts +1 -1
- package/dist/avatar.d.ts +3 -3
- package/dist/avatar.js +20 -7
- package/dist/avatar.js.map +1 -1
- package/dist/doctor/cli.mjs +58 -4
- package/dist/doctor/cli.mjs.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +2 -2
- package/dist/shared/animator.d.ts +1 -1
- package/dist/shared/art.js +1 -1
- package/dist/shared/atlas.d.ts +5 -1
- package/dist/shared/atlas.d.ts.map +1 -1
- package/dist/shared/avatar.d.ts +10 -4
- package/dist/shared/avatar.d.ts.map +1 -1
- package/dist/shared/bridge.js +2 -2
- package/dist/shared/bridge.js.map +1 -1
- package/dist/shared/client-version.gen.js +1 -1
- package/dist/shared/daily.js +1 -1
- package/dist/shared/describe.d.ts +1 -1
- package/dist/shared/describe.d.ts.map +1 -1
- package/dist/shared/describe.js +1 -1
- package/dist/shared/index.d.ts +88 -11
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/shared/live-canvas.js +1 -1
- package/dist/shared/overlays.js +1 -1
- package/dist/shared/overlays.js.map +1 -1
- package/dist/shared/pose-key.js +2 -2
- package/dist/shared/pose-key.js.map +1 -1
- package/dist/shared/social.d.ts +19 -4
- package/dist/shared/social.d.ts.map +1 -1
- package/dist/shared/src.js +178 -28
- package/dist/shared/src.js.map +1 -1
- package/dist/shared/svg-markup.js +430 -21
- package/dist/shared/svg-markup.js.map +1 -1
- package/dist/shared/svg.js +2 -2
- package/dist/shared/svg.js.map +1 -1
- package/dist/shared/types.d.ts +9 -1
- package/dist/shared/types.d.ts.map +1 -1
- package/dist/social.d.ts +2 -2
- package/dist/turns-rules.d.ts +2 -0
- package/dist/turns-rules.js +1 -0
- package/dist/turns.d.ts +23 -1
- package/dist/turns.d.ts.map +1 -1
- package/dist/turns.js +79 -13
- package/dist/turns.js.map +1 -1
- package/package.json +8 -2
- package/src/avatar/adapters/pixi-crowd.ts +45 -18
- package/src/avatar/atlas.ts +16 -6
- package/src/avatar/layout.ts +1 -1
- package/src/avatar/outputs/canvas.ts +2 -2
- package/src/avatar/outputs/svg.ts +2 -2
- package/src/avatar/render/body.ts +2 -2
- package/src/avatar/render/compose.ts +25 -8
- package/src/avatar/render/frame.ts +15 -2
- package/src/avatar/render/types.ts +9 -0
- package/src/avatar/render/walker-parts.ts +121 -0
- package/src/avatar/render/walker.ts +199 -0
- package/src/avatar.ts +2 -1
- package/src/core/rest/routes.gen.ts +1 -0
- package/src/core/turns/hub-turns.ts +25 -4
- package/src/core/turns/turn-game.ts +143 -21
- package/src/core/turns/your-turn-buzz.ts +69 -0
- package/src/core/version/client-version.gen.ts +1 -1
- package/src/doctor/checks.ts +2 -2
- package/src/doctor/cli.ts +5 -2
- package/src/doctor/world-check.ts +61 -0
- package/src/index.ts +2 -1
- package/src/realtime/runtime-api.ts +5 -2
- package/src/realtime/types.ts +1 -0
- package/src/realtime/world-types.ts +20 -0
- package/src/turns-kit/check-rules.ts +116 -17
- package/src/turns-rules.ts +12 -0
- package/src/turns.ts +4 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,16 +1,55 @@
|
|
|
1
1
|
# @diffenderfer-games/hub
|
|
2
2
|
|
|
3
|
-
## 2.0.0-next.
|
|
3
|
+
## 2.0.0-next.9
|
|
4
4
|
|
|
5
5
|
### Minor Changes
|
|
6
6
|
|
|
7
|
-
-
|
|
7
|
+
- c464aae: Avatars get a world-scale figure: `figure: 'walker'` (on `RenderOptions` for full frames, on `createAtlas` and on `createCrowd`) draws a small full-body character with legs, arms, a shirt, trousers and shoes and a smaller head, for maps and crowds. It walks (8-step cycles that swing the legs and arms along the facing), runs, sits (the origin is the seat; the feet hang `WALKER_SEAT_DROP` units below it), idles, waves and cheers, and reads clearly from behind. Head and bust frames always draw the usual figure, and `blob` stays the default. Crowd members also take `tagLift` to move a name tag up, so a world can stack tags that would overlap, and a crowd member whose look changes keeps showing its old frame while the new one bakes (no flash to the silhouette). New exports: the `Figure` type, `WALKER_HEAD_SCALE` and `WALKER_SEAT_DROP`.
|
|
8
8
|
|
|
9
9
|
### Patch Changes
|
|
10
10
|
|
|
11
|
-
-
|
|
12
|
-
|
|
11
|
+
- e28707d: `createCrowd` (`/avatar/pixi`) takes two optional settings for worlds: `overlays`, a container for name tags and bubbles (so they can sit above a lighting layer), and `displayScale`, which draws atlas avatars at that scale (bake the atlas at `scale × devicePixelRatio` and pass `1 / devicePixelRatio` for crisp avatars on high-density screens). Both default to the old behaviour.
|
|
12
|
+
- 4eefc6c: `createCrowd` (`/avatar/pixi`): a member whose look has not baked yet shows the silhouette at its spot and at the crowd's `displayScale`, like a baked frame (it was drawn at full size with its corner at the feet, so on high-density screens it showed twice as big, below and to the right of its name tag).
|
|
13
|
+
- ef850e8: The world, ready to publish and live on the hub.
|
|
14
|
+
|
|
15
|
+
- `@diffenderfer-games/world` (first release): the `dg-world@1` map format with compressed `"encoding": "rle"` layers, a map `revision`, the generator's `provenance.generatorVersion` (the same seed and needs at the same version always give the same map), strict validation with readable paths, and size limits (`WORLD_LIMITS`, `parseWorldMapText`). New: `serializeWorldMap`, `encodeWorldMap`, `mapFingerprint`, `generatorVersionOf`, the Tiled converter (`worldMapToTiled`, `worldMapFromTiled`: layers, tile properties, objects, zones and lights, both ways) and the `dg-world` CLI (`check`, `from-tiled`, `to-tiled`, `generate`).
|
|
16
|
+
- `@diffenderfer-games/hub-contract`: `game.world` in the manifest (`map` and/or `generate: { type, seed, needs }`), the `world.*` socket ops (`enter`, `leave`, `move`, `sit`, `stand`, `teleport`, `say`) and events (`world.state`, `world.say`), `GET /world/maps/:key`, the world error codes, and `world` on a friend's presence.
|
|
17
|
+
- `@diffenderfer-games/hub`: `hub-doctor` checks a `game.world.map` file (it exists, is a valid map and is within the size limit) and warns about an unknown world type; the realtime API's optional `world` (feature version 6).
|
|
18
|
+
- Updated dependencies [ef850e8]
|
|
19
|
+
- @diffenderfer-games/world@2.0.0-next.9
|
|
20
|
+
- @diffenderfer-games/hub-contract@2.0.0-next.9
|
|
13
21
|
|
|
22
|
+
## 2.0.0-next.8
|
|
23
|
+
|
|
24
|
+
### Minor Changes
|
|
25
|
+
|
|
26
|
+
- ac6b1cd: Online games (`hub.turns`): `TurnGame.mayActNow` says this player may move now out of turn (the rules' `mayAct`: offer the jump-in, the UNO call, the catch), and `TurnGame.tournament` names the tournament match a game is. A `move()` answer that arrives after live events already brought newer moves no longer rolls the page back (nor does an older live event). `letComputerPlay()` documents the hand-over case. The rules kit `checkTurnRules` now moves every seat in `toAct` (not only the first) and seats in `mayAct` through `autoReact` (or the new `reactMove` option), fails on an illegal `autoReact` or a seat that does not exist, and reports `outOfTurn`.
|
|
27
|
+
- c12868a: Online games: new `@diffenderfer-games/hub/turns-rules` entry for a game's rules module (`defineTurnRules`, the rules types and the RNG, nothing else: the bundle stays a few KB instead of about 1 MB; `/turns` re-exports it with the kit). `TurnGame.canLetComputerPlay(now?)` says when "Let the computer play" may work (from `summary.handOverAt`, the seats' new `connected` and the deadline); `turn` now also fires when a seated player comes or goes or `handOverAt` changes. `refresh()` (and every other fetch) no longer rolls the game back when its answer is older than a live move that arrived meanwhile, and never replays that move twice. The rules kit `checkTurnRules` gains `revealed(state, marker)` (a planted card the rules rightly reveal, such as one played face up, stops being checked) and `shuffleHidden(state, seat, rng)` (the "twin table": shuffling what a seat can't see must not change its view).
|
|
28
|
+
|
|
29
|
+
`TurnGame.move()` fetches the game again after a 500 `rules_error` or 503 `rules_busy` (the hub now makes a move all or nothing, so such a move was not made).
|
|
30
|
+
|
|
31
|
+
The "your turn" buzz: every online game's page gives a short vibration when the player becomes due on a live update (never for their own next step, a move out of turn, a game just opened or a catch-up; never when they turned it off, ask for less motion, or the device can't vibrate). `hub.turns.setYourTurnBuzz(false)` and `TurnGame.setYourTurnBuzz(false)` opt a page or game out; `hub.turns.playerYourTurnBuzz` is the player's own switch on this device (the menu's Settings show it), with `readYourTurnBuzz`, `saveYourTurnBuzz`, `isNewlyDue`, `YOUR_TURN_BUZZ` and `YOUR_TURN_BUZZ_KEY` exported. A visible page waiting on another player's move that hears nothing for `TURN_QUIET_MS` (15 s) fetches the game again, so games need no polling of their own.
|
|
32
|
+
|
|
33
|
+
### Patch Changes
|
|
34
|
+
|
|
35
|
+
- Updated dependencies [3a67590]
|
|
36
|
+
- Updated dependencies [70dcfa1]
|
|
37
|
+
- Updated dependencies [c77830f]
|
|
38
|
+
- Updated dependencies [ac6b1cd]
|
|
39
|
+
- Updated dependencies [c12868a]
|
|
40
|
+
- @diffenderfer-games/hub-contract@2.0.0-next.8
|
|
41
|
+
|
|
42
|
+
## 2.0.0-next.7
|
|
43
|
+
|
|
44
|
+
### Minor Changes
|
|
45
|
+
|
|
46
|
+
- 99d0932: Avatars: long hair now hangs behind the body. The parts of a hair style below the shoulders are drawn before the body (in SVG, Canvas, `<dg-avatar>`, the Pixi atlas and the three.js adapter) while the fringe and anything over the face stay over the head; back views keep the hair over the back. The renderer draws the eight new glasses in style C with any frame colour (light frames, and frames close to the skin, get a dark edge) and tinted lenses for sunglasses, sport and hearts (a mirror finish for `p:lens-mirror`); winks and sleepy eyes show through the lenses. `describe()` names them. The `/avatar` entry re-exports `FRAME_PRESETS`, `isTinted` and `SECOND_COLOUR_CODE`.
|
|
47
|
+
|
|
48
|
+
### Patch Changes
|
|
49
|
+
|
|
50
|
+
- Updated dependencies [99d0932]
|
|
51
|
+
- @diffenderfer-games/hub-contract@2.0.0-next.7
|
|
52
|
+
|
|
14
53
|
## 2.0.0-next.6
|
|
15
54
|
|
|
16
55
|
### Minor Changes
|
package/dist/auto.d.ts
CHANGED
|
@@ -7,8 +7,8 @@ import { a as RoomEvents, c as RoomSelf, d as RoomStateOptions, i as RoomCreateO
|
|
|
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 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, 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_RESYNC_EVENT, type TouchMapping, type TradeBundle, type TradeId, type TradeListOptions, type TradeNoteOptions, type TurnChatLine, type TurnCreateOptions, type TurnDeadline, TurnGame, type TurnGameEvents, 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, 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, savedGameUrl, type socialForwarder as social, trackInputModality };
|
|
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
|
@@ -2,7 +2,7 @@ import { a as DailySystem, i as DAILY_START_EVENT, n as getDaily, r as isDailySy
|
|
|
2
2
|
import { t as HUB_CLIENT_VERSION } from "./shared/client-version.gen.js";
|
|
3
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 { A as
|
|
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, 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_RESYNC_EVENT, TurnGame, UI_STACK_VERSION, UNSUPPORTED_BY_HUB, boxesTouch, controlSize, createHub, getDaily, getInput, getUiStack, hub, isDailySystem, isInputSystem, isPageInputControl, isUiStack, layoutControls, parseInputOverrides, savedGameUrl, trackInputModality };
|
|
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
|
package/dist/avatar-pixi.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
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
2
|
import { r as AvatarAtlas, s as ReactionGlyph } from "./shared/atlas.js";
|
|
3
3
|
import { t as Animator } from "./shared/animator.js";
|
|
4
4
|
//#region src/avatar/adapters/pixi-types.d.ts
|
|
@@ -121,6 +121,8 @@ interface CrowdMember {
|
|
|
121
121
|
readonly live?: boolean;
|
|
122
122
|
/** Hide the tag (the world fades tags by distance and hides them when crowded). */
|
|
123
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;
|
|
124
126
|
}
|
|
125
127
|
/** Crowd options; `container` is the game's own pixi `Container`. */
|
|
126
128
|
interface CrowdOptions<TSprite extends PixiSprite = PixiSprite> {
|
|
@@ -131,6 +133,22 @@ interface CrowdOptions<TSprite extends PixiSprite = PixiSprite> {
|
|
|
131
133
|
readonly liveMax?: number;
|
|
132
134
|
/** Atlas baking budget per update, ms (default 4). */
|
|
133
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;
|
|
134
152
|
}
|
|
135
153
|
/** The crowd. */
|
|
136
154
|
interface AvatarCrowd {
|
|
@@ -1 +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;;;;
|
|
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"}
|
package/dist/avatar-pixi.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { C as frameBox, I as toCode, g as expressionFromEmote } from "./shared/svg-markup.js";
|
|
2
2
|
import { a as paintNodes, n as defaultLayer } from "./shared/pose-key.js";
|
|
3
3
|
import { c as drawToCanvas, o as animator, r as layout, t as overlays } from "./shared/overlays.js";
|
|
4
4
|
import { t as liveCanvas } from "./shared/live-canvas.js";
|
|
@@ -60,11 +60,27 @@ const CYCLE = {
|
|
|
60
60
|
cheer: 600,
|
|
61
61
|
idle: 2400
|
|
62
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
|
+
};
|
|
63
70
|
/** A crowd over an atlas: `createCrowd(pixi, { atlas, container })`. */
|
|
64
71
|
function createCrowd(pixi, opts) {
|
|
65
72
|
const { atlas, container } = opts;
|
|
73
|
+
const overlayLayer = opts.overlays ?? container;
|
|
74
|
+
const displayScale = opts.displayScale ?? 1;
|
|
66
75
|
container.sortableChildren = true;
|
|
76
|
+
overlayLayer.sortableChildren = true;
|
|
67
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
|
+
});
|
|
68
84
|
const entries = /* @__PURE__ */ new Map();
|
|
69
85
|
const pageTextures = [];
|
|
70
86
|
const frameTextures = /* @__PURE__ */ new Map();
|
|
@@ -75,10 +91,13 @@ function createCrowd(pixi, opts) {
|
|
|
75
91
|
const key = `${toCode(look)}|${body}|${status ?? ""}`;
|
|
76
92
|
let plateY = nameplates.get(key);
|
|
77
93
|
if (plateY === void 0) {
|
|
78
|
-
plateY = layout(look, {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
94
|
+
plateY = layout(look, {
|
|
95
|
+
figure,
|
|
96
|
+
pose: {
|
|
97
|
+
body,
|
|
98
|
+
status
|
|
99
|
+
}
|
|
100
|
+
}).nameplate.y;
|
|
82
101
|
nameplates.set(key, plateY);
|
|
83
102
|
}
|
|
84
103
|
return plateY;
|
|
@@ -101,10 +120,6 @@ function createCrowd(pixi, opts) {
|
|
|
101
120
|
overlayTextures.set(key, out);
|
|
102
121
|
return out;
|
|
103
122
|
};
|
|
104
|
-
const silhouette = () => {
|
|
105
|
-
const frame = atlas.frame({ look: null });
|
|
106
|
-
return frame ? textureFor(frame.page, frame.x, frame.y, frame.w, frame.h) : null;
|
|
107
|
-
};
|
|
108
123
|
const textureFor = (page, left, top, w, h) => {
|
|
109
124
|
const sources = atlas.sources;
|
|
110
125
|
while (pageTextures.length < sources.length) {
|
|
@@ -137,7 +152,7 @@ function createCrowd(pixi, opts) {
|
|
|
137
152
|
if (!made) return;
|
|
138
153
|
if (!sprite) {
|
|
139
154
|
sprite = new pixi.Sprite(made.texture);
|
|
140
|
-
|
|
155
|
+
overlayLayer.addChild(sprite);
|
|
141
156
|
}
|
|
142
157
|
slot.sprite = sprite;
|
|
143
158
|
sprite.texture = made.texture;
|
|
@@ -178,6 +193,7 @@ function createCrowd(pixi, opts) {
|
|
|
178
193
|
key: ""
|
|
179
194
|
},
|
|
180
195
|
emoteAt: member.emote ? -1 : 0,
|
|
196
|
+
hasFrame: false,
|
|
181
197
|
live: null,
|
|
182
198
|
body: null,
|
|
183
199
|
anim: animator(member.look, { seed: key })
|
|
@@ -205,6 +221,7 @@ function createCrowd(pixi, opts) {
|
|
|
205
221
|
if (!entry.live) {
|
|
206
222
|
entry.live = pixiAvatar(pixi, m.look, {
|
|
207
223
|
frame: "full",
|
|
224
|
+
figure,
|
|
208
225
|
size: 64,
|
|
209
226
|
rim: true,
|
|
210
227
|
shadow: false,
|
|
@@ -222,10 +239,10 @@ function createCrowd(pixi, opts) {
|
|
|
222
239
|
...entry.anim.pose(t),
|
|
223
240
|
body,
|
|
224
241
|
status: m.status ?? null,
|
|
225
|
-
phase: t / (
|
|
242
|
+
phase: t / (cycles[body] ?? 600) % 1
|
|
226
243
|
});
|
|
227
244
|
view.x = m.x;
|
|
228
|
-
view.y = m.y -
|
|
245
|
+
view.y = m.y + (figure === "walker" ? (liveTop + liveHeight / 2) * (64 / liveHeight) : -32);
|
|
229
246
|
view.zIndex = m.y;
|
|
230
247
|
view.visible = true;
|
|
231
248
|
} else {
|
|
@@ -235,23 +252,25 @@ function createCrowd(pixi, opts) {
|
|
|
235
252
|
facing: m.facing ?? "S",
|
|
236
253
|
body,
|
|
237
254
|
status: m.status ?? null,
|
|
238
|
-
phase: t / (
|
|
255
|
+
phase: t / (cycles[body] ?? 600) % 1,
|
|
239
256
|
face: isEmoting ? "happy" : "neutral"
|
|
240
257
|
});
|
|
241
|
-
const
|
|
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;
|
|
242
261
|
if (tex) {
|
|
243
262
|
entry.sprite.texture = tex;
|
|
244
263
|
entry.sprite.visible = true;
|
|
245
264
|
}
|
|
246
|
-
if (
|
|
247
|
-
entry.sprite.anchor.set(
|
|
248
|
-
entry.sprite.scale.
|
|
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);
|
|
249
268
|
}
|
|
250
269
|
entry.sprite.x = m.x;
|
|
251
270
|
entry.sprite.y = m.y;
|
|
252
271
|
entry.sprite.zIndex = m.y;
|
|
253
272
|
}
|
|
254
|
-
const top = m.y + nameplateY(m.look, body, m.status ?? null) * (entry.live?.view.visible === true ? 64 /
|
|
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);
|
|
255
274
|
const tagKey = m.name && !m.tagHidden ? `tag:${m.name}:${m.friend ? 1 : 0}:${m.you ? 1 : 0}` : "";
|
|
256
275
|
placeOverlay(entry.tag, tagKey, () => m.name ? overlays.nameTag({
|
|
257
276
|
name: m.name,
|
package/dist/avatar-pixi.js.map
CHANGED
|
@@ -1 +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,MACA,MACA,OAA0B,CAAC,GACN;CACrB,MAAM,aAAa,KAAK,cAAc;CACtC,MAAM,OAAO,WAAW,MAAM,MAAM,UAAU;CAC9C,KAAK,KAAK,KAAK,IAAI;CACnB,MAAM,UAAU,KAAK,QAAQ,KAAK,KAAK,MAAM;CAC7C,MAAM,OAAO,IAAI,KAAK,OAAO,OAAO;CACpC,KAAK,OAAO,IAAI,EAAG;CACnB,KAAK,MAAM,IAAI,IAAI,UAAU;CAC7B,OAAO;EACL;EACA,OAAO,GAAG;GACR,MAAM,OAAO,OAAO,MAAM,WAAW,KAAK,UAAU,KAAK,CAAC,IAAI;GAC9D,IAAI,KAAK,KAAK,QAAQ,KAAK,IAAI,GAC7B,QAAQ,OAAO;EAEnB;EACA,QAAQ,MAAM;GACZ,KAAK,QAAQ,IAAI;GACjB,KAAK,UAAU,QAAQ,IAAI;GAC3B,IAAI,KAAK,KAAK,KAAK,IAAI,GACrB,QAAQ,OAAO;EAEnB;EACA,UAAU;GACR,KAAK,QAAQ;GACb,QAAQ,QAAQ,IAAI;EACtB;CACF;AACF;;AAGA,SAAgB,cACd,MACA,MACA,OAAsB,CAAC,GACb;CACV,OAAO,KAAK,QAAQ,KAAK,aAAa,MAAM,IAAI,CAAC;AACnD;;;;;;;;;;;;
|
|
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,MACA,MACA,OAA0B,CAAC,GACN;CACrB,MAAM,aAAa,KAAK,cAAc;CACtC,MAAM,OAAO,WAAW,MAAM,MAAM,UAAU;CAC9C,KAAK,KAAK,KAAK,IAAI;CACnB,MAAM,UAAU,KAAK,QAAQ,KAAK,KAAK,MAAM;CAC7C,MAAM,OAAO,IAAI,KAAK,OAAO,OAAO;CACpC,KAAK,OAAO,IAAI,EAAG;CACnB,KAAK,MAAM,IAAI,IAAI,UAAU;CAC7B,OAAO;EACL;EACA,OAAO,GAAG;GACR,MAAM,OAAO,OAA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PRESSION_NAMES, l as Pose, r as Facing, s as LookLike, u as RenderOptions, x as isExpression } from "./shared/types.js";
|
|
2
2
|
import { a as renderSvg, i as ready, n as describe } from "./shared/describe.js";
|
|
3
3
|
import { AvatarLook, decodeLook, defaultLook, encodeLook } from "@diffenderfer-games/hub-contract/avatar";
|
|
4
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 };
|
package/dist/avatar-svg.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { h as EXPRESSION_NAMES, v as isExpression, x as ready } from "./shared/svg-markup.js";
|
|
2
2
|
import { n as renderSvg } from "./shared/svg.js";
|
|
3
3
|
import { n as describe } from "./shared/describe.js";
|
|
4
4
|
import { decodeLook, defaultLook, encodeLook } from "@diffenderfer-games/hub-contract/avatar";
|
package/dist/avatar-three.d.ts
CHANGED
package/dist/avatar.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import { _ as
|
|
1
|
+
import { $ as facingFrom, A as isValidLook, B as seededRng, C as canonicalLook, D as encodeLook, E as distinctLooks, F as partsOf, G as toLook, H as deltaE, I as randomLook, J as WALKER_SEAT_DROP, K as sceneToSvg, L as render, M as normaliseHex, N as partById, O as isLookCode, P as partName, Q as defineAvatarElement, R as resolveColour, T as defaultLook, U as lightness, V as contrast, W as toCode, X as overlaySvg, Y as catalog, Z as paintOverlay, _ as PartCategory, a as CATALOG_REVISION, b as Rng, c as DecodedLook, d as LookAccessory, et as layout, f as LookColour, g as PaletteName, h as PALETTES, i as CATALOG, j as lookProblem, k as isTinted, l as FRAME_PRESETS, m as LookProblem, n as AccessorySlot, nt as AvatarElement, o as CatalogEntry, p as LookPart, q as WALKER_HEAD_SCALE, r as AvatarLook, rt as CanvasPlacement, s as DEFAULT_GEN, t as ACCESSORY_SLOTS, tt as lookToward, u as LOOK_CODE_PREFIX, v as Preset, w as decodeLook, x as SECOND_COLOUR_CODE, y as RandomLookOptions, z as sameLook } from "./shared/avatar.js";
|
|
2
|
+
import { S as mix, _ as FaceExtra, a as Frame, b as expressionFromEmote, c as Point, d as StatusProp, f as View, g as Expression, h as EXPRESSION_NAMES, i as Figure, l as Pose, m as EXPRESSIONS, n as BodyPose, o as LookDir, p as BrowParams, r as Facing, s as LookLike, t as Anchor, u as RenderOptions, v as FaceParams, x as isExpression, y as MouthParams } from "./shared/types.js";
|
|
3
3
|
import { t as SceneNode } from "./shared/scene.js";
|
|
4
4
|
import { a as ActivityIcon, c as overlays, i as createAtlas, l as Ctx2D, n as AtlasOptions, o as Overlay, r as AvatarAtlas, s as ReactionGlyph, t as AtlasFrame, u as paintNodes } from "./shared/atlas.js";
|
|
5
5
|
import { c as composeAvatar, i as ready, n as describe, o as Composed, r as onArtReady, s as HEAD_Y, t as avatarEmoji } from "./shared/describe.js";
|
|
6
6
|
import { a as animator, i as Feeling, n as AnimatorOptions, o as REACTIONS, r as At, s as Reaction, t as Animator } from "./shared/animator.js";
|
|
7
|
-
export { ACCESSORY_SLOTS, type AccessorySlot, type ActivityIcon, type Anchor, Animator, type AnimatorOptions, type At, type AtlasFrame, type AtlasOptions, AvatarAtlas, type AvatarElement, type AvatarLook, type BodyPose, type BrowParams, CATALOG, CATALOG_REVISION, type CanvasPlacement, type CatalogEntry, type Composed, type Ctx2D, DEFAULT_GEN, type DecodedLook, EXPRESSIONS, EXPRESSION_NAMES, type Expression, FRAME_PRESETS, type FaceExtra, type FaceParams, type Facing, type Feeling, type Frame, HEAD_Y, LOOK_CODE_PREFIX, type LookAccessory, type LookColour, type LookDir, type LookLike, type LookPart, type LookProblem, type MouthParams, type Overlay, PALETTES, type PaletteName, type PartCategory, type Point, type Pose, type Preset, REACTIONS, type RandomLookOptions, type Reaction, type ReactionGlyph, type RenderOptions, type Rng, SECOND_COLOUR_CODE, type SceneNode, type StatusProp, type View, animator, avatarEmoji, canonicalLook, catalog, composeAvatar, contrast, createAtlas, decodeLook, defaultLook, defineAvatarElement, deltaE, describe, distinctLooks, encodeLook, expressionFromEmote, facingFrom, isExpression, isLookCode, isTinted, isValidLook, layout, lightness, lookProblem, lookToward, mix, normaliseHex, onArtReady, overlaySvg, overlays, paintNodes, paintOverlay, partById, partName, partsOf, randomLook, ready, render, resolveColour, sameLook, sceneToSvg, seededRng, toCode, toLook };
|
|
7
|
+
export { ACCESSORY_SLOTS, type AccessorySlot, type ActivityIcon, type Anchor, Animator, type AnimatorOptions, type At, type AtlasFrame, type AtlasOptions, AvatarAtlas, type AvatarElement, type AvatarLook, type BodyPose, type BrowParams, CATALOG, CATALOG_REVISION, type CanvasPlacement, type CatalogEntry, type Composed, type Ctx2D, DEFAULT_GEN, type DecodedLook, EXPRESSIONS, EXPRESSION_NAMES, type Expression, FRAME_PRESETS, type FaceExtra, type FaceParams, type Facing, type Feeling, type Figure, type Frame, HEAD_Y, LOOK_CODE_PREFIX, type LookAccessory, type LookColour, type LookDir, type LookLike, type LookPart, type LookProblem, type MouthParams, type Overlay, PALETTES, type PaletteName, type PartCategory, type Point, type Pose, type Preset, REACTIONS, type RandomLookOptions, type Reaction, type ReactionGlyph, type RenderOptions, type Rng, SECOND_COLOUR_CODE, type SceneNode, type StatusProp, type View, WALKER_HEAD_SCALE, WALKER_SEAT_DROP, animator, avatarEmoji, canonicalLook, catalog, composeAvatar, contrast, createAtlas, decodeLook, defaultLook, defineAvatarElement, deltaE, describe, distinctLooks, encodeLook, expressionFromEmote, facingFrom, isExpression, isLookCode, isTinted, isValidLook, layout, lightness, lookProblem, lookToward, mix, normaliseHex, onArtReady, overlaySvg, overlays, paintNodes, paintOverlay, partById, partName, partsOf, randomLook, ready, render, resolveColour, sameLook, sceneToSvg, seededRng, toCode, toLook };
|
package/dist/avatar.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as _defineProperty } from "./shared/defineProperty.js";
|
|
2
|
-
import { F as
|
|
2
|
+
import { F as lightness, I as toCode, L as toLook, N as contrast, P as deltaE, S as WALKER_FULL, a as composeAvatar, b as onArtReady, d as n, g as expressionFromEmote, h as EXPRESSION_NAMES, i as HEAD_Y, m as EXPRESSIONS, o as WALKER_HEAD_SCALE, r as sceneToSvg, s as WALKER_SEAT_DROP, v as isExpression, x as ready, y as mix } from "./shared/svg-markup.js";
|
|
3
3
|
import { a as paintNodes, i as renderCanvasAt, n as defaultLayer, r as renderCanvas, t as renderKey } from "./shared/pose-key.js";
|
|
4
4
|
import { n as renderSvg, t as nextPrefix } from "./shared/svg.js";
|
|
5
5
|
import { a as Animator, i as lookToward, l as renderBitmap, n as facingFrom, o as animator, r as layout, s as REACTIONS, t as overlays, u as renderDataUrl } from "./shared/overlays.js";
|
|
@@ -274,6 +274,13 @@ const BOX = {
|
|
|
274
274
|
w: 180,
|
|
275
275
|
h: 226
|
|
276
276
|
};
|
|
277
|
+
/** The walker's box: its full frame plus a margin for the rim. */
|
|
278
|
+
const WALKER_BOX = {
|
|
279
|
+
x: WALKER_FULL[0] + 4,
|
|
280
|
+
y: WALKER_FULL[1] - 2,
|
|
281
|
+
w: WALKER_FULL[2] - 8,
|
|
282
|
+
h: WALKER_FULL[3] + 2
|
|
283
|
+
};
|
|
277
284
|
/** The atlas. */
|
|
278
285
|
var AvatarAtlas = class {
|
|
279
286
|
constructor(opts = {}) {
|
|
@@ -281,6 +288,8 @@ var AvatarAtlas = class {
|
|
|
281
288
|
_defineProperty(this, "scale", void 0);
|
|
282
289
|
_defineProperty(this, "maxPages", void 0);
|
|
283
290
|
_defineProperty(this, "rim", void 0);
|
|
291
|
+
_defineProperty(this, "figure", void 0);
|
|
292
|
+
_defineProperty(this, "box", void 0);
|
|
284
293
|
_defineProperty(this, "makeCanvas", void 0);
|
|
285
294
|
_defineProperty(this, "pages", []);
|
|
286
295
|
_defineProperty(this, "frames", /* @__PURE__ */ new Map());
|
|
@@ -291,6 +300,8 @@ var AvatarAtlas = class {
|
|
|
291
300
|
this.maxPages = opts.maxPages ?? 4;
|
|
292
301
|
this.scale = opts.scale ?? .32;
|
|
293
302
|
this.rim = opts.rim ?? true;
|
|
303
|
+
this.figure = opts.figure ?? "blob";
|
|
304
|
+
this.box = this.figure === "walker" ? WALKER_BOX : BOX;
|
|
294
305
|
this.makeCanvas = opts.makeCanvas ?? ((size) => defaultLayer(size, size));
|
|
295
306
|
}
|
|
296
307
|
/** The frame for a key: the baked frame, or `null` (queued for {@link bake}). */
|
|
@@ -400,8 +411,9 @@ var AvatarAtlas = class {
|
|
|
400
411
|
}
|
|
401
412
|
bakeOne(id, key) {
|
|
402
413
|
const scale = key.scale ?? this.scale;
|
|
403
|
-
const
|
|
404
|
-
const
|
|
414
|
+
const box = this.box;
|
|
415
|
+
const w = Math.ceil(box.w * scale) + 2;
|
|
416
|
+
const h = Math.ceil(box.h * scale) + 2;
|
|
405
417
|
const spot = this.place(w, h);
|
|
406
418
|
const page = spot ? this.pages[spot.page] : void 0;
|
|
407
419
|
if (!spot || !page) return false;
|
|
@@ -412,6 +424,7 @@ var AvatarAtlas = class {
|
|
|
412
424
|
const face = key.face ?? "neutral";
|
|
413
425
|
const { nodes } = composeAvatar(toLook(key.look), {
|
|
414
426
|
frame: "full",
|
|
427
|
+
figure: this.figure,
|
|
415
428
|
facing,
|
|
416
429
|
rim: this.rim,
|
|
417
430
|
shadow: false,
|
|
@@ -424,7 +437,7 @@ var AvatarAtlas = class {
|
|
|
424
437
|
});
|
|
425
438
|
const scratch = defaultLayer(w, h);
|
|
426
439
|
if (!scratch) return false;
|
|
427
|
-
scratch.ctx.translate(1 -
|
|
440
|
+
scratch.ctx.translate(1 - box.x * scale, 1 - box.y * scale);
|
|
428
441
|
scratch.ctx.scale(scale, scale);
|
|
429
442
|
paintNodes(scratch.ctx, nodes, defaultLayer);
|
|
430
443
|
page.ctx.clearRect(spot.x, spot.y, w, h);
|
|
@@ -438,8 +451,8 @@ var AvatarAtlas = class {
|
|
|
438
451
|
y: spot.y,
|
|
439
452
|
w,
|
|
440
453
|
h,
|
|
441
|
-
footX: 1 -
|
|
442
|
-
footY: 1 -
|
|
454
|
+
footX: 1 - box.x * scale,
|
|
455
|
+
footY: 1 - box.y * scale,
|
|
443
456
|
mirror: false,
|
|
444
457
|
version: page.version
|
|
445
458
|
});
|
|
@@ -482,6 +495,6 @@ const render = {
|
|
|
482
495
|
dataUrl: renderDataUrl
|
|
483
496
|
};
|
|
484
497
|
//#endregion
|
|
485
|
-
export { ACCESSORY_SLOTS, Animator, AvatarAtlas, CATALOG, CATALOG_REVISION, DEFAULT_GEN, EXPRESSIONS, EXPRESSION_NAMES, FRAME_PRESETS, HEAD_Y, LOOK_CODE_PREFIX, PALETTES, REACTIONS, SECOND_COLOUR_CODE, animator, avatarEmoji, canonicalLook, catalog, composeAvatar, contrast, createAtlas, decodeLook, defaultLook, defineAvatarElement, deltaE, describe, distinctLooks, encodeLook, expressionFromEmote, facingFrom, isExpression, isLookCode, isTinted, isValidLook, layout, lightness, lookProblem, lookToward, mix, normaliseHex, onArtReady, overlaySvg, overlays, paintNodes, paintOverlay, partById, partName, partsOf, randomLook, ready, render, resolveColour, sameLook, sceneToSvg, seededRng, toCode, toLook };
|
|
498
|
+
export { ACCESSORY_SLOTS, Animator, AvatarAtlas, CATALOG, CATALOG_REVISION, DEFAULT_GEN, EXPRESSIONS, EXPRESSION_NAMES, FRAME_PRESETS, HEAD_Y, LOOK_CODE_PREFIX, PALETTES, REACTIONS, SECOND_COLOUR_CODE, WALKER_HEAD_SCALE, WALKER_SEAT_DROP, animator, avatarEmoji, canonicalLook, catalog, composeAvatar, contrast, createAtlas, decodeLook, defaultLook, defineAvatarElement, deltaE, describe, distinctLooks, encodeLook, expressionFromEmote, facingFrom, isExpression, isLookCode, isTinted, isValidLook, layout, lightness, lookProblem, lookToward, mix, normaliseHex, onArtReady, overlaySvg, overlays, paintNodes, paintOverlay, partById, partName, partsOf, randomLook, ready, render, resolveColour, sameLook, sceneToSvg, seededRng, toCode, toLook };
|
|
486
499
|
|
|
487
500
|
//# sourceMappingURL=avatar.js.map
|
package/dist/avatar.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"avatar.js","names":["partsOf","PALETTES","CATALOG_REVISION"],"sources":["../src/avatar/outputs/element.ts","../src/avatar/outputs/custom-element.ts","../src/avatar/outputs/overlay-svg.ts","../src/avatar/catalog-view.ts","../src/avatar/atlas.ts","../src/avatar.ts"],"mappings":";;;;;;;;;;;;;;AAwBA,SAAgB,cAAc,MAAgB,OAAsB,CAAC,GAAG,MAAgB,UAAyB;CAC/G,MAAM,KAAK,IAAI,cAAc,MAAM;CACnC,GAAG,YAAY;CACf,GAAG,MAAM,UAAU;CACnB,GAAG,MAAM,aAAa;CACtB,IAAI,OAAO;CACX,IAAI,UAAU;CACd,IAAI,MAAM;CACV,MAAM,QAAQ,WAAW,UAAgB;EACvC,MAAM,OAAO,UAAU,OAAO,IAAI,GAAG,OAAO;EAC5C,IAAI,CAAC,YAAY,SAAS,KACxB;EAEF,MAAM;EACN,GAAG,YAAY,UAAU,MAAM,OAAO;CACxC;CACA,KAAK,IAAI;CACT,iBAAiB;EAAE,KAAK,IAAI;CAAG,CAAC;CAChC,OAAO;EACL;EACA,OAAO,MAAM;GACX,UAAU;IAAE,GAAG;IAAS;GAAK;GAC7B,KAAK;EACP;EACA,QAAQ,MAAM;GACZ,OAAO;GACP,KAAK,IAAI;EACX;EACA,WAAW,MAAM;GACf,UAAU;IAAE,GAAG;IAAM,GAAI,QAAQ,OAAO,EAAE,MAAM,QAAQ,KAAK,IAAI,CAAC;GAAG;GACrE,KAAK,IAAI;EACX;CACF;AACF;;;;;;;;;;;;;;ACxCA,MAAM,UAA6B;CAAC;CAAK;CAAM;CAAK;CAAM;CAAK;CAAM;CAAK;AAAI;AAC9E,MAAM,SAA2B;CAAC;CAAQ;CAAQ;AAAM;AACxD,MAAM,SAA8B;CAAC;CAAQ;CAAQ;CAAO;CAAO;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AAK,EAAE,uBAAuB,OAAO,SAAS,KAAK,WAAW,KAAK,KAAK;AACjN;;AAGA,SAAgB,aAAa,KAAY,SAAkB,KAAa,KAAa,QAAQ,GAAS;CACpG,IAAI,KAAK;CACT,IAAI,UAAU,KAAK,GAAG;CACtB,IAAI,MAAM,OAAO,KAAK;CACtB,WAAW,KAAK,QAAQ,KAAK;CAC7B,IAAI,QAAQ;AACd;;;;;ACjBA,MAAa,UAAU;;CAErB,MAAM,UAAiD;EACrD,OAAOA,UAAQ,QAAQ;CACzB;;CAEA,UAAUC;;CAEV,UAAUC;AACZ;;;
|
|
1
|
+
{"version":3,"file":"avatar.js","names":["partsOf","PALETTES","CATALOG_REVISION"],"sources":["../src/avatar/outputs/element.ts","../src/avatar/outputs/custom-element.ts","../src/avatar/outputs/overlay-svg.ts","../src/avatar/catalog-view.ts","../src/avatar/atlas.ts","../src/avatar.ts"],"mappings":";;;;;;;;;;;;;;AAwBA,SAAgB,cAAc,MAAgB,OAAsB,CAAC,GAAG,MAAgB,UAAyB;CAC/G,MAAM,KAAK,IAAI,cAAc,MAAM;CACnC,GAAG,YAAY;CACf,GAAG,MAAM,UAAU;CACnB,GAAG,MAAM,aAAa;CACtB,IAAI,OAAO;CACX,IAAI,UAAU;CACd,IAAI,MAAM;CACV,MAAM,QAAQ,WAAW,UAAgB;EACvC,MAAM,OAAO,UAAU,OAAO,IAAI,GAAG,OAAO;EAC5C,IAAI,CAAC,YAAY,SAAS,KACxB;EAEF,MAAM;EACN,GAAG,YAAY,UAAU,MAAM,OAAO;CACxC;CACA,KAAK,IAAI;CACT,iBAAiB;EAAE,KAAK,IAAI;CAAG,CAAC;CAChC,OAAO;EACL;EACA,OAAO,MAAM;GACX,UAAU;IAAE,GAAG;IAAS;GAAK;GAC7B,KAAK;EACP;EACA,QAAQ,MAAM;GACZ,OAAO;GACP,KAAK,IAAI;EACX;EACA,WAAW,MAAM;GACf,UAAU;IAAE,GAAG;IAAM,GAAI,QAAQ,OAAO,EAAE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