Skip to content

Lane r177: threepipe on three.js r177, release candidates - #182

Draft
repalash wants to merge 22 commits into
devfrom
lane/r177
Draft

repalash wants to merge 22 commits into
devfrom
lane/r177

Conversation

@repalash

@repalash repalash commented Nov 7, 2026

Copy link
Copy Markdown
Owner

The r177 upgrade lane, kept as a draft. It builds on the r172 lane (#172) and on the fork's and types' r177 release candidates. It publishes prereleases of threepipe and the changed plugins under the npm dist-tag three-r177, and latest stays on 0.6.0.

The chain

package rc lane PR
three-modded 0.177.10001-rc.1 (on npm) repalash/three.js-modded#15
three-types-modded 0.177.10001-rc.1 (on npm) repalash/three-ts-types#10
threepipe and plugins below this PR

Commits on lane/r172

  • The four code commits of three r177 (checkpoint 2): drop upstreamed fork patches, glTF export node order, getDataURL, PixelFormat render targets #45 (the earlier r177 port), cherry-picked without conflicts. The Claude-Session lines of their messages were taken out.

    • ExtendedShaderPass.dispose() disposes the full-screen quad through super.dispose(). three r175 renamed ShaderPass.fsQuad to _fsQuad, so the quad leaked.
    • GLTFViewerConfigExtension calls ImageUtils.getDataURL( image ) without the fork's forcePng argument. r177 has getDataURL( image, type ).
    • Breaking: CreateRenderTargetOptions.format is a PixelFormat, as r177 types RenderTargetOptions.format. isPixelFormat() is added, and the composer target falls back to RGBAFormat for a compressed format.
    • LineMaterial2 anchors beforeAccumulation at #include <logdepthbuf_fragment>, since r177 moved vec4 diffuseColor = to the start of main().
  • Versions: every package with an r172 rc gets the r177 one, with publishConfig.tag: three-r177, peer ranges || >=0.7.0-r177.1, and a changelog section.

    package version
    threepipe 0.7.0-r177.1
    @threepipe/plugins-extra-importers 0.3.0-r177.1
    @threepipe/plugin-svg-renderer 0.3.0-r177.1
    @threepipe/plugin-tweakpane 0.11.0-r177.1
    @threepipe/webgi-plugins 0.8.0-r177.1
    @threepipe/plugin-annotations, @threepipe/plugin-cloud 0.1.0-r177.1

    The changelog's three.js entry is now "to v0.177.10001 (three.js r177, through r172)". It adds the fork patches that went upstream, getDataURL, the glTF parent-node order, JSON version 4.7, the PixelFormat change, LineMaterial2, and ExtendedShaderPass.

  • Lockfile: both r177 rcs from npm. As on r172, the nested upstream three that npm adds under plugins/3d-tiles-renderer is left out.

Checks on 7869012, with the published rcs

  • npm run build, npm run typecheck, npm run build-plugins (20 of 20), npm run build-examples.
  • npm run test:unit: 1019 of 1019.
  • npm run test:types: 15 of 15.
  • Types: three-types-modded rc.1 includes the colorSpace: string fix (Lane r177: release candidates of three-types-modded 0.177.10001 three-ts-types#10, e3fdb97), without which RenderTargetManager failed to type-check.
  • Not run yet: the visual check on the GPU host, which is offline.
rc commit what changed checks
0.7.0-r177.1 7869012 the r172 lane, #45's four fixes, on three-modded r177 rc.1 above


Generated by Claude Code

repalash and others added 22 commits November 5, 2026 14:38
three r169 made EXRExporter.parse() async (it reads the render target with
readRenderTargetPixelsAsync). RenderManager.exportRenderTarget() and the
callers that used it synchronously follow: AssetExporter, the render target
preview 'Download' action, the tweakpane image 'download image' action.
_withResolvedTarget releases the temporary target after a returned promise
settles. The tweakpane DataTexture download also passed the texture as the
second parse() argument, which always threw; fixed while here.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NVDeDKLWQDpkMcCQsKBGxe
three r170 made GLTFExporter fully async and renamed the plugin hook
writeMaterial to writeMaterialAsync; the old hook is silently ignored, so
every material extension would have been dropped from exports.
GLTFWriter2 overrides processObjectsAsync/processMaterialAsync/
processTextureAsync. The url-referenced-image handling in processTextureAsync
no longer mutates texture.source.data across the await (the super call can
yield to a render frame now); the writer keeps that state itself.
GLTFExporter2.parseAsync keeps returning a Blob (IExportWriter), documented
with a ts-expect-error since three now types the json as unknown.
The materials-variants writeMesh is async; three-modded awaits every hook.
The deterministic test injection patches writeAsync/processInputAsync.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NVDeDKLWQDpkMcCQsKBGxe
…neMaterial accessors

- Texture.colorSpace is a string in three (any space registered with
  ColorManagement); CreateRenderTargetOptions, getTexelDecoding,
  textureDataToImageData follow.
- DisplayP3ColorSpace left three core in r170; registered from
  three/examples/jsm/math/ColorSpaces.js so the ColorSpace ui mapping works.
- LineMaterial declares its uniform-backed properties as accessors; the ui
  decorators move onto accessor overrides.
- TextureImageData.data is an ArrayBufferView; Intersection.faceIndex may be null.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NVDeDKLWQDpkMcCQsKBGxe
three-modded and three-types-modded 0.172.10001 are the patches/r172 series of
the forks (not published yet; package-lock follows once they are).

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NVDeDKLWQDpkMcCQsKBGxe
…ort defaults of non-PBR materials

The accessor overrides register their ui entries in declaration order, so
linewidth/alphaToCoverage moved in the panel; declare them in the old order.
three r170 exports non-PBR materials with roughness 1 / metalness 0 (was 0.5/0.5),
visible in obj-to-glb which re-imports its own export.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NVDeDKLWQDpkMcCQsKBGxe
…three r171)

Since three.js r171 LDrawLoader no longer imports LDrawConditionalLineMaterial
itself and throws on files with conditional lines unless the material type is
set with setConditionalLineMaterial(). The extra-importer-plugins example threw
this as a page error at r172 and never finished; the checkpoint 1 A/B had
attributed its difference to the removed Tilt model only.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NVDeDKLWQDpkMcCQsKBGxe
…three r170)

@threepipe/webgi-plugins moved into this repo with 0.7.0 after the r172 branch
was made. three.js r170 made GLTFExporter async and no longer calls the
writeMaterial hook, so the anisotropy extension was silently left out of
exported files. Same conversion as the core plugins: writeMaterialAsync with
await processTextureAsync. The commented-out SSContactShadows exporter is
updated to the async form so it is not revived with the dead hook.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NVDeDKLWQDpkMcCQsKBGxe
…consumer-types error

The @ts-expect-error on the Blob-returning parseAsync override does not reach
the emitted declarations, so consumers with skipLibCheck: false got TS2416
(npm run test:types, 6 of 21 cases). three.js r172 types narrowed the base
result to { [key: string]: unknown }; three-types-modded keeps the r168
{ [key: string]: any }, which the override satisfies.

The known error about './textures/types' in @types/three does not occur with
the r172 types (the export is gone), so its entry is removed as the script asks.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NVDeDKLWQDpkMcCQsKBGxe
…nc (three r170 renamed processInput); its test exports with writeAsync
… without its source is decompressed for export instead of the export throwing
…sd); threepipe exports USDLoader in place of USDZLoader, as three/addons does in three-modded 0.172.10001-rc.2
…ins three and @types/three with overrides, as an app on the release candidate does; the r172 types export TextureImageData, so the known entry goes; changelog: how to install the release candidate
…spose()

three r175 renamed ShaderPass.fsQuad to _fsQuad, so this.fsQuad?.dispose?.()
became a silent no-op and the quad leaked. ShaderPass.dispose() disposes the
material and the quad.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
…ument

three r173 always returns a PNG from ImageUtils.getDataURL, and the second
parameter is the mime type since r175.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
RenderTargetOptions extends TextureParameters in the r177 types, so its format is
a PixelFormat instead of a number. Add the isPixelFormat type guard for the two
places that pass a Texture.format (AnyPixelFormat). lerp of a compressed texture
falls back to RGBAFormat instead of creating a render target with a compressed
format, which WebGL cannot render to.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
…ee r177)

three r177 (#31144) moved `vec4 diffuseColor = ` to the start of main(), which put
the beforeAccumulation marker before mainStart and before the discards. Anchoring
it at #include <logdepthbuf_fragment> keeps the r172 position.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
…dates (npm dist-tag three-r177) on three-modded and three-types-modded 0.177.10001-rc.1; changelog of the r177 changes
…pm, without a nested upstream three under plugins/3d-tiles-renderer

This branch is waiting to be deployed

1 waiting deployment
npm-publish — 78690120 Waiting Nov 7, 2026 by repalash via release / publish #23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants