You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm getting this error in runtime when trying to addChild:
consttextureBunny=awaitAssets.load('https://pixijs.com/assets/bunny.png');constbunny=newSprite(textureBunny);viewport.addChild(bunny)// <-- here the issue happens
Also, typescript complains about type mismatch:
Argument of type 'Sprite' is not assignable to parameter of type 'DisplayObject'.
import*asPIXIfrom'pixi.js'import{Viewport}from'pixi-viewport'constapp=newPIXI.Application()document.body.appendChild(app.view)// create viewportconstviewport=newViewport({screenWidth: window.innerWidth,screenHeight: window.innerHeight,worldWidth: 1000,worldHeight: 1000,events: app.renderer.events// the interaction module is important for wheel to work properly when renderer.view is placed or scaled})// add the viewport to the stageapp.stage.addChild(viewport)// activate pluginsviewport.drag().pinch().wheel().decelerate()// add a red boxconstsprite=viewport.addChild(newPIXI.Sprite(PIXI.Texture.WHITE))sprite.tint=0xff0000sprite.width=sprite.height=100sprite.position.set(100,100)
I'm getting this error in runtime when trying to addChild:
Also, typescript complains about type mismatch:
Argument of type 'Sprite' is not assignable to parameter of type 'DisplayObject'
.Versions:
It well might be directly related to this issue:
The text was updated successfully, but these errors were encountered: