Skip to main content
Glama

configureFresnelLayer

Configure Fresnel effect parameters including color, power, bias, and intensity for 3D materials in Spline scenes to create realistic surface reflections and lighting effects.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sceneIdYesScene ID
materialIdYesMaterial ID
layerIdYesLayer ID
colorYesFresnel color (hex, rgb, or rgba)
powerNoFresnel power
biasNoFresnel bias
intensityNoFresnel intensity

Implementation Reference

  • Handler function that configures a Fresnel layer by updating its parameters (color, power, bias, intensity) via API PUT request and returns success/error message.
    async ({ sceneId, materialId, layerId, color, power, bias, intensity }) => { try { const layerParams = { color, ...(power !== undefined && { power }), ...(bias !== undefined && { bias }), ...(intensity !== undefined && { intensity }), }; await apiClient.request('PUT', `/scenes/${sceneId}/materials/${materialId}/layers/${layerId}`, { params: layerParams }); return { content: [ { type: 'text', text: `Fresnel layer ${layerId} configured successfully` } ] }; } catch (error) { return { content: [ { type: 'text', text: `Error configuring fresnel layer: ${error.message}` } ], isError: true }; }
  • Zod input schema for the configureFresnelLayer tool, defining parameters like sceneId, materialId, layerId, color, power, bias, and intensity.
    { sceneId: z.string().min(1).describe('Scene ID'), materialId: z.string().min(1).describe('Material ID'), layerId: z.string().min(1).describe('Layer ID'), color: z.string().describe('Fresnel color (hex, rgb, or rgba)'), power: z.number().min(0).optional().default(2).describe('Fresnel power'), bias: z.number().min(0).max(1).optional().default(0).describe('Fresnel bias'), intensity: z.number().min(0).optional().default(1).describe('Fresnel intensity'), },
  • Registration of the configureFresnelLayer tool using server.tool(), including schema and handler.
    server.tool( 'configureFresnelLayer', { sceneId: z.string().min(1).describe('Scene ID'), materialId: z.string().min(1).describe('Material ID'), layerId: z.string().min(1).describe('Layer ID'), color: z.string().describe('Fresnel color (hex, rgb, or rgba)'), power: z.number().min(0).optional().default(2).describe('Fresnel power'), bias: z.number().min(0).max(1).optional().default(0).describe('Fresnel bias'), intensity: z.number().min(0).optional().default(1).describe('Fresnel intensity'), }, async ({ sceneId, materialId, layerId, color, power, bias, intensity }) => { try { const layerParams = { color, ...(power !== undefined && { power }), ...(bias !== undefined && { bias }), ...(intensity !== undefined && { intensity }), }; await apiClient.request('PUT', `/scenes/${sceneId}/materials/${materialId}/layers/${layerId}`, { params: layerParams }); return { content: [ { type: 'text', text: `Fresnel layer ${layerId} configured successfully` } ] }; } catch (error) { return { content: [ { type: 'text', text: `Error configuring fresnel layer: ${error.message}` } ], isError: true }; } } );

Latest Blog Posts

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/aydinfer/spline-mcp-server'

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