Description
class NullEngine extends Engine
The null engine class provides support for headless version of babylon.js.
This can be used in server side scenario or for testing purposes
Constructor
Parameters
Methods
isDeterministicLockStep() → boolean
getLockstepMaxSteps() → number
createVertexBuffer(vertices) → WebGLBuffer
Parameters
|
Name |
Type |
Description |
|
vertices |
FloatArray |
|
createIndexBuffer(indices) → WebGLBuffer
Parameters
|
Name |
Type |
Description |
|
indices |
IndicesArray |
|
clear(color, backBuffer, depth, stencil) → void
Parameters
|
Name |
Type |
Description |
|
color |
Color4 |
|
|
backBuffer |
boolean |
|
|
depth |
boolean |
|
getRenderWidth(useScreen) → number
Parameters
|
Name |
Type |
Description |
optional |
useScreen |
boolean |
|
getRenderHeight(useScreen) → number
Parameters
|
Name |
Type |
Description |
optional |
useScreen |
boolean |
|
setViewport(viewport, requiredWidth, requiredHeight) → void
Parameters
|
Name |
Type |
Description |
|
viewport |
Viewport |
|
optional |
requiredWidth |
number |
|
optional |
requiredHeight |
number |
|
createShaderProgram(vertexCode, fragmentCode, defines, context) → WebGLProgram
Parameters
|
Name |
Type |
Description |
|
vertexCode |
string |
|
|
fragmentCode |
string |
|
|
defines |
string |
|
Parameters
|
Name |
Type |
Description |
|
shaderProgram |
WebGLProgram |
|
|
uniformsNames |
string[] |
|
getAttributes(shaderProgram, attributesNames) → number[]
Parameters
|
Name |
Type |
Description |
|
shaderProgram |
WebGLProgram |
|
|
attributesNames |
string[] |
|
bindSamplers(effect) → void
Parameters
|
Name |
Type |
Description |
|
effect |
Effect |
|
enableEffect(effect) → void
Parameters
|
Name |
Type |
Description |
|
effect |
Effect |
|
setState(culling, zOffset, force, reverseSide) → void
Parameters
|
Name |
Type |
Description |
|
culling |
boolean |
|
optional |
zOffset |
number |
|
optional |
force |
boolean |
|
Parameters
|
Name |
Type |
Description |
|
uniform |
WebGLUniformLocation |
|
|
array |
Int32Array |
|
Parameters
|
Name |
Type |
Description |
|
uniform |
WebGLUniformLocation |
|
|
array |
Int32Array |
|
Parameters
|
Name |
Type |
Description |
|
uniform |
WebGLUniformLocation |
|
|
array |
Int32Array |
|
Parameters
|
Name |
Type |
Description |
|
uniform |
WebGLUniformLocation |
|
|
array |
Int32Array |
|
Parameters
|
Name |
Type |
Description |
|
uniform |
WebGLUniformLocation |
|
|
array |
Float32Array |
|
Parameters
|
Name |
Type |
Description |
|
uniform |
WebGLUniformLocation |
|
|
array |
Float32Array |
|
Parameters
|
Name |
Type |
Description |
|
uniform |
WebGLUniformLocation |
|
|
array |
Float32Array |
|
Parameters
|
Name |
Type |
Description |
|
uniform |
WebGLUniformLocation |
|
|
array |
Float32Array |
|
Parameters
|
Name |
Type |
Description |
|
uniform |
WebGLUniformLocation |
|
|
array |
number[] |
|
Parameters
|
Name |
Type |
Description |
|
uniform |
WebGLUniformLocation |
|
|
array |
number[] |
|
Parameters
|
Name |
Type |
Description |
|
uniform |
WebGLUniformLocation |
|
|
array |
number[] |
|
Parameters
|
Name |
Type |
Description |
|
uniform |
WebGLUniformLocation |
|
|
array |
number[] |
|
Parameters
|
Name |
Type |
Description |
|
uniform |
WebGLUniformLocation |
|
|
matrices |
Float32Array |
|
Parameters
|
Name |
Type |
Description |
|
uniform |
WebGLUniformLocation |
|
|
matrix |
Matrix |
|
Parameters
|
Name |
Type |
Description |
|
uniform |
WebGLUniformLocation |
|
|
matrix |
Float32Array |
|
Parameters
|
Name |
Type |
Description |
|
uniform |
WebGLUniformLocation |
|
|
matrix |
Float32Array |
|
Parameters
|
Name |
Type |
Description |
|
uniform |
WebGLUniformLocation |
|
|
value |
number |
|
Parameters
|
Name |
Type |
Description |
|
uniform |
WebGLUniformLocation |
|
|
x |
number |
|
|
y |
number |
|
Parameters
|
Name |
Type |
Description |
|
uniform |
WebGLUniformLocation |
|
|
x |
number |
|
|
y |
number |
|
Parameters
|
Name |
Type |
Description |
|
uniform |
WebGLUniformLocation |
|
|
bool |
number |
|
Parameters
|
Name |
Type |
Description |
|
uniform |
WebGLUniformLocation |
|
|
x |
number |
|
|
y |
number |
|
|
z |
number |
|
Parameters
|
Name |
Type |
Description |
|
uniform |
WebGLUniformLocation |
|
|
color3 |
Color3 |
|
Parameters
|
Name |
Type |
Description |
|
uniform |
WebGLUniformLocation |
|
|
color3 |
Color3 |
|
|
alpha |
number |
|
setAlphaMode(mode, noDepthWriteChange) → void
Parameters
|
Name |
Type |
Description |
|
mode |
number |
|
optional |
noDepthWriteChange |
boolean |
|
bindBuffers(vertexBuffers, indexBuffer, effect) → void
Parameters
|
Name |
Type |
Description |
|
vertexBuffers |
{ [key: string]: VertexBuffer } |
|
|
indexBuffer |
WebGLBuffer |
|
|
effect |
Effect |
|
wipeCaches(bruteForce) → void
Parameters
|
Name |
Type |
Description |
optional |
bruteForce |
boolean |
|
draw(useTriangles, indexStart, indexCount, instancesCount) → void
Parameters
|
Name |
Type |
Description |
|
useTriangles |
boolean |
|
|
indexStart |
number |
|
|
indexCount |
number |
|
createTexture(urlArg, noMipmap, invertY, scene, samplingMode, onLoad, onError, buffer, HTMLImageElement, fallBack, format) → InternalTexture
Parameters
|
Name |
Type |
Description |
|
urlArg |
string |
|
|
noMipmap |
boolean |
|
|
invertY |
boolean |
|
|
scene |
Scene |
|
optional |
samplingMode |
number |
|
optional |
onLoad |
Nullable<() => void> |
|
optional |
onError |
Nullable<(message: string, exception: any) => void> |
|
optional |
buffer |
Nullable<ArrayBuffer> or HTMLImageElement |
|
optional |
fallBack |
InternalTexture |
|
Parameters
updateTextureSamplingMode(samplingMode, texture) → void
Parameters
bindFramebuffer(texture, faceIndex, requiredWidth, requiredHeight, forceFullscreenViewport) → void
Parameters
|
Name |
Type |
Description |
|
texture |
InternalTexture |
|
optional |
faceIndex |
number |
|
optional |
requiredWidth |
number |
|
optional |
requiredHeight |
number |
|
unBindFramebuffer(texture, disableGenerateMipMaps, onBeforeUnbind) → void
Parameters
|
Name |
Type |
Description |
|
texture |
InternalTexture |
|
optional |
disableGenerateMipMaps |
boolean |
|
optional |
onBeforeUnbind |
|
|
createDynamicVertexBuffer(vertices) → WebGLBuffer
Parameters
|
Name |
Type |
Description |
|
vertices |
FloatArray |
|
updateDynamicIndexBuffer(indexBuffer, indices, offset) → void
Parameters
|
Name |
Type |
Description |
|
indexBuffer |
WebGLBuffer |
|
|
indices |
IndicesArray |
|
optional |
offset |
number |
|
updateDynamicVertexBuffer(vertexBuffer, vertices, offset, count) → void
Parameters
|
Name |
Type |
Description |
|
vertexBuffer |
WebGLBuffer |
|
|
vertices |
FloatArray |
|
optional |
offset |
number |
|