1 line
58 KiB
Plaintext
Executable File
1 line
58 KiB
Plaintext
Executable File
{"version":3,"file":"pixi-layers.js","sourceRoot":"","sources":["../src/ContainerMixin.ts","../src/DisplayObjectMixin.ts","../src/Group.ts","../src/InteractionManagerMixin.ts","../src/Layer.ts","../src/Stage.ts","../src/renderers.ts","../src/xporter.ts"],"names":[],"mappings":"AAOA,IAAU,YAAY,CA2CrB;AA3CD,WAAU,YAAY;IACjB,MAAc,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE;QAC7C,WAAW,EAAE,UAAU,QAA4B;YAC/C,IAAI,IAAI,CAAC,kBAAkB,IAAI,IAAI,CAAC,kBAAkB,IAAI,QAAQ,CAAC,YAAY,EAAE;gBAC7E,OAAO;aACV;YAED,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;gBACf,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC;gBACtB,OAAO;aACV;YAED,IAAI,CAAC,YAAY,GAAG,QAAQ,CAAC,eAAe,EAAE,CAAC;YAG/C,IAAI,IAAI,CAAC,UAAU,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;gBAC1C,OAAO;aACV;YAED,IAAI,CAAC,oBAAoB,CAAC,QAAQ,CAAC,CAAC;QACxC,CAAC;QACD,YAAY,EAAE,UAAU,QAA6B;YACjD,IAAI,IAAI,CAAC,kBAAkB,IAAI,IAAI,CAAC,kBAAkB,IAAI,QAAQ,CAAC,YAAY,EAAE;gBAC7E,OAAO;aACV;YAED,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;gBACf,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC;gBACtB,OAAO;aACV;YAED,IAAI,CAAC,YAAY,GAAG,QAAQ,CAAC,eAAe,EAAE,CAAC;YAG/C,IAAI,IAAI,CAAC,UAAU,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;gBAC1C,OAAO;aACV;YAED,IAAI,CAAC,qBAAqB,CAAC,QAA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W,EAAE,CAAA;aACzC;YACD,IAAI,CAAC,UAAU,CAAC,aAAa,EAAE,aAAa,EAAE,KAAK,EAAE,SAAS,EAAE,mBAAmB,CAAC,CAAC;QACzF,CAAC;KACJ,CAAC,CAAC;AACP,CAAC,EA5CS,YAAY,KAAZ,YAAY,QA4CrB;AC7DD,IAAU,YAAY,CAErB;AAFD,WAAU,YAAY;IACpB,IAAY,CAAC,OAAO,GAAG,YAAY,CAAC;AACtC,CAAC,EAFS,YAAY,KAAZ,YAAY,QAErB","sourcesContent":["declare namespace PIXI {\r\n export interface Container {\r\n containerRenderWebGL(renderer: WebGLRenderer): void;\r\n containerRenderCanvas(renderer: CanvasRenderer): void;\r\n }\r\n}\r\n\r\nnamespace pixi_display {\r\n (Object as any).assign(PIXI.Container.prototype, {\r\n renderWebGL: function (renderer: PIXI.WebGLRenderer): void {\r\n if (this._activeParentLayer && this._activeParentLayer != renderer._activeLayer) {\r\n return;\r\n }\r\n\r\n if (!this.visible) {\r\n this.displayOrder = 0;\r\n return;\r\n }\r\n\r\n this.displayOrder = renderer.incDisplayOrder();\r\n\r\n // if the object is not visible or the alpha is 0 then no need to render this element\r\n if (this.worldAlpha <= 0 || !this.renderable) {\r\n return;\r\n }\r\n\r\n this.containerRenderWebGL(renderer);\r\n },\r\n renderCanvas: function (renderer: PIXI.CanvasRenderer): void {\r\n if (this._activeParentLayer && this._activeParentLayer != renderer._activeLayer) {\r\n return;\r\n }\r\n\r\n if (!this.visible) {\r\n this.displayOrder = 0;\r\n return;\r\n }\r\n\r\n this.displayOrder = renderer.incDisplayOrder();\r\n\r\n // if the object is not visible or the alpha is 0 then no need to render this element\r\n if (this.worldAlpha <= 0 || !this.renderable) {\r\n return;\r\n }\r\n\r\n this.containerRenderCanvas(renderer);\r\n },\r\n containerRenderWebGL: PIXI.Container.prototype.renderWebGL,\r\n containerRenderCanvas: PIXI.Container.prototype.renderCanvas\r\n });\r\n}","declare namespace PIXI {\r\n export interface DisplayObject {\r\n parentGroup: pixi_display.Group,\r\n\r\n /**\r\n * Object will be rendered\r\n *\r\n * please specify it to handle zOrder and zIndex\r\n *\r\n * its always null for layers\r\n *\r\n */\r\n parentLayer: pixi_display.Layer,\r\n\r\n\r\n _activeParentLayer: pixi_display.Layer,\r\n /**\r\n * zOrder is floating point number, distance between screen and object\r\n * Objects with largest zOrder will appear first in their Layer, if zOrder sorting is enabled\r\n */\r\n zOrder: number,\r\n\r\n /**\r\n * zIndex is integer number, the number of layer\r\n * Objects with least zOrder appear first in their Layer, if zIndex sorting is enabled\r\n */\r\n zIndex: number,\r\n\r\n /**\r\n * updateOrder is calculated by DisplayList, it is required for sorting inside DisplayGroup\r\n */\r\n updateOrder: number,\r\n\r\n /**\r\n * displayOrder is calculated by render, it is required for interaction\r\n */\r\n displayOrder: number,\r\n\r\n /**\r\n * Stage will look inside for elements that can be re-arranged, if this flag is true\r\n * Make it false for ParticleContainer\r\n */\r\n layerableChildren: boolean\r\n }\r\n}\r\n\r\n(Object as any).assign(PIXI.DisplayObject.prototype, {\r\n parentLayer: null,\r\n _activeParentLayer: null,\r\n parentGroup: null,\r\n zOrder: 0,\r\n zIndex: 0,\r\n updateOrder: 0,\r\n displayOrder: 0,\r\n layerableChildren: true\r\n});\r\n\r\nif (PIXI.particles && PIXI.particles.ParticleContainer) {\r\n PIXI.particles.ParticleContainer.prototype.layerableChildren = false;\r\n}\r\nelse if ((PIXI as any).ParticleContainer) {\r\n (PIXI as any).ParticleContainer.prototype.layerableChildren = false;\r\n}\r\n","/**\r\n * A shared component for multiple DisplayObject's allows to specify rendering order for them\r\n *\r\n * @class\r\n * @extends EventEmitter\r\n * @memberof PIXI\r\n * @param zIndex {number} z-index for display group\r\n * @param sorting {boolean | Function} if you need to sort elements inside, please provide function that will set displayObject.zOrder accordingly\r\n */\r\n\r\nnamespace pixi_display {\r\n import DisplayObject = PIXI.DisplayObject;\r\n import Container = PIXI.Container;\r\n import utils = PIXI.utils;\r\n import WebGLRenderer = PIXI.WebGLRenderer;\r\n import CanvasRenderer = PIXI.CanvasRenderer;\r\n\r\n export class Group extends utils.EventEmitter {\r\n static _layerUpdateId = 0;\r\n\r\n computedChildren: Array<DisplayObject>;\r\n\r\n _activeLayer: Layer = null;\r\n\r\n _activeStage: Stage = null;\r\n\r\n _activeChildren: Array<DisplayObject> = [];\r\n\r\n _lastUpdateId = -1;\r\n\r\n useRenderTexture: boolean = false;\r\n useDoubleBuffer: boolean = false;\r\n sortPriority: number = 0;\r\n clearColor : ArrayLike<number> = new Float32Array([0, 0, 0, 0]);\r\n\r\n //TODO: handle orphan groups\r\n //TODO: handle groups that don't want to be drawn in parent\r\n canDrawWithoutLayer = false;\r\n canDrawInParentStage = true;\r\n\r\n /**\r\n * default zIndex value for layers that are created with this Group\r\n * @type {number}\r\n */\r\n zIndex = 0;\r\n\r\n enableSort = false;\r\n\r\n constructor(zIndex: number, sorting: boolean | Function) {\r\n super();\r\n\r\n this.zIndex = zIndex;\r\n\r\n this.enableSort = !!sorting;\r\n\r\n if (typeof sorting === 'function') {\r\n this.on('sort', sorting);\r\n }\r\n }\r\n\r\n _tempResult: Array<DisplayObject> = [];\r\n _tempZero: Array<DisplayObject> = [];\r\n\r\n useZeroOptimization: boolean = false;\r\n\r\n doSort(layer: Layer, sorted: Array<DisplayObject>) {\r\n if ((this.listeners as any)('sort', true)) {\r\n for (let i = 0; i < sorted.length; i++) {\r\n this.emit('sort', sorted[i]);\r\n }\r\n }\r\n if (this.useZeroOptimization) {\r\n this.doSortWithZeroOptimization(layer, sorted);\r\n } else {\r\n sorted.sort(Group.compareZIndex);\r\n }\r\n }\r\n\r\n static compareZIndex(a: DisplayObject, b: DisplayObject) {\r\n if (a.zIndex !== b.zIndex) {\r\n return a.zIndex - b.zIndex;\r\n }\r\n if (a.zOrder > b.zOrder) {\r\n return -1;\r\n }\r\n if (a.zOrder < b.zOrder) {\r\n return 1;\r\n }\r\n return a.updateOrder - b.updateOrder;\r\n }\r\n\r\n doSortWithZeroOptimization(layer: Layer, sorted: Array<DisplayObject>) {\r\n throw new Error(\"not implemented yet\");\r\n //default sorting\r\n // const result = this._tempResult;\r\n // const zero = this._tempZero;\r\n // for (let i = 0; i < sorted.length; i++) {\r\n // const elem = sorted[i];\r\n // if (elem.zIndex == 0 && elem.zOrder == 0) {\r\n // zero.push(elem);\r\n // } else {\r\n // result.push(elem);\r\n // }\r\n // }\r\n // if (zero.length == 0) {\r\n // sorted.sort(Group.compareZOrder);\r\n // } else {\r\n // result.sort(Group.compareZOrder);\r\n // let j = 0;\r\n // for (let i = 0; i < result.length; i++) {\r\n // const elem = result[i];\r\n // if (elem.zIndex < 0 && elem.zIndex == 0 && elem.zOrder > 0) {\r\n // sorted[j++] = result[i]++;\r\n // }\r\n // }\r\n // }\r\n }\r\n\r\n /**\r\n * clears temporary variables\r\n */\r\n clear() {\r\n this._activeLayer = null;\r\n this._activeStage = null;\r\n this._activeChildren.length = 0;\r\n }\r\n\r\n /**\r\n * used only by displayList before sorting takes place\r\n */\r\n addDisplayObject(stage: Stage, displayObject: DisplayObject) {\r\n this.check(stage);\r\n displayObject._activeParentLayer = this._activeLayer;\r\n if (this._activeLayer) {\r\n this._activeLayer._activeChildren.push(displayObject);\r\n } else {\r\n this._activeChildren.push(displayObject);\r\n }\r\n }\r\n\r\n /**\r\n * called when corresponding layer is found in current stage\r\n * @param stage\r\n * @param layer\r\n */\r\n foundLayer(stage: Stage, layer: Layer) {\r\n this.check(stage);\r\n if (this._activeLayer != null) {\r\n Group.conflict();\r\n }\r\n this._activeLayer = layer;\r\n this._activeStage = stage;\r\n }\r\n\r\n /**\r\n * called after stage finished the work\r\n * @param stage\r\n */\r\n foundStage(stage: Stage) {\r\n if (!this._activeLayer && !this.canDrawInParentStage) {\r\n this.clear();\r\n }\r\n }\r\n\r\n check(stage: Stage) {\r\n if (this._lastUpdateId < Group._layerUpdateId) {\r\n this._lastUpdateId = Group._layerUpdateId;\r\n this.clear();\r\n this._activeStage = stage;\r\n } else if (this.canDrawInParentStage) {\r\n let current = this._activeStage;\r\n while (current && current != stage) {\r\n current = current._activeParentStage;\r\n }\r\n this._activeStage = current;\r\n if (current == null) {\r\n this.clear();\r\n return\r\n }\r\n }\r\n }\r\n\r\n static _lastLayerConflict = 0;\r\n\r\n static conflict() {\r\n if (Group._lastLayerConflict + 5000 < Date.now()) {\r\n Group._lastLayerConflict = Date.now();\r\n console.log(\"PIXI-display plugin found two layers with the same group in one stage - that's not healthy. Please place a breakpoint here and debug it\");\r\n }\r\n }\r\n }\r\n}\r\n","//TODO: add maxDisplayOrder for displayObjects and use it to speed up the interaction here\r\n\r\n/**\r\n * @mixin\r\n */\r\n\r\nnamespace pixi_display {\r\n import InteractionManager = PIXI.interaction.InteractionManager;\r\n import DisplayObject = PIXI.DisplayObject;\r\n import Point = PIXI.Point;\r\n import Graphics = PIXI.Graphics;\r\n import Container = PIXI.Container;\r\n import InteractionEvent = PIXI.interaction.InteractionEvent;\r\n (Object as any).assign(InteractionManager.prototype, {\r\n _queue: [[] as Array<DisplayObject>, [] as Array<DisplayObject>],\r\n /**\r\n * This is private recursive copy of processInteractive\r\n */\r\n _displayProcessInteractive: function (point: Point, displayObject: DisplayObject, hitTestOrder: number, interactive: boolean, outOfMask: boolean): number {\r\n if (!displayObject || !displayObject.visible) {\r\n return 0;\r\n }\r\n\r\n // Took a little while to rework this function correctly! But now it is done and nice and optimised. ^_^\r\n //\r\n // This function will now loop through all objects and then only hit test the objects it HAS to, not all of them. MUCH faster..\r\n // An object will be hit test if the following is true:\r\n //\r\n // 1: It is interactive.\r\n // 2: It belongs to a parent that is interactive AND one of the parents children have not already been hit.\r\n //\r\n // As another little optimisation once an interactive object has been hit we can carry on through the scenegraph, but we know that there will be no more hits! So we can avoid extra hit tests\r\n // A final optimisation is that an object is not hit test directly if a child has already been hit.\r\n\r\n let hit = 0,\r\n interactiveParent = interactive = displayObject.interactive || interactive;\r\n\r\n // if the displayobject has a hitArea, then it does not need to hitTest children.\r\n if (displayObject.hitArea) {\r\n interactiveParent = false;\r\n }\r\n\r\n if (displayObject._activeParentLayer) {\r\n outOfMask = false;\r\n }\r\n\r\n // it has a mask! Then lets hit test that before continuing..\r\n const mask: Graphics = (displayObject as any)._mask;\r\n if (hitTestOrder < Infinity && mask) {\r\n if (!mask.containsPoint(point)) {\r\n outOfMask = true;\r\n }\r\n }\r\n\r\n // it has a filterArea! Same as mask but easier, its a rectangle\r\n if (hitTestOrder < Infinity && displayObject.filterArea) {\r\n if (!displayObject.filterArea.contains(point.x, point.y)) {\r\n outOfMask = true;\r\n }\r\n }\r\n\r\n // ** FREE TIP **! If an object is not interactive or has no buttons in it\r\n // (such as a game scene!) set interactiveChildren to false for that displayObject.\r\n // This will allow pixi to completely ignore and bypass checking the displayObjects children.\r\n const children: Array<DisplayObject> = (displayObject as Container).children;\r\n if (displayObject.interactiveChildren && children) {\r\n for (let i = children.length - 1; i >= 0; i--) {\r\n const child = children[i];\r\n\r\n // time to get recursive.. if this function will return if something is hit..\r\n const hitChild = this._displayProcessInteractive(point, child, hitTestOrder, interactiveParent, outOfMask);\r\n if (hitChild) {\r\n // its a good idea to check if a child has lost its parent.\r\n // this means it has been removed whilst looping so its best\r\n if (!child.parent) {\r\n continue;\r\n }\r\n\r\n hit = hitChild;\r\n hitTestOrder = hitChild;\r\n }\r\n }\r\n }\r\n\r\n // no point running this if the item is not interactive or does not have an interactive parent.\r\n if (interactive) {\r\n if (!outOfMask) {\r\n // if we are hit testing (as in we have no hit any objects yet)\r\n // We also don't need to worry about hit testing if once of the displayObjects children has already been hit!\r\n if (hitTestOrder < displayObject.displayOrder) {\r\n //pixi v4\r\n if (displayObject.hitArea) {\r\n displayObject.worldTransform.applyInverse(point, this._tempPoint);\r\n if (displayObject.hitArea.contains(this._tempPoint.x, this._tempPoint.y)) {\r\n hit = displayObject.displayOrder;\r\n }\r\n }\r\n else if ((displayObject as any).containsPoint) {\r\n if ((displayObject as any).containsPoint(point)) {\r\n hit = displayObject.displayOrder;\r\n }\r\n }\r\n }\r\n\r\n if (displayObject.interactive) {\r\n this._queueAdd(displayObject, hit === Infinity ? 0 : hit);\r\n }\r\n } else {\r\n if (displayObject.interactive) {\r\n this._queueAdd(displayObject, 0);\r\n }\r\n }\r\n }\r\n\r\n return hit;\r\n\r\n },\r\n\r\n processInteractive: function (strangeStuff: InteractionEvent | Point, displayObject: DisplayObject, func: Function, hitTest: boolean, interactive: boolean) {\r\n //older versions\r\n let interactionEvent: InteractionEvent = null;\r\n let point: Point = null;\r\n if ((strangeStuff as InteractionEvent).data &&\r\n (strangeStuff as InteractionEvent).data.global) {\r\n interactionEvent = strangeStuff as InteractionEvent;\r\n point = interactionEvent.data.global;\r\n } else {\r\n point = strangeStuff as Point;\r\n }\r\n this._startInteractionProcess();\r\n this._displayProcessInteractive(point, displayObject, hitTest ? 0 : Infinity, false);\r\n this._finishInteractionProcess(interactionEvent, func);\r\n },\r\n\r\n _startInteractionProcess: function () {\r\n //move it to constructor\r\n this._eventDisplayOrder = 1;\r\n if (!this._queue) {\r\n //move it to constructor\r\n this._queue = [[], []];\r\n }\r\n this._queue[0].length = 0;\r\n this._queue[1].length = 0;\r\n },\r\n\r\n _queueAdd: function (displayObject: DisplayObject, order: number) {\r\n let queue = this._queue;\r\n if (order < this._eventDisplayOrder) {\r\n queue[0].push(displayObject);\r\n } else {\r\n if (order > this._eventDisplayOrder) {\r\n this._eventDisplayOrder = order;\r\n let q = queue[1];\r\n for (let i = 0; i < q.length; i++) {\r\n queue[0].push(q[i]);\r\n }\r\n queue[1].length = 0;\r\n }\r\n queue[1].push(displayObject);\r\n }\r\n },\r\n _finishInteractionProcess: function (event: InteractionEvent, func: Function) {\r\n let queue = this._queue;\r\n let q = queue[0];\r\n let i = 0;\r\n for (; i < q.length; i++) {\r\n if (event) {\r\n //v4.3\r\n if (func) {\r\n func(event, q[i], false);\r\n }\r\n } else {\r\n //old\r\n func(q[i], false);\r\n }\r\n }\r\n q = queue[1];\r\n for (i = 0; i < q.length; i++) {\r\n if (event) {\r\n //v4.3\r\n if (!event.target) {\r\n event.target = q[i];\r\n }\r\n if (func) {\r\n func(event, q[i], true);\r\n }\r\n } else {\r\n //old\r\n func(q[i], true);\r\n }\r\n }\r\n }\r\n });\r\n}\r\n","/**\r\n * Created by ivanp on 29.01.2017.\r\n */\r\n\r\nnamespace pixi_display {\r\n export class LayerTextureCache {\r\n constructor(public layer: Layer) {\r\n }\r\n\r\n renderTexture: PIXI.RenderTexture = null;\r\n doubleBuffer: Array<PIXI.RenderTexture> = null;\r\n currentBufferIndex = 0;\r\n _tempRenderTarget: PIXI.RenderTarget = null;\r\n\r\n initRenderTexture(renderer?: PIXI.WebGLRenderer) {\r\n const width = renderer ? renderer.screen.width : 100;\r\n const height = renderer ? renderer.screen.height : 100;\r\n const resolution = renderer ? renderer.resolution : PIXI.settings.RESOLUTION;\r\n\r\n this.renderTexture = PIXI.RenderTexture.create(width, height, resolution);\r\n\r\n if (this.layer.group.useDoubleBuffer) {\r\n this.doubleBuffer = [\r\n PIXI.RenderTexture.create(width, height, resolution),\r\n PIXI.RenderTexture.create(width, height, resolution)\r\n ];\r\n }\r\n }\r\n\r\n getRenderTexture() {\r\n if (!this.renderTexture) {\r\n this.initRenderTexture();\r\n }\r\n return this.renderTexture;\r\n }\r\n\r\n pushTexture(renderer: PIXI.WebGLRenderer) {\r\n const screen = renderer.screen;\r\n\r\n if (!this.renderTexture) {\r\n this.initRenderTexture(renderer);\r\n }\r\n\r\n const rt = this.renderTexture;\r\n const group = this.layer.group;\r\n const db = this.doubleBuffer;\r\n\r\n if (rt.width !== screen.width ||\r\n rt.height !== screen.height ||\r\n rt.baseTexture.resolution !== renderer.resolution) {\r\n rt.baseTexture.resolution = renderer.resolution;\r\n rt.resize(screen.width, screen.height);\r\n\r\n if (db) {\r\n db[0].baseTexture.resolution = renderer.resolution;\r\n db[0].resize(screen.width, screen.height);\r\n db[1].baseTexture.resolution = renderer.resolution;\r\n db[1].resize(screen.width, screen.height);\r\n }\r\n }\r\n\r\n this._tempRenderTarget = renderer._activeRenderTarget;\r\n\r\n renderer.currentRenderer.flush();\r\n\r\n if (group.useDoubleBuffer) {\r\n // double-buffer logic\r\n let buffer = db[this.currentBufferIndex];\r\n if (!(buffer.baseTexture as any)._glTextures[renderer.CONTEXT_UID]) {\r\n renderer.bindRenderTexture(buffer, null);\r\n if (group.clearColor) {\r\n renderer.clear(group.clearColor as any);\r\n }\r\n }\r\n renderer.unbindTexture(rt);\r\n (rt.baseTexture as any)._glTextures = (buffer.baseTexture as any)._glTextures;\r\n (rt.baseTexture as any)._glRenderTargets = (buffer.baseTexture as any)._glRenderTargets;\r\n\r\n this.currentBufferIndex = 1 - this.currentBufferIndex;\r\n buffer = db[this.currentBufferIndex]\r\n renderer.bindRenderTexture(buffer, null);\r\n } else {\r\n // simple logic\r\n renderer.bindRenderTexture(rt, undefined);\r\n }\r\n\r\n if (group.clearColor) {\r\n renderer.clear(group.clearColor as any);\r\n }\r\n }\r\n\r\n popTexture(renderer: PIXI.WebGLRenderer) {\r\n renderer.currentRenderer.flush();\r\n renderer.bindRenderTarget(this._tempRenderTarget);\r\n this._tempRenderTarget = null;\r\n }\r\n\r\n destroy() {\r\n if (this.renderTexture) {\r\n this.renderTexture.destroy();\r\n if (this.doubleBuffer) {\r\n this.doubleBuffer[0].destroy(true);\r\n this.doubleBuffer[1].destroy(true);\r\n }\r\n }\r\n }\r\n }\r\n\r\n export class Layer extends PIXI.Container {\r\n constructor(group: Group = null) {\r\n super();\r\n if (group != null) {\r\n this.group = group;\r\n this.zIndex = group.zIndex;\r\n } else {\r\n this.group = new Group(0, false);\r\n }\r\n this._tempChildren = this.children;\r\n }\r\n\r\n isLayer = true;\r\n group: Group = null;\r\n _activeChildren: Array<PIXI.DisplayObject> = [];\r\n _tempChildren: Array<PIXI.DisplayObject> = null;\r\n _activeStageParent: Stage = null;\r\n _sortedChildren: Array<PIXI.DisplayObject> = [];\r\n _tempLayerParent: Layer = null;\r\n\r\n textureCache: LayerTextureCache;\r\n insertChildrenBeforeActive = true;\r\n insertChildrenAfterActive = true;\r\n\r\n beginWork(stage: Stage) {\r\n const active = this._activeChildren;\r\n this._activeStageParent = stage;\r\n this.group.foundLayer(stage, this);\r\n const groupChildren = this.group._activeChildren;\r\n active.length = 0;\r\n for (let i = 0; i < groupChildren.length; i++) {\r\n groupChildren[i]._activeParentLayer = this;\r\n active.push(groupChildren[i]);\r\n }\r\n groupChildren.length = 0;\r\n }\r\n\r\n endWork() {\r\n const children = this.children;\r\n const active = this._activeChildren;\r\n const sorted = this._sortedChildren;\r\n\r\n for (let i = 0; i < active.length; i++) {\r\n this.emit(\"display\", active[i])\r\n }\r\n\r\n sorted.length = 0;\r\n if (this.insertChildrenBeforeActive) {\r\n for (let i = 0; i < children.length; i++) {\r\n sorted.push(children[i]);\r\n }\r\n }\r\n for (let i = 0; i < active.length; i++) {\r\n sorted.push(active[i]);\r\n }\r\n if (!this.insertChildrenBeforeActive &&\r\n this.insertChildrenAfterActive) {\r\n for (let i = 0; i < children.length; i++) {\r\n sorted.push(children[i]);\r\n }\r\n }\r\n\r\n if (this.group.enableSort) {\r\n this.doSort();\r\n }\r\n }\r\n\r\n get useRenderTexture() {\r\n return this.group.useRenderTexture;\r\n }\r\n\r\n set useRenderTexture(value: boolean) {\r\n this.group.useRenderTexture = value;\r\n }\r\n\r\n get useDoubleBuffer() {\r\n return this.group.useDoubleBuffer;\r\n }\r\n\r\n set useDoubleBuffer(value: boolean) {\r\n this.group.useDoubleBuffer = value;\r\n }\r\n\r\n get clearColor() {\r\n return this.group.clearColor;\r\n }\r\n\r\n set clearColor(value: ArrayLike<number>) {\r\n this.group.clearColor = value;\r\n }\r\n\r\n get sortPriority() {\r\n return this.group.sortPriority;\r\n }\r\n\r\n set sortPriority(value: number) {\r\n this.group.sortPriority = value;\r\n }\r\n\r\n getRenderTexture() {\r\n if (!this.textureCache) {\r\n this.textureCache = new LayerTextureCache(this);\r\n }\r\n return this.textureCache.getRenderTexture();\r\n }\r\n\r\n updateDisplayLayers() {\r\n\r\n }\r\n\r\n /**\r\n * you can override this method for this particular layer, if you want\r\n */\r\n doSort() {\r\n this.group.doSort(this, this._sortedChildren);\r\n }\r\n\r\n _preRender(renderer: PIXI.WebGLRenderer | PIXI.CanvasRenderer): boolean {\r\n if (this._activeParentLayer && this._activeParentLayer != renderer._activeLayer) {\r\n return false;\r\n }\r\n\r\n if (!this.visible) {\r\n this.displayOrder = 0;\r\n return false;\r\n }\r\n\r\n this.displayOrder = renderer.incDisplayOrder();\r\n\r\n // if the object is not visible or the alpha is 0 then no need to render this element\r\n if (this.worldAlpha <= 0 || !this.renderable) {\r\n return false;\r\n }\r\n\r\n // we are making a hack with swapping children, it can go wrong easily\r\n // this is special \"recover\" if that allows stage to recover just after failed frame\r\n\r\n if (this.children !== this._sortedChildren &&\r\n this._tempChildren != this.children) {\r\n this._tempChildren = this.children;\r\n }\r\n\r\n //just a temporary feature - getBounds() for filters will work with that\r\n //TODO: make a better hack for getBounds()\r\n\r\n this._boundsID++;\r\n this.children = this._sortedChildren;\r\n\r\n this._tempLayerParent = renderer._activeLayer;\r\n renderer._activeLayer = this;\r\n return true;\r\n }\r\n\r\n _postRender(renderer: PIXI.WebGLRenderer | PIXI.CanvasRenderer) {\r\n this.children = this._tempChildren;\r\n renderer._activeLayer = this._tempLayerParent;\r\n this._tempLayerParent = null;\r\n }\r\n\r\n renderWebGL(renderer: PIXI.WebGLRenderer) {\r\n if (!this._preRender(renderer)) {\r\n return;\r\n }\r\n\r\n if (this.group.useRenderTexture) {\r\n if (!this.textureCache) {\r\n this.textureCache = new LayerTextureCache(this);\r\n }\r\n this.textureCache.pushTexture(renderer);\r\n }\r\n\r\n this.containerRenderWebGL(renderer);\r\n this._postRender(renderer);\r\n\r\n if (this.group.useRenderTexture) {\r\n this.textureCache.popTexture(renderer);\r\n }\r\n }\r\n\r\n renderCanvas(renderer: PIXI.CanvasRenderer) {\r\n if (this._preRender(renderer)) {\r\n this.containerRenderCanvas(renderer);\r\n this._postRender(renderer);\r\n }\r\n }\r\n\r\n destroy(options?: any) {\r\n if (this.textureCache) {\r\n this.textureCache.destroy();\r\n this.textureCache = null;\r\n }\r\n super.destroy(options);\r\n }\r\n }\r\n}\r\n","namespace pixi_display {\r\n import DisplayObject = PIXI.DisplayObject;\r\n import Container = PIXI.Container;\r\n\r\n /**\r\n * Container for layers\r\n *\r\n */\r\n export class Stage extends Layer {\r\n constructor() {\r\n super();\r\n }\r\n\r\n static _updateOrderCounter: number = 0;\r\n\r\n isStage = true;\r\n\r\n _tempGroups: Array<DisplayObject> = [];\r\n\r\n /**\r\n * Found layers\r\n */\r\n _activeLayers: Array<Layer> = [];\r\n\r\n _activeParentStage: Stage = null;\r\n\r\n /**\r\n * clears all display lists that were used in last rendering session\r\n * please clear it when you stop using this displayList, otherwise you may have problems with GC in some cases\r\n */\r\n clear() {\r\n this._activeLayers.length = 0;\r\n this._tempGroups.length = 0;\r\n }\r\n\r\n destroy(options?: any) {\r\n this.clear();\r\n super.destroy(options);\r\n }\r\n\r\n /**\r\n *\r\n * @param displayObject {PIXI.DisplayObject} container that we are adding to Stage\r\n * @private\r\n */\r\n _addRecursive(displayObject: DisplayObject) {\r\n if (!displayObject.visible) {\r\n return;\r\n }\r\n\r\n if ((displayObject as any).isLayer) {\r\n const layer = displayObject as any as Layer;\r\n this._activeLayers.push(layer);\r\n layer.beginWork(this);\r\n }\r\n\r\n if (displayObject != this && (displayObject as any).isStage) {\r\n const stage = displayObject as Stage;\r\n stage.updateAsChildStage(this);\r\n return;\r\n }\r\n\r\n let group = displayObject.parentGroup;\r\n if (group !== null) {\r\n group.addDisplayObject(this, displayObject);\r\n }\r\n const layer = displayObject.parentLayer;\r\n if (layer !== null) {\r\n group = layer.group;\r\n group.addDisplayObject(this, displayObject);\r\n }\r\n\r\n displayObject.updateOrder = ++Stage._updateOrderCounter;\r\n if (displayObject.alpha <= 0 || !displayObject.renderable\r\n || !displayObject.layerableChildren\r\n || group && group.sortPriority) {\r\n return;\r\n }\r\n\r\n const children = (displayObject as Container).children;\r\n if (children && children.length) {\r\n for (let i = 0; i < children.length; i++) {\r\n this._addRecursive(children[i]);\r\n }\r\n }\r\n }\r\n\r\n _addRecursiveChildren(displayObject: DisplayObject) {\r\n if (displayObject.alpha <= 0 || !displayObject.renderable\r\n || !displayObject.layerableChildren) {\r\n return;\r\n }\r\n const children = (displayObject as Container).children;\r\n if (children && children.length) {\r\n for (let i = 0; i < children.length; i++) {\r\n this._addRecursive(children[i]);\r\n }\r\n }\r\n }\r\n\r\n _updateStageInner() {\r\n this.clear();\r\n this._addRecursive(this);\r\n const layers = this._activeLayers;\r\n\r\n for (let i = 0; i < layers.length; i++) {\r\n const layer = layers[i];\r\n if (layer.group.sortPriority) {\r\n layer.endWork();\r\n const sorted = layer._sortedChildren;\r\n for (let j = 0; j < sorted.length; j++) {\r\n this._addRecursiveChildren(sorted[j]);\r\n }\r\n }\r\n }\r\n\r\n for (let i = 0; i < layers.length; i++) {\r\n const layer = layers[i];\r\n if (!layer.group.sortPriority) {\r\n layer.endWork();\r\n }\r\n }\r\n }\r\n\r\n updateAsChildStage(stage: Stage) {\r\n this._activeParentStage = stage;\r\n Stage._updateOrderCounter = 0;\r\n this._updateStageInner();\r\n }\r\n\r\n updateStage() {\r\n this._activeParentStage = null;\r\n Group._layerUpdateId++;\r\n this._updateStageInner();\r\n };\r\n }\r\n}\r\n","/// <reference types=\"pixi.js\" />\r\n\r\ndeclare namespace PIXI {\r\n interface WebGLRenderer {\r\n _activeLayer: pixi_display.Layer\r\n _renderSessionId: number\r\n _lastDisplayOrder: number\r\n incDisplayOrder(): number\r\n }\r\n interface CanvasRenderer {\r\n _activeLayer: pixi_display.Layer\r\n _renderSessionId: number\r\n _lastDisplayOrder: number\r\n incDisplayOrder(): number\r\n }\r\n}\r\n\r\nnamespace pixi_display {\r\n (Object as any).assign(PIXI.WebGLRenderer.prototype, {\r\n _lastDisplayOrder: 0,\r\n _activeLayer: null,\r\n\r\n incDisplayOrder() {\r\n return ++this._lastDisplayOrder;\r\n },\r\n\r\n _oldRender: PIXI.WebGLRenderer.prototype.render,\r\n\r\n render(displayObject: PIXI.DisplayObject, renderTexture?: PIXI.RenderTexture, clear?: boolean, transform?: PIXI.Transform, skipUpdateTransform?: boolean) {\r\n if (!renderTexture) {\r\n this._lastDisplayOrder = 0;\r\n }\r\n this._activeLayer = null;\r\n if ((displayObject as Stage).isStage) {\r\n (displayObject as Stage).updateStage()\r\n }\r\n this._oldRender(displayObject, renderTexture, clear, transform, skipUpdateTransform);\r\n }\r\n });\r\n\r\n (Object as any).assign(PIXI.CanvasRenderer.prototype, {\r\n _lastDisplayOrder: 0,\r\n _activeLayer: null,\r\n\r\n incDisplayOrder() {\r\n return ++this._lastDisplayOrder;\r\n },\r\n\r\n _oldRender: PIXI.CanvasRenderer.prototype.render,\r\n\r\n render(displayObject: PIXI.DisplayObject, renderTexture?: PIXI.RenderTexture, clear?: boolean, transform?: PIXI.Transform, skipUpdateTransform?: boolean) {\r\n if (!renderTexture) {\r\n this._lastDisplayOrder = 0;\r\n }\r\n this._activeLayer = null;\r\n if ((displayObject as Stage).isStage) {\r\n (displayObject as Stage).updateStage()\r\n }\r\n this._oldRender(displayObject, renderTexture, clear, transform, skipUpdateTransform);\r\n }\r\n });\r\n}\r\n","namespace pixi_display {\r\n\t(PIXI as any).display = pixi_display;\r\n}\r\n\r\ndeclare module \"pixi-layers\" {\r\n\texport = pixi_display;\r\n}\r\n"]} |