Class NullEngine
Hierarchy
-
Engine
- NullEngine
Index
Constructors
Properties
- active
View - canvas
Tab Index - custom
Animation Frame Requester - disable
Manifest Check - disable
Performance Monitor InBackground - enable
Offline Support - input
Element - is
InVRExclusive Pointer Mode - is
Pointer Lock - on
After Shader Compilation Observable - on
Before Shader Compilation Observable - on
Begin Frame Observable - on
Canvas Blur Observable - on
Canvas Focus Observable - on
Canvas Pointer Out Observable - on
End Frame Observable - on
New Scene Added Observable - on
Resize Observable - onVRDisplay
Changed Observable - onVRRequest
Present Complete - onVRRequest
Present Start - post
Processes - scenes
- texture
Format InUse - textures
Supported - views
- vr
Presentation Attributes - ALPHA_
ADD - ALPHA_
COMBINE - ALPHA_
DISABLE - ALPHA_
INTERPOLATE - ALPHA_
MAXIMIZED - ALPHA_
MULTIPLY - ALPHA_
ONEONE - ALPHA_
PREMULTIPLIED - ALPHA_
PREMULTIPLIED_ PORTERDUFF - ALPHA_
SCREENMODE - ALPHA_
SUBTRACT - ALWAYS
- Audio
Engine Factory - DECR
- DECR_
WRAP - DELAYLOADSTATE_
LOADED - DELAYLOADSTATE_
LOADING - DELAYLOADSTATE_
NONE - DELAYLOADSTATE_
NOTLOADED - EQUAL
- GEQUAL
- GREATER
- INCR
- INCR_
WRAP - INVERT
- KEEP
- LEQUAL
- LESS
- NEVER
- NOTEQUAL
- Offline
Provider Factory - REPLACE
- SCALEMODE_
CEILING - SCALEMODE_
FLOOR - SCALEMODE_
NEAREST - TEXTUREFORMAT_
ALPHA - TEXTUREFORMAT_
LUMINANCE - TEXTUREFORMAT_
LUMINANCE_ ALPHA - TEXTUREFORMAT_
R - TEXTUREFORMAT_
RED - TEXTUREFORMAT_
RED_ INTEGER - TEXTUREFORMAT_
RG - TEXTUREFORMAT_
RGB - TEXTUREFORMAT_
RGBA - TEXTUREFORMAT_
RGBA_ INTEGER - TEXTUREFORMAT_
RGB_ INTEGER - TEXTUREFORMAT_
RG_ INTEGER - TEXTUREFORMAT_
R_INTEGER - TEXTURETYPE_
BYTE - TEXTURETYPE_
FLOAT - TEXTURETYPE_
FLOAT_ 32_ UNSIGNED_ INT_ 24_ 8_REV - TEXTURETYPE_
HALF_ FLOAT - TEXTURETYPE_
INT - TEXTURETYPE_
SHORT - TEXTURETYPE_
UNSIGNED_ BYTE - TEXTURETYPE_
UNSIGNED_ INT - TEXTURETYPE_
UNSIGNED_ INTEGER - TEXTURETYPE_
UNSIGNED_ INT_ 10 F_ 11 F_ 11 F_ REV - TEXTURETYPE_
UNSIGNED_ INT_ 24_ 8 - TEXTURETYPE_
UNSIGNED_ INT_ 2_10_ 10_ 10_ REV - TEXTURETYPE_
UNSIGNED_ INT_ 5_9_ 9_9_ REV - TEXTURETYPE_
UNSIGNED_ SHORT - TEXTURETYPE_
UNSIGNED_ SHORT_ 4_4_ 4_4 - TEXTURETYPE_
UNSIGNED_ SHORT_ 5_5_ 5_1 - TEXTURETYPE_
UNSIGNED_ SHORT_ 5_6_ 5 - TEXTURE_
BILINEAR_ SAMPLINGMODE - TEXTURE_
CLAMP_ ADDRESSMODE - TEXTURE_
CUBIC_ MODE - TEXTURE_
EQUIRECTANGULAR_ MODE - TEXTURE_
EXPLICIT_ MODE - TEXTURE_
FIXED_ EQUIRECTANGULAR_ MIRRORED_ MODE - TEXTURE_
FIXED_ EQUIRECTANGULAR_ MODE - TEXTURE_
INVCUBIC_ MODE - TEXTURE_
LINEAR_ LINEAR - TEXTURE_
LINEAR_ LINEAR_ MIPLINEAR - TEXTURE_
LINEAR_ LINEAR_ MIPNEAREST - TEXTURE_
LINEAR_ NEAREST - TEXTURE_
LINEAR_ NEAREST_ MIPLINEAR - TEXTURE_
LINEAR_ NEAREST_ MIPNEAREST - TEXTURE_
MIRROR_ ADDRESSMODE - TEXTURE_
NEAREST_ LINEAR - TEXTURE_
NEAREST_ LINEAR_ MIPLINEAR - TEXTURE_
NEAREST_ LINEAR_ MIPNEAREST - TEXTURE_
NEAREST_ NEAREST - TEXTURE_
NEAREST_ NEAREST_ MIPLINEAR - TEXTURE_
NEAREST_ NEAREST_ MIPNEAREST - TEXTURE_
NEAREST_ SAMPLINGMODE - TEXTURE_
PLANAR_ MODE - TEXTURE_
PROJECTION_ MODE - TEXTURE_
SKYBOX_ MODE - TEXTURE_
SPHERICAL_ MODE - TEXTURE_
TRILINEAR_ SAMPLINGMODE - TEXTURE_
WRAP_ ADDRESSMODE - _
Rescale Post Process Factory - audio
Engine
Accessors
Methods
- _delete
Pipeline Context - _render
Loop - are
All Effects Ready - begin
Frame - begin
Occlusion Query - begin
Transform Feedback - bind
Buffers - bind
Framebuffer - bind
Multiview Framebuffer - bind
Samplers - bind
Transform Feedback - bind
Transform Feedback Buffer - bind
Uniform Block - bind
Uniform Buffer - bind
Uniform Buffer Base - cache
Stencil State - clear
- create
Dynamic Uniform Buffer - create
Dynamic Vertex Buffer - create
Effect For Particles - create
Index Buffer - create
Instances Buffer - create
Multiview Render Target Texture - create
Query - create
Render Target Texture - create
Shader Program - create
Texture - create
Transform Feedback - create
Uniform Buffer - create
Vertex Buffer - delete
Instances Buffer - delete
Query - delete
Transform Feedback - disable
Scissor - disableVR
- display
LoadingUI - dispose
- draw
- draw
Arrays Type - draw
Elements Type - enable
Effect - enable
Scissor - enableVR
- end
Frame - end
Occlusion Query - end
Time Query - end
Transform Feedback - enter
Fullscreen - enter
Pointerlock - exit
Fullscreen - exit
Pointerlock - generate
Mip Maps For Cubemap - get
Aspect Ratio - get
Attributes - get
Delta Time - get
Depth Buffer - get
Depth Function - get
Depth Write - get
Fps - get
Fragment Shader Source - get
Hardware Scaling Level - get
Input Element - get
Input Element Client Rect - get
Lockstep Max Steps - get
Query Result - get
Render Height - get
Render Width - get
Rendering Canvas Client Rect - get
Screen Aspect Ratio - get
Stencil Buffer - get
Stencil Function - get
Stencil Function Mask - get
Stencil Function Reference - get
Stencil Mask - get
Stencil Operation Depth Fail - get
Stencil Operation Fail - get
Stencil Operation Pass - get
Time Step - get
Uniforms - getVRDevice
- get
Vertex Shader Source - getZOffset
- hide
LoadingUI - init
WebVR - init
WebVRAsync - is
Deterministic Lock Step - is
Query Result Available - isVRDevice
Present - isVRPresenting
- register
View - release
Effects - resize
- restore
Stencil State - scissor
Clear - set
Alpha Mode - set
Array - set
Array2 - set
Array3 - set
Array4 - set
Bool - set
Compressed Texture Exclusions - set
Depth Buffer - set
Depth Function - set
Depth Function ToGreater - set
Depth Function ToGreater OrEqual - set
Depth Function ToLess - set
Depth Function ToLess OrEqual - set
Depth Stencil Texture - set
Depth Write - set
Direct Viewport - set
Dithering State - set
Float - set
Float2 - set
Float3 - set
Float4 - set
Float Array - set
Float Array2 - set
Float Array3 - set
Float Array4 - set
Int Array - set
Int Array2 - set
Int Array3 - set
Int Array4 - set
Matrices - set
Matrix2x2 - set
Matrix3x3 - set
Rasterizer State - set
Size - set
State - set
Stencil Buffer - set
Stencil Function - set
Stencil Function Mask - set
Stencil Function Reference - set
Stencil Mask - set
Stencil Operation Depth Fail - set
Stencil Operation Fail - set
Stencil Operation Pass - set
Texture Format ToUse - set
Texture From Post Process - set
Texture From Post Process Output - set
Tranform Feedback Varyings - set
Viewport - setZOffset
- start
Time Query - switch
Fullscreen - un
Bind Framebuffer - un
Register View - update
Dynamic Index Buffer - update
Dynamic Texture - update
Dynamic Vertex Buffer - update
Render Target Texture Sample Count - update
Texture Comparison Function - update
Texture Sampling Mode - update
Uniform Buffer - wipe
Caches - Default
Loading Screen Factory - Mark
All Materials AsDirty - _
Exit Fullscreen - _
Exit Pointerlock - _
Request Fullscreen - _
Request Pointerlock
Constructors
constructor
-
Parameters
-
Optional options: NullEngineOptions
Returns NullEngine
-
Properties
active ViewSearch playground for activeView
Gets the current engine view
canvas Tab IndexSearch playground for canvasTabIndex
Gets or sets the tab index to set to the rendering canvas. 1 is the minimum value to set to be able to capture keyboard events
custom Animation Frame RequesterSearch playground for customAnimationFrameRequester
If set, will be used to request the next animation frame for the render loop
disable Manifest CheckSearch playground for disableManifestCheck
Gets or sets a boolean to enable/disable checking manifest if IndexedDB support is enabled (js will always consider the database is up to date)
disable Performance Monitor InBackgroundSearch playground for disablePerformanceMonitorInBackground
Turn this value on if you want to pause FPS computation when in background
enable Offline SupportSearch playground for enableOfflineSupport
Gets or sets a boolean to enable/disable IndexedDB support and avoid XHR on .manifest
input ElementSearch playground for inputElement
Gets or sets the HTML element to use for attaching events
is InVRExclusive Pointer ModeSearch playground for isInVRExclusivePointerMode
Gets a boolean indicating that the engine is currently in VR exclusive mode for the pointers
is Pointer LockSearch playground for isPointerLock
Gets a boolean indicating if the pointer is currently locked
on After Shader Compilation ObservableSearch playground for onAfterShaderCompilationObservable
Observable raised when the engine has jsut compiled a shader
on Before Shader Compilation ObservableSearch playground for onBeforeShaderCompilationObservable
Observable raised when the engine is about to compile a shader
on Begin Frame ObservableSearch playground for onBeginFrameObservable
Observable raised when the engine begins a new frame
on Canvas Blur ObservableSearch playground for onCanvasBlurObservable
Observable event triggered each time the canvas loses focus
on Canvas Focus ObservableSearch playground for onCanvasFocusObservable
Observable event triggered each time the canvas gains focus
on Canvas Pointer Out ObservableSearch playground for onCanvasPointerOutObservable
Observable event triggered each time the canvas receives pointerout event
on End Frame ObservableSearch playground for onEndFrameObservable
Observable raised when the engine ends the current frame
on New Scene Added ObservableSearch playground for onNewSceneAddedObservable
Event raised when a new scene is created
on Resize ObservableSearch playground for onResizeObservable
Observable event triggered each time the rendering canvas is resized
onVRDisplay Changed ObservableSearch playground for onVRDisplayChangedObservable
Observable signaled when VR display mode changes
onVRRequest Present CompleteSearch playground for onVRRequestPresentComplete
Observable signaled when VR request present is complete
onVRRequest Present StartSearch playground for onVRRequestPresentStart
Observable signaled when VR request present starts
post ProcessesSearch playground for postProcesses
Gets the list of created postprocesses
scenesSearch playground for scenes
Gets the list of created scenes
Readonly texture Format InUseSearch playground for textureFormatInUse
Gets the texture format in use
Readonly textures SupportedSearch playground for texturesSupported
Gets the list of texture formats supported
viewsSearch playground for views
Gets or sets the list of views
Optional vr Presentation AttributesSearch playground for vrPresentationAttributes
Gets or sets the presentation attributes used to configure VR rendering
Static Readonly ALPHA_ ADDSearch playground for ALPHA_ADD
Defines that alpha blending to SRC ALPHA * SRC + DEST
Static Readonly ALPHA_ COMBINESearch playground for ALPHA_COMBINE
Defines that alpha blending to SRC ALPHA * SRC + (1 - SRC ALPHA) * DEST
Static Readonly ALPHA_ DISABLESearch playground for ALPHA_DISABLE
Defines that alpha blending is disabled
Static Readonly ALPHA_ INTERPOLATESearch playground for ALPHA_INTERPOLATE
Defines that alpha blending to CST * SRC + (1 - CST) * DEST
Static Readonly ALPHA_ MAXIMIZEDSearch playground for ALPHA_MAXIMIZED
Defines that alpha blending to SRC ALPHA * SRC + (1 - SRC) * DEST
Static Readonly ALPHA_ MULTIPLYSearch playground for ALPHA_MULTIPLY
Defines that alpha blending to SRC * DEST
Static Readonly ALPHA_ ONEONESearch playground for ALPHA_ONEONE
Defines that alpha blending to SRC + DEST
Static Readonly ALPHA_ PREMULTIPLIEDSearch playground for ALPHA_PREMULTIPLIED
Defines that alpha blending to SRC + (1 - SRC ALPHA) * DEST
Static Readonly ALPHA_ PREMULTIPLIED_ PORTERDUFFSearch playground for ALPHA_PREMULTIPLIED_PORTERDUFF
Defines that alpha blending to SRC + (1 - SRC ALPHA) * DEST Alpha will be set to (1 - SRC ALPHA) * DEST ALPHA
Static Readonly ALPHA_ SCREENMODESearch playground for ALPHA_SCREENMODE
Defines that alpha blending to SRC + (1 - SRC) * DEST Alpha will be set to SRC ALPHA + (1 - SRC ALPHA) * DEST ALPHA
Static Readonly ALPHA_ SUBTRACTSearch playground for ALPHA_SUBTRACT
Defines that alpha blending to DEST - SRC * DEST
Static Readonly ALWAYSSearch playground for ALWAYS
Passed to depthFunction or stencilFunction to specify depth or stencil tests will always pass. i.e. Pixels will be drawn in the order they are drawn
Static Audio Engine FactorySearch playground for AudioEngineFactory
Default AudioEngine factory responsible of creating the Audio Engine. By default, this will create a BabylonJS Audio Engine if the workload has been embedded.
Type declaration
-
-
Parameters
-
hostElement: Nullable<HTMLElement>
Returns IAudioEngine
-
-
Static Readonly DECRSearch playground for DECR
Passed to stencilOperation to specify that stencil value must be decremented
Static Readonly DECR_ WRAPSearch playground for DECR_WRAP
Passed to stencilOperation to specify that stencil value must be decremented with wrapping
Static Readonly DELAYLOADSTATE_ LOADEDSearch playground for DELAYLOADSTATE_LOADED
Defines that the ressource was successfully delay loaded
Static Readonly DELAYLOADSTATE_ LOADINGSearch playground for DELAYLOADSTATE_LOADING
Defines that the ressource is currently delay loading
Static Readonly DELAYLOADSTATE_ NONESearch playground for DELAYLOADSTATE_NONE
Defines that the ressource is not delayed
Static Readonly DELAYLOADSTATE_ NOTLOADEDSearch playground for DELAYLOADSTATE_NOTLOADED
Defines that the ressource is delayed and has not started loading
Static Readonly EQUALSearch playground for EQUAL
Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is equals to the stored value
Static Readonly GEQUALSearch playground for GEQUAL
Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is greater than or equal to the stored value
Static Readonly GREATERSearch playground for GREATER
Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is greater than the stored value
Static Readonly INCRSearch playground for INCR
Passed to stencilOperation to specify that stencil value must be incremented
Static Readonly INCR_ WRAPSearch playground for INCR_WRAP
Passed to stencilOperation to specify that stencil value must be incremented with wrapping
Static Readonly INVERTSearch playground for INVERT
Passed to stencilOperation to specify that stencil value must be inverted
Static Readonly KEEPSearch playground for KEEP
Passed to stencilOperation to specify that stencil value must be kept
Static Readonly LEQUALSearch playground for LEQUAL
Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is less than or equal to the stored value
Static Readonly LESSSearch playground for LESS
Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is less than the stored value
Static Readonly NEVERSearch playground for NEVER
Passed to depthFunction or stencilFunction to specify depth or stencil tests will never pass. i.e. Nothing will be drawn
Static Readonly NOTEQUALSearch playground for NOTEQUAL
Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is not equal to the stored value
Static Offline Provider FactorySearch playground for OfflineProviderFactory
Default offline support factory responsible of creating a tool used to store data locally. By default, this will create a Database object if the workload has been embedded.
Type declaration
-
-
Parameters
-
urlToScene: string
-
callbackManifestChecked: (checked: boolean) => any
-
-
Parameters
-
checked: boolean
Returns any
-
-
-
-
disableManifestCheck: boolean
Returns IOfflineProvider
-
-
Static Readonly REPLACESearch playground for REPLACE
Passed to stencilOperation to specify that stencil value must be replaced
Static Readonly SCALEMODE_ CEILINGSearch playground for SCALEMODE_CEILING
Defines that texture rescaling will use a ceil to find the closer power of 2 size
Static Readonly SCALEMODE_ FLOORSearch playground for SCALEMODE_FLOOR
Defines that texture rescaling will use a floor to find the closer power of 2 size
Static Readonly SCALEMODE_ NEARESTSearch playground for SCALEMODE_NEAREST
Defines that texture rescaling will look for the nearest power of 2 size
Static Readonly TEXTUREFORMAT_ ALPHASearch playground for TEXTUREFORMAT_ALPHA
ALPHA
Static Readonly TEXTUREFORMAT_ LUMINANCESearch playground for TEXTUREFORMAT_LUMINANCE
LUMINANCE
Static Readonly TEXTUREFORMAT_ LUMINANCE_ ALPHASearch playground for TEXTUREFORMAT_LUMINANCE_ALPHA
LUMINANCE_ALPHA
Static Readonly TEXTUREFORMAT_ RSearch playground for TEXTUREFORMAT_R
RED (2nd reference)
Static Readonly TEXTUREFORMAT_ REDSearch playground for TEXTUREFORMAT_RED
RED
Static Readonly TEXTUREFORMAT_ RED_ INTEGERSearch playground for TEXTUREFORMAT_RED_INTEGER
RED_INTEGER
Static Readonly TEXTUREFORMAT_ RGSearch playground for TEXTUREFORMAT_RG
RG
Static Readonly TEXTUREFORMAT_ RGBSearch playground for TEXTUREFORMAT_RGB
RGB
Static Readonly TEXTUREFORMAT_ RGBASearch playground for TEXTUREFORMAT_RGBA
RGBA
Static Readonly TEXTUREFORMAT_ RGBA_ INTEGERSearch playground for TEXTUREFORMAT_RGBA_INTEGER
RGBA_INTEGER
Static Readonly TEXTUREFORMAT_ RGB_ INTEGERSearch playground for TEXTUREFORMAT_RGB_INTEGER
RGB_INTEGER
Static Readonly TEXTUREFORMAT_ RG_ INTEGERSearch playground for TEXTUREFORMAT_RG_INTEGER
RG_INTEGER
Static Readonly TEXTUREFORMAT_ R_INTEGERSearch playground for TEXTUREFORMAT_R_INTEGER
RED_INTEGER (2nd reference)
Static Readonly TEXTURETYPE_ BYTESearch playground for TEXTURETYPE_BYTE
BYTE
Static Readonly TEXTURETYPE_ FLOATSearch playground for TEXTURETYPE_FLOAT
FLOAT
Static Readonly TEXTURETYPE_ FLOAT_ 32_ UNSIGNED_ INT_ 24_ 8_REVSearch playground for TEXTURETYPE_FLOAT_32_UNSIGNED_INT_24_8_REV
FLOAT_32_UNSIGNED_INT_24_8_REV
Static Readonly TEXTURETYPE_ HALF_ FLOATSearch playground for TEXTURETYPE_HALF_FLOAT
HALF_FLOAT
Static Readonly TEXTURETYPE_ INTSearch playground for TEXTURETYPE_INT
INT
Static Readonly TEXTURETYPE_ SHORTSearch playground for TEXTURETYPE_SHORT
SHORT
Static Readonly TEXTURETYPE_ UNSIGNED_ BYTESearch playground for TEXTURETYPE_UNSIGNED_BYTE
UNSIGNED_BYTE
Static Readonly TEXTURETYPE_ UNSIGNED_ INTSearch playground for TEXTURETYPE_UNSIGNED_INT
UNSIGNED_BYTE (2nd reference)
Static Readonly TEXTURETYPE_ UNSIGNED_ INTEGERSearch playground for TEXTURETYPE_UNSIGNED_INTEGER
UNSIGNED_INT
Static Readonly TEXTURETYPE_ UNSIGNED_ INT_ 10 F_ 11 F_ 11 F_ REVSearch playground for TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV
UNSIGNED_INT_10F_11F_11F_REV
Static Readonly TEXTURETYPE_ UNSIGNED_ INT_ 24_ 8Search playground for TEXTURETYPE_UNSIGNED_INT_24_8
UNSIGNED_INT_24_8
Static Readonly TEXTURETYPE_ UNSIGNED_ INT_ 2_10_ 10_ 10_ REVSearch playground for TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV
UNSIGNED_INT_2_10_10_10_REV
Static Readonly TEXTURETYPE_ UNSIGNED_ INT_ 5_9_ 9_9_ REVSearch playground for TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV
UNSIGNED_INT_5_9_9_9_REV
Static Readonly TEXTURETYPE_ UNSIGNED_ SHORTSearch playground for TEXTURETYPE_UNSIGNED_SHORT
UNSIGNED_SHORT
Static Readonly TEXTURETYPE_ UNSIGNED_ SHORT_ 4_4_ 4_4Search playground for TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4
UNSIGNED_SHORT_4_4_4_4
Static Readonly TEXTURETYPE_ UNSIGNED_ SHORT_ 5_5_ 5_1Search playground for TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1
UNSIGNED_SHORT_5_5_5_1
Static Readonly TEXTURETYPE_ UNSIGNED_ SHORT_ 5_6_ 5Search playground for TEXTURETYPE_UNSIGNED_SHORT_5_6_5
UNSIGNED_SHORT_5_6_5
Static Readonly TEXTURE_ BILINEAR_ SAMPLINGMODESearch playground for TEXTURE_BILINEAR_SAMPLINGMODE
Bilinear is mag = linear and min = linear and mip = nearest
Static Readonly TEXTURE_ CLAMP_ ADDRESSMODESearch playground for TEXTURE_CLAMP_ADDRESSMODE
Texture is not repeating outside of 0..1 UVs
Static Readonly TEXTURE_ CUBIC_ MODESearch playground for TEXTURE_CUBIC_MODE
Cubic coordinates mode
Static Readonly TEXTURE_ EQUIRECTANGULAR_ MODESearch playground for TEXTURE_EQUIRECTANGULAR_MODE
Equirectangular coordinates mode
Static Readonly TEXTURE_ EXPLICIT_ MODESearch playground for TEXTURE_EXPLICIT_MODE
Explicit coordinates mode
Static Readonly TEXTURE_ FIXED_ EQUIRECTANGULAR_ MIRRORED_ MODESearch playground for TEXTURE_FIXED_EQUIRECTANGULAR_MIRRORED_MODE
Equirectangular Fixed Mirrored coordinates mode
Static Readonly TEXTURE_ FIXED_ EQUIRECTANGULAR_ MODESearch playground for TEXTURE_FIXED_EQUIRECTANGULAR_MODE
Equirectangular Fixed coordinates mode
Static Readonly TEXTURE_ INVCUBIC_ MODESearch playground for TEXTURE_INVCUBIC_MODE
Inverse Cubic coordinates mode
Static Readonly TEXTURE_ LINEAR_ LINEARSearch playground for TEXTURE_LINEAR_LINEAR
mag = linear and min = linear and mip = none
Static Readonly TEXTURE_ LINEAR_ LINEAR_ MIPLINEARSearch playground for TEXTURE_LINEAR_LINEAR_MIPLINEAR
Trilinear is mag = linear and min = linear and mip = linear
Static Readonly TEXTURE_ LINEAR_ LINEAR_ MIPNEARESTSearch playground for TEXTURE_LINEAR_LINEAR_MIPNEAREST
Bilinear is mag = linear and min = linear and mip = nearest
Static Readonly TEXTURE_ LINEAR_ NEARESTSearch playground for TEXTURE_LINEAR_NEAREST
mag = linear and min = nearest and mip = none
Static Readonly TEXTURE_ LINEAR_ NEAREST_ MIPLINEARSearch playground for TEXTURE_LINEAR_NEAREST_MIPLINEAR
mag = linear and min = nearest and mip = linear
Static Readonly TEXTURE_ LINEAR_ NEAREST_ MIPNEARESTSearch playground for TEXTURE_LINEAR_NEAREST_MIPNEAREST
mag = linear and min = nearest and mip = nearest
Static Readonly TEXTURE_ MIRROR_ ADDRESSMODESearch playground for TEXTURE_MIRROR_ADDRESSMODE
Texture is repeating and mirrored
Static Readonly TEXTURE_ NEAREST_ LINEARSearch playground for TEXTURE_NEAREST_LINEAR
mag = nearest and min = linear and mip = none
Static Readonly TEXTURE_ NEAREST_ LINEAR_ MIPLINEARSearch playground for TEXTURE_NEAREST_LINEAR_MIPLINEAR
mag = nearest and min = linear and mip = linear
Static Readonly TEXTURE_ NEAREST_ LINEAR_ MIPNEARESTSearch playground for TEXTURE_NEAREST_LINEAR_MIPNEAREST
mag = nearest and min = linear and mip = nearest
Static Readonly TEXTURE_ NEAREST_ NEARESTSearch playground for TEXTURE_NEAREST_NEAREST
mag = nearest and min = nearest and mip = none
Static Readonly TEXTURE_ NEAREST_ NEAREST_ MIPLINEARSearch playground for TEXTURE_NEAREST_NEAREST_MIPLINEAR
nearest is mag = nearest and min = nearest and mip = linear
Static Readonly TEXTURE_ NEAREST_ NEAREST_ MIPNEARESTSearch playground for TEXTURE_NEAREST_NEAREST_MIPNEAREST
mag = nearest and min = nearest and mip = nearest
Static Readonly TEXTURE_ NEAREST_ SAMPLINGMODESearch playground for TEXTURE_NEAREST_SAMPLINGMODE
nearest is mag = nearest and min = nearest and mip = none
Static Readonly TEXTURE_ PLANAR_ MODESearch playground for TEXTURE_PLANAR_MODE
Planar coordinates mode
Static Readonly TEXTURE_ PROJECTION_ MODESearch playground for TEXTURE_PROJECTION_MODE
Projection coordinates mode
Static Readonly TEXTURE_ SKYBOX_ MODESearch playground for TEXTURE_SKYBOX_MODE
Skybox coordinates mode
Static Readonly TEXTURE_ SPHERICAL_ MODESearch playground for TEXTURE_SPHERICAL_MODE
Spherical coordinates mode
Static Readonly TEXTURE_ TRILINEAR_ SAMPLINGMODESearch playground for TEXTURE_TRILINEAR_SAMPLINGMODE
Trilinear is mag = linear and min = linear and mip = linear
Static Readonly TEXTURE_ WRAP_ ADDRESSMODESearch playground for TEXTURE_WRAP_ADDRESSMODE
Texture is repeating outside of 0..1 UVs
Static _ Rescale Post Process FactorySearch playground for _RescalePostProcessFactory
Method called to create the default rescale post process on each engine.
Static audio EngineSearch playground for audioEngine
Gets the audio engine
Accessors
loading Screen
-
Gets the current loading screen object
Returns ILoadingScreen
-
Sets the current loading screen object
Parameters
-
loadingScreen: ILoadingScreen
Returns any
-
loadingUIBackground Color
-
Sets the current loading screen background color
Parameters
-
color: string
Returns any
-
loadingUIText
-
Sets the current loading screen text
Parameters
-
text: string
Returns any
-
performance Monitor
-
Gets the performance monitor attached to this engine
Returns PerformanceMonitor
Static Instances
-
Gets the list of created engines
Returns Engine[]
Static Last Created Engine
Static Last Created Scene
Static Npm Package
-
Returns the current npm package of the sdk
Returns string
Static Version
-
Returns the current version of the framework
Returns string
Methods
_delete Pipeline ContextSearch playground for _deletePipelineContext
-
Parameters
-
pipelineContext: IPipelineContext
Returns void
-
_render LoopSearch playground for _renderLoop
-
Returns void
are All Effects ReadySearch playground for areAllEffectsReady
-
Gets a boolean indicating if all created effects are ready
Returns boolean
true if all effects are ready
begin FrameSearch playground for beginFrame
-
Begin a new frame
Returns void
begin Occlusion QuerySearch playground for beginOcclusionQuery
-
Initiates an occlusion query
Parameters
-
algorithmType: number
defines the algorithm to use
-
query: WebGLQuery
defines the query to use
Returns Engine
the current engine
-
begin Transform FeedbackSearch playground for beginTransformFeedback
-
Begins a transform feedback operation
Parameters
-
usePoints: boolean
defines if points or triangles must be used
Returns void
-
bind BuffersSearch playground for bindBuffers
-
Bind webGl buffers directly to the webGL context
Parameters
-
vertexBuffers: {}
defines the vertex buffer to bind
-
[key: string]: VertexBuffer
-
-
indexBuffer: DataBuffer
defines the index buffer to bind
-
effect: Effect
defines the effect associated with the vertex buffer
Returns void
-
bind FramebufferSearch playground for bindFramebuffer
-
Binds the frame buffer to the specified texture.
Parameters
-
texture: InternalTexture
The texture to render to or null for the default canvas
-
Optional faceIndex: number
The face of the texture to render to in case of cube texture
-
Optional requiredWidth: number
The width of the target to render to
-
Optional requiredHeight: number
The height of the target to render to
-
Optional forceFullscreenViewport: boolean
Forces the viewport to be the entire texture/screen if true
Returns void
-
bind Multiview FramebufferSearch playground for bindMultiviewFramebuffer
-
Binds a multiview framebuffer to be drawn to
Parameters
-
multiviewTexture: InternalTexture
texture to bind
Returns void
-
bind SamplersSearch playground for bindSamplers
-
Binds an effect to the webGL context
Parameters
-
effect: Effect
defines the effect to bind
Returns void
-
bind Transform FeedbackSearch playground for bindTransformFeedback
-
Bind a webGL transform feedback object to the webgl context
Parameters
-
value: Nullable<WebGLTransformFeedback>
defines the webGL transform feedback object to bind
Returns void
-
bind Transform Feedback BufferSearch playground for bindTransformFeedbackBuffer
-
Bind a webGL buffer for a transform feedback operation
Parameters
-
value: Nullable<DataBuffer>
defines the webGL buffer to bind
Returns void
-
bind Uniform BlockSearch playground for bindUniformBlock
-
Bind a specific block at a given index in a specific shader program
Parameters
-
pipelineContext: IPipelineContext
defines the pipeline context to use
-
blockName: string
defines the block name
-
index: number
defines the index where to bind the block
Returns void
-
bind Uniform BufferSearch playground for bindUniformBuffer
-
Bind an uniform buffer to the current webGL context
Parameters
-
buffer: Nullable<DataBuffer>
defines the buffer to bind
Returns void
-
bind Uniform Buffer BaseSearch playground for bindUniformBufferBase
-
Bind a buffer to the current webGL context at a given location
Parameters
-
buffer: DataBuffer
defines the buffer to bind
-
location: number
defines the index where to bind the buffer
-
name: string
Name of the uniform variable to bind
Returns void
-
cache Stencil StateSearch playground for cacheStencilState
-
Caches the the state of the stencil buffer
Returns void
clearSearch playground for clear
-
Clear the current render buffer or the current render target (if any is set up)
Parameters
-
color: IColor4Like
defines the color to use
-
backBuffer: boolean
defines if the back buffer must be cleared
-
depth: boolean
defines if the depth buffer must be cleared
-
Optional stencil: boolean
defines if the stencil buffer must be cleared
Returns void
-
create Dynamic Uniform BufferSearch playground for createDynamicUniformBuffer
-
Create a dynamic uniform buffer
Parameters
-
elements: FloatArray
defines the content of the uniform buffer
Returns DataBuffer
the webGL uniform buffer
-
create Dynamic Vertex BufferSearch playground for createDynamicVertexBuffer
-
Creates a dynamic vertex buffer
Parameters
-
vertices: FloatArray
the data for the dynamic vertex buffer
Returns DataBuffer
the new WebGL dynamic buffer
-
create Effect For ParticlesSearch playground for createEffectForParticles
-
Create an effect to use with particle systems. Please note that some parameters like animation sheets or not being billboard are not supported in this configuration, except if you pass the particle system for which you want to create a custom effect in the last parameter
Parameters
-
fragmentName: string
defines the base name of the effect (The name of file without .fragment.fx)
-
uniformsNames: string[]
defines a list of attribute names
-
samplers: string[]
defines an array of string used to represent textures
-
defines: string
defines the string containing the defines to use to compile the shaders
-
Optional fallbacks: EffectFallbacks
defines the list of potential fallbacks to use if shader conmpilation fails
-
Optional onCompiled: (effect: Effect) => void
defines a function to call when the effect creation is successful
-
-
Parameters
-
effect: Effect
Returns void
-
-
-
-
Optional onError: (effect: Effect, errors: string) => void
defines a function to call when the effect creation has failed
-
-
Parameters
-
effect: Effect
-
errors: string
Returns void
-
-
-
-
Optional particleSystem: IParticleSystem
the particle system you want to create the effect for
Returns Effect
the new Effect
-
create Index BufferSearch playground for createIndexBuffer
-
Creates a new index buffer
Parameters
-
indices: IndicesArray
defines the content of the index buffer
Returns DataBuffer
a new webGL buffer
-
create Instances BufferSearch playground for createInstancesBuffer
-
Creates a webGL buffer to use with instanciation
Parameters
-
capacity: number
defines the size of the buffer
Returns DataBuffer
the webGL buffer
-
create Multiview Render Target TextureSearch playground for createMultiviewRenderTargetTexture
-
Creates a new multiview render target
Parameters
-
width: number
defines the width of the texture
-
height: number
defines the height of the texture
Returns InternalTexture
the created multiview texture
-
create QuerySearch playground for createQuery
-
Create a new webGL query (you must be sure that queries are supported by checking getCaps() function)
Returns WebGLQuery
the new query
create Render Target TextureSearch playground for createRenderTargetTexture
-
Creates a new render target texture
Parameters
-
size: any
defines the size of the texture
-
options: boolean | RenderTargetCreationOptions
defines the options used to create the texture
Returns InternalTexture
a new render target texture stored in an InternalTexture
-
create Shader ProgramSearch playground for createShaderProgram
-
Parameters
-
pipelineContext: IPipelineContext
-
vertexCode: string
-
fragmentCode: string
-
defines: string
-
Optional context: WebGLRenderingContext
Returns WebGLProgram
-
create TextureSearch playground for createTexture
-
Usually called from Texture.ts. Passed information to create a WebGLTexture
Parameters
-
urlArg: Nullable<string>
defines a value which contains one of the following:
- A conventional http URL, e.g. 'http://...' or 'file://...'
- A base64 string of in-line texture data, e.g. 'data:image/jpg;base64,/...'
- An indicator that data being passed using the buffer parameter, e.g. 'data:mytexture.jpg'
-
noMipmap: boolean
defines a boolean indicating that no mipmaps shall be generated. Ignored for compressed textures. They must be in the file
-
invertY: boolean
when true, image is flipped when loaded. You probably want true. Certain compressed textures may invert this if their default is inverted (eg. ktx)
-
scene: Nullable<ISceneLike>
needed for loading to the correct scene
-
Optional samplingMode: number
mode with should be used sample / access the texture (Default: Texture.TRILINEAR_SAMPLINGMODE)
-
Optional onLoad: Nullable<() => void>
optional callback to be called upon successful completion
-
Optional onError: Nullable<(message: string, exception: any) => void>
optional callback to be called upon failure
-
Optional buffer: Nullable<string | ArrayBuffer | ArrayBufferView | HTMLImageElement | Blob | ImageBitmap>
a source of a file previously fetched as either a base64 string, an ArrayBuffer (compressed or image format), HTMLImageElement (image format), or a Blob
-
Optional fallback: Nullable<InternalTexture>
an internal argument in case the function must be called again, due to etc1 not having alpha capabilities
-
Optional format: Nullable<number>
internal format. Default: RGB when extension is '.jpg' else RGBA. Ignored for compressed textures
-
Optional forcedExtension: Nullable<string>
defines the extension to use to pick the right loader
-
Optional mimeType: string
defines an optional mime type
Returns InternalTexture
a InternalTexture for assignment back into BABYLON.Texture
-
create Transform FeedbackSearch playground for createTransformFeedback
-
Creates a webGL transform feedback object Please makes sure to check webGLVersion property to check if you are running webGL 2+
Returns WebGLTransformFeedback
the webGL transform feedback object
create Uniform BufferSearch playground for createUniformBuffer
-
Create an uniform buffer
Parameters
-
elements: FloatArray
defines the content of the uniform buffer
Returns DataBuffer
the webGL uniform buffer
-
create Vertex BufferSearch playground for createVertexBuffer
-
Creates a vertex buffer
Parameters
-
vertices: FloatArray
the data for the vertex buffer
Returns DataBuffer
the new WebGL static buffer
-
delete Instances BufferSearch playground for deleteInstancesBuffer
-
Delete a webGL buffer used with instanciation
Parameters
-
buffer: WebGLBuffer
defines the webGL buffer to delete
Returns void
-
delete QuerySearch playground for deleteQuery
-
Delete and release a webGL query
Parameters
-
query: WebGLQuery
defines the query to delete
Returns Engine
the current engine
-
delete Transform FeedbackSearch playground for deleteTransformFeedback
-
Delete a webGL transform feedback object
Parameters
-
value: WebGLTransformFeedback
defines the webGL transform feedback object to delete
Returns void
-
disable ScissorSearch playground for disableScissor
-
Disable previously set scissor test rectangle
Returns void
disableVRSearch playground for disableVR
-
Call this function to leave webVR mode Will do nothing if webVR is not supported or if there is no webVR device
Returns void
display LoadingUISearch playground for displayLoadingUI
-
Returns void
disposeSearch playground for dispose
-
Returns void
drawSearch playground for draw
-
Send a draw order
Parameters
-
useTriangles: boolean
defines if triangles must be used to draw (else wireframe will be used)
-
indexStart: number
defines the starting index
-
indexCount: number
defines the number of index to draw
-
Optional instancesCount: number
defines the number of instances to draw (if instanciation is enabled)
Returns void
-
draw Arrays TypeSearch playground for drawArraysType
-
Draw a list of unindexed primitives
Parameters
-
fillMode: number
defines the primitive to use
-
verticesStart: number
defines the index of first vertex to draw
-
verticesCount: number
defines the count of vertices to draw
-
Optional instancesCount: number
defines the number of instances to draw (if instanciation is enabled)
Returns void
-
draw Elements TypeSearch playground for drawElementsType
-
Draw a list of indexed primitives
Parameters
-
fillMode: number
defines the primitive to use
-
indexStart: number
defines the starting index
-
indexCount: number
defines the number of index to draw
-
Optional instancesCount: number
defines the number of instances to draw (if instanciation is enabled)
Returns void
-
enable EffectSearch playground for enableEffect
-
Activates an effect, mkaing it the current one (ie. the one used for rendering)
Parameters
-
effect: Effect
defines the effect to activate
Returns void
-
enable ScissorSearch playground for enableScissor
-
Enable scissor test on a specific rectangle (ie. render will only be executed on a specific portion of the screen)
Parameters
-
x: number
defines the x-coordinate of the top left corner of the clear rectangle
-
y: number
defines the y-coordinate of the corner of the clear rectangle
-
width: number
defines the width of the clear rectangle
-
height: number
defines the height of the clear rectangle
Returns void
-
enableVRSearch playground for enableVR
-
Call this function to switch to webVR mode Will do nothing if webVR is not supported or if there is no webVR device
Parameters
-
options: WebVROptions
the webvr options provided to the camera. mainly used for multiview
Returns void
-
end FrameSearch playground for endFrame
-
End the current frame
Returns void
end Occlusion QuerySearch playground for endOcclusionQuery
-
Ends an occlusion query
Parameters
-
algorithmType: number
defines the algorithm to use
Returns Engine
the current engine
-
end Time QuerySearch playground for endTimeQuery
-
Ends a time query
Parameters
-
token: _TimeToken
defines the token used to measure the time span
Returns int
the time spent (in ns)
-
end Transform FeedbackSearch playground for endTransformFeedback
-
Ends a transform feedback operation
Returns void
enter FullscreenSearch playground for enterFullscreen
-
Enters full screen mode
Parameters
-
requestPointerLock: boolean
defines if a pointer lock should be requested from the user
Returns void
-
enter PointerlockSearch playground for enterPointerlock
-
Enters Pointerlock mode
Returns void
exit FullscreenSearch playground for exitFullscreen
-
Exits full screen mode
Returns void
exit PointerlockSearch playground for exitPointerlock
-
Exits Pointerlock mode
Returns void
generate Mip Maps For CubemapSearch playground for generateMipMapsForCubemap
-
Force the mipmap generation for the given render target texture
Parameters
-
texture: InternalTexture
defines the render target texture to use
-
Optional unbind: boolean
defines whether or not to unbind the texture after generation. Defaults to true.
Returns void
-
get Aspect RatioSearch playground for getAspectRatio
-
Gets current aspect ratio
Parameters
-
viewportOwner: IViewportOwnerLike
defines the camera to use to get the aspect ratio
-
Optional useScreen: boolean
defines if screen size must be used (or the current render target if any)
Returns number
a number defining the aspect ratio
-
get AttributesSearch playground for getAttributes
-
Gets the lsit of active attributes for a given webGL program
Parameters
-
pipelineContext: IPipelineContext
defines the pipeline context to use
-
attributesNames: string[]
defines the list of attribute names to get
Returns number[]
an array of indices indicating the offset of each attribute
-
get Delta TimeSearch playground for getDeltaTime
-
Gets the time spent between current and previous frame
Returns number
a number representing the delta time in ms
get Depth BufferSearch playground for getDepthBuffer
-
Gets a boolean indicating if depth testing is enabled
Returns boolean
the current state
get Depth FunctionSearch playground for getDepthFunction
-
Gets the current depth function
Returns Nullable<number>
a number defining the depth function
get Depth WriteSearch playground for getDepthWrite
-
Gets a boolean indicating if depth writing is enabled
Returns boolean
the current depth writing state
get FpsSearch playground for getFps
-
Gets the current framerate
Returns number
a number representing the framerate
get Fragment Shader SourceSearch playground for getFragmentShaderSource
-
Gets the source code of the fragment shader associated with a specific webGL program
Parameters
-
program: WebGLProgram
defines the program to use
Returns Nullable<string>
a string containing the source code of the fragment shader associated with the program
-
get Hardware Scaling LevelSearch playground for getHardwareScalingLevel
-
Gets the current hardware scaling level. By default the hardware scaling level is computed from the window device ratio. if level = 1 then the engine will render at the exact resolution of the canvas. If level = 0.5 then the engine will render at twice the size of the canvas.
Returns number
a number indicating the current hardware scaling level
get Input ElementSearch playground for getInputElement
-
Gets the HTML element used to attach event listeners
Returns Nullable<HTMLElement>
a HTML element
get Input Element Client RectSearch playground for getInputElementClientRect
-
Gets the client rect of the HTML element used for events
Returns Nullable<ClientRect>
a client rectanglee
get Lockstep Max StepsSearch playground for getLockstepMaxSteps
-
Gets the max steps when engine is running in deterministic lock step
Returns number
the max steps
get Query ResultSearch playground for getQueryResult
-
Gets the value of a given query
Parameters
-
query: WebGLQuery
defines the query to check
Returns number
the value of the query
-
get Render HeightSearch playground for getRenderHeight
-
Gets the current render height
Parameters
-
Optional useScreen: boolean
defines if screen size must be used (or the current render target if any)
Returns number
a number defining the current render height
-
get Render WidthSearch playground for getRenderWidth
-
Gets the current render width
Parameters
-
Optional useScreen: boolean
defines if screen size must be used (or the current render target if any)
Returns number
a number defining the current render width
-
get Rendering Canvas Client RectSearch playground for getRenderingCanvasClientRect
-
Gets the client rect of the HTML canvas attached with the current webGL context
Returns Nullable<ClientRect>
a client rectanglee
get Screen Aspect RatioSearch playground for getScreenAspectRatio
-
Gets current screen aspect ratio
Returns number
a number defining the aspect ratio
get Stencil BufferSearch playground for getStencilBuffer
-
Gets a boolean indicating if stencil buffer is enabled
Returns boolean
the current stencil buffer state
get Stencil FunctionSearch playground for getStencilFunction
-
Gets the current stencil function
Returns number
a number defining the stencil function to use
get Stencil Function MaskSearch playground for getStencilFunctionMask
-
Gets the current stencil mask
Returns number
a number defining the stencil mask to use
get Stencil Function ReferenceSearch playground for getStencilFunctionReference
-
Gets the current stencil reference value
Returns number
a number defining the stencil reference value to use
get Stencil MaskSearch playground for getStencilMask
-
Gets the current stencil mask
Returns number
a number defining the new stencil mask to use
get Stencil Operation Depth FailSearch playground for getStencilOperationDepthFail
-
Gets the current stencil operation when depth fails
Returns number
a number defining stencil operation to use when depth fails
get Stencil Operation FailSearch playground for getStencilOperationFail
-
Gets the current stencil operation when stencil fails
Returns number
a number defining stencil operation to use when stencil fails
get Stencil Operation PassSearch playground for getStencilOperationPass
-
Gets the current stencil operation when stencil passes
Returns number
a number defining stencil operation to use when stencil passes
get Time StepSearch playground for getTimeStep
-
Returns the time in ms between steps when using deterministic lock step.
Returns number
time step in (ms)
get UniformsSearch playground for getUniforms
-
Gets the list of webGL uniform locations associated with a specific program based on a list of uniform names
Parameters
-
pipelineContext: IPipelineContext
defines the pipeline context to use
-
uniformsNames: string[]
defines the list of uniform names
Returns Nullable<WebGLUniformLocation>[]
an array of webGL uniform locations
-
getVRDeviceSearch playground for getVRDevice
-
Gets the current webVR device
Returns any
the current webVR device (or null)
get Vertex Shader SourceSearch playground for getVertexShaderSource
-
Gets the source code of the vertex shader associated with a specific webGL program
Parameters
-
program: WebGLProgram
defines the program to use
Returns Nullable<string>
a string containing the source code of the vertex shader associated with the program
-
getZOffsetSearch playground for getZOffset
-
Gets the current value of the zOffset
Returns number
the current zOffset state
hide LoadingUISearch playground for hideLoadingUI
-
Returns void
init WebVRSearch playground for initWebVR
-
Initializes a webVR display and starts listening to display change events The onVRDisplayChangedObservable will be notified upon these changes
Returns Observable<IDisplayChangedEventArgs>
The onVRDisplayChangedObservable
init WebVRAsyncSearch playground for initWebVRAsync
-
Initializes a webVR display and starts listening to display change events The onVRDisplayChangedObservable will be notified upon these changes
Returns Promise<IDisplayChangedEventArgs>
A promise containing a VRDisplay and if vr is supported
is Deterministic Lock StepSearch playground for isDeterministicLockStep
-
Gets a boolean indicating that the engine is running in deterministic lock step mode
Returns boolean
true if engine is in deterministic lock step mode
is Query Result AvailableSearch playground for isQueryResultAvailable
-
Check if a given query has resolved and got its value
Parameters
-
query: WebGLQuery
defines the query to check
Returns boolean
true if the query got its value
-
isVRDevice PresentSearch playground for isVRDevicePresent
-
Gets a boolean indicating if a webVR device was detected
Returns boolean
true if a webVR device was detected
isVRPresentingSearch playground for isVRPresenting
-
Gets a boolean indicating that the system is in VR mode and is presenting
Returns boolean
true if VR mode is engaged
register ViewSearch playground for registerView
-
Register a new child canvas
Parameters
-
canvas: HTMLCanvasElement
defines the canvas to register
-
Optional camera: Camera
defines an optional camera to use with this canvas (it will overwrite the scene.camera for this view)
Returns EngineView
the associated view
-
release EffectsSearch playground for releaseEffects
-
Force the engine to release all cached effects. This means that next effect compilation will have to be done completely even if a similar effect was already compiled
Returns void
resizeSearch playground for resize
-
Resize the view according to the canvas' size
Parameters
-
Optional forceSetSize: boolean
true to force setting the sizes of the underlying canvas
Returns void
-
restore Stencil StateSearch playground for restoreStencilState
-
Restores the state of the stencil buffer
Returns void
scissor ClearSearch playground for scissorClear
-
Executes a scissor clear (ie. a clear on a specific portion of the screen)
Parameters
-
x: number
defines the x-coordinate of the top left corner of the clear rectangle
-
y: number
defines the y-coordinate of the corner of the clear rectangle
-
width: number
defines the width of the clear rectangle
-
height: number
defines the height of the clear rectangle
-
clearColor: IColor4Like
defines the clear color
Returns void
-
set Alpha ModeSearch playground for setAlphaMode
-
Sets the current alpha mode
Parameters
-
mode: number
defines the mode to use (one of the Engine.ALPHA_XXX)
-
Optional noDepthWriteChange: boolean
defines if depth writing state should remains unchanged (false by default)
Returns void
-
set ArraySearch playground for setArray
-
Set the value of an uniform to an array of number
Parameters
-
uniform: WebGLUniformLocation
defines the webGL uniform location where to store the value
-
array: number[]
defines the array of number to store
Returns boolean
true if value was set
-
set Array2Search playground for setArray2
-
Set the value of an uniform to an array of number (stored as vec2)
Parameters
-
uniform: WebGLUniformLocation
defines the webGL uniform location where to store the value
-
array: number[]
defines the array of number to store
Returns boolean
true if value was set
-
set Array3Search playground for setArray3
-
Set the value of an uniform to an array of number (stored as vec3)
Parameters
-
uniform: WebGLUniformLocation
defines the webGL uniform location where to store the value
-
array: number[]
defines the array of number to store
Returns boolean
true if value was set
-
set Array4Search playground for setArray4
-
Set the value of an uniform to an array of number (stored as vec4)
Parameters
-
uniform: WebGLUniformLocation
defines the webGL uniform location where to store the value
-
array: number[]
defines the array of number to store
Returns boolean
true if value was set
-
set BoolSearch playground for setBool
-
Set the value of an uniform to a boolean
Parameters
-
uniform: WebGLUniformLocation
defines the webGL uniform location where to store the value
-
bool: number
defines the boolean to store
Returns boolean
true if value was set
-
set Compressed Texture ExclusionsSearch playground for setCompressedTextureExclusions
-
Set the compressed texture extensions or file names to skip.
Parameters
-
skippedFiles: Array<string>
defines the list of those texture files you want to skip Example: [".dds", ".env", "myfile.png"]
Returns void
-
set Depth BufferSearch playground for setDepthBuffer
-
Enable or disable depth buffering
Parameters
-
enable: boolean
defines the state to set
Returns void
-
set Depth FunctionSearch playground for setDepthFunction
-
Sets the current depth function
Parameters
-
depthFunc: number
defines the function to use
Returns void
-
set Depth Function ToGreaterSearch playground for setDepthFunctionToGreater
-
Sets the current depth function to GREATER
Returns void
set Depth Function ToGreater OrEqualSearch playground for setDepthFunctionToGreaterOrEqual
-
Sets the current depth function to GEQUAL
Returns void
set Depth Function ToLessSearch playground for setDepthFunctionToLess
-
Sets the current depth function to LESS
Returns void
set Depth Function ToLess OrEqualSearch playground for setDepthFunctionToLessOrEqual
-
Sets the current depth function to LEQUAL
Returns void
set Depth Stencil TextureSearch playground for setDepthStencilTexture
-
Sets a depth stencil texture from a render target to the according uniform.
Parameters
-
channel: number
The texture channel
-
uniform: Nullable<WebGLUniformLocation>
The uniform to set
-
texture: Nullable<RenderTargetTexture>
The render target texture containing the depth stencil texture to apply
-
Optional name: string
The texture name
Returns void
-
set Depth WriteSearch playground for setDepthWrite
-
Enable or disable depth writing
Parameters
-
enable: boolean
defines the state to set
Returns void
-
set Direct ViewportSearch playground for setDirectViewport
-
Directly set the WebGL Viewport
Parameters
-
x: number
defines the x coordinate of the viewport (in screen space)
-
y: number
defines the y coordinate of the viewport (in screen space)
-
width: number
defines the width of the viewport (in screen space)
-
height: number
defines the height of the viewport (in screen space)
Returns Nullable<IViewportLike>
the current viewport Object (if any) that is being replaced by this call. You can restore this viewport later on to go back to the original state
-
set Dithering StateSearch playground for setDitheringState
-
Sets a boolean indicating if the dithering state is enabled or disabled
Parameters
-
value: boolean
defines the dithering state
Returns void
-
set FloatSearch playground for setFloat
-
Set the value of an uniform to a number (float)
Parameters
-
uniform: WebGLUniformLocation
defines the webGL uniform location where to store the value
-
value: number
defines the float number to store
Returns boolean
true if value was set
-
set Float2Search playground for setFloat2
-
Set the value of an uniform to a vec2
Parameters
-
uniform: WebGLUniformLocation
defines the webGL uniform location where to store the value
-
x: number
defines the 1st component of the value
-
y: number
defines the 2nd component of the value
Returns boolean
true if value was set
-
set Float3Search playground for setFloat3
-
Set the value of an uniform to a vec3
Parameters
-
uniform: WebGLUniformLocation
defines the webGL uniform location where to store the value
-
x: number
defines the 1st component of the value
-
y: number
defines the 2nd component of the value
-
z: number
defines the 3rd component of the value
Returns boolean
true if value was set
-
set Float4Search playground for setFloat4
-
Set the value of an uniform to a vec4
Parameters
-
uniform: WebGLUniformLocation
defines the webGL uniform location where to store the value
-
x: number
defines the 1st component of the value
-
y: number
defines the 2nd component of the value
-
z: number
defines the 3rd component of the value
-
w: number
defines the 4th component of the value
Returns boolean
true if value was set
-
set Float ArraySearch playground for setFloatArray
-
Set the value of an uniform to an array of float32
Parameters
-
uniform: WebGLUniformLocation
defines the webGL uniform location where to store the value
-
array: Float32Array
defines the array of float32 to store
Returns boolean
true if value was set
-
set Float Array2Search playground for setFloatArray2
-
Set the value of an uniform to an array of float32 (stored as vec2)
Parameters
-
uniform: WebGLUniformLocation
defines the webGL uniform location where to store the value
-
array: Float32Array
defines the array of float32 to store
Returns boolean
true if value was set
-
set Float Array3Search playground for setFloatArray3
-
Set the value of an uniform to an array of float32 (stored as vec3)
Parameters
-
uniform: WebGLUniformLocation
defines the webGL uniform location where to store the value
-
array: Float32Array
defines the array of float32 to store
Returns boolean
true if value was set
-
set Float Array4Search playground for setFloatArray4
-
Set the value of an uniform to an array of float32 (stored as vec4)
Parameters
-
uniform: WebGLUniformLocation
defines the webGL uniform location where to store the value
-
array: Float32Array
defines the array of float32 to store
Returns boolean
true if value was set
-
set Int ArraySearch playground for setIntArray
-
Set the value of an uniform to an array of int32
Parameters
-
uniform: WebGLUniformLocation
defines the webGL uniform location where to store the value
-
array: Int32Array
defines the array of int32 to store
Returns boolean
true if value was set
-
set Int Array2Search playground for setIntArray2
-
Set the value of an uniform to an array of int32 (stored as vec2)
Parameters
-
uniform: WebGLUniformLocation
defines the webGL uniform location where to store the value
-
array: Int32Array
defines the array of int32 to store
Returns boolean
true if value was set
-
set Int Array3Search playground for setIntArray3
-
Set the value of an uniform to an array of int32 (stored as vec3)
Parameters
-
uniform: WebGLUniformLocation
defines the webGL uniform location where to store the value
-
array: Int32Array
defines the array of int32 to store
Returns boolean
true if value was set
-
set Int Array4Search playground for setIntArray4
-
Set the value of an uniform to an array of int32 (stored as vec4)
Parameters
-
uniform: WebGLUniformLocation
defines the webGL uniform location where to store the value
-
array: Int32Array
defines the array of int32 to store
Returns boolean
true if value was set
-
set MatricesSearch playground for setMatrices
-
Set the value of an uniform to an array of float32 (stored as matrices)
Parameters
-
uniform: WebGLUniformLocation
defines the webGL uniform location where to store the value
-
matrices: Float32Array
defines the array of float32 to store
Returns boolean
true if value was set
-
set Matrix2x2Search playground for setMatrix2x2
-
Set the value of an uniform to a matrix (2x2)
Parameters
-
uniform: WebGLUniformLocation
defines the webGL uniform location where to store the value
-
matrix: Float32Array
defines the Float32Array representing the 2x2 matrix to store
Returns boolean
true if value was set
-
set Matrix3x3Search playground for setMatrix3x3
-
Set the value of an uniform to a matrix (3x3)
Parameters
-
uniform: WebGLUniformLocation
defines the webGL uniform location where to store the value
-
matrix: Float32Array
defines the Float32Array representing the 3x3 matrix to store
Returns boolean
true if value was set
-
set Rasterizer StateSearch playground for setRasterizerState
-
Sets a boolean indicating if the rasterizer state is enabled or disabled
Parameters
-
value: boolean
defines the rasterizer state
Returns void
-
set SizeSearch playground for setSize
-
Force a specific size of the canvas
Parameters
-
width: number
defines the new canvas' width
-
height: number
defines the new canvas' height
-
Optional forceSetSize: boolean
true to force setting the sizes of the underlying canvas
Returns boolean
true if the size was changed
-
set StateSearch playground for setState
-
Set various states to the webGL context
Parameters
-
culling: boolean
defines backface culling state
-
Optional zOffset: number
defines the value to apply to zOffset (0 by default)
-
Optional force: boolean
defines if states must be applied even if cache is up to date
-
Optional reverseSide: boolean
defines if culling must be reversed (CCW instead of CW and CW instead of CCW)
Returns void
-
set Stencil BufferSearch playground for setStencilBuffer
-
Enable or disable the stencil buffer
Parameters
-
enable: boolean
defines if the stencil buffer must be enabled or disabled
Returns void
-
set Stencil FunctionSearch playground for setStencilFunction
-
Sets the current stencil function
Parameters
-
stencilFunc: number
defines the new stencil function to use
Returns void
-
set Stencil Function MaskSearch playground for setStencilFunctionMask
-
Sets the current stencil mask
Parameters
-
mask: number
defines the new stencil mask to use
Returns void
-
set Stencil Function ReferenceSearch playground for setStencilFunctionReference
-
Sets the current stencil reference
Parameters
-
reference: number
defines the new stencil reference to use
Returns void
-
set Stencil MaskSearch playground for setStencilMask
-
Sets the current stencil mask
Parameters
-
mask: number
defines the new stencil mask to use
Returns void
-
set Stencil Operation Depth FailSearch playground for setStencilOperationDepthFail
-
Sets the stencil operation to use when depth fails
Parameters
-
operation: number
defines the stencil operation to use when depth fails
Returns void
-
set Stencil Operation FailSearch playground for setStencilOperationFail
-
Sets the stencil operation to use when stencil fails
Parameters
-
operation: number
defines the stencil operation to use when stencil fails
Returns void
-
set Stencil Operation PassSearch playground for setStencilOperationPass
-
Sets the stencil operation to use when stencil passes
Parameters
-
operation: number
defines the stencil operation to use when stencil passes
Returns void
-
set Texture Format ToUseSearch playground for setTextureFormatToUse
-
Set the compressed texture format to use, based on the formats you have, and the formats supported by the hardware / browser.
Khronos Texture Container (.ktx) files are used to support this. This format has the advantage of being specifically designed for OpenGL. Header elements directly correspond to API arguments needed to compressed textures. This puts the burden on the container generator to house the arcane code for determining these for current & future formats.
for description see https://www.khronos.org/opengles/sdk/tools/KTX/ for file layout see https://www.khronos.org/opengles/sdk/tools/KTX/file_format_spec/
Note: The result of this call is not taken into account when a texture is base64.
Parameters
-
formatsAvailable: Array<string>
defines the list of those format families you have created on your server. Syntax: '-' + format family + '.ktx'. (Case and order do not matter.)
Current families are astc, dxt, pvrtc, etc2, & etc1.
Returns Nullable<string>
The extension selected.
-
set Texture From Post ProcessSearch playground for setTextureFromPostProcess
-
Sets a texture to the webGL context from a postprocess
Parameters
-
channel: number
defines the channel to use
-
postProcess: Nullable<PostProcess>
defines the source postprocess
-
name: string
name of the channel
Returns void
-
set Texture From Post Process OutputSearch playground for setTextureFromPostProcessOutput
-
Binds the output of the passed in post process to the texture channel specified
Parameters
-
channel: number
The channel the texture should be bound to
-
postProcess: Nullable<PostProcess>
The post process which's output should be bound
-
name: string
name of the channel
Returns void
-
set Tranform Feedback VaryingsSearch playground for setTranformFeedbackVaryings
-
Specify the varyings to use with transform feedback
Parameters
-
program: WebGLProgram
defines the associated webGL program
-
value: string[]
defines the list of strings representing the varying names
Returns void
-
set ViewportSearch playground for setViewport
-
Set the WebGL's viewport
Parameters
-
viewport: IViewportLike
defines the viewport element to be used
-
Optional requiredWidth: number
defines the width required for rendering. If not provided the rendering canvas' width is used
-
Optional requiredHeight: number
defines the height required for rendering. If not provided the rendering canvas' height is used
Returns void
-
setZOffsetSearch playground for setZOffset
-
Set the z offset to apply to current rendering
Parameters
-
value: number
defines the offset to apply
Returns void
-
start Time QuerySearch playground for startTimeQuery
-
Starts a time query (used to measure time spent by the GPU on a specific frame) Please note that only one query can be issued at a time
Returns Nullable<_TimeToken>
a time token used to track the time span
switch FullscreenSearch playground for switchFullscreen
-
Toggle full screen mode
Parameters
-
requestPointerLock: boolean
defines if a pointer lock should be requested from the user
Returns void
-
un Bind FramebufferSearch playground for unBindFramebuffer
-
Unbind the current render target texture from the webGL context
Parameters
-
texture: InternalTexture
defines the render target texture to unbind
-
Optional disableGenerateMipMaps: boolean
defines a boolean indicating that mipmaps must not be generated
-
Optional onBeforeUnbind: () => void
defines a function which will be called before the effective unbind
-
-
Returns void
-
-
Returns void
-
un Register ViewSearch playground for unRegisterView
-
Remove a registered child canvas
Parameters
-
canvas: HTMLCanvasElement
defines the canvas to remove
Returns Engine
the current engine
-
update Dynamic Index BufferSearch playground for updateDynamicIndexBuffer
-
Update a dynamic index buffer
Parameters
-
indexBuffer: WebGLBuffer
defines the target index buffer
-
indices: IndicesArray
defines the data to update
-
Optional offset: number
defines the offset in the target index buffer where update should start
Returns void
-
update Dynamic TextureSearch playground for updateDynamicTexture
-
Update the content of a dynamic texture
Parameters
-
texture: Nullable<InternalTexture>
defines the texture to update
-
canvas: HTMLCanvasElement
defines the canvas containing the source
-
invertY: boolean
defines if data must be stored with Y axis inverted
-
Optional premulAlpha: boolean
defines if alpha is stored as premultiplied
-
Optional format: number
defines the format of the data
Returns void
-
update Dynamic Vertex BufferSearch playground for updateDynamicVertexBuffer
-
Updates a dynamic vertex buffer.
Parameters
-
vertexBuffer: WebGLBuffer
the vertex buffer to update
-
vertices: FloatArray
the data used to update the vertex buffer
-
Optional byteOffset: number
the byte offset of the data (optional)
-
Optional byteLength: number
the byte length of the data (optional)
Returns void
-
update Render Target Texture Sample CountSearch playground for updateRenderTargetTextureSampleCount
-
Updates the sample count of a render target texture
Parameters
-
texture: Nullable<InternalTexture>
defines the texture to update
-
samples: number
defines the sample count to set
Returns number
the effective sample count (could be 0 if multisample render targets are not supported)
-
update Texture Comparison FunctionSearch playground for updateTextureComparisonFunction
-
Updates a depth texture Comparison Mode and Function. If the comparison Function is equal to 0, the mode will be set to none. Otherwise, this only works in webgl 2 and requires a shadow sampler in the shader.
Parameters
-
texture: InternalTexture
The texture to set the comparison function for
-
comparisonFunction: number
The comparison function to set, 0 if no comparison required
Returns void
-
update Texture Sampling ModeSearch playground for updateTextureSamplingMode
-
Update the sampling mode of a given texture
Parameters
-
samplingMode: number
defines the required sampling mode
-
texture: InternalTexture
defines the texture to update
Returns void
-
update Uniform BufferSearch playground for updateUniformBuffer
-
Update an existing uniform buffer
Parameters
-
uniformBuffer: DataBuffer
defines the target uniform buffer
-
elements: FloatArray
defines the content to update
-
Optional offset: number
defines the offset in the uniform buffer where update should start
-
Optional count: number
defines the size of the data to update
Returns void
-
wipe CachesSearch playground for wipeCaches
-
Force the entire cache to be cleared You should not have to use this function unless your engine needs to share the webGL context with another engine
Parameters
-
Optional bruteForce: boolean
defines a boolean to force clearing ALL caches (including stencil, detoh and alpha states)
Returns void
-
Static Default Loading Screen FactorySearch playground for DefaultLoadingScreenFactory
-
Method called to create the default loading screen. This can be overriden in your own app.
Parameters
-
canvas: HTMLCanvasElement
The rendering canvas element
Returns ILoadingScreen
The loading screen
-
Static Mark All Materials AsDirtySearch playground for MarkAllMaterialsAsDirty
-
Will flag all materials in all scenes in all engines as dirty to trigger new shader compilation
Parameters
-
flag: number
defines which part of the materials must be marked as dirty
-
Optional predicate: (mat: Material) => boolean
defines a predicate used to filter which materials should be affected
-
-
Parameters
-
mat: Material
Returns boolean
-
-
-
Returns void
-
Static _ Exit FullscreenSearch playground for _ExitFullscreen
-
Asks the browser to exit fullscreen mode
Returns void
Static _ Exit PointerlockSearch playground for _ExitPointerlock
-
Asks the browser to exit pointerlock mode
Returns void
Static _ Request FullscreenSearch playground for _RequestFullscreen
-
Ask the browser to promote the current element to fullscreen rendering mode
Parameters
-
element: HTMLElement
defines the DOM element to promote
Returns void
-
Static _ Request PointerlockSearch playground for _RequestPointerlock
-
Ask the browser to promote the current element to pointerlock mode
Parameters
-
element: HTMLElement
defines the DOM element to promote
Returns void
-
The null engine class provides support for headless version of babylon.js. This can be used in server side scenario or for testing purposes