really appreciate this. Amazing tutorial series! One question regarding intetellisese. My VSCode intellisense does'nt seem to recognize the PIXI commands. How did you get yours to work with PIXI? Cheers and keep up the good work!
So I noticed a bit of lag, you can reduce this a by forcing a render when the mouse moves using app.render() otherwise I believe this happens during the next animation tick
It's now for some reason doesn't pass event further moving object itself. Only works above yellow brick for me. version 7 Found out that it happens because now you can really interact with stage itself properly and you gotta use window events or use another layer like background with might be invisible and the size of your canvas. like this: const bg = PIXI.Sprite.from(PIXI.Texture.WHITE); bg.width = app.view.width; bg.height = app.view.height; bg.opacity = 0 app.stage.addChild(bg); bg.anchor.set(0.5) bg.x = app.view.width / 2 bg.y = app.view.height / 2 bg.interactive = true bg.on(`pointermove`, movePlayer)
There are some big changes in 7. I've not had a chance to review them myself, so I'll need to update these videos for the changes. I hope to be able to get to this soon.
Problem with PixiJS is the documentation, i must dig deep into the sprite API to finds out how the coordinate system is implemented
Awesome, kind of what I was gonna try.
Thanks!
I get error "has been blocked by CORS policy:"
After installing openserver and run like website it is gone;
Perfect.
How can i install openserver??
really appreciate this. Amazing tutorial series!
One question regarding intetellisese. My VSCode intellisense does'nt seem to recognize the PIXI commands. How did you get yours to work with PIXI?
Cheers and keep up the good work!
my player doesn't move when mouse pointer gets outside it's bounds.
Cool, thank you
PIXI.Applpication is not a constructor
()
let player = PIXI.Sprite.from("images/player.png");
drop the "new" and it will work. I'm using version 7.
app.stage.hitArea = app.screen
to get it to work without dropping the object
So I noticed a bit of lag, you can reduce this a by forcing a render when the mouse moves using app.render() otherwise I believe this happens during the next animation tick
would you mind if you share src code
It's now for some reason doesn't pass event further moving object itself. Only works above yellow brick for me.
version 7
Found out that it happens because now you can really interact with stage itself properly and you gotta use window events or use another layer like background with might be invisible and the size of your canvas.
like this:
const bg = PIXI.Sprite.from(PIXI.Texture.WHITE);
bg.width = app.view.width;
bg.height = app.view.height;
bg.opacity = 0
app.stage.addChild(bg);
bg.anchor.set(0.5)
bg.x = app.view.width / 2
bg.y = app.view.height / 2
bg.interactive = true
bg.on(`pointermove`, movePlayer)
There are some big changes in 7. I've not had a chance to review them myself, so I'll need to update these videos for the changes. I hope to be able to get to this soon.
I'm getting loads of errors...I imagine it's because I'm using Pixi V5 though 🤔
install any server and run like website