Skip to main content
Glama

PlayCanvas Editor MCP Server

Official
by playcanvas

add_components

Attach custom components like audio, camera, collision, or light to a specified entity in PlayCanvas Editor to enhance its functionality and behavior in real-time 3D applications.

Instructions

Add components to an entity

Input Schema

NameRequiredDescriptionDefault
componentsYesA dictionary that contains the components of the entity and their data.
idYesAn entity ID.

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "components": { "additionalProperties": false, "description": "A dictionary that contains the components of the entity and their data.", "properties": { "audiolistener": { "additionalProperties": false, "description": "The data for the audio listener component.", "properties": { "enabled": { "description": "Whether the component is enabled. Default: true", "type": "boolean" } }, "type": "object" }, "camera": { "additionalProperties": false, "description": "The data for the camera component.", "properties": { "clearColor": { "description": "The color used to clear the camera's render target. Default: [0.118, 0.118, 0.118, 1]", "items": [ { "description": "Red", "maximum": 1, "minimum": 0, "type": "number" }, { "description": "Green", "maximum": 1, "minimum": 0, "type": "number" }, { "description": "Blue", "maximum": 1, "minimum": 0, "type": "number" }, { "description": "Alpha", "maximum": 1, "minimum": 0, "type": "number" } ], "maxItems": 4, "minItems": 4, "type": "array" }, "clearColorBuffer": { "description": "If true, the camera will explicitly clear its render target to the chosen clear color before rendering the scene. Default: true", "type": "boolean" }, "clearDepthBuffer": { "description": "If true, the camera will explicitly clear the depth buffer of its render target before rendering the scene. Default: true", "type": "boolean" }, "enabled": { "description": "Whether the component is enabled. Default: true", "type": "boolean" }, "farClip": { "description": "The distance in camera space from the camera's eye point to the far plane. Default: 1000", "minimum": 0, "type": "number" }, "fov": { "description": "The angle (in degrees) between top and bottom clip planes of a perspective camera. Default: 45", "type": "number" }, "frustumCulling": { "description": "Controls the culling of mesh instances against the camera frustum. If true, culling is enabled. If false, all mesh instances in the scene are rendered by the camera, regardless of visibility. Default: true", "type": "boolean" }, "gammaCorrection": { "anyOf": [ { "const": 0, "description": "GAMMA_NONE", "type": "number" }, { "const": 1, "description": "GAMMA_SRGB", "type": "number" } ], "description": "The gamma correction to apply to the final color of the camera. Default: 1 (GAMMA_SRGB)" }, "layers": { "description": "An array of layer id's that this camera will render. Default: [0, 1, 2, 3, 4]", "items": { "minimum": 0, "type": "integer" }, "type": "array" }, "nearClip": { "description": "The distance in camera space from the camera's eye point to the near plane. Default: 0.1", "minimum": 0, "type": "number" }, "orthoHeight": { "description": "The distance in world units between the top and bottom clip planes of an orthographic camera. Default: 4", "type": "number" }, "priority": { "description": "A number that defines the order in which camera views are rendered by the engine. Smaller numbers are rendered first. Default: 0", "type": "number" }, "projection": { "anyOf": [ { "const": 0, "description": "PROJECTION_PERSPECTIVE", "type": "number" }, { "const": 1, "description": "PROJECTION_ORTHOGRAPHIC", "type": "number" } ], "description": "The projection type of the camera. Default: 0 (PROJECTION_PERSPECTIVE)" }, "rect": { "description": "An array of 4 numbers that represents the rectangle that specifies the viewport onto the camera's attached render target. This allows you to implement features like split-screen or picture-in-picture. It is defined by normalized coordinates (0 to 1) in the following format: [The lower left x coordinate, The lower left y coordinate, The width of the rectangle, The height of the rectangle]. Default: [0, 0, 1, 1]", "items": [ { "description": "X", "type": "number" }, { "description": "Y", "type": "number" }, { "description": "Z", "type": "number" }, { "description": "W", "type": "number" } ], "maxItems": 4, "minItems": 4, "type": "array" }, "renderSceneColorMap": { "description": "If true, the camera will render the scene color map. Default: false", "type": "boolean" }, "renderSceneDepthMap": { "description": "If true, the camera will render the scene depth map. Default: false", "type": "boolean" }, "toneMapping": { "anyOf": [ { "const": 0, "description": "TONEMAP_LINEAR", "type": "number" }, { "const": 1, "description": "TONEMAP_FILMIC", "type": "number" }, { "const": 2, "description": "TONEMAP_HEJL", "type": "number" }, { "const": 3, "description": "TONEMAP_ACES", "type": "number" }, { "const": 4, "description": "TONEMAP_ACES2", "type": "number" }, { "const": 5, "description": "TONEMAP_NEUTRAL", "type": "number" }, { "const": 6, "description": "TONEMAP_NONE", "type": "number" } ], "description": "The tonemapping transform to apply to the final color of the camera. Default: 0 (TONEMAP_LINEAR)" } }, "type": "object" }, "collision": { "additionalProperties": false, "description": "The data for the collision component.", "properties": { "angularOffset": { "$ref": "#/properties/components/properties/collision/properties/halfExtents", "description": "The rotational offset of the collision shape from the Entity rotation in local space. Default: [0, 0, 0]" }, "asset": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "description": "The `id` of the model asset that will be used as a source for the triangle-based collision mesh. Default: null" }, "axis": { "anyOf": [ { "const": 0, "description": "X", "type": "number" }, { "const": 1, "description": "Y", "type": "number" }, { "const": 2, "description": "Z", "type": "number" } ], "description": "Aligns the capsule/cylinder with the local-space X, Y or Z axis of the entity. Default: 1" }, "convexHull": { "description": "If true, the collision shape will be a convex hull. Default: false", "type": "boolean" }, "enabled": { "description": "Whether the component is enabled. Default: true", "type": "boolean" }, "halfExtents": { "description": "The half-extents of the collision box. This is an array of 3 numbers: local space half-width, half-height, and half-depth. Default: [0.5, 0.5, 0.5]", "items": [ { "description": "X", "type": "number" }, { "description": "Y", "type": "number" }, { "description": "Z", "type": "number" } ], "maxItems": 3, "minItems": 3, "type": "array" }, "height": { "description": "The tip-to-tip height of the capsule/cylinder. Default: 2", "minimum": 0, "type": "number" }, "linearOffset": { "$ref": "#/properties/components/properties/collision/properties/halfExtents", "description": "The positional offset of the collision shape from the Entity position along the local axes. Default: [0, 0, 0]" }, "radius": { "description": "The radius of the capsule/cylinder body. Default: 0.5", "minimum": 0, "type": "number" }, "renderAsset": { "$ref": "#/properties/components/properties/collision/properties/asset", "description": "The `id` of the render asset that will be used as a source for the triangle-based collision mesh. Default: null" }, "type": { "description": "The type of collision primitive. Can be: box, sphere, capsule, cylinder, mesh. Default: \"box\"", "enum": [ "box", "sphere", "capsule", "cylinder", "mesh" ], "type": "string" } }, "type": "object" }, "element": { "additionalProperties": false, "description": "The data for the element component.", "properties": { "alignment": { "$ref": "#/properties/components/properties/element/properties/pivot", "description": "Horizontal and vertical alignment of the text relative to its element transform. Default: [0.5, 0.5]" }, "anchor": { "$ref": "#/properties/components/properties/camera/properties/rect", "description": "An array of 4 numbers controlling the left, bottom, right and top anchors of the element. Default: [0.5, 0.5, 0.5, 0.5]" }, "autoFitHeight": { "description": "Automatically scale the font size to fit the element's height. Default: false", "type": "boolean" }, "autoFitWidth": { "description": "Automatically scale the font size to fit the element's width. Default: false", "type": "boolean" }, "autoHeight": { "description": "Automatically size height to match text content. Default: false", "type": "boolean" }, "autoWidth": { "description": "Automatically size width to match text content. Default: false", "type": "boolean" }, "batchGroupId": { "description": "The batch group id that this element belongs to. Default: null", "type": [ "number", "null" ] }, "color": { "description": "The RGB color of the element. Default: [1, 1, 1]", "items": [ { "description": "Red", "maximum": 1, "minimum": 0, "type": "number" }, { "description": "Green", "maximum": 1, "minimum": 0, "type": "number" }, { "description": "Blue", "maximum": 1, "minimum": 0, "type": "number" } ], "maxItems": 3, "minItems": 3, "type": "array" }, "enableMarkup": { "description": "Enable markup processing (only for text elements). Default: false", "type": "boolean" }, "enabled": { "description": "Whether the component is enabled. Default: true", "type": "boolean" }, "fitMode": { "description": "Set how the content should be fitted and preserve the aspect ratio. Default: \"stretch\"", "enum": [ "stretch", "contain", "cover" ], "type": "string" }, "fontAsset": { "$ref": "#/properties/components/properties/collision/properties/asset", "description": "The `id` of the font asset used by the element. Default: null" }, "fontSize": { "description": "The size of the font used by the element. Default: 32", "type": "number" }, "height": { "description": "The height of the element. Default: 32", "type": "number" }, "key": { "description": "The localization key of the element. Default: null", "type": [ "string", "null" ] }, "layers": { "description": "An array of layer ids that this element belongs to. Default: [4]", "items": { "type": "number" }, "type": "array" }, "lineHeight": { "description": "The height of each line of text. Default: 32", "type": "number" }, "margin": { "$ref": "#/properties/components/properties/camera/properties/rect", "description": "Spacing between each edge of the element and the respective anchor. Default: [-16, -16, -16, -16]" }, "mask": { "description": "If true, this element acts as a mask for its children. Default: false", "type": "boolean" }, "materialAsset": { "$ref": "#/properties/components/properties/collision/properties/asset", "description": "The `id` of the material asset used by this element. Default: null" }, "maxFontSize": { "description": "The maximum size of the font when using `autoFitWidth` or `autoFitHeight`. Default: 32", "type": "number" }, "maxLines": { "description": "The maximum number of lines that this element can display. Default: null", "type": [ "number", "null" ] }, "minFontSize": { "description": "The minimum size of the font when using `autoFitWidth` or `autoFitHeight`. Default: 8", "type": "number" }, "opacity": { "description": "The opacity of the element. Default: 1", "maximum": 1, "minimum": 0, "type": "number" }, "outlineColor": { "$ref": "#/properties/components/properties/camera/properties/clearColor", "description": "Text outline effect color and opacity. Default: [0, 0, 0, 1]" }, "outlineThickness": { "description": "Text outline effect width (0–1). Default: 0", "type": "number" }, "pivot": { "description": "An array of 2 numbers controlling the origin of the element. Default: [0.5, 0.5]", "items": [ { "description": "X", "type": "number" }, { "description": "Y", "type": "number" } ], "maxItems": 2, "minItems": 2, "type": "array" }, "pixelsPerUnit": { "description": "Number of pixels per PlayCanvas unit (used for 9-sliced sprites). Default: null", "type": [ "number", "null" ] }, "rect": { "$ref": "#/properties/components/properties/camera/properties/rect", "description": "Texture rect for the image element (u, v, width, height). Default: [0, 0, 1, 1]" }, "shadowColor": { "$ref": "#/properties/components/properties/camera/properties/clearColor", "description": "Text shadow color and opacity. Default: [0, 0, 0, 1]" }, "shadowOffset": { "$ref": "#/properties/components/properties/element/properties/pivot", "description": "Horizontal and vertical offset of the text shadow. Default: [0.0, 0.0]" }, "spacing": { "description": "The spacing between each letter of the text. Default: 1", "type": "number" }, "spriteAsset": { "$ref": "#/properties/components/properties/collision/properties/asset", "description": "The `id` of the sprite asset to be used by the element. Default: null" }, "spriteFrame": { "description": "The frame from the sprite asset to render. Default: 0", "type": "number" }, "text": { "description": "The text content of the element. Default: \"\"", "type": "string" }, "textureAsset": { "$ref": "#/properties/components/properties/collision/properties/asset", "description": "The `id` of the texture asset to be used by the element. Default: null" }, "type": { "description": "The type of the element. Default: \"text\"", "enum": [ "text", "image", "group" ], "type": "string" }, "useInput": { "description": "Enable this to make the element respond to input events. Default: false", "type": "boolean" }, "width": { "description": "The width of the element. Default: 32", "type": "number" }, "wrapLines": { "description": "Automatically wrap lines based on the element width. Default: true", "type": "boolean" } }, "type": "object" }, "light": { "additionalProperties": false, "description": "The data for the light component.", "properties": { "affectDynamic": { "description": "If true the light will affect non-lightmapped objects. Default: true", "type": "boolean" }, "affectLightmapped": { "description": "If true the light will affect lightmapped objects. Default: false", "type": "boolean" }, "affectSpecularity": { "description": "If true the light will affect material specularity. For directional light only. Default: true.", "type": "boolean" }, "bake": { "description": "If true the light will be rendered into lightmaps. Default: false", "type": "boolean" }, "bakeArea": { "description": "If bake is enabled, specifies the directional light penumbra angle in degrees, allowing soft shadows. Default: 0", "maximum": 180, "minimum": 0, "type": "number" }, "bakeDir": { "description": "If true and `bake` is true, the light's direction will contribute to directional lightmaps. Default: true", "type": "boolean" }, "bakeNumSamples": { "description": "If bake is enabled, specifies the number of samples used to bake this light into the lightmap. Default: 1", "maximum": 255, "minimum": 1, "type": "integer" }, "cascadeDistribution": { "description": "The distribution of subdivision of the camera frustum for individual shadow cascades. Default: 0.5", "type": "number" }, "castShadows": { "description": "If true, the light will cause shadow casting models to cast shadows. Default: false", "type": "boolean" }, "color": { "$ref": "#/properties/components/properties/element/properties/color", "description": "An array of 3 numbers that represents the color of the emitted light. Default: [1, 1, 1]" }, "cookieAngle": { "description": "Angle for spotlight cookie rotation. Default: 0.0", "type": "number" }, "cookieAsset": { "$ref": "#/properties/components/properties/collision/properties/asset", "description": "The id of a texture asset that represents that light cookie. Default: null" }, "cookieChannel": { "description": "Color channels of the projection texture to use. Can be \"r\", \"g\", \"b\", \"a\", \"rgb\" or any swizzled combination. Default: \"rgb\"", "enum": [ "r", "g", "b", "a", "rgb" ], "type": "string" }, "cookieFalloff": { "description": "Toggle normal spotlight falloff when projection texture is used. Default: true", "type": "boolean" }, "cookieIntensity": { "description": "Projection texture intensity. Default: 1.0", "maximum": 1, "minimum": 0, "type": "number" }, "cookieOffset": { "$ref": "#/properties/components/properties/element/properties/pivot", "description": "Spotlight cookie position offset. Default: [0.0, 0.0]" }, "cookieScale": { "$ref": "#/properties/components/properties/element/properties/pivot", "description": "Spotlight cookie scale. Default: [1.0, 1.0]" }, "enabled": { "description": "Whether the component is enabled. Default: true", "type": "boolean" }, "falloffMode": { "anyOf": [ { "const": 0, "description": "LIGHTFALLOFF_LINEAR", "type": "number" }, { "const": 1, "description": "LIGHTFALLOFF_INVERSESQUARED", "type": "number" } ], "description": "Controls the rate at which a light attenuates from its position. Default: 0 (LIGHTFALLOFF_LINEAR)" }, "innerConeAngle": { "description": "The angle at which the spotlight cone starts to fade off (degrees). Affects spot lights only. Default: 40", "maximum": 45, "minimum": 0, "type": "number" }, "intensity": { "description": "The intensity of the light, this acts as a scalar value for the light's color. This value can exceed 1. Default: 1", "maximum": 32, "minimum": 0, "type": "number" }, "isStatic": { "description": "Mark light as non-movable (optimization). Default: false", "type": "boolean" }, "layers": { "description": "An array of layer id's that this light will affect. Default: [0]", "items": { "minimum": 0, "type": "integer" }, "type": "array" }, "normalOffsetBias": { "description": "Normal offset depth bias. Default: 0.05", "maximum": 1, "minimum": 0, "type": "number" }, "numCascades": { "description": "Number of shadow cascades. Default: 1", "maximum": 4, "minimum": 1, "type": "integer" }, "outerConeAngle": { "description": "The angle at which the spotlight cone has faded to nothing (degrees). Affects spot lights only. Default: 45", "maximum": 90, "minimum": 0, "type": "number" }, "range": { "description": "The distance from the spotlight source at which its contribution falls to zero. Default: 8", "minimum": 0, "type": "number" }, "shadowBias": { "description": "Constant depth offset applied to a shadow map to eliminate artifacts. Default: 0.2", "maximum": 1, "minimum": 0, "type": "number" }, "shadowDistance": { "description": "The shadow distance is the maximum distance from the camera beyond which shadows from Directional Lights are no longer visible. Default: 16", "minimum": 0, "type": "number" }, "shadowIntensity": { "description": "The intensity of the shadow darkening, 1 being shadows are entirely black. Default: 1", "minimum": 0, "type": "number" }, "shadowResolution": { "anyOf": [ { "const": 16, "description": "16x16", "type": "number" }, { "const": 32, "description": "32x32", "type": "number" }, { "const": 64, "description": "64x64", "type": "number" }, { "const": 128, "description": "128x128", "type": "number" }, { "const": 256, "description": "256x256", "type": "number" }, { "const": 512, "description": "512x512", "type": "number" }, { "const": 1024, "description": "1024x1024", "type": "number" }, { "const": 2048, "description": "2048x2048", "type": "number" }, { "const": 4096, "description": "4096x4096", "type": "number" } ], "description": "The size of the texture used for the shadow map (power of 2). Default: 1024" }, "shadowType": { "anyOf": [ { "const": 0, "description": "SHADOW_PCF3_32F", "type": "number" }, { "const": 2, "description": "SHADOW_VSM_16F", "type": "number" }, { "const": 3, "description": "SHADOW_VSM_32F", "type": "number" }, { "const": 4, "description": "SHADOW_PCF5_32F", "type": "number" }, { "const": 5, "description": "SHADOW_PCF1_32F", "type": "number" }, { "const": 6, "description": "SHADOW_PCSS_32F", "type": "number" }, { "const": 7, "description": "SHADOW_PCF1_16F", "type": "number" }, { "const": 8, "description": "SHADOW_PCF3_16F", "type": "number" }, { "const": 9, "description": "SHADOW_PCF5_16F", "type": "number" } ], "description": "Type of shadows being rendered by this light. Default: 0 (SHADOW_PCF3_32F)" }, "shadowUpdateMode": { "anyOf": [ { "const": 1, "description": "SHADOWUPDATE_THISFRAME", "type": "number" }, { "const": 2, "description": "SHADOWUPDATE_REALTIME", "type": "number" } ], "description": "Tells the renderer how often shadows must be updated for this light. Default: 2 (SHADOWUPDATE_REALTIME)" }, "shape": { "anyOf": [ { "const": 0, "description": "LIGHTSHAPE_PUNCTUAL", "type": "number" }, { "const": 1, "description": "LIGHTSHAPE_RECT", "type": "number" }, { "const": 2, "description": "LIGHTSHAPE_DISK", "type": "number" }, { "const": 3, "description": "LIGHTSHAPE_SPHERE", "type": "number" } ], "description": "The shape of the light source. Default: 0 (LIGHTSHAPE_PUNCTUAL)" }, "type": { "description": "The type of light. Can be: directional, spot, omni. Default: \"directional\"", "enum": [ "directional", "spot", "omni" ], "type": "string" }, "vsmBias": { "description": "Constant depth offset applied to a shadow map to eliminate rendering artifacts like shadow acne. Default: 0.01", "maximum": 1, "minimum": 0, "type": "number" }, "vsmBlurMode": { "anyOf": [ { "const": 0, "description": "BLUR_BOX", "type": "number" }, { "const": 1, "description": "BLUR_GAUSSIAN", "type": "number" } ], "description": "Blurring mode for variance shadow maps. Default: 1 (BLUR_GAUSSIAN)" }, "vsmBlurSize": { "description": "Number of samples used for blurring a variance shadow map. Only uneven numbers work, even are incremented. Minimum value is 1, maximum is 25. Default: 11", "maximum": 25, "minimum": 1, "type": "integer" } }, "type": "object" }, "render": { "additionalProperties": false, "description": "The data for the render component.", "properties": { "aabbCenter": { "$ref": "#/properties/components/properties/collision/properties/halfExtents", "description": "An array of 3 numbers controlling the center of the AABB to be used. Default: [0, 0, 0]" }, "aabbHalfExtents": { "$ref": "#/properties/components/properties/collision/properties/halfExtents", "description": "An array of 3 numbers controlling the half extents of the AABB to be used. Default: [0.5, 0.5, 0.5]" }, "asset": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "description": "The `id` of the render asset for the render component (only applies to type \"asset\"). Default: null" }, "batchGroupId": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "description": "The batch group id that the meshes should belong to. Default: null" }, "castShadows": { "description": "If true, attached meshes will cast shadows for lights that have shadow casting enabled. Default: true", "type": "boolean" }, "castShadowsLightmap": { "description": "If true, the meshes will cast shadows when rendering lightmaps. Default: true", "type": "boolean" }, "enabled": { "description": "Whether the component is enabled. Default: true", "type": "boolean" }, "isStatic": { "description": "Mark meshes as non-movable (optimization). Default: false", "type": "boolean" }, "layers": { "description": "An array of layer id's to which the meshes should belong. Default: [0]", "items": { "minimum": 0, "type": "integer" }, "type": "array" }, "lightmapSizeMultiplier": { "description": "Lightmap resolution multiplier. Default: 1.0", "type": "number" }, "lightmapped": { "description": "If true, the meshes will be lightmapped after using lightmapper.bake(). Default: false", "type": "boolean" }, "materialAssets": { "description": "An array of material asset `id`s that will be used to render the meshes. Each material corresponds to the respective mesh instance. Default: []", "items": { "anyOf": [ { "type": "integer" }, { "type": "null" } ] }, "type": "array" }, "receiveShadows": { "description": "If true, shadows will be cast on attached meshes. Default: true", "type": "boolean" }, "rootBone": { "description": "The `resource_id` of the entity to be used as the root bone for any skinned meshes that are rendered by this component. Default: null", "type": [ "string", "null" ] }, "type": { "description": "The type of the render component. Can be: asset, box, capsule, cone, cylinder, plane, sphere. Default: \"asset\"", "enum": [ "asset", "box", "capsule", "sphere", "cylinder", "cone", "plane" ], "type": "string" } }, "type": "object" }, "rigidbody": { "additionalProperties": false, "description": "The data for the rigidbody component.", "properties": { "angularDamping": { "description": "Controls the rate at which a body loses angular velocity over time. Default: 0", "maximum": 1, "minimum": 0, "type": "number" }, "angularFactor": { "$ref": "#/properties/components/properties/collision/properties/halfExtents", "description": "An array of 3 numbers that represents the scaling factor for angular movement of the body in each axis. Default: [1, 1, 1]" }, "enabled": { "description": "Whether the component is enabled. Default: true", "type": "boolean" }, "friction": { "description": "The friction value used when contacts occur between two bodies. Default: 0.5", "maximum": 1, "minimum": 0, "type": "number" }, "linearDamping": { "description": "Controls the rate at which a body loses linear velocity over time. Default: 0", "maximum": 1, "minimum": 0, "type": "number" }, "linearFactor": { "$ref": "#/properties/components/properties/collision/properties/halfExtents", "description": "An array of 3 numbers that represents the scaling factor for linear movement of the body in each axis. Default: [1, 1, 1]" }, "mass": { "description": "The mass of the body. Default: 1", "minimum": 0, "type": "number" }, "restitution": { "description": "The amount of energy lost when two objects collide, this determines the bounciness of the object. Default: 0.5", "maximum": 1, "minimum": 0, "type": "number" }, "type": { "description": "The type of RigidBody determines how it is simulated. Can be one of: static, dynamic, kinematic. Default: \"static\"", "enum": [ "static", "dynamic", "kinematic" ], "type": "string" } }, "type": "object" }, "screen": { "additionalProperties": false, "description": "The data for the screen component.", "properties": { "enabled": { "description": "Whether the component is enabled. Default: true", "type": "boolean" }, "priority": { "description": "Determines the order in which Screen components in the same layer are rendered (higher priority is rendered on top). Number must be an integer between 0 and 127. Default: 0", "maximum": 127, "minimum": 0, "type": "integer" }, "referenceResolution": { "$ref": "#/properties/components/properties/element/properties/pivot", "description": "An array of 2 numbers that represents the reference resolution of the screen. If the window size changes the screen will adjust its size based on `scaleMode` using the reference resolution. Default: [1280, 720]" }, "resolution": { "$ref": "#/properties/components/properties/element/properties/pivot", "description": "An array of 2 numbers that represents the resolution of the screen. Default: [1280, 720]" }, "scaleBlend": { "description": "Set this to 0 to only adjust to changes between the width of the window and the x of the reference resolution. Set this to 1 to only adjust to changes between the window height and the y of the reference resolution. A value in the middle will try to adjust to both. Default: 0.5", "maximum": 1, "minimum": 0, "type": "number" }, "scaleMode": { "description": "Controls how a screen-space screen is resized when the window size changes. Can be: `pc.SCALEMODE_BLEND`: Use it to have the screen adjust between the difference of the window resolution and the screen's reference resolution. `pc.SCALEMODE_NONE`: Use it to make the screen always have a size equal to its resolution. Default: \"blend\"", "enum": [ "none", "blend" ], "type": "string" }, "screenSpace": { "description": "If true then the screen will display its child Elements in 2D. Set this to false to make this a 3D screen. Default: true", "type": "boolean" } }, "type": "object" }, "script": { "additionalProperties": false, "description": "The data for the script component.", "properties": { "enabled": { "description": "Whether the component is enabled. Default: true", "type": "boolean" }, "order": { "description": "An array of script names in the order in which they should be executed at runtime. Default: []", "items": { "type": "string" }, "type": "array" }, "scripts": { "additionalProperties": { "additionalProperties": false, "properties": { "attributes": { "additionalProperties": { "description": "A dictionary that holds the values of each attribute. The keys in the dictionary are the attribute names." }, "description": "A dictionary that holds the values of each attribute. The keys in the dictionary are the attribute names. Default: {}", "type": "object" }, "enabled": { "description": "Whether the script instance is enabled. Default: true", "type": "boolean" } }, "type": "object" }, "description": "A dictionary that contains all the scripts attached to this script component. Each key in the dictionary is the script name. Default: {}", "type": "object" } }, "type": "object" }, "sound": { "additionalProperties": false, "description": "The data for the sound component.", "properties": { "distanceModel": { "description": "Determines which algorithm to use to reduce the volume of the audio as it moves away from the listener. Can be one of: \"inverse\", \"linear\", \"exponential\". Default: \"linear\"", "enum": [ "linear", "inverse", "exponential" ], "type": "string" }, "enabled": { "description": "Whether the component is enabled. Default: true", "type": "boolean" }, "maxDistance": { "description": "The maximum distance from the listener at which audio falloff stops. Note the volume of the audio is not 0 after this distance, but just doesn't fall off anymore. Default: 10000", "minimum": 0, "type": "number" }, "pitch": { "description": "The pitch to playback the audio at. A value of 1 means the audio is played back at the original pitch. The pitch of each slot is multiplied with this value. Default: 1", "minimum": 0, "type": "number" }, "positional": { "description": "If true, the component will play back audio assets as if played from the location of the entity in 3D space. Default: true", "type": "boolean" }, "refDistance": { "description": "The reference distance for reducing volume as the sound source moves further from the listener. Default: 1", "minimum": 0, "type": "number" }, "rollOffFactor": { "description": "The rate at which volume fall-off occurs. Default: 1", "minimum": 0, "type": "number" }, "slots": { "additionalProperties": { "additionalProperties": false, "properties": { "asset": { "$ref": "#/properties/components/properties/collision/properties/asset", "description": "The `id` of the audio asset that can be played from this sound slot. Default: null" }, "autoPlay": { "description": "If true, the slot will be played on load. Otherwise, sound slots will need to be played by scripts. Default: false", "type": "boolean" }, "duration": { "description": "The duration of the sound that the slot will play starting from startTime. Default: null", "type": [ "number", "null" ] }, "loop": { "description": "If true, the slot will loop playback continuously. Otherwise, it will be played once to completion. Default: false", "type": "boolean" }, "name": { "description": "The name of the sound slot. Default: \"Slot 1\"", "type": "string" }, "overlap": { "description": "If true then sounds played from slot will be played independently of each other. Otherwise the slot will first stop the current sound before starting the new one. Default: false", "type": "boolean" }, "pitch": { "description": "The pitch to playback the audio at. A value of 1 means the audio is played back at the original pitch. Default: 1", "minimum": 0, "type": "number" }, "startTime": { "description": "The start time from which the sound will start playing. Default: 0", "type": "number" }, "volume": { "description": "The volume modifier to play the audio with. Default: 1", "maximum": 1, "minimum": 0, "type": "number" } }, "type": "object" }, "default": { "1": { "asset": null, "autoPlay": false, "duration": null, "loop": false, "name": "Slot 1", "overlap": false, "pitch": 1, "startTime": 0, "volume": 1 } }, "description": "A dictionary of sound slots. Each sound slot controls playback of an audio asset. Each key in the dictionary is a number representing the index of each sound slot.", "type": "object" }, "volume": { "description": "The volume modifier to play the audio with. The volume of each slot is multiplied with this value. Default: 1", "maximum": 1, "minimum": 0, "type": "number" } }, "type": "object" } }, "type": "object" }, "id": { "description": "An entity ID.", "format": "uuid", "type": "string" } }, "required": [ "id", "components" ], "type": "object" }

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/playcanvas/editor-mcp-server'

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