UNPKG

starling-framework

Version:

A fast, productive library for 2D cross-platform development.

656 lines (640 loc) 25.9 kB
// Class: starling.rendering.Painter var $global = typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : this $global.Object.defineProperty(exports, "__esModule", {value: true}); var __map_reserved = {}; // Imports var $hxClasses = require("./../../hxClasses_stub").default; var $hxEnums = require("./../../hxEnums_stub").default; var $import = require("./../../import_stub").default; var $bind = require("./../../bind_stub").default; function haxe_ds_ObjectMap() {return require("./../../haxe/ds/ObjectMap");} function starling_utils_RenderUtil() {return require("./../../starling/utils/RenderUtil");} function starling_utils_SystemUtil() {return require("./../../starling/utils/SystemUtil");} function Std() {return require("./../../Std");} function openfl__$Vector_Vector_$Impl_$() {return require("./../../openfl/_Vector/Vector_Impl_");} function starling_rendering_RenderState() {return require("./../../starling/rendering/RenderState");} function starling_utils_MatrixUtil() {return require("./../../starling/utils/MatrixUtil");} function js__$Boot_HaxeError() {return require("./../../js/_Boot/HaxeError");} function openfl_errors_IllegalOperationError() {return $import(require("openfl/errors/IllegalOperationError"));} function starling_utils_RectangleUtil() {return require("./../../starling/utils/RectangleUtil");} function starling_utils_Pool() {return require("./../../starling/utils/Pool");} function openfl_errors_Error() {return $import(require("openfl/errors/Error"));} function starling_display_Quad() {return require("./../../starling/display/Quad");} function starling_utils_MathUtil() {return require("./../../starling/utils/MathUtil");} function _$UInt_UInt_$Impl_$() {return require("./../../_UInt/UInt_Impl_");} function starling_display_BlendMode() {return require("./../../starling/display/BlendMode");} function haxe_Log() {return require("./../../haxe/Log");} function haxe_ds_StringMap() {return require("./../../haxe/ds/StringMap");} function openfl_geom_Matrix() {return $import(require("openfl/geom/Matrix"));} function openfl_geom_Vector3D() {return $import(require("openfl/geom/Vector3D"));} function openfl_geom_Matrix3D() {return $import(require("openfl/geom/Matrix3D"));} function openfl_geom_Rectangle() {return $import(require("openfl/geom/Rectangle"));} function starling_utils_MeshSubset() {return require("./../../starling/utils/MeshSubset");} function Reflect() {return require("./../../Reflect");} function starling_core_Starling() {return require("./../../starling/core/Starling");} function starling_rendering_BatchProcessor() {return require("./../../starling/rendering/BatchProcessor");} // Constructor var Painter = function(stage3D,sharedContext) { this._batchTrimInterval = 250; this._frameID = 0; this._drawCount = 0; this._stage3D = stage3D; this._stage3D.addEventListener("context3DCreate",$bind(this,this.onContextCreated),false,40,true); this._context = this._stage3D.context3D; if(sharedContext != null) { this._shareContext = sharedContext; } else { this._shareContext = this._context != null && this._context.driverInfo != "Disposed"; } if(!(Reflect().default).hasField((starling_core_Starling().default).get_current().__nativeStage,"context3D") || (Reflect().default).field((starling_core_Starling().default).get_current().__nativeStage,"context3D") == this._context) { this._shareContext = false; } this._backBufferWidth = this._context != null ? this._context.backBufferWidth : 0; this._backBufferHeight = this._context != null ? this._context.backBufferHeight : 0; this._backBufferScaleFactor = this._pixelSize = 1.0; this._stencilReferenceValues = new (haxe_ds_ObjectMap().default)(); this._clipRectStack = (openfl__$Vector_Vector_$Impl_$().default)._new(); this._batchProcessorCurr = new (starling_rendering_BatchProcessor().default)(); this._batchProcessorCurr.set_onBatchComplete($bind(this,this.drawBatch)); this._batchProcessorPrev = new (starling_rendering_BatchProcessor().default)(); this._batchProcessorPrev.set_onBatchComplete($bind(this,this.drawBatch)); this._batchProcessorSpec = new (starling_rendering_BatchProcessor().default)(); this._batchProcessorSpec.set_onBatchComplete($bind(this,this.drawBatch)); this._batchProcessor = this._batchProcessorCurr; this._batchCacheExclusions = (openfl__$Vector_Vector_$Impl_$().default)._new(); this._state = new (starling_rendering_RenderState().default)(); this._state.set_onDrawRequired($bind(this,this.finishMeshBatch)); this._stateStack = (openfl__$Vector_Vector_$Impl_$().default)._new(); this._stateStackPos = -1; this._stateStackLength = 0; } // Meta Painter.__name__ = "starling.rendering.Painter"; Painter.__isInterface__ = false; Painter.prototype = { dispose: function() { this._batchProcessorCurr.dispose(); this._batchProcessorPrev.dispose(); this._batchProcessorSpec.dispose(); if(!this._shareContext) { if(this._context != null) { this._context.dispose(false); } Painter.sSharedData = new (haxe_ds_ObjectMap().default)(); } }, requestContext3D: function(renderMode,profile) { (starling_utils_RenderUtil().default).requestContext3D(this._stage3D,renderMode,profile); }, onContextCreated: function(event) { this._context = this._stage3D.context3D; this._context.enableErrorChecking = this._enableErrorChecking; }, configureBackBuffer: function(viewPort,contentScaleFactor,antiAlias,enableDepthAndStencil,supportBrowserZoom) { if(supportBrowserZoom == null) { supportBrowserZoom = false; } if(!this._shareContext) { enableDepthAndStencil = enableDepthAndStencil && (starling_utils_SystemUtil().default).get_supportsDepthAndStencil(); if(this._context.profile == "baselineConstrained") { this._context.configureBackBuffer(32,32,antiAlias,enableDepthAndStencil); } if(viewPort.width * contentScaleFactor > this._context.maxBackBufferWidth || viewPort.height * contentScaleFactor > this._context.maxBackBufferHeight) { contentScaleFactor = 1.0; } this._stage3D.set_x(viewPort.x); this._stage3D.set_y(viewPort.y); this._context.configureBackBuffer((Std().default).int(viewPort.width),(Std().default).int(viewPort.height),antiAlias,enableDepthAndStencil,contentScaleFactor != 1.0); } this._backBufferWidth = (Std().default).int(viewPort.width); this._backBufferHeight = (Std().default).int(viewPort.height); this._backBufferScaleFactor = contentScaleFactor; }, registerProgram: function(name,program) { this.deleteProgram(name); this.get_programs().set(name,program); }, deleteProgram: function(name) { var program = this.getProgram(name); if(program != null) { program.dispose(); this.get_programs().remove(name); } }, getProgram: function(name) { return this.get_programs().get(name); }, hasProgram: function(name) { return this.get_programs().exists(name); }, pushState: function(token) { this._stateStackPos++; if(this._stateStackLength < this._stateStackPos + 1) { (openfl__$Vector_Vector_$Impl_$().default).set(this._stateStack,this._stateStackLength++,new (starling_rendering_RenderState().default)()); } if(token != null) { this._batchProcessor.fillToken(token); } this._stateStack[this._stateStackPos].copyFrom(this._state); }, setStateTo: function(transformationMatrix,alphaFactor,blendMode) { if(blendMode == null) { blendMode = "auto"; } if(alphaFactor == null) { alphaFactor = 1.0; } if(transformationMatrix != null) { (starling_utils_MatrixUtil().default).prependMatrix(this._state._modelviewMatrix,transformationMatrix); } if(alphaFactor != 1.0) { this._state._alpha *= alphaFactor; } if(blendMode != "auto") { this._state.set_blendMode(blendMode); } }, popState: function(token) { if(this._stateStackPos < 0) { throw new (js__$Boot_HaxeError().default)(new (openfl_errors_IllegalOperationError().default)("Cannot pop empty state stack")); } this._state.copyFrom(this._stateStack[this._stateStackPos]); this._stateStackPos--; if(token != null) { this._batchProcessor.fillToken(token); } }, restoreState: function() { if(this._stateStackPos < 0) { throw new (js__$Boot_HaxeError().default)(new (openfl_errors_IllegalOperationError().default)("Cannot restore from empty state stack")); } this._state.copyFrom(this._stateStack[this._stateStackPos]); }, fillToken: function(token) { if(token != null) { this._batchProcessor.fillToken(token); } }, drawMask: function(mask,maskee) { if(this._context == null) { return; } this.finishMeshBatch(); if(this.isRectangularMask(mask,maskee,Painter.sMatrix)) { mask.getBounds(mask,Painter.sClipRect); (starling_utils_RectangleUtil().default).getBounds(Painter.sClipRect,Painter.sMatrix,Painter.sClipRect); this.pushClipRect(Painter.sClipRect); } else { if(maskee != null && maskee.get_maskInverted()) { this._context.setStencilActions("frontAndBack","always","keep","decrementSaturate"); this.renderMask(mask); } else { this._context.setStencilActions("frontAndBack","equal","keep","incrementSaturate"); this.renderMask(mask); var _g = this; _g.set_stencilReferenceValue(_g.get_stencilReferenceValue() + 1); } this._context.setStencilActions("frontAndBack","equal"); } this.excludeFromCache(maskee); }, eraseMask: function(mask,maskee) { if(this._context == null) { return; } this.finishMeshBatch(); if(this.isRectangularMask(mask,maskee,Painter.sMatrix)) { this.popClipRect(); } else { if(maskee != null && maskee.get_maskInverted()) { this._context.setStencilActions("frontAndBack","always","keep","incrementSaturate"); this.renderMask(mask); } else { this._context.setStencilActions("frontAndBack","equal","keep","decrementSaturate"); this.renderMask(mask); var _g = this; _g.set_stencilReferenceValue(_g.get_stencilReferenceValue() - 1); } this._context.setStencilActions("frontAndBack","equal"); } }, renderMask: function(mask) { var matrix = null; var matrix3D = null; var wasCacheEnabled = this.get_cacheEnabled(); this.pushState(); this.set_cacheEnabled(false); this._state.set_depthTest("never"); if(mask.get_stage() != null) { this._state.setModelviewMatricesToIdentity(); if(mask.get_is3D()) { matrix3D = mask.getTransformationMatrix3D(null,Painter.sMatrix3D); } else { matrix = mask.getTransformationMatrix(null,Painter.sMatrix); } } else if(mask.get_is3D()) { matrix3D = mask.get_transformationMatrix3D(); } else { matrix = mask.get_transformationMatrix(); } if(matrix3D != null) { this._state.transformModelviewMatrix3D(matrix3D); } else { this._state.transformModelviewMatrix(matrix); } mask.render(this); this.finishMeshBatch(); this.set_cacheEnabled(wasCacheEnabled); this.popState(); }, pushClipRect: function(clipRect) { var stack = this._clipRectStack; var stackLength = stack.length; var intersection = (starling_utils_Pool().default).getRectangle(); if(stackLength != 0) { (starling_utils_RectangleUtil().default).intersect(stack[stackLength - 1],clipRect,intersection); } else { intersection.copyFrom(clipRect); } (openfl__$Vector_Vector_$Impl_$().default).set(stack,stackLength,intersection); this._state.set_clipRect(intersection); }, popClipRect: function() { var stack = this._clipRectStack; var stackLength = stack.length; if(stackLength == 0) { throw new (js__$Boot_HaxeError().default)(new (openfl_errors_Error().default)("Trying to pop from empty clip rectangle stack")); } --stackLength; (starling_utils_Pool().default).putRectangle((openfl__$Vector_Vector_$Impl_$().default).pop(stack)); this._state.set_clipRect(stackLength != 0 ? stack[stackLength - 1] : null); }, isRectangularMask: function(mask,maskee,out) { var quad = ((mask) instanceof (starling_display_Quad().default)) ? mask : null; var isInverted = maskee != null && maskee.get_maskInverted(); var is3D = mask.get_is3D() || maskee != null && maskee.get_is3D() && mask.get_stage() == null; if(quad != null && !isInverted && !is3D && quad.get_texture() == null) { if(mask.get_stage() != null) { mask.getTransformationMatrix(null,out); } else { out.copyFrom(mask.get_transformationMatrix()); out.concat(this._state.get_modelviewMatrix()); } if(!((starling_utils_MathUtil().default).isEquivalent(out.a,0) && (starling_utils_MathUtil().default).isEquivalent(out.d,0))) { if((starling_utils_MathUtil().default).isEquivalent(out.b,0)) { return (starling_utils_MathUtil().default).isEquivalent(out.c,0); } else { return false; } } else { return true; } } return false; }, batchMesh: function(mesh,subset) { this._batchProcessor.addMesh(mesh,this._state,subset); }, finishMeshBatch: function() { this._batchProcessor.finishBatch(); }, enableBatchTrimming: function(enabled,interval) { if(interval == null) { interval = 250; } if(enabled == null) { enabled = true; } this._batchTrimInterval = enabled ? interval : 0; }, finishFrame: function() { if(this._batchTrimInterval > 0) { var baseInterval = this._batchTrimInterval | 1; var specInterval = (Std().default).int(this._batchTrimInterval * 1.5); if((Std().default).int((_$UInt_UInt_$Impl_$().default).toFloat(this._frameID) % (_$UInt_UInt_$Impl_$().default).toFloat(baseInterval)) == 0) { this._batchProcessorCurr.trim(); } if((Std().default).int((_$UInt_UInt_$Impl_$().default).toFloat(this._frameID) % (_$UInt_UInt_$Impl_$().default).toFloat(specInterval)) == 0) { this._batchProcessorSpec.trim(); } } this._batchProcessor.finishBatch(); this._batchProcessor = this._batchProcessorSpec; this.processCacheExclusions(); }, processCacheExclusions: function() { var i; var length = this._batchCacheExclusions.length; var _g = 0; var _g1 = length; while(_g < _g1) { var i1 = _g++; this._batchCacheExclusions[i1].excludeFromCache(); } this._batchCacheExclusions.length = 0; }, setupContextDefaults: function() { this._actualBlendMode = null; this._actualCulling = null; this._actualDepthMask = false; this._actualDepthTest = null; }, nextFrame: function() { this._batchProcessor = this.swapBatchProcessors(); this._batchProcessor.clear(); this._batchProcessorSpec.clear(); this.setupContextDefaults(); this.set_stencilReferenceValue(Painter.DEFAULT_STENCIL_VALUE); this._clipRectStack.length = 0; this._drawCount = 0; this._stateStackPos = -1; this._state.reset(); }, swapBatchProcessors: function() { var tmp = this._batchProcessorPrev; this._batchProcessorPrev = this._batchProcessorCurr; return this._batchProcessorCurr = tmp; }, drawFromCache: function(startToken,endToken) { var meshBatch; var subset = Painter.sMeshSubset; if(!startToken.equals(endToken)) { this.pushState(); var _g = startToken.batchID; var _g1 = endToken.batchID + 1; while(_g < _g1) { var i = _g++; meshBatch = this._batchProcessorPrev.getBatchAt(i); subset.setTo(); if(i == startToken.batchID) { subset.vertexID = startToken.vertexID; subset.indexID = startToken.indexID; subset.numVertices = meshBatch.get_numVertices() - subset.vertexID; subset.numIndices = meshBatch.get_numIndices() - subset.indexID; } if(i == endToken.batchID) { subset.numVertices = endToken.vertexID - subset.vertexID; subset.numIndices = endToken.indexID - subset.indexID; } if(subset.numVertices != 0) { this._state.set_alpha(1.0); this._state.set_blendMode(meshBatch.get_blendMode()); this._batchProcessor.addMesh(meshBatch,this._state,subset,true); } } this.popState(); } }, excludeFromCache: function(object) { if(object != null) { (openfl__$Vector_Vector_$Impl_$().default).set(this._batchCacheExclusions,this._batchCacheExclusions.length,object); } }, drawBatch: function(meshBatch) { this.pushState(); this.get_state().set_blendMode(meshBatch.get_blendMode()); this.get_state().get_modelviewMatrix().identity(); this.get_state().set_alpha(1.0); meshBatch.render(this); this.popState(); }, prepareToDraw: function() { this.applyBlendMode(); this.applyRenderTarget(); this.applyClipRect(); this.applyCulling(); this.applyDepthTest(); }, clear: function(rgb,alpha) { if(alpha == null) { alpha = 0.0; } if(rgb == null) { rgb = 0; } this.applyRenderTarget(); this.set_stencilReferenceValue(Painter.DEFAULT_STENCIL_VALUE); (starling_utils_RenderUtil().default).clear(rgb,alpha,1.0,Painter.DEFAULT_STENCIL_VALUE); }, present: function() { this._state.set_renderTarget(null); this._actualRenderTarget = null; this._context.present(); }, applyBlendMode: function() { var blendMode = this._state.get_blendMode(); if(blendMode != this._actualBlendMode) { (starling_display_BlendMode().default).get(this._state.get_blendMode()).activate(); this._actualBlendMode = blendMode; } }, applyCulling: function() { var culling = this._state.get_culling(); if(culling != this._actualCulling) { this._context.setCulling(culling); this._actualCulling = culling; } }, applyDepthTest: function() { var depthMask = this._state.get_depthMask(); var depthTest = this._state.get_depthTest(); if(depthMask != this._actualDepthMask || depthTest != this._actualDepthTest) { this._context.setDepthTest(depthMask,depthTest); this._actualDepthMask = depthMask; this._actualDepthTest = depthTest; } }, applyRenderTarget: function() { var target = this._state.get_renderTargetBase(); var options = this._state.renderTargetOptions; if(target != this._actualRenderTarget || options != this._actualRenderTargetOptions) { if(target != null) { var antiAlias = this._state.get_renderTargetAntiAlias(); var depthAndStencil = this._state.get_renderTargetSupportsDepthAndStencil(); this._context.setRenderToTexture(target,depthAndStencil,antiAlias); } else { this._context.setRenderToBackBuffer(); } this._context.setStencilReferenceValue(this.get_stencilReferenceValue()); this._actualRenderTargetOptions = options; this._actualRenderTarget = target; } }, applyClipRect: function() { var clipRect = this._state.get_clipRect(); if(clipRect != null) { var width; var height; var projMatrix = this._state.get_projectionMatrix3D(); var renderTarget = this._state.get_renderTarget(); if(renderTarget != null) { width = (Std().default).int(renderTarget.get_root().get_nativeWidth()); height = (Std().default).int(renderTarget.get_root().get_nativeHeight()); } else { width = this._backBufferWidth; height = this._backBufferHeight; } (starling_utils_MatrixUtil().default).transformCoords3D(projMatrix,clipRect.x,clipRect.y,0.0,Painter.sPoint3D); Painter.sPoint3D.project(); Painter.sClipRect.x = (Painter.sPoint3D.x * 0.5 + 0.5) * width; Painter.sClipRect.y = (0.5 - Painter.sPoint3D.y * 0.5) * height; (starling_utils_MatrixUtil().default).transformCoords3D(projMatrix,clipRect.get_right(),clipRect.get_bottom(),0.0,Painter.sPoint3D); Painter.sPoint3D.project(); Painter.sClipRect.set_right((Painter.sPoint3D.x * 0.5 + 0.5) * width); Painter.sClipRect.set_bottom((0.5 - Painter.sPoint3D.y * 0.5) * height); Painter.sBufferRect.setTo(0,0,width,height); (starling_utils_RectangleUtil().default).intersect(Painter.sClipRect,Painter.sBufferRect,Painter.sScissorRect); if(Painter.sScissorRect.width < 1 || Painter.sScissorRect.height < 1) { Painter.sScissorRect.setTo(0,0,1,1); } this._context.setScissorRectangle(Painter.sScissorRect); } else { this._context.setScissorRectangle(null); } }, refreshBackBufferSize: function(scaleFactor) { this._backBufferWidth = this._context.backBufferWidth; this._backBufferHeight = this._context.backBufferHeight; this._backBufferScaleFactor = scaleFactor; }, get_drawCount: function() { return this._drawCount; }, set_drawCount: function(value) { return this._drawCount = value; }, get_stencilReferenceValue: function() { var key = this._state.get_renderTarget() != null ? this._state.get_renderTargetBase() : this; if(this._stencilReferenceValues.exists(key)) { return this._stencilReferenceValues.get(key); } else { return Painter.DEFAULT_STENCIL_VALUE; } }, set_stencilReferenceValue: function(value) { var key = this._state.get_renderTarget() != null ? this._state.get_renderTargetBase() : this; this._stencilReferenceValues.set(key,value); if(this.get_contextValid()) { this._context.setStencilReferenceValue(value); } return value; }, get_cacheEnabled: function() { return this._batchProcessor == this._batchProcessorCurr; }, set_cacheEnabled: function(value) { if(value != this.get_cacheEnabled()) { this.finishMeshBatch(); if(value) { this._batchProcessor = this._batchProcessorCurr; } else { this._batchProcessor = this._batchProcessorSpec; } } return value; }, get_state: function() { return this._state; }, get_stage3D: function() { return this._stage3D; }, get_context: function() { return this._context; }, set_frameID: function(value) { return this._frameID = value; }, get_frameID: function() { if(this._batchProcessor == this._batchProcessorCurr) { return this._frameID; } else { return 0; } }, get_pixelSize: function() { return this._pixelSize; }, set_pixelSize: function(value) { return this._pixelSize = value; }, get_shareContext: function() { return this._shareContext; }, set_shareContext: function(value) { return this._shareContext = value; }, get_enableErrorChecking: function() { return this._enableErrorChecking; }, set_enableErrorChecking: function(value) { this._enableErrorChecking = value; if(this._context != null) { this._context.enableErrorChecking = value; } if(value) { (haxe_Log().default).trace("[Starling] Warning: 'enableErrorChecking' has a " + "negative impact on performance. Never activate for release builds!",{ fileName : "../src/starling/rendering/Painter.hx", lineNumber : 1004, className : "starling.rendering.Painter", methodName : "set_enableErrorChecking"}); } return value; }, get_backBufferWidth: function() { return this._backBufferWidth; }, get_backBufferHeight: function() { return this._backBufferHeight; }, get_backBufferScaleFactor: function() { return this._backBufferScaleFactor; }, get_contextValid: function() { if(this._context != null) { var driverInfo = this._context.driverInfo; if(driverInfo != null && driverInfo != "") { return driverInfo != "Disposed"; } else { return false; } } else { return false; } }, get_profile: function() { if(this._context != null) { return this._context.profile; } else { return null; } }, get_sharedData: function() { var data = Painter.sSharedData.get(this.get_stage3D()); if(data == null) { data = new (haxe_ds_StringMap().default)(); Painter.sSharedData.set(this.get_stage3D(),data); } return data; }, get_programs: function() { var programs = this.get_sharedData().get("starling.rendering.Painter.Programs"); if(programs == null) { programs = new (haxe_ds_StringMap().default)(); this.get_sharedData().set("starling.rendering.Painter.Programs",programs); } return programs; } }; Painter.prototype.__class__ = Painter.prototype.constructor = $hxClasses["starling.rendering.Painter"] = Painter; // Init Object.defineProperties(Painter.prototype,{ drawCount : { get : function () { return this.get_drawCount (); }, set : function (v) { return this.set_drawCount (v); }}, stencilReferenceValue : { get : function () { return this.get_stencilReferenceValue (); }, set : function (v) { return this.set_stencilReferenceValue (v); }}, cacheEnabled : { get : function () { return this.get_cacheEnabled (); }, set : function (v) { return this.set_cacheEnabled (v); }}, state : { get : function () { return this.get_state (); }}, stage3D : { get : function () { return this.get_stage3D (); }}, context : { get : function () { return this.get_context (); }}, frameID : { get : function () { return this.get_frameID (); }, set : function (v) { return this.set_frameID (v); }}, pixelSize : { get : function () { return this.get_pixelSize (); }, set : function (v) { return this.set_pixelSize (v); }}, shareContext : { get : function () { return this.get_shareContext (); }, set : function (v) { return this.set_shareContext (v); }}, enableErrorChecking : { get : function () { return this.get_enableErrorChecking (); }, set : function (v) { return this.set_enableErrorChecking (v); }}, backBufferWidth : { get : function () { return this.get_backBufferWidth (); }}, backBufferHeight : { get : function () { return this.get_backBufferHeight (); }}, backBufferScaleFactor : { get : function () { return this.get_backBufferScaleFactor (); }}, contextValid : { get : function () { return this.get_contextValid (); }}, profile : { get : function () { return this.get_profile (); }}, sharedData : { get : function () { return this.get_sharedData (); }}}); // Statics Painter.PROGRAM_DATA_NAME = "starling.rendering.Painter.Programs" Painter.DEFAULT_STENCIL_VALUE = 127 Painter.sSharedData = new (haxe_ds_ObjectMap().default)() Painter.sMatrix = new (openfl_geom_Matrix().default)() Painter.sPoint3D = new (openfl_geom_Vector3D().default)() Painter.sMatrix3D = new (openfl_geom_Matrix3D().default)() Painter.sClipRect = new (openfl_geom_Rectangle().default)() Painter.sBufferRect = new (openfl_geom_Rectangle().default)() Painter.sScissorRect = new (openfl_geom_Rectangle().default)() Painter.sMeshSubset = new (starling_utils_MeshSubset().default)() // Export exports.default = Painter;