@utsp/core 0.15.0 → 0.16.0-nightly.20260101200530.42ed56f
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 +6 -6
- package/dist/benchmark.d.ts +117 -82
- package/dist/benchmark.mjs +6 -6
- package/dist/index.cjs +6 -6
- package/dist/index.d.ts +99 -79
- package/dist/index.mjs +6 -6
- package/package.json +4 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _utsp_types from '@utsp/types';
|
|
2
|
-
import {
|
|
2
|
+
import { Vector2, ScalingModeValue, AxisSource, ButtonSource, InputBindingLoadPacket, AxisBinding, ButtonBinding, TouchZoneBinding, SoundInstanceId, AudioConfigCommand, PlaySoundCommand, StopSoundCommand, FadeOutSoundCommand, PauseSoundCommand, ResumeSoundCommand, SetSoundEffectsCommand, IAudioProcessor, VibrationPattern, GamepadVibrationOptions, GamepadVibrationCommand, IGamepadVibrationProcessor, MobileVibrationCommand, IMobileVibrationProcessor, AudioAck, PostProcessConfig, PostProcessCommand, ScalingMode, GridConfig, SoundFormat, SoundLoadType, SoundLoadPacket, SoundExternalLoadPacket, UserRenderState } from '@utsp/types';
|
|
3
3
|
export { AxisBinding, AxisSource, ButtonBinding, ButtonSource, InputBindingLoadPacket, RenderState, RenderedCell, ScalingModeValue, UserRenderState, Vector2 } from '@utsp/types';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -2497,6 +2497,100 @@ type GamepadVibrationOrder = GamepadVibrateOrder | GamepadCancelOrder;
|
|
|
2497
2497
|
*/
|
|
2498
2498
|
type AnyVibrationOrder = MobileVibrateOrder | MobileCancelOrder | GamepadVibrateOrder | GamepadCancelOrder;
|
|
2499
2499
|
|
|
2500
|
+
interface RenderPassConfig {
|
|
2501
|
+
id: number;
|
|
2502
|
+
zMin: number;
|
|
2503
|
+
zMax: number;
|
|
2504
|
+
enabled?: boolean;
|
|
2505
|
+
}
|
|
2506
|
+
/**
|
|
2507
|
+
* Represents a display (camera) in the virtual world
|
|
2508
|
+
*
|
|
2509
|
+
* ARCHITECTURE (new protocol):
|
|
2510
|
+
* - Display = camera looking into the virtual world
|
|
2511
|
+
* - LAYERS are NO LONGER in Display, they are at User level
|
|
2512
|
+
* - Display only defines WHICH PART of the world we see (origin)
|
|
2513
|
+
*/
|
|
2514
|
+
declare class Display {
|
|
2515
|
+
private id;
|
|
2516
|
+
private origin;
|
|
2517
|
+
private size;
|
|
2518
|
+
private previousOrigin;
|
|
2519
|
+
private previousSize;
|
|
2520
|
+
private toDraw;
|
|
2521
|
+
private renderPasses;
|
|
2522
|
+
constructor(id?: number, sizeX?: number, sizeY?: number);
|
|
2523
|
+
/**
|
|
2524
|
+
* Gets the display ID (0-255)
|
|
2525
|
+
*/
|
|
2526
|
+
getId(): number;
|
|
2527
|
+
/**
|
|
2528
|
+
* Gets the origin position in the world
|
|
2529
|
+
*/
|
|
2530
|
+
getOrigin(): Vector2;
|
|
2531
|
+
/**
|
|
2532
|
+
* Sets the origin position in the world
|
|
2533
|
+
*/
|
|
2534
|
+
setOrigin(origin: Vector2): void;
|
|
2535
|
+
/**
|
|
2536
|
+
* Moves the origin in the world
|
|
2537
|
+
*/
|
|
2538
|
+
moveOrigin(deltaX: number, deltaY: number): void;
|
|
2539
|
+
/**
|
|
2540
|
+
* Checks if display origin has changed since last tick
|
|
2541
|
+
* @internal - Used to calculate if update should be sent
|
|
2542
|
+
*/
|
|
2543
|
+
hasOriginChanged(): boolean;
|
|
2544
|
+
/**
|
|
2545
|
+
* Checks if display size has changed since last tick
|
|
2546
|
+
* @internal - Used to calculate if update should be sent
|
|
2547
|
+
*/
|
|
2548
|
+
hasSizeChanged(): boolean;
|
|
2549
|
+
/**
|
|
2550
|
+
* Checks if display has changed (origin OR size)
|
|
2551
|
+
* @internal
|
|
2552
|
+
*/
|
|
2553
|
+
hasChanged(): boolean;
|
|
2554
|
+
/**
|
|
2555
|
+
* Resets change tracking
|
|
2556
|
+
* @internal - Called by Core.endTick() after sending updates
|
|
2557
|
+
*/
|
|
2558
|
+
resetChangeTracking(): void;
|
|
2559
|
+
/**
|
|
2560
|
+
* Gets the display size
|
|
2561
|
+
*/
|
|
2562
|
+
getSize(): Vector2;
|
|
2563
|
+
/**
|
|
2564
|
+
* Sets the display size
|
|
2565
|
+
*/
|
|
2566
|
+
setSize(size: Vector2): void;
|
|
2567
|
+
/**
|
|
2568
|
+
* Returns the validated render passes (undefined = single pass [0,255])
|
|
2569
|
+
*/
|
|
2570
|
+
getRenderPasses(): RenderPassConfig[] | undefined;
|
|
2571
|
+
/**
|
|
2572
|
+
* Sets the render passes configuration (0..4 passes). Applies clamping and swap.
|
|
2573
|
+
* Passing undefined resets to single pass behavior.
|
|
2574
|
+
*/
|
|
2575
|
+
setRenderPasses(passes: RenderPassConfig[] | undefined): void;
|
|
2576
|
+
private normalizePass;
|
|
2577
|
+
/**
|
|
2578
|
+
* Returns a debug-friendly snapshot of this display (metadata only)
|
|
2579
|
+
*/
|
|
2580
|
+
getDebugInfo(): {
|
|
2581
|
+
id: number;
|
|
2582
|
+
origin: {
|
|
2583
|
+
x: number;
|
|
2584
|
+
y: number;
|
|
2585
|
+
};
|
|
2586
|
+
size: {
|
|
2587
|
+
x: number;
|
|
2588
|
+
y: number;
|
|
2589
|
+
};
|
|
2590
|
+
renderPasses?: RenderPassConfig[];
|
|
2591
|
+
};
|
|
2592
|
+
}
|
|
2593
|
+
|
|
2500
2594
|
/**
|
|
2501
2595
|
* Network representation of a display
|
|
2502
2596
|
* Layers are NO LONGER under displays - they are at User level
|
|
@@ -2512,6 +2606,8 @@ interface NetworkDisplay {
|
|
|
2512
2606
|
sizeX: number;
|
|
2513
2607
|
/** Display height in cells (1-256) */
|
|
2514
2608
|
sizeY: number;
|
|
2609
|
+
/** Optional render pass configuration (max 4 passes) */
|
|
2610
|
+
renderPasses?: RenderPassConfig[];
|
|
2515
2611
|
}
|
|
2516
2612
|
|
|
2517
2613
|
interface NetworkLayer {
|
|
@@ -2836,82 +2932,6 @@ interface UpdatePacket {
|
|
|
2836
2932
|
};
|
|
2837
2933
|
}
|
|
2838
2934
|
|
|
2839
|
-
/**
|
|
2840
|
-
* Represents a display (camera) in the virtual world
|
|
2841
|
-
*
|
|
2842
|
-
* ARCHITECTURE (new protocol):
|
|
2843
|
-
* - Display = camera looking into the virtual world
|
|
2844
|
-
* - LAYERS are NO LONGER in Display, they are at User level
|
|
2845
|
-
* - Display only defines WHICH PART of the world we see (origin)
|
|
2846
|
-
*/
|
|
2847
|
-
declare class Display {
|
|
2848
|
-
private id;
|
|
2849
|
-
private origin;
|
|
2850
|
-
private size;
|
|
2851
|
-
private previousOrigin;
|
|
2852
|
-
private previousSize;
|
|
2853
|
-
private toDraw;
|
|
2854
|
-
constructor(id?: number, sizeX?: number, sizeY?: number);
|
|
2855
|
-
/**
|
|
2856
|
-
* Gets the display ID (0-255)
|
|
2857
|
-
*/
|
|
2858
|
-
getId(): number;
|
|
2859
|
-
/**
|
|
2860
|
-
* Gets the origin position in the world
|
|
2861
|
-
*/
|
|
2862
|
-
getOrigin(): Vector2;
|
|
2863
|
-
/**
|
|
2864
|
-
* Sets the origin position in the world
|
|
2865
|
-
*/
|
|
2866
|
-
setOrigin(origin: Vector2): void;
|
|
2867
|
-
/**
|
|
2868
|
-
* Moves the origin in the world
|
|
2869
|
-
*/
|
|
2870
|
-
moveOrigin(deltaX: number, deltaY: number): void;
|
|
2871
|
-
/**
|
|
2872
|
-
* Checks if display origin has changed since last tick
|
|
2873
|
-
* @internal - Used to calculate if update should be sent
|
|
2874
|
-
*/
|
|
2875
|
-
hasOriginChanged(): boolean;
|
|
2876
|
-
/**
|
|
2877
|
-
* Checks if display size has changed since last tick
|
|
2878
|
-
* @internal - Used to calculate if update should be sent
|
|
2879
|
-
*/
|
|
2880
|
-
hasSizeChanged(): boolean;
|
|
2881
|
-
/**
|
|
2882
|
-
* Checks if display has changed (origin OR size)
|
|
2883
|
-
* @internal
|
|
2884
|
-
*/
|
|
2885
|
-
hasChanged(): boolean;
|
|
2886
|
-
/**
|
|
2887
|
-
* Resets change tracking
|
|
2888
|
-
* @internal - Called by Core.endTick() after sending updates
|
|
2889
|
-
*/
|
|
2890
|
-
resetChangeTracking(): void;
|
|
2891
|
-
/**
|
|
2892
|
-
* Gets the display size
|
|
2893
|
-
*/
|
|
2894
|
-
getSize(): Vector2;
|
|
2895
|
-
/**
|
|
2896
|
-
* Sets the display size
|
|
2897
|
-
*/
|
|
2898
|
-
setSize(size: Vector2): void;
|
|
2899
|
-
/**
|
|
2900
|
-
* Returns a debug-friendly snapshot of this display (metadata only)
|
|
2901
|
-
*/
|
|
2902
|
-
getDebugInfo(): {
|
|
2903
|
-
id: number;
|
|
2904
|
-
origin: {
|
|
2905
|
-
x: number;
|
|
2906
|
-
y: number;
|
|
2907
|
-
};
|
|
2908
|
-
size: {
|
|
2909
|
-
x: number;
|
|
2910
|
-
y: number;
|
|
2911
|
-
};
|
|
2912
|
-
};
|
|
2913
|
-
}
|
|
2914
|
-
|
|
2915
2935
|
/**
|
|
2916
2936
|
* Maximum number of orders per layer (encoded as 1 byte)
|
|
2917
2937
|
* Exceeding this limit will cause packet corruption!
|
|
@@ -9328,7 +9348,7 @@ declare class UpdatePacketDecoder {
|
|
|
9328
9348
|
* Structure (NEW PROTOCOL):
|
|
9329
9349
|
* - Tick: 8 bytes (big-endian, 64-bit unsigned integer)
|
|
9330
9350
|
* - DisplayCount: 1 byte (8-bit unsigned integer, max 255 displays)
|
|
9331
|
-
* - Displays: variable (DisplayId + OriginX + OriginY + SizeX + SizeY
|
|
9351
|
+
* - Displays: variable (DisplayId + OriginX + OriginY + SizeX + SizeY + PassCount + RenderPasses)
|
|
9332
9352
|
* - LayerCount: 2 bytes (big-endian, 16-bit unsigned integer)
|
|
9333
9353
|
* - Layers: variable (encoded layers)
|
|
9334
9354
|
* - AudioOrderCount: 1 byte (max 255 audio orders)
|
|
@@ -9841,4 +9861,4 @@ declare class PostProcessOrderCollector {
|
|
|
9841
9861
|
}
|
|
9842
9862
|
|
|
9843
9863
|
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, MAX_ORDERS_PER_LAYER, MacroEngine, MacroEventType, MacroOrderType, MacroRegistry, MobileVibrateFlags, OrderBuilder, OrderType, POLYLINE_ORDER_MIN_SIZE, POSTPROCESS_SET_AMBIENT_EFFECT_SIZE, POSTPROCESS_SET_CELL_SIZE_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 };
|
|
9844
|
-
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, DisplayViewport, 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, TouchPosition, TriangleShape, UIMacroTemplate, UIState, UISubtype, UnicolorSprite, UpdateInstanceOrder, UpdatePacket, UserTickStats, VibrationOrder, WebFontConfig, WebFontLoad };
|
|
9864
|
+
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, DisplayViewport, 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, RenderPassConfig, 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, TouchPosition, TriangleShape, UIMacroTemplate, UIState, UISubtype, UnicolorSprite, UpdateInstanceOrder, UpdatePacket, UserTickStats, VibrationOrder, WebFontConfig, WebFontLoad };
|