@joy-ride/joy-ride 0.5.1 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/npm/embed.js CHANGED
@@ -1 +1 @@
1
- import{t as e}from"./embed-chunks/src-DU7ZIjrJ.js";if(typeof window<`u`&&(window.JoyRide=e,document.querySelector(`script[data-jr-auto]`))){let t=()=>{e.active||e.mount()};document.readyState===`loading`?document.addEventListener(`DOMContentLoaded`,t,{once:!0}):queueMicrotask(t)}var t=e;export{t as default};
1
+ import{t as e}from"./embed-chunks/src-CJjuUL3b.js";if(typeof window<`u`&&(window.JoyRide=e,document.querySelector(`script[data-jr-auto]`))){let t=()=>{e.active||e.mount()};document.readyState===`loading`?document.addEventListener(`DOMContentLoaded`,t,{once:!0}):queueMicrotask(t)}var t=e;export{t as default};
package/npm/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as FlamethrowerProfile, A as VehiclePatch, B as LiquidColorInput, C as DeepReadonly, D as PlaygroundDefinitions, E as PlayerConfiguration, F as DebrisKind, G as VehicleTool, H as LiquidPourOptions, I as DebrisOptions, J as availableVehicleTools, K as VehicleToolDefinition, L as DebrisParticle, M as DebrisAnchor, N as DebrisBounds, O as RouteSpec, P as DebrisHandle, Q as VehicleSlots, R as DebrisVector, S as Appearance, T as ObjectSpec, U as LiquidResidue, V as LiquidKind, W as LiquidSource, X as SlotNumber, Y as LiquidEmission, Z as VehicleSlot, _ as FluidWall, a as PlaygroundObject, at as Vec2, b as VehicleLightingOptions, c as PlaygroundConfiguration, d as RuntimeOptionsPatch, et as VehiclePreset, f as WorkModeConfiguration, g as FluidView, h as FluidQuality, i as PlaygroundDiagnostic, it as SimulationState, j as Debris, k as VehicleConfiguration, l as PortableVehicleConfiguration, m as SurfaceTone, n as PlaygroundTriggerDetail, nt as Controls, o as PlaygroundRegistry, ot as VehicleMode, p as SpeedZoomMode, q as VehicleToolPolicy, r as PlaygroundBinding, rt as Simulation, s as PlaygroundTarget, st as CombustibleStage, t as PlaygroundRouteHandle, tt as LightningWeapon, u as RuntimeOptions, v as SmokeTint, w as ObjectPatch, x as definePlayground, y as VehicleLightToggle, z as LiquidColor } from "./playground-Bo-lQHlD.js";
1
+ import { $ as VehicleSlots, A as VehicleConfiguration, B as LiquidColor, C as Appearance, D as PlayerConfiguration, E as ObjectSpec, F as DebrisHandle, G as LiquidSource, H as LiquidKind, I as DebrisKind, J as VehicleToolPolicy, K as VehicleTool, L as DebrisOptions, M as Debris, N as DebrisAnchor, O as PlaygroundDefinitions, P as DebrisBounds, Q as VehicleSlot, R as DebrisParticle, S as definePlayground, T as ObjectPatch, U as LiquidPourOptions, V as LiquidColorInput, W as LiquidResidue, X as LiquidEmission, Y as availableVehicleTools, Z as SlotNumber, _ as FluidView, a as PlaygroundObject, at as SimulationState, b as VehicleLightToggle, c as PlaygroundConfiguration, ct as CombustibleStage, d as RuntimeOptionsPatch, et as FlamethrowerProfile, f as WorkModeConfiguration, g as FluidQuality, h as SurfaceTone, i as PlaygroundDiagnostic, it as Simulation, j as VehiclePatch, k as RouteSpec, l as PortableVehicleConfiguration, m as SpeedZoomMode, n as PlaygroundTriggerDetail, nt as LightningWeapon, o as PlaygroundRegistry, ot as Vec2, p as ViewportMode, q as VehicleToolDefinition, r as PlaygroundBinding, rt as Controls, s as PlaygroundTarget, st as VehicleMode, t as PlaygroundRouteHandle, tt as VehiclePreset, u as RuntimeOptions, v as FluidWall, w as DeepReadonly, x as VehicleLightingOptions, y as SmokeTint, z as DebrisVector } from "./playground-y4NLx1mF.js";
2
2
  /** Full tuning and presentation data for a host-owned vehicle selector. */
3
3
  declare function listVehiclePresets(): VehiclePreset[];
4
4
  declare function getVehiclePreset(id: string): VehiclePreset | undefined;
@@ -1007,51 +1007,6 @@ interface HudOptions {
1007
1007
  /** @deprecated Status effects are no longer visualized. */
1008
1008
  effectSlots?: number;
1009
1009
  }
1010
- /** Named easing functions shared by the speed and camera ramps. */
1011
- type SlowMoCurve = 'linear' | 'ease-in' | 'ease-out' | 'ease-in-out';
1012
- type SlowMoOptions = {
1013
- /** Simulation seconds per real second. Greater than zero, at most one. */
1014
- speedFactor: number;
1015
- /** Real milliseconds for either entering or exiting. Zero switches immediately. */
1016
- rampMs: number;
1017
- /** Camera multiplier. Zero disables extra zoom; 1.1 zooms in ten percent. */
1018
- zoomFactor: number;
1019
- curve: SlowMoCurve;
1020
- };
1021
- type SlowMoState = {
1022
- options: SlowMoOptions;
1023
- active: boolean;
1024
- speed: number;
1025
- zoom: number;
1026
- fromSpeed: number;
1027
- fromZoom: number;
1028
- elapsed: number;
1029
- };
1030
- /** Host-owned presentation clock. advance consumes REAL seconds and returns simulation seconds.
1031
- * Updates retain their real-time cadence with smaller game-time steps; exclude pause/hidden time. */
1032
- declare class SlowMo {
1033
- private settings;
1034
- private enabled;
1035
- private speed;
1036
- private zoom;
1037
- private fromSpeed;
1038
- private fromZoom;
1039
- private elapsed;
1040
- constructor(options?: Partial<SlowMoOptions>);
1041
- get options(): Readonly<SlowMoOptions>;
1042
- get active(): boolean;
1043
- get speedFactor(): number;
1044
- get zoomFactor(): number;
1045
- configure(options: Partial<SlowMoOptions>): void;
1046
- setActive(active: boolean): void;
1047
- start(): void;
1048
- stop(): void;
1049
- private beginRamp;
1050
- advance(realSeconds: number): number;
1051
- reset(): void;
1052
- captureState(): SlowMoState;
1053
- restoreState(state: SlowMoState): void;
1054
- }
1055
1010
  /** A live piece of destructible ink that can feed GPU fire and embers. */
1056
1011
  type FireMask = {
1057
1012
  key: object;
@@ -1872,6 +1827,7 @@ declare class Renderer {
1872
1827
  setSmokeTint(tint: SmokeTint): void;
1873
1828
  setTireSmokeEnabled(enabled: boolean): void;
1874
1829
  setVehicleShadowsEnabled(enabled: boolean): void;
1830
+ setViewportMode(mode: ViewportMode): void;
1875
1831
  setGhostStyle(style: GhostStyle): void;
1876
1832
  setSparksEnabled(enabled: boolean): void;
1877
1833
  setScreenShakeEnabled(enabled: boolean): void;
@@ -1978,6 +1934,62 @@ declare class Renderer {
1978
1934
  * main-thread cost. Deterministic playback passes synthetic times; skip those. */
1979
1935
  private governFluidQuality;
1980
1936
  }
1937
+ /** A small shared stack above ordinary page content and below host menus and dialogs. */
1938
+ declare const overlayLayers: {
1939
+ readonly world: 1;
1940
+ readonly foreground: 2;
1941
+ readonly backdrop: 3;
1942
+ readonly hud: 4;
1943
+ readonly controls: 5;
1944
+ };
1945
+ type OverlayLayer = keyof typeof overlayLayers;
1946
+ /** Set --joy-ride-z-index on :root to move the entire stack together. */
1947
+ declare function overlayZIndex(layer: OverlayLayer): string;
1948
+ /** Named easing functions shared by the speed and camera ramps. */
1949
+ type SlowMoCurve = 'linear' | 'ease-in' | 'ease-out' | 'ease-in-out';
1950
+ type SlowMoOptions = {
1951
+ /** Simulation seconds per real second. Greater than zero, at most one. */
1952
+ speedFactor: number;
1953
+ /** Real milliseconds for either entering or exiting. Zero switches immediately. */
1954
+ rampMs: number;
1955
+ /** Camera multiplier. Zero disables extra zoom; 1.1 zooms in ten percent. */
1956
+ zoomFactor: number;
1957
+ curve: SlowMoCurve;
1958
+ };
1959
+ type SlowMoState = {
1960
+ options: SlowMoOptions;
1961
+ active: boolean;
1962
+ speed: number;
1963
+ zoom: number;
1964
+ fromSpeed: number;
1965
+ fromZoom: number;
1966
+ elapsed: number;
1967
+ };
1968
+ /** Host-owned presentation clock. advance consumes REAL seconds and returns simulation seconds.
1969
+ * Updates retain their real-time cadence with smaller game-time steps; exclude pause/hidden time. */
1970
+ declare class SlowMo {
1971
+ private settings;
1972
+ private enabled;
1973
+ private speed;
1974
+ private zoom;
1975
+ private fromSpeed;
1976
+ private fromZoom;
1977
+ private elapsed;
1978
+ constructor(options?: Partial<SlowMoOptions>);
1979
+ get options(): Readonly<SlowMoOptions>;
1980
+ get active(): boolean;
1981
+ get speedFactor(): number;
1982
+ get zoomFactor(): number;
1983
+ configure(options: Partial<SlowMoOptions>): void;
1984
+ setActive(active: boolean): void;
1985
+ start(): void;
1986
+ stop(): void;
1987
+ private beginRamp;
1988
+ advance(realSeconds: number): number;
1989
+ reset(): void;
1990
+ captureState(): SlowMoState;
1991
+ restoreState(state: SlowMoState): void;
1992
+ }
1981
1993
  type AttractorField = {
1982
1994
  center: Vec2;
1983
1995
  velocity: Vec2;
@@ -2397,17 +2409,6 @@ declare class GameWorld {
2397
2409
  releaseCheckpoint(checkpoint: GameCheckpoint): void;
2398
2410
  dispose(): void;
2399
2411
  }
2400
- /** Shared screen-space ordering. Foreground page UI stays below the pause menu and HUD. */
2401
- declare const overlayLayers: {
2402
- readonly world: 2147483643;
2403
- readonly foreground: 2147483644;
2404
- readonly backdrop: 2147483645;
2405
- readonly hud: 2147483646;
2406
- readonly controls: 2147483647;
2407
- };
2408
- type OverlayLayer = keyof typeof overlayLayers;
2409
- /** Set --joy-ride-z-index on :root to move the entire stack together. */
2410
- declare function overlayZIndex(layer: OverlayLayer): string;
2411
2412
  type VehicleTourState = {
2412
2413
  vehicleId: string;
2413
2414
  phase: TourSample['phase'] | 'stopped';
@@ -2516,6 +2517,7 @@ type BrowserSessionOptions = WorkModeConfiguration & {
2516
2517
  mode?: VehicleMode;
2517
2518
  readonly initialMode?: VehicleMode;
2518
2519
  readonly overlay?: boolean;
2520
+ viewportMode?: ViewportMode;
2519
2521
  viewportWalls?: boolean;
2520
2522
  speedZoom?: SpeedZoomMode;
2521
2523
  lighting?: Partial<VehicleLightingOptions>;
@@ -2699,11 +2701,11 @@ declare const api: {
2699
2701
  vehicleTools: readonly VehicleToolDefinition[];
2700
2702
  availableVehicleTools: typeof availableVehicleTools;
2701
2703
  overlayLayers: {
2702
- readonly world: 2147483643;
2703
- readonly foreground: 2147483644;
2704
- readonly backdrop: 2147483645;
2705
- readonly hud: 2147483646;
2706
- readonly controls: 2147483647;
2704
+ readonly world: 1;
2705
+ readonly foreground: 2;
2706
+ readonly backdrop: 3;
2707
+ readonly hud: 4;
2708
+ readonly controls: 5;
2707
2709
  };
2708
2710
  overlayZIndex: typeof overlayZIndex;
2709
2711
  define: typeof definePlayground;
package/npm/index.js CHANGED
@@ -1 +1 @@
1
- export{t as default}from"./embed-chunks/src-DU7ZIjrJ.js";
1
+ export{t as default}from"./embed-chunks/src-CJjuUL3b.js";
@@ -954,6 +954,7 @@ type FluidWall = {
954
954
  };
955
955
  type SurfaceTone = 'auto' | 'light' | 'dark';
956
956
  type SpeedZoomMode = 'auto' | boolean;
957
+ type ViewportMode = 'fixed' | 'absolute';
957
958
  declare const workModeTabs: readonly ["vehicle", "objects", "weapons", "controls", "ai", "settings", "embed", "documentation"];
958
959
  type WorkModeTab = (typeof workModeTabs)[number];
959
960
  /** Ordinary options produced by workMode; each can also be supplied explicitly by a host. */
@@ -1004,6 +1005,7 @@ type DriveSettings = {
1004
1005
  autoPaint?: boolean;
1005
1006
  rocketBlastStrength: number;
1006
1007
  viewportWalls: boolean;
1008
+ viewportMode: ViewportMode;
1007
1009
  speedZoom: SpeedZoomMode;
1008
1010
  vehicleDestructible?: boolean;
1009
1011
  weaponsEnabled?: boolean;
@@ -1014,7 +1016,7 @@ type RuntimeOptions = {
1014
1016
  rendering: Pick<DriveSettings, 'quality' | 'smokeTint' | 'sparks' | 'deform' | 'screenShake' | 'surfaceTone' | 'debug'>;
1015
1017
  policy: Pick<DriveSettings, 'weaponCooldown' | 'vehicleDestructible' | 'weaponsEnabled' | 'enabledTools' | 'rocketBlastStrength'>;
1016
1018
  ui: Pick<DriveSettings, 'showHud' | 'showTotalPoints' | 'showHealthBars' | 'showVehicleMarkers' | 'showWeaponBar' | 'showLogo' | 'showGithub' | 'allowVehicleEditing' | 'vehicleTabs' | 'brandColor' | 'brandName'>;
1017
- camera: Pick<DriveSettings, 'viewportWalls' | 'speedZoom'>;
1019
+ camera: Pick<DriveSettings, 'viewportWalls' | 'viewportMode' | 'speedZoom'>;
1018
1020
  lighting: VehicleLightingOptions;
1019
1021
  autoPaint: boolean;
1020
1022
  };
@@ -1164,4 +1166,4 @@ type PlaygroundRouteHandle = {
1164
1166
  reset(): void;
1165
1167
  dispose(): void;
1166
1168
  };
1167
- export { FlamethrowerProfile as $, VehiclePatch as A, LiquidColorInput as B, DeepReadonly as C, PlaygroundDefinitions as D, PlayerConfiguration as E, DebrisKind as F, VehicleTool as G, LiquidPourOptions as H, DebrisOptions as I, availableVehicleTools as J, VehicleToolDefinition as K, DebrisParticle as L, DebrisAnchor as M, DebrisBounds as N, RouteSpec as O, DebrisHandle as P, VehicleSlots as Q, DebrisVector as R, Appearance as S, ObjectSpec as T, LiquidResidue as U, LiquidKind as V, LiquidSource as W, SlotNumber as X, LiquidEmission as Y, VehicleSlot as Z, FluidWall as _, PlaygroundObject as a, Vec2 as at, VehicleLightingOptions as b, PlaygroundConfiguration as c, RuntimeOptionsPatch as d, VehiclePreset as et, WorkModeConfiguration as f, FluidView as g, FluidQuality as h, PlaygroundDiagnostic as i, SimulationState as it, Debris as j, VehicleConfiguration as k, PortableVehicleConfiguration as l, SurfaceTone as m, PlaygroundTriggerDetail as n, Controls as nt, PlaygroundRegistry as o, VehicleMode as ot, SpeedZoomMode as p, VehicleToolPolicy as q, PlaygroundBinding as r, Simulation as rt, PlaygroundTarget as s, CombustibleStage as st, PlaygroundRouteHandle as t, LightningWeapon as tt, RuntimeOptions as u, SmokeTint as v, ObjectPatch as w, definePlayground as x, VehicleLightToggle as y, LiquidColor as z };
1169
+ export { VehicleSlots as $, VehicleConfiguration as A, LiquidColor as B, Appearance as C, PlayerConfiguration as D, ObjectSpec as E, DebrisHandle as F, LiquidSource as G, LiquidKind as H, DebrisKind as I, VehicleToolPolicy as J, VehicleTool as K, DebrisOptions as L, Debris as M, DebrisAnchor as N, PlaygroundDefinitions as O, DebrisBounds as P, VehicleSlot as Q, DebrisParticle as R, definePlayground as S, ObjectPatch as T, LiquidPourOptions as U, LiquidColorInput as V, LiquidResidue as W, LiquidEmission as X, availableVehicleTools as Y, SlotNumber as Z, FluidView as _, PlaygroundObject as a, SimulationState as at, VehicleLightToggle as b, PlaygroundConfiguration as c, CombustibleStage as ct, RuntimeOptionsPatch as d, FlamethrowerProfile as et, WorkModeConfiguration as f, FluidQuality as g, SurfaceTone as h, PlaygroundDiagnostic as i, Simulation as it, VehiclePatch as j, RouteSpec as k, PortableVehicleConfiguration as l, SpeedZoomMode as m, PlaygroundTriggerDetail as n, LightningWeapon as nt, PlaygroundRegistry as o, Vec2 as ot, ViewportMode as p, VehicleToolDefinition as q, PlaygroundBinding as r, Controls as rt, PlaygroundTarget as s, VehicleMode as st, PlaygroundRouteHandle as t, VehiclePreset as tt, RuntimeOptions as u, FluidWall as v, DeepReadonly as w, VehicleLightingOptions as x, SmokeTint as y, DebrisVector as z };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@joy-ride/joy-ride",
3
3
  "private": false,
4
- "version": "0.5.1",
4
+ "version": "0.7.0",
5
5
  "description": "Drive through any website with cars, tire marks, liquids, fire, and breakable artwork.",
6
6
  "type": "module",
7
7
  "repository": {