This module provides the core functionality for the PlayCanvas Engine. It includes the main classes and methods used to create and manage a PlayCanvas application. It provides APIs for graphics, audio, input, physics, asset management, scripting and much more. It also includes an application framework and entity-component system, making it easy to manage the lifetime of your application.

Index

Animation

Asset

Debug

Exporter

Gizmo

Graphics

BasicMaterial Batch BatchGroup BatchManager BindBaseFormat BindGroupFormat BindStorageBufferFormat BindStorageTextureFormat BindTextureFormat BindUniformBufferFormat BlendState BoxGeometry CameraComponent CameraComponentSystem CapsuleGeometry ConeGeometry ContainerHandler ContainerResource CubemapHandler CylinderGeometry DepthState DomeGeometry GSplatComponent GSplatComponentSystem GSplatResource Geometry GraphicsDevice IndexBuffer Layer LayerComposition LightComponent LightComponentSystem LightingParams Lightmapper LitShaderOptions Material MaterialHandler Mesh MeshInstance Model ModelComponent ModelComponentSystem ModelHandler Morph MorphInstance MorphTarget ParticleSystemComponent ParticleSystemComponentSystem Picker PlaneGeometry PostEffect PostEffectQueue QuadRender RenderComponent RenderComponentSystem RenderHandler RenderPassBloom RenderPassCameraFrame RenderPassCompose RenderPassDownsample RenderPassTAA RenderPassUpsample RenderTarget Scene SceneHandler SceneRegistry SceneRegistryItem ScopeId ScopeSpace Shader Skin SkinInstance SphereGeometry Sprite SpriteAnimationClip SpriteComponent SpriteComponentSystem SpriteHandler StandardMaterial StandardMaterialOptions StencilParameters StorageBuffer Texture TextureAtlas TextureAtlasHandler TextureHandler TorusGeometry TransformFeedback VertexBuffer VertexFormat VertexIterator WebglGraphicsDevice ADDRESS_CLAMP_TO_EDGE ADDRESS_MIRRORED_REPEAT ADDRESS_REPEAT ASPECT_AUTO ASPECT_MANUAL BAKE_COLOR BAKE_COLORDIR BLENDEQUATION_ADD BLENDEQUATION_MAX BLENDEQUATION_MIN BLENDEQUATION_REVERSE_SUBTRACT BLENDEQUATION_SUBTRACT BLENDMODE_CONSTANT BLENDMODE_DST_ALPHA BLENDMODE_DST_COLOR BLENDMODE_ONE BLENDMODE_ONE_MINUS_CONSTANT BLENDMODE_ONE_MINUS_DST_ALPHA BLENDMODE_ONE_MINUS_DST_COLOR BLENDMODE_ONE_MINUS_SRC_ALPHA BLENDMODE_ONE_MINUS_SRC_COLOR BLENDMODE_SRC_ALPHA BLENDMODE_SRC_ALPHA_SATURATE BLENDMODE_SRC_COLOR BLENDMODE_ZERO BLEND_ADDITIVE BLEND_ADDITIVEALPHA BLEND_MAX BLEND_MIN BLEND_MULTIPLICATIVE BLEND_MULTIPLICATIVE2X BLEND_NONE BLEND_NORMAL BLEND_PREMULTIPLIED BLEND_SCREEN BLEND_SUBTRACTIVE BLUR_BOX BLUR_GAUSSIAN BUFFERUSAGE_COPY_DST BUFFERUSAGE_COPY_SRC BUFFERUSAGE_INDEX BUFFERUSAGE_READ BUFFERUSAGE_UNIFORM BUFFERUSAGE_VERTEX BUFFERUSAGE_WRITE BUFFER_DYNAMIC BUFFER_GPUDYNAMIC BUFFER_STATIC BUFFER_STREAM CHUNKAPI_1_51 CLEARFLAG_COLOR CLEARFLAG_DEPTH CLEARFLAG_STENCIL CUBEFACE_NEGX CUBEFACE_NEGY CUBEFACE_NEGZ CUBEFACE_POSX CUBEFACE_POSY CUBEFACE_POSZ CUBEPROJ_BOX CUBEPROJ_NONE CULLFACE_BACK CULLFACE_FRONT CULLFACE_NONE DETAILMODE_ADD DETAILMODE_MAX DETAILMODE_MIN DETAILMODE_MUL DETAILMODE_OVERLAY DETAILMODE_SCREEN DEVICETYPE_NULL DEVICETYPE_WEBGL2 DEVICETYPE_WEBGPU DITHER_BAYER8 DITHER_BLUENOISE DITHER_IGNNOISE DITHER_NONE EMITTERSHAPE_BOX EMITTERSHAPE_SPHERE FILTER_LINEAR FILTER_LINEAR_MIPMAP_LINEAR FILTER_LINEAR_MIPMAP_NEAREST FILTER_NEAREST FILTER_NEAREST_MIPMAP_LINEAR FILTER_NEAREST_MIPMAP_NEAREST FOG_EXP FOG_EXP2 FOG_LINEAR FOG_NONE FRESNEL_NONE FRESNEL_SCHLICK FUNC_ALWAYS FUNC_EQUAL FUNC_GREATER FUNC_GREATEREQUAL FUNC_LESS FUNC_LESSEQUAL FUNC_NEVER FUNC_NOTEQUAL GAMMA_NONE GAMMA_SRGB GAMMA_SRGBHDR INDEXFORMAT_UINT16 INDEXFORMAT_UINT32 INDEXFORMAT_UINT8 LAYERID_DEPTH LAYERID_IMMEDIATE LAYERID_SKYBOX LAYERID_UI LAYERID_WORLD LIGHTFALLOFF_INVERSESQUARED LIGHTFALLOFF_LINEAR LIGHTSHAPE_DISK LIGHTSHAPE_PUNCTUAL LIGHTSHAPE_RECT LIGHTSHAPE_SPHERE LIGHTTYPE_DIRECTIONAL LIGHTTYPE_OMNI LIGHTTYPE_SPOT ORIENTATION_HORIZONTAL ORIENTATION_VERTICAL PARTICLEORIENTATION_EMITTER PARTICLEORIENTATION_SCREEN PARTICLEORIENTATION_WORLD PARTICLESORT_DISTANCE PARTICLESORT_NEWER_FIRST PARTICLESORT_NONE PARTICLESORT_OLDER_FIRST PIXELFORMAT_111110F PIXELFORMAT_A8 PIXELFORMAT_ASTC_4x4 PIXELFORMAT_ATC_RGB PIXELFORMAT_ATC_RGBA PIXELFORMAT_DEPTH PIXELFORMAT_DEPTHSTENCIL PIXELFORMAT_DXT1 PIXELFORMAT_DXT3 PIXELFORMAT_DXT5 PIXELFORMAT_ETC1 PIXELFORMAT_ETC2_RGB PIXELFORMAT_ETC2_RGBA PIXELFORMAT_L8 PIXELFORMAT_LA8 PIXELFORMAT_PVRTC_2BPP_RGBA_1 PIXELFORMAT_PVRTC_2BPP_RGB_1 PIXELFORMAT_PVRTC_4BPP_RGBA_1 PIXELFORMAT_PVRTC_4BPP_RGB_1 PIXELFORMAT_R16F PIXELFORMAT_R16I PIXELFORMAT_R16U PIXELFORMAT_R32F PIXELFORMAT_R32I PIXELFORMAT_R32U PIXELFORMAT_R8I PIXELFORMAT_R8U PIXELFORMAT_RG16F PIXELFORMAT_RG16I PIXELFORMAT_RG16U PIXELFORMAT_RG32I PIXELFORMAT_RG32U PIXELFORMAT_RG8I PIXELFORMAT_RG8U PIXELFORMAT_RGB16F PIXELFORMAT_RGB32F PIXELFORMAT_RGB565 PIXELFORMAT_RGB8 PIXELFORMAT_RGBA16F PIXELFORMAT_RGBA16I PIXELFORMAT_RGBA16U PIXELFORMAT_RGBA32F PIXELFORMAT_RGBA32I PIXELFORMAT_RGBA32U PIXELFORMAT_RGBA4 PIXELFORMAT_RGBA5551 PIXELFORMAT_RGBA8 PIXELFORMAT_RGBA8I PIXELFORMAT_RGBA8U PIXELFORMAT_SRGB PIXELFORMAT_SRGBA PRIMITIVE_LINELOOP PRIMITIVE_LINES PRIMITIVE_LINESTRIP PRIMITIVE_POINTS PRIMITIVE_TRIANGLES PRIMITIVE_TRIFAN PRIMITIVE_TRISTRIP PROJECTION_ORTHOGRAPHIC PROJECTION_PERSPECTIVE RENDERSTYLE_POINTS RENDERSTYLE_SOLID RENDERSTYLE_WIREFRAME SAMPLETYPE_DEPTH SAMPLETYPE_FLOAT SAMPLETYPE_INT SAMPLETYPE_UINT SAMPLETYPE_UNFILTERABLE_FLOAT SEMANTIC_ATTR0 SEMANTIC_ATTR1 SEMANTIC_ATTR10 SEMANTIC_ATTR11 SEMANTIC_ATTR12 SEMANTIC_ATTR13 SEMANTIC_ATTR14 SEMANTIC_ATTR15 SEMANTIC_ATTR2 SEMANTIC_ATTR3 SEMANTIC_ATTR4 SEMANTIC_ATTR5 SEMANTIC_ATTR6 SEMANTIC_ATTR7 SEMANTIC_ATTR8 SEMANTIC_ATTR9 SEMANTIC_BLENDINDICES SEMANTIC_BLENDWEIGHT SEMANTIC_COLOR SEMANTIC_NORMAL SEMANTIC_POSITION SEMANTIC_TANGENT SEMANTIC_TEXCOORD0 SEMANTIC_TEXCOORD1 SEMANTIC_TEXCOORD2 SEMANTIC_TEXCOORD3 SEMANTIC_TEXCOORD4 SEMANTIC_TEXCOORD5 SEMANTIC_TEXCOORD6 SEMANTIC_TEXCOORD7 SHADERLANGUAGE_GLSL SHADERLANGUAGE_WGSL SHADERPASS_ALBEDO SHADERPASS_AO SHADERPASS_EMISSION SHADERPASS_FORWARD SHADERPASS_FORWARD_HDR SHADERPASS_GLOSS SHADERPASS_LIGHTING SHADERPASS_METALNESS SHADERPASS_OPACITY SHADERPASS_SPECULARITY SHADERPASS_UV0 SHADERPASS_WORLDNORMAL SHADERSTAGE_COMPUTE SHADERSTAGE_FRAGMENT SHADERSTAGE_VERTEX SHADER_DEPTH SHADER_FORWARD SHADER_FORWARDHDR SHADOWUPDATE_NONE SHADOWUPDATE_REALTIME SHADOWUPDATE_THISFRAME SHADOW_PCF1 SHADOW_PCF3 SHADOW_PCF5 SHADOW_PCSS SHADOW_VSM16 SHADOW_VSM32 SHADOW_VSM8 SKYTYPE_BOX SKYTYPE_DOME SKYTYPE_INFINITE SORTMODE_BACK2FRONT SORTMODE_FRONT2BACK SORTMODE_MANUAL SORTMODE_MATERIALMESH SORTMODE_NONE SPECOCC_AO SPECOCC_GLOSSDEPENDENT SPECOCC_NONE SPECULAR_BLINN SPECULAR_PHONG SPRITETYPE_ANIMATED SPRITETYPE_SIMPLE SPRITE_RENDERMODE_SIMPLE SPRITE_RENDERMODE_SLICED SPRITE_RENDERMODE_TILED STENCILOP_DECREMENT STENCILOP_DECREMENTWRAP STENCILOP_INCREMENT STENCILOP_INCREMENTWRAP STENCILOP_INVERT STENCILOP_KEEP STENCILOP_REPLACE STENCILOP_ZERO TEXTUREDIMENSION_1D TEXTUREDIMENSION_2D TEXTUREDIMENSION_2D_ARRAY TEXTUREDIMENSION_3D TEXTUREDIMENSION_CUBE TEXTUREDIMENSION_CUBE_ARRAY TEXTURELOCK_READ TEXTURELOCK_WRITE TEXTUREPROJECTION_CUBE TEXTUREPROJECTION_EQUIRECT TEXTUREPROJECTION_NONE TEXTUREPROJECTION_OCTAHEDRAL TEXTURETYPE_DEFAULT TEXTURETYPE_RGBE TEXTURETYPE_RGBM TEXTURETYPE_RGBP TEXTURETYPE_SWIZZLEGGGR TONEMAP_ACES TONEMAP_ACES2 TONEMAP_FILMIC TONEMAP_HEJL TONEMAP_LINEAR TONEMAP_NEUTRAL TYPE_FLOAT16 TYPE_FLOAT32 TYPE_INT16 TYPE_INT32 TYPE_INT8 TYPE_UINT16 TYPE_UINT32 TYPE_UINT8 UNIFORMTYPE_BOOL UNIFORMTYPE_BVEC2 UNIFORMTYPE_BVEC3 UNIFORMTYPE_BVEC4 UNIFORMTYPE_FLOAT UNIFORMTYPE_INT UNIFORMTYPE_IVEC2 UNIFORMTYPE_IVEC3 UNIFORMTYPE_IVEC4 UNIFORMTYPE_MAT2 UNIFORMTYPE_MAT3 UNIFORMTYPE_MAT4 UNIFORMTYPE_UINT UNIFORMTYPE_UVEC2 UNIFORMTYPE_UVEC3 UNIFORMTYPE_UVEC4 UNIFORMTYPE_VEC2 UNIFORMTYPE_VEC3 UNIFORMTYPE_VEC4 VIEW_CENTER VIEW_LEFT VIEW_RIGHT shaderChunks calculateNormals calculateTangents createGraphicsDevice createShader createShaderFromCode drawQuadWithShader drawTexture reprojectTexture

Input

Controller GamePad GamePadButton GamePads Keyboard KeyboardEvent Mouse MouseEvent Touch TouchDevice TouchEvent EVENT_GAMEPADCONNECTED EVENT_GAMEPADDISCONNECTED EVENT_KEYDOWN EVENT_KEYUP EVENT_MOUSEDOWN EVENT_MOUSEMOVE EVENT_MOUSEUP EVENT_MOUSEWHEEL EVENT_SELECT EVENT_SELECTEND EVENT_SELECTSTART EVENT_TOUCHCANCEL EVENT_TOUCHEND EVENT_TOUCHMOVE EVENT_TOUCHSTART KEY_0 KEY_1 KEY_2 KEY_3 KEY_4 KEY_5 KEY_6 KEY_7 KEY_8 KEY_9 KEY_A KEY_ADD KEY_ALT KEY_B KEY_BACKSPACE KEY_BACK_SLASH KEY_C KEY_CAPS_LOCK KEY_CLOSE_BRACKET KEY_COMMA KEY_CONTEXT_MENU KEY_CONTROL KEY_D KEY_DECIMAL KEY_DELETE KEY_DIVIDE KEY_DOWN KEY_E KEY_END KEY_ENTER KEY_EQUAL KEY_ESCAPE KEY_F KEY_F1 KEY_F10 KEY_F11 KEY_F12 KEY_F2 KEY_F3 KEY_F4 KEY_F5 KEY_F6 KEY_F7 KEY_F8 KEY_F9 KEY_G KEY_H KEY_HOME KEY_I KEY_INSERT KEY_J KEY_K KEY_L KEY_LEFT KEY_M KEY_META KEY_MULTIPLY KEY_N KEY_NUMPAD_0 KEY_NUMPAD_1 KEY_NUMPAD_2 KEY_NUMPAD_3 KEY_NUMPAD_4 KEY_NUMPAD_5 KEY_NUMPAD_6 KEY_NUMPAD_7 KEY_NUMPAD_8 KEY_NUMPAD_9 KEY_O KEY_OPEN_BRACKET KEY_P KEY_PAGE_DOWN KEY_PAGE_UP KEY_PAUSE KEY_PERIOD KEY_PRINT_SCREEN KEY_Q KEY_R KEY_RETURN KEY_RIGHT KEY_S KEY_SEMICOLON KEY_SEPARATOR KEY_SHIFT KEY_SLASH KEY_SPACE KEY_SUBTRACT KEY_T KEY_TAB KEY_U KEY_UP KEY_V KEY_W KEY_WINDOWS KEY_X KEY_Y KEY_Z MOUSEBUTTON_LEFT MOUSEBUTTON_MIDDLE MOUSEBUTTON_NONE MOUSEBUTTON_RIGHT PAD_1 PAD_2 PAD_3 PAD_4 PAD_DOWN PAD_FACE_1 PAD_FACE_2 PAD_FACE_3 PAD_FACE_4 PAD_LEFT PAD_L_SHOULDER_1 PAD_L_SHOULDER_2 PAD_L_STICK_BUTTON PAD_L_STICK_X PAD_L_STICK_Y PAD_RIGHT PAD_R_SHOULDER_1 PAD_R_SHOULDER_2 PAD_R_STICK_BUTTON PAD_R_STICK_X PAD_R_STICK_Y PAD_SELECT PAD_START PAD_UP PAD_VENDOR XRPAD_A XRPAD_B XRPAD_SQUEEZE XRPAD_STICK_BUTTON XRPAD_STICK_X XRPAD_STICK_Y XRPAD_TOUCHPAD_BUTTON XRPAD_TOUCHPAD_X XRPAD_TOUCHPAD_Y XRPAD_TRIGGER getTouchTargetCoords

Math

Other

Physics

Script

Sound

User Interface

XR