@holtjs/stage 0.14.0 → 0.15.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/CHANGELOG.md +14 -0
- package/README.md +1 -1
- package/dist/{game-BF1ZbJRC.js → game-CFxS641c.js} +56 -8
- package/dist/{game-rKghsNlA.d.ts → game-Ce35GTH4.d.ts} +65 -18
- package/dist/headless.d.ts +35 -19
- package/dist/headless.js +1031 -33
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/joystick.d.ts +1 -1
- package/dist/kernel.d.ts +1 -1
- package/dist/lighting.d.ts +4 -2
- package/dist/lighting.js +17 -11
- package/dist/projection.d.ts +3 -1
- package/dist/projection.js +7 -0
- package/dist/{renderer-webgpu-CnIevdNP.js → renderer-webgpu-q4vdE3kA.js} +73 -1
- package/dist/renderer-webgpu.d.ts +1 -1
- package/dist/renderer-webgpu.js +1 -1
- package/dist/rig2d.d.ts +1 -1
- package/dist/tilemap.d.ts +2 -2
- package/dist/tilemap.js +228 -69
- package/dist/trace.d.ts +1 -1
- package/dist/world.d.ts +1 -1
- package/llms.txt +1 -1
- package/package.json +1 -1
- package/skills/stage/SKILL.md +1 -1
- package/skills/stage/references/subpaths.md +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $n as
|
|
1
|
+
import { $n as Camera, $t as HeadlessWebGpuOptions, A as createInputRecorder, An as Graphics, At as SceneDigestNode, Bn as RectClipMask, Bt as InputPlugin, C as RecordedInputEntry, Cn as DisplayObjectType, D as TimelineClickOptions, Dn as DrawStreamOptions, Dt as SceneDigest, E as StagePlugin, En as DrawStreamObject, Fn as MsdfIconObject, Ft as SceneDigestSurfaceSource, Gn as ShapeBatchStyleDefaults, Gt as RendererWebGpuOptions, Hn as SceneHostLike, Ht as Pointer, In as NineSliceObject, It as SceneDigestSurfaces, Jn as SpritePlayOptions, Jt as WebGpuCanvasContextLike, Kn as SpriteAnimEventListener, Kt as RequestWebGpuOptions, Ln as PanelObject, Lt as buildSceneDigest, M as createInputTimeline, Mn as InstancedBatchObject, Mt as SceneDigestOverlayStats, Nn as InstancedColumns, Nt as SceneDigestSandbox, O as TimelineDragOptions, On as DrawStreamSpriteOptions, Ot as SceneDigestActiveFocus, Pn as MsdfIconConfig, Pt as SceneDigestSurfaceEntry, Qn as TileSpriteObject, Qt as HeadlessWebGpuHandle, Rn as PanelOpenSide, Rt as sanitizeTrackToken, S as InputTimelinePlugin, Sn as DisplayObject, T as StageKernel, Tn as DrawStreamBulkView, Un as ShapeBatchColumns, Ut as PointerSample, Vn as RectangleObject, Vt as KeyboardPlugin, Wn as ShapeBatchObject, Wt as RendererWebGpu, Xn as TextObject, Xt as requestWebGpuDevice, Yn as SyncAttachmentOptions, Yt as WebGpuDeviceLike, Zn as TextStyleConfig, Zt as HeadlessWebGpuBackend, _ as ActionMap, _n as CustomPassCallback, a as GameLoop, an as Renderer2D, b as InputTargetSpec, bn as DirectionalPlayOptions, c as LoaderPlugin, cn as RendererStats, d as SceneCtor, dn as AnchorPose2D, en as OpenDawnWebGpuOptions, er as CameraFollowOptions, f as SceneInput, fn as BindEquipmentOptions, g as ViewportFitResult, gn as ContainerFiltersShim, h as StageRenderer, hn as Container, i as GameConfig$1, in as requestHeadlessWebGpu, j as createInputReplay, jn as ImageObject, jt as SceneDigestOptions, k as TimelineKeyOptions, kn as EquipmentBinding, kt as SceneDigestEngineSandbox, l as ScaleManager, ln as Stage2DCustomImageHandler, m as SceneManager, mn as Bob$1, n as EngineClockSnapshot, nn as openDawnWebGpu, nr as HiDpiScaleLike, o as GameObjectFactory, on as RendererGl, p as SceneLifecycleStats, pn as BlitterObject, qn as SpriteObject, qt as WebGpuBootstrapResult, r as Game, rn as openWgpuNativeFfi, s as JsonCache, sn as RendererGlOptions, t as EngineClock, tn as OpenWgpuNativeFfiOptions, tr as HiDpiConfigureOptions, u as Scene, un as StageRenderTarget, v as InputProvider, vn as CustomPassObject, w as StageInputEvent, wn as DisplaySemantics, x as InputTimelineOptions, xn as DisplayList, y as InputRecorderPlugin, yn as CustomPassOptions, zn as PanelStyleConfig, zt as InputConfig } from "./game-Ce35GTH4.js";
|
|
2
2
|
import { A as FilterModeValue, B as WEBGL, C as AUTO, D as CANVAS, E as BlendModes, F as Scale, G as packColorAbgr, H as WHITE_RGB, I as ScaleMode, K as parseColor, L as Scenes, M as Matrix2D, N as Rect2D, O as EventEmitter, P as RgbaColor, R as TintMode, S as TextureSource, T as BlendMode, U as WorldView2D, V as WEBGPU, W as createMatrix2D, _ as SpriteSheetConfig, a as AtlasClipRule, b as TextureImageSource, c as GenerateFrameNamesConfig, d as AtlasJsonLike, f as CanvasTexture, g as GlTextureHost, h as FrameExtraMeta, i as AtlasAutoAnimOptions, j as HEX_MASK, k as FilterMode, l as GenerateFrameNumbersConfig, m as FrameAnchorTuple, n as AnimationFrameInput, o as CompiledAnimationFrame, p as Frame, q as rgbToCss, r as AnimationManager, s as DirectionalAnimGroup, t as AnimationConfig, u as StageAnimation, v as Texture, w as BLACK_RGB, x as TextureManager, y as TextureImageOptions, z as TintModes } from "./anims-BOvaKn6w.js";
|
|
3
3
|
import { FlattenedFlexNode, FlattenedFlexTree, FlexAlign, FlexContainerSpec, FlexDir, FlexIconSpec, FlexItemRect, FlexItemSpec, FlexJustify, FlexNodeSpec, FlexPadding, FlexPanelStyle, FlexResult, FlexTextSpec, MountFlexUiOptions, MountedFlexUi, WrapContainerSpec, WrapItemRect, WrapItemSpec, WrapJustify, WrapResult, computeFlexLayout, computeWrapLayout, flattenFlexTree, mountFlexUi, resolvePadding } from "./flex.js";
|
|
4
4
|
import { a as SpringHandle, c as TweenManager, i as Easings, l as TweenOptions, n as EasingFn, o as SpringOptions, r as EasingName, s as TweenHandle, t as DisposableOwner, u as TweenStats } from "./tween-BiF1FUvc.js";
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { _ as rgbToCss, a as EventEmitter, c as Scale, d as WEBGL, f as WEBGPU, g as parseColor, h as packColorAbgr, i as CANVAS, l as Scenes, m as createMatrix2D, n as BLACK_RGB, o as FilterMode, p as WHITE_RGB, r as BlendModes, s as HEX_MASK, t as AUTO, u as TintModes } from "./types-CXsCvp1p.js";
|
|
2
|
-
import { _ as CanvasTexture, a as JsonCache, b as TextureManager, c as Scene, d as KeyboardPlugin, f as Pointer, g as SdfPanelBatcher, h as MsdfIconBatcher, i as GameObjectFactory, l as SceneManager, m as PixelAaBatcher, n as Game, o as LoaderPlugin, p as RendererGl, r as GameLoop, s as ScaleManager, t as EngineClock, u as InputPlugin, v as Frame, x as TextureSource, y as Texture } from "./game-
|
|
2
|
+
import { _ as CanvasTexture, a as JsonCache, b as TextureManager, c as Scene, d as KeyboardPlugin, f as Pointer, g as SdfPanelBatcher, h as MsdfIconBatcher, i as GameObjectFactory, l as SceneManager, m as PixelAaBatcher, n as Game, o as LoaderPlugin, p as RendererGl, r as GameLoop, s as ScaleManager, t as EngineClock, u as InputPlugin, v as Frame, x as TextureSource, y as Texture } from "./game-CFxS641c.js";
|
|
3
3
|
import { AnimationManager } from "./anims.js";
|
|
4
|
-
import { a as requestHeadlessWebGpu, i as openWgpuNativeFfi, n as requestWebGpuDevice, o as Renderer2D, r as openDawnWebGpu, s as Camera, t as RendererWebGpu } from "./renderer-webgpu-
|
|
4
|
+
import { a as requestHeadlessWebGpu, i as openWgpuNativeFfi, n as requestWebGpuDevice, o as Renderer2D, r as openDawnWebGpu, s as Camera, t as RendererWebGpu } from "./renderer-webgpu-q4vdE3kA.js";
|
|
5
5
|
import { _ as TileSpriteObject, a as DisplayObject, c as ImageObject, d as NineSliceObject, f as PanelObject, g as TextObject, h as SpriteObject, i as DisplayList, l as InstancedBatchObject, m as ShapeBatchObject, n as Container, o as DrawStreamObject, p as RectangleObject, r as CustomPassObject, s as Graphics, t as BlitterObject, u as MsdfIconObject } from "./display-CVjvA8ZO.js";
|
|
6
6
|
import { ActionMap, StageKernel, createInputRecorder, createInputReplay, createInputTimeline } from "./kernel.js";
|
|
7
7
|
import { buildSceneDigest, sanitizeTrackToken } from "./trace.js";
|
package/dist/joystick.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Ht as Pointer, Ln as PanelObject, hn as Container, u as Scene } from "./game-Ce35GTH4.js";
|
|
2
2
|
export type VirtualJoystickMode = 'floating' | 'fixed';
|
|
3
3
|
export interface JoystickVector {
|
|
4
4
|
/** Normalized X axis in [-1, 1] after deadzone remapping. */
|
package/dist/kernel.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { a as ScriptOptions, i as ScriptHandle, o as ScriptScheduler, r as ScriptContext, s as ScriptStats, t as CoroutineGenerator } from "./coroutine-DLgJumtD.js";
|
|
2
|
-
import { A as createInputRecorder, C as RecordedInputEntry, D as TimelineClickOptions, E as StagePlugin, M as createInputTimeline, O as TimelineDragOptions, S as InputTimelinePlugin, T as StageKernel, _ as ActionMap, b as InputTargetSpec, j as createInputReplay, k as TimelineKeyOptions, v as InputProvider, w as StageInputEvent, x as InputTimelineOptions, y as InputRecorderPlugin } from "./game-
|
|
2
|
+
import { A as createInputRecorder, C as RecordedInputEntry, D as TimelineClickOptions, E as StagePlugin, M as createInputTimeline, O as TimelineDragOptions, S as InputTimelinePlugin, T as StageKernel, _ as ActionMap, b as InputTargetSpec, j as createInputReplay, k as TimelineKeyOptions, v as InputProvider, w as StageInputEvent, x as InputTimelineOptions, y as InputRecorderPlugin } from "./game-Ce35GTH4.js";
|
|
3
3
|
export { ActionMap, type CoroutineGenerator, InputProvider, InputRecorderPlugin, InputTargetSpec, InputTimelineOptions, InputTimelinePlugin, RecordedInputEntry, type ScriptContext, type ScriptHandle, type ScriptOptions, ScriptScheduler, type ScriptStats, StageInputEvent, StageKernel, StagePlugin, TimelineClickOptions, TimelineDragOptions, TimelineKeyOptions, createInputRecorder, createInputReplay, createInputTimeline };
|
package/dist/lighting.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Hn as SceneHostLike, Sn as DisplayObject, hn as Container, jn as ImageObject, un as StageRenderTarget, vn as CustomPassObject } from "./game-Ce35GTH4.js";
|
|
2
2
|
export type DayPhase = 'day' | 'dusk' | 'night';
|
|
3
3
|
export interface DayNightConfig {
|
|
4
4
|
dayLengthMs?: number;
|
|
@@ -112,7 +112,9 @@ export declare class Lighting2DSystem {
|
|
|
112
112
|
readonly overlayImage: ImageObject;
|
|
113
113
|
/** Screen-space `BlendModes.ADD` container right above `overlayImage` so emissive flames/eyes shine crisp in pitch-black night! */
|
|
114
114
|
readonly emissiveLayer: Container;
|
|
115
|
-
|
|
115
|
+
renderTarget: StageRenderTarget;
|
|
116
|
+
private readonly baseRtKey;
|
|
117
|
+
private resizeSeq;
|
|
116
118
|
private readonly lightGraphics;
|
|
117
119
|
private glowBatch;
|
|
118
120
|
private glowCap;
|
package/dist/lighting.js
CHANGED
|
@@ -345,6 +345,8 @@ var Lighting2DSystem = class {
|
|
|
345
345
|
/** Screen-space `BlendModes.ADD` container right above `overlayImage` so emissive flames/eyes shine crisp in pitch-black night! */
|
|
346
346
|
emissiveLayer;
|
|
347
347
|
renderTarget;
|
|
348
|
+
baseRtKey;
|
|
349
|
+
resizeSeq = 0;
|
|
348
350
|
lightGraphics;
|
|
349
351
|
glowBatch = null;
|
|
350
352
|
glowCap = 128;
|
|
@@ -380,6 +382,7 @@ var Lighting2DSystem = class {
|
|
|
380
382
|
this.viewportW = Math.max(1, Math.round(opts.width));
|
|
381
383
|
this.viewportH = Math.max(1, Math.round(opts.height));
|
|
382
384
|
const rtKey = opts.key ?? `__stage_lightmap_${Math.random().toString(36).slice(2, 8)}`;
|
|
385
|
+
this.baseRtKey = rtKey;
|
|
383
386
|
const rtW = Math.max(2, Math.round(this.viewportW * this.resScale));
|
|
384
387
|
const rtH = Math.max(2, Math.round(this.viewportH * this.resScale));
|
|
385
388
|
const rtHost = scene.renderer;
|
|
@@ -507,17 +510,20 @@ var Lighting2DSystem = class {
|
|
|
507
510
|
this.manualAmbientRgb = rgb;
|
|
508
511
|
}
|
|
509
512
|
resize(width, height) {
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
const
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
513
|
+
const nextW = Math.max(1, Math.round(width));
|
|
514
|
+
const nextH = Math.max(1, Math.round(height));
|
|
515
|
+
this.viewportW = nextW;
|
|
516
|
+
this.viewportH = nextH;
|
|
517
|
+
const rtW = Math.max(2, Math.round(nextW * this.resScale));
|
|
518
|
+
const rtH = Math.max(2, Math.round(nextH * this.resScale));
|
|
519
|
+
if (rtW !== this.renderTarget.width || rtH !== this.renderTarget.height) {
|
|
520
|
+
this.renderTarget.destroy();
|
|
521
|
+
const newKey = `${this.baseRtKey}_r${++this.resizeSeq}`;
|
|
522
|
+
const rtHost = this.scene.renderer;
|
|
523
|
+
this.renderTarget = rtHost.createRenderTarget(newKey, rtW, rtH, this.scene.textures, FilterMode.LINEAR);
|
|
524
|
+
this.overlayImage.setTexture(newKey);
|
|
525
|
+
}
|
|
526
|
+
this.overlayImage.setDisplaySize(nextW, nextH);
|
|
521
527
|
}
|
|
522
528
|
syncEmissiveBindings() {
|
|
523
529
|
let idx = 0;
|
package/dist/projection.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Hn as SceneHostLike, Sn as DisplayObject, hn as Container } from "./game-Ce35GTH4.js";
|
|
2
2
|
export interface Camera25DConfig {
|
|
3
3
|
viewportWidth: number;
|
|
4
4
|
viewportHeight: number;
|
|
@@ -130,6 +130,8 @@ export interface MountStage25DOptions {
|
|
|
130
130
|
trackId?: string;
|
|
131
131
|
/** Enable real-time oblique sun-cast silhouette shadows (`true` or `Shadow25DConfig`). */
|
|
132
132
|
shadows?: boolean | Shadow25DConfig;
|
|
133
|
+
/** Automatically sync `camera.resize(w, h)` whenever `scene.scale` emits `'resize'` (`default = true`). */
|
|
134
|
+
autoResize?: boolean;
|
|
133
135
|
}
|
|
134
136
|
export interface Stage25DRig {
|
|
135
137
|
readonly camera: Camera25D;
|
package/dist/projection.js
CHANGED
|
@@ -402,6 +402,12 @@ function mountStage25D(scene, camera, opts = {}) {
|
|
|
402
402
|
}
|
|
403
403
|
};
|
|
404
404
|
sync();
|
|
405
|
+
const scaleBus = scene.scale;
|
|
406
|
+
const onScaleResize = opts.autoResize !== false && scaleBus && typeof scaleBus.on === "function" ? (size) => {
|
|
407
|
+
camera.resize(size.width, size.height);
|
|
408
|
+
sync();
|
|
409
|
+
} : null;
|
|
410
|
+
if (onScaleResize && scaleBus?.on) scaleBus.on("resize", onScaleResize);
|
|
405
411
|
return {
|
|
406
412
|
camera,
|
|
407
413
|
root,
|
|
@@ -454,6 +460,7 @@ function mountStage25D(scene, camera, opts = {}) {
|
|
|
454
460
|
sync();
|
|
455
461
|
},
|
|
456
462
|
destroy() {
|
|
463
|
+
if (onScaleResize && scaleBus?.off) scaleBus.off("resize", onScaleResize);
|
|
457
464
|
for (let i = 0; i < entries.length; i++) destroyShadowRecord(entries[i]);
|
|
458
465
|
entries.length = 0;
|
|
459
466
|
shadowMap.clear();
|
|
@@ -1669,14 +1669,24 @@ async function resolveWgpuLibPath(explicitPath) {
|
|
|
1669
1669
|
if (envPath) return String(envPath);
|
|
1670
1670
|
if (!proc) return null;
|
|
1671
1671
|
try {
|
|
1672
|
-
const [fsNs, pathNs] = await Promise.all([
|
|
1672
|
+
const [fsNs, pathNs, osNs] = await Promise.all([
|
|
1673
|
+
dynamicImport("node:fs"),
|
|
1674
|
+
dynamicImport("node:path"),
|
|
1675
|
+
dynamicImport("node:os")
|
|
1676
|
+
]);
|
|
1673
1677
|
const plat = proc.platform ?? "linux";
|
|
1674
1678
|
const libNames = plat === "darwin" ? ["libwgpu_native.dylib"] : plat === "win32" ? ["wgpu_native.dll", "libwgpu_native.dll"] : ["libwgpu_native.so"];
|
|
1675
1679
|
const cwd = typeof proc.cwd === "function" ? proc.cwd() : ".";
|
|
1680
|
+
const home = typeof osNs.homedir === "function" ? osNs.homedir() : "";
|
|
1676
1681
|
const searchDirs = [
|
|
1677
1682
|
cwd,
|
|
1678
1683
|
pathNs.join(cwd, "lib"),
|
|
1679
1684
|
pathNs.join(cwd, "native"),
|
|
1685
|
+
...home ? [
|
|
1686
|
+
pathNs.join(home, ".cache", "holt-stage", "wgpu", "lib"),
|
|
1687
|
+
pathNs.join(home, ".cache", "holt-stage", "wgpu"),
|
|
1688
|
+
pathNs.join(home, ".local", "lib")
|
|
1689
|
+
] : [],
|
|
1680
1690
|
"/usr/local/lib",
|
|
1681
1691
|
"/usr/lib",
|
|
1682
1692
|
"/opt/homebrew/lib"
|
|
@@ -1688,6 +1698,67 @@ async function resolveWgpuLibPath(explicitPath) {
|
|
|
1688
1698
|
} catch {}
|
|
1689
1699
|
return null;
|
|
1690
1700
|
}
|
|
1701
|
+
/**
|
|
1702
|
+
* On headless Linux servers without system `/usr/share/vulkan/icd.d/*.json`, automatically wire
|
|
1703
|
+
* Playwright / Chromium's bundled SwiftShader Vulkan ICD (`vk_swiftshader_icd.json`) into `VK_ICD_FILENAMES`
|
|
1704
|
+
* when the caller has not explicitly configured `VK_ICD_FILENAMES` or `VK_DRIVER_FILES`.
|
|
1705
|
+
*/
|
|
1706
|
+
async function ensureHeadlessVulkanIcd() {
|
|
1707
|
+
const proc = getProcessLike();
|
|
1708
|
+
if (!proc?.env || proc.platform !== "linux") return;
|
|
1709
|
+
if (proc.env.VK_ICD_FILENAMES || proc.env.VK_DRIVER_FILES) return;
|
|
1710
|
+
try {
|
|
1711
|
+
const [fsNs, pathNs, osNs] = await Promise.all([
|
|
1712
|
+
dynamicImport("node:fs"),
|
|
1713
|
+
dynamicImport("node:path"),
|
|
1714
|
+
dynamicImport("node:os")
|
|
1715
|
+
]);
|
|
1716
|
+
for (const dir of [
|
|
1717
|
+
"/usr/share/vulkan/icd.d",
|
|
1718
|
+
"/etc/vulkan/icd.d",
|
|
1719
|
+
"/usr/local/share/vulkan/icd.d"
|
|
1720
|
+
]) {
|
|
1721
|
+
if (!fsNs.existsSync(dir)) continue;
|
|
1722
|
+
if (fsNs.readdirSync(dir).some((f) => f.endsWith(".json"))) return;
|
|
1723
|
+
}
|
|
1724
|
+
const home = typeof osNs.homedir === "function" ? osNs.homedir() : "";
|
|
1725
|
+
const pwRoots = [proc.env.PLAYWRIGHT_BROWSERS_PATH, home ? pathNs.join(home, ".cache", "ms-playwright") : ""].filter(Boolean);
|
|
1726
|
+
for (const root of pwRoots) {
|
|
1727
|
+
if (!fsNs.existsSync(root)) continue;
|
|
1728
|
+
const entries = fsNs.readdirSync(root).sort().reverse();
|
|
1729
|
+
for (const entry of entries) {
|
|
1730
|
+
if (!entry.startsWith("chromium")) continue;
|
|
1731
|
+
for (const sub of [
|
|
1732
|
+
"chrome-linux64",
|
|
1733
|
+
"chrome-linux",
|
|
1734
|
+
"chrome-headless-shell-linux64",
|
|
1735
|
+
"chrome-headless-shell-linux"
|
|
1736
|
+
]) {
|
|
1737
|
+
const icd = pathNs.join(root, entry, sub, "vk_swiftshader_icd.json");
|
|
1738
|
+
if (fsNs.existsSync(icd)) {
|
|
1739
|
+
proc.env.VK_ICD_FILENAMES = icd;
|
|
1740
|
+
if (isBunRuntime()) try {
|
|
1741
|
+
const ffi = await dynamicImport("bun:ffi");
|
|
1742
|
+
const enc = new TextEncoder();
|
|
1743
|
+
const libc = ffi.dlopen("libc.so.6", { setenv: {
|
|
1744
|
+
args: [
|
|
1745
|
+
ffi.FFIType.ptr,
|
|
1746
|
+
ffi.FFIType.ptr,
|
|
1747
|
+
ffi.FFIType.i32
|
|
1748
|
+
],
|
|
1749
|
+
returns: ffi.FFIType.i32
|
|
1750
|
+
} });
|
|
1751
|
+
const kBuf = enc.encode("VK_ICD_FILENAMES\0");
|
|
1752
|
+
const vBuf = enc.encode(`${icd}\0`);
|
|
1753
|
+
libc.symbols.setenv(ffi.ptr(kBuf), ffi.ptr(vBuf), 0);
|
|
1754
|
+
} catch {}
|
|
1755
|
+
return;
|
|
1756
|
+
}
|
|
1757
|
+
}
|
|
1758
|
+
}
|
|
1759
|
+
}
|
|
1760
|
+
} catch {}
|
|
1761
|
+
}
|
|
1691
1762
|
const WGPUSType_ShaderSourceWGSL = 2;
|
|
1692
1763
|
const WGPUCallbackMode_AllowSpontaneous = 3;
|
|
1693
1764
|
const WGPUPowerPreference_LowPower = 1;
|
|
@@ -2992,6 +3063,7 @@ function createWgpuDeviceWrapper(drv, instance, adapter, devPtr, queuePtr) {
|
|
|
2992
3063
|
async function openWgpuNativeFfi(options = {}) {
|
|
2993
3064
|
const libPath = await resolveWgpuLibPath(options.libPath);
|
|
2994
3065
|
if (!libPath) return null;
|
|
3066
|
+
await ensureHeadlessVulkanIcd();
|
|
2995
3067
|
const wantRuntime = options.runtime ?? "auto";
|
|
2996
3068
|
const useBun = wantRuntime === "bun" || wantRuntime === "auto" && isBunRuntime();
|
|
2997
3069
|
let drv = null;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $t as
|
|
1
|
+
import { $t as HeadlessWebGpuOptions, Gt as RendererWebGpuOptions, Jt as WebGpuCanvasContextLike, Kt as RequestWebGpuOptions, Qt as HeadlessWebGpuHandle, Wt as RendererWebGpu, Xt as requestWebGpuDevice, Yt as WebGpuDeviceLike, Zt as HeadlessWebGpuBackend, en as OpenDawnWebGpuOptions, in as requestHeadlessWebGpu, nn as openDawnWebGpu, qt as WebGpuBootstrapResult, rn as openWgpuNativeFfi, tn as OpenWgpuNativeFfiOptions } from "./game-Ce35GTH4.js";
|
|
2
2
|
export { type HeadlessWebGpuBackend, type HeadlessWebGpuHandle, type HeadlessWebGpuOptions, type OpenDawnWebGpuOptions, type OpenWgpuNativeFfiOptions, RendererWebGpu, RendererWebGpuOptions, RequestWebGpuOptions, WebGpuBootstrapResult, WebGpuCanvasContextLike, WebGpuDeviceLike, openDawnWebGpu, openWgpuNativeFfi, requestHeadlessWebGpu, requestWebGpuDevice };
|
package/dist/renderer-webgpu.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as RendererWebGpu, r as openDawnWebGpu, i as openWgpuNativeFfi, a as requestHeadlessWebGpu, n as requestWebGpuDevice } from "./renderer-webgpu-
|
|
1
|
+
export { t as RendererWebGpu, r as openDawnWebGpu, i as openWgpuNativeFfi, a as requestHeadlessWebGpu, n as requestWebGpuDevice } from "./renderer-webgpu-q4vdE3kA.js";
|
package/dist/rig2d.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { T as BlendMode } from "./anims-BOvaKn6w.js";
|
|
2
|
-
import {
|
|
2
|
+
import { An as Graphics, Hn as SceneHostLike, hn as Container, jn as ImageObject } from "./game-Ce35GTH4.js";
|
|
3
3
|
export type RigCurveKind = 'linear' | 'step' | 'smoothstep' | 'outBack';
|
|
4
4
|
export interface RigBoneDef {
|
|
5
5
|
name: string;
|
package/dist/tilemap.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Ct as
|
|
2
|
-
export { BakedDualGridAtlas, ChunkGeneratorFn, ChunkedTilemap, ChunkedTilemapOptions, DualGridLayerSpec, IslandBiomeConfig, MountedChunkedTilemap, SurvivalBiomes, TileCellFlags, TileChunk, bakeDualGridTileset, computeBlob47Index, computeDualGridMask, createIslandBiomeGenerator, fbm2D, floorDiv, hash2D, mountChunkedTilemap, packChunkKey, positiveMod, unpackChunkX, unpackChunkY, valueNoise2D };
|
|
1
|
+
import { Ct as positiveMod, Et as valueNoise2D, St as packChunkKey, Tt as unpackChunkY, _t as createIslandBiomeGenerator, at as ChunkedTilemap, bt as hash2D, ct as IslandBiomeConfig, dt as SurvivalBiomes, ft as TileCellFlags, gt as computeDualGridMask, ht as computeBlob47Index, it as ChunkGeneratorFn, lt as MountChunkedTilemapOptions, mt as bakeDualGridTileset, nt as BakeDualGridTilesetOptions, ot as ChunkedTilemapOptions, pt as TileChunk, rt as BakedDualGridAtlas, st as DualGridLayerSpec, ut as MountedChunkedTilemap, vt as fbm2D, wt as unpackChunkX, xt as mountChunkedTilemap, yt as floorDiv } from "./game-Ce35GTH4.js";
|
|
2
|
+
export { BakeDualGridTilesetOptions, BakedDualGridAtlas, ChunkGeneratorFn, ChunkedTilemap, ChunkedTilemapOptions, DualGridLayerSpec, IslandBiomeConfig, MountChunkedTilemapOptions, MountedChunkedTilemap, SurvivalBiomes, TileCellFlags, TileChunk, bakeDualGridTileset, computeBlob47Index, computeDualGridMask, createIslandBiomeGenerator, fbm2D, floorDiv, hash2D, mountChunkedTilemap, packChunkKey, positiveMod, unpackChunkX, unpackChunkY, valueNoise2D };
|