pixijs/layers

PIX layers import issue

Opened this issue · 16 comments

I am trying to figure whats right way to import PIXI layers with PIXI.

1> **while importing the below way

   import * as PIXI from 'pixi.js';
   window.PIXI = PIXI;
   import 'pixi-layers';**

****ERROR in ./src/common/common/shared/graphics-framework/graphics/graphics.service.ts 338:24-36
"export 'display' (imported as 'PIXI') was not found in 'pixi.js'

ERROR in node_modules/pixi-layers/dist/pixi-layers.d.ts:57:36 - error TS2694: Namespace 'PIXI' has no exported member 'interaction'.

57     import InteractionEvent = PIXI.interaction.InteractionEvent;
                                      ~~~~~~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:106:36 - error TS2694: Namespace 'PIXI' has no exported member 'interaction'.

106     import InteractionEvent = PIXI.interaction.InteractionEvent;****

2> **while importing like below

      import 'pixi.js';
      import 'pixi-layers';**

getting on below error

  ERROR in node_modules/pixi-layers/dist/pixi-layers.d.ts:57:36 - error TS2694: Namespace 'PIXI' has no exported member 'interaction'.

57     import InteractionEvent = PIXI.interaction.InteractionEvent;
                                      ~~~~~~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:106:36 - error TS2694: Namespace 'PIXI' has no exported member 'interaction'.

106     import InteractionEvent = PIXI.interaction.InteractionEvent;****

3> while importing like below

   import * as PIXI from 'pixi.js';

   require('pixi-layers');
 

Below is the error       
 
 Property 'display' does not exist on type 'typeof PIXI'.
 app.stage = new PIXI.display.Stage();

Sorry, yes, I have to update to 5.3 :) someone removed interaction package and i didnt notice it. Try to remove it and rebuild for now? I will look tomorrow or maybe in weekend

Thank you for prompt response.

couldn't figure out what you mean by below line

Try to remove it and rebuild for now?

Will be highly appreciated if this fix can be provided as soon as possible.

Thank u so much for prompt fix. I see version upgrade to 0.3.0

But Now i see below error while compiling.

ERROR in node_modules/pixi-layers/dist/pixi-layers.d.ts:7:1 - error TS1046: Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier.

7 namespace PIXI.display {

node_modules/pixi-layers/dist/pixi-layers.d.ts:8:5 - error TS1036: Statements are not allowed in ambient contexts.

8     (Object as any).assign(PIXI.Container.prototype, {
    ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:9:58 - error TS1183: An implementation cannot be declared in ambient contexts.

9         render: function (renderer: PIXI.Renderer): void {
                                                         ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:11:17 - error TS1036: Statements are not allowed in ambient contexts.

11                 return;
                 ~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:15:17 - error TS1036: Statements are not allowed in ambient contexts.

15                 this.displayOrder = 0;
                 ~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:23:17 - error TS1036: Statements are not allowed in ambient contexts.

23                 return;
                 ~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:30:70 - error TS1183: An implementation cannot be declared in ambient contexts.

30         renderCanvas: function (renderer: PIXI.CanvasRenderer): void {
                                                                      ~
node_modules/pixi-layers/dist/pixi-layers.d.ts0m:32:17 - error TS1036: Statements are not allowed in ambient contexts.

32                 return;
                 ~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:36:17 - error TS1036: Statements are not allowed in ambient contexts.

36                 this.displayOrder = 0;
                 ~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:44:17 - error TS1036: Statements are not allowed in ambient contexts.

44                 return;
                 ~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:102:1 - error TS1036: Statements are not allowed in ambient contexts.

102 (Object as any).assign(PIXI.DisplayObject.prototype, {
  ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:115:5 - error TS1036: Statements are not allowed in ambient contexts.

115     PIXI.ParticleContainer.prototype.layerableChildren = false;
      ~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:118:5 - error TS1036: Statements are not allowed in ambient contexts.

118     (PIXI as any).ParticleContainer.prototype.layerableChildren = false;
      ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:135:33 - error TS1039: Initializers are not allowed in ambient contexts.

135         static _layerUpdateId = 0;
                                  ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:137:31 - error TS1039: Initializers are not allowed in ambient contexts.

137         _activeLayer: Layer = null;
                                ~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:139:31 - error TS1039: Initializers are not allowed in ambient contexts.

139         _activeStage: Stage = null;
                                ~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:141:49 - error TS1039: Initializers are not allowed in ambient contexts.

141         _activeChildren: Array<DisplayObject> = [];
                                                  ~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:143:25 - error TS1039: Initializers are not allowed in ambient contexts.

143         _lastUpdateId = -1;
                          ~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:145:37 - error TS1039: Initializers are not allowed in ambient contexts.

145         useRenderTexture: boolean = false;
                                      ~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:146:36 - error TS1039: Initializers are not allowed in ambient contexts.

146         useDoubleBuffer: boolean = false;
                                     ~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:147:32 - error TS1039: Initializers are not allowed in ambient contexts.

147         sortPriority: number = 0;
                                 ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:148:42 - error TS1039: Initializers are not allowed in ambient contexts.

148         clearColor : ArrayLike<number> = new Float32Array([0, 0, 0, 0]);
                                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:152:31 - error TS1039: Initializers are not allowed in ambient contexts.

152         canDrawWithoutLayer = false;
                                ~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:153:32 - error TS1039: Initializers are not allowed in ambient contexts.

153         canDrawInParentStage = true;
                                 ~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:159:18 - error TS1039: Initializers are not allowed in ambient contexts.

159         zIndex = 0;
                   ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:161:22 - error TS1039: Initializers are not allowed in ambient contexts.

161         enableSort = false;
                       ~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:163:66 - error TS1183: An implementation cannot be declared in ambient contexts.

163         constructor(zIndex: number, sorting: boolean | Function) {
                                                                   ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:171:17 - error TS1036: Statements are not allowed in ambient contexts.

171                 this.on('sort', sorting);
                  ~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:175:45 - error TS1039: Initializers are not allowed in ambient contexts.

175         _tempResult: Array<DisplayObject> = [];
                                              ~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:176:43 - error TS1039: Initializers are not allowed in ambient contexts.

176         _tempZero: Array<DisplayObject> = [];
                                            ~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:178:40 - error TS1039: Initializers are not allowed in ambient contexts.

178         useZeroOptimization: boolean = false;
                                         ~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:180:60 - error TS1183: An implementation cannot be declared in ambient contexts.

180         doSort(layer: Layer, sorted: Array<DisplayObject>) {
                                                             ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:182:17 - error TS1036: Statements are not allowed in ambient contexts.

182                 for (let i = 0; i < sorted.length; i++) {
                  ~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:182:30 - error TS1039: Initializers are not allowed in ambient contexts.

182                 for (let i = 0; i < sorted.length; i++) {
                               ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:183:21 - error TS1036: Statements are not allowed in ambient contexts.

183                     this.emit('sort', sorted[i]);
                      ~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:187:17 - error TS1036: Statements are not allowed in ambient contexts.

187                 this.doSortWithZeroOptimization(layer, sorted);
                  ~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:189:17 - error TS1036: Statements are not allowed in ambient contexts.

189                 sorted.sort(Group.compareZIndex);
                  ~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:193:66 - error TS1183: An implementation cannot be declared in ambient contexts.

193         static compareZIndex(a: DisplayObject, b: DisplayObject) {
                                                                   ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:195:17 - error TS1036: Statements are not allowed in ambient contexts.

195                 return -1;
                  ~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:198:17 - error TS1036: Statements are not allowed in ambient contexts.

198                 return 1;
                  ~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:203:80 - error TS1183: An implementation cannot be declared in ambient contexts.

203         doSortWithZeroOptimization(layer: Layer, sorted: Array<DisplayObject>) {
                                                                                 ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:233:17 - error TS1183: An implementation cannot be declared in ambient contexts.

233         clear() {
                  ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:242:70 - error TS1183: An implementation cannot be declared in ambient contexts.

242         addDisplayObject(stage: Stage, displayObject: DisplayObject) {
                                                                       ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:246:17 - error TS1036: Statements are not allowed in ambient contexts.

246                 this._activeLayer._activeChildren.push(displayObject);
                  ~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:248:17 - error TS1036: Statements are not allowed in ambient contexts.

248                 this._activeChildren.push(displayObject);
                  ~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:257:48 - error TS1183: An implementation cannot be declared in ambient contexts.

257         foundLayer(stage: Stage, layer: Layer) {
                                                 ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:260:17 - error TS1036: Statements are not allowed in ambient contexts.

260                 Group.conflict();
                  ~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:270:34 - error TS1183: An implementation cannot be declared in ambient contexts.

270         foundStage(stage: Stage) {
                                   ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:272:17 - error TS1036: Statements are not allowed in ambient contexts.

272                 this.clear();
                  ~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:276:29 - error TS1183: An implementation cannot be declared in ambient contexts.

276         check(stage: Stage) {
                              ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:278:17 - error TS1036: Statements are not allowed in ambient contexts.

278                 this._lastUpdateId = Group._layerUpdateId;
                  ~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:282:31 - error TS1039: Initializers are not allowed in ambient contexts.

282                 let current = this._activeStage;
                                ~~~~~~~~~~~~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:283:17 - error TS1036: Statements are not allowed in ambient contexts.

283                 while (current && current != stage) {
                  ~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:284:21 - error TS1036: Statements are not allowed in ambient contexts.

284                     current = current._activeParentStage;
                      ~~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:288:21 - error TS1036: Statements are not allowed in ambient contexts.

288                     this.clear();
                      ~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:294:37 - error TS1039: Initializers are not allowed in ambient contexts.

294         static _lastLayerConflict = 0;
                                      ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:296:27 - error TS1183: An implementation cannot be declared in ambient contexts.

296         static conflict() {
                            ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:298:17 - error TS1036: Statements are not allowed in ambient contexts.

298                 Group._lastLayerConflict = Date.now();
                  ~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:315:168 - error TS1183: An implementation cannot be declared in ambient contexts.

315     export function processInteractive51(strangeStuff: InteractionEvent | Point, displayObject: DisplayObject, func: Function, hitTest: boolean, interactive: boolean) {
                                                                                                                                                                         ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:317:13 - error TS1036: Statements are not allowed in ambient contexts.

317             this.search = new LayersTreeSearch();
              ~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:321:31 - error TS1254: A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.

321         const delayedEvents = this.delayedEvents;
                                ~~~~~~~~~~~~~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:325:13 - error TS1036: Statements are not allowed in ambient contexts.

325             (strangeStuff as any).stopPropagationHint = false;
              ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:327:32 - error TS1254: A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.

327             const delayedLen = delayedEvents.length;
                                 ~~~~~~~~~~~~~~~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:331:26 - error TS1039: Initializers are not allowed in ambient contexts.

331             for (let i = 0; i < delayedLen; i++) {
                           ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:332:65 - error TS1254: A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.

332                 const {displayObject, eventString, eventData} = delayedEvents[i];
                                                                  ~~~~~~~~~~~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:336:17 - error TS1036: Statements are not allowed in ambient contexts.

336                 if (eventData.stopsPropagatingAt === displayObject) {
                  ~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:337:21 - error TS1036: Statements are not allowed in ambient contexts.

337                     eventData.stopPropagationHint = true;
                      ~~~~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:345:70 - error TS1183: An implementation cannot be declared in ambient contexts.

345     export function patchInteractionManager(interactionManager: any) {
                                                                       ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:347:13 - error TS1036: Statements are not allowed in ambient contexts.

347             return;
              ~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:350:13 - error TS1036: Statements are not allowed in ambient contexts.

350             if (!interactionManager.search.worksWithDisplay) {
              ~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:351:17 - error TS1036: Statements are not allowed in ambient contexts.

351                 interactionManager.search = new LayersTreeSearch();
                  ~~~~~~~~~~~~~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:354:13 - error TS1036: Statements are not allowed in ambient contexts.

354             interactionManager.processInteractive = processInteractive51;
              ~~~~~~~~~~~~~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:364:42 - error TS1183: An implementation cannot be declared in ambient contexts.

364         constructor(public layer: Layer) {
                                           ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:367:45 - error TS1039: Initializers are not allowed in ambient contexts.

367         renderTexture: PIXI.RenderTexture = null;
                                              ~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:368:51 - error TS1039: Initializers are not allowed in ambient contexts.

368         doubleBuffer: Array<PIXI.RenderTexture> = null;
                                                    ~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:369:30 - error TS1039: Initializers are not allowed in ambient contexts.

369         currentBufferIndex = 0;
                               ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:370:49 - error TS1039: Initializers are not allowed in ambient contexts.

370         _tempRenderTarget: PIXI.RenderTexture = null;
                                                  ~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:371:35 - error TS1039: Initializers are not allowed in ambient contexts.

371         _tempRenderTargetSource = new PIXI.Rectangle();
                                    ~~~~~~~~~~~~~~~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:373:53 - error TS1183: An implementation cannot be declared in ambient contexts.

373         initRenderTexture(renderer?: PIXI.Renderer) {
                                                      ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:374:27 - error TS1254: A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.

374             const width = renderer ? renderer.screen.width : 100;
                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:375:28 - error TS1254: A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.

375             const height = renderer ? renderer.screen.height : 100;
                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:376:32 - error TS1254: A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.

376             const resolution = renderer ? renderer.resolution : PIXI.settings.RESOLUTION;
                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:381:17 - error TS1036: Statements are not allowed in ambient contexts.

381                 this.doubleBuffer = [
                  ~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:388:28 - error TS1183: An implementation cannot be declared in ambient contexts.

388         getRenderTexture() {
                             ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:390:17 - error TS1036: Statements are not allowed in ambient contexts.

390                 this.initRenderTexture();
                  ~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:395:46 - error TS1183: An implementation cannot be declared in ambient contexts.

395         pushTexture(renderer: PIXI.Renderer) {
                                               ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:396:28 - error TS1254: A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.

396             const screen = renderer.screen;
                             ~~~~~~~~~~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:399:17 - error TS1036: Statements are not allowed in ambient contexts.

399                 this.initRenderTexture(renderer);
                  ~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:402:24 - error TS1254: A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.

402             const rt = this.renderTexture;
                         ~~~~~~~~~~~~~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:403:27 - error TS1254: A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.

403             const group = this.layer.group;
                            ~~~~~~~~~~~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:404:24 - error TS1254: A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.

404             const db = this.doubleBuffer;
                         ~~~~~~~~~~~~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:409:17 - error TS1036: Statements are not allowed in ambient contexts.

409                 rt.baseTexture.resolution = renderer.resolution;
                  ~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:413:21 - error TS1036: Statements are not allowed in ambient contexts.

413                     db[0].baseTexture.resolution = renderer.resolution;
                      ~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:427:30 - error TS1039: Initializers are not allowed in ambient contexts.

427                 let buffer = db[this.currentBufferIndex];
                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:428:17 - error TS1036: Statements are not allowed in ambient contexts.

428                 if (!(buffer.baseTexture as any)._glTextures[renderer.CONTEXT_UID]) {
                  ~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:429:21 - error TS1036: Statements are not allowed in ambient contexts.

429                     renderer.renderTexture.bind(buffer, undefined, undefined);
                      ~~~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:432:25 - error TS1036: Statements are not allowed in ambient contexts.

432                         renderer.renderTexture.clear(group.clearColor as any);
                          ~~~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:443:17 - error TS1036: Statements are not allowed in ambient contexts.

443                 renderer.renderTexture.bind(rt, undefined, undefined);
                  ~~~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:447:17 - error TS1036: Statements are not allowed in ambient contexts.

447                 renderer.renderTexture.clear(group.clearColor as any);
                  ~~~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:451:33 - error TS1254: A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.

451             const filterStack = renderer.filter.defaultFilterStack;
                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:453:17 - error TS1036: Statements are not allowed in ambient contexts.

453                 filterStack[filterStack.length - 1].renderTexture = renderer.renderTexture.current;
                  ~~~~~~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:457:45 - error TS1183: An implementation cannot be declared in ambient contexts.

457         popTexture(renderer: PIXI.Renderer) {
                                              ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:460:33 - error TS1254: A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.

460             const filterStack = renderer.filter.defaultFilterStack;
                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:462:17 - error TS1036: Statements are not allowed in ambient contexts.

462                 filterStack[filterStack.length - 1].renderTexture = this._tempRenderTarget;
                  ~~~~~~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:467:21 - error TS1254: A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.

467          const rt = this.renderTexture;
                      ~~~~~~~~~~~~~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:468:24 - error TS1254: A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.

468          const group = this.layer.group;
                         ~~~~~~~~~~~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:469:21 - error TS1254: A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.

469          const db = this.doubleBuffer;
                      ~~~~~~~~~~~~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:472:11 - error TS1036: Statements are not allowed in ambient contexts.

472  	        renderer.texture.unbind(rt.baseTexture);
   	        ~~~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:474:24 - error TS1039: Initializers are not allowed in ambient contexts.

474  	        let buffer = db[this.currentBufferIndex];
   	                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:480:19 - error TS1183: An implementation cannot be declared in ambient contexts.

480         destroy() {
                    ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:482:17 - error TS1036: Statements are not allowed in ambient contexts.

482                 this.renderTexture.destroy();
                  ~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:484:21 - error TS1036: Statements are not allowed in ambient contexts.

484                     this.doubleBuffer[0].destroy(true);
                      ~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:492:42 - error TS1183: An implementation cannot be declared in ambient contexts.

492         constructor(group: Group = null) {
                                           ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:495:17 - error TS1036: Statements are not allowed in ambient contexts.

495                 this.group = group;
                  ~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:498:17 - error TS1036: Statements are not allowed in ambient contexts.

498                 this.group = new Group(0, false);
                  ~~~~
6mnode_modules/pixi-layers/dist/pixi-layers.d.ts:503:19 - error TS1039: Initializers are not allowed in ambient contexts.

503         isLayer = true;
                    ~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:504:24 - error TS1039: Initializers are not allowed in ambient contexts.

504         group: Group = null;
                         ~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:505:54 - error TS1039: Initializers are not allowed in ambient contexts.

505         _activeChildren: Array<PIXI.DisplayObject> = [];
                                                       ~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:506:52 - error TS1039: Initializers are not allowed in ambient contexts.

506         _tempChildren: Array<PIXI.DisplayObject> = null;
                                                     ~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:507:37 - error TS1039: Initializers are not allowed in ambient contexts.

507         _activeStageParent: Stage = null;
                                      ~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:508:54 - error TS1039: Initializers are not allowed in ambient contexts.

508         _sortedChildren: Array<PIXI.DisplayObject> = [];
                                                       ~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:509:35 - error TS1039: Initializers are not allowed in ambient contexts.

509         _tempLayerParent: Layer = null;
                                    ~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:512:38 - error TS1039: Initializers are not allowed in ambient contexts.

512         insertChildrenBeforeActive = true;
                                       ~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:513:37 - error TS1039: Initializers are not allowed in ambient contexts.

513         insertChildrenAfterActive = true;
                                      ~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:515:33 - error TS1183: An implementation cannot be declared in ambient contexts.

515         beginWork(stage: Stage) {
                                  ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:516:28 - error TS1254: A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.

516             const active = this._activeChildren;
                             ~~~~~~~~~~~~~~~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:519:35 - error TS1254: A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.

519             const groupChildren = this.group._activeChildren;
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:521:26 - error TS1039: Initializers are not allowed in ambient contexts.

521             for (let i = 0; i < groupChildren.length; i++) {
                           ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:522:17 - error TS1036: Statements are not allowed in ambient contexts.

522                 groupChildren[i]._activeParentLayer = this;
                  ~~~~~~~~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:528:19 - error TS1183: An implementation cannot be declared in ambient contexts.

528         endWork() {
                    ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:529:30 - error TS1254: A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.

529             const children = this.children;
                               ~~~~~~~~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:530:28 - error TS1254: A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.

530             const active = this._activeChildren;
                             ~~~~~~~~~~~~~~~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:531:28 - error TS1254: A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.

531             const sorted = this._sortedChildren;
                             ~~~~~~~~~~~~~~~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:533:26 - error TS1039: Initializers are not allowed in ambient contexts.

533             for (let i = 0; i < active.length; i++) {
                           ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:534:17 - error TS1036: Statements are not allowed in ambient contexts.

534                 this.emit("display", active[i])
                  ~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:539:17 - error TS1036: Statements are not allowed in ambient contexts.

539                 for (let i = 0; i < children.length; i++) {
                  ~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:539:30 - error TS1039: Initializers are not allowed in ambient contexts.

539                 for (let i = 0; i < children.length; i++) {
                               ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:540:21 - error TS1036: Statements are not allowed in ambient contexts.

540                     sorted.push(children[i]);
                      ~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:543:26 - error TS1039: Initializers are not allowed in ambient contexts.

543             for (let i = 0; i < active.length; i++) {
                           ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:544:17 - error TS1036: Statements are not allowed in ambient contexts.

544                 sorted.push(active[i]);
                  ~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:548:17 - error TS1036: Statements are not allowed in ambient contexts.

548                 for (let i = 0; i < children.length; i++) {
                  ~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:548:30 - error TS1039: Initializers are not allowed in ambient contexts.

548                 for (let i = 0; i < children.length; i++) {
                               ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:549:3m21 - error TS1036: Statements are not allowed in ambient contexts.

549                     sorted.push(children[i]);
                      ~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:554:17 - error TS1036: Statements are not allowed in ambient contexts.

554                 this.doSort();
                  ~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:558:32 - error TS1183: An implementation cannot be declared in ambient contexts.

558         get useRenderTexture() {
                                 ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:562:46 - error TS1183: An implementation cannot be declared in ambient contexts.

562         set useRenderTexture(value: boolean) {
                                               ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:566:31 - error TS1183: An implementation cannot be declared in ambient contexts.

566         get useDoubleBuffer() {
                                ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:570:45 - error TS1183: An implementation cannot be declared in ambient contexts.

570         set useDoubleBuffer(value: boolean) {
                                              ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:574:26 - error TS1183: An implementation cannot be declared in ambient contexts.

574         get clearColor() {
                           ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:578:50 - error TS1183: An implementation cannot be declared in ambient contexts.

578         set clearColor(value: ArrayLike<number>) {
                                                   ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:582:28 - error TS1183: An implementation cannot be declared in ambient contexts.

582         get sortPriority() {
                             ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:586:41 - error TS1183: An implementation cannot be declared in ambient contexts.

586         set sortPriority(value: number) {
                                          ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:590:28 - error TS1183: An implementation cannot be declared in ambient contexts.

590         getRenderTexture() {
                             ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:592:17 - error TS1036: Statements are not allowed in ambient contexts.

592                 this.textureCache = new LayerTextureCache(this);
                  ~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:597:31 - error TS1183: An implementation cannot be declared in ambient contexts.

597         updateDisplayLayers() {
                                ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:604:18 - error TS1183: An implementation cannot be declared in ambient contexts.

604         doSort() {
                   ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:608:54 - error TS1183: An implementation cannot be declared in ambient contexts.

608         _preRender(renderer: PIXI.Renderer): boolean {
                                                       ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:610:17 - error TS1036: Statements are not allowed in ambient contexts.

610                 return false;
                  ~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:614:17 - error TS1036: Statements are not allowed in ambient contexts.

614                 this.displayOrder = 0;
                  ~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:622:17 - error TS1036: Statements are not allowed in ambient contexts.

622                 return false;
                  ~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:630:17 - error TS1036: Statements are not allowed in ambient contexts.

630                 this._tempChildren = this.children;
                  ~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:644:46 - error TS1183: An implementation cannot be declared in ambient contexts.

644         _postRender(renderer: PIXI.Renderer) {
                                               ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:650:41 - error TS1183: An implementation cannot be declared in ambient contexts.

650         render(renderer: PIXI.Renderer) {
                                          ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:652:17 - error TS1036: Statements are not allowed in ambient contexts.

652                 return;
                  ~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:656:17 - error TS1036: Statements are not allowed in ambient contexts.

656                 if (!this.textureCache) {
                  ~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:657:21 - error TS1036: Statements are not allowed in ambient contexts.

657                     this.textureCache = new LayerTextureCache(this);
                      ~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:666:17 - error TS1036: Statements are not allowed in ambient contexts.

666                 this.textureCache.popTexture(renderer);
                  ~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:670:32 - error TS1183: An implementation cannot be declared in ambient contexts.

670         destroy(options?: any) {
                                 ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:672:17 - error TS1036: Statements are not allowed in ambient contexts.

672                 this.textureCache.destroy();
                  ~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:679:5 - error TS1036: Statements are not allowed in ambient contexts.

679     (Layer.prototype as any).renderCanvas = function(renderer: PIXI.CanvasRenderer) {
      ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:679:85 - error TS1183: An implementation cannot be declared in ambient contexts.

679     (Layer.prototype as any).renderCanvas = function(renderer: PIXI.CanvasRenderer) {
                                                                                      ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:681:13 - error TS1036: Statements are not allowed in ambient contexts.

681             this.containerRenderCanvas(renderer);
              ~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:700:22 - error TS1039: Initializers are not allowed in ambient contexts.

700         _tempPoint = new Point();
                       ~~~~~~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:701:18 - error TS1039: Initializers are not allowed in ambient contexts.

701         _queue = [[] as Array<DisplayObject>, [] as Array<DisplayObject>];
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:702:30 - error TS1039: Initializers are not allowed in ambient contexts.

702         _eventDisplayOrder = 0;
                               ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:703:28 - error TS1039: Initializers are not allowed in ambient contexts.

703         worksWithDisplay = true;
                             ~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:705:142 - error TS1183: An implementation cannot be declared in ambient contexts.

705         recursiveFindHit(point: Point, displayObject: DisplayObject, hitTestOrder: number, interactive: boolean, outOfMask: boolean): number {
                                                                                                                                               ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:707:17 - error TS1036: Statements are not allowed in ambient contexts.

707                 return 0;
                  ~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:710:23 - error TS1039: Initializers are not allowed in ambient contexts.

710             let hit = 0,
                        ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:711:37 - error TS1039: Initializers are not allowed in ambient contexts.

711                 interactiveParent = interactive = displayObject.interactive || interactive;
                                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:715:17 - error TS1036: Statements are not allowed in ambient contexts.

715                 interactiveParent = false;
                  ~~~~~~~~~~~~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:719:17 - error TS1036: Statements are not allowed in ambient contexts.

719                 outOfMask = false;
                  ~~~~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:723:36 - error TS1039: Initializers are not allowed in ambient contexts.

723             const mask: Graphics = (displayObject as any)._mask;
                                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:725:17 - error TS1036: Statements are not allowed in ambient contexts.

725                 if (!mask.containsPoint(point)) {
                  ~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:726:21 - error TS1036: 0mStatements are not allowed in ambient contexts.

726                     outOfMask = true;
                      ~~~~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:732:17 - error TS1036: Statements are not allowed in ambient contexts.

732                 if (!displayObject.filterArea.contains(point.x, point.y)) {
                  ~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:733:21 - error TS1036: Statements are not allowed in ambient contexts.

733                     outOfMask = true;
                      ~~~~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:740:52 - error TS1039: Initializers are not allowed in ambient contexts.

740             const children: Array<DisplayObject> = (displayObject as Container).children;
                                                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:742:17 - error TS1036: Statements are not allowed in ambient contexts.

742                 for (let i = children.length - 1; i >= 0; i--) {
                  ~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:742:30 - error TS1039: Initializers are not allowed in ambient contexts.

742                 for (let i = children.length - 1; i >= 0; i--) {
                               ~~~~~~~~~~~~~~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:743:35 - error TS1254: A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.

743                     const child = children[i];
                                    ~~~~~~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:746:38 - error TS1254: A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.

746                     const hitChild = this.recursiveFindHit(point, child, hitTestOrder, interactiveParent, outOfMask);
                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:747:21 - error TS1036: Statements are not allowed in ambient contexts.

747                     if (hitChild) {
                      ~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:750:25 - error TS1036: Statements are not allowed in ambient contexts.

750                         if (!child.parent) {
                          ~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:751:29 - error TS1036: Statements are not allowed in ambient contexts.

751                             continue;
                              ~~~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:762:17 - error TS1036: Statements are not allowed in ambient contexts.

762                 if (!outOfMask) {
                  ~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:765:21 - error TS1036: Statements are not allowed in ambient contexts.

765                     if (hitTestOrder < displayObject.displayOrder) {
                      ~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:767:25 - error TS1036: Statements are not allowed in ambient contexts.

767                         if (displayObject.hitArea) {
                          ~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:768:29 - error TS1036: Statements are not allowed in ambient contexts.

768                             displayObject.worldTransform.applyInverse(point, this._tempPoint);
                              ~~~~~~~~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:770:33 - error TS1036: Statements are not allowed in ambient contexts.

770                                 hit = displayObject.displayOrder;
                                  ~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:773:29 - error TS1036: Statements are not allowed in ambient contexts.

773                             if ((displayObject as any).containsPoint(point)) {
                              ~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:774:33 - error TS1036: Statements are not allowed in ambient contexts.

774                                 hit = displayObject.displayOrder;
                                  ~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:780:25 - error TS1036: Statements are not allowed in ambient contexts.

780                         this._queueAdd(displayObject, hit === Infinity ? 0 : hit);
                          ~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:783:21 - error TS1036: Statements are not allowed in ambient contexts.

783                     if (displayObject.interactive) {
                      ~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:784:25 - error TS1036: Statements are not allowed in ambient contexts.

784                         this._queueAdd(displayObject, 0);
                          ~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:793:9 - error TS1183: An implementation cannot be declared in ambient contexts.

793         {
          ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:794:54 - error TS1039: Initializers are not allowed in ambient contexts.

794             let interactionEvent: InteractionEvent = null;
                                                       ~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:795:32 - error TS1039: Initializers are not allowed in ambient contexts.

795             let point: Point = null;
                                 ~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:798:17 - error TS1036: Statements are not allowed in ambient contexts.

798                 interactionEvent = strangeStuff as InteractionEvent;
                  ~~~~~~~~~~~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:801:17 - error TS1036: Statements are not allowed in ambient contexts.

801                 point = strangeStuff as Point;
                  ~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:808:36 - error TS1183: An implementation cannot be declared in ambient contexts.

808         _startInteractionProcess() {
                                     ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:813:17 - error0m TS1036: Statements are not allowed in ambient contexts.

813                 this._queue = [[], []];
                  ~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:819:64 - error TS1183: An implementation cannot be declared in ambient contexts.

819         _queueAdd(displayObject: DisplayObject, order: number) {
                                                                 ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:820:25 - error TS1039: Initializers are not allowed in ambient contexts.

820             let queue = this._queue;
                          ~~~~~~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:822:17 - error TS1036: Statements are not allowed in ambient contexts.

822                 queue[0].push(displayObject);
                  ~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:824:17 - error TS1036: Statements are not allowed in ambient contexts.

824                 if (order > this._eventDisplayOrder) {
                  ~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:825:21 - error TS1036: Statements are not allowed in ambient contexts.

825                     this._eventDisplayOrder = order;
                      ~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:826:29 - error TS1039: Initializers are not allowed in ambient contexts.

826                     let q = queue[1];
                              ~~~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:827:34 - error TS1039: Initializers are not allowed in ambient contexts.

827                     for (let i = 0, l = q.length; i < l; i++) {
                                   ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:827:41 - error TS1039: Initializers are not allowed in ambient contexts.

827                     for (let i = 0, l = q.length; i < l; i++) {
                                          ~~~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:828:25 - error TS1036: Statements are not allowed in ambient contexts.

828                         queue[0].push(q[i]);
                          ~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:835:76 - error TS1183: An implementation cannot be declared in ambient contexts.

835         _finishInteractionProcess(event: InteractionEvent, func: Function) {
                                                                             ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:836:25 - error TS1039: Initializers are not allowed in ambient contexts.

836             let queue = this._queue;
                          ~~~~~~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:837:21 - error TS1039: Initializers are not allowed in ambient contexts.

837             let q = queue[0];
                      ~~~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:838:26 - error TS1039: Initializers are not allowed in ambient contexts.

838             for (var i = 0, l = q.length; i < l; i++) {
                           ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:838:33 - error TS1039: Initializers are not allowed in ambient contexts.

838             for (var i = 0, l = q.length; i < l; i++) {
                                  ~~~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:839:17 - error TS1036: Statements are not allowed in ambient contexts.

839                 if (event) {
                  ~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:841:21 - error TS1036: Statements are not allowed in ambient contexts.

841                     if (func) {
                      ~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:842:25 - error TS1036: Statements are not allowed in ambient contexts.

842                         func(event, q[i], false);
                          ~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:846:21 - error TS1036: Statements are not allowed in ambient contexts.

846                     func(q[i], false);
                      ~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:850:26 - error TS1039: Initializers are not allowed in ambient contexts.

850             for (var i = 0, l = q.length; i < l; i++) {
                           ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:850:33 - error TS1039: Initializers are not allowed in ambient contexts.

850             for (var i = 0, l = q.length; i < l; i++) {
                                  ~~~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:851:17 - error TS1036: Statements are not allowed in ambient contexts.

851                 if (event) {
                  ~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:853:21 - error TS1036: Statements are not allowed in ambient contexts.

853                     if (!event.target) {
                      ~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:854:25 - error TS1036: Statements are not allowed in ambient contexts.

854                         event.target = q[i];
                          ~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:857:25 - error TS1036: Statements are not allowed in ambient contexts.

857                         func(event, q[i], true);
                          ~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:861:21 - error TS1036: Statements are not allowed in ambient contexts.

861                     func(q[i], true);
                      ~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:884:5 - error TS1036: Statements are not allowed in ambient contexts.

884     (Object as any).assign(PIXI.Renderer.prototype, {
      ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:888:27 - error TS1183: An implementation cannot be declared in ambient contexts.

888         incDisplayOrder() {
                            ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:894:163 - error TS1183: An implementation cannot be declared in ambient contexts.

894         render(displayObject: PIXI.DisplayObject, renderTexture?: PIXI.RenderTexture, clear?: boolean, transform?: PIXI.Transform, skipUpdateTransform?: boolean) {
7m                                                                                                                                                                      ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:896:17 - error TS1036: Statements are not allowed in ambient contexts.

896                 this._lastDisplayOrder = 0;
                  ~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:900:17 - error TS1036: Statements are not allowed in ambient contexts.

900                 (displayObject as Stage).updateStage()
                  ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:907:26 - error TS1039: Initializers are not allowed in ambient contexts.

907     let canvasRenderer = (PIXI as any).CanvasRenderer;
                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:909:9 - error TS1036: Statements are not allowed in ambient contexts.

909         (Object as any).assign(canvasRenderer.prototype, {
          ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:913:31 - error TS1183: An implementation cannot be declared in ambient contexts.

913             incDisplayOrder() {
                                ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:919:167 - error TS1183: An implementation cannot be declared in ambient contexts.

919             render(displayObject: PIXI.DisplayObject, renderTexture?: PIXI.RenderTexture, clear?: boolean, transform?: PIXI.Transform, skipUpdateTransform?: boolean) {
                                                                                                                                                                        ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:921:21 - error TS1036: Statements are not allowed in ambient contexts.

921                     this._lastDisplayOrder = 0;
                      ~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:925:21 - error TS1036: Statements are not allowed in ambient contexts.

925                     (displayObject as Stage).updateStage()
                      ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:942:23 - error TS1183: An implementation cannot be declared in ambient contexts.

942         constructor() {
                        ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:946:46 - error TS1039: Initializers are not allowed in ambient contexts.

946         static _updateOrderCounter: number = 0;
                                               ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:948:19 - error TS1039: Initializers are not allowed in ambient contexts.

948         isStage = true;
                    ~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:950:45 - error TS1039: Initializers are not allowed in ambient contexts.

950         _tempGroups: Array<DisplayObject> = [];
                                              ~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:955:39 - error TS1039: Initializers are not allowed in ambient contexts.

955         _activeLayers: Array<Layer> = [];
                                        ~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:957:37 - error TS1039: Initializers are not allowed in ambient contexts.

957         _activeParentStage: Stage = null;
                                      ~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:963:17 - error TS1183: An implementation cannot be declared in ambient contexts.

963         clear() {
                  ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:968:32 - error TS1183: An implementation cannot be declared in ambient contexts.

968         destroy(options?: any) {
                                 ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:978:53 - error TS1183: An implementation cannot be declared in ambient contexts.

978         _addRecursive(displayObject: DisplayObject) {
                                                      ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:980:17 - error TS1036: Statements are not allowed in ambient contexts.

980                 return;
                  ~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:984:31 - error TS1254: A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.

984                 const layer = displayObject as any as Layer;
                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:985:17 - error TS1036: Statements are not allowed in ambient contexts.

985                 this._activeLayers.push(layer);
                  ~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:990:31 - error TS1254: A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.

990                 const stage = displayObject as Stage;
                                ~~~~~~~~~~~~~~~~~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:991:17 - error TS1036: Statements are not allowed in ambient contexts.

991                 stage.updateAsChildStage(this);
                  ~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:998:25 - error TS1039: Initializers are not allowed in ambient contexts.

998             let group = displayObject.parentGroup;
                          ~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:1000:17 - error TS1036: Statements are not allowed in ambient contexts.

1000                 group.addDisplayObject(this, displayObject);
                   ~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:1002:27 - error TS1254: A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.

1002             const layer = displayObject.parentLayer;
                             ~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:1004:17 - error TS1036: Statements are not allowed in ambient contexts.

1004                 group = layer.group;
                   ~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:1012:17 - error TS1036: Statements are not allowed in ambient contexts.

1012                 return;
                   ~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:1015:30 - error TS1254: A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.

1015             const children = (displayObject as Container).children;
                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:1017:17 - error TS1036: Statements are not allowed in ambient contexts.

1017                 for (let i = 0; i < children.length; i++) {
                   ~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:1017:30 - error TS1039: Initializers are not allowed in ambient contexts.

1017                 for (let i = 0; i < children.length; i++) {
                                ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:1018:21 - error TS1036: Statements are not allowed in ambient contexts.

1018                     this._addRecursive(children[i]);
                       ~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:1023:61 - error TS1183: An implementation cannot be declared in ambient contexts.

1023         _addRecursiveChildren(displayObject: DisplayObject) {
                                                               ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:1026:17 - error TS1036: Statements are not allowed in ambient contexts.

1026                 return;
                   ~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:1028:30 - error TS1254: A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.

1028             const children = (displayObject as Container).children;
                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:1030:17 - error TS1036: Statements are not allowed in ambient contexts.

1030                 for (let i = 0; i < children.length; i++) {
                   ~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:1030:30 - error TS1039: Initializers are not allowed in ambient contexts.

1030                 for (let i = 0; i < children.length; i++) {
                                ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:1031:21 - error TS1036: Statements are not allowed in ambient contexts.

1031                     this._addRecursive(children[i]);
                       ~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:1036:29 - error TS1183: An implementation cannot be declared in ambient contexts.

1036         _updateStageInner() {
                               ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:1039:28 - error TS1254: A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.

1039             const layers = this._activeLayers;
                              ~~~~~~~~~~~~~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:1041:26 - error TS1039: Initializers are not allowed in ambient contexts.

1041             for (let i = 0; i < layers.length; i++) {
                            ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:1042:31 - error TS1254: A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.

1042                 const layer = layers[i];
                                 ~~~~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:1043:17 - error TS1036: Statements are not allowed in ambient contexts.

1043                 if (layer.group.sortPriority) {
                   ~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:1044:21 - error TS1036: Statements are not allowed in ambient contexts.

1044                     layer.endWork();
                       ~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:1045:36 - error TS1254: A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.

1045                     const sorted = layer._sortedChildren;
                                      ~~~~~~~~~~~~~~~~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:1046:34 - error TS1039: Initializers are not allowed in ambient contexts.

1046                     for (let j = 0; j < sorted.length; j++) {
                                    ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:1047:25 - error TS1036: Statements are not allowed in ambient contexts.

1047                         this._addRecursiveChildren(sorted[j]);
                           ~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:1052:26 - error TS1039: Initializers are not allowed in ambient contexts.

1052             for (let i = 0; i < layers.length; i++) {
                            ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:1053:31 - error TS1254: A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.

1053                 const layer = layers[i];
                                 ~~~~~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:1054:17 - error TS1036: Statements are not allowed in ambient contexts.

1054                 if (!layer.group.sortPriority) {
                   ~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:1055:21 - error TS1036: Statements are not allowed in ambient contexts.

1055                     layer.endWork();
                       ~~~~~
node_modules/pixi-layers/dist/pixi-layers.d.ts:1060:42 - error TS1183: An implementation cannot be declared in ambient contexts.

1060         updateAsChildStage(stage: Stage) {
                                            ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:1066:23 - error TS1183: An implementation cannot be declared in ambient contexts.

1066         updateStage() {
                         ~
node_modules/pixi-layers/dist/pixi-layers.d.ts:1076:2 - error TS1036: Statements are not allowed in ambient contexts.

1076  (PIXI as any).display = PIXI.display;

Why are there so many errors? Any ideas?

Was it the thing before 5.3 update?

No its was not present before. It only came with "pixi-layers": "^0.3.0",
for "pixi-layers": "^0.2.3". These errors were not there.
PIXI version in both case is is this ----- >. "pixi.js": "^5.3.3",

wow i see it now, sorry

0.3.1 , please try now

Great..Its working..Thank u so much.

I can't install pixi-layer@0.3.1 and I search it in npm but got the latest version is 0.3.0, did someone unpublish this version in npm?

you need it for pixi-v6, right? @pixi/layers is new name

you need it for pixi-v6, right? @pixi/layers is new name

No, we use it for pixi-v5

According to https://www.npmjs.com/package/pixi-layers , pixi-layers version is 0.3.1

According to https://www.npmjs.com/package/pixi-layers , pixi-layers version is 0.3.1

yeah, but we can not find the version when run “yarn add pixi-layers@^0.3.1” in terminal, and we also can not find the version when search version list using command in terminal. So is this version be purged?

npm install pixi-layers in empty directory gives me 0.3.1

clean your yarn cache

npm install pixi-layers in empty directory gives me 0.3.1

clean your yarn cache

Thanks, Ivan. Seems it blocked by cache.