class com.babylonhx.Engine
Available on all platforms
... @author Krtolica Vujadin
Class Fields
static function cascadeLoad(rootUrl:String, scene:Scene, onfinish:Dynamic ->Voidextensions:Array<String>):Void
static function partialLoad(url:String, index:Int, loadedImages:Dynamic, scene:Scene, onfinish:Dynamic ->Void):Void
static function prepareTexture(texture:WebGLTexture, gl:Dynamic, scene:Scene, width:Int, height:Int, invertY:Bool, noMipmap:Bool, isCompressed:Bool, processFunction:Int ->Int ->Void?samplingMode:Int):Void
Instance Fields
function bindBuffers(vertexBuffer:WebGLBuffer, indexBuffer:WebGLBuffer, vertexDeclaration:Array<Int>, vertexStrideSize:Int, effect:Effect):Void
function bindMultiBuffers(vertexBuffers:Map<String, VertexBuffer>, indexBuffer:WebGLBuffer, effect:Effect):Void
function createCubeTexture(rootUrl:String, scene:Scene, ?extensions:Array<String>, ?noMipmap:Bool):WebGLTexture
function createDynamicTexture(width:Int, height:Int, generateMipMaps:Bool, samplingMode:Int):WebGLTexture
function createEffect(baseName:Dynamic, attributesNames:Array<String>, uniformsNames:Array<String>, samplers:Array<String>, defines:String, ?fallbacks:EffectFallbacks, ?onCompiled:Effect ->Void?onError:Effect ->String ->Void):Effect
function createEffectForParticles(fragmentName:String, ?uniformsNames:Array<String>, ?samplers:Array<String>, ?defines:String, ?fallbacks:EffectFallbacks, ?onCompiled:Effect ->Void?onError:Effect ->String ->Void):Effect
function createRawTexture(data:ArrayBufferView, width:Int, height:Int, format:Int, generateMipMaps:Bool, invertY:Bool, samplingMode:Int, ?compression:String):WebGLTexture
function createTexture(url:String, noMipmap:Bool, invertY:Bool, scene:Scene, ?samplingMode:Int, ?onLoad:Void ->Void, ?onError:Void ->Void, ?buffer:Dynamic):WebGLTexture
function getUniforms(shaderProgram:GLProgram, uniformsNames:Array<String>):Map<String, GLUniformLocation>
resize the view according to the canvas' size. @example window.addEventListener("resize", function () { engine.resize(); });
function setSize(width:Int, height:Int):Void
force a specific size of the canvas
{number} | width - the new canvas' width |
{number} | height - the new canvas' height |
function setViewport(viewport:Viewport, ?requiredWidth:Float, ?requiredHeight:Float):Void
Set the WebGL's viewport
{BABYLON.Viewport} | viewport - the viewport element to be used. |
{number} | [requiredWidth] - the width required for rendering. If not provided the rendering canvas' width is used. |
{number} | [requiredHeight] - the height required for rendering. If not provided the rendering canvas' height is used. |
function stopRenderLoop(?renderFunction:Void ->Void):Void
stop executing a render loop function and remove it from the execution array
{Function} | [renderFunction] the function to be removed. If not provided all functions will be removed. |
function updateAndBindInstancesBuffer(instancesBuffer:WebGLBuffer, data:Float32Array, offsetLocations:Array<Int>):Void
function updateRawTexture(texture:WebGLTexture, data:ArrayBufferView, format:Int, ?invertY:Bool, ?compression:String):Void