MCPcopy Create free account
hub / github.com/CNCKitchen/stlTexturizer / createPreviewMaterial

Function createPreviewMaterial

js/previewMaterial.js:413–421  ·  view source on GitHub ↗
(displacementTexture, settings)

Source from the content-addressed store, hash-verified

411 // Blend: 100% mask colour at the boundary, fading to 0% at falloff distance
412 vec3 color = mix(litTeal, litMask, maskEffect);
413
414 gl_FragColor = vec4(color, 1.0);
415 }
416`;
417
418// ── Public API ────────────────────────────────────────────────────────────────
419
420/**
421 * Create a ShaderMaterial for the displacement preview.
422 * @param {THREE.Texture|null} displacementTexture
423 * @param {object} settings – { mappingMode, scaleU, scaleV, amplitude, offsetU, offsetV, bounds }
424 */

Callers 2

updatePreviewFunction · 0.90

Calls 1

buildUniformsFunction · 0.85

Tested by

no test coverage detected