@joy-ride/joy-ride 0.8.0 → 0.9.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/README.md +4 -2
- package/npm/bookmarklet.d.ts +2 -2
- package/npm/bookmarklet.js +1 -1
- package/npm/embed-chunks/{Documentation-COD3aHk0.js → Documentation-DBOvw4Ij.js} +2 -2
- package/npm/embed-chunks/bookmarklet-C3K26Y7k.js +12 -0
- package/npm/embed-chunks/{src-Dk3uJEXq.js → src-DYSy-EVA.js} +12 -12
- package/npm/embed-chunks/{vehicle-popover-BOloRPP9.js → vehicle-popover-DJ2SKhyg.js} +3 -3
- package/npm/embed.js +1 -1
- package/npm/index.d.ts +21 -9
- package/npm/index.js +1 -1
- package/npm/{playground-y4NLx1mF.d.ts → playground-BNQUTNXc.d.ts} +9 -9
- package/package.json +1 -1
- package/npm/embed-chunks/bookmarklet-DiJXCaH2.js +0 -20
package/npm/embed.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./embed-chunks/src-
|
|
1
|
+
import{t as e}from"./embed-chunks/src-DYSy-EVA.js";function t(t){let n=t.getAttribute(`data-jr-mount`);if(n===`false`||n===null&&!t.hasAttribute(`data-jr-mount-preset`))return null;let r=!n||n===`true`?{}:JSON.parse(n);if(!r||typeof r!=`object`||Array.isArray(r))throw TypeError(`data-jr-mount must be true or a JSON object`);let i=t.getAttribute(`data-jr-mount-preset`);return i?e.getPreset(i,r):r}if(typeof window<`u`){window.JoyRide=e;let n=document.querySelector(`script[data-jr-mount], script[data-jr-mount-preset]`);if(n){let r=()=>{try{let r=t(n);r&&!e.active&&e.mount(r)}catch(e){console.error(`Joy Ride could not mount from script attributes`,e)}};document.readyState===`loading`?document.addEventListener(`DOMContentLoaded`,r,{once:!0}):queueMicrotask(r)}}var n=e;export{n as default,t as parseScriptMountOptions};
|
package/npm/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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-
|
|
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-BNQUTNXc.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;
|
|
@@ -1098,13 +1098,17 @@ type LiquidElementProfile = {
|
|
|
1098
1098
|
deformation: number;
|
|
1099
1099
|
distanceM: number;
|
|
1100
1100
|
};
|
|
1101
|
-
type
|
|
1101
|
+
type LiquidSplatterDrop = {
|
|
1102
1102
|
point: Vec2;
|
|
1103
1103
|
radius: number;
|
|
1104
1104
|
color: LiquidColor;
|
|
1105
1105
|
opacity: number;
|
|
1106
|
+
angle: number;
|
|
1107
|
+
angularity: number;
|
|
1108
|
+
seed: number;
|
|
1106
1109
|
age: number;
|
|
1107
1110
|
};
|
|
1111
|
+
type Droplet = LiquidSplatterDrop;
|
|
1108
1112
|
type Bounds = {
|
|
1109
1113
|
left: number;
|
|
1110
1114
|
top: number;
|
|
@@ -1125,6 +1129,10 @@ type LiquidShapeState = {
|
|
|
1125
1129
|
spring: Float32Array;
|
|
1126
1130
|
velocity: Float32Array;
|
|
1127
1131
|
drops: Droplet[];
|
|
1132
|
+
splatterRemainder: number;
|
|
1133
|
+
splatterBounds: Bounds | null;
|
|
1134
|
+
splatterImage: HTMLCanvasElement | null;
|
|
1135
|
+
drawnDrops: number;
|
|
1128
1136
|
color: LiquidColor;
|
|
1129
1137
|
dispose: () => void;
|
|
1130
1138
|
};
|
|
@@ -1137,7 +1145,9 @@ declare class LiquidShapeField {
|
|
|
1137
1145
|
readonly canvas: HTMLCanvasElement;
|
|
1138
1146
|
private splatterCanvas;
|
|
1139
1147
|
private splatterBounds;
|
|
1140
|
-
private
|
|
1148
|
+
private drawnDrops;
|
|
1149
|
+
private readonly transientSpray;
|
|
1150
|
+
private transientDirty;
|
|
1141
1151
|
readonly material: {
|
|
1142
1152
|
thickness: number;
|
|
1143
1153
|
deformation: number;
|
|
@@ -1152,6 +1162,7 @@ declare class LiquidShapeField {
|
|
|
1152
1162
|
private spring;
|
|
1153
1163
|
private velocity;
|
|
1154
1164
|
private drops;
|
|
1165
|
+
private splatterRemainder;
|
|
1155
1166
|
private burnDecay;
|
|
1156
1167
|
private revision;
|
|
1157
1168
|
private pulled;
|
|
@@ -2278,6 +2289,7 @@ type SceneState = {
|
|
|
2278
2289
|
weaponCooldownEnabled: boolean;
|
|
2279
2290
|
vehicleDestructible: boolean;
|
|
2280
2291
|
weaponsEnabled: boolean;
|
|
2292
|
+
toolsEnabled: boolean;
|
|
2281
2293
|
enabledTools: VehicleTool[];
|
|
2282
2294
|
slowMo: ReturnType<SlowMo['captureState']>;
|
|
2283
2295
|
renderer: ReturnType<Renderer['captureState']>;
|
|
@@ -2361,10 +2373,12 @@ declare class GameWorld {
|
|
|
2361
2373
|
private weaponCooldownEnabled;
|
|
2362
2374
|
private vehicleDestructible;
|
|
2363
2375
|
private weaponsEnabled;
|
|
2376
|
+
private toolsEnabled;
|
|
2364
2377
|
private enabledTools;
|
|
2365
2378
|
setEnabledTools(tools: readonly VehicleTool[]): void;
|
|
2366
2379
|
setVehicleDestructible(enabled: boolean): void;
|
|
2367
2380
|
setWeaponsEnabled(enabled: boolean): void;
|
|
2381
|
+
setToolsEnabled(enabled: boolean): void;
|
|
2368
2382
|
setWeaponCooldownEnabled(enabled: boolean): void;
|
|
2369
2383
|
setDeformationEnabled(enabled: boolean): void;
|
|
2370
2384
|
spawnVehicle({ id, sim, control, label }: VehicleSpawn): VehicleEntity;
|
|
@@ -2690,14 +2704,12 @@ type EmbedController = {
|
|
|
2690
2704
|
stopPlayback: () => void;
|
|
2691
2705
|
};
|
|
2692
2706
|
declare function mount(input?: EmbedOptions | PlaygroundConfiguration): EmbedController;
|
|
2707
|
+
/** Return ordinary mount options. Overrides win within each runtime group. */
|
|
2708
|
+
declare function getPreset(id: string, overrides?: EmbedOptions): EmbedOptions;
|
|
2693
2709
|
/** Keep the runtime API available as the default export for bundled hosts. */
|
|
2694
2710
|
declare const api: {
|
|
2695
2711
|
mount: typeof mount;
|
|
2696
|
-
|
|
2697
|
-
presets: {
|
|
2698
|
-
sfw(overrides?: EmbedOptions): EmbedOptions;
|
|
2699
|
-
};
|
|
2700
|
-
};
|
|
2712
|
+
getPreset: typeof getPreset;
|
|
2701
2713
|
vehicleTools: readonly VehicleToolDefinition[];
|
|
2702
2714
|
availableVehicleTools: typeof availableVehicleTools;
|
|
2703
2715
|
overlayLayers: {
|
|
@@ -2712,7 +2724,7 @@ declare const api: {
|
|
|
2712
2724
|
readonly active: EmbedController | undefined;
|
|
2713
2725
|
listPresets: typeof listVehiclePresets;
|
|
2714
2726
|
listVehicleOptions: typeof listVehicleOptions;
|
|
2715
|
-
|
|
2727
|
+
getVehiclePreset: typeof getVehiclePreset;
|
|
2716
2728
|
keyboardControls: readonly [{
|
|
2717
2729
|
readonly id: "accelerate";
|
|
2718
2730
|
readonly label: "Accelerate";
|
package/npm/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{t as default}from"./embed-chunks/src-
|
|
1
|
+
export{t as default}from"./embed-chunks/src-DYSy-EVA.js";
|
|
@@ -559,22 +559,21 @@ type VehicleTool = VehicleSlot['action'];
|
|
|
559
559
|
type VehicleToolPolicy = {
|
|
560
560
|
enabledTools?: readonly VehicleTool[];
|
|
561
561
|
weaponsEnabled?: boolean;
|
|
562
|
+
toolsEnabled?: boolean;
|
|
562
563
|
};
|
|
563
564
|
type VehicleToolDefinition = {
|
|
564
565
|
id: VehicleTool;
|
|
565
566
|
label: string;
|
|
566
567
|
keys: readonly string[];
|
|
567
568
|
description: string;
|
|
568
|
-
sfw: boolean;
|
|
569
569
|
/** Used by the existing weaponsEnabled master switch. */
|
|
570
570
|
weapon: boolean;
|
|
571
571
|
};
|
|
572
|
-
declare function availableVehicleTools(enabledTools: readonly VehicleTool[], weaponsEnabled?: boolean, slots?: Readonly<VehicleSlots
|
|
572
|
+
declare function availableVehicleTools(enabledTools: readonly VehicleTool[], weaponsEnabled?: boolean, slots?: Readonly<VehicleSlots>, toolsEnabled?: boolean): {
|
|
573
573
|
keys: string[];
|
|
574
574
|
id: VehicleTool;
|
|
575
575
|
label: string;
|
|
576
576
|
description: string;
|
|
577
|
-
sfw: boolean;
|
|
578
577
|
/** Used by the existing weaponsEnabled master switch. */
|
|
579
578
|
weapon: boolean;
|
|
580
579
|
}[];
|
|
@@ -962,20 +961,19 @@ type WorkModeSettings = {
|
|
|
962
961
|
showHud: boolean;
|
|
963
962
|
showHealthBars: boolean;
|
|
964
963
|
showWeaponBar: boolean;
|
|
964
|
+
showVehicleNames: boolean;
|
|
965
965
|
showLogo: boolean;
|
|
966
966
|
showGithub: boolean;
|
|
967
967
|
allowVehicleEditing: boolean;
|
|
968
968
|
vehicleTabs: readonly WorkModeTab[];
|
|
969
969
|
vehicleDestructible: boolean;
|
|
970
970
|
weaponsEnabled: boolean;
|
|
971
|
+
toolsEnabled: boolean;
|
|
971
972
|
enabledTools: readonly VehicleTool[];
|
|
972
973
|
brandColor?: string;
|
|
973
974
|
brandName?: string;
|
|
974
975
|
};
|
|
975
|
-
type WorkModeOptions = Partial<WorkModeSettings
|
|
976
|
-
/** Passive, unbranded defaults for embedding on a workplace website. */
|
|
977
|
-
sfw?: boolean;
|
|
978
|
-
};
|
|
976
|
+
type WorkModeOptions = Partial<WorkModeSettings>;
|
|
979
977
|
type WorkModeConfiguration = Partial<WorkModeSettings> & {
|
|
980
978
|
workMode?: WorkModeOptions;
|
|
981
979
|
};
|
|
@@ -994,6 +992,7 @@ type DriveSettings = {
|
|
|
994
992
|
showTotalPoints: boolean;
|
|
995
993
|
showHealthBars: boolean;
|
|
996
994
|
showVehicleMarkers: boolean;
|
|
995
|
+
showVehicleNames: boolean;
|
|
997
996
|
showWeaponBar: boolean;
|
|
998
997
|
showLogo: boolean;
|
|
999
998
|
showGithub: boolean;
|
|
@@ -1009,13 +1008,14 @@ type DriveSettings = {
|
|
|
1009
1008
|
speedZoom: SpeedZoomMode;
|
|
1010
1009
|
vehicleDestructible?: boolean;
|
|
1011
1010
|
weaponsEnabled?: boolean;
|
|
1011
|
+
toolsEnabled?: boolean;
|
|
1012
1012
|
enabledTools?: readonly VehicleTool[];
|
|
1013
1013
|
};
|
|
1014
1014
|
type RuntimeOptions = {
|
|
1015
1015
|
audio: Pick<DriveSettings, 'masterVolume' | 'idleSound'>;
|
|
1016
1016
|
rendering: Pick<DriveSettings, 'quality' | 'smokeTint' | 'sparks' | 'deform' | 'screenShake' | 'surfaceTone' | 'debug'>;
|
|
1017
|
-
policy: Pick<DriveSettings, 'weaponCooldown' | 'vehicleDestructible' | 'weaponsEnabled' | 'enabledTools' | 'rocketBlastStrength'>;
|
|
1018
|
-
ui: Pick<DriveSettings, 'showHud' | 'showTotalPoints' | 'showHealthBars' | 'showVehicleMarkers' | 'showWeaponBar' | 'showLogo' | 'showGithub' | 'allowVehicleEditing' | 'vehicleTabs' | 'brandColor' | 'brandName'>;
|
|
1017
|
+
policy: Pick<DriveSettings, 'weaponCooldown' | 'vehicleDestructible' | 'weaponsEnabled' | 'toolsEnabled' | 'enabledTools' | 'rocketBlastStrength'>;
|
|
1018
|
+
ui: Pick<DriveSettings, 'showHud' | 'showTotalPoints' | 'showHealthBars' | 'showVehicleMarkers' | 'showVehicleNames' | 'showWeaponBar' | 'showLogo' | 'showGithub' | 'allowVehicleEditing' | 'vehicleTabs' | 'brandColor' | 'brandName'>;
|
|
1019
1019
|
camera: Pick<DriveSettings, 'viewportWalls' | 'viewportMode' | 'speedZoom'>;
|
|
1020
1020
|
lighting: VehicleLightingOptions;
|
|
1021
1021
|
autoPaint: boolean;
|
package/package.json
CHANGED