@utsp/core 0.13.0-nightly.20251214151223.d6db2d9 → 0.13.0-nightly.20251217124509.36444f7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/benchmark.cjs +10 -0
- package/dist/benchmark.d.ts +9112 -0
- package/dist/benchmark.mjs +10 -0
- package/dist/index.cjs +5 -5
- package/dist/index.d.ts +250 -45
- package/dist/index.mjs +5 -5
- package/package.json +30 -3
package/dist/index.d.ts
CHANGED
|
@@ -783,25 +783,7 @@ interface FillSpriteMultiColorOrder extends NetworkOrder {
|
|
|
783
783
|
type: 0x16;
|
|
784
784
|
spriteIndex: number;
|
|
785
785
|
}
|
|
786
|
-
|
|
787
|
-
* 0x20 - TriggerSound: Triggers positional sound effect
|
|
788
|
-
*/
|
|
789
|
-
interface TriggerSoundOrder extends NetworkOrder {
|
|
790
|
-
type: 0x20;
|
|
791
|
-
posX: number;
|
|
792
|
-
posY: number;
|
|
793
|
-
soundId: number;
|
|
794
|
-
loop: boolean;
|
|
795
|
-
}
|
|
796
|
-
/**
|
|
797
|
-
* 0x21 - TriggerGlobalSound: Triggers global (non-positional) sound
|
|
798
|
-
*/
|
|
799
|
-
interface TriggerGlobalSoundOrder extends NetworkOrder {
|
|
800
|
-
type: 0x21;
|
|
801
|
-
soundId: number;
|
|
802
|
-
loop: boolean;
|
|
803
|
-
}
|
|
804
|
-
type AnyNetworkOrder = CharOrder | TextOrder | TextMultilineOrder | SubFrameOrder | SubFrameMultiColorOrder | FullFrameOrder | FullFrameMultiColorOrder | SpriteOrder | SpriteMultiColorOrder | ColorMapOrder | ShapeOrder | DotCloudOrder | DotCloudMultiColorOrder | BitmaskOrder | Bitmask4Order | Bitmask16Order | PolylineOrder | SpriteCloudOrder | SpriteCloudMultiColorOrder | SpriteCloudVariedOrder | SpriteCloudVariedMultiColorOrder | ClearOrder | FillCharOrder | FillSpriteOrder | FillSpriteMultiColorOrder | TriggerSoundOrder | TriggerGlobalSoundOrder;
|
|
786
|
+
type AnyNetworkOrder = CharOrder | TextOrder | TextMultilineOrder | SubFrameOrder | SubFrameMultiColorOrder | FullFrameOrder | FullFrameMultiColorOrder | SpriteOrder | SpriteMultiColorOrder | ColorMapOrder | ShapeOrder | DotCloudOrder | DotCloudMultiColorOrder | BitmaskOrder | Bitmask4Order | Bitmask16Order | PolylineOrder | SpriteCloudOrder | SpriteCloudMultiColorOrder | SpriteCloudVariedOrder | SpriteCloudVariedMultiColorOrder | ClearOrder | FillCharOrder | FillSpriteOrder | FillSpriteMultiColorOrder;
|
|
805
787
|
|
|
806
788
|
/**
|
|
807
789
|
* UTSP Macro System Types
|
|
@@ -1530,9 +1512,22 @@ interface Color {
|
|
|
1530
1512
|
/**
|
|
1531
1513
|
* Color Palette Load (LoadType 0x01)
|
|
1532
1514
|
* Loads a palette of RGBA+E colors
|
|
1515
|
+
*
|
|
1516
|
+
* When slotId is provided, the palette is loaded into a named slot for later switching.
|
|
1517
|
+
* When slotId is undefined/absent, the palette is loaded as the main active palette.
|
|
1518
|
+
*
|
|
1519
|
+
* @example
|
|
1520
|
+
* ```typescript
|
|
1521
|
+
* // Main palette (backward compatible)
|
|
1522
|
+
* { loadType: LoadType.ColorPalette, colors: [...] }
|
|
1523
|
+
*
|
|
1524
|
+
* // Palette slot for dynamic switching
|
|
1525
|
+
* { loadType: LoadType.ColorPalette, slotId: 1, colors: [...] }
|
|
1526
|
+
* ```
|
|
1533
1527
|
*/
|
|
1534
1528
|
interface ColorPaletteLoad {
|
|
1535
1529
|
loadType: LoadType.ColorPalette;
|
|
1530
|
+
slotId?: number;
|
|
1536
1531
|
colors: Color[];
|
|
1537
1532
|
}
|
|
1538
1533
|
/**
|
|
@@ -2579,7 +2574,13 @@ declare enum PostProcessOrderType {
|
|
|
2579
2574
|
*
|
|
2580
2575
|
* Parameters: enabled, colorR?, colorG?, colorB?, colorA?, lineWidth?
|
|
2581
2576
|
*/
|
|
2582
|
-
SetGrid = 5
|
|
2577
|
+
SetGrid = 5,
|
|
2578
|
+
/**
|
|
2579
|
+
* 0x06 - SwitchPalette: Switch to a pre-loaded palette slot
|
|
2580
|
+
*
|
|
2581
|
+
* Parameters: slotId (0-255)
|
|
2582
|
+
*/
|
|
2583
|
+
SwitchPalette = 6
|
|
2583
2584
|
}
|
|
2584
2585
|
|
|
2585
2586
|
/**
|
|
@@ -2723,10 +2724,24 @@ interface SetGridOrder extends PostProcessOrderBase {
|
|
|
2723
2724
|
colorA: number;
|
|
2724
2725
|
lineWidth: number;
|
|
2725
2726
|
}
|
|
2727
|
+
/**
|
|
2728
|
+
* SwitchPalette Order (0x06)
|
|
2729
|
+
*
|
|
2730
|
+
* Switches to a pre-loaded palette slot.
|
|
2731
|
+
* The palette must have been loaded to the Core via loadPaletteToSlot() first.
|
|
2732
|
+
*
|
|
2733
|
+
* Binary format:
|
|
2734
|
+
* - type: 1 byte (0x06)
|
|
2735
|
+
* - slotId: 1 byte (0-255)
|
|
2736
|
+
*/
|
|
2737
|
+
interface SwitchPaletteOrder extends PostProcessOrderBase {
|
|
2738
|
+
type: PostProcessOrderType.SwitchPalette;
|
|
2739
|
+
slotId: number;
|
|
2740
|
+
}
|
|
2726
2741
|
/**
|
|
2727
2742
|
* Union type for all post-process orders
|
|
2728
2743
|
*/
|
|
2729
|
-
type AnyPostProcessOrder = SetConfigOrder | SetScanlinesOrder | SetAmbientEffectOrder | SetScalingModeOrder | SetGridOrder;
|
|
2744
|
+
type AnyPostProcessOrder = SetConfigOrder | SetScanlinesOrder | SetAmbientEffectOrder | SetScalingModeOrder | SetGridOrder | SwitchPaletteOrder;
|
|
2730
2745
|
|
|
2731
2746
|
/**
|
|
2732
2747
|
* Update packet according to the new UTSP protocol
|
|
@@ -2904,18 +2919,17 @@ declare class Layer {
|
|
|
2904
2919
|
getOrders(): AnyNetworkOrder[];
|
|
2905
2920
|
/**
|
|
2906
2921
|
* Adds orders to the layer (incremental mode)
|
|
2907
|
-
*
|
|
2922
|
+
* Re-rasterizes all orders to ensure consistent state
|
|
2908
2923
|
*/
|
|
2909
2924
|
addOrders(orders: AnyNetworkOrder[]): void;
|
|
2910
2925
|
/**
|
|
2911
2926
|
* Adds temporary orders that are rasterized but not stored
|
|
2912
2927
|
* Used for macro-generated content (particles, UI) that is regenerated each frame
|
|
2913
|
-
* Uses SET mode to clear previous content before drawing
|
|
2914
2928
|
*/
|
|
2915
2929
|
addTemporaryOrders(orders: AnyNetworkOrder[]): void;
|
|
2916
2930
|
/**
|
|
2917
2931
|
* Replaces all orders in the layer (reset mode)
|
|
2918
|
-
* Automatically rasterizes all orders
|
|
2932
|
+
* Automatically rasterizes all orders
|
|
2919
2933
|
*/
|
|
2920
2934
|
setOrders(orders: AnyNetworkOrder[]): void;
|
|
2921
2935
|
/**
|
|
@@ -3647,6 +3661,14 @@ declare class User<TData = Record<string, any>> {
|
|
|
3647
3661
|
private postProcessCommands;
|
|
3648
3662
|
private currentPostProcessConfig;
|
|
3649
3663
|
private bridgeMessages;
|
|
3664
|
+
private totalBytesSent;
|
|
3665
|
+
private totalBytesReceived;
|
|
3666
|
+
private bytesSentPerTick;
|
|
3667
|
+
private bytesReceivedPerTick;
|
|
3668
|
+
private bytesTickIndex;
|
|
3669
|
+
private bytesTickRate;
|
|
3670
|
+
private currentTickBytesSent;
|
|
3671
|
+
private currentTickBytesReceived;
|
|
3650
3672
|
/**
|
|
3651
3673
|
* Application-specific data storage
|
|
3652
3674
|
* Use this to store game state, player data, or any custom information
|
|
@@ -4249,6 +4271,52 @@ declare class User<TData = Record<string, any>> {
|
|
|
4249
4271
|
* ```
|
|
4250
4272
|
*/
|
|
4251
4273
|
getStats(): UserStats;
|
|
4274
|
+
/**
|
|
4275
|
+
* Gets total bytes sent to this user (server-side)
|
|
4276
|
+
* Excludes bridge messages.
|
|
4277
|
+
*/
|
|
4278
|
+
getTotalBytesSent(): number;
|
|
4279
|
+
/**
|
|
4280
|
+
* Gets total bytes received by this user (client-side)
|
|
4281
|
+
* Excludes bridge messages.
|
|
4282
|
+
*/
|
|
4283
|
+
getTotalBytesReceived(): number;
|
|
4284
|
+
/**
|
|
4285
|
+
* Records bytes sent to this user (called by ServerRuntime)
|
|
4286
|
+
* @internal
|
|
4287
|
+
*/
|
|
4288
|
+
recordBytesSent(bytes: number): void;
|
|
4289
|
+
/**
|
|
4290
|
+
* Records bytes received by this user (called by NetworkSync)
|
|
4291
|
+
* @internal
|
|
4292
|
+
*/
|
|
4293
|
+
recordBytesReceived(bytes: number): void;
|
|
4294
|
+
/**
|
|
4295
|
+
* Resets byte counters (useful for periodic stats)
|
|
4296
|
+
*/
|
|
4297
|
+
resetByteCounters(): void;
|
|
4298
|
+
/**
|
|
4299
|
+
* Sets the tick rate for bytes-per-second calculation
|
|
4300
|
+
* Call this when the runtime tick rate changes
|
|
4301
|
+
* @param tickRate - The tick rate in ticks per second
|
|
4302
|
+
*/
|
|
4303
|
+
setBytesTickRate(tickRate: number): void;
|
|
4304
|
+
/**
|
|
4305
|
+
* Called at end of each tick to record bytes for this tick
|
|
4306
|
+
* Updates the sliding window for bytes/sec calculation
|
|
4307
|
+
* @internal
|
|
4308
|
+
*/
|
|
4309
|
+
endTickBytes(): void;
|
|
4310
|
+
/**
|
|
4311
|
+
* Gets bytes sent per second (sliding window over last second)
|
|
4312
|
+
* @returns Bytes sent per second
|
|
4313
|
+
*/
|
|
4314
|
+
getBytesSentPerSecond(): number;
|
|
4315
|
+
/**
|
|
4316
|
+
* Gets bytes received per second (sliding window over last second)
|
|
4317
|
+
* @returns Bytes received per second
|
|
4318
|
+
*/
|
|
4319
|
+
getBytesReceivedPerSecond(): number;
|
|
4252
4320
|
/**
|
|
4253
4321
|
* Gets the bindingId of an axis from its name
|
|
4254
4322
|
*
|
|
@@ -5363,6 +5431,49 @@ declare class User<TData = Record<string, any>> {
|
|
|
5363
5431
|
* Get current grid configuration
|
|
5364
5432
|
*/
|
|
5365
5433
|
getGridConfig(): GridConfig | null;
|
|
5434
|
+
/** Currently active palette slot ID */
|
|
5435
|
+
private currentPaletteSlotId;
|
|
5436
|
+
/**
|
|
5437
|
+
* Switch to a pre-loaded palette slot
|
|
5438
|
+
*
|
|
5439
|
+
* The palette must have been loaded to the Core via `core.loadPaletteToSlot()` first.
|
|
5440
|
+
* This allows instant palette switching without re-sending palette data over the network.
|
|
5441
|
+
*
|
|
5442
|
+
* **Use cases:**
|
|
5443
|
+
* - Day/night cycle transitions
|
|
5444
|
+
* - Different visual themes per game zone
|
|
5445
|
+
* - Accessibility options (high contrast)
|
|
5446
|
+
* - Visual effects (damage flash, power-up)
|
|
5447
|
+
*
|
|
5448
|
+
* @param slotId - Palette slot ID (0-255)
|
|
5449
|
+
*
|
|
5450
|
+
* @example
|
|
5451
|
+
* ```typescript
|
|
5452
|
+
* // In Core setup - preload palettes
|
|
5453
|
+
* core.loadPaletteToSlot(0, dayPalette);
|
|
5454
|
+
* core.loadPaletteToSlot(1, nightPalette);
|
|
5455
|
+
* core.loadPaletteToSlot(2, dungeonPalette);
|
|
5456
|
+
*
|
|
5457
|
+
* // In IApplication.updateUser() - switch based on game state
|
|
5458
|
+
* if (gameState.isNight) {
|
|
5459
|
+
* user.switchPalette(1);
|
|
5460
|
+
* } else {
|
|
5461
|
+
* user.switchPalette(0);
|
|
5462
|
+
* }
|
|
5463
|
+
*
|
|
5464
|
+
* // Zone-based switching
|
|
5465
|
+
* if (player.enteredDungeon) {
|
|
5466
|
+
* user.switchPalette(2);
|
|
5467
|
+
* }
|
|
5468
|
+
* ```
|
|
5469
|
+
*/
|
|
5470
|
+
switchPalette(slotId: number): void;
|
|
5471
|
+
/**
|
|
5472
|
+
* Get the currently active palette slot ID
|
|
5473
|
+
*
|
|
5474
|
+
* @returns The active slot ID, or null if no palette has been switched yet
|
|
5475
|
+
*/
|
|
5476
|
+
getCurrentPaletteSlotId(): number | null;
|
|
5366
5477
|
/**
|
|
5367
5478
|
* Send data through the bridge channel to the client application
|
|
5368
5479
|
*
|
|
@@ -5909,6 +6020,7 @@ declare class Core {
|
|
|
5909
6020
|
private postProcessOrderCollector;
|
|
5910
6021
|
private activeWebFontId;
|
|
5911
6022
|
private _renderCallCount;
|
|
6023
|
+
private paletteSlots;
|
|
5912
6024
|
private onPaletteChangedCallback?;
|
|
5913
6025
|
private onBitmapFontChangedCallback?;
|
|
5914
6026
|
private onImageFontChangedCallback?;
|
|
@@ -6227,6 +6339,72 @@ declare class Core {
|
|
|
6227
6339
|
* ```
|
|
6228
6340
|
*/
|
|
6229
6341
|
resetPalette(): void;
|
|
6342
|
+
/**
|
|
6343
|
+
* Load a palette into a slot for later switching
|
|
6344
|
+
*
|
|
6345
|
+
* Palettes are stored in the Core and can be switched per-user at runtime.
|
|
6346
|
+
* This allows preloading multiple palettes (e.g., day/night themes)
|
|
6347
|
+
* and switching between them without re-sending the palette data.
|
|
6348
|
+
*
|
|
6349
|
+
* @param slotId - Slot ID (0-255)
|
|
6350
|
+
* @param colors - Array of colors to load
|
|
6351
|
+
*
|
|
6352
|
+
* @example
|
|
6353
|
+
* ```typescript
|
|
6354
|
+
* // Preload day and night palettes
|
|
6355
|
+
* core.loadPaletteToSlot(0, dayColors);
|
|
6356
|
+
* core.loadPaletteToSlot(1, nightColors);
|
|
6357
|
+
*
|
|
6358
|
+
* // Later, switch user to night palette
|
|
6359
|
+
* user.switchPalette(1);
|
|
6360
|
+
* ```
|
|
6361
|
+
*/
|
|
6362
|
+
loadPaletteToSlot(slotId: number, colors: Array<{
|
|
6363
|
+
colorId: number;
|
|
6364
|
+
r: number;
|
|
6365
|
+
g: number;
|
|
6366
|
+
b: number;
|
|
6367
|
+
a: number;
|
|
6368
|
+
e?: number;
|
|
6369
|
+
}>): void;
|
|
6370
|
+
/**
|
|
6371
|
+
* Get a palette from a slot
|
|
6372
|
+
*
|
|
6373
|
+
* @param slotId - Slot ID (0-255)
|
|
6374
|
+
* @returns The palette map, or null if slot is empty
|
|
6375
|
+
*
|
|
6376
|
+
* @example
|
|
6377
|
+
* ```typescript
|
|
6378
|
+
* const nightPalette = core.getPaletteFromSlot(1);
|
|
6379
|
+
* if (nightPalette) {
|
|
6380
|
+
* console.log(`Night palette has ${nightPalette.size} colors`);
|
|
6381
|
+
* }
|
|
6382
|
+
* ```
|
|
6383
|
+
*/
|
|
6384
|
+
getPaletteFromSlot(slotId: number): Map<number, {
|
|
6385
|
+
r: number;
|
|
6386
|
+
g: number;
|
|
6387
|
+
b: number;
|
|
6388
|
+
a: number;
|
|
6389
|
+
e: number;
|
|
6390
|
+
}> | null;
|
|
6391
|
+
/**
|
|
6392
|
+
* Check if a palette slot is loaded
|
|
6393
|
+
*
|
|
6394
|
+
* @param slotId - Slot ID (0-255)
|
|
6395
|
+
* @returns true if the slot has a palette loaded
|
|
6396
|
+
*/
|
|
6397
|
+
hasPaletteSlot(slotId: number): boolean;
|
|
6398
|
+
/**
|
|
6399
|
+
* Clear a palette slot
|
|
6400
|
+
*
|
|
6401
|
+
* @param slotId - Slot ID (0-255)
|
|
6402
|
+
*/
|
|
6403
|
+
clearPaletteSlot(slotId: number): void;
|
|
6404
|
+
/**
|
|
6405
|
+
* Clear all palette slots
|
|
6406
|
+
*/
|
|
6407
|
+
clearAllPaletteSlots(): void;
|
|
6230
6408
|
/**
|
|
6231
6409
|
* Converts a color ID to a CSS rgba() string
|
|
6232
6410
|
*
|
|
@@ -6531,6 +6709,40 @@ declare class Core {
|
|
|
6531
6709
|
* ```
|
|
6532
6710
|
*/
|
|
6533
6711
|
generatePaletteLoadPacket(): Uint8Array | null;
|
|
6712
|
+
/**
|
|
6713
|
+
* Generates a LoadPacket for a specific palette slot (SERVER-SIDE)
|
|
6714
|
+
*
|
|
6715
|
+
* Encodes a palette slot in binary format ready to send to clients.
|
|
6716
|
+
* The client will store this in its own paletteSlots Map for later switching.
|
|
6717
|
+
*
|
|
6718
|
+
* @param slotId - The slot ID (0-255)
|
|
6719
|
+
* @returns Encoded binary buffer (or null if slot doesn't exist)
|
|
6720
|
+
*
|
|
6721
|
+
* @example
|
|
6722
|
+
* ```typescript
|
|
6723
|
+
* // Server side - send specific palette slot
|
|
6724
|
+
* const slotPacket = core.generatePaletteSlotLoadPacket(1);
|
|
6725
|
+
* if (slotPacket) {
|
|
6726
|
+
* websocket.emit('load', slotPacket);
|
|
6727
|
+
* }
|
|
6728
|
+
* ```
|
|
6729
|
+
*/
|
|
6730
|
+
generatePaletteSlotLoadPacket(slotId: number): Uint8Array | null;
|
|
6731
|
+
/**
|
|
6732
|
+
* Generates LoadPackets for all palette slots (SERVER-SIDE)
|
|
6733
|
+
*
|
|
6734
|
+
* @returns Array of encoded binary buffers for all non-empty slots
|
|
6735
|
+
*
|
|
6736
|
+
* @example
|
|
6737
|
+
* ```typescript
|
|
6738
|
+
* // Server side - send all palette slots to client
|
|
6739
|
+
* const slotPackets = core.generateAllPaletteSlotLoadPackets();
|
|
6740
|
+
* slotPackets.forEach(packet => {
|
|
6741
|
+
* websocket.emit('load', packet);
|
|
6742
|
+
* });
|
|
6743
|
+
* ```
|
|
6744
|
+
*/
|
|
6745
|
+
generateAllPaletteSlotLoadPackets(): Uint8Array[];
|
|
6534
6746
|
/**
|
|
6535
6747
|
* Generates a LoadPacket for all unicolor sprites (SERVER-SIDE)
|
|
6536
6748
|
*
|
|
@@ -8356,8 +8568,6 @@ declare const CLEAR_ORDER_SIZE = 4;
|
|
|
8356
8568
|
declare const FILLCHAR_ORDER_MIN_SIZE = 5;
|
|
8357
8569
|
declare const FILLSPRITE_ORDER_SIZE = 4;
|
|
8358
8570
|
declare const FILLSPRITE_MULTICOLOR_ORDER_SIZE = 2;
|
|
8359
|
-
declare const TRIGGERSOUND_ORDER_SIZE = 5;
|
|
8360
|
-
declare const TRIGGERGLOBALSOUND_ORDER_SIZE = 3;
|
|
8361
8571
|
declare const AUDIO_PLAY_SOUND_MIN_SIZE = 5;
|
|
8362
8572
|
declare const AUDIO_PLAY_GLOBAL_SOUND_MIN_SIZE = 5;
|
|
8363
8573
|
declare const AUDIO_STOP_SOUND_MIN_SIZE = 2;
|
|
@@ -8372,6 +8582,7 @@ declare const POSTPROCESS_SET_SCANLINES_SIZE = 7;
|
|
|
8372
8582
|
declare const POSTPROCESS_SET_AMBIENT_EFFECT_SIZE = 5;
|
|
8373
8583
|
declare const POSTPROCESS_SET_SCALING_MODE_SIZE = 2;
|
|
8374
8584
|
declare const POSTPROCESS_SET_GRID_SIZE = 7;
|
|
8585
|
+
declare const POSTPROCESS_SWITCH_PALETTE_SIZE = 2;
|
|
8375
8586
|
|
|
8376
8587
|
/**
|
|
8377
8588
|
* UTSP Order Types Enumeration
|
|
@@ -8492,15 +8703,7 @@ declare enum OrderType {
|
|
|
8492
8703
|
/**
|
|
8493
8704
|
* 0x16 - FillSpriteMultiColor: Fills layer with repeating multicolor sprite
|
|
8494
8705
|
*/
|
|
8495
|
-
FillSpriteMultiColor = 22
|
|
8496
|
-
/**
|
|
8497
|
-
* 0x20 - TriggerSound: Triggers positional sound effect
|
|
8498
|
-
*/
|
|
8499
|
-
TriggerSound = 32,
|
|
8500
|
-
/**
|
|
8501
|
-
* 0x21 - TriggerGlobalSound: Triggers global (non-positional) sound
|
|
8502
|
-
*/
|
|
8503
|
-
TriggerGlobalSound = 33
|
|
8706
|
+
FillSpriteMultiColor = 22
|
|
8504
8707
|
}
|
|
8505
8708
|
/**
|
|
8506
8709
|
* Type guard to check if a number is a valid OrderType
|
|
@@ -8541,20 +8744,17 @@ declare enum UpdateFlags {
|
|
|
8541
8744
|
* Bit 1: SET Mode (vs ADD mode)
|
|
8542
8745
|
*
|
|
8543
8746
|
* Indicates the order rasterization mode:
|
|
8544
|
-
* - 1 = SET mode →
|
|
8545
|
-
* - 0 = ADD mode →
|
|
8747
|
+
* - 1 = SET mode → Client clears layer cache before applying orders
|
|
8748
|
+
* - 0 = ADD mode → Client adds orders to existing cache (deprecated, kept for compatibility)
|
|
8546
8749
|
*
|
|
8547
|
-
*
|
|
8548
|
-
*
|
|
8549
|
-
* - ADD mode: layer.addOrders() - adds to existing content
|
|
8550
|
-
*
|
|
8551
|
-
* IMPORTANT: Corresponds to RasterizeMode.SET vs RasterizeMode.ADD
|
|
8750
|
+
* Note: The LayerRasterizer now always clears before rasterizing.
|
|
8751
|
+
* This flag is primarily for network protocol compatibility.
|
|
8552
8752
|
*
|
|
8553
8753
|
* @example
|
|
8554
8754
|
* layer.setOrders([...newOrders]); // SET mode
|
|
8555
8755
|
* // → UpdateFlags |= SetMode (0x02)
|
|
8556
8756
|
*
|
|
8557
|
-
* layer.addOrders([...moreOrders]); // ADD mode
|
|
8757
|
+
* layer.addOrders([...moreOrders]); // ADD mode (incremental update)
|
|
8558
8758
|
* // → UpdateFlags &= ~SetMode (bit 1 to 0)
|
|
8559
8759
|
*/
|
|
8560
8760
|
SetMode = 2,
|
|
@@ -9114,6 +9314,7 @@ declare class PostProcessOrderDecoder {
|
|
|
9114
9314
|
private decodeSetAmbientEffectOrder;
|
|
9115
9315
|
private decodeSetScalingModeOrder;
|
|
9116
9316
|
private decodeSetGridOrder;
|
|
9317
|
+
private decodeSwitchPaletteOrder;
|
|
9117
9318
|
}
|
|
9118
9319
|
|
|
9119
9320
|
/**
|
|
@@ -9188,11 +9389,15 @@ declare class PostProcessOrderCollector {
|
|
|
9188
9389
|
* Create a SetGridOrder with given grid configuration
|
|
9189
9390
|
*/
|
|
9190
9391
|
private createSetGridOrder;
|
|
9392
|
+
/**
|
|
9393
|
+
* Create a SwitchPaletteOrder with given slot ID
|
|
9394
|
+
*/
|
|
9395
|
+
private createSwitchPaletteOrder;
|
|
9191
9396
|
/**
|
|
9192
9397
|
* Parse CSS color string to RGBA components
|
|
9193
9398
|
*/
|
|
9194
9399
|
private parseColor;
|
|
9195
9400
|
}
|
|
9196
9401
|
|
|
9197
|
-
export { ASCII_8X8_FONT, AUDIO_CONFIGURE_SPATIAL_SIZE, AUDIO_FADEOUT_SOUND_MIN_SIZE, AUDIO_PAUSE_SOUND_MIN_SIZE, AUDIO_PLAY_GLOBAL_SOUND_MIN_SIZE, AUDIO_PLAY_SOUND_MIN_SIZE, AUDIO_RESUME_SOUND_MIN_SIZE, AUDIO_SET_LISTENER_POSITION_SIZE, AUDIO_SET_SOUND_EFFECTS_MIN_SIZE, AUDIO_STOP_SOUND_MIN_SIZE, AudioOrderCollector, AudioOrderDecoder, AudioOrderType, AudioTargetType, BITMASK16_ORDER_MIN_SIZE, BITMASK4_ORDER_MIN_SIZE, BITMASK_ORDER_MIN_SIZE, BitmapFont, BitmapFontRegistry, CHAR_ORDER_SIZE, CIRCLE_SHAPE_SIZE, CLEAR_ORDER_SIZE, COLORMAP_ORDER_MIN_SIZE, COLOR_SKIP, CellBuffer, CharCodeBuffer, Core, CoreStats, DISPLAY_HEADER_SIZE, DOTCLOUD_MULTICOLOR_ORDER_MIN_SIZE, DOTCLOUD_ORDER_MIN_SIZE, Display, ELLIPSE_SHAPE_SIZE, FILLCHAR_ORDER_MIN_SIZE, FILLSPRITE_MULTICOLOR_ORDER_SIZE, FILLSPRITE_ORDER_SIZE, FULLFRAME_MULTICOLOR_ORDER_MIN_SIZE, FULLFRAME_ORDER_MIN_SIZE, FontType, GamepadVibrateFlags, ImageFont, ImageFontRegistry, InputBindingRegistry, LAYER_CELL_COUNT, LAYER_HEADER_SIZE, LAYER_SIZE, LINE_SHAPE_SIZE, Layer, LoadType, MacroEngine, MacroEventType, MacroOrderType, MacroRegistry, MobileVibrateFlags, OrderBuilder, OrderType, POLYLINE_ORDER_MIN_SIZE, POSTPROCESS_SET_AMBIENT_EFFECT_SIZE, POSTPROCESS_SET_CONFIG_MIN_SIZE, POSTPROCESS_SET_GRID_SIZE, POSTPROCESS_SET_SCALING_MODE_SIZE, POSTPROCESS_SET_SCANLINES_SIZE, PlaySoundFlags, PostProcessOrderCollector, PostProcessOrderDecoder, PostProcessOrderType, RECTANGLE_SHAPE_SIZE, SHAPE_ORDER_MIN_SIZE, SPRITECLOUD_MULTICOLOR_ORDER_MIN_SIZE, SPRITECLOUD_ORDER_MIN_SIZE, SPRITECLOUD_VARIED_MULTICOLOR_ORDER_MIN_SIZE, SPRITECLOUD_VARIED_ORDER_MIN_SIZE, SPRITE_MULTICOLOR_ORDER_SIZE, SPRITE_ORDER_SIZE, SUBFRAME_MULTICOLOR_ORDER_MIN_SIZE, SUBFRAME_ORDER_MIN_SIZE, ShapeType, SoundEffectsFlags, SoundRegistry, SpriteRegistry, TEXT_MULTILINE_ORDER_MIN_SIZE, TEXT_ORDER_MIN_SIZE, TRIANGLE_SHAPE_SIZE,
|
|
9198
|
-
export type { AnyAudioOrder, AnyLoad, AnyMacroEvent, AnyMacroOrder, AnyPostProcessOrder, AnyVibrationOrder, AtlasBlocks, AudioOrder, BitmapFontConfig, BitmapFontLoad, Bitmask16Order, Bitmask16Variant, Bitmask4Order, Bitmask4Variant, BitmaskOrder, ButtonBorderStyle, ButtonConfig, ButtonStateColors, Cell, ChangeEvent, CharCodeMode, CircleShape, ClickEvent, Color, ColorPaletteLoad, CompressedInputPacket, ConfigureSpatialOrder, CoreMode, CoreOptions, CreateInstanceConfig, CreateInstanceOrder, EffectMacroTemplate, EffectTransform, EllipseShape, FadeOutSoundOrder, GamepadCancelOrder, GamepadVibrateOrder, GamepadVibrationOrder, GlyphSize, ImageFontConfig, ImageFontLoad, ImageFontOptions, LineMacroTemplate, LineShape, MacroEntry, MacroEvent, MacroInstanceEntry, MacroLoad, MacroOrder, MacroTemplate, MacroTemplateBase, MacroType, MacroUpdateResult, MobileCancelOrder, MobileVibrateOrder, MobileVibrationOrder, MulticolorCell, MulticolorSprite, MulticolorSpriteLoad, NetworkDisplay, NetworkLayer, ParticleConfig, ParticleEmitter, ParticleMacroTemplate, PauseSoundOrder, PlayGlobalSoundOrder, PlaySoundOrder, RectangleShape, RemoveInstanceOrder, RenderCommand, ResumeSoundOrder, RevealCellDef, RevealContent, RevealContentType, RevealCursor, RevealDirection, RevealMacroTemplate, RevealPattern, RevealPause, SelectEvent, SetAmbientEffectOrder, SetConfigOrder, SetGridOrder, SetListenerPositionOrder, SetScalingModeOrder, SetScanlinesOrder, SetSoundEffectsOrder, ShapeData, SoundEntry, SoundLoad, SpriteLoad, StopSoundOrder, SubmitEvent, TickStats, TriangleShape, UIMacroTemplate, UIState, UISubtype, UnicolorSprite, UpdateInstanceOrder, UpdatePacket, UserTickStats, VibrationOrder, WebFontConfig, WebFontLoad };
|
|
9402
|
+
export { ASCII_8X8_FONT, AUDIO_CONFIGURE_SPATIAL_SIZE, AUDIO_FADEOUT_SOUND_MIN_SIZE, AUDIO_PAUSE_SOUND_MIN_SIZE, AUDIO_PLAY_GLOBAL_SOUND_MIN_SIZE, AUDIO_PLAY_SOUND_MIN_SIZE, AUDIO_RESUME_SOUND_MIN_SIZE, AUDIO_SET_LISTENER_POSITION_SIZE, AUDIO_SET_SOUND_EFFECTS_MIN_SIZE, AUDIO_STOP_SOUND_MIN_SIZE, AudioOrderCollector, AudioOrderDecoder, AudioOrderType, AudioTargetType, BITMASK16_ORDER_MIN_SIZE, BITMASK4_ORDER_MIN_SIZE, BITMASK_ORDER_MIN_SIZE, BitmapFont, BitmapFontRegistry, CHAR_ORDER_SIZE, CIRCLE_SHAPE_SIZE, CLEAR_ORDER_SIZE, COLORMAP_ORDER_MIN_SIZE, COLOR_SKIP, CellBuffer, CharCodeBuffer, Core, CoreStats, DISPLAY_HEADER_SIZE, DOTCLOUD_MULTICOLOR_ORDER_MIN_SIZE, DOTCLOUD_ORDER_MIN_SIZE, Display, ELLIPSE_SHAPE_SIZE, FILLCHAR_ORDER_MIN_SIZE, FILLSPRITE_MULTICOLOR_ORDER_SIZE, FILLSPRITE_ORDER_SIZE, FULLFRAME_MULTICOLOR_ORDER_MIN_SIZE, FULLFRAME_ORDER_MIN_SIZE, FontType, GamepadVibrateFlags, ImageFont, ImageFontRegistry, InputBindingRegistry, LAYER_CELL_COUNT, LAYER_HEADER_SIZE, LAYER_SIZE, LINE_SHAPE_SIZE, Layer, LoadType, MacroEngine, MacroEventType, MacroOrderType, MacroRegistry, MobileVibrateFlags, OrderBuilder, OrderType, POLYLINE_ORDER_MIN_SIZE, POSTPROCESS_SET_AMBIENT_EFFECT_SIZE, POSTPROCESS_SET_CONFIG_MIN_SIZE, POSTPROCESS_SET_GRID_SIZE, POSTPROCESS_SET_SCALING_MODE_SIZE, POSTPROCESS_SET_SCANLINES_SIZE, POSTPROCESS_SWITCH_PALETTE_SIZE, PlaySoundFlags, PostProcessOrderCollector, PostProcessOrderDecoder, PostProcessOrderType, RECTANGLE_SHAPE_SIZE, SHAPE_ORDER_MIN_SIZE, SPRITECLOUD_MULTICOLOR_ORDER_MIN_SIZE, SPRITECLOUD_ORDER_MIN_SIZE, SPRITECLOUD_VARIED_MULTICOLOR_ORDER_MIN_SIZE, SPRITECLOUD_VARIED_ORDER_MIN_SIZE, SPRITE_MULTICOLOR_ORDER_SIZE, SPRITE_ORDER_SIZE, SUBFRAME_MULTICOLOR_ORDER_MIN_SIZE, SUBFRAME_ORDER_MIN_SIZE, ShapeType, SoundEffectsFlags, SoundRegistry, SpriteRegistry, TEXT_MULTILINE_ORDER_MIN_SIZE, TEXT_ORDER_MIN_SIZE, TRIANGLE_SHAPE_SIZE, UPDATE_PACKET_HEADER_SIZE, UpdateFlags, UpdateFlagsHelper, UpdatePacketDecoder, User, UserStats, VibrationOrderCollector, VibrationOrderDecoder, VibrationOrderEncoder, VibrationOrderType, WebFont, WebFontRegistry, charCodeByteSize, createASCII8x8FontLoad, createEmptyCompressedInputPacket, decodeCompressedInput, decodeInt8ToAxis, encodeAxisToInt8, encodeCompressedInput, getASCII8x8FontConfig, getAllCharCodes, getAtlasColumns, getAtlasDimensions, getAudioOrderTypeName, getButtonByteCount, getCharBitmap, getCompressedPacketSize, getMacroEventTypeName, getMacroOrderTypeName, getMaxCharCode, getOrderTypeName, hasChar, isValidAudioOrderType, isValidMacroEventType, isValidMacroOrderType, isValidOrderType };
|
|
9403
|
+
export type { AnyAudioOrder, AnyLoad, AnyMacroEvent, AnyMacroOrder, AnyPostProcessOrder, AnyVibrationOrder, AtlasBlocks, AudioOrder, BitmapFontConfig, BitmapFontLoad, Bitmask16Order, Bitmask16Variant, Bitmask4Order, Bitmask4Variant, BitmaskOrder, ButtonBorderStyle, ButtonConfig, ButtonStateColors, Cell, ChangeEvent, CharCodeMode, CircleShape, ClickEvent, Color, ColorPaletteLoad, CompressedInputPacket, ConfigureSpatialOrder, CoreMode, CoreOptions, CreateInstanceConfig, CreateInstanceOrder, EffectMacroTemplate, EffectTransform, EllipseShape, FadeOutSoundOrder, GamepadCancelOrder, GamepadVibrateOrder, GamepadVibrationOrder, GlyphSize, ImageFontConfig, ImageFontLoad, ImageFontOptions, LineMacroTemplate, LineShape, MacroEntry, MacroEvent, MacroInstanceEntry, MacroLoad, MacroOrder, MacroTemplate, MacroTemplateBase, MacroType, MacroUpdateResult, MobileCancelOrder, MobileVibrateOrder, MobileVibrationOrder, MulticolorCell, MulticolorSprite, MulticolorSpriteLoad, NetworkDisplay, NetworkLayer, ParticleConfig, ParticleEmitter, ParticleMacroTemplate, PauseSoundOrder, PlayGlobalSoundOrder, PlaySoundOrder, RectangleShape, RemoveInstanceOrder, RenderCommand, ResumeSoundOrder, RevealCellDef, RevealContent, RevealContentType, RevealCursor, RevealDirection, RevealMacroTemplate, RevealPattern, RevealPause, SelectEvent, SetAmbientEffectOrder, SetConfigOrder, SetGridOrder, SetListenerPositionOrder, SetScalingModeOrder, SetScanlinesOrder, SetSoundEffectsOrder, ShapeData, SoundEntry, SoundLoad, SpriteLoad, StopSoundOrder, SubmitEvent, SwitchPaletteOrder, TickStats, TriangleShape, UIMacroTemplate, UIState, UISubtype, UnicolorSprite, UpdateInstanceOrder, UpdatePacket, UserTickStats, VibrationOrder, WebFontConfig, WebFontLoad };
|