iwmlib/3rdparty/pixi/pixi-projection.js.map
2019-03-21 09:57:27 +01:00

1 line
318 KiB
Plaintext
Executable File

{"version":3,"file":"pixi-projection.js","sourceRoot":"","sources":["../src/utils.ts","../src/xporter.ts","../src/base/AbstractProjection.ts","../src/base/LinearProjection.ts","../src/base/webgl/BatchBuffer.ts","../src/base/webgl/SpriteRenderer.ts","../src/base/webgl/generateMultiTextureShader.ts","../src/curve/BaseSurface.ts","../src/curve/BilinearSurface.ts","../src/curve/Container2s.ts","../src/curve/ProjectionSurface.ts","../src/curve/SpriteBilinearRenderer.ts","../src/curve/SpriteStrangeRenderer.ts","../src/curve/StrangeSurface.ts","../src/curve/sprites/Sprite2s.ts","../src/curve/sprites/Text2s.ts","../src/curve/sprites/convert.ts","../src/proj2d/Container2d.ts","../src/proj2d/Matrix2d.ts","../src/proj2d/Projection2d.ts","../src/proj2d/mesh/Mesh2d.ts","../src/proj2d/mesh/Mesh2dRenderer.ts","../src/proj2d/sprites/Sprite2d.ts","../src/proj2d/sprites/Sprite2dRenderer.ts","../src/proj2d/sprites/Text2d.ts","../src/proj2d/sprites/convert.ts","../src/proj2d/tiling/TilingSprite2d.ts","../src/proj2d/tiling/TilingSprite2dRenderer.ts","../src/proj2d/z_masks/MaskHacker.ts","../src/proj2d/z_masks/SpriteMaskFilter.ts","../src/proj3d/Container3d.ts","../src/proj3d/Camera3d.ts","../src/proj3d/Euler.ts","../src/proj3d/Matrix3d.ts","../src/proj3d/ObservableEuler.ts","../src/proj3d/Point3d.ts","../src/proj3d/Projection3d.ts","../src/proj3d/mesh/Mesh3d2d.ts","../src/proj3d/sprites/Sprite3d.ts","../src/proj3d/sprites/Text3d.ts","../src/proj3d/sprites/convert.ts"],"names":[],"mappings":"AAAA,IAAU,eAAe,CAuFxB;AAvFD,WAAU,eAAe;IAAC,IAAA,KAAK,CAuF9B;IAvFyB,WAAA,KAAK;QAC9B,+BAAsC,IAAY;YAGjD,IAAM,YAAY,GAAG,IAAI,GAAG,CAAC,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;YAAE,OAAO;QACtB,IAAI,CAAC,iBAAiB,GAAG,gBAAA,QAAQ,CAAC,SAAS,CAAC,iBAAiB,CAAC;QAC9D,IAAI,CAAC,wBAAwB,GAAG,gBAAA,QAAQ,CAAC,SAAS,CAAC,wBAAwB,CAAC;QAC/E,IAAI,CAAC,gBAAgB,GAAG,gBAAA,QAAQ,CAAC,SAAS,CAAC,gBAAgB,CAAC;QAC5D,IAAI,CAAC,aAAa,GAAG,gBAAA,QAAQ,CAAC,SAAS,CAAC,aAAa,CAAC;QACtD,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,UAAU,GAAG,IAAI,YAAY,CAAC,EAAE,CAAC,CAAC;QAC1C,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACrB,CAAC,CAAC;IAGJ,IAAY,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,WAAW,GAAG;QAC/C,IAAI,IAAI,CAAC,IAAI;YAAE,OAAO;QACtB,IAAI,CAAC,UAAU,GAAG,QAAQ,CAAC;QAC3B,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAExB,CAAC,CAAC;IAEE,IAAY,CAAC,SAAS,CAAC,SAAS,CAAC,kBAAkB,GAAG;QACnD,IAAI,CAAC,WAAW,EAAE,CAAC;QACnB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YAC3C,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,kBAAkB,EAAE,CAAC;SACzC;IACL,CAAC,CAAC;AACN,CAAC,EA9DS,eAAe,KAAf,eAAe,QA8DxB","sourcesContent":["namespace pixi_projection.utils {\r\n\texport function createIndicesForQuads(size: number) {\r\n\t\t// the total number of indices in our array, there are 6 points per quad.\r\n\r\n\t\tconst totalIndices = size * 6;\r\n\r\n\t\tconst indices = new Uint16Array(totalIndices);\r\n\r\n\t\t// fill the indices with the quads to draw\r\n\t\tfor (let i = 0, j = 0; i < totalIndices; i += 6, j += 4) {\r\n\t\t\tindices[i + 0] = j + 0;\r\n\t\t\tindices[i + 1] = j + 1;\r\n\t\t\tindices[i + 2] = j + 2;\r\n\t\t\tindices[i + 3] = j + 0;\r\n\t\t\tindices[i + 4] = j + 2;\r\n\t\t\tindices[i + 5] = j + 3;\r\n\t\t}\r\n\r\n\t\treturn indices;\r\n\t}\r\n\r\n\t//bit twiddle is here\r\n\r\n\texport function isPow2(v: number): boolean {\r\n\t\treturn !(v & (v - 1)) && (!!v);\r\n\t}\r\n\r\n\texport function nextPow2(v: number): number {\r\n\t\tv += +(v === 0);\r\n\t\t--v;\r\n\t\tv |= v >>> 1;\r\n\t\tv |= v >>> 2;\r\n\t\tv |= v >>> 4;\r\n\t\tv |= v >>> 8;\r\n\t\tv |= v >>> 16;\r\n\t\treturn v + 1;\r\n\t}\r\n\r\n\texport function log2(v: number) {\r\n\t\tlet r: number, shift: number;\r\n\t\tr = +(v > 0xFFFF) << 4;\r\n\t\tv >>>= r;\r\n\t\tshift = +(v > 0xFF ) << 3;\r\n\t\tv >>>= shift;\r\n\t\tr |= shift;\r\n\t\tshift = +(v > 0xF ) << 2;\r\n\t\tv >>>= shift;\r\n\t\tr |= shift;\r\n\t\tshift = +(v > 0x3 ) << 1;\r\n\t\tv >>>= shift;\r\n\t\tr |= shift;\r\n\t\treturn r | (v >> 1);\r\n\t}\r\n\r\n\timport PointLike = PIXI.PointLike;\r\n\r\n\texport function getIntersectionFactor(p1: PointLike, p2: PointLike, p3: PointLike, p4: PointLike, out: PointLike): number {\r\n\t\tlet A1 = p2.x - p1.x, B1 = p3.x - p4.x, C1 = p3.x - p1.x;\r\n\t\tlet A2 = p2.y - p1.y, B2 = p3.y - p4.y, C2 = p3.y - p1.y;\r\n\t\tlet D = A1 * B2 - A2 * B1;\r\n\t\tif (Math.abs(D) < 1e-7) {\r\n\t\t\tout.x = A1;\r\n\t\t\tout.y = A2;\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\tlet T = C1 * B2 - C2 * B1;\r\n\t\tlet U = A1 * C2 - A2 * C1;\r\n\r\n\t\tlet t = T / D, u = U / D;\r\n\t\tif (u < (1e-6) || u - 1 > -1e-6) {\r\n\t\t\treturn -1;\r\n\t\t}\r\n\r\n\t\tout.x = p1.x + t * (p2.x - p1.x);\r\n\t\tout.y = p1.y + t * (p2.y - p1.y);\r\n\r\n\t\treturn 1;\r\n\t}\r\n\r\n\texport function getPositionFromQuad(p: Array<PointLike>, anchor: PointLike, out: PointLike) {\r\n\t\tout = out || new PIXI.Point();\r\n\t\tlet a1 = 1.0 - anchor.x, a2 = 1.0 - a1;\r\n\t\tlet b1 = 1.0 - anchor.y, b2 = 1.0 - b1;\r\n\t\tout.x = (p[0].x * a1 + p[1].x * a2) * b1 + (p[3].x * a1 + p[2].x * a2) * b2;\r\n\t\tout.y = (p[0].y * a1 + p[1].y * a2) * b1 + (p[3].y * a1 + p[2].y * a2) * b2;\r\n\t\treturn out;\r\n\t}\r\n}\r\n","///<reference types=\"pixi.js\"/>\r\n(PIXI as any).projection = pixi_projection;\r\n","declare namespace PIXI {\r\n export interface TransformBase {\r\n proj: pixi_projection.AbstractProjection;\r\n }\r\n\r\n export interface ObservablePoint {\r\n _x: number;\r\n _y: number;\r\n }\r\n\r\n export interface TransformStatic {\r\n proj: pixi_projection.AbstractProjection;\r\n }\r\n}\r\n\r\nnamespace pixi_projection {\r\n export class AbstractProjection {\r\n\r\n constructor(legacy: PIXI.TransformBase, enable: boolean = true) {\r\n this.legacy = legacy as PIXI.TransformStatic;\r\n\r\n if (enable) {\r\n this.enabled = true;\r\n }\r\n\r\n // sorry for hidden class, it would be good to have special projection field in official pixi\r\n this.legacy.proj = this;\r\n }\r\n\r\n legacy: PIXI.TransformStatic;\r\n\r\n _enabled: boolean = false;\r\n\r\n get enabled() {\r\n return this._enabled;\r\n }\r\n\r\n set enabled(value: boolean) {\r\n this._enabled = value;\r\n }\r\n\r\n clear() {\r\n }\r\n }\r\n\r\n export enum TRANSFORM_STEP {\r\n NONE = 0,\r\n // POS = 1,\r\n // ROT = 2,\r\n // SCALE = 3,\r\n // PIVOT = 4,\r\n BEFORE_PROJ = 4,\r\n PROJ = 5,\r\n // POS_2 = 6,\r\n // ROT_2 = 7,\r\n // SCALE_2 = 8,\r\n // PIVOT_2 = 9,\r\n ALL = 9\r\n }\r\n}\r\n","namespace pixi_projection {\r\n\tfunction transformHack(this: PIXI.TransformStatic, parentTransform: PIXI.TransformBase) {\r\n\t\t// implementation here\r\n\t\tconst proj = this.proj as LinearProjection<any>;\r\n\t\tconst ta = this as any;\r\n\t\tconst pwid = (parentTransform as any)._worldID;\r\n\r\n\t\tconst lt = ta.localTransform;\r\n\r\n\t\t//this part is copied from\r\n\t\tif (ta._localID !== ta._currentLocalID) {\r\n\t\t\t// get the matrix values of the displayobject based on its transform properties..\r\n\t\t\tlt.a = ta._cx * ta.scale._x;\r\n\t\t\tlt.b = ta._sx * ta.scale._x;\r\n\t\t\tlt.c = ta._cy * ta.scale._y;\r\n\t\t\tlt.d = ta._sy * ta.scale._y;\r\n\r\n\t\t\tlt.tx = ta.position._x - ((ta.pivot._x * lt.a) + (ta.pivot._y * lt.c));\r\n\t\t\tlt.ty = ta.position._y - ((ta.pivot._x * lt.b) + (ta.pivot._y * lt.d));\r\n\t\t\tta._currentLocalID = ta._localID;\r\n\r\n\t\t\t// force an update..\r\n\t\t\tproj._currentProjID = -1;\r\n\t\t}\r\n\r\n\t\tconst _matrixID = proj._projID;\r\n\t\tif (proj._currentProjID !== _matrixID) {\r\n\t\t\tproj._currentProjID = _matrixID;\r\n\t\t\tproj.updateLocalTransform(lt);\r\n\t\t\tta._parentID = -1;\r\n\t\t}\r\n\r\n\t\tif (ta._parentID !== pwid) {\r\n\t\t\tconst pp = parentTransform.proj as Projection2d;\r\n\t\t\tif (pp && !pp._affine) {\r\n\t\t\t\tproj.world.setToMult(pp.world, proj.local);\r\n\t\t\t} else {\r\n\t\t\t\tproj.world.setToMultLegacy(parentTransform.worldTransform, proj.local);\r\n\t\t\t}\r\n\t\t\tproj.world.copy(ta.worldTransform, proj._affine);\r\n\t\t\tta._parentID = pwid;\r\n\t\t\tta._worldID++;\r\n\t\t}\r\n\t}\r\n\r\n\texport class LinearProjection<T> extends AbstractProjection {\r\n\t\tupdateLocalTransform(lt: PIXI.Matrix) {\r\n\r\n\t\t}\r\n\r\n\t\t_projID = 0;\r\n\t\t_currentProjID = -1;\r\n\t\t_affine = AFFINE.NONE;\r\n\r\n\t\tset affine(value: AFFINE) {\r\n\t\t\tif (this._affine == value) return;\r\n\t\t\tthis._affine = value;\r\n\t\t\tthis._currentProjID = -1;\r\n\t\t}\r\n\r\n\t\tget affine() {\r\n\t\t\treturn this._affine;\r\n\t\t}\r\n\r\n\t\tlocal: T;\r\n\t\tworld: T;\r\n\r\n\t\tset enabled(value: boolean) {\r\n\t\t\tif (value === this._enabled) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tthis._enabled = value;\r\n\t\t\tif (value) {\r\n\t\t\t\tthis.legacy.updateTransform = transformHack;\r\n\t\t\t\t(this.legacy as any)._parentID = -1;\r\n\t\t\t} else {\r\n\t\t\t\tthis.legacy.updateTransform = PIXI.TransformStatic.prototype.updateTransform;\r\n\t\t\t\t(this.legacy as any)._parentID = -1;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tclear() {\r\n\t\t\tthis._currentProjID = -1;\r\n\t\t\tthis._projID = 0;\r\n\t\t}\r\n\t}\r\n}\r\n","namespace pixi_projection.webgl {\r\n\texport class BatchBuffer {\r\n\t\tvertices: ArrayBuffer;\r\n\t\tfloat32View: Float32Array;\r\n\t\tuint32View: Uint32Array;\r\n\r\n\r\n\t\tconstructor(size: number) {\r\n\t\t\tthis.vertices = new ArrayBuffer(size);\r\n\r\n\t\t\t/**\r\n\t\t\t * View on the vertices as a Float32Array for positions\r\n\t\t\t *\r\n\t\t\t * @member {Float32Array}\r\n\t\t\t */\r\n\t\t\tthis.float32View = new Float32Array(this.vertices);\r\n\r\n\t\t\t/**\r\n\t\t\t * View on the vertices as a Uint32Array for uvs\r\n\t\t\t *\r\n\t\t\t * @member {Float32Array}\r\n\t\t\t */\r\n\t\t\tthis.uint32View = new Uint32Array(this.vertices);\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t * Destroys the buffer.\r\n\t\t *\r\n\t\t */\r\n\t\tdestroy() {\r\n\t\t\tthis.vertices = null;\r\n\t\t}\r\n\t}\r\n}\r\n","declare module PIXI {\r\n\texport interface ObjectRenderer {\r\n\t\trenderer: WebGLRenderer;\r\n\t}\r\n\r\n\texport interface BaseTexture {\r\n\t\t_virtalBoundId: number;\r\n\t}\r\n}\r\n\r\nnamespace pixi_projection.webgl {\r\n\timport BaseTexture = PIXI.BaseTexture;\r\n\timport ObjectRenderer = PIXI.ObjectRenderer;\r\n\timport settings = PIXI.settings;\r\n\timport GLBuffer = PIXI.glCore.GLBuffer;\r\n\timport VertexArrayObject = PIXI.glCore.VertexArrayObject;\r\n\r\n\timport WebGLRenderer = PIXI.WebGLRenderer;\r\n\timport Sprite = PIXI.Sprite;\r\n\r\n\timport premultiplyTint = PIXI.utils.premultiplyTint;\r\n\timport premultiplyBlendMode = PIXI.utils.premultiplyBlendMode;\r\n\r\n\tlet TICK = 0;\r\n\r\n\texport class BatchGroup {\r\n\t\ttextures: Array<BaseTexture> = [];\r\n\t\ttextureCount = 0;\r\n\t\tids: Array<Number> = [];\r\n\t\tsize = 0;\r\n\t\tstart = 0;\r\n\t\tblend = PIXI.BLEND_MODES.NORMAL;\r\n\t\tuniforms: any = null;\r\n\t}\r\n\r\n\texport abstract class MultiTextureSpriteRenderer extends ObjectRenderer {\r\n\t\tshaderVert = '';\r\n\t\tshaderFrag = '';\r\n\t\tMAX_TEXTURES_LOCAL = 32;\r\n\r\n\t\tabstract createVao(vertexBuffer: GLBuffer): PIXI.glCore.VertexArrayObject;\r\n\r\n\t\tabstract fillVertices(float32View: Float32Array, uint32View: Uint32Array, index: number, sprite: any, argb: number, textureId: number): void;\r\n\r\n\t\tgetUniforms(spr: PIXI.Sprite): any {\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\tsyncUniforms(obj: any) {\r\n\t\t\tif (!obj) return;\r\n\t\t\tlet sh = this.shader;\r\n\t\t\tfor (let key in obj) {\r\n\t\t\t\tsh.uniforms[key] = obj[key];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvertSize = 5;\r\n\t\tvertByteSize = this.vertSize * 4;\r\n\t\tsize = settings.SPRITE_BATCH_SIZE;\r\n\t\tbuffers: Array<BatchBuffer>;\r\n\r\n\t\tindices: Uint16Array;\r\n\r\n\t\tshader: PIXI.Shader;\r\n\r\n\t\tcurrentIndex = 0;\r\n\t\tgroups: Array<BatchGroup>;\r\n\t\tsprites: Array<Sprite> = [];\r\n\r\n\t\tindexBuffer: GLBuffer;\r\n\t\tvertexBuffers: Array<GLBuffer> = [];\r\n\t\tvaos: Array<VertexArrayObject> = [];\r\n\t\tvao: VertexArrayObject;\r\n\t\tvaoMax = 2;\r\n\t\tvertexCount = 0;\r\n\r\n\t\tMAX_TEXTURES = 1;\r\n\r\n\t\t/**\r\n\t\t * @param {PIXI.WebGLRenderer} renderer - The renderer this sprite batch works for.\r\n\t\t */\r\n\t\tconstructor(renderer: WebGLRenderer) {\r\n\t\t\tsuper(renderer);\r\n\r\n\t\t\tthis.indices = utils.createIndicesForQuads(this.size);\r\n\r\n\t\t\tthis.groups = [];\r\n\t\t\tfor (let k = 0; k < this.size; k++) {\r\n\t\t\t\tthis.groups[k] = new BatchGroup();\r\n\t\t\t}\r\n\r\n\t\t\tthis.vaoMax = 2;\r\n\t\t\tthis.vertexCount = 0;\r\n\r\n\t\t\tthis.renderer.on('prerender', this.onPrerender, this);\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t * Sets up the renderer context and necessary buffers.\r\n\t\t *\r\n\t\t * @private\r\n\t\t */\r\n\t\tonContextChange() {\r\n\t\t\tconst gl = this.renderer.gl;\r\n\r\n\t\t\tthis.MAX_TEXTURES = Math.min(this.MAX_TEXTURES_LOCAL, this.renderer.plugins['sprite'].MAX_TEXTURES);\r\n\r\n\t\t\t// generate generateMultiTextureProgram, may be a better move?\r\n\t\t\tthis.shader = generateMultiTextureShader(this.shaderVert, this.shaderFrag, gl, this.MAX_TEXTURES);\r\n\r\n\t\t\tthis.indexBuffer = GLBuffer.createIndexBuffer(gl, this.indices, gl.STATIC_DRAW);\r\n\r\n\t\t\t// we use the second shader as the first one depending on your browser may omit aTextureId\r\n\t\t\t// as it is not used by the shader so is optimized out.\r\n\r\n\t\t\tthis.renderer.bindVao(null);\r\n\r\n\t\t\tconst attrs = this.shader.attributes;\r\n\r\n\t\t\tfor (let i = 0; i < this.vaoMax; i++) {\r\n\t\t\t\t/* eslint-disable max-len */\r\n\t\t\t\tconst vertexBuffer = this.vertexBuffers[i] = GLBuffer.createVertexBuffer(gl, null, gl.STREAM_DRAW);\r\n\t\t\t\t/* eslint-enable max-len */\r\n\r\n\t\t\t\t// build the vao object that will render..\r\n\t\t\t\tthis.vaos[i] = this.createVao(vertexBuffer);\r\n\t\t\t}\r\n\r\n\t\t\tif (!this.buffers) {\r\n\t\t\t\tthis.buffers = [];\r\n\t\t\t\tfor (let i = 1; i <= utils.nextPow2(this.size); i *= 2) {\r\n\t\t\t\t\tthis.buffers.push(new BatchBuffer(i * 4 * this.vertByteSize));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tthis.vao = this.vaos[0];\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t * Called before the renderer starts rendering.\r\n\t\t *\r\n\t\t */\r\n\t\tonPrerender() {\r\n\t\t\tthis.vertexCount = 0;\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t * Renders the sprite object.\r\n\t\t *\r\n\t\t * @param {PIXI.Sprite} sprite - the sprite to render when using this spritebatch\r\n\t\t */\r\n\t\trender(sprite: Sprite) {\r\n\t\t\t// TODO set blend modes..\r\n\t\t\t// check texture..\r\n\t\t\tif (this.currentIndex >= this.size) {\r\n\t\t\t\tthis.flush();\r\n\t\t\t}\r\n\r\n\t\t\t// get the uvs for the texture\r\n\r\n\t\t\t// if the uvs have not updated then no point rendering just yet!\r\n\t\t\tif (!(sprite as any)._texture._uvs) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif (!(sprite as any)._texture.baseTexture) {\r\n\t\t\t\t//WTF, Rpgmaker MV?\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// push a texture.\r\n\t\t\t// increment the batchsize\r\n\t\t\tthis.sprites[this.currentIndex++] = sprite;\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t * Renders the content and empties the current batch.\r\n\t\t *\r\n\t\t */\r\n\t\tflush() {\r\n\t\t\tif (this.currentIndex === 0) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tconst gl = this.renderer.gl;\r\n\t\t\tconst MAX_TEXTURES = this.MAX_TEXTURES;\r\n\r\n\t\t\tconst np2 = utils.nextPow2(this.currentIndex);\r\n\t\t\tconst log2 = utils.log2(np2);\r\n\t\t\tconst buffer = this.buffers[log2];\r\n\r\n\t\t\tconst sprites = this.sprites;\r\n\t\t\tconst groups = this.groups;\r\n\r\n\t\t\tconst float32View = buffer.float32View;\r\n\t\t\tconst uint32View = buffer.uint32View;\r\n\r\n\t\t\t// const touch = 0;// this.renderer.textureGC.count;\r\n\r\n\t\t\tlet index = 0;\r\n\t\t\tlet nextTexture: any;\r\n\t\t\tlet currentTexture: BaseTexture;\r\n\t\t\tlet currentUniforms: any = null;\r\n\t\t\tlet groupCount = 1;\r\n\t\t\tlet textureCount = 0;\r\n\t\t\tlet currentGroup = groups[0];\r\n\t\t\tlet vertexData;\r\n\t\t\tlet uvs;\r\n\t\t\tlet blendMode = premultiplyBlendMode[\r\n\t\t\t\t(sprites[0] as any)._texture.baseTexture.premultipliedAlpha ? 1 : 0][sprites[0].blendMode];\r\n\r\n\t\t\tcurrentGroup.textureCount = 0;\r\n\t\t\tcurrentGroup.start = 0;\r\n\t\t\tcurrentGroup.blend = blendMode;\r\n\r\n\t\t\tTICK++;\r\n\r\n\t\t\tlet i;\r\n\r\n\t\t\tfor (i = 0; i < this.currentIndex; ++i) {\r\n\t\t\t\t// upload the sprite elemetns...\r\n\t\t\t\t// they have all ready been calculated so we just need to push them into the buffer.\r\n\r\n\t\t\t\t// upload the sprite elemetns...\r\n\t\t\t\t// they have all ready been calculated so we just need to push them into the buffer.\r\n\t\t\t\tconst sprite = sprites[i] as any;\r\n\r\n\t\t\t\tnextTexture = sprite._texture.baseTexture;\r\n\r\n\t\t\t\tconst spriteBlendMode = premultiplyBlendMode[Number(nextTexture.premultipliedAlpha)][sprite.blendMode];\r\n\r\n\t\t\t\tif (blendMode !== spriteBlendMode) {\r\n\t\t\t\t\t// finish a group..\r\n\t\t\t\t\tblendMode = spriteBlendMode;\r\n\r\n\t\t\t\t\t// force the batch to break!\r\n\t\t\t\t\tcurrentTexture = null;\r\n\t\t\t\t\ttextureCount = MAX_TEXTURES;\r\n\t\t\t\t\tTICK++;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tconst uniforms = this.getUniforms(sprite);\r\n\t\t\t\tif (currentUniforms !== uniforms) {\r\n\t\t\t\t\tcurrentUniforms = uniforms;\r\n\r\n\t\t\t\t\tcurrentTexture = null;\r\n\t\t\t\t\ttextureCount = MAX_TEXTURES;\r\n\t\t\t\t\tTICK++;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (currentTexture !== nextTexture) {\r\n\t\t\t\t\tcurrentTexture = nextTexture;\r\n\r\n\t\t\t\t\tif (nextTexture._enabled !== TICK) {\r\n\t\t\t\t\t\tif (textureCount === MAX_TEXTURES) {\r\n\t\t\t\t\t\t\tTICK++;\r\n\r\n\t\t\t\t\t\t\ttextureCount = 0;\r\n\r\n\t\t\t\t\t\t\tcurrentGroup.size = i - currentGroup.start;\r\n\r\n\t\t\t\t\t\t\tcurrentGroup = groups[groupCount++];\r\n\t\t\t\t\t\t\tcurrentGroup.textureCount = 0;\r\n\t\t\t\t\t\t\tcurrentGroup.blend = blendMode;\r\n\t\t\t\t\t\t\tcurrentGroup.start = i;\r\n\t\t\t\t\t\t\tcurrentGroup.uniforms = currentUniforms;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tnextTexture._enabled = TICK;\r\n\t\t\t\t\t\tnextTexture._virtalBoundId = textureCount;\r\n\r\n\t\t\t\t\t\tcurrentGroup.textures[currentGroup.textureCount++] = nextTexture;\r\n\t\t\t\t\t\ttextureCount++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tconst alpha = Math.min(sprite.worldAlpha, 1.0);\r\n\t\t\t\t// we dont call extra function if alpha is 1.0, that's faster\r\n\t\t\t\tconst argb = alpha < 1.0 && nextTexture.premultipliedAlpha ? premultiplyTint(sprite._tintRGB, alpha)\r\n\t\t\t\t\t: sprite._tintRGB + (alpha * 255 << 24);\r\n\r\n\t\t\t\tthis.fillVertices(float32View, uint32View, index, sprite, argb, nextTexture._virtalBoundId);\r\n\r\n\t\t\t\tindex += this.vertSize * 4;\r\n\t\t\t}\r\n\r\n\t\t\tcurrentGroup.size = i - currentGroup.start;\r\n\r\n\t\t\tif (!settings.CAN_UPLOAD_SAME_BUFFER) {\r\n\t\t\t\t// this is still needed for IOS performance..\r\n\t\t\t\t// it really does not like uploading to the same buffer in a single frame!\r\n\t\t\t\tif (this.vaoMax <= this.vertexCount) {\r\n\t\t\t\t\tthis.vaoMax++;\r\n\r\n\t\t\t\t\tconst attrs = this.shader.attributes;\r\n\r\n\t\t\t\t\t/* eslint-disable max-len */\r\n\t\t\t\t\tconst vertexBuffer = this.vertexBuffers[this.vertexCount] = GLBuffer.createVertexBuffer(gl, null, gl.STREAM_DRAW);\r\n\t\t\t\t\t/* eslint-enable max-len */\r\n\r\n\t\t\t\t\tthis.vaos[this.vertexCount] = this.createVao(vertexBuffer);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.renderer.bindVao(this.vaos[this.vertexCount]);\r\n\r\n\t\t\t\tthis.vertexBuffers[this.vertexCount].upload(buffer.vertices, 0, false);\r\n\r\n\t\t\t\tthis.vertexCount++;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t// lets use the faster option, always use buffer number 0\r\n\t\t\t\tthis.vertexBuffers[this.vertexCount].upload(buffer.vertices, 0, true);\r\n\t\t\t}\r\n\r\n\t\t\tcurrentUniforms = null;\r\n\r\n\t\t\t// / render the groups..\r\n\t\t\tfor (i = 0; i < groupCount; i++) {\r\n\t\t\t\tconst group = groups[i];\r\n\t\t\t\tconst groupTextureCount = group.textureCount;\r\n\r\n\t\t\t\tif (group.uniforms !== currentUniforms) {\r\n\t\t\t\t\tthis.syncUniforms(group.uniforms);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfor (let j = 0; j < groupTextureCount; j++) {\r\n\t\t\t\t\tthis.renderer.bindTexture(group.textures[j], j, true);\r\n\t\t\t\t\tgroup.textures[j]._virtalBoundId = -1;\r\n\r\n\t\t\t\t\tconst v = this.shader.uniforms.samplerSize;\r\n\t\t\t\t\tif (v) {\r\n\t\t\t\t\t\tv[0] = group.textures[j].realWidth;\r\n\t\t\t\t\t\tv[1] = group.textures[j].realHeight;\r\n\t\t\t\t\t\tthis.shader.uniforms.samplerSize = v;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// set the blend mode..\r\n\t\t\t\tthis.renderer.state.setBlendMode(group.blend);\r\n\r\n\t\t\t\tgl.drawElements(gl.TRIANGLES, group.size * 6, gl.UNSIGNED_SHORT, group.start * 6 * 2);\r\n\t\t\t}\r\n\r\n\t\t\t// reset elements for the next flush\r\n\t\t\tthis.currentIndex = 0;\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t * Starts a new sprite batch.\r\n\t\t */\r\n\t\tstart() {\r\n\t\t\tthis.renderer.bindShader(this.shader);\r\n\r\n\t\t\tif (settings.CAN_UPLOAD_SAME_BUFFER) {\r\n\t\t\t\t// bind buffer #0, we don't need others\r\n\t\t\t\tthis.renderer.bindVao(this.vaos[this.vertexCount]);\r\n\r\n\t\t\t\tthis.vertexBuffers[this.vertexCount].bind();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t * Stops and flushes the current batch.\r\n\t\t *\r\n\t\t */\r\n\t\tstop() {\r\n\t\t\tthis.flush();\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t * Destroys the SpriteRenderer.\r\n\t\t *\r\n\t\t */\r\n\t\tdestroy() {\r\n\t\t\tfor (let i = 0; i < this.vaoMax; i++) {\r\n\t\t\t\tif (this.vertexBuffers[i]) {\r\n\t\t\t\t\tthis.vertexBuffers[i].destroy();\r\n\t\t\t\t}\r\n\t\t\t\tif (this.vaos[i]) {\r\n\t\t\t\t\tthis.vaos[i].destroy();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (this.indexBuffer) {\r\n\t\t\t\tthis.indexBuffer.destroy();\r\n\t\t\t}\r\n\r\n\t\t\tthis.renderer.off('prerender', this.onPrerender, this);\r\n\r\n\t\t\tsuper.destroy();\r\n\r\n\t\t\tif (this.shader) {\r\n\t\t\t\tthis.shader.destroy();\r\n\t\t\t\tthis.shader = null;\r\n\t\t\t}\r\n\r\n\t\t\tthis.vertexBuffers = null;\r\n\t\t\tthis.vaos = null;\r\n\t\t\tthis.indexBuffer = null;\r\n\t\t\tthis.indices = null;\r\n\r\n\t\t\tthis.sprites = null;\r\n\r\n\t\t\tfor (let i = 0; i < this.buffers.length; ++i) {\r\n\t\t\t\tthis.buffers[i].destroy();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n","namespace pixi_projection.webgl {\r\n\texport function generateMultiTextureShader(vertexSrc: string, fragmentSrc: string, gl: WebGLRenderingContext, maxTextures: number) {\r\n\t\tfragmentSrc = fragmentSrc.replace(/%count%/gi, maxTextures + '');\r\n\t\tfragmentSrc = fragmentSrc.replace(/%forloop%/gi, generateSampleSrc(maxTextures));\r\n\r\n\t\tconst shader = new PIXI.Shader(gl, vertexSrc, fragmentSrc);\r\n\r\n\t\tconst sampleValues = new Int32Array(maxTextures);\r\n\r\n\t\tfor (let i = 0; i < maxTextures; i++) {\r\n\t\t\tsampleValues[i] = i;\r\n\t\t}\r\n\r\n\t\tshader.bind();\r\n\t\tshader.uniforms.uSamplers = sampleValues;\r\n\r\n\t\treturn shader;\r\n\t}\r\n\r\n\tfunction generateSampleSrc(maxTextures: number) {\r\n\t\tlet src = '';\r\n\r\n\t\tsrc += '\\n';\r\n\t\tsrc += '\\n';\r\n\r\n\t\tfor (let i = 0; i < maxTextures; i++) {\r\n\t\t\tif (i > 0) {\r\n\t\t\t\tsrc += '\\nelse ';\r\n\t\t\t}\r\n\r\n\t\t\tif (i < maxTextures - 1) {\r\n\t\t\t\tsrc += `if(textureId == ${i}.0)`;\r\n\t\t\t}\r\n\r\n\t\t\tsrc += '\\n{';\r\n\t\t\tsrc += `\\n\\tcolor = texture2D(uSamplers[${i}], textureCoord);`;\r\n\t\t\tsrc += '\\n}';\r\n\t\t}\r\n\r\n\t\tsrc += '\\n';\r\n\t\tsrc += '\\n';\r\n\r\n\t\treturn src;\r\n\t}\r\n}\r\n","namespace pixi_projection {\r\n import PointLike = PIXI.PointLike;\r\n\r\n const p = [new PIXI.Point(), new PIXI.Point(), new PIXI.Point(), new PIXI.Point()];\r\n const a = [0, 0, 0, 0];\r\n\r\n export abstract class Surface implements IWorldTransform {\r\n surfaceID = \"default\";\r\n\r\n _updateID: number = 0;\r\n\r\n vertexSrc: string = \"\";\r\n fragmentSrc: string = \"\";\r\n\r\n fillUniforms(uniforms: any) {\r\n\r\n }\r\n\r\n clear() {\r\n\r\n }\r\n\r\n /**\r\n * made for bilinear, other things will need adjustments, like test if (0) is inside\r\n * @param {ArrayLike<number>} v\r\n * @param out\r\n * @param {PIXI.Matrix} after\r\n */\r\n boundsQuad(v: ArrayLike<number>, out: any, after?: PIXI.Matrix) {\r\n let minX = out[0], minY = out[1];\r\n let maxX = out[0], maxY = out[1];\r\n for (let i = 2; i < 8; i += 2) {\r\n if (minX > out[i]) minX = out[i];\r\n if (maxX < out[i]) maxX = out[i];\r\n if (minY > out[i + 1]) minY = out[i + 1];\r\n if (maxY < out[i + 1]) maxY = out[i + 1];\r\n }\r\n\r\n p[0].set(minX, minY);\r\n this.apply(p[0], p[0]);\r\n p[1].set(maxX, minY);\r\n this.apply(p[1], p[1]);\r\n p[2].set(maxX, maxY);\r\n this.apply(p[2], p[2]);\r\n p[3].set(minX, maxY);\r\n this.apply(p[3], p[3]);\r\n\r\n if (after) {\r\n after.apply(p[0], p[0]);\r\n after.apply(p[1], p[1]);\r\n after.apply(p[2], p[2]);\r\n after.apply(p[3], p[3]);\r\n out[0] = p[0].x;\r\n out[1] = p[0].y;\r\n out[2] = p[1].x;\r\n out[3] = p[1].y;\r\n out[4] = p[2].x;\r\n out[5] = p[2].y;\r\n out[6] = p[3].x;\r\n out[7] = p[3].y;\r\n } else {\r\n for (let i = 1; i <= 3; i++) {\r\n if (p[i].y < p[0].y || p[i].y == p[0].y && p[i].x < p[0].x) {\r\n let t = p[0];\r\n p[0] = p[i];\r\n p[i] = t;\r\n }\r\n }\r\n\r\n for (let i = 1; i <= 3; i++) {\r\n a[i] = Math.atan2(p[i].y - p[0].y, p[i].x - p[0].x);\r\n }\r\n for (let i = 1; i <= 3; i++) {\r\n for (let j = i + 1; j <= 3; j++) {\r\n if (a[i] > a[j]) {\r\n let t = p[i];\r\n p[i] = p[j];\r\n p[j] = t;\r\n let t2 = a[i];\r\n a[i] = a[j];\r\n a[j] = t2;\r\n }\r\n }\r\n }\r\n\r\n out[0] = p[0].x;\r\n out[1] = p[0].y;\r\n out[2] = p[1].x;\r\n out[3] = p[1].y;\r\n out[4] = p[2].x;\r\n out[5] = p[2].y;\r\n out[6] = p[3].x;\r\n out[7] = p[3].y;\r\n\r\n if ((p[3].x - p[2].x) * (p[1].y - p[2].y) - (p[1].x - p[2].x) * (p[3].y - p[2].y) < 0) {\r\n //triangle!!!\r\n out[4] = p[3].x;\r\n out[5] = p[3].y;\r\n return;\r\n }\r\n }\r\n }\r\n\r\n abstract apply(pos: PointLike, newPos: PointLike): PointLike;\r\n\r\n //TODO: remove props\r\n abstract applyInverse(pos: PointLike, newPos: PointLike): PointLike;\r\n }\r\n}\r\n","namespace pixi_projection {\r\n import PointLike = PIXI.PointLike;\r\n\r\n const tempMat = new PIXI.Matrix();\r\n const tempRect = new PIXI.Rectangle();\r\n const tempPoint = new PIXI.Point();\r\n\r\n export class BilinearSurface extends Surface {\r\n distortion = new PIXI.Point();\r\n\r\n constructor() {\r\n super();\r\n }\r\n\r\n clear() {\r\n this.distortion.set(0, 0);\r\n }\r\n\r\n apply(pos: PointLike, newPos?: PointLike): PointLike {\r\n newPos = newPos || new PIXI.Point();\r\n const d = this.distortion;\r\n const m = pos.x * pos.y;\r\n newPos.x = pos.x + d.x * m;\r\n newPos.y = pos.y + d.y * m;\r\n return newPos;\r\n }\r\n\r\n applyInverse(pos: PointLike, newPos: PointLike): PointLike {\r\n newPos = newPos || new PIXI.Point();\r\n const vx = pos.x, vy = pos.y;\r\n const dx = this.distortion.x, dy = this.distortion.y;\r\n\r\n if (dx == 0.0) {\r\n newPos.x = vx;\r\n newPos.y = vy / (1.0 + dy * vx);\r\n } else\r\n if (dy == 0.0) {\r\n newPos.y = vy;\r\n newPos.x = vx/ (1.0 + dx * vy);\r\n } else {\r\n const b = (vy * dx - vx * dy + 1.0) * 0.5 / dy;\r\n const d = b * b + vx / dy;\r\n\r\n if (d <= 0.00001) {\r\n newPos.set(NaN, NaN);\r\n return;\r\n }\r\n if (dy > 0.0) {\r\n newPos.x = - b + Math.sqrt(d);\r\n } else {\r\n newPos.x = - b - Math.sqrt(d);\r\n }\r\n newPos.y = (vx / newPos.x - 1.0) / dx;\r\n }\r\n return newPos;\r\n }\r\n\r\n mapSprite(sprite: PIXI.Sprite, quad: Array<PointLike>, outTransform?: PIXI.TransformStatic) {\r\n const tex = sprite.texture;\r\n\r\n tempRect.x = -sprite.anchor.x * tex.orig.width;\r\n tempRect.y = -sprite.anchor.y * tex.orig.height;\r\n tempRect.width = tex.orig.width;\r\n tempRect.height = tex.orig.height;\r\n\r\n return this.mapQuad(tempRect, quad, outTransform || sprite.transform as PIXI.TransformStatic);\r\n }\r\n\r\n mapQuad(rect: PIXI.Rectangle, quad: Array<PointLike>, outTransform: PIXI.TransformStatic) {\r\n const ax = -rect.x / rect.width;\r\n const ay = -rect.y / rect.height;\r\n\r\n const ax2 = (1.0 - rect.x) / rect.width;\r\n const ay2 = (1.0 - rect.y) / rect.height;\r\n\r\n const up1x = (quad[0].x * (1.0 - ax) + quad[1].x * ax);\r\n const up1y = (quad[0].y * (1.0 - ax) + quad[1].y * ax);\r\n const up2x = (quad[0].x * (1.0 - ax2) + quad[1].x * ax2);\r\n const up2y = (quad[0].y * (1.0 - ax2) + quad[1].y * ax2);\r\n\r\n const down1x = (quad[3].x * (1.0 - ax) + quad[2].x * ax);\r\n const down1y = (quad[3].y * (1.0 - ax) + quad[2].y * ax);\r\n const down2x = (quad[3].x * (1.0 - ax2) + quad[2].x * ax2);\r\n const down2y = (quad[3].y * (1.0 - ax2) + quad[2].y * ax2);\r\n\r\n const x00 = up1x * (1.0 - ay) + down1x * ay;\r\n const y00 = up1y * (1.0 - ay) + down1y * ay;\r\n\r\n const x10 = up2x * (1.0 - ay) + down2x * ay;\r\n const y10 = up2y * (1.0 - ay) + down2y * ay;\r\n\r\n const x01 = up1x * (1.0 - ay2) + down1x * ay2;\r\n const y01 = up1y * (1.0 - ay2) + down1y * ay2;\r\n\r\n const x11 = up2x * (1.0 - ay2) + down2x * ay2;\r\n const y11 = up2y * (1.0 - ay2) + down2y * ay2;\r\n\r\n const mat = tempMat;\r\n mat.tx = x00;\r\n mat.ty = y00;\r\n mat.a = x10 - x00;\r\n mat.b = y10 - y00;\r\n mat.c = x01 - x00;\r\n mat.d = y01 - y00;\r\n tempPoint.set(x11, y11);\r\n mat.applyInverse(tempPoint, tempPoint);\r\n this.distortion.set(tempPoint.x - 1, tempPoint.y - 1);\r\n\r\n outTransform.setFromMatrix(mat);\r\n\r\n return this;\r\n }\r\n\r\n fillUniforms(uniforms: any) {\r\n uniforms.distortion = uniforms.distortion || new Float32Array([0, 0, 0, 0]);\r\n const ax = Math.abs(this.distortion.x);\r\n const ay = Math.abs(this.distortion.y);\r\n\r\n uniforms.distortion[0] = ax * 10000 <= ay ? 0 : this.distortion.x;\r\n uniforms.distortion[1] = ay * 10000 <= ax ? 0 : this.distortion.y;\r\n uniforms.distortion[2] = 1.0 / uniforms.distortion[0];\r\n uniforms.distortion[3] = 1.0 / uniforms.distortion[1];\r\n }\r\n }\r\n}\r\n","namespace pixi_projection {\r\n export class Container2s extends PIXI.Container {\r\n constructor() {\r\n super();\r\n this.proj = new ProjectionSurface(this.transform);\r\n }\r\n\r\n proj: ProjectionSurface;\r\n\r\n get worldTransform() {\r\n return this.proj as any;\r\n }\r\n }\r\n}\r\n","declare namespace PIXI {\r\n\tinterface Matrix extends pixi_projection.IWorldTransform {\r\n\t\tapply(pos: PointLike, newPos?: PointLike): PointLike;\r\n\r\n\t\tapplyInverse(pos: PointLike, newPos?: PointLike): PointLike;\r\n\t}\r\n}\r\n\r\nnamespace pixi_projection {\r\n\timport PointLike = PIXI.PointLike;\r\n\r\n\tconst fun = PIXI.TransformStatic.prototype.updateTransform;\r\n\r\n\texport interface IWorldTransform {\r\n\t\tapply(pos: PointLike, newPos: PointLike): PointLike;\r\n\r\n\t\t//TODO: remove props\r\n\t\tapplyInverse(pos: PointLike, newPos: PointLike): PointLike;\r\n\t}\r\n\r\n\tfunction transformHack(this: PIXI.TransformStatic, parentTransform: PIXI.TransformBase): IWorldTransform {\r\n\t\tconst proj = this.proj as ProjectionSurface;\r\n\r\n\t\tconst pp = parentTransform.proj as ProjectionSurface;\r\n\t\tconst ta = this as any;\r\n\r\n\t\tif (!pp) {\r\n\t\t\tfun.call(this, parentTransform);\r\n\t\t\tproj._activeProjection = null;\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (pp._surface) {\r\n\t\t\tproj._activeProjection = pp;\r\n\t\t\tthis.updateLocalTransform();\r\n\t\t\tthis.localTransform.copy(this.worldTransform);\r\n\t\t\tif (ta._parentID < 0) {\r\n\t\t\t\t++ta._worldID;\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tfun.call(this, parentTransform);\r\n\t\tproj._activeProjection = pp._activeProjection;\r\n\t}\r\n\r\n\texport class ProjectionSurface extends AbstractProjection {\r\n\t\tconstructor(legacy: PIXI.TransformBase, enable?: boolean) {\r\n\t\t\tsuper(legacy, enable);\r\n\t\t}\r\n\r\n\t\t_surface: Surface = null;\r\n\t\t_activeProjection: ProjectionSurface = null;\r\n\r\n\t\tset enabled(value: boolean) {\r\n\t\t\tif (value === this._enabled) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tthis._enabled = value;\r\n\t\t\tif (value) {\r\n\t\t\t\tthis.legacy.updateTransform = transformHack;\r\n\t\t\t\t(this.legacy as any)._parentID = -1;\r\n\t\t\t} else {\r\n\t\t\t\tthis.legacy.updateTransform = PIXI.TransformStatic.prototype.updateTransform;\r\n\t\t\t\t(this.legacy as any)._parentID = -1;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tget surface() {\r\n\t\t\treturn this._surface;\r\n\t\t}\r\n\r\n\t\tset surface(value: Surface) {\r\n\t\t\tif (this._surface == value) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tthis._surface = value || null;\r\n\t\t\t(this.legacy as any)._parentID = -1;\r\n\t\t}\r\n\r\n\t\tapplyPartial(pos: PointLike, newPos?: PointLike): PointLike {\r\n\t\t\tif (this._activeProjection !== null) {\r\n\t\t\t\tnewPos = this.legacy.worldTransform.apply(pos, newPos);\r\n\t\t\t\treturn this._activeProjection.surface.apply(newPos, newPos);\r\n\t\t\t}\r\n\t\t\tif (this._surface !== null) {\r\n\t\t\t\treturn this.surface.apply(pos, newPos);\r\n\t\t\t}\r\n\t\t\treturn this.legacy.worldTransform.apply(pos, newPos);\r\n\t\t}\r\n\r\n\t\tapply(pos: PointLike, newPos?: PointLike): PointLike {\r\n\t\t\tif (this._activeProjection !== null) {\r\n\t\t\t\tnewPos = this.legacy.worldTransform.apply(pos, newPos);\r\n\t\t\t\tthis._activeProjection.surface.apply(newPos, newPos);\r\n\t\t\t\treturn this._activeProjection.legacy.worldTransform.apply(newPos, newPos);\r\n\t\t\t}\r\n\t\t\tif (this._surface !== null) {\r\n\t\t\t\tnewPos = this.surface.apply(pos, newPos);\r\n\t\t\t\treturn this.legacy.worldTransform.apply(newPos, newPos);\r\n\t\t\t}\r\n\t\t\treturn this.legacy.worldTransform.apply(pos, newPos);\r\n\t\t}\r\n\r\n\t\tapplyInverse(pos: PointLike, newPos: PointLike) {\r\n\t\t\tif (this._activeProjection !== null) {\r\n\t\t\t\tnewPos = this._activeProjection.legacy.worldTransform.applyInverse(pos, newPos);\r\n\t\t\t\tthis._activeProjection._surface.applyInverse(newPos, newPos);\r\n\t\t\t\treturn this.legacy.worldTransform.applyInverse(newPos, newPos);\r\n\t\t\t}\r\n\t\t\tif (this._surface !== null) {\r\n\t\t\t\tnewPos = this.legacy.worldTransform.applyInverse(pos, newPos);\r\n\t\t\t\treturn this._surface.applyInverse(newPos, newPos);\r\n\t\t\t}\r\n\t\t\treturn this.legacy.worldTransform.applyInverse(pos, newPos);\r\n\t\t}\r\n\r\n\t\tmapBilinearSprite(sprite: PIXI.Sprite, quad: Array<PointLike>) {\r\n\t\t\tif (!(this._surface instanceof BilinearSurface)) {\r\n\t\t\t\tthis.surface = new BilinearSurface();\r\n\t\t\t}\r\n\t\t\t(this.surface as BilinearSurface).mapSprite(sprite, quad, this.legacy);\r\n\t\t}\r\n\r\n\t\t_currentSurfaceID = -1;\r\n\t\t_currentLegacyID = -1;\r\n\t\t_lastUniforms : any = null;\r\n\r\n\t\tclear() {\r\n\t\t\tif (this.surface) {\r\n\t\t\t\tthis.surface.clear();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tget uniforms(): any {\r\n\t\t\tif (this._currentLegacyID === (this.legacy as any)._worldID &&\r\n\t\t\t\tthis._currentSurfaceID === this.surface._updateID) {\r\n\r\n\t\t\t\treturn this._lastUniforms;\r\n\t\t\t}\r\n\r\n\t\t\tthis._lastUniforms = this._lastUniforms || {};\r\n\t\t\tthis._lastUniforms.worldTransform = this.legacy.worldTransform.toArray(true)\r\n\t\t\tthis._surface.fillUniforms(this._lastUniforms);\r\n\t\t\treturn this._lastUniforms;\r\n\t\t}\r\n\t}\r\n}\r\n","namespace pixi_projection {\r\n import MultiTextureSpriteRenderer = pixi_projection.webgl.MultiTextureSpriteRenderer;\r\n\r\n class SpriteBilinearRenderer extends MultiTextureSpriteRenderer {\r\n size = 100;\r\n MAX_TEXTURES_LOCAL = 1;\r\n\r\n shaderVert = `precision highp float;\r\nattribute vec2 aVertexPosition;\r\nattribute vec3 aTrans1;\r\nattribute vec3 aTrans2;\r\nattribute vec4 aFrame;\r\nattribute vec4 aColor;\r\nattribute float aTextureId;\r\n\r\nuniform mat3 projectionMatrix;\r\nuniform mat3 worldTransform;\r\n\r\nvarying vec2 vTextureCoord;\r\nvarying vec3 vTrans1;\r\nvarying vec3 vTrans2;\r\nvarying vec4 vFrame;\r\nvarying vec4 vColor;\r\nvarying float vTextureId;\r\n\r\nvoid main(void){\r\n gl_Position.xyw = projectionMatrix * worldTransform * vec3(aVertexPosition, 1.0);\r\n gl_Position.z = 0.0;\r\n \r\n vTextureCoord = aVertexPosition;\r\n vTrans1 = aTrans1;\r\n vTrans2 = aTrans2;\r\n vTextureId = aTextureId;\r\n vColor = aColor;\r\n vFrame = aFrame;\r\n}\r\n`;\r\n //TODO: take non-premultiplied case into account\r\n\r\n shaderFrag = `precision highp float;\r\nvarying vec2 vTextureCoord;\r\nvarying vec3 vTrans1;\r\nvarying vec3 vTrans2;\r\nvarying vec4 vFrame;\r\nvarying vec4 vColor;\r\nvarying float vTextureId;\r\n\r\nuniform sampler2D uSamplers[%count%];\r\nuniform vec2 samplerSize[%count%]; \r\nuniform vec4 distortion;\r\n\r\nvoid main(void){\r\nvec2 surface;\r\nvec2 surface2;\r\n\r\nfloat vx = vTextureCoord.x;\r\nfloat vy = vTextureCoord.y;\r\nfloat dx = distortion.x;\r\nfloat dy = distortion.y;\r\nfloat revx = distortion.z;\r\nfloat revy = distortion.w;\r\n\r\nif (distortion.x == 0.0) {\r\n surface.x = vx;\r\n surface.y = vy / (1.0 + dy * vx);\r\n surface2 = surface;\r\n} else\r\nif (distortion.y == 0.0) {\r\n surface.y = vy;\r\n surface.x = vx/ (1.0 + dx * vy);\r\n surface2 = surface;\r\n} else {\r\n float c = vy * dx - vx * dy;\r\n float b = (c + 1.0) * 0.5;\r\n float b2 = (-c + 1.0) * 0.5;\r\n float d = b * b + vx * dy;\r\n if (d < -0.00001) {\r\n discard;\r\n }\r\n d = sqrt(max(d, 0.0));\r\n surface.x = (- b + d) * revy;\r\n surface2.x = (- b - d) * revy;\r\n surface.y = (- b2 + d) * revx;\r\n surface2.y = (- b2 - d) * revx;\r\n}\r\n\r\nvec2 uv;\r\nuv.x = vTrans1.x * surface.x + vTrans1.y * surface.y + vTrans1.z;\r\nuv.y = vTrans2.x * surface.x + vTrans2.y * surface.y + vTrans2.z;\r\n\r\nvec2 pixels = uv * samplerSize[0];\r\n\r\nif (pixels.x < vFrame.x || pixels.x > vFrame.z ||\r\n pixels.y < vFrame.y || pixels.y > vFrame.w) {\r\n uv.x = vTrans1.x * surface2.x + vTrans1.y * surface2.y + vTrans1.z;\r\n uv.y = vTrans2.x * surface2.x + vTrans2.y * surface2.y + vTrans2.z;\r\n pixels = uv * samplerSize[0];\r\n \r\n if (pixels.x < vFrame.x || pixels.x > vFrame.z ||\r\n pixels.y < vFrame.y || pixels.y > vFrame.w) {\r\n discard;\r\n }\r\n}\r\n\r\nvec4 edge;\r\nedge.xy = clamp(pixels - vFrame.xy + 0.5, vec2(0.0, 0.0), vec2(1.0, 1.0));\r\nedge.zw = clamp(vFrame.zw - pixels + 0.5, vec2(0.0, 0.0), vec2(1.0, 1.0));\r\n\r\nfloat alpha = 1.0; //edge.x * edge.y * edge.z * edge.w;\r\nvec4 rColor = vColor * alpha;\r\n\r\nfloat textureId = floor(vTextureId+0.5);\r\nvec4 color;\r\nvec2 textureCoord = uv;\r\n%forloop%\r\ngl_FragColor = color * rColor;\r\n}`;\r\n\r\n defUniforms = {\r\n worldTransform: new Float32Array([1, 0, 0, 0, 1, 0, 0, 0, 1]),\r\n distortion: new Float32Array([0, 0])\r\n };\r\n\r\n getUniforms(sprite: PIXI.Sprite) {\r\n let proj = (sprite as Sprite2s).proj;\r\n let shader = this.shader;\r\n\r\n if (proj.surface !== null) {\r\n return proj.uniforms;\r\n }\r\n if (proj._activeProjection !== null) {\r\n return proj._activeProjection.uniforms;\r\n }\r\n return this.defUniforms;\r\n }\r\n\r\n createVao(vertexBuffer: PIXI.glCore.GLBuffer) {\r\n const attrs = this.shader.attributes;\r\n this.vertSize = 14;\r\n this.vertByteSize = this.vertSize * 4;\r\n\r\n const gl = this.renderer.gl;\r\n const vao = this.renderer.createVao()\r\n .addIndex(this.indexBuffer)\r\n .addAttribute(vertexBuffer, attrs.aVertexPosition, gl.FLOAT, false, this.vertByteSize, 0)\r\n .addAttribute(vertexBuffer, attrs.aTrans1, gl.FLOAT, false, this.vertByteSize, 2 * 4)\r\n .addAttribute(vertexBuffer, attrs.aTrans2, gl.FLOAT, false, this.vertByteSize, 5 * 4)\r\n .addAttribute(vertexBuffer, attrs.aFrame, gl.FLOAT, false, this.vertByteSize, 8 * 4)\r\n .addAttribute(vertexBuffer, attrs.aColor, gl.UNSIGNED_BYTE, true, this.vertByteSize, 12 * 4);\r\n\r\n if (attrs.aTextureId) {\r\n vao.addAttribute(vertexBuffer, attrs.aTextureId, gl.FLOAT, false, this.vertByteSize, 13 * 4);\r\n }\r\n\r\n return vao;\r\n\r\n }\r\n\r\n fillVertices(float32View: Float32Array, uint32View: Uint32Array, index: number, sprite: any, argb: number, textureId: number) {\r\n const vertexData = sprite.vertexData;\r\n const tex = sprite._texture;\r\n const w = tex.orig.width;\r\n const h = tex.orig.height;\r\n const ax = sprite._anchor._x;\r\n const ay = sprite._anchor._y;\r\n const frame = tex._frame;\r\n const aTrans = sprite.aTrans;\r\n\r\n for (let i = 0; i < 4; i++) {\r\n float32View[index] = vertexData[i * 2];\r\n float32View[index + 1] = vertexData[i * 2 + 1];\r\n\r\n float32View[index + 2] = aTrans.a;\r\n float32View[index + 3] = aTrans.c;\r\n float32View[index + 4] = aTrans.tx;\r\n float32View[index + 5] = aTrans.b;\r\n float32View[index + 6] = aTrans.d;\r\n float32View[index + 7] = aTrans.ty;\r\n\r\n float32View[index + 8] = frame.x;\r\n float32View[index + 9] = frame.y;\r\n float32View[index + 10] = frame.x + frame.width;\r\n float32View[index + 11] = frame.y + frame.height;\r\n\r\n uint32View[index + 12] = argb;\r\n float32View[index + 13] = textureId;\r\n index += 14;\r\n }\r\n }\r\n }\r\n\r\n PIXI.WebGLRenderer.registerPlugin('sprite_bilinear', SpriteBilinearRenderer);\r\n}\r\n","namespace pixi_projection {\r\n\timport MultiTextureSpriteRenderer = pixi_projection.webgl.MultiTextureSpriteRenderer;\r\n\r\n\tclass SpriteStrangeRenderer extends MultiTextureSpriteRenderer {\r\n\t\tsize = 100;\r\n\t\tMAX_TEXTURES_LOCAL = 1;\r\n\r\n\t\tshaderVert = `precision highp float;\r\nattribute vec2 aVertexPosition;\r\nattribute vec3 aTrans1;\r\nattribute vec3 aTrans2;\r\nattribute vec4 aFrame;\r\nattribute vec4 aColor;\r\nattribute float aTextureId;\r\n\r\nuniform mat3 projectionMatrix;\r\nuniform mat3 worldTransform;\r\n\r\nvarying vec2 vTextureCoord;\r\nvarying vec3 vTrans1;\r\nvarying vec3 vTrans2;\r\nvarying vec4 vFrame;\r\nvarying vec4 vColor;\r\nvarying float vTextureId;\r\n\r\nvoid main(void){\r\n gl_Position.xyw = projectionMatrix * worldTransform * vec3(aVertexPosition, 1.0);\r\n gl_Position.z = 0.0;\r\n \r\n vTextureCoord = aVertexPosition;\r\n vTrans1 = aTrans1;\r\n vTrans2 = aTrans2;\r\n vTextureId = aTextureId;\r\n vColor = aColor;\r\n vFrame = aFrame;\r\n}\r\n`;\r\n\t\t//TODO: take non-premultiplied case into account\r\n\r\n\t\tshaderFrag = `precision highp float;\r\nvarying vec2 vTextureCoord;\r\nvarying vec3 vTrans1;\r\nvarying vec3 vTrans2;\r\nvarying vec4 vFrame;\r\nvarying vec4 vColor;\r\nvarying float vTextureId;\r\n\r\nuniform sampler2D uSamplers[%count%];\r\nuniform vec2 samplerSize[%count%]; \r\nuniform vec4 params;\r\n\r\nvoid main(void){\r\nvec2 surface;\r\n\r\nfloat vx = vTextureCoord.x;\r\nfloat vy = vTextureCoord.y;\r\nfloat aleph = params.x;\r\nfloat bet = params.y;\r\nfloat A = params.z;\r\nfloat B = params.w;\r\n\r\nif (aleph == 0.0) {\r\n\tsurface.y = vy / (1.0 + vx * bet);\r\n\tsurface.x = vx;\r\n}\r\nelse if (bet == 0.0) {\r\n\tsurface.x = vx / (1.0 + vy * aleph);\r\n\tsurface.y = vy;\r\n} else {\r\n\tsurface.x = vx * (bet + 1.0) / (bet + 1.0 + vy * aleph);\r\n\tsurface.y = vy * (aleph + 1.0) / (aleph + 1.0 + vx * bet);\r\n}\r\n\r\nvec2 uv;\r\nuv.x = vTrans1.x * surface.x + vTrans1.y * surface.y + vTrans1.z;\r\nuv.y = vTrans2.x * surface.x + vTrans2.y * surface.y + vTrans2.z;\r\n\r\nvec2 pixels = uv * samplerSize[0];\r\n\r\nvec4 edge;\r\nedge.xy = clamp(pixels - vFrame.xy + 0.5, vec2(0.0, 0.0), vec2(1.0, 1.0));\r\nedge.zw = clamp(vFrame.zw - pixels + 0.5, vec2(0.0, 0.0), vec2(1.0, 1.0));\r\n\r\nfloat alpha = edge.x * edge.y * edge.z * edge.w;\r\nvec4 rColor = vColor * alpha;\r\n\r\nfloat textureId = floor(vTextureId+0.5);\r\nvec4 color;\r\nvec2 textureCoord = uv;\r\n%forloop%\r\ngl_FragColor = color * rColor;\r\n}`;\r\n\r\n\t\tdefUniforms = {\r\n\t\t\tworldTransform: new Float32Array([1, 0, 0, 0, 1, 0, 0, 0, 1]),\r\n\t\t\tdistortion: new Float32Array([0, 0])\r\n\t\t};\r\n\r\n\t\tgetUniforms(sprite: PIXI.Sprite) {\r\n\t\t\tlet proj = (sprite as Sprite2s).proj;\r\n\t\t\tlet shader = this.shader;\r\n\r\n\t\t\tif (proj.surface !== null) {\r\n\t\t\t\treturn proj.uniforms;\r\n\t\t\t}\r\n\t\t\tif (proj._activeProjection !== null) {\r\n\t\t\t\treturn proj._activeProjection.uniforms;\r\n\t\t\t}\r\n\t\t\treturn this.defUniforms;\r\n\t\t}\r\n\r\n\t\tcreateVao(vertexBuffer: PIXI.glCore.GLBuffer) {\r\n\t\t\tconst attrs = this.shader.attributes;\r\n\t\t\tthis.vertSize = 14;\r\n\t\t\tthis.vertByteSize = this.vertSize * 4;\r\n\r\n\t\t\tconst gl = this.renderer.gl;\r\n\t\t\tconst vao = this.renderer.createVao()\r\n\t\t\t\t.addIndex(this.indexBuffer)\r\n\t\t\t\t.addAttribute(vertexBuffer, attrs.aVertexPosition, gl.FLOAT, false, this.vertByteSize, 0)\r\n\t\t\t\t.addAttribute(vertexBuffer, attrs.aTrans1, gl.FLOAT, false, this.vertByteSize, 2 * 4)\r\n\t\t\t\t.addAttribute(vertexBuffer, attrs.aTrans2, gl.FLOAT, false, this.vertByteSize, 5 * 4)\r\n\t\t\t\t.addAttribute(vertexBuffer, attrs.aFrame, gl.FLOAT, false, this.vertByteSize, 8 * 4)\r\n\t\t\t\t.addAttribute(vertexBuffer, attrs.aColor, gl.UNSIGNED_BYTE, true, this.vertByteSize, 12 * 4);\r\n\r\n\t\t\tif (attrs.aTextureId) {\r\n\t\t\t\tvao.addAttribute(vertexBuffer, attrs.aTextureId, gl.FLOAT, false, this.vertByteSize, 13 * 4);\r\n\t\t\t}\r\n\r\n\t\t\treturn vao;\r\n\r\n\t\t}\r\n\r\n\t\tfillVertices(float32View: Float32Array, uint32View: Uint32Array, index: number, sprite: any, argb: number, textureId: number) {\r\n\t\t\tconst vertexData = sprite.vertexData;\r\n\t\t\tconst tex = sprite._texture;\r\n\t\t\tconst w = tex.orig.width;\r\n\t\t\tconst h = tex.orig.height;\r\n\t\t\tconst ax = sprite._anchor._x;\r\n\t\t\tconst ay = sprite._anchor._y;\r\n\t\t\tconst frame = tex._frame;\r\n\t\t\tconst aTrans = sprite.aTrans;\r\n\r\n\t\t\tfor (let i = 0; i < 4; i++) {\r\n\t\t\t\tfloat32View[index] = vertexData[i * 2];\r\n\t\t\t\tfloat32View[index + 1] = vertexData[i * 2 + 1];\r\n\r\n\t\t\t\tfloat32View[index + 2] = aTrans.a;\r\n\t\t\t\tfloat32View[index + 3] = aTrans.c;\r\n\t\t\t\tfloat32View[index + 4] = aTrans.tx;\r\n\t\t\t\tfloat32View[index + 5] = aTrans.b;\r\n\t\t\t\tfloat32View[index + 6] = aTrans.d;\r\n\t\t\t\tfloat32View[index + 7] = aTrans.ty;\r\n\r\n\t\t\t\tfloat32View[index + 8] = frame.x;\r\n\t\t\t\tfloat32View[index + 9] = frame.y;\r\n\t\t\t\tfloat32View[index + 10] = frame.x + frame.width;\r\n\t\t\t\tfloat32View[index + 11] = frame.y + frame.height;\r\n\r\n\t\t\t\tuint32View[index + 12] = argb;\r\n\t\t\t\tfloat32View[index + 13] = textureId;\r\n\t\t\t\tindex += 14;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tPIXI.WebGLRenderer.registerPlugin('sprite_strange', SpriteStrangeRenderer);\r\n}\r\n","namespace pixi_projection {\r\n import PointLike = PIXI.PointLike;\r\n import WebGLState = PIXI.WebGLState;\r\n\r\n const tempMat = new PIXI.Matrix();\r\n const tempRect = new PIXI.Rectangle();\r\n const tempPoint = new PIXI.Point();\r\n\r\n export class StrangeSurface extends Surface {\r\n constructor() {\r\n super();\r\n }\r\n\r\n params = [0, 0, NaN, NaN];\r\n\r\n clear() {\r\n let p = this.params;\r\n p[0] = 0;\r\n p[1] = 0;\r\n p[2] = NaN;\r\n p[3] = NaN;\r\n }\r\n\r\n setAxisX(pos: PointLike, factor: number, outTransform: PIXI.TransformStatic) {\r\n const x = pos.x, y = pos.y;\r\n //TODO: check x=0, y=0\r\n\r\n let d = Math.sqrt(x * x + y * y);\r\n let rot = outTransform.rotation;\r\n if (rot !== 0) {\r\n outTransform.skew._x -= rot;\r\n outTransform.skew._y += rot;\r\n outTransform.rotation = 0;\r\n }\r\n outTransform.skew.y = Math.atan2(y, x);\r\n\r\n let p = this.params;\r\n\r\n if (factor !== 0) {\r\n p[2] = -d * factor;\r\n } else {\r\n p[2] = NaN;\r\n }\r\n this._calc01();\r\n }\r\n\r\n setAxisY(pos: PointLike, factor: number, outTransform: PIXI.TransformStatic) {\r\n const x = pos.x, y = pos.y;\r\n\r\n //TODO: check if axis x and axis y is the same\r\n\r\n let d = Math.sqrt(x * x + y * y);\r\n let rot = outTransform.rotation;\r\n if (rot !== 0) {\r\n outTransform.skew._x -= rot;\r\n outTransform.skew._y += rot;\r\n outTransform.rotation = 0;\r\n }\r\n outTransform.skew.x = -Math.atan2(y, x) + Math.PI / 2;\r\n\r\n let p = this.params;\r\n\r\n if (factor !== 0) {\r\n p[3] = -d * factor;\r\n } else {\r\n p[3] = NaN;\r\n }\r\n this._calc01();\r\n }\r\n\r\n _calc01() {\r\n let p = this.params;\r\n if (isNaN(p[2])) {\r\n p[1] = 0;\r\n if (isNaN(p[3])) {\r\n p[0] = 0;\r\n } else {\r\n p[0] = 1.0 / p[3];\r\n }\r\n } else {\r\n if (isNaN(p[3])) {\r\n p[0] = 0;\r\n p[1] = 1.0 / p[2];\r\n } else {\r\n const d = 1.0 - p[2] * p[3];\r\n p[0] = (1.0 - p[2]) / d;\r\n p[1] = (1.0 - p[3]) / d;\r\n }\r\n }\r\n }\r\n\r\n apply(pos: PointLike, newPos?: PointLike): PointLike {\r\n newPos = newPos || new PIXI.Point();\r\n\r\n const aleph = this.params[0], bet = this.params[1], A = this.params[2], B = this.params[3];\r\n const u = pos.x, v = pos.y;\r\n\r\n if (aleph === 0.0) {\r\n newPos.y = v * (1 + u * bet);\r\n newPos.x = u;\r\n }\r\n else if (bet === 0.0) {\r\n newPos.x = u * (1 + v * aleph);\r\n newPos.y = v;\r\n } else {\r\n const D = A * B - v * u;\r\n newPos.x = A * u * (B + v) / D;\r\n newPos.y = B * v * (A + u) / D;\r\n }\r\n return newPos;\r\n }\r\n\r\n applyInverse(pos: PointLike, newPos: PointLike): PointLike {\r\n newPos = newPos || new PIXI.Point();\r\n\r\n const aleph = this.params[0], bet = this.params[1], A = this.params[2], B = this.params[3];\r\n const x = pos.x, y = pos.y;\r\n\r\n if (aleph === 0.0) {\r\n newPos.y = y / (1 + x * bet);\r\n newPos.x = x;\r\n }\r\n else if (bet === 0.0) {\r\n newPos.x = x * (1 + y * aleph);\r\n newPos.y = y;\r\n } else {\r\n newPos.x = x * (bet + 1) / (bet + 1 + y * aleph);\r\n newPos.y = y * (aleph + 1) / (aleph + 1 + x * bet);\r\n }\r\n return newPos;\r\n }\r\n\r\n mapSprite(sprite: PIXI.Sprite, quad: Array<PointLike>, outTransform?: PIXI.TransformStatic) {\r\n const tex = sprite.texture;\r\n\r\n tempRect.x = -sprite.anchor.x * tex.orig.width;\r\n tempRect.y = -sprite.anchor.y * tex.orig.height;\r\n tempRect.width = tex.orig.width;\r\n tempRect.height = tex.orig.height;\r\n\r\n return this.mapQuad(tempRect, quad, outTransform || sprite.transform as PIXI.TransformStatic);\r\n }\r\n\r\n mapQuad(rect: PIXI.Rectangle, quad: Array<PointLike>, outTransform: PIXI.TransformStatic) {\r\n const ax = -rect.x / rect.width;\r\n const ay = -rect.y / rect.height;\r\n\r\n const ax2 = (1.0 - rect.x) / rect.width;\r\n const ay2 = (1.0 - rect.y) / rect.height;\r\n\r\n const up1x = (quad[0].x * (1.0 - ax) + quad[1].x * ax);\r\n const up1y = (quad[0].y * (1.0 - ax) + quad[1].y * ax);\r\n const up2x = (quad[0].x * (1.0 - ax2) + quad[1].x * ax2);\r\n const up2y = (quad[0].y * (1.0 - ax2) + quad[1].y * ax2);\r\n\r\n const down1x = (quad[3].x * (1.0 - ax) + quad[2].x * ax);\r\n const down1y = (quad[3].y * (1.0 - ax) + quad[2].y * ax);\r\n const down2x = (quad[3].x * (1.0 - ax2) + quad[2].x * ax2);\r\n const down2y = (quad[3].y * (1.0 - ax2) + quad[2].y * ax2);\r\n\r\n const x00 = up1x * (1.0 - ay) + down1x * ay;\r\n const y00 = up1y * (1.0 - ay) + down1y * ay;\r\n\r\n const x10 = up2x * (1.0 - ay) + down2x * ay;\r\n const y10 = up2y * (1.0 - ay) + down2y * ay;\r\n\r\n const x01 = up1x * (1.0 - ay2) + down1x * ay2;\r\n const y01 = up1y * (1.0 - ay2) + down1y * ay2;\r\n\r\n const x11 = up2x * (1.0 - ay2) + down2x * ay2;\r\n const y11 = up2y * (1.0 - ay2) + down2y * ay2;\r\n\r\n const mat = tempMat;\r\n mat.tx = x00;\r\n mat.ty = y00;\r\n mat.a = x10 - x00;\r\n mat.b = y10 - y00;\r\n mat.c = x01 - x00;\r\n mat.d = y01 - y00;\r\n tempPoint.set(x11, y11);\r\n mat.applyInverse(tempPoint, tempPoint);\r\n // this.distortion.set(tempPoint.x - 1, tempPoint.y - 1);\r\n\r\n outTransform.setFromMatrix(mat);\r\n\r\n return this;\r\n }\r\n\r\n fillUniforms(uniforms: any) {\r\n const params = this.params;\r\n const distortion = uniforms.params || new Float32Array([0, 0, 0, 0]);\r\n\r\n uniforms.params = distortion;\r\n distortion[0] = params[0];\r\n distortion[1] = params[1];\r\n distortion[2] = params[2];\r\n distortion[3] = params[3];\r\n }\r\n }\r\n}\r\n","namespace pixi_projection {\r\n\texport class Sprite2s extends PIXI.Sprite {\r\n\t\tconstructor(texture: PIXI.Texture) {\r\n\t\t\tsuper(texture);\r\n\t\t\tthis.proj = new ProjectionSurface(this.transform);\r\n\t\t\tthis.pluginName = 'sprite_bilinear';\r\n\t\t}\r\n\r\n\t\tproj: ProjectionSurface;\r\n\t\taTrans = new PIXI.Matrix();\r\n\r\n\t\t_calculateBounds() {\r\n\t\t\tthis.calculateTrimmedVertices();\r\n\t\t\tthis._bounds.addQuad(this.vertexTrimmedData as any);\r\n\t\t}\r\n\r\n\t\tcalculateVertices() {\r\n\t\t\tconst wid = (this.transform as any)._worldID;\r\n\t\t\tconst tuid = (this._texture as any)._updateID;\r\n\t\t\tif (this._transformID === wid && this._textureID === tuid) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tthis._transformID = wid;\r\n\t\t\tthis._textureID = tuid;\r\n\r\n\t\t\tconst texture = this._texture;\r\n\t\t\tconst vertexData = this.vertexData;\r\n\t\t\tconst trim = texture.trim;\r\n\t\t\tconst orig = texture.orig;\r\n\t\t\tconst anchor = this._anchor;\r\n\r\n\t\t\tlet w0 = 0;\r\n\t\t\tlet w1 = 0;\r\n\t\t\tlet h0 = 0;\r\n\t\t\tlet h1 = 0;\r\n\r\n\t\t\tif (trim) {\r\n\t\t\t\tw1 = trim.x - (anchor._x * orig.width);\r\n\t\t\t\tw0 = w1 + trim.width;\r\n\r\n\t\t\t\th1 = trim.y - (anchor._y * orig.height);\r\n\t\t\t\th0 = h1 + trim.height;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tw1 = -anchor._x * orig.width;\r\n\t\t\t\tw0 = w1 + orig.width;\r\n\r\n\t\t\t\th1 = -anchor._y * orig.height;\r\n\t\t\t\th0 = h1 + orig.height;\r\n\t\t\t}\r\n\r\n\t\t\tif (this.proj._surface) {\r\n\t\t\t\tvertexData[0] = w1;\r\n\t\t\t\tvertexData[1] = h1;\r\n\t\t\t\tvertexData[2] = w0;\r\n\t\t\t\tvertexData[3] = h1;\r\n\t\t\t\tvertexData[4] = w0;\r\n\t\t\t\tvertexData[5] = h0;\r\n\t\t\t\tvertexData[6] = w1;\r\n\t\t\t\tvertexData[7] = h0;\r\n\t\t\t\tthis.proj._surface.boundsQuad(vertexData, vertexData);\r\n\t\t\t} else {\r\n\t\t\t\tconst wt = this.transform.worldTransform;\r\n\t\t\t\tconst a = wt.a;\r\n\t\t\t\tconst b = wt.b;\r\n\t\t\t\tconst c = wt.c;\r\n\t\t\t\tconst d = wt.d;\r\n\t\t\t\tconst tx = wt.tx;\r\n\t\t\t\tconst ty = wt.ty;\r\n\t\t\t\tvertexData[0] = (a * w1) + (c * h1) + tx;\r\n\t\t\t\tvertexData[1] = (d * h1) + (b * w1) + ty;\r\n\t\t\t\tvertexData[2] = (a * w0) + (c * h1) + tx;\r\n\t\t\t\tvertexData[3] = (d * h1) + (b * w0) + ty;\r\n\t\t\t\tvertexData[4] = (a * w0) + (c * h0) + tx;\r\n\t\t\t\tvertexData[5] = (d * h0) + (b * w0) + ty;\r\n\t\t\t\tvertexData[6] = (a * w1) + (c * h0) + tx;\r\n\t\t\t\tvertexData[7] = (d * h0) + (b * w1) + ty;\r\n\t\t\t\tif (this.proj._activeProjection) {\r\n\t\t\t\t\tthis.proj._activeProjection.surface.boundsQuad(vertexData, vertexData);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (!texture.transform) {\r\n\t\t\t\ttexture.transform = new PIXI.TextureMatrix(texture);\r\n\t\t\t}\r\n\t\t\ttexture.transform.update();\r\n\r\n\t\t\tconst aTrans = this.aTrans;\r\n\t\t\taTrans.set(orig.width, 0, 0, orig.height, w1, h1);\r\n\t\t\tif (this.proj._surface === null) {\r\n\t\t\t\taTrans.prepend(this.transform.worldTransform);\r\n\t\t\t}\r\n\t\t\taTrans.invert();\r\n\t\t\taTrans.prepend(texture.transform.mapCoord);\r\n\t\t}\r\n\r\n\t\tcalculateTrimmedVertices() {\r\n\t\t\tconst wid = (this.transform as any)._worldID;\r\n\t\t\tconst tuid = (this._texture as any)._updateID;\r\n\t\t\tif (!this.vertexTrimmedData) {\r\n\t\t\t\tthis.vertexTrimmedData = new Float32Array(8);\r\n\t\t\t}\r\n\t\t\telse if (this._transformTrimmedID === wid && this._textureTrimmedID === tuid) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tthis._transformTrimmedID = wid;\r\n\t\t\tthis._textureTrimmedID = tuid;\r\n\r\n\t\t\t// lets do some special trim code!\r\n\t\t\tconst texture = this._texture;\r\n\t\t\tconst vertexData = this.vertexTrimmedData;\r\n\t\t\tconst orig = texture.orig;\r\n\t\t\tconst anchor = this._anchor;\r\n\r\n\t\t\t// lets calculate the new untrimmed bounds..\r\n\r\n\t\t\tconst w1 = -anchor._x * orig.width;\r\n\t\t\tconst w0 = w1 + orig.width;\r\n\r\n\t\t\tconst h1 = -anchor._y * orig.height;\r\n\t\t\tconst h0 = h1 + orig.height;\r\n\r\n\t\t\t//TODO: take rotations into account! form temporary bounds\r\n\r\n\t\t\tif (this.proj._surface) {\r\n\t\t\t\tvertexData[0] = w1;\r\n\t\t\t\tvertexData[1] = h1;\r\n\t\t\t\tvertexData[2] = w0;\r\n\t\t\t\tvertexData[3] = h1;\r\n\t\t\t\tvertexData[4] = w0;\r\n\t\t\t\tvertexData[5] = h0;\r\n\t\t\t\tvertexData[6] = w1;\r\n\t\t\t\tvertexData[7] = h0;\r\n\t\t\t\tthis.proj._surface.boundsQuad(vertexData, vertexData, this.transform.worldTransform);\r\n\t\t\t} else {\r\n\t\t\t\tlet wt = this.transform.worldTransform;\r\n\t\t\t\tlet a = wt.a;\r\n\t\t\t\tlet b = wt.b;\r\n\t\t\t\tlet c = wt.c;\r\n\t\t\t\tlet d = wt.d;\r\n\t\t\t\tlet tx = wt.tx;\r\n\t\t\t\tlet ty = wt.ty;\r\n\t\t\t\tvertexData[0] = (a * w1) + (c * h1) + tx;\r\n\t\t\t\tvertexData[1] = (d * h1) + (b * w1) + ty;\r\n\t\t\t\tvertexData[2] = (a * w0) + (c * h1) + tx;\r\n\t\t\t\tvertexData[3] = (d * h1) + (b * w0) + ty;\r\n\t\t\t\tvertexData[4] = (a * w0) + (c * h0) + tx;\r\n\t\t\t\tvertexData[5] = (d * h0) + (b * w0) + ty;\r\n\t\t\t\tvertexData[6] = (a * w1) + (c * h0) + tx;\r\n\t\t\t\tvertexData[7] = (d * h0) + (b * w1) + ty;\r\n\t\t\t\tif (this.proj._activeProjection) {\r\n\t\t\t\t\tthis.proj._activeProjection.surface.boundsQuad(vertexData, vertexData,\r\n\t\t\t\t\t\tthis.proj._activeProjection.legacy.worldTransform);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tget worldTransform() {\r\n\t\t\treturn this.proj as any;\r\n\t\t}\r\n\t}\r\n}\r\n","namespace pixi_projection {\r\n\texport class Text2s extends PIXI.Text {\r\n\t\tconstructor(text?: string, style?: PIXI.TextStyle, canvas?: HTMLCanvasElement) {\r\n\t\t\tsuper(text, style, canvas);\r\n\t\t\tthis.proj = new ProjectionSurface(this.transform);\r\n\t\t\tthis.pluginName = 'sprite_bilinear';\r\n\t\t}\r\n\r\n\t\tproj: ProjectionSurface;\r\n\r\n\t\taTrans = new PIXI.Matrix();\r\n\r\n\t\tget worldTransform() {\r\n\t\t\treturn this.proj as any;\r\n\t\t}\r\n\t}\r\n\r\n\t(Text2s.prototype as any).calculateVertices = Sprite2s.prototype.calculateVertices;\r\n\t(Text2s.prototype as any).calculateTrimmedVertices = Sprite2s.prototype.calculateTrimmedVertices;\r\n\t(Text2s.prototype as any)._calculateBounds = Sprite2s.prototype._calculateBounds;\r\n}\r\n","declare module PIXI {\r\n\tinterface Sprite {\r\n\t\tconvertTo2s(): void;\r\n\t}\r\n\r\n\tinterface Container {\r\n\t\tconvertTo2s(): void;\r\n\r\n\t\tconvertSubtreeTo2s(): void;\r\n\t}\r\n}\r\n\r\nnamespace pixi_projection {\r\n\t(PIXI as any).Sprite.prototype.convertTo2s = function () {\r\n\t\tif (this.proj) return;\r\n\t\t//cointainer\r\n\t\tthis.pluginName = 'sprite_bilinear';\r\n\t\tthis.aTrans = new PIXI.Matrix();\r\n\t\tthis.calculateVertices = Sprite2s.prototype.calculateVertices;\r\n\t\tthis.calculateTrimmedVertices = Sprite2s.prototype.calculateTrimmedVertices;\r\n\t\tthis._calculateBounds = Sprite2s.prototype._calculateBounds;\r\n\t\tPIXI.Container.prototype.convertTo2s.call(this);\r\n\t};\r\n\r\n\t(PIXI as any).Container.prototype.convertTo2s = function () {\r\n\t\tif (this.proj) return;\r\n\t\tthis.proj = new Projection2d(this.transform);\r\n\t\tObject.defineProperty(this, \"worldTransform\", {\r\n\t\t\tget: function () {\r\n\t\t\t\treturn this.proj;\r\n\t\t\t},\r\n\t\t\tenumerable: true,\r\n\t\t\tconfigurable: true\r\n\t\t});\r\n\t};\r\n\r\n\t(PIXI as any).Container.prototype.convertSubtreeTo2s = function () {\r\n\t\tthis.convertTo2s();\r\n\t\tfor (let i = 0; i < this.children.length; i++) {\r\n\t\t\tthis.children[i].convertSubtreeTo2s();\r\n\t\t}\r\n\t};\r\n}\r\n","namespace pixi_projection {\r\n\texport function container2dWorldTransform() {\r\n\t\treturn this.proj.affine ? this.transform.worldTransform : this.proj.world as any;\r\n\t}\r\n\r\n\texport class Container2d extends PIXI.Container {\r\n\t\tconstructor() {\r\n\t\t\tsuper();\r\n\t\t\tthis.proj = new Projection2d(this.transform);\r\n\t\t}\r\n\r\n\t\tproj: Projection2d;\r\n\r\n\t\ttoLocal<T extends PIXI.PointLike>(position: PIXI.PointLike, from?: PIXI.DisplayObject,\r\n\t\t point?: T, skipUpdate?: boolean,\r\n\t\t step = TRANSFORM_STEP.ALL): T {\r\n\r\n\t\t\tif (from)\r\n\t\t\t{\r\n\t\t\t\tposition = from.toGlobal(position, point, skipUpdate);\r\n\t\t\t}\r\n\r\n\t\t\tif (!skipUpdate)\r\n\t\t\t{\r\n\t\t\t\tthis._recursivePostUpdateTransform();\r\n\t\t\t}\r\n\r\n\t\t\tif (step >= TRANSFORM_STEP.PROJ) {\r\n\t\t\t\tif (!skipUpdate) {\r\n\t\t\t\t\tthis.displayObjectUpdateTransform();\r\n\t\t\t\t}\r\n\t\t\t\tif (this.proj.affine) {\r\n\t\t\t\t\treturn this.transform.worldTransform.applyInverse(point, point) as any;\r\n\t\t\t\t}\r\n\t\t\t\treturn this.proj.world.applyInverse(point, point) as any;\r\n\t\t\t}\r\n\r\n\t\t\tif (this.parent) {\r\n\t\t\t\tpoint = this.parent.worldTransform.applyInverse(position, point) as any;\r\n\t\t\t} else {\r\n\t\t\t\tpoint.copy(position);\r\n\t\t\t}\r\n\t\t\tif (step === TRANSFORM_STEP.NONE) {\r\n\t\t\t\treturn point;\r\n\t\t\t}\r\n\r\n\t\t\treturn this.transform.localTransform.applyInverse(point, point) as any;\r\n\t\t}\r\n\r\n\t\tget worldTransform() {\r\n\t\t\treturn this.proj.affine ? this.transform.worldTransform : this.proj.world as any;\r\n\t\t}\r\n\t}\r\n\r\n\texport let container2dToLocal = Container2d.prototype.toLocal;\r\n}\r\n","// according to https://jsperf.com/obj-vs-array-view-access/1 , Float64Array is the best here\r\n\r\nnamespace pixi_projection {\r\n\timport Point = PIXI.Point;\r\n\timport IPoint = PIXI.PointLike;\r\n\r\n\tconst mat3id = [1, 0, 0, 0, 1, 0, 0, 0, 1];\r\n\r\n\texport enum AFFINE {\r\n\t\tNONE = 0,\r\n\t\tFREE = 1,\r\n\t\tAXIS_X = 2,\r\n\t\tAXIS_Y = 3,\r\n\t\tPOINT = 4\r\n\t}\r\n\r\n\texport class Matrix2d {\r\n\t\t/**\r\n\t\t * A default (identity) matrix\r\n\t\t *\r\n\t\t * @static\r\n\t\t * @const\r\n\t\t */\r\n\t\tstatic readonly IDENTITY = new Matrix2d();\r\n\r\n\t\t/**\r\n\t\t * A temp matrix\r\n\t\t *\r\n\t\t * @static\r\n\t\t * @const\r\n\t\t */\r\n\t\tstatic readonly TEMP_MATRIX = new Matrix2d();\r\n\r\n\t\t/**\r\n\t\t * mat3 implementation through array of 9 elements\r\n\t\t */\r\n\t\tmat3: Float64Array;\r\n\r\n\t\tfloatArray: Float32Array = null;\r\n\r\n\t\tconstructor(backingArray?: ArrayLike<number>) {\r\n\t\t\tthis.mat3 = new Float64Array(backingArray || mat3id);\r\n\t\t}\r\n\r\n\t\tget a() {\r\n\t\t\treturn this.mat3[0] / this.mat3[8];\r\n\t\t}\r\n\r\n\t\tget b() {\r\n\t\t\treturn this.mat3[1] / this.mat3[8];\r\n\t\t}\r\n\r\n\t\tget c() {\r\n\t\t\treturn this.mat3[3] / this.mat3[8];\r\n\t\t}\r\n\r\n\t\tget d() {\r\n\t\t\treturn this.mat3[4] / this.mat3[8];\r\n\t\t}\r\n\r\n\t\tget tx() {\r\n\t\t\treturn this.mat3[6] / this.mat3[8];\r\n\t\t}\r\n\r\n\t\tget ty() {\r\n\t\t\treturn this.mat3[7] / this.mat3[8];\r\n\t\t}\r\n\r\n\t\tset a(value: number) {\r\n\t\t\tthis.mat3[0] = value * this.mat3[8];\r\n\t\t}\r\n\r\n\t\tset b(value: number) {\r\n\t\t\tthis.mat3[1] = value * this.mat3[8];\r\n\t\t}\r\n\r\n\t\tset c(value: number) {\r\n\t\t\tthis.mat3[3] = value * this.mat3[8];\r\n\t\t}\r\n\r\n\t\tset d(value: number) {\r\n\t\t\tthis.mat3[4] = value * this.mat3[8];\r\n\t\t}\r\n\r\n\t\tset tx(value: number) {\r\n\t\t\tthis.mat3[6] = value * this.mat3[8];\r\n\t\t}\r\n\r\n\t\tset ty(value: number) {\r\n\t\t\tthis.mat3[7] = value * this.mat3[8];\r\n\t\t}\r\n\r\n\t\tset(a: number, b: number, c: number, d: number, tx: number, ty: number) {\r\n\t\t\tlet mat3 = this.mat3;\r\n\t\t\tmat3[0] = a;\r\n\t\t\tmat3[1] = b;\r\n\t\t\tmat3[2] = 0;\r\n\t\t\tmat3[3] = c;\r\n\t\t\tmat3[4] = d;\r\n\t\t\tmat3[5] = 0;\r\n\t\t\tmat3[6] = tx;\r\n\t\t\tmat3[7] = ty;\r\n\t\t\tmat3[8] = 1;\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\ttoArray(transpose?: boolean, out?: Float32Array): Float32Array {\r\n\t\t\tif (!this.floatArray) {\r\n\t\t\t\tthis.floatArray = new Float32Array(9);\r\n\t\t\t}\r\n\r\n\t\t\tconst array = out || this.floatArray;\r\n\t\t\tconst mat3 = this.mat3;\r\n\r\n\t\t\tif (transpose) {\r\n\t\t\t\tarray[0] = mat3[0];\r\n\t\t\t\tarray[1] = mat3[1];\r\n\t\t\t\tarray[2] = mat3[2];\r\n\t\t\t\tarray[3] = mat3[3];\r\n\t\t\t\tarray[4] = mat3[4];\r\n\t\t\t\tarray[5] = mat3[5];\r\n\t\t\t\tarray[6] = mat3[6];\r\n\t\t\t\tarray[7] = mat3[7];\r\n\t\t\t\tarray[8] = mat3[8];\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t//this branch is NEVER USED in pixi\r\n\t\t\t\tarray[0] = mat3[0];\r\n\t\t\t\tarray[1] = mat3[3];\r\n\t\t\t\tarray[2] = mat3[6];\r\n\t\t\t\tarray[3] = mat3[1];\r\n\t\t\t\tarray[4] = mat3[4];\r\n\t\t\t\tarray[5] = mat3[7];\r\n\t\t\t\tarray[6] = mat3[2];\r\n\t\t\t\tarray[7] = mat3[5];\r\n\t\t\t\tarray[8] = mat3[8];\r\n\t\t\t}\r\n\r\n\t\t\treturn array;\r\n\t\t}\r\n\r\n\t\t//TODO: remove props\r\n\t\tapply(pos: IPoint, newPos: IPoint): IPoint {\r\n\t\t\tnewPos = newPos || new PIXI.Point();\r\n\r\n\t\t\tconst mat3 = this.mat3;\r\n\t\t\tconst x = pos.x;\r\n\t\t\tconst y = pos.y;\r\n\r\n\t\t\tlet z = 1.0 / (mat3[2] * x + mat3[5] * y + mat3[8]);\r\n\t\t\tnewPos.x = z * (mat3[0] * x + mat3[3] * y + mat3[6]);\r\n\t\t\tnewPos.y = z * (mat3[1] * x + mat3[4] * y + mat3[7]);\r\n\r\n\t\t\treturn newPos;\r\n\t\t}\r\n\r\n\t\ttranslate(tx: number, ty: number) {\r\n\t\t\tconst mat3 = this.mat3;\r\n\t\t\tmat3[0] += tx * mat3[2];\r\n\t\t\tmat3[1] += ty * mat3[2];\r\n\t\t\tmat3[3] += tx * mat3[5];\r\n\t\t\tmat3[4] += ty * mat3[5];\r\n\t\t\tmat3[6] += tx * mat3[8];\r\n\t\t\tmat3[7] += ty * mat3[8];\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tscale(x: number, y: number) {\r\n\t\t\tconst mat3 = this.mat3;\r\n\t\t\tmat3[0] *= x;\r\n\t\t\tmat3[1] *= y;\r\n\t\t\tmat3[3] *= x;\r\n\t\t\tmat3[4] *= y;\r\n\t\t\tmat3[6] *= x;\r\n\t\t\tmat3[7] *= y;\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tscaleAndTranslate(scaleX: number, scaleY: number, tx: number, ty: number) {\r\n\t\t\tconst mat3 = this.mat3;\r\n\t\t\tmat3[0] = scaleX * mat3[0] + tx * mat3[2];\r\n\t\t\tmat3[1] = scaleY * mat3[1] + ty * mat3[2];\r\n\t\t\tmat3[3] = scaleX * mat3[3] + tx * mat3[5];\r\n\t\t\tmat3[4] = scaleY * mat3[4] + ty * mat3[5];\r\n\t\t\tmat3[6] = scaleX * mat3[6] + tx * mat3[8];\r\n\t\t\tmat3[7] = scaleY * mat3[7] + ty * mat3[8];\r\n\t\t}\r\n\r\n\t\t//TODO: remove props\r\n\t\tapplyInverse(pos: IPoint, newPos: IPoint): IPoint {\r\n\t\t\tnewPos = newPos || new Point();\r\n\r\n\t\t\tconst a = this.mat3;\r\n\t\t\tconst x = pos.x;\r\n\t\t\tconst y = pos.y;\r\n\r\n\t\t\tconst a00 = a[0], a01 = a[3], a02 = a[6],\r\n\t\t\t\ta10 = a[1], a11 = a[4], a12 = a[7],\r\n\t\t\t\ta20 = a[2], a21 = a[5], a22 = a[8];\r\n\r\n\t\t\tlet newX = (a22 * a11 - a12 * a21) * x + (-a22 * a01 + a02 * a21) * y + (a12 * a01 - a02 * a11);\r\n\t\t\tlet newY = (-a22 * a10 + a12 * a20) * x + (a22 * a00 - a02 * a20) * y + (-a12 * a00 + a02 * a10);\r\n\t\t\tlet newZ = (a21 * a10 - a11 * a20) * x + (-a21 * a00 + a01 * a20) * y + (a11 * a00 - a01 * a10);\r\n\r\n\t\t\tnewPos.x = newX / newZ;\r\n\t\t\tnewPos.y = newY / newZ;\r\n\r\n\t\t\treturn newPos;\r\n\t\t}\r\n\r\n\t\tinvert(): Matrix2d {\r\n\t\t\tconst a = this.mat3;\r\n\r\n\t\t\tconst a00 = a[0], a01 = a[1], a02 = a[2],\r\n\t\t\t\ta10 = a[3], a11 = a[4], a12 = a[5],\r\n\t\t\t\ta20 = a[6], a21 = a[7], a22 = a[8],\r\n\r\n\t\t\t\tb01 = a22 * a11 - a12 * a21,\r\n\t\t\t\tb11 = -a22 * a10 + a12 * a20,\r\n\t\t\t\tb21 = a21 * a10 - a11 * a20;\r\n\r\n\t\t\t// Calculate the determinant\r\n\t\t\tlet det = a00 * b01 + a01 * b11 + a02 * b21;\r\n\t\t\tif (!det) {\r\n\t\t\t\treturn this;\r\n\t\t\t}\r\n\t\t\tdet = 1.0 / det;\r\n\r\n\t\t\ta[0] = b01 * det;\r\n\t\t\ta[1] = (-a22 * a01 + a02 * a21) * det;\r\n\t\t\ta[2] = (a12 * a01 - a02 * a11) * det;\r\n\t\t\ta[3] = b11 * det;\r\n\t\t\ta[4] = (a22 * a00 - a02 * a20) * det;\r\n\t\t\ta[5] = (-a12 * a00 + a02 * a10) * det;\r\n\t\t\ta[6] = b21 * det;\r\n\t\t\ta[7] = (-a21 * a00 + a01 * a20) * det;\r\n\t\t\ta[8] = (a11 * a00 - a01 * a10) * det;\r\n\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tidentity(): Matrix2d {\r\n\t\t\tconst mat3 = this.mat3;\r\n\t\t\tmat3[0] = 1;\r\n\t\t\tmat3[1] = 0;\r\n\t\t\tmat3[2] = 0;\r\n\t\t\tmat3[3] = 0;\r\n\t\t\tmat3[4] = 1;\r\n\t\t\tmat3[5] = 0;\r\n\t\t\tmat3[6] = 0;\r\n\t\t\tmat3[7] = 0;\r\n\t\t\tmat3[8] = 1;\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tclone() {\r\n\t\t\treturn new Matrix2d(this.mat3);\r\n\t\t}\r\n\r\n\t\tcopyTo(matrix: Matrix2d) {\r\n\t\t\tconst mat3 = this.mat3;\r\n\t\t\tconst ar2 = matrix.mat3;\r\n\t\t\tar2[0] = mat3[0];\r\n\t\t\tar2[1] = mat3[1];\r\n\t\t\tar2[2] = mat3[2];\r\n\t\t\tar2[3] = mat3[3];\r\n\t\t\tar2[4] = mat3[4];\r\n\t\t\tar2[5] = mat3[5];\r\n\t\t\tar2[6] = mat3[6];\r\n\t\t\tar2[7] = mat3[7];\r\n\t\t\tar2[8] = mat3[8];\r\n\t\t\treturn matrix;\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t * legacy method, change the values of given pixi matrix\r\n\t\t * @param matrix\r\n\t\t * @return\r\n\t\t */\r\n\t\tcopy(matrix: PIXI.Matrix, affine?: AFFINE) {\r\n\t\t\tconst mat3 = this.mat3;\r\n\t\t\tconst d = 1.0 / mat3[8];\r\n\t\t\tconst tx = mat3[6] * d, ty = mat3[7] * d;\r\n\t\t\tmatrix.a = (mat3[0] - mat3[2] * tx) * d;\r\n\t\t\tmatrix.b = (mat3[1] - mat3[2] * ty) * d;\r\n\t\t\tmatrix.c = (mat3[3] - mat3[5] * tx) * d;\r\n\t\t\tmatrix.d = (mat3[4] - mat3[5] * ty) * d;\r\n\t\t\tmatrix.tx = tx;\r\n\t\t\tmatrix.ty = ty;\r\n\r\n\t\t\tif (affine >= 2) {\r\n\t\t\t\tif (affine === AFFINE.POINT) {\r\n\t\t\t\t\tmatrix.a = 1;\r\n\t\t\t\t\tmatrix.b = 0;\r\n\t\t\t\t\tmatrix.c = 0;\r\n\t\t\t\t\tmatrix.d = 1;\r\n\t\t\t\t} else if (affine === AFFINE.AXIS_X) {\r\n\t\t\t\t\tmatrix.c = -matrix.b;\r\n\t\t\t\t\tmatrix.d = matrix.a;\r\n\t\t\t\t} else if (affine === AFFINE.AXIS_Y) {\r\n\t\t\t\t\tmatrix.a = matrix.d;\r\n\t\t\t\t\tmatrix.c = -matrix.b;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t * legacy method, change the values of given pixi matrix\r\n\t\t * @param matrix\r\n\t\t * @return\r\n\t\t */\r\n\t\tcopyFrom(matrix: PIXI.Matrix) {\r\n\t\t\tconst mat3 = this.mat3;\r\n\t\t\tmat3[0] = matrix.a;\r\n\t\t\tmat3[1] = matrix.b;\r\n\t\t\tmat3[2] = 0;\r\n\t\t\tmat3[3] = matrix.c;\r\n\t\t\tmat3[4] = matrix.d;\r\n\t\t\tmat3[5] = 0;\r\n\t\t\tmat3[6] = matrix.tx;\r\n\t\t\tmat3[7] = matrix.ty;\r\n\t\t\tmat3[8] = 1.0;\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tsetToMultLegacy(pt: PIXI.Matrix, lt: Matrix2d) {\r\n\t\t\tconst out = this.mat3;\r\n\t\t\tconst b = lt.mat3;\r\n\r\n\t\t\tconst a00 = pt.a, a01 = pt.b,\r\n\t\t\t\ta10 = pt.c, a11 = pt.d,\r\n\t\t\t\ta20 = pt.tx, a21 = pt.ty,\r\n\r\n\t\t\t\tb00 = b[0], b01 = b[1], b02 = b[2],\r\n\t\t\t\tb10 = b[3], b11 = b[4], b12 = b[5],\r\n\t\t\t\tb20 = b[6], b21 = b[7], b22 = b[8];\r\n\r\n\r\n\t\t\tout[0] = b00 * a00 + b01 * a10 + b02 * a20;\r\n\t\t\tout[1] = b00 * a01 + b01 * a11 + b02 * a21;\r\n\t\t\tout[2] = b02;\r\n\r\n\t\t\tout[3] = b10 * a00 + b11 * a10 + b12 * a20;\r\n\t\t\tout[4] = b10 * a01 + b11 * a11 + b12 * a21;\r\n\t\t\tout[5] = b12;\r\n\r\n\t\t\tout[6] = b20 * a00 + b21 * a10 + b22 * a20;\r\n\t\t\tout[7] = b20 * a01 + b21 * a11 + b22 * a21;\r\n\t\t\tout[8] = b22;\r\n\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tsetToMultLegacy2(pt: Matrix2d, lt: PIXI.Matrix) {\r\n\t\t\tconst out = this.mat3;\r\n\t\t\tconst a = pt.mat3;\r\n\r\n\t\t\tconst a00 = a[0], a01 = a[1], a02 = a[2],\r\n\t\t\t\ta10 = a[3], a11 = a[4], a12 = a[5],\r\n\t\t\t\ta20 = a[6], a21 = a[7], a22 = a[8],\r\n\r\n\t\t\t\tb00 = lt.a, b01 = lt.b,\r\n\t\t\t\tb10 = lt.c, b11 = lt.d,\r\n\t\t\t\tb20 = lt.tx, b21 = lt.ty;\r\n\r\n\r\n\t\t\tout[0] = b00 * a00 + b01 * a10;\r\n\t\t\tout[1] = b00 * a01 + b01 * a11;\r\n\t\t\tout[2] = b00 * a02 + b01 * a12;\r\n\r\n\t\t\tout[3] = b10 * a00 + b11 * a10;\r\n\t\t\tout[4] = b10 * a01 + b11 * a11;\r\n\t\t\tout[5] = b10 * a02 + b11 * a12;\r\n\r\n\t\t\tout[6] = b20 * a00 + b21 * a10 + a20;\r\n\t\t\tout[7] = b20 * a01 + b21 * a11 + a21;\r\n\t\t\tout[8] = b20 * a02 + b21 * a12 + a22;\r\n\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\t// that's transform multiplication we use\r\n\t\tsetToMult(pt: Matrix2d, lt: Matrix2d) {\r\n\t\t\tconst out = this.mat3;\r\n\t\t\tconst a = pt.mat3, b = lt.mat3;\r\n\r\n\t\t\tconst a00 = a[0], a01 = a[1], a02 = a[2],\r\n\t\t\t\ta10 = a[3], a11 = a[4], a12 = a[5],\r\n\t\t\t\ta20 = a[6], a21 = a[7], a22 = a[8],\r\n\r\n\t\t\t\tb00 = b[0], b01 = b[1], b02 = b[2],\r\n\t\t\t\tb10 = b[3], b11 = b[4], b12 = b[5],\r\n\t\t\t\tb20 = b[6], b21 = b[7], b22 = b[8];\r\n\r\n\t\t\tout[0] = b00 * a00 + b01 * a10 + b02 * a20;\r\n\t\t\tout[1] = b00 * a01 + b01 * a11 + b02 * a21;\r\n\t\t\tout[2] = b00 * a02 + b01 * a12 + b02 * a22;\r\n\r\n\t\t\tout[3] = b10 * a00 + b11 * a10 + b12 * a20;\r\n\t\t\tout[4] = b10 * a01 + b11 * a11 + b12 * a21;\r\n\t\t\tout[5] = b10 * a02 + b11 * a12 + b12 * a22;\r\n\r\n\t\t\tout[6] = b20 * a00 + b21 * a10 + b22 * a20;\r\n\t\t\tout[7] = b20 * a01 + b21 * a11 + b22 * a21;\r\n\t\t\tout[8] = b20 * a02 + b21 * a12 + b22 * a22;\r\n\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tprepend(lt: any) {\r\n\t\t\tif (lt.mat3) {\r\n\t\t\t\tthis.setToMult(lt, this);\r\n\t\t\t} else\r\n\t\t\t{\r\n\t\t\t\tthis.setToMultLegacy(lt, this);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n","namespace pixi_projection {\r\n\timport PointLike = PIXI.PointLike;\r\n\r\n\tconst t0 = new PIXI.Point();\r\n\tconst tt = [new PIXI.Point(), new PIXI.Point(), new PIXI.Point(), new PIXI.Point()];\r\n\tconst tempRect = new PIXI.Rectangle();\r\n\tconst tempMat = new Matrix2d();\r\n\r\n\texport class Projection2d extends LinearProjection<Matrix2d> {\r\n\r\n\t\tconstructor(legacy: PIXI.TransformBase, enable?: boolean) {\r\n\t\t\tsuper(legacy, enable);\r\n\t\t\tthis.local = new Matrix2d();\r\n\t\t\tthis.world = new Matrix2d();\r\n\t\t}\r\n\r\n\t\tmatrix = new Matrix2d();\r\n\t\tpivot = new PIXI.ObservablePoint(this.onChange, this, 0, 0);\r\n\r\n\t\treverseLocalOrder = false;\r\n\r\n\t\tonChange() {\r\n\t\t\tconst pivot = this.pivot;\r\n\t\t\tconst mat3 = this.matrix.mat3;\r\n\r\n\t\t\tmat3[6] = -(pivot._x * mat3[0] + pivot._y * mat3[3]);\r\n\t\t\tmat3[7] = -(pivot._x * mat3[1] + pivot._y * mat3[4]);\r\n\r\n\t\t\tthis._projID++;\r\n\t\t}\r\n\r\n\t\tsetAxisX(p: PointLike, factor: number = 1): void {\r\n\t\t\tconst x = p.x, y = p.y;\r\n\t\t\tconst d = Math.sqrt(x * x + y * y);\r\n\t\t\tconst mat3 = this.matrix.mat3;\r\n\t\t\tmat3[0] = x / d;\r\n\t\t\tmat3[1] = y / d;\r\n\t\t\tmat3[2] = factor / d;\r\n\r\n\t\t\tthis.onChange();\r\n\t\t}\r\n\r\n\t\tsetAxisY(p: PointLike, factor: number = 1) {\r\n\t\t\tconst x = p.x, y = p.y;\r\n\t\t\tconst d = Math.sqrt(x * x + y * y);\r\n\t\t\tconst mat3 = this.matrix.mat3;\r\n\t\t\tmat3[3] = x / d;\r\n\t\t\tmat3[4] = y / d;\r\n\t\t\tmat3[5] = factor / d;\r\n\t\t\tthis.onChange();\r\n\t\t}\r\n\r\n\t\tmapSprite(sprite: PIXI.Sprite, quad: Array<PointLike>) {\r\n\t\t\tconst tex = sprite.texture;\r\n\r\n\t\t\ttempRect.x = -sprite.anchor.x * tex.orig.width;\r\n\t\t\ttempRect.y = -sprite.anchor.y * tex.orig.height;\r\n\t\t\ttempRect.width = tex.orig.width;\r\n\t\t\ttempRect.height = tex.orig.height;\r\n\r\n\t\t\treturn this.mapQuad(tempRect, quad);\r\n\t\t}\r\n\r\n\t\tmapQuad(rect: PIXI.Rectangle, p: Array<PointLike>) {\r\n\t\t\t// utils.getPositionFromQuad(p, anchor, t0);\r\n\t\t\ttt[0].set(rect.x, rect.y);\r\n\t\t\ttt[1].set(rect.x + rect.width, rect.y);\r\n\t\t\ttt[2].set(rect.x + rect.width, rect.y + rect.height);\r\n\t\t\ttt[3].set(rect.x, rect.y + rect.height);\r\n\r\n\t\t\tlet k1 = 1, k2 = 2, k3 = 3;\r\n\t\t\tlet f = utils.getIntersectionFactor(p[0], p[2], p[1], p[3], t0);\r\n\t\t\tif (f !== 0) {\r\n\t\t\t\tk1 = 1;\r\n\t\t\t\tk2 = 3;\r\n\t\t\t\tk3 = 2;\r\n\t\t\t} else {\r\n\t\t\t\treturn;\r\n\t\t\t\t/*f = utils.getIntersectionFactor(p[0], p[1], p[2], p[3], t0);\r\n\t\t\t\tif (f > 0) {\r\n\t\t\t\t\tk1 = 2;\r\n\t\t\t\t\tk2 = 3;\r\n\t\t\t\t\tk3 = 1;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tf = utils.getIntersectionFactor(p[0], p[3], p[1], p[2], t0);\r\n\t\t\t\t\tif (f > 0) {\r\n\t\t\t\t\t\t// cant find it :(\r\n\t\t\t\t\t\tk1 = 1;\r\n\t\t\t\t\t\tk2 = 2;\r\n\t\t\t\t\t\tk3 = 3;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t}*/\r\n\t\t\t}\r\n\t\t\tlet d0 = Math.sqrt((p[0].x - t0.x) * (p[0].x - t0.x) + (p[0].y - t0.y) * (p[0].y - t0.y));\r\n\t\t\tlet d1 = Math.sqrt((p[k1].x - t0.x) * (p[k1].x - t0.x) + (p[k1].y - t0.y) * (p[k1].y - t0.y));\r\n\t\t\tlet d2 = Math.sqrt((p[k2].x - t0.x) * (p[k2].x - t0.x) + (p[k2].y - t0.y) * (p[k2].y - t0.y));\r\n\t\t\tlet d3 = Math.sqrt((p[k3].x - t0.x) * (p[k3].x - t0.x) + (p[k3].y - t0.y) * (p[k3].y - t0.y));\r\n\r\n\t\t\tlet q0 = (d0 + d3) / d3;\r\n\t\t\tlet q1 = (d1 + d2) / d2;\r\n\t\t\tlet q2 = (d1 + d2) / d1;\r\n\r\n\t\t\tlet mat3 = this.matrix.mat3;\r\n\t\t\tmat3[0] = tt[0].x * q0;\r\n\t\t\tmat3[1] = tt[0].y * q0;\r\n\t\t\tmat3[2] = q0;\r\n\t\t\tmat3[3] = tt[k1].x * q1;\r\n\t\t\tmat3[4] = tt[k1].y * q1;\r\n\t\t\tmat3[5] = q1;\r\n\t\t\tmat3[6] = tt[k2].x * q2;\r\n\t\t\tmat3[7] = tt[k2].y * q2;\r\n\t\t\tmat3[8] = q2;\r\n\t\t\tthis.matrix.invert();\r\n\r\n\t\t\tmat3 = tempMat.mat3;\r\n\t\t\tmat3[0] = p[0].x;\r\n\t\t\tmat3[1] = p[0].y;\r\n\t\t\tmat3[2] = 1;\r\n\t\t\tmat3[3] = p[k1].x;\r\n\t\t\tmat3[4] = p[k1].y;\r\n\t\t\tmat3[5] = 1;\r\n\t\t\tmat3[6] = p[k2].x;\r\n\t\t\tmat3[7] = p[k2].y;\r\n\t\t\tmat3[8] = 1;\r\n\r\n\t\t\tthis.matrix.setToMult(tempMat, this.matrix);\r\n\t\t\tthis._projID++;\r\n\t\t}\r\n\r\n\t\tupdateLocalTransform(lt: PIXI.Matrix) {\r\n\t\t\tif (this._projID !== 0) {\r\n\t\t\t\tif (this.reverseLocalOrder) {\r\n\t\t\t\t\t// tilingSprite inside order\r\n\t\t\t\t\tthis.local.setToMultLegacy2(this.matrix, lt);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t// good order\r\n\t\t\t\t\tthis.local.setToMultLegacy(lt, this.matrix);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tthis.local.copyFrom(lt);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tclear() {\r\n\t\t\tsuper.clear();\r\n\t\t\tthis.matrix.identity();\r\n\t\t\tthis.pivot.set(0, 0);\r\n\t\t}\r\n\t}\r\n}\r\n","namespace pixi_projection {\r\n\texport class Mesh2d extends PIXI.mesh.Mesh {\r\n\t\tconstructor(texture: PIXI.Texture, vertices?: Float32Array, uvs?: Float32Array,\r\n\t\t indices?: Uint16Array, drawMode?: number) {\r\n\t\t\tsuper(texture, vertices, uvs, indices, drawMode);\r\n\t\t\tthis.proj = new Projection2d(this.transform);\r\n\t\t\tthis.pluginName = 'mesh2d';\r\n\t\t}\r\n\r\n\t\tproj: Projection2d;\r\n\r\n\t\ttoLocal<T extends PIXI.PointLike>(position: PIXI.PointLike, from?: PIXI.DisplayObject,\r\n\t\t point?: T, skipUpdate?: boolean,\r\n\t\t step = TRANSFORM_STEP.ALL): T {\r\n\t\t\treturn container2dToLocal.call(this, position, from, point, skipUpdate, step);\r\n\t\t}\r\n\r\n\t\tget worldTransform() {\r\n\t\t\treturn this.proj.affine ? this.transform.worldTransform : this.proj.world as any;\r\n\t\t}\r\n\t}\r\n}\r\n","namespace pixi_projection {\r\n\tlet shaderVert =\r\n\t\t`precision highp float;\r\nattribute vec2 aVertexPosition;\r\nattribute vec2 aTextureCoord;\r\n\r\nuniform mat3 projectionMatrix;\r\nuniform mat3 translationMatrix;\r\nuniform mat3 uTransform;\r\n\r\nvarying vec2 vTextureCoord;\r\n\r\nvoid main(void)\r\n{\r\n gl_Position.xyw = projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0);\r\n gl_Position.z = 0.0;\r\n\r\n vTextureCoord = (uTransform * vec3(aTextureCoord, 1.0)).xy;\r\n}\r\n`;\r\n\tlet shaderFrag = `\r\nvarying vec2 vTextureCoord;\r\nuniform vec4 uColor;\r\n\r\nuniform sampler2D uSampler;\r\n\r\nvoid main(void)\r\n{\r\n gl_FragColor = texture2D(uSampler, vTextureCoord) * uColor;\r\n}`;\r\n\r\n\texport class Mesh2dRenderer extends PIXI.mesh.MeshRenderer {\r\n\t\tonContextChange()\r\n\t\t{\r\n\t\t\tconst gl = this.renderer.gl;\r\n\r\n\t\t\tthis.shader = new PIXI.Shader(gl, shaderVert, shaderFrag);\r\n\t\t}\r\n\t}\r\n\r\n\tPIXI.WebGLRenderer.registerPlugin('mesh2d', Mesh2dRenderer);\r\n}\r\n","namespace pixi_projection {\r\n\texport class Sprite2d extends PIXI.Sprite {\r\n\t\tconstructor(texture: PIXI.Texture) {\r\n\t\t\tsuper(texture);\r\n\t\t\tthis.proj = new Projection2d(this.transform);\r\n\t\t\tthis.pluginName = 'sprite2d';\r\n\t\t\tthis.vertexData = new Float32Array(12);\r\n\t\t}\r\n\r\n\t\tproj: Projection2d;\r\n\r\n\t\t_calculateBounds() {\r\n\t\t\tthis.calculateTrimmedVertices();\r\n\t\t\tthis._bounds.addQuad(this.vertexTrimmedData as any);\r\n\t\t}\r\n\r\n\t\tcalculateVertices() {\r\n\t\t\tif (this.proj._affine) {\r\n\t\t\t\tif (this.vertexData.length != 8) {\r\n\t\t\t\t\tthis.vertexData = new Float32Array(8);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tsuper.calculateVertices();\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif (this.vertexData.length != 12) {\r\n\t\t\t\tthis.vertexData = new Float32Array(12);\r\n\t\t\t}\r\n\r\n\t\t\tconst wid = (this.transform as any)._worldID;\r\n\t\t\tconst tuid = (this._texture as any)._updateID;\r\n\t\t\tif (this._transformID === wid && this._textureID === tuid) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tthis._transformID = wid;\r\n\t\t\tthis._textureID = tuid;\r\n\r\n\t\t\tconst texture = this._texture;\r\n\t\t\tconst wt = this.proj.world.mat3;\r\n\t\t\tconst vertexData = this.vertexData;\r\n\t\t\tconst trim = texture.trim;\r\n\t\t\tconst orig = texture.orig;\r\n\t\t\tconst anchor = this._anchor;\r\n\r\n\t\t\tlet w0 = 0;\r\n\t\t\tlet w1 = 0;\r\n\t\t\tlet h0 = 0;\r\n\t\t\tlet h1 = 0;\r\n\r\n\t\t\tif (trim) {\r\n\t\t\t\tw1 = trim.x - (anchor._x * orig.width);\r\n\t\t\t\tw0 = w1 + trim.width;\r\n\r\n\t\t\t\th1 = trim.y - (anchor._y * orig.height);\r\n\t\t\t\th0 = h1 + trim.height;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tw1 = -anchor._x * orig.width;\r\n\t\t\t\tw0 = w1 + orig.width;\r\n\r\n\t\t\t\th1 = -anchor._y * orig.height;\r\n\t\t\t\th0 = h1 + orig.height;\r\n\t\t\t}\r\n\r\n\t\t\tvertexData[0] = (wt[0] * w1) + (wt[3] * h1) + wt[6];\r\n\t\t\tvertexData[1] = (wt[1] * w1) + (wt[4] * h1) + wt[7];\r\n\t\t\tvertexData[2] = (wt[2] * w1) + (wt[5] * h1) + wt[8];\r\n\r\n\t\t\tvertexData[3] = (wt[0] * w0) + (wt[3] * h1) + wt[6];\r\n\t\t\tvertexData[4] = (wt[1] * w0) + (wt[4] * h1) + wt[7];\r\n\t\t\tvertexData[5] = (wt[2] * w0) + (wt[5] * h1) + wt[8];\r\n\r\n\t\t\tvertexData[6] = (wt[0] * w0) + (wt[3] * h0) + wt[6];\r\n\t\t\tvertexData[7] = (wt[1] * w0) + (wt[4] * h0) + wt[7];\r\n\t\t\tvertexData[8] = (wt[2] * w0) + (wt[5] * h0) + wt[8];\r\n\r\n\t\t\tvertexData[9] = (wt[0] * w1) + (wt[3] * h0) + wt[6];\r\n\t\t\tvertexData[10] = (wt[1] * w1) + (wt[4] * h0) + wt[7];\r\n\t\t\tvertexData[11] = (wt[2] * w1) + (wt[5] * h0) + wt[8];\r\n\t\t}\r\n\r\n\t\tcalculateTrimmedVertices() {\r\n\t\t\tif (this.proj._affine) {\r\n\t\t\t\tsuper.calculateTrimmedVertices();\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tconst wid = (this.transform as any)._worldID;\r\n\t\t\tconst tuid = (this._texture as any)._updateID;\r\n\t\t\tif (!this.vertexTrimmedData) {\r\n\t\t\t\tthis.vertexTrimmedData = new Float32Array(8);\r\n\t\t\t}\r\n\t\t\telse if (this._transformTrimmedID === wid && this._textureTrimmedID === tuid) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tthis._transformTrimmedID = wid;\r\n\t\t\tthis._textureTrimmedID = tuid;\r\n\r\n\t\t\t// lets do some special trim code!\r\n\t\t\tconst texture = this._texture;\r\n\t\t\tconst vertexData = this.vertexTrimmedData;\r\n\t\t\tconst orig = texture.orig;\r\n\t\t\tconst anchor = this._anchor;\r\n\r\n\t\t\t// lets calculate the new untrimmed bounds..\r\n\t\t\tconst wt = this.proj.world.mat3;\r\n\r\n\t\t\tconst w1 = -anchor._x * orig.width;\r\n\t\t\tconst w0 = w1 + orig.width;\r\n\r\n\t\t\tconst h1 = -anchor._y * orig.height;\r\n\t\t\tconst h0 = h1 + orig.height;\r\n\r\n\t\t\tlet z = 1.0 / (wt[2] * w1 + wt[5] * h1 + wt[8]);\r\n\t\t\tvertexData[0] = z * ((wt[0] * w1) + (wt[3] * h1) + wt[6]);\r\n\t\t\tvertexData[1] = z * ((wt[1] * w1) + (wt[4] * h1) + wt[7]);\r\n\r\n\t\t\tz = 1.0 / (wt[2] * w0 + wt[5] * h1 + wt[8]);\r\n\t\t\tvertexData[2] = z * ((wt[0] * w0) + (wt[3] * h1) + wt[6]);\r\n\t\t\tvertexData[3] = z * ((wt[1] * w0) + (wt[4] * h1) + wt[7]);\r\n\r\n\t\t\tz = 1.0 / (wt[2] * w0 + wt[5] * h0 + wt[8]);\r\n\t\t\tvertexData[4] = z * ((wt[0] * w0) + (wt[3] * h0) + wt[6]);\r\n\t\t\tvertexData[5] = z * ((wt[1] * w0) + (wt[4] * h0) + wt[7]);\r\n\r\n\t\t\tz = 1.0 / (wt[2] * w1 + wt[5] * h0 + wt[8]);\r\n\t\t\tvertexData[6] = z * ((wt[0] * w1) + (wt[3] * h0) + wt[6]);\r\n\t\t\tvertexData[7] = z * ((wt[1] * w1) + (wt[4] * h0) + wt[7]);\r\n\t\t}\r\n\r\n\t\ttoLocal<T extends PIXI.PointLike>(position: PIXI.PointLike, from?: PIXI.DisplayObject,\r\n\t\t point?: T, skipUpdate?: boolean,\r\n\t\t step = TRANSFORM_STEP.ALL): T {\r\n\t\t\treturn container2dToLocal.call(this, position, from, point, skipUpdate, step);\r\n\t\t}\r\n\r\n\t\tget worldTransform() {\r\n\t\t\treturn this.proj.affine ? this.transform.worldTransform : this.proj.world as any;\r\n\t\t}\r\n\t}\r\n}\r\n","namespace pixi_projection {\r\n\timport MultiTextureSpriteRenderer = pixi_projection.webgl.MultiTextureSpriteRenderer;\r\n\r\n\tclass Sprite2dRenderer extends MultiTextureSpriteRenderer {\r\n\t\tshaderVert =\r\n`precision highp float;\r\nattribute vec3 aVertexPosition;\r\nattribute vec2 aTextureCoord;\r\nattribute vec4 aColor;\r\nattribute float aTextureId;\r\n\r\nuniform mat3 projectionMatrix;\r\n\r\nvarying vec2 vTextureCoord;\r\nvarying vec4 vColor;\r\nvarying float vTextureId;\r\n\r\nvoid main(void){\r\n gl_Position.xyw = projectionMatrix * aVertexPosition;\r\n gl_Position.z = 0.0;\r\n \r\n vTextureCoord = aTextureCoord;\r\n vTextureId = aTextureId;\r\n vColor = aColor;\r\n}\r\n`;\r\n\t\tshaderFrag = `\r\nvarying vec2 vTextureCoord;\r\nvarying vec4 vColor;\r\nvarying float vTextureId;\r\nuniform sampler2D uSamplers[%count%];\r\n\r\nvoid main(void){\r\nvec4 color;\r\nvec2 textureCoord = vTextureCoord;\r\nfloat textureId = floor(vTextureId+0.5);\r\n%forloop%\r\ngl_FragColor = color * vColor;\r\n}`;\r\n\r\n\t\tcreateVao(vertexBuffer: PIXI.glCore.GLBuffer) {\r\n\t\t\tconst attrs = this.shader.attributes;\r\n\t\t\tthis.vertSize = 6;\r\n\t\t\tthis.vertByteSize = this.vertSize * 4;\r\n\r\n\t\t\tconst gl = this.renderer.gl;\r\n\t\t\tconst vao = this.renderer.createVao()\r\n\t\t\t\t.addIndex(this.indexBuffer)\r\n\t\t\t\t.addAttribute(vertexBuffer, attrs.aVertexPosition, gl.FLOAT, false, this.vertByteSize, 0)\r\n\t\t\t\t.addAttribute(vertexBuffer, attrs.aTextureCoord, gl.UNSIGNED_SHORT, true, this.vertByteSize, 3 * 4)\r\n\t\t\t\t.addAttribute(vertexBuffer, attrs.aColor, gl.UNSIGNED_BYTE, true, this.vertByteSize, 4 * 4);\r\n\r\n\t\t\tif (attrs.aTextureId) {\r\n\t\t\t\tvao.addAttribute(vertexBuffer, attrs.aTextureId, gl.FLOAT, false, this.vertByteSize, 5 * 4);\r\n\t\t\t}\r\n\r\n\t\t\treturn vao;\r\n\r\n\t\t}\r\n\r\n\t\tfillVertices(float32View: Float32Array, uint32View: Uint32Array, index: number, sprite: any, argb: number, textureId: number) {\r\n\t\t\tconst vertexData = sprite.vertexData;\r\n\t\t\tconst uvs = sprite._texture._uvs.uvsUint32;\r\n\t\t\tif (vertexData.length === 8) {\r\n\t\t\t\t//PIXI standart sprite\r\n\t\t\t\tif (this.renderer.roundPixels) {\r\n\t\t\t\t\tconst resolution = this.renderer.resolution;\r\n\r\n\t\t\t\t\tfloat32View[index] = ((vertexData[0] * resolution) | 0) / resolution;\r\n\t\t\t\t\tfloat32View[index + 1] = ((vertexData[1] * resolution) | 0) / resolution;\r\n\t\t\t\t\tfloat32View[index + 2] = 1.0;\r\n\r\n\t\t\t\t\tfloat32View[index + 6] = ((vertexData[2] * resolution) | 0) / resolution;\r\n\t\t\t\t\tfloat32View[index + 7] = ((vertexData[3] * resolution) | 0) / resolution;\r\n\t\t\t\t\tfloat32View[index + 8] = 1.0;\r\n\r\n\t\t\t\t\tfloat32View[index + 12] = ((vertexData[4] * resolution) | 0) / resolution;\r\n\t\t\t\t\tfloat32View[index + 13] = ((vertexData[5] * resolution) | 0) / resolution;\r\n\t\t\t\t\tfloat32View[index + 14] = 1.0;\r\n\r\n\t\t\t\t\tfloat32View[index + 18] = ((vertexData[6] * resolution) | 0) / resolution;\r\n\t\t\t\t\tfloat32View[index + 19] = ((vertexData[7] * resolution) | 0) / resolution;\r\n\t\t\t\t\tfloat32View[index + 20] = 1.0;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tfloat32View[index] = vertexData[0];\r\n\t\t\t\t\tfloat32View[index + 1] = vertexData[1];\r\n\t\t\t\t\tfloat32View[index + 2] = 1.0;\r\n\r\n\t\t\t\t\tfloat32View[index + 6] = vertexData[2];\r\n\t\t\t\t\tfloat32View[index + 7] = vertexData[3];\r\n\t\t\t\t\tfloat32View[index + 8] = 1.0;\r\n\r\n\t\t\t\t\tfloat32View[index + 12] = vertexData[4];\r\n\t\t\t\t\tfloat32View[index + 13] = vertexData[5];\r\n\t\t\t\t\tfloat32View[index + 14] = 1.0;\r\n\r\n\t\t\t\t\tfloat32View[index + 18] = vertexData[6];\r\n\t\t\t\t\tfloat32View[index + 19] = vertexData[7];\r\n\t\t\t\t\tfloat32View[index + 20] = 1.0;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t// projective 2d/3d sprite\r\n\r\n\t\t\t\t// I removed roundPixels, dont need that for those kind of sprites\r\n\r\n\t\t\t\tfloat32View[index] = vertexData[0];\r\n\t\t\t\tfloat32View[index + 1] = vertexData[1];\r\n\t\t\t\tfloat32View[index + 2] = vertexData[2];\r\n\r\n\t\t\t\tfloat32View[index + 6] = vertexData[3];\r\n\t\t\t\tfloat32View[index + 7] = vertexData[4];\r\n\t\t\t\tfloat32View[index + 8] = vertexData[5];\r\n\r\n\t\t\t\tfloat32View[index + 12] = vertexData[6];\r\n\t\t\t\tfloat32View[index + 13] = vertexData[7];\r\n\t\t\t\tfloat32View[index + 14] = vertexData[8];\r\n\r\n\t\t\t\tfloat32View[index + 18] = vertexData[9];\r\n\t\t\t\tfloat32View[index + 19] = vertexData[10];\r\n\t\t\t\tfloat32View[index + 20] = vertexData[11];\r\n\t\t\t}\r\n\r\n\t\t\tuint32View[index + 3] = uvs[0];\r\n\t\t\tuint32View[index + 9] = uvs[1];\r\n\t\t\tuint32View[index + 15] = uvs[2];\r\n\t\t\tuint32View[index + 21] = uvs[3];\r\n\r\n\t\t\tuint32View[index + 4] = uint32View[index + 10] = uint32View[index + 16] = uint32View[index + 22] = argb;\r\n\t\t\tfloat32View[index + 5] = float32View[index + 11] = float32View[index + 17] = float32View[index + 23] = textureId;\r\n\t\t}\r\n\t}\r\n\r\n\tPIXI.WebGLRenderer.registerPlugin('sprite2d', Sprite2dRenderer);\r\n}","namespace pixi_projection {\r\n export class Text2d extends PIXI.Text {\r\n constructor(text?: string, style?: PIXI.TextStyle, canvas?: HTMLCanvasElement) {\r\n super(text, style, canvas);\r\n this.proj = new Projection2d(this.transform);\r\n this.pluginName = 'sprite2d';\r\n this.vertexData = new Float32Array(12);\r\n }\r\n\r\n proj: Projection2d;\r\n\r\n get worldTransform() {\r\n\t return this.proj.affine ? this.transform.worldTransform : this.proj.world as any;\r\n }\r\n }\r\n\r\n Text2d.prototype.calculateVertices = Sprite2d.prototype.calculateVertices;\r\n (Text2d.prototype as any).calculateTrimmedVertices = Sprite2d.prototype.calculateTrimmedVertices;\r\n\t(Text2d.prototype as any)._calculateBounds = Sprite2d.prototype._calculateBounds;\r\n}\r\n","declare module PIXI {\r\n interface Sprite {\r\n convertTo2d(): void;\r\n }\r\n\r\n interface Container {\r\n convertTo2d(): void;\r\n convertSubtreeTo2d(): void;\r\n }\r\n\r\n namespace mesh {\r\n\t interface Mesh {\r\n\t\t convertTo2d(): void;\r\n\t }\r\n }\r\n}\r\n\r\nnamespace pixi_projection {\r\n\r\n\tfunction convertTo2d() {\r\n\t\tif (this.proj) return;\r\n\t\tthis.proj = new Projection2d(this.transform);\r\n\t\tthis.toLocal = Container2d.prototype.toLocal;\r\n\t\tObject.defineProperty(this, \"worldTransform\", {\r\n\t\t\tget: container2dWorldTransform,\r\n\t\t\tenumerable: true,\r\n\t\t\tconfigurable: true\r\n\t\t});\r\n\t}\r\n\r\n\r\n\t(PIXI as any).Container.prototype.convertTo2d = convertTo2d;\r\n\r\n (PIXI as any).Sprite.prototype.convertTo2d = function () {\r\n if (this.proj) return;\r\n this.calculateVertices = Sprite2d.prototype.calculateVertices;\r\n this.calculateTrimmedVertices = Sprite2d.prototype.calculateTrimmedVertices;\r\n\t this._calculateBounds = Sprite2d.prototype._calculateBounds;\r\n this.pluginName = 'sprite2d';\r\n this.vertexData = new Float32Array(12);\r\n convertTo2d.call(this);\r\n };\r\n\r\n\t(PIXI as any).mesh.Mesh.prototype.convertTo2d = function () {\r\n\t\tif (this.proj) return;\r\n\t\tthis.pluginName = 'mesh2d';\r\n\t\tconvertTo2d.call(this);\r\n\t};\r\n\r\n (PIXI as any).Container.prototype.convertSubtreeTo2d = function () {\r\n this.convertTo2d();\r\n for (let i = 0; i < this.children.length; i++) {\r\n this.children[i].convertSubtreeTo2d();\r\n }\r\n };\r\n}\r\n","namespace pixi_projection {\r\n\tconst tempTransform = new PIXI.TransformStatic();\r\n\r\n\texport class TilingSprite2d extends PIXI.extras.TilingSprite {\r\n\t\tconstructor(texture: PIXI.Texture, width: number, height: number) {\r\n\t\t\tsuper(texture, width, height);\r\n\r\n\t\t\tthis.tileProj = new Projection2d(this.tileTransform);\r\n\t\t\tthis.tileProj.reverseLocalOrder = true;\r\n\t\t\tthis.proj = new Projection2d(this.transform);\r\n\r\n\t\t\tthis.pluginName = 'tilingSprite2d';\r\n\t\t\tthis.uvRespectAnchor = true;\r\n\t\t}\r\n\r\n\t\ttileProj: Projection2d;\r\n\t\tproj: Projection2d;\r\n\r\n\t\tget worldTransform() {\r\n\t\t\treturn this.proj.affine ? this.transform.worldTransform : this.proj.world as any;\r\n\t\t}\r\n\r\n\t\ttoLocal<T extends PIXI.PointLike>(position: PIXI.PointLike, from?: PIXI.DisplayObject,\r\n\t\t point?: T, skipUpdate?: boolean,\r\n\t\t step = TRANSFORM_STEP.ALL): T {\r\n\t\t\treturn container2dToLocal.call(this, position, from, point, skipUpdate, step);\r\n\t\t}\r\n\r\n\t\t_renderWebGL(renderer: PIXI.WebGLRenderer)\r\n\t\t{\r\n\t\t\t// tweak our texture temporarily..\r\n\t\t\tconst texture = this._texture;\r\n\r\n\t\t\tif (!texture || !texture.valid)\r\n\t\t\t{\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// changed\r\n\t\t\tthis.tileTransform.updateTransform(tempTransform);\r\n\t\t\tthis.uvTransform.update();\r\n\r\n\t\t\trenderer.setObjectRenderer(renderer.plugins[this.pluginName]);\r\n\t\t\trenderer.plugins[this.pluginName].render(this);\r\n\t\t}\r\n\t}\r\n}\r\n","namespace pixi_projection {\r\n\tlet shaderVert =\r\n\t\t`attribute vec2 aVertexPosition;\r\nattribute vec2 aTextureCoord;\r\n\r\nuniform mat3 projectionMatrix;\r\nuniform mat3 translationMatrix;\r\nuniform mat3 uTransform;\r\n\r\nvarying vec3 vTextureCoord;\r\n\r\nvoid main(void)\r\n{\r\n gl_Position.xyw = projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0);\r\n\r\n vTextureCoord = uTransform * vec3(aTextureCoord, 1.0);\r\n}\r\n`;\r\n\tlet shaderFrag = `\r\nvarying vec3 vTextureCoord;\r\n\r\nuniform sampler2D uSampler;\r\nuniform vec4 uColor;\r\nuniform mat3 uMapCoord;\r\nuniform vec4 uClampFrame;\r\nuniform vec2 uClampOffset;\r\n\r\nvoid main(void)\r\n{\r\n vec2 coord = mod(vTextureCoord.xy / vTextureCoord.z - uClampOffset, vec2(1.0, 1.0)) + uClampOffset;\r\n coord = (uMapCoord * vec3(coord, 1.0)).xy;\r\n coord = clamp(coord, uClampFrame.xy, uClampFrame.zw);\r\n\r\n vec4 sample = texture2D(uSampler, coord);\r\n gl_FragColor = sample * uColor;\r\n}\r\n`;\r\n\tlet shaderSimpleFrag = `\r\n\tvarying vec3 vTextureCoord;\r\n\r\nuniform sampler2D uSampler;\r\nuniform vec4 uColor;\r\n\r\nvoid main(void)\r\n{\r\n vec4 sample = texture2D(uSampler, vTextureCoord.xy / vTextureCoord.z);\r\n gl_FragColor = sample * uColor;\r\n}\r\n`;\r\n\r\n\t// changed\r\n\tconst tempMat = new Matrix2d();\r\n\r\n\timport WRAP_MODES = PIXI.WRAP_MODES;\r\n\timport utils = PIXI.utils;\r\n\r\n\texport class TilingSprite2dRenderer extends PIXI.extras.TilingSpriteRenderer {\r\n\r\n\t\tshader: PIXI.Shader;\r\n\t\tsimpleShader: PIXI.Shader;\r\n\t\tquad: PIXI.Quad;\r\n\r\n\t\tonContextChange()\r\n\t\t{\r\n\t\t\tconst gl = this.renderer.gl;\r\n\r\n\t\t\tthis.shader = new PIXI.Shader(gl, shaderVert, shaderFrag);\r\n\t\t\tthis.simpleShader = new PIXI.Shader(gl, shaderVert, shaderSimpleFrag);\r\n\r\n\t\t\tthis.renderer.bindVao(null);\r\n\t\t\tthis.quad = new (PIXI.Quad as any)(gl, this.renderer.state.attribState);\r\n\t\t\tthis.quad.initVao(this.shader);\r\n\t\t}\r\n\r\n\t\trender(ts: any)\r\n\t\t{\r\n\t\t\tconst renderer = this.renderer;\r\n\t\t\tconst quad = this.quad;\r\n\r\n\t\t\trenderer.bindVao(quad.vao);\r\n\r\n\t\t\tlet vertices = quad.vertices;\r\n\r\n\t\t\tvertices[0] = vertices[6] = (ts._width) * -ts.anchor.x;\r\n\t\t\tvertices[1] = vertices[3] = ts._height * -ts.anchor.y;\r\n\r\n\t\t\tvertices[2] = vertices[4] = (ts._width) * (1.0 - ts.anchor.x);\r\n\t\t\tvertices[5] = vertices[7] = ts._height * (1.0 - ts.anchor.y);\r\n\r\n\t\t\tif (ts.uvRespectAnchor)\r\n\t\t\t{\r\n\t\t\t\tvertices = quad.uvs;\r\n\r\n\t\t\t\tvertices[0] = vertices[6] = -ts.anchor.x;\r\n\t\t\t\tvertices[1] = vertices[3] = -ts.anchor.y;\r\n\r\n\t\t\t\tvertices[2] = vertices[4] = 1.0 - ts.anchor.x;\r\n\t\t\t\tvertices[5] = vertices[7] = 1.0 - ts.anchor.y;\r\n\t\t\t}\r\n\r\n\t\t\tquad.upload();\r\n\r\n\t\t\tconst tex = ts._texture;\r\n\t\t\tconst baseTex = tex.baseTexture;\r\n\t\t\tconst lt = ts.tileProj.world;\r\n\t\t\tconst uv = ts.uvTransform;\r\n\t\t\tlet isSimple = baseTex.isPowerOfTwo\r\n\t\t\t\t&& tex.frame.width === baseTex.width && tex.frame.height === baseTex.height;\r\n\r\n\t\t\t// auto, force repeat wrapMode for big tiling textures\r\n\t\t\tif (isSimple)\r\n\t\t\t{\r\n\t\t\t\tif (!baseTex._glTextures[renderer.CONTEXT_UID])\r\n\t\t\t\t{\r\n\t\t\t\t\tif (baseTex.wrapMode === WRAP_MODES.CLAMP)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tbaseTex.wrapMode = WRAP_MODES.REPEAT;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tisSimple = baseTex.wrapMode !== WRAP_MODES.CLAMP;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tconst shader = isSimple ? this.simpleShader : this.shader;\r\n\r\n\t\t\trenderer.bindShader(shader);\r\n\r\n\t\t\t// changed\r\n\t\t\ttempMat.identity();\r\n\t\t\ttempMat.scale(tex.width, tex.height);\r\n\t\t\ttempMat.prepend(lt);\r\n\t\t\ttempMat.scale(1.0 / ts._width, 1.0 / ts._height);\r\n\r\n\t\t\ttempMat.invert();\r\n\t\t\tif (isSimple)\r\n\t\t\t{\r\n\t\t\t\ttempMat.prepend(uv.mapCoord);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tshader.uniforms.uMapCoord = uv.mapCoord.toArray(true);\r\n\t\t\t\tshader.uniforms.uClampFrame = uv.uClampFrame;\r\n\t\t\t\tshader.uniforms.uClampOffset = uv.uClampOffset;\r\n\t\t\t}\r\n\r\n\t\t\tshader.uniforms.uTransform = tempMat.toArray(true);\r\n\t\t\tshader.uniforms.uColor = utils.premultiplyTintToRgba(ts.tint, ts.worldAlpha,\r\n\t\t\t\tshader.uniforms.uColor, baseTex.premultipliedAlpha);\r\n\t\t\t// changed\r\n\t\t\tshader.uniforms.translationMatrix = ts.proj.world.toArray(true);\r\n\r\n\t\t\tshader.uniforms.uSampler = renderer.bindTexture(tex);\r\n\r\n\t\t\trenderer.setBlendMode(utils.correctBlendMode(ts.blendMode, baseTex.premultipliedAlpha));\r\n\r\n\t\t\tquad.vao.draw(this.renderer.gl.TRIANGLES, 6, 0);\r\n\t\t}\r\n\t}\r\n\r\n\tPIXI.WebGLRenderer.registerPlugin('tilingSprite2d', TilingSprite2dRenderer);\r\n}\r\n","namespace pixi_projection {\r\n\texport class ProjectionsManager {\r\n\t\t/**\r\n\t\t * A reference to the current renderer\r\n\t\t *\r\n\t\t * @member {PIXI.WebGLRenderer}\r\n\t\t */\r\n\t\trenderer: PIXI.WebGLRenderer;\r\n\r\n\t\t/**\r\n\t\t * The current WebGL rendering context\r\n\t\t *\r\n\t\t * @member {WebGLRenderingContext}\r\n\t\t */\r\n\t\tgl: WebGLRenderingContext;\r\n\r\n\t\tconstructor(renderer: PIXI.WebGLRenderer) {\r\n\t\t\tthis.renderer = renderer;\r\n\r\n\t\t\trenderer.on('context', this.onContextChange);\r\n\t\t}\r\n\r\n\t\tonContextChange = (gl: WebGLRenderingContext) => {\r\n\t\t\tthis.gl = gl;\r\n\r\n\t\t\tthis.renderer.maskManager.pushSpriteMask = pushSpriteMask;\r\n\t\t};\r\n\r\n\t\tdestroy() {\r\n\t\t\tthis.renderer.off('context', this.onContextChange);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction pushSpriteMask(target: any, maskData: PIXI.Sprite): void {\r\n\t\tlet alphaMaskFilter = this.alphaMaskPool[this.alphaMaskIndex];\r\n\r\n\t\tif (!alphaMaskFilter) {\r\n\t\t\talphaMaskFilter = this.alphaMaskPool[this.alphaMaskIndex] = [new SpriteMaskFilter2d(maskData)];\r\n\t\t}\r\n\r\n\t\talphaMaskFilter[0].resolution = this.renderer.resolution;\r\n\t\talphaMaskFilter[0].maskSprite = maskData;\r\n\r\n\t\t// TODO - may cause issues!\r\n\t\ttarget.filterArea = maskData.getBounds(true);\r\n\r\n\t\tthis.renderer.filterManager.pushFilter(target, alphaMaskFilter);\r\n\r\n\t\tthis.alphaMaskIndex++;\r\n\t}\r\n\r\n\tPIXI.WebGLRenderer.registerPlugin('projections', ProjectionsManager);\r\n}\r\n","namespace pixi_projection {\r\n\tconst spriteMaskVert = `\r\nattribute vec2 aVertexPosition;\r\nattribute vec2 aTextureCoord;\r\n\r\nuniform mat3 projectionMatrix;\r\nuniform mat3 otherMatrix;\r\n\r\nvarying vec3 vMaskCoord;\r\nvarying vec2 vTextureCoord;\r\n\r\nvoid main(void)\r\n{\r\n\tgl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\r\n\r\n\tvTextureCoord = aTextureCoord;\r\n\tvMaskCoord = otherMatrix * vec3( aTextureCoord, 1.0);\r\n}\r\n`;\r\n\tconst spriteMaskFrag = `\r\nvarying vec3 vMaskCoord;\r\nvarying vec2 vTextureCoord;\r\n\r\nuniform sampler2D uSampler;\r\nuniform float alpha;\r\nuniform sampler2D mask;\r\n\r\nvoid main(void)\r\n{\r\n vec2 uv = vMaskCoord.xy / vMaskCoord.z;\r\n \r\n vec2 text = abs( uv - 0.5 );\r\n text = step(0.5, text);\r\n\r\n float clip = 1.0 - max(text.y, text.x);\r\n vec4 original = texture2D(uSampler, vTextureCoord);\r\n vec4 masky = texture2D(mask, uv);\r\n\r\n original *= (masky.r * masky.a * alpha * clip);\r\n\r\n gl_FragColor = original;\r\n}\r\n`;\r\n\r\n\tconst tempMat = new Matrix2d();\r\n\r\n\texport interface SpriteMaskFilter2dUniforms {\r\n\t\tmask: PIXI.Texture;\r\n\t\totherMatrix: PIXI.Matrix | Matrix2d;\r\n\t\talpha: number;\r\n\t}\r\n\r\n\texport class SpriteMaskFilter2d extends PIXI.Filter<SpriteMaskFilter2dUniforms> {\r\n\t\tconstructor(sprite: PIXI.Sprite) {\r\n\t\t\tsuper(spriteMaskVert, spriteMaskFrag);\r\n\r\n\t\t\tsprite.renderable = false;\r\n\r\n\t\t\tthis.maskSprite = sprite;\r\n\t\t}\r\n\r\n\t\tmaskSprite: PIXI.Sprite;\r\n\t\tmaskMatrix = new Matrix2d();\r\n\r\n\t\tapply(filterManager: PIXI.FilterManager, input: PIXI.RenderTarget, output: PIXI.RenderTarget,\r\n\t\t clear?: boolean, currentState?: any) {\r\n\t\t\tconst maskSprite = this.maskSprite;\r\n\r\n\t\t\tthis.uniforms.mask = maskSprite.texture;\r\n\t\t\tthis.uniforms.otherMatrix = SpriteMaskFilter2d.calculateSpriteMatrix(currentState, this.maskMatrix, maskSprite);\r\n\t\t\tthis.uniforms.alpha = maskSprite.worldAlpha;\r\n\r\n\t\t\tfilterManager.applyFilter(this, input, output);\r\n\t\t}\r\n\r\n\t\tstatic calculateSpriteMatrix(currentState: any, mappedMatrix: Matrix2d, sprite: PIXI.Sprite) {\r\n\t\t\tlet proj = (sprite as any).proj as Projection2d;\r\n\r\n\t\t\tconst filterArea = currentState.sourceFrame;\r\n\t\t\tconst textureSize = currentState.renderTarget.size;\r\n\r\n\t\t\tconst worldTransform = proj && !proj._affine ? proj.world.copyTo(tempMat) : tempMat.copyFrom(sprite.transform.worldTransform);\r\n\t\t\tconst texture = sprite.texture.orig;\r\n\r\n\t\t\tmappedMatrix.set(textureSize.width, 0, 0, textureSize.height, filterArea.x, filterArea.y);\r\n\t\t\tworldTransform.invert();\r\n\t\t\tmappedMatrix.setToMult(worldTransform, mappedMatrix);\r\n\t\t\tmappedMatrix.scaleAndTranslate(1.0 / texture.width, 1.0 / texture.height,\r\n\t\t\t\tsprite.anchor.x, sprite.anchor.y);\r\n\r\n\t\t\treturn mappedMatrix;\r\n\t\t}\r\n\t}\r\n}","namespace pixi_projection {\r\n\texport function container3dWorldTransform() {\r\n\t\treturn this.proj.affine ? this.transform.worldTransform : this.proj.world as any;\r\n\t}\r\n\r\n\texport class Container3d extends PIXI.Container {\r\n\t\tconstructor() {\r\n\t\t\tsuper();\r\n\t\t\tthis.proj = new Projection3d(this.transform);\r\n\t\t}\r\n\r\n\t\tproj: Projection3d;\r\n\r\n\t\tisFrontFace(forceUpdate: boolean = false) {\r\n\t\t\tif (forceUpdate) {\r\n\t\t\t\tthis._recursivePostUpdateTransform();\r\n\t\t\t\tthis.displayObjectUpdateTransform();\r\n\t\t\t}\r\n\r\n\t\t\tconst mat = this.proj.world.mat4;\r\n\t\t\tconst dx1 = mat[0] * mat[15] - mat[3] * mat[12];\r\n\t\t\tconst dy1 = mat[1] * mat[15] - mat[3] * mat[13];\r\n\t\t\tconst dx2 = mat[4] * mat[15] - mat[7] * mat[12];\r\n\t\t\tconst dy2 = mat[5] * mat[15] - mat[7] * mat[13];\r\n\r\n\t\t\treturn dx1 * dy2 - dx2 * dy1 > 0;\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t * returns depth from 0 to 1\r\n\t\t *\r\n\t\t * @param {boolean} forceUpdate whether to force matrix updates\r\n\t\t * @returns {number} depth\r\n\t\t */\r\n\t\tgetDepth(forceUpdate: boolean = false) {\r\n\t\t\tif (forceUpdate) {\r\n\t\t\t\tthis._recursivePostUpdateTransform();\r\n\t\t\t\tthis.displayObjectUpdateTransform();\r\n\t\t\t}\r\n\r\n\t\t\tconst mat4 = this.proj.world.mat4;\r\n\t\t\treturn mat4[14] / mat4[15];\r\n\t\t}\r\n\r\n\t\ttoLocal<T extends PIXI.PointLike>(position: PIXI.PointLike, from?: PIXI.DisplayObject,\r\n\t\t point?: T, skipUpdate?: boolean,\r\n\t\t step = TRANSFORM_STEP.ALL): T {\r\n\r\n\t\t\tif (from)\r\n\t\t\t{\r\n\t\t\t\tposition = from.toGlobal(position, point, skipUpdate);\r\n\t\t\t}\r\n\r\n\t\t\tif (!skipUpdate)\r\n\t\t\t{\r\n\t\t\t\tthis._recursivePostUpdateTransform();\r\n\t\t\t}\r\n\r\n\t\t\tif (step === TRANSFORM_STEP.ALL) {\r\n\t\t\t\tif (!skipUpdate) {\r\n\t\t\t\t\tthis.displayObjectUpdateTransform();\r\n\t\t\t\t}\r\n\t\t\t\tif (this.proj.affine) {\r\n\t\t\t\t\treturn this.transform.worldTransform.applyInverse(point, point) as any;\r\n\t\t\t\t}\r\n\t\t\t\treturn this.proj.world.applyInverse(point, point) as any;\r\n\t\t\t}\r\n\r\n\t\t\tif (this.parent) {\r\n\t\t\t\tpoint = this.parent.worldTransform.applyInverse(position, point) as any;\r\n\t\t\t} else {\r\n\t\t\t\tpoint.copy(position);\r\n\t\t\t}\r\n\t\t\tif (step === TRANSFORM_STEP.NONE) {\r\n\t\t\t\treturn point;\r\n\t\t\t}\r\n\r\n\t\t\tpoint = this.transform.localTransform.applyInverse(point, point) as any;\r\n\t\t\tif (step === TRANSFORM_STEP.PROJ && this.proj.cameraMode) {\r\n\t\t\t\tpoint = this.proj.cameraMatrix.applyInverse(point, point) as any;\r\n\t\t\t}\r\n\t\t\treturn point;\r\n\t\t}\r\n\r\n\t\tget worldTransform() {\r\n\t\t\treturn this.proj.affine ? this.transform.worldTransform : this.proj.world as any;\r\n\t\t}\r\n\r\n\t\tget position3d(): PIXI.PointLike {\r\n\t\t\treturn this.proj.position;\r\n\t\t}\r\n\t\tget scale3d(): PIXI.PointLike {\r\n\t\t\treturn this.proj.scale;\r\n\t\t}\r\n\t\tget euler(): Euler {\r\n\t\t\treturn this.proj.euler;\r\n\t\t}\r\n\t\tget pivot3d(): PIXI.PointLike {\r\n\t\t\treturn this.proj.pivot;\r\n\t\t}\r\n\t\tset position3d(value: PIXI.PointLike) {\r\n\t\t\tthis.proj.position.copy(value);\r\n\t\t}\r\n\t\tset scale3d(value: PIXI.PointLike) {\r\n\t\t\tthis.proj.scale.copy(value);\r\n\t\t}\r\n\t\tset euler(value: Euler) {\r\n\t\t\tthis.proj.euler.copy(value);\r\n\t\t}\r\n\t\tset pivot3d(value: PIXI.PointLike) {\r\n\t\t\tthis.proj.pivot.copy(value);\r\n\t\t}\r\n\t}\r\n\r\n\texport let container3dToLocal = Container3d.prototype.toLocal;\r\n\texport let container3dGetDepth = Container3d.prototype.getDepth;\r\n\texport let container3dIsFrontFace = Container3d.prototype.isFrontFace;\r\n}\r\n","///<reference path=\"./Container3d.ts\"/>\r\nnamespace pixi_projection {\r\n\texport class Camera3d extends Container3d {\r\n\t\tconstructor() {\r\n\t\t\tsuper();\r\n\t\t\tthis.proj.cameraMode = true;\r\n\t\t\tthis.setPlanes(400, 10, 10000, false);\r\n\t\t}\r\n\r\n\t\t_far: number = 0;\r\n\t\t_near: number = 0;\r\n\t\t_focus: number = 0;\r\n\t\t_orthographic: boolean = false;\r\n\r\n\t\tget far() {\r\n\t\t\treturn this._far;\r\n\t\t}\r\n\r\n\t\tget near() {\r\n\t\t\treturn this._near;\r\n\t\t}\r\n\r\n\t\tget focus() {\r\n\t\t\treturn this._focus;\r\n\t\t}\r\n\r\n\t\tget ortographic() {\r\n\t\t\treturn this._orthographic;\r\n\t\t}\r\n\r\n\t\tsetPlanes(focus: number, near: number = 10, far: number = 10000, orthographic: boolean = false) {\r\n\t\t\tthis._focus = focus;\r\n\t\t\tthis._near = near;\r\n\t\t\tthis._far = far;\r\n\t\t\tthis._orthographic = orthographic;\r\n\r\n\t\t\tconst proj = this.proj;\r\n\t\t\tconst mat4 = proj.cameraMatrix.mat4;\r\n\r\n\t\t\tproj._projID++;\r\n\r\n\t\t\tmat4[10] = 1.0 / (far - near);\r\n\t\t\tmat4[14] = (focus - near) / (far - near);\r\n\t\t\tif (this._orthographic) {\r\n\t\t\t\tmat4[11] = 0;\r\n\t\t\t} else {\r\n\t\t\t\tmat4[11] = 1.0 / focus;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n","namespace pixi_projection {\r\n\t/**\r\n\t * The Euler angles, order is YZX. Except for projections (camera.lookEuler), its reversed XZY\r\n\t * @class\r\n\t * @namespace PIXI.projection\r\n\t * @param x pitch\r\n\t * @param y yaw\r\n\t * @param z roll\r\n\t * @constructor\r\n\t */\r\n\r\n\texport class Euler implements PIXI.PointLike {\r\n\t\tconstructor(x?: number, y?: number, z?: number) {\r\n\t\t\t/**\r\n\t\t\t * @member {number}\r\n\t\t\t * @default 0\r\n\t\t\t */\r\n\t\t\tthis._x = x || 0;\r\n\r\n\t\t\t/**\r\n\t\t\t * @member {number}\r\n\t\t\t * @default 0\r\n\t\t\t */\r\n\t\t\tthis._y = y || 0;\r\n\r\n\t\t\t/**\r\n\t\t\t * @member {number}\r\n\t\t\t * @default 0\r\n\t\t\t */\r\n\t\t\tthis._z = z || 0;\r\n\r\n\t\t\tthis.quaternion = new Float64Array(4);\r\n\t\t\tthis.quaternion[3] = 1;\r\n\r\n\t\t\tthis.update();\r\n\t\t}\r\n\r\n\t\t_quatUpdateId = -1;\r\n\t\t_quatDirtyId = 0;\r\n\r\n\t\tquaternion: Float64Array;\r\n\r\n\t\t_x: number;\r\n\t\t_y: number;\r\n\t\t_z: number;\r\n\t\t_sign: number = 1;\r\n\r\n\t\tget x() {\r\n\t\t\treturn this._x;\r\n\t\t}\r\n\r\n\t\tset x(value: number) {\r\n\t\t\tif (this._x !== value) {\r\n\t\t\t\tthis._x = value;\r\n\t\t\t\tthis._quatDirtyId++;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tget y() {\r\n\t\t\treturn this._y;\r\n\t\t}\r\n\r\n\t\tset y(value: number) {\r\n\t\t\tif (this._y !== value) {\r\n\t\t\t\tthis._y = value;\r\n\t\t\t\tthis._quatDirtyId++;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tget z() {\r\n\t\t\treturn this._z;\r\n\t\t}\r\n\r\n\t\tset z(value: number) {\r\n\t\t\tif (this._z !== value) {\r\n\t\t\t\tthis._z = value;\r\n\t\t\t\tthis._quatDirtyId++;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tget pitch() {\r\n\t\t\treturn this._x;\r\n\t\t}\r\n\r\n\t\tset pitch(value: number) {\r\n\t\t\tif (this._x !== value) {\r\n\t\t\t\tthis._x = value;\r\n\t\t\t\tthis._quatDirtyId++;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tget yaw() {\r\n\t\t\treturn this._y;\r\n\t\t}\r\n\r\n\t\tset yaw(value: number) {\r\n\t\t\tif (this._y !== value) {\r\n\t\t\t\tthis._y = value;\r\n\t\t\t\tthis._quatDirtyId++;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tget roll() {\r\n\t\t\treturn this._z;\r\n\t\t}\r\n\r\n\t\tset roll(value: number) {\r\n\t\t\tif (this._z !== value) {\r\n\t\t\t\tthis._z = value;\r\n\t\t\t\tthis._quatDirtyId++;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tset(x?: number, y?: number, z?: number) {\r\n\t\t\tconst _x = x || 0;\r\n\t\t\tconst _y = y || 0;\r\n\t\t\tconst _z = z || 0;\r\n\t\t\tif (this._x !== _x || this._y !== _y || this._z !== _z) {\r\n\t\t\t\tthis._x = _x;\r\n\t\t\t\tthis._y = _y;\r\n\t\t\t\tthis._z = _z;\r\n\t\t\t\tthis._quatDirtyId++;\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tcopy(euler: PIXI.PointLike) {\r\n\t\t\tconst _x = euler.x;\r\n\t\t\tconst _y = euler.y;\r\n\t\t\tconst _z = euler.z;\r\n\t\t\tif (this._x !== _x || this._y !== _y || this._z !== _z) {\r\n\t\t\t\tthis._x = _x;\r\n\t\t\t\tthis._y = _y;\r\n\t\t\t\tthis._z = _z;\r\n\t\t\t\tthis._quatDirtyId++;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tclone() {\r\n\t\t\treturn new Euler(this._x, this._y, this._z);\r\n\t\t}\r\n\r\n\t\tupdate() {\r\n\t\t\tif (this._quatUpdateId === this._quatDirtyId) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tthis._quatUpdateId = this._quatDirtyId;\r\n\r\n\t\t\tconst c1 = Math.cos(this._x / 2);\r\n\t\t\tconst c2 = Math.cos(this._y / 2);\r\n\t\t\tconst c3 = Math.cos(this._z / 2);\r\n\r\n\t\t\tconst s = this._sign;\r\n\t\t\tconst s1 = s * Math.sin(this._x / 2);\r\n\t\t\tconst s2 = s * Math.sin(this._y / 2);\r\n\t\t\tconst s3 = s * Math.sin(this._z / 2);\r\n\r\n\t\t\tconst q = this.quaternion;\r\n\r\n\t\t\tq[0] = s1 * c2 * c3 + c1 * s2 * s3;\r\n\t\t\tq[1] = c1 * s2 * c3 - s1 * c2 * s3;\r\n\t\t\tq[2] = c1 * c2 * s3 + s1 * s2 * c3;\r\n\t\t\tq[3] = c1 * c2 * c3 - s1 * s2 * s3;\r\n\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}\r\n}\r\n","// according to https://jsperf.com/obj-vs-array-view-access/1 , Float64Array is the best here\r\n\r\nnamespace pixi_projection {\r\n\timport IPoint = PIXI.PointLike;\r\n\r\n\tconst mat4id = [1, 0, 0, 0,\r\n\t\t0, 1, 0, 0,\r\n\t\t0, 0, 1, 0,\r\n\t\t0, 0, 0, 1];\r\n\r\n\r\n\texport class Matrix3d {\r\n\t\t/**\r\n\t\t * A default (identity) matrix\r\n\t\t *\r\n\t\t * @static\r\n\t\t * @const\r\n\t\t */\r\n\t\tstatic readonly IDENTITY = new Matrix3d();\r\n\r\n\t\t/**\r\n\t\t * A temp matrix\r\n\t\t *\r\n\t\t * @static\r\n\t\t * @const\r\n\t\t */\r\n\t\tstatic readonly TEMP_MATRIX = new Matrix3d();\r\n\r\n\t\t/**\r\n\t\t * mat4 implementation through array of 16 elements\r\n\t\t */\r\n\t\tmat4: Float64Array;\r\n\r\n\t\tfloatArray: Float32Array = null;\r\n\r\n\t\t_dirtyId: number = 0;\r\n\t\t_updateId: number = -1;\r\n\t\t_mat4inv: Float64Array = null;\r\n\t\tcacheInverse: boolean = false;\r\n\r\n\t\tconstructor(backingArray?: ArrayLike<number>) {\r\n\t\t\tthis.mat4 = new Float64Array(backingArray || mat4id);\r\n\t\t}\r\n\r\n\t\tget a() {\r\n\t\t\treturn this.mat4[0] / this.mat4[15];\r\n\t\t}\r\n\r\n\t\tget b() {\r\n\t\t\treturn this.mat4[1] / this.mat4[15];\r\n\t\t}\r\n\r\n\t\tget c() {\r\n\t\t\treturn this.mat4[4] / this.mat4[15];\r\n\t\t}\r\n\r\n\t\tget d() {\r\n\t\t\treturn this.mat4[5] / this.mat4[15];\r\n\t\t}\r\n\r\n\t\tget tx() {\r\n\t\t\treturn this.mat4[12] / this.mat4[15];\r\n\t\t}\r\n\r\n\t\tget ty() {\r\n\t\t\treturn this.mat4[13] / this.mat4[15];\r\n\t\t}\r\n\r\n\t\tset a(value: number) {\r\n\t\t\tthis.mat4[0] = value * this.mat4[15];\r\n\t\t}\r\n\r\n\t\tset b(value: number) {\r\n\t\t\tthis.mat4[1] = value * this.mat4[15];\r\n\t\t}\r\n\r\n\t\tset c(value: number) {\r\n\t\t\tthis.mat4[4] = value * this.mat4[15];\r\n\t\t}\r\n\r\n\t\tset d(value: number) {\r\n\t\t\tthis.mat4[5] = value * this.mat4[15];\r\n\t\t}\r\n\r\n\t\tset tx(value: number) {\r\n\t\t\tthis.mat4[12] = value * this.mat4[15];\r\n\t\t}\r\n\r\n\t\tset ty(value: number) {\r\n\t\t\tthis.mat4[13] = value * this.mat4[15];\r\n\t\t}\r\n\r\n\t\tset(a: number, b: number, c: number, d: number, tx: number, ty: number) {\r\n\t\t\tlet mat4 = this.mat4;\r\n\t\t\tmat4[0] = a;\r\n\t\t\tmat4[1] = b;\r\n\t\t\tmat4[2] = 0;\r\n\t\t\tmat4[3] = 0;\r\n\t\t\tmat4[4] = c;\r\n\t\t\tmat4[5] = d;\r\n\t\t\tmat4[6] = 0;\r\n\t\t\tmat4[7] = 0;\r\n\t\t\tmat4[8] = 0;\r\n\t\t\tmat4[9] = 0;\r\n\t\t\tmat4[10] = 1;\r\n\t\t\tmat4[11] = 0;\r\n\t\t\tmat4[12] = tx;\r\n\t\t\tmat4[13] = ty;\r\n\t\t\tmat4[14] = 0;\r\n\t\t\tmat4[15] = 1;\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\ttoArray(transpose?: boolean, out?: Float32Array): Float32Array {\r\n\t\t\tif (!this.floatArray) {\r\n\t\t\t\tthis.floatArray = new Float32Array(9);\r\n\t\t\t}\r\n\r\n\t\t\tconst array = out || this.floatArray;\r\n\t\t\tconst mat3 = this.mat4;\r\n\r\n\t\t\tif (transpose) {\r\n\t\t\t\tarray[0] = mat3[0];\r\n\t\t\t\tarray[1] = mat3[1];\r\n\t\t\t\tarray[2] = mat3[3];\r\n\t\t\t\tarray[3] = mat3[4];\r\n\t\t\t\tarray[4] = mat3[5];\r\n\t\t\t\tarray[5] = mat3[7];\r\n\t\t\t\tarray[6] = mat3[12];\r\n\t\t\t\tarray[7] = mat3[13];\r\n\t\t\t\tarray[8] = mat3[15];\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t//this branch is NEVER USED in pixi\r\n\t\t\t\tarray[0] = mat3[0];\r\n\t\t\t\tarray[1] = mat3[4];\r\n\t\t\t\tarray[2] = mat3[12];\r\n\t\t\t\tarray[3] = mat3[2];\r\n\t\t\t\tarray[4] = mat3[6];\r\n\t\t\t\tarray[5] = mat3[13];\r\n\t\t\t\tarray[6] = mat3[3];\r\n\t\t\t\tarray[7] = mat3[7];\r\n\t\t\t\tarray[8] = mat3[15];\r\n\t\t\t}\r\n\r\n\t\t\treturn array;\r\n\t\t}\r\n\r\n\t\tsetToTranslation(tx: number, ty: number, tz: number) {\r\n\t\t\tconst mat4 = this.mat4;\r\n\r\n\t\t\tmat4[0] = 1;\r\n\t\t\tmat4[1] = 0;\r\n\t\t\tmat4[2] = 0;\r\n\t\t\tmat4[3] = 0;\r\n\r\n\t\t\tmat4[4] = 0;\r\n\t\t\tmat4[5] = 1;\r\n\t\t\tmat4[6] = 0;\r\n\t\t\tmat4[7] = 0;\r\n\r\n\t\t\tmat4[8] = 0;\r\n\t\t\tmat4[9] = 0;\r\n\t\t\tmat4[10] = 1;\r\n\t\t\tmat4[11] = 0;\r\n\r\n\t\t\tmat4[12] = tx;\r\n\t\t\tmat4[13] = ty;\r\n\t\t\tmat4[14] = tz;\r\n\t\t\tmat4[15] = 1;\r\n\t\t}\r\n\r\n\t\tsetToRotationTranslationScale(quat: Float64Array, tx: number, ty: number, tz: number, sx: number, sy: number, sz: number) {\r\n\t\t\tconst out = this.mat4;\r\n\r\n\t\t\tlet x = quat[0], y = quat[1], z = quat[2], w = quat[3];\r\n\t\t\tlet x2 = x + x;\r\n\t\t\tlet y2 = y + y;\r\n\t\t\tlet z2 = z + z;\r\n\r\n\t\t\tlet xx = x * x2;\r\n\t\t\tlet xy = x * y2;\r\n\t\t\tlet xz = x * z2;\r\n\t\t\tlet yy = y * y2;\r\n\t\t\tlet yz = y * z2;\r\n\t\t\tlet zz = z * z2;\r\n\t\t\tlet wx = w * x2;\r\n\t\t\tlet wy = w * y2;\r\n\t\t\tlet wz = w * z2;\r\n\r\n\t\t\tout[0] = (1 - (yy + zz)) * sx;\r\n\t\t\tout[1] = (xy + wz) * sx;\r\n\t\t\tout[2] = (xz - wy) * sx;\r\n\t\t\tout[3] = 0;\r\n\t\t\tout[4] = (xy - wz) * sy;\r\n\t\t\tout[5] = (1 - (xx + zz)) * sy;\r\n\t\t\tout[6] = (yz + wx) * sy;\r\n\t\t\tout[7] = 0;\r\n\t\t\tout[8] = (xz + wy) * sz;\r\n\t\t\tout[9] = (yz - wx) * sz;\r\n\t\t\tout[10] = (1 - (xx + yy)) * sz;\r\n\t\t\tout[11] = 0;\r\n\t\t\tout[12] = tx;\r\n\t\t\tout[13] = ty;\r\n\t\t\tout[14] = tz;\r\n\t\t\tout[15] = 1;\r\n\r\n\t\t\treturn out;\r\n\t\t}\r\n\r\n\t\tapply(pos: IPoint, newPos: IPoint): IPoint {\r\n\t\t\tnewPos = newPos || new PIXI.Point();\r\n\r\n\t\t\tconst mat4 = this.mat4;\r\n\t\t\tconst x = pos.x;\r\n\t\t\tconst y = pos.y;\r\n\t\t\tconst z = pos.z;\r\n\r\n\t\t\t//TODO: apply for 2d point\r\n\r\n\t\t\tlet w = 1.0 / (mat4[3] * x + mat4[7] * y + mat4[11] * z + mat4[15]);\r\n\t\t\tnewPos.x = w * (mat4[0] * x + mat4[4] * y + mat4[8] * z + mat4[12]);\r\n\t\t\tnewPos.y = w * (mat4[1] * x + mat4[5] * y + mat4[9] * z + mat4[13]);\r\n\t\t\tnewPos.z = w * (mat4[2] * x + mat4[6] * y + mat4[10] * z + mat4[14]);\r\n\r\n\t\t\treturn newPos;\r\n\t\t}\r\n\r\n\t\ttranslate(tx: number, ty: number, tz: number) {\r\n\t\t\tconst a = this.mat4;\r\n\r\n\t\t\ta[12] = a[0] * tx + a[4] * ty + a[8] * tz + a[12];\r\n\t\t\ta[13] = a[1] * tx + a[5] * ty + a[9] * tz + a[13];\r\n\t\t\ta[14] = a[2] * tx + a[6] * ty + a[10] * tz + a[14];\r\n\t\t\ta[15] = a[3] * tx + a[7] * ty + a[11] * tz + a[15];\r\n\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tscale(x: number, y: number, z?: number) {\r\n\t\t\tconst mat4 = this.mat4;\r\n\t\t\tmat4[0] *= x;\r\n\t\t\tmat4[1] *= x;\r\n\t\t\tmat4[2] *= x;\r\n\t\t\tmat4[3] *= x;\r\n\r\n\t\t\tmat4[4] *= y;\r\n\t\t\tmat4[5] *= y;\r\n\t\t\tmat4[6] *= y;\r\n\t\t\tmat4[7] *= y;\r\n\r\n\t\t\tif (z !== undefined) {\r\n\t\t\t\tmat4[8] *= z;\r\n\t\t\t\tmat4[9] *= z;\r\n\t\t\t\tmat4[10] *= z;\r\n\t\t\t\tmat4[11] *= z;\r\n\t\t\t}\r\n\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tscaleAndTranslate(scaleX: number, scaleY: number, scaleZ: number, tx: number, ty: number, tz: number) {\r\n\t\t\tconst mat4 = this.mat4;\r\n\t\t\tmat4[0] = scaleX * mat4[0] + tx * mat4[3];\r\n\t\t\tmat4[1] = scaleY * mat4[1] + ty * mat4[3];\r\n\t\t\tmat4[2] = scaleZ * mat4[2] + tz * mat4[3];\r\n\r\n\t\t\tmat4[4] = scaleX * mat4[4] + tx * mat4[7];\r\n\t\t\tmat4[5] = scaleY * mat4[5] + ty * mat4[7];\r\n\t\t\tmat4[6] = scaleZ * mat4[6] + tz * mat4[7];\r\n\r\n\t\t\tmat4[8] = scaleX * mat4[8] + tx * mat4[11];\r\n\t\t\tmat4[9] = scaleY * mat4[9] + ty * mat4[11];\r\n\t\t\tmat4[10] = scaleZ * mat4[10] + tz * mat4[11];\r\n\r\n\t\t\tmat4[12] = scaleX * mat4[12] + tx * mat4[15];\r\n\t\t\tmat4[13] = scaleY * mat4[13] + ty * mat4[15];\r\n\t\t\tmat4[14] = scaleZ * mat4[14] + tz * mat4[15];\r\n\t\t}\r\n\r\n\t\t//TODO: remove props\r\n\t\tapplyInverse(pos: IPoint, newPos: IPoint): IPoint {\r\n\t\t\tnewPos = newPos || new Point3d();\r\n\t\t\tif (!this._mat4inv) {\r\n\t\t\t\tthis._mat4inv = new Float64Array(16);\r\n\t\t\t}\r\n\r\n\t\t\tconst mat4 = this._mat4inv;\r\n\t\t\tconst a = this.mat4;\r\n\t\t\tconst x = pos.x;\r\n\t\t\tconst y = pos.y;\r\n\t\t\tlet z = pos.z;\r\n\r\n\t\t\tif (!this.cacheInverse || this._updateId !== this._dirtyId) {\r\n\t\t\t\tthis._updateId = this._dirtyId;\r\n\t\t\t\tMatrix3d.glMatrixMat4Invert(mat4, a);\r\n\t\t\t}\r\n\r\n\t\t\tlet w1 = 1.0 / (mat4[3] * x + mat4[7] * y + mat4[11] * z + mat4[15]);\r\n\t\t\tconst x1 = w1 * (mat4[0] * x + mat4[4] * y + mat4[8] * z + mat4[12]);\r\n\t\t\tconst y1 = w1 * (mat4[1] * x + mat4[5] * y + mat4[9] * z + mat4[13]);\r\n\t\t\tconst z1 = w1 * (mat4[2] * x + mat4[6] * y + mat4[10] * z + mat4[14]);\r\n\r\n\t\t\tz += 1.0;\r\n\r\n\t\t\tlet w2 = 1.0 / (mat4[3] * x + mat4[7] * y + mat4[11] * z + mat4[15]);\r\n\t\t\tconst x2 = w2 * (mat4[0] * x + mat4[4] * y + mat4[8] * z + mat4[12]);\r\n\t\t\tconst y2 = w2 * (mat4[1] * x + mat4[5] * y + mat4[9] * z + mat4[13]);\r\n\t\t\tconst z2 = w2 * (mat4[2] * x + mat4[6] * y + mat4[10] * z + mat4[14]);\r\n\r\n\t\t\tif (Math.abs(z1-z2)<1e-10) {\r\n\t\t\t\tnewPos.set(NaN, NaN, 0);\r\n\t\t\t}\r\n\r\n\t\t\tconst alpha = (0-z1) / (z2-z1);\r\n\t\t\tnewPos.set( (x2-x1)*alpha + x1, (y2-y1)*alpha + y1, 0.0);\r\n\t\t\treturn newPos;\r\n\t\t}\r\n\r\n\t\tinvert(): Matrix3d {\r\n\t\t\tMatrix3d.glMatrixMat4Invert(this.mat4, this.mat4);\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tinvertCopyTo(matrix: Matrix3d) {\r\n\t\t\tif (!this._mat4inv) {\r\n\t\t\t\tthis._mat4inv = new Float64Array(16);\r\n\t\t\t}\r\n\r\n\t\t\tconst mat4 = this._mat4inv;\r\n\t\t\tconst a = this.mat4;\r\n\r\n\t\t\tif (!this.cacheInverse || this._updateId !== this._dirtyId) {\r\n\t\t\t\tthis._updateId = this._dirtyId;\r\n\t\t\t\tMatrix3d.glMatrixMat4Invert(mat4, a);\r\n\t\t\t}\r\n\r\n\t\t\tmatrix.mat4.set(mat4);\r\n\t\t}\r\n\r\n\t\tidentity(): Matrix3d {\r\n\t\t\tconst mat3 = this.mat4;\r\n\t\t\tmat3[0] = 1;\r\n\t\t\tmat3[1] = 0;\r\n\t\t\tmat3[2] = 0;\r\n\t\t\tmat3[3] = 0;\r\n\r\n\t\t\tmat3[4] = 0;\r\n\t\t\tmat3[5] = 1;\r\n\t\t\tmat3[6] = 0;\r\n\t\t\tmat3[7] = 0;\r\n\r\n\t\t\tmat3[8] = 0;\r\n\t\t\tmat3[9] = 0;\r\n\t\t\tmat3[10] = 1;\r\n\t\t\tmat3[11] = 0;\r\n\r\n\t\t\tmat3[12] = 0;\r\n\t\t\tmat3[13] = 0;\r\n\t\t\tmat3[14] = 0;\r\n\t\t\tmat3[15] = 1;\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tclone() {\r\n\t\t\treturn new Matrix3d(this.mat4);\r\n\t\t}\r\n\r\n\t\tcopyTo(matrix: Matrix3d) {\r\n\t\t\tconst mat3 = this.mat4;\r\n\t\t\tconst ar2 = matrix.mat4;\r\n\t\t\tar2[0] = mat3[0];\r\n\t\t\tar2[1] = mat3[1];\r\n\t\t\tar2[2] = mat3[2];\r\n\t\t\tar2[3] = mat3[3];\r\n\t\t\tar2[4] = mat3[4];\r\n\t\t\tar2[5] = mat3[5];\r\n\t\t\tar2[6] = mat3[6];\r\n\t\t\tar2[7] = mat3[7];\r\n\t\t\tar2[8] = mat3[8];\r\n\t\t\treturn matrix;\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t * legacy method, change the values of given pixi matrix\r\n\t\t * @param matrix\r\n\t\t * @return\r\n\t\t */\r\n\t\tcopy(matrix: PIXI.Matrix, affine?: AFFINE) {\r\n\t\t\tconst mat3 = this.mat4;\r\n\t\t\tconst d = 1.0 / mat3[15];\r\n\t\t\tconst tx = mat3[12] * d, ty = mat3[13] * d;\r\n\t\t\tmatrix.a = (mat3[0] - mat3[3] * tx) * d;\r\n\t\t\tmatrix.b = (mat3[1] - mat3[3] * ty) * d;\r\n\t\t\tmatrix.c = (mat3[4] - mat3[7] * tx) * d;\r\n\t\t\tmatrix.d = (mat3[5] - mat3[7] * ty) * d;\r\n\t\t\tmatrix.tx = tx;\r\n\t\t\tmatrix.ty = ty;\r\n\r\n\t\t\tif (affine >= 2) {\r\n\t\t\t\tif (affine === AFFINE.POINT) {\r\n\t\t\t\t\tmatrix.a = 1;\r\n\t\t\t\t\tmatrix.b = 0;\r\n\t\t\t\t\tmatrix.c = 0;\r\n\t\t\t\t\tmatrix.d = 1;\r\n\t\t\t\t} else if (affine === AFFINE.AXIS_X) {\r\n\t\t\t\t\tmatrix.c = -matrix.b;\r\n\t\t\t\t\tmatrix.d = matrix.a;\r\n\t\t\t\t} else if (affine === AFFINE.AXIS_Y) {\r\n\t\t\t\t\tmatrix.a = matrix.d;\r\n\t\t\t\t\tmatrix.c = -matrix.b;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t * legacy method, change the values of given pixi matrix\r\n\t\t * @param matrix\r\n\t\t * @return\r\n\t\t */\r\n\t\tcopyFrom(matrix: PIXI.Matrix) {\r\n\t\t\tconst mat3 = this.mat4;\r\n\t\t\tmat3[0] = matrix.a;\r\n\t\t\tmat3[1] = matrix.b;\r\n\t\t\tmat3[2] = 0;\r\n\t\t\tmat3[3] = 0;\r\n\r\n\t\t\tmat3[4] = matrix.c;\r\n\t\t\tmat3[5] = matrix.d;\r\n\t\t\tmat3[6] = 0;\r\n\t\t\tmat3[7] = 0;\r\n\r\n\t\t\tmat3[8] = 0;\r\n\t\t\tmat3[9] = 0;\r\n\t\t\tmat3[10] = 1;\r\n\t\t\tmat3[11] = 0;\r\n\r\n\t\t\tmat3[12] = matrix.tx;\r\n\t\t\tmat3[13] = matrix.ty;\r\n\t\t\tmat3[14] = 0;\r\n\t\t\tmat3[15] = 1;\r\n\r\n\t\t\tthis._dirtyId++;\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tsetToMultLegacy(pt: PIXI.Matrix, lt: Matrix3d) {\r\n\t\t\tconst out = this.mat4;\r\n\t\t\tconst b = lt.mat4;\r\n\r\n\t\t\tconst a00 = pt.a, a01 = pt.b,\r\n\t\t\t\ta10 = pt.c, a11 = pt.d,\r\n\t\t\t\ta30 = pt.tx, a31 = pt.ty;\r\n\r\n\t\t\tlet b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3];\r\n\r\n\t\t\tout[0] = b0 * a00 + b1 * a10 + b3 * a30;\r\n\t\t\tout[1] = b0 * a01 + b1 * a11 + b3 * a31;\r\n\t\t\tout[2] = b2;\r\n\t\t\tout[3] = b3;\r\n\r\n\t\t\tb0 = b[4];\r\n\t\t\tb1 = b[5];\r\n\t\t\tb2 = b[6];\r\n\t\t\tb3 = b[7];\r\n\t\t\tout[4] = b0 * a00 + b1 * a10 + b3 * a30;\r\n\t\t\tout[5] = b0 * a01 + b1 * a11 + b3 * a31;\r\n\t\t\tout[6] = b2;\r\n\t\t\tout[7] = b3;\r\n\r\n\t\t\tb0 = b[8];\r\n\t\t\tb1 = b[9];\r\n\t\t\tb2 = b[10];\r\n\t\t\tb3 = b[11];\r\n\t\t\tout[8] = b0 * a00 + b1 * a10 + b3 * a30;\r\n\t\t\tout[9] = b0 * a01 + b1 * a11 + b3 * a31;\r\n\t\t\tout[10] = b2;\r\n\t\t\tout[11] = b3;\r\n\r\n\t\t\tb0 = b[12];\r\n\t\t\tb1 = b[13];\r\n\t\t\tb2 = b[14];\r\n\t\t\tb3 = b[15];\r\n\t\t\tout[12] = b0 * a00 + b1 * a10 + b3 * a30;\r\n\t\t\tout[13] = b0 * a01 + b1 * a11 + b3 * a31;\r\n\t\t\tout[14] = b2;\r\n\t\t\tout[15] = b3;\r\n\r\n\t\t\tthis._dirtyId++;\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tsetToMultLegacy2(pt: Matrix3d, lt: PIXI.Matrix) {\r\n\t\t\tconst out = this.mat4;\r\n\t\t\tconst a = pt.mat4;\r\n\r\n\t\t\tconst a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3];\r\n\t\t\tconst a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7];\r\n\r\n\t\t\tconst b00 = lt.a, b01 = lt.b,\r\n\t\t\t\tb10 = lt.c, b11 = lt.d,\r\n\t\t\t\tb30 = lt.tx, b31 = lt.ty;\r\n\r\n\t\t\tout[0] = b00 * a00 + b01 * a10;\r\n\t\t\tout[1] = b00 * a01 + b01 * a11;\r\n\t\t\tout[2] = b00 * a02 + b01 * a12;\r\n\t\t\tout[3] = b00 * a03 + b01 * a13;\r\n\r\n\t\t\tout[4] = b10 * a00 + b11 * a10;\r\n\t\t\tout[5] = b10 * a01 + b11 * a11;\r\n\t\t\tout[6] = b10 * a02 + b11 * a12;\r\n\t\t\tout[7] = b10 * a03 + b11 * a13;\r\n\r\n\t\t\tout[8] = a[8];\r\n\t\t\tout[9] = a[9];\r\n\t\t\tout[10] = a[10];\r\n\t\t\tout[11] = a[11];\r\n\r\n\t\t\tout[12] = b30 * a00 + b31 * a10 + a[12];\r\n\t\t\tout[13] = b30 * a01 + b31 * a11 + a[13];\r\n\t\t\tout[14] = b30 * a02 + b31 * a12 + a[14];\r\n\t\t\tout[15] = b30 * a03 + b31 * a13 + a[15];\r\n\r\n\t\t\tthis._dirtyId++;\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\t// that's transform multiplication we use\r\n\t\tsetToMult(pt: Matrix3d, lt: Matrix3d) {\r\n\t\t\tMatrix3d.glMatrixMat4Multiply(this.mat4, pt.mat4, lt.mat4);\r\n\r\n\t\t\tthis._dirtyId++;\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tprepend(lt: any) {\r\n\t\t\tif (lt.mat4) {\r\n\t\t\t\tthis.setToMult(lt, this);\r\n\t\t\t} else {\r\n\t\t\t\tthis.setToMultLegacy(lt, this);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tstatic glMatrixMat4Invert(out: Float64Array, a: Float64Array) {\r\n\t\t\tlet a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3];\r\n\t\t\tlet a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7];\r\n\t\t\tlet a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11];\r\n\t\t\tlet a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15];\r\n\r\n\t\t\tlet b00 = a00 * a11 - a01 * a10;\r\n\t\t\tlet b01 = a00 * a12 - a02 * a10;\r\n\t\t\tlet b02 = a00 * a13 - a03 * a10;\r\n\t\t\tlet b03 = a01 * a12 - a02 * a11;\r\n\t\t\tlet b04 = a01 * a13 - a03 * a11;\r\n\t\t\tlet b05 = a02 * a13 - a03 * a12;\r\n\t\t\tlet b06 = a20 * a31 - a21 * a30;\r\n\t\t\tlet b07 = a20 * a32 - a22 * a30;\r\n\t\t\tlet b08 = a20 * a33 - a23 * a30;\r\n\t\t\tlet b09 = a21 * a32 - a22 * a31;\r\n\t\t\tlet b10 = a21 * a33 - a23 * a31;\r\n\t\t\tlet b11 = a22 * a33 - a23 * a32;\r\n\r\n\t\t\t// Calculate the determinant\r\n\t\t\tlet det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\r\n\r\n\t\t\tif (!det) {\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t\tdet = 1.0 / det;\r\n\r\n\t\t\tout[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\r\n\t\t\tout[1] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\r\n\t\t\tout[2] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\r\n\t\t\tout[3] = (a22 * b04 - a21 * b05 - a23 * b03) * det;\r\n\t\t\tout[4] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\r\n\t\t\tout[5] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\r\n\t\t\tout[6] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\r\n\t\t\tout[7] = (a20 * b05 - a22 * b02 + a23 * b01) * det;\r\n\t\t\tout[8] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\r\n\t\t\tout[9] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\r\n\t\t\tout[10] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\r\n\t\t\tout[11] = (a21 * b02 - a20 * b04 - a23 * b00) * det;\r\n\t\t\tout[12] = (a11 * b07 - a10 * b09 - a12 * b06) * det;\r\n\t\t\tout[13] = (a00 * b09 - a01 * b07 + a02 * b06) * det;\r\n\t\t\tout[14] = (a31 * b01 - a30 * b03 - a32 * b00) * det;\r\n\t\t\tout[15] = (a20 * b03 - a21 * b01 + a22 * b00) * det;\r\n\r\n\t\t\treturn out;\r\n\t\t}\r\n\r\n\t\tstatic glMatrixMat4Multiply(out: Float64Array, a: Float64Array, b: Float64Array) {\r\n\t\t\tlet a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3];\r\n\t\t\tlet a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7];\r\n\t\t\tlet a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11];\r\n\t\t\tlet a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15];\r\n\r\n\t\t\t// Cache only the current line of the second matrix\r\n\t\t\tlet b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3];\r\n\t\t\tout[0] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\r\n\t\t\tout[1] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\r\n\t\t\tout[2] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\r\n\t\t\tout[3] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\r\n\r\n\t\t\tb0 = b[4];\r\n\t\t\tb1 = b[5];\r\n\t\t\tb2 = b[6];\r\n\t\t\tb3 = b[7];\r\n\t\t\tout[4] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\r\n\t\t\tout[5] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\r\n\t\t\tout[6] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\r\n\t\t\tout[7] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\r\n\r\n\t\t\tb0 = b[8];\r\n\t\t\tb1 = b[9];\r\n\t\t\tb2 = b[10];\r\n\t\t\tb3 = b[11];\r\n\t\t\tout[8] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\r\n\t\t\tout[9] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\r\n\t\t\tout[10] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\r\n\t\t\tout[11] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\r\n\r\n\t\t\tb0 = b[12];\r\n\t\t\tb1 = b[13];\r\n\t\t\tb2 = b[14];\r\n\t\t\tb3 = b[15];\r\n\t\t\tout[12] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\r\n\t\t\tout[13] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\r\n\t\t\tout[14] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\r\n\t\t\tout[15] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\r\n\t\t\treturn out;\r\n\t\t}\r\n\t}\r\n}\r\n","namespace pixi_projection {\r\n\t/**\r\n\t * The Euler angles, order is YZX. Except for projections (camera.lookEuler), its reversed XZY\r\n\t * @class\r\n\t * @namespace PIXI.projection\r\n\t * @param x pitch\r\n\t * @param y yaw\r\n\t * @param z roll\r\n\t * @constructor\r\n\t */\r\n\r\n\texport class ObservableEuler implements PIXI.PointLike, Euler {\r\n\t\tconstructor(public cb: any, public scope: any, x?: number, y?: number, z?: number) {\r\n\t\t\t/**\r\n\t\t\t * @member {number}\r\n\t\t\t * @default 0\r\n\t\t\t */\r\n\t\t\tthis._x = x || 0;\r\n\r\n\t\t\t/**\r\n\t\t\t * @member {number}\r\n\t\t\t * @default 0\r\n\t\t\t */\r\n\t\t\tthis._y = y || 0;\r\n\r\n\t\t\t/**\r\n\t\t\t * @member {number}\r\n\t\t\t * @default 0\r\n\t\t\t */\r\n\t\t\tthis._z = z || 0;\r\n\r\n\t\t\tthis.quaternion = new Float64Array(4);\r\n\t\t\tthis.quaternion[3] = 1;\r\n\r\n\t\t\tthis.update();\r\n\t\t}\r\n\r\n\t\t_quatUpdateId = -1;\r\n\t\t_quatDirtyId = 0;\r\n\r\n\t\tquaternion: Float64Array;\r\n\r\n\t\t_x: number;\r\n\t\t_y: number;\r\n\t\t_z: number;\r\n\t\t_sign: number = 1;\r\n\r\n\t\tget x() {\r\n\t\t\treturn this._x;\r\n\t\t}\r\n\r\n\t\tset x(value: number) {\r\n\t\t\tif (this._x !== value) {\r\n\t\t\t\tthis._x = value;\r\n\t\t\t\tthis._quatDirtyId++;\r\n\t\t\t\tthis.cb.call(this.scope);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tget y() {\r\n\t\t\treturn this._y;\r\n\t\t}\r\n\r\n\t\tset y(value: number) {\r\n\t\t\tif (this._y !== value) {\r\n\t\t\t\tthis._y = value;\r\n\t\t\t\tthis._quatDirtyId++;\r\n\t\t\t\tthis.cb.call(this.scope);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tget z() {\r\n\t\t\treturn this._z;\r\n\t\t}\r\n\r\n\t\tset z(value: number) {\r\n\t\t\tif (this._z !== value) {\r\n\t\t\t\tthis._z = value;\r\n\t\t\t\tthis._quatDirtyId++;\r\n\t\t\t\tthis.cb.call(this.scope);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tget pitch() {\r\n\t\t\treturn this._x;\r\n\t\t}\r\n\r\n\t\tset pitch(value: number) {\r\n\t\t\tif (this._x !== value) {\r\n\t\t\t\tthis._x = value;\r\n\t\t\t\tthis._quatDirtyId++;\r\n\t\t\t\tthis.cb.call(this.scope);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tget yaw() {\r\n\t\t\treturn this._y;\r\n\t\t}\r\n\r\n\t\tset yaw(value: number) {\r\n\t\t\tif (this._y !== value) {\r\n\t\t\t\tthis._y = value;\r\n\t\t\t\tthis._quatDirtyId++;\r\n\t\t\t\tthis.cb.call(this.scope);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tget roll() {\r\n\t\t\treturn this._z;\r\n\t\t}\r\n\r\n\t\tset roll(value: number) {\r\n\t\t\tif (this._z !== value) {\r\n\t\t\t\tthis._z = value;\r\n\t\t\t\tthis._quatDirtyId++;\r\n\t\t\t\tthis.cb.call(this.scope);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tset(x?: number, y?: number, z?: number) {\r\n\t\t\tconst _x = x || 0;\r\n\t\t\tconst _y = y || 0;\r\n\t\t\tconst _z = z || 0;\r\n\t\t\tif (this._x !== _x || this._y !== _y || this._z !== _z) {\r\n\t\t\t\tthis._x = _x;\r\n\t\t\t\tthis._y = _y;\r\n\t\t\t\tthis._z = _z;\r\n\t\t\t\tthis._quatDirtyId++;\r\n\t\t\t\tthis.cb.call(this.scope);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tcopy(euler: PIXI.PointLike) {\r\n\t\t\tconst _x = euler.x;\r\n\t\t\tconst _y = euler.y;\r\n\t\t\tconst _z = euler.z;\r\n\t\t\tif (this._x !== _x || this._y !== _y || this._z !== _z) {\r\n\t\t\t\tthis._x = _x;\r\n\t\t\t\tthis._y = _y;\r\n\t\t\t\tthis._z = _z;\r\n\t\t\t\tthis._quatDirtyId++;\r\n\t\t\t\tthis.cb.call(this.scope);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tclone() {\r\n\t\t\treturn new Euler(this._x, this._y, this._z);\r\n\t\t}\r\n\r\n\t\tupdate() {\r\n\t\t\tif (this._quatUpdateId === this._quatDirtyId) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tthis._quatUpdateId = this._quatDirtyId;\r\n\r\n\t\t\tconst c1 = Math.cos(this._x / 2);\r\n\t\t\tconst c2 = Math.cos(this._y / 2);\r\n\t\t\tconst c3 = Math.cos(this._z / 2);\r\n\r\n\t\t\tconst s = this._sign;\r\n\t\t\tconst s1 = s * Math.sin(this._x / 2);\r\n\t\t\tconst s2 = s * Math.sin(this._y / 2);\r\n\t\t\tconst s3 = s * Math.sin(this._z / 2);\r\n\r\n\t\t\tconst q = this.quaternion;\r\n\r\n\t\t\tq[0] = s1 * c2 * c3 + c1 * s2 * s3;\r\n\t\t\tq[1] = c1 * s2 * c3 - s1 * c2 * s3;\r\n\t\t\tq[2] = c1 * c2 * s3 + s1 * s2 * c3;\r\n\t\t\tq[3] = c1 * c2 * c3 - s1 * s2 * s3;\r\n\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}\r\n}\r\n","declare namespace PIXI {\r\n\texport interface PointLike {\r\n\t\tz: number;\r\n\t\tset(x?: number, y?: number, z?: number): void;\r\n\t}\r\n\r\n\texport interface Point {\r\n\t\tz: number;\r\n\t\tset(x?: number, y?: number, z?: number): void;\r\n\t}\r\n\r\n\texport interface ObservablePoint {\r\n\t\t_z: number;\r\n\t\tz: number;\r\n\t\tset(x?: number, y?: number, z?: number): void;\r\n\t}\r\n}\r\n\r\nnamespace pixi_projection {\r\n\tPIXI.Point.prototype.z = 0;\r\n\tPIXI.Point.prototype.set = function(x?: number, y?: number, z?: number) {\r\n\t\tthis.x = x || 0;\r\n\t\tthis.y = (y === undefined) ? this.x : (y || 0);\r\n\t\tthis.z = (y === undefined) ? this.x : (z || 0);\r\n\t};\r\n\r\n\tPIXI.Point.prototype.copy = function(p?: PIXI.PointLike) {\r\n\t\tthis.set(p.x, p.y, p.z);\r\n\t};\r\n\r\n\tPIXI.ObservablePoint.prototype._z = 0;\r\n\tPIXI.ObservablePoint.prototype.set = function(x?: number, y?: number, z?: number) {\r\n\t\tconst _x = x || 0;\r\n\t\tconst _y = (y === undefined) ? _x : (y || 0);\r\n\t\tconst _z = (y === undefined) ? _x : (z || 0);\r\n\r\n\t\tif (this._x !== _x || this._y !== _y || this._z !== _z)\r\n\t\t{\r\n\t\t\tthis._x = _x;\r\n\t\t\tthis._y = _y;\r\n\t\t\tthis._z = _z;\r\n\t\t\tthis.cb.call(this.scope);\r\n\t\t}\r\n\t};\r\n\r\n\tObject.defineProperty(PIXI.ObservablePoint.prototype, \"z\", {\r\n\t\tget: function() {\r\n\t\t\treturn this._z;\r\n\t\t},\r\n\t\tset: function(value) {\r\n\t\t\tif (this._z !== value)\r\n\t\t\t{\r\n\t\t\t\tthis._z = value;\r\n\t\t\t\tthis.cb.call(this.scope);\r\n\t\t\t}\r\n\t\t},\r\n\t\tenumerable: true,\r\n\t\tconfigurable: true\r\n\t});\r\n\r\n\tPIXI.ObservablePoint.prototype.copy = function(point?: PIXI.PointLike) {\r\n\t\tif (this._x !== point.x || this._y !== point.y || this._z !== point.z)\r\n\t\t{\r\n\t\t\tthis._x = point.x;\r\n\t\t\tthis._y = point.y;\r\n\t\t\tthis._z = point.z;\r\n\t\t\tthis.cb.call(this.scope);\r\n\t\t}\r\n\t};\r\n\r\n\texport class Point3d extends PIXI.Point {\r\n\t\tconstructor(x?: number, y?: number, z?: number) {\r\n\t\t\tsuper(x, y);\r\n\t\t\tthis.z = z;\r\n\t\t}\r\n\t}\r\n\r\n\t(PIXI as any).Point = Point3d;\r\n}\r\n","namespace pixi_projection {\r\n\tconst tempMat = new Matrix3d();\r\n\r\n\texport class Projection3d extends LinearProjection<Matrix3d> {\r\n\r\n\t\tconstructor(legacy: PIXI.TransformBase, enable?: boolean) {\r\n\t\t\tsuper(legacy, enable);\r\n\t\t\tthis.local = new Matrix3d();\r\n\t\t\tthis.world = new Matrix3d();\r\n\r\n\t\t\tthis.local.cacheInverse = true;\r\n\t\t\tthis.world.cacheInverse = true;\r\n\r\n\t\t\tthis.position._z = 0;\r\n\t\t\tthis.scale._z = 1;\r\n\t\t\tthis.pivot._z = 0;\r\n\t\t}\r\n\r\n\t\tcameraMatrix: Matrix3d = null;\r\n\r\n\t\t_cameraMode = false;\r\n\r\n\t\tget cameraMode() {\r\n\t\t\treturn this._cameraMode;\r\n\t\t}\r\n\r\n\t\tset cameraMode(value: boolean) {\r\n\t\t\tif (this._cameraMode === value) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tthis._cameraMode = value;\r\n\r\n\t\t\tthis.euler._sign = this._cameraMode ? -1 : 1;\r\n\t\t\tthis.euler._quatDirtyId++;\r\n\r\n\t\t\tif (value) {\r\n\t\t\t\tthis.cameraMatrix = new Matrix3d();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tposition = new PIXI.ObservablePoint(this.onChange, this, 0, 0);\r\n\t\tscale = new PIXI.ObservablePoint(this.onChange, this, 1, 1);\r\n\t\teuler = new ObservableEuler(this.onChange, this, 0, 0, 0);\r\n\t\tpivot = new PIXI.ObservablePoint(this.onChange, this, 0, 0);\r\n\r\n\t\tonChange() {\r\n\t\t\tthis._projID++;\r\n\t\t}\r\n\r\n\t\tclear() {\r\n\t\t\tif (this.cameraMatrix) {\r\n\t\t\t\tthis.cameraMatrix.identity();\r\n\t\t\t}\r\n\t\t\tthis.position.set(0, 0, 0);\r\n\t\t\tthis.scale.set(1, 1, 1);\r\n\t\t\tthis.euler.set(0, 0, 0);\r\n\t\t\tthis.pivot.set(0, 0, 0);\r\n\t\t\tsuper.clear();\r\n\t\t}\r\n\r\n\t\tupdateLocalTransform(lt: PIXI.Matrix) {\r\n\t\t\tif (this._projID === 0) {\r\n\t\t\t\tthis.local.copyFrom(lt);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tconst matrix = this.local;\r\n\t\t\tconst euler = this.euler;\r\n\t\t\tconst pos = this.position;\r\n\t\t\tconst scale = this.scale;\r\n\t\t\tconst pivot = this.pivot;\r\n\r\n\t\t\teuler.update();\r\n\r\n\t\t\tif (!this.cameraMode) {\r\n\t\t\t\tmatrix.setToRotationTranslationScale(euler.quaternion, pos._x, pos._y, pos._z, scale._x, scale._y, scale._z);\r\n\t\t\t\tmatrix.translate(-pivot._x, -pivot._y, -pivot._z);\r\n\t\t\t\tmatrix.setToMultLegacy(lt, matrix);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tmatrix.setToMultLegacy(lt, this.cameraMatrix);\r\n\t\t\tmatrix.translate(pivot._x, pivot._y, pivot._z);\r\n\t\t\tmatrix.scale(1.0 / scale._x, 1.0 / scale._y, 1.0 / scale._z);\r\n\t\t\ttempMat.setToRotationTranslationScale(euler.quaternion, 0, 0, 0, 1, 1, 1);\r\n\t\t\tmatrix.setToMult(matrix, tempMat);\r\n\t\t\tmatrix.translate(-pos._x, -pos._y, -pos._z);\r\n\r\n\t\t\tthis.local._dirtyId++;\r\n\t\t}\r\n\t}\r\n}\r\n","namespace pixi_projection {\r\n\texport class Mesh3d extends PIXI.mesh.Mesh {\r\n\t\tconstructor(texture: PIXI.Texture, vertices?: Float32Array, uvs?: Float32Array,\r\n\t\t indices?: Uint16Array, drawMode?: number) {\r\n\t\t\tsuper(texture, vertices, uvs, indices, drawMode);\r\n\t\t\tthis.proj = new Projection3d(this.transform);\r\n\t\t\tthis.pluginName = 'mesh2d';\r\n\t\t}\r\n\r\n\t\tproj: Projection3d;\r\n\r\n\t\tget worldTransform() {\r\n\t\t\treturn this.proj.affine ? this.transform.worldTransform : this.proj.world as any;\r\n\t\t}\r\n\r\n\t\ttoLocal<T extends PIXI.PointLike>(position: PIXI.PointLike, from?: PIXI.DisplayObject,\r\n\t\t point?: T, skipUpdate?: boolean,\r\n\t\t step = TRANSFORM_STEP.ALL): T {\r\n\t\t\treturn container3dToLocal.call(this, position, from, point, skipUpdate, step);\r\n\t\t}\r\n\r\n\t\tisFrontFace(forceUpdate?: boolean) {\r\n\t\t\treturn container3dIsFrontFace.call(this, forceUpdate);\r\n\t\t}\r\n\r\n\t\tgetDepth(forceUpdate?: boolean) {\r\n\t\t\treturn container3dGetDepth.call(this, forceUpdate);\r\n\t\t}\r\n\r\n\t\tget position3d(): PIXI.PointLike {\r\n\t\t\treturn this.proj.position;\r\n\t\t}\r\n\t\tget scale3d(): PIXI.PointLike {\r\n\t\t\treturn this.proj.scale;\r\n\t\t}\r\n\t\tget euler(): Euler {\r\n\t\t\treturn this.proj.euler;\r\n\t\t}\r\n\t\tget pivot3d(): PIXI.PointLike {\r\n\t\t\treturn this.proj.pivot;\r\n\t\t}\r\n\t\tset position3d(value: PIXI.PointLike) {\r\n\t\t\tthis.proj.position.copy(value);\r\n\t\t}\r\n\t\tset scale3d(value: PIXI.PointLike) {\r\n\t\t\tthis.proj.scale.copy(value);\r\n\t\t}\r\n\t\tset euler(value: Euler) {\r\n\t\t\tthis.proj.euler.copy(value);\r\n\t\t}\r\n\t\tset pivot3d(value: PIXI.PointLike) {\r\n\t\t\tthis.proj.pivot.copy(value);\r\n\t\t}\r\n\t}\r\n}\r\n","namespace pixi_projection {\r\n\t/**\r\n\t * Same as Sprite2d, but\r\n\t * 1. uses Matrix3d in proj\r\n\t * 2. does not render if at least one vertex is behind camera\r\n\t */\r\n\texport class Sprite3d extends PIXI.Sprite {\r\n\t\tconstructor(texture: PIXI.Texture) {\r\n\t\t\tsuper(texture);\r\n\t\t\tthis.proj = new Projection3d(this.transform);\r\n\t\t\tthis.pluginName = 'sprite2d';\r\n\t\t\tthis.vertexData = new Float32Array(12);\r\n\t\t}\r\n\r\n\t\tproj: Projection3d;\r\n\t\tculledByFrustrum = false;\r\n\t\ttrimmedCulledByFrustrum = false;\r\n\r\n\t\t_calculateBounds() {\r\n\t\t\tthis.calculateVertices();\r\n\t\t\tif (this.culledByFrustrum) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tthis.calculateTrimmedVertices();\r\n\t\t\tif (!this.trimmedCulledByFrustrum) {\r\n\t\t\t\tthis._bounds.addQuad(this.vertexTrimmedData as any);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tcalculateVertices() {\r\n\t\t\tif (this.proj._affine) {\r\n\t\t\t\tif (this.vertexData.length != 8) {\r\n\t\t\t\t\tthis.vertexData = new Float32Array(8);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tsuper.calculateVertices();\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif (this.vertexData.length != 12) {\r\n\t\t\t\tthis.vertexData = new Float32Array(12);\r\n\t\t\t}\r\n\r\n\t\t\tconst wid = (this.transform as any)._worldID;\r\n\t\t\tconst tuid = (this._texture as any)._updateID;\r\n\t\t\tif (this._transformID === wid && this._textureID === tuid) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tthis._transformID = wid;\r\n\t\t\tthis._textureID = tuid;\r\n\r\n\t\t\tconst texture = this._texture;\r\n\t\t\tconst wt = this.proj.world.mat4;\r\n\t\t\tconst vertexData = this.vertexData;\r\n\t\t\tconst trim = texture.trim;\r\n\t\t\tconst orig = texture.orig;\r\n\t\t\tconst anchor = this._anchor;\r\n\r\n\t\t\tlet w0 = 0;\r\n\t\t\tlet w1 = 0;\r\n\t\t\tlet h0 = 0;\r\n\t\t\tlet h1 = 0;\r\n\r\n\t\t\tif (trim) {\r\n\t\t\t\tw1 = trim.x - (anchor._x * orig.width);\r\n\t\t\t\tw0 = w1 + trim.width;\r\n\r\n\t\t\t\th1 = trim.y - (anchor._y * orig.height);\r\n\t\t\t\th0 = h1 + trim.height;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tw1 = -anchor._x * orig.width;\r\n\t\t\t\tw0 = w1 + orig.width;\r\n\r\n\t\t\t\th1 = -anchor._y * orig.height;\r\n\t\t\t\th0 = h1 + orig.height;\r\n\t\t\t}\r\n\r\n\t\t\tlet culled = false;\r\n\r\n\t\t\tlet z;\r\n\r\n\t\t\tvertexData[0] = (wt[0] * w1) + (wt[4] * h1) + wt[12];\r\n\t\t\tvertexData[1] = (wt[1] * w1) + (wt[5] * h1) + wt[13];\r\n\t\t\tz = (wt[2] * w1) + (wt[6] * h1) + wt[14];\r\n\t\t\tvertexData[2] = (wt[3] * w1) + (wt[7] * h1) + wt[15];\r\n\t\t\tculled = culled || z < 0;\r\n\r\n\t\t\tvertexData[3] = (wt[0] * w0) + (wt[4] * h1) + wt[12];\r\n\t\t\tvertexData[4] = (wt[1] * w0) + (wt[5] * h1) + wt[13];\r\n\t\t\tz = (wt[2] * w0) + (wt[6] * h1) + wt[14];\r\n\t\t\tvertexData[5] = (wt[3] * w0) + (wt[7] * h1) + wt[15];\r\n\t\t\tculled = culled || z < 0;\r\n\r\n\t\t\tvertexData[6] = (wt[0] * w0) + (wt[4] * h0) + wt[12];\r\n\t\t\tvertexData[7] = (wt[1] * w0) + (wt[5] * h0) + wt[13];\r\n\t\t\tz = (wt[2] * w0) + (wt[6] * h0) + wt[14];\r\n\t\t\tvertexData[8] = (wt[3] * w0) + (wt[7] * h0) + wt[15];\r\n\t\t\tculled = culled || z < 0;\r\n\r\n\t\t\tvertexData[9] = (wt[0] * w1) + (wt[4] * h0) + wt[12];\r\n\t\t\tvertexData[10] = (wt[1] * w1) + (wt[5] * h0) + wt[13];\r\n\t\t\tz = (wt[2] * w1) + (wt[6] * h0) + wt[14];\r\n\t\t\tvertexData[11] = (wt[3] * w1) + (wt[7] * h0) + wt[15];\r\n\t\t\tculled = culled || z < 0;\r\n\r\n\t\t\tthis.culledByFrustrum = culled;\r\n\t\t}\r\n\r\n\t\tcalculateTrimmedVertices() {\r\n\t\t\tif (this.proj._affine) {\r\n\t\t\t\tsuper.calculateTrimmedVertices();\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tconst wid = (this.transform as any)._worldID;\r\n\t\t\tconst tuid = (this._texture as any)._updateID;\r\n\t\t\tif (!this.vertexTrimmedData) {\r\n\t\t\t\tthis.vertexTrimmedData = new Float32Array(8);\r\n\t\t\t}\r\n\t\t\telse if (this._transformTrimmedID === wid && this._textureTrimmedID === tuid) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tthis._transformTrimmedID = wid;\r\n\t\t\tthis._textureTrimmedID = tuid;\r\n\r\n\t\t\t// lets do some special trim code!\r\n\t\t\tconst texture = this._texture;\r\n\t\t\tconst vertexData = this.vertexTrimmedData;\r\n\t\t\tconst orig = texture.orig;\r\n\t\t\tconst anchor = this._anchor;\r\n\r\n\t\t\t// lets calculate the new untrimmed bounds..\r\n\t\t\tconst wt = this.proj.world.mat4;\r\n\r\n\t\t\tconst w1 = -anchor._x * orig.width;\r\n\t\t\tconst w0 = w1 + orig.width;\r\n\r\n\t\t\tconst h1 = -anchor._y * orig.height;\r\n\t\t\tconst h0 = h1 + orig.height;\r\n\r\n\t\t\tlet culled = false;\r\n\r\n\t\t\tlet w = 1.0 / (wt[3] * w1 + wt[7] * h1 + wt[15]);\r\n\t\t\tvertexData[0] = w * ((wt[0] * w1) + (wt[4] * h1) + wt[12]);\r\n\t\t\tvertexData[1] = w * ((wt[1] * w1) + (wt[5] * h1) + wt[13]);\r\n\t\t\tlet z = (wt[2] * w1) + (wt[6] * h1) + wt[14];\r\n\t\t\tculled = culled || z < 0;\r\n\r\n\t\t\tw = 1.0 / (wt[3] * w0 + wt[7] * h1 + wt[15]);\r\n\t\t\tvertexData[2] = w * ((wt[0] * w0) + (wt[4] * h1) + wt[12]);\r\n\t\t\tvertexData[3] = w * ((wt[1] * w0) + (wt[5] * h1) + wt[13]);\r\n\t\t\tz = (wt[2] * w0) + (wt[6] * h1) + wt[14];\r\n\t\t\tculled = culled || z < 0;\r\n\r\n\t\t\tw = 1.0 / (wt[3] * w0 + wt[7] * h0 + wt[15]);\r\n\t\t\tvertexData[4] = w * ((wt[0] * w0) + (wt[4] * h0) + wt[12]);\r\n\t\t\tvertexData[5] = w * ((wt[1] * w0) + (wt[5] * h0) + wt[13]);\r\n\t\t\tz = (wt[2] * w0) + (wt[6] * h0) + wt[14];\r\n\t\t\tculled = culled || z < 0;\r\n\r\n\t\t\tw = 1.0 / (wt[3] * w1 + wt[7] * h0 + wt[15]);\r\n\t\t\tvertexData[6] = w * ((wt[0] * w1) + (wt[4] * h0) + wt[12]);\r\n\t\t\tvertexData[7] = w * ((wt[1] * w1) + (wt[5] * h0) + wt[13]);\r\n\t\t\tz = (wt[2] * w1) + (wt[6] * h0) + wt[14];\r\n\t\t\tculled = culled || z < 0;\r\n\r\n\t\t\tthis.trimmedCulledByFrustrum = culled;\r\n\t\t}\r\n\r\n\t\t_renderWebGL(renderer: PIXI.WebGLRenderer) {\r\n\t\t\tthis.calculateVertices();\r\n\r\n\t\t\tif (this.culledByFrustrum) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\trenderer.setObjectRenderer(renderer.plugins[this.pluginName]);\r\n\t\t\trenderer.plugins[this.pluginName].render(this);\r\n\t\t}\r\n\r\n\t\tcontainsPoint(point: PIXI.PointLike) {\r\n\t\t\tif (this.culledByFrustrum) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\treturn super.containsPoint(point as any);\r\n\t\t}\r\n\r\n\t\tget worldTransform() {\r\n\t\t\treturn this.proj.affine ? this.transform.worldTransform : this.proj.world as any;\r\n\t\t}\r\n\r\n\t\ttoLocal<T extends PIXI.PointLike>(position: PIXI.PointLike, from?: PIXI.DisplayObject,\r\n\t\t point?: T, skipUpdate?: boolean,\r\n\t\t step = TRANSFORM_STEP.ALL): T {\r\n\t\t\treturn container3dToLocal.call(this, position, from, point, skipUpdate, step);\r\n\t\t}\r\n\t\t\r\n\t\tisFrontFace(forceUpdate?: boolean) {\r\n\t\t\treturn container3dIsFrontFace.call(this, forceUpdate);\r\n\t\t}\r\n\r\n\t\tgetDepth(forceUpdate?: boolean) {\r\n\t\t\treturn container3dGetDepth.call(this, forceUpdate);\r\n\t\t}\r\n\r\n\t\tget position3d(): PIXI.PointLike {\r\n\t\t\treturn this.proj.position;\r\n\t\t}\r\n\t\tget scale3d(): PIXI.PointLike {\r\n\t\t\treturn this.proj.scale;\r\n\t\t}\r\n\t\tget euler(): Euler {\r\n\t\t\treturn this.proj.euler;\r\n\t\t}\r\n\t\tget pivot3d(): PIXI.PointLike {\r\n\t\t\treturn this.proj.pivot;\r\n\t\t}\r\n\t\tset position3d(value: PIXI.PointLike) {\r\n\t\t\tthis.proj.position.copy(value);\r\n\t\t}\r\n\t\tset scale3d(value: PIXI.PointLike) {\r\n\t\t\tthis.proj.scale.copy(value);\r\n\t\t}\r\n\t\tset euler(value: Euler) {\r\n\t\t\tthis.proj.euler.copy(value);\r\n\t\t}\r\n\t\tset pivot3d(value: PIXI.PointLike) {\r\n\t\t\tthis.proj.pivot.copy(value);\r\n\t\t}\r\n\t}\r\n}\r\n","namespace pixi_projection {\r\n export class Text3d extends PIXI.Text {\r\n constructor(text?: string, style?: PIXI.TextStyle, canvas?: HTMLCanvasElement) {\r\n super(text, style, canvas);\r\n this.proj = new Projection3d(this.transform);\r\n this.pluginName = 'sprite2d';\r\n this.vertexData = new Float32Array(12);\r\n }\r\n\r\n proj: Projection3d;\r\n\r\n get worldTransform() {\r\n\t return this.proj.affine ? this.transform.worldTransform : this.proj.world as any;\r\n }\r\n\r\n\t toLocal<T extends PIXI.PointLike>(position: PIXI.PointLike, from?: PIXI.DisplayObject,\r\n\t point?: T, skipUpdate?: boolean,\r\n\t step = TRANSFORM_STEP.ALL): T {\r\n\t\t return container3dToLocal.call(this, position, from, point, skipUpdate, step);\r\n\t }\r\n\r\n\t isFrontFace(forceUpdate?: boolean) {\r\n\t\t return container3dIsFrontFace.call(this, forceUpdate);\r\n\t }\r\n\r\n\t getDepth(forceUpdate?: boolean) {\r\n\t\t return container3dGetDepth.call(this, forceUpdate);\r\n\t }\r\n\r\n\t get position3d(): PIXI.PointLike {\r\n\t\t return this.proj.position;\r\n\t }\r\n\t get scale3d(): PIXI.PointLike {\r\n\t\t return this.proj.scale;\r\n\t }\r\n\t get euler(): Euler {\r\n\t\t return this.proj.euler;\r\n\t }\r\n\t get pivot3d(): PIXI.PointLike {\r\n\t\t return this.proj.pivot;\r\n\t }\r\n\t set position3d(value: PIXI.PointLike) {\r\n\t\t this.proj.position.copy(value);\r\n\t }\r\n\t set scale3d(value: PIXI.PointLike) {\r\n\t\t this.proj.scale.copy(value);\r\n\t }\r\n\t set euler(value: Euler) {\r\n\t\t this.proj.euler.copy(value);\r\n\t }\r\n\t set pivot3d(value: PIXI.PointLike) {\r\n\t\t this.proj.pivot.copy(value);\r\n\t }\r\n }\r\n\r\n Text3d.prototype.calculateVertices = Sprite3d.prototype.calculateVertices;\r\n (Text3d.prototype as any).calculateTrimmedVertices = Sprite3d.prototype.calculateTrimmedVertices;\r\n\t(Text3d.prototype as any)._calculateBounds = Sprite3d.prototype._calculateBounds;\r\n\t(Text3d.prototype as any).containsPoint = Sprite3d.prototype.containsPoint;\r\n\t(Text3d.prototype as any)._renderWebGL = Sprite3d.prototype._renderWebGL;\r\n}\r\n","declare module PIXI {\r\n interface Container {\r\n convertTo3d(): void;\r\n convertSubtreeTo3d(): void;\r\n }\r\n}\r\n\r\nnamespace pixi_projection {\r\n\r\n\tconst containerProps: any = {\r\n\t\tworldTransform: {\r\n\t\t\tget: container3dWorldTransform,\r\n\t\t\tenumerable: true,\r\n\t\t\tconfigurable: true\r\n\t\t},\r\n\t\tposition3d: {\r\n\t\t\tget: function() { return this.proj.position },\r\n\t\t\tset: function(value: any) { this.proj.position.copy(value) }\r\n\t\t},\r\n\t\tscale3d: {\r\n\t\t\tget: function() { return this.proj.scale },\r\n\t\t\tset: function(value: any) { this.proj.scale.copy(value) }\r\n\t\t},\r\n\t\tpivot3d: {\r\n\t\t\tget: function() { return this.proj.pivot },\r\n\t\t\tset: function(value: any) { this.proj.pivot.copy(value) }\r\n\t\t},\r\n\t\teuler: {\r\n\t\t\tget: function() { return this.proj.euler },\r\n\t\t\tset: function(value: any) { this.proj.euler.copy(value) }\r\n\t\t}\r\n\t};\r\n\r\n\tfunction convertTo3d() {\r\n\t\tif (this.proj) return;\r\n\t\tthis.proj = new Projection3d(this.transform);\r\n\t\tthis.toLocal = Container3d.prototype.toLocal;\r\n\t\tthis.isFrontFace = Container3d.prototype.isFrontFace;\r\n\t\tthis.getDepth = Container3d.prototype.getDepth;\r\n\t\tObject.defineProperties(this, containerProps);\r\n\t}\r\n\r\n\t(PIXI as any).Container.prototype.convertTo3d = convertTo3d;\r\n\r\n (PIXI as any).Sprite.prototype.convertTo3d = function () {\r\n if (this.proj) return;\r\n this.calculateVertices = Sprite3d.prototype.calculateVertices;\r\n this.calculateTrimmedVertices = Sprite3d.prototype.calculateTrimmedVertices;\r\n\t this._calculateBounds = Sprite3d.prototype._calculateBounds;\r\n\t this.containsPoint = Sprite3d.prototype.containsPoint;\r\n\t this.pluginName = 'sprite2d';\r\n\t this.vertexData = new Float32Array(12);\r\n\t\tconvertTo3d.call(this);\r\n };\r\n\r\n\r\n\t(PIXI as any).mesh.Mesh.prototype.convertTo3d = function () {\r\n\t\tif (this.proj) return;\r\n\t\tthis.pluginName = 'mesh2d';\r\n\t\tconvertTo3d.call(this);\r\n\r\n\t};\r\n\r\n (PIXI as any).Container.prototype.convertSubtreeTo3d = function () {\r\n this.convertTo3d();\r\n for (let i = 0; i < this.children.length; i++) {\r\n this.children[i].convertSubtreeTo3d();\r\n }\r\n };\r\n}\r\n"]}