Construct the THREE.Mesh for a Mesh node, with its shaded material.
Three things here are mesh-specific rather than copies of the sibling factories,
and each is named in docs/specs/MESH_NODE_SPEC.md:
The default blending mode is opaque, not additive (§6.3) — and it is
applied HERE, viewer-side, never stamped by the writer. A stamped
blending_mode would override an ancestor's under the nearest-setter-wins
rule, silently breaking group(blending_mode="additive") for its mesh
children.
volumetric degrades to opaque with a one-time warning (§6.3), again
viewer-side and for the same reason: the mode can arrive by INHERITANCE from an
ancestor the mesh knows nothing about at write time, so refusing the load would
make an unrelated group setting break a valid mesh.
The shading variant is decided here, once, and handed to both backends
(§6.2). It is a compile-time shader variant because a declared-but-unbound
normal attribute reads (0, 0, 0, 1) rather than "absent" — there is no
runtime value meaning "no normals". Its shading half is view-independent; its
normal_dims == displayDims half is not, so applyMeshShading re-applies
the decision per epoch from the projection's storedNormalsUsable.
Construct the
THREE.Meshfor a Mesh node, with its shaded material.Three things here are mesh-specific rather than copies of the sibling factories, and each is named in
docs/specs/MESH_NODE_SPEC.md:opaque, notadditive(§6.3) — and it is applied HERE, viewer-side, never stamped by the writer. A stampedblending_modewould override an ancestor's under the nearest-setter-wins rule, silently breakinggroup(blending_mode="additive")for its mesh children.volumetricdegrades toopaquewith a one-time warning (§6.3), again viewer-side and for the same reason: the mode can arrive by INHERITANCE from an ancestor the mesh knows nothing about at write time, so refusing the load would make an unrelated group setting break a valid mesh.normalattribute reads(0, 0, 0, 1)rather than "absent" — there is no runtime value meaning "no normals". Itsshadinghalf is view-independent; itsnormal_dims == displayDimshalf is not, so applyMeshShading re-applies the decision per epoch from the projection'sstoredNormalsUsable.