r187/three.min.js is three.js 0.187.0 as one plain script that sets window.THREE, like r128's three.min.js did,
with a compatibility layer (src/compat.js) so games written for r128 run on r187 unchanged and look the same.
r187/three-addons.min.js adds the r187 GLTFLoader and SkeletonUtils to window.THREE (load it after
three.min.js); the meshopt decoder is version-free and stays in ironveil/assets/lib/meshopt_decoder.js.
A game uses it with <script src="/lib/three/r187/three.min.js"></script> in place of the cdnjs r128 address, then
../autores.js as before. Both files are built from src/ by build.mjs (see the top of that file); the site has
no build step, this is only run to change the version or the layer. three.js is MIT licensed.
Checked by rendering the same test scene (standard, Phong, Lambert and basic materials under ambient, hemisphere, directional, point and spot lights, shadows, a texture, fog, linear and sRGB-with-ACES output) in r128 and in r187 with the layer: the average pixel difference is 1 to 3 out of 255, mostly Lambert (lit per pixel in r187, per vertex in r128) and shadow edges.
- Lighting: r128's default lighting is put back. r187 only has physically based lighting (r155 made it the
default, r165 removed the old mode), which would make every game darker or brighter. The layer edits three's
lights_pars_beginshader chunk so every light's colour is multiplied by pi, point and spot lights fade with r128's formula, andPointLight/SpotLightdefault to decay 1 again. - Colour:
ColorManagement.enabled = false(r128 had none) and the renderer starts with linear output, r128's default.renderer.outputEncoding,texture.encoding, render-targetencoding,THREE.sRGBEncodingandTHREE.LinearEncodingstill work and map to the newcolorSpacesettings. - Removed or renamed:
WebGLMultisampleRenderTarget(a render target withsamples: 4),DataTexture2DArray,DataTexture3D, the...BufferGeometrynames,PCFSoftShadowMap(r187's PCF is already soft),renderer.capabilities.isWebGL2(always true),renderer.copyFramebufferToTexture's old argument order,attribute.updateRange, theskinning/morphTargetsmaterial flags (dropped quietly), theuv2attribute (also set asuv1), and the shader chunks and varyingsencodings_fragment,encodings_pars_fragment,output_fragmentandfogDepth. - Not covered: code that edits a built-in shader by searching for text that r187 changed (for example
geometry.normal, nowgeometryNormal, or#include <lights_lambert_vertex>, gone). Those searches find nothing, so the edit silently does nothing or the shader fails to compile; fix them in the game. Check every page for shader errors in the console after moving it.
Ironwing (e63334287a3deaa3/ironwing/) and Midnight Ops (e63334287a3deaa3/ironveil/). Ironwing routes its built-in
shader edits through IVEnv.patch (ironveil/env/core.js). Midnight Ops (rebuilt) renders to its own HDR target, does
its own tone mapping, and edits MeshStandardMaterial with MO.patchStd (ironveil/js/tex.js), which only inserts
text after #include lines that r187 still has.
New games can use this file too, or load r187 as ES modules (three.module.js) without the layer and follow the
three.js skills in .claude/skills/; with the layer, write code the r128 way so lighting and colour stay consistent.
