Skip to content

webgl_batch_lod_bvh: blocked on an upstream packaging gap in @three.ez/batched-mesh-extensions #4

Description

@DennisSmolek

What

webgl_batch_lod_bvh is not ported (Phase 2). Two independent, stacked blockers, checked
directly against what's installed:

  1. @three.ez/batched-mesh-extensions's WebGPU build is not importable. The installed
    package (0.0.12) genuinely ships a WebGPU build on disk (build/webgpu.js,
    src/index.webgpu.js, src/patch/ExtendBatchedMeshPrototype.webgpu.js all exist) — but
    package.json's exports field maps "." to build/webgl.js/.cjs only. There's no
    "webgpu" export condition and no subpath export, so Node/Vite's exports resolution
    refuses any path not listed there. A plain import '@three.ez/batched-mesh-extensions'
    always gets the WebGL build; reaching build/webgpu.js would need a private relative
    node_modules/... import into someone else's package layout, which isn't a real fix.
    Ledgered as UPSTREAM.md brief B51 — almost certainly a publishing oversight (the source
    clearly builds both targets), not an intentional WebGL-only package.
  2. Two more dependencies aren't installed: @three.ez/simplify-geometry (generates the
    demo's 4 extra LOD levels from the base mesh) and meshoptimizer (the simplifier's
    backend). Adding them needs pnpm install, outside an agent's rules of engagement.

Also worth noting: the r185 original is itself WebGLRenderer-only despite the webgl_
prefix pattern holding — it explicitly imports the WebGL build from a CDN, i.e. even
upstream picks WebGL on purpose for this demo. A port would still be WebGPU-first per this
repo's charter, once unblocked.

Why it matters

Single-demo blocker, not site-wide — one example stays unported until the upstream
packaging gap closes. Filing so it isn't silently forgotten and so the next person doesn't
re-investigate from scratch.

Recommendation already on file

docs/REVIEW-QUEUE.md #15: (a) file an issue/PR upstream against
@three.ez/batched-mesh-extensions adding a "webgpu" export condition — cheap, and
unblocks this immediately once released; (b) in the meantime, do NOT work around it with a
relative deep import + declare module shim — that's exactly the kind of fragile,
non-portable hack AGENTS.md's "no dependency patches" rule exists to keep out. Wait for (a)
or skip the example. Not touched; no partial file on disk.

Pointer

docs/REVIEW-QUEUE.md §15 and docs/UPSTREAM.md brief B51.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions