Skip to main content
Glama

MCP 3D Printer Server

MeshNormalNodeMaterial.js1.48 kB
import NodeMaterial from './NodeMaterial.js'; import { diffuseColor } from '../../nodes/core/PropertyNode.js'; import { directionToColor } from '../../nodes/utils/Packing.js'; import { materialOpacity } from '../../nodes/accessors/MaterialNode.js'; import { transformedNormalView } from '../../nodes/accessors/Normal.js'; import { float, vec4 } from '../../nodes/tsl/TSLBase.js'; import { MeshNormalMaterial } from '../MeshNormalMaterial.js'; const _defaultValues = /*@__PURE__*/ new MeshNormalMaterial(); /** * Node material version of `MeshNormalMaterial`. * * @augments NodeMaterial */ class MeshNormalNodeMaterial extends NodeMaterial { static get type() { return 'MeshNormalNodeMaterial'; } /** * Constructs a new mesh normal node material. * * @param {Object?} parameters - The configuration parameter. */ constructor( parameters ) { super(); /** * This flag can be used for type testing. * * @type {Boolean} * @readonly * @default true */ this.isMeshNormalNodeMaterial = true; this.setDefaultValues( _defaultValues ); this.setValues( parameters ); } /** * Overwrites the default implementation by computing the diffuse color * based on the normal data. */ setupDiffuseColor() { const opacityNode = this.opacityNode ? float( this.opacityNode ) : materialOpacity; diffuseColor.assign( vec4( directionToColor( transformedNormalView ), opacityNode ) ); } } export default MeshNormalNodeMaterial;

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/DMontgomery40/mcp-3D-printer-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server