Pixi.js: Pointer Events Part 3 - Sprites & Texture Swapping

  Рет қаралды 5,407

Dower Chin

Dower Chin

Күн бұрын

Пікірлер: 6
@MrGunz0DZ
@MrGunz0DZ 4 жыл бұрын
I love your playlist, I ll share my little game once I finish the tutorial. About that unexpected interaction at 14:42... I assume you expected when you hold the mouse down, move the pointer away from "girl" and back on you'd keep pointer down texture, but what happened is it changed to pointer over upon entering. This is because onPointerOver() is not checking if pointerIsOver value to set the texture (witch is like the past state of over event). Like in the previous video onPointerOver() should be function doPointerOver(e){ if(!pointerIsOver){ girl.texture = app.loader.resources["over"].texture; pointerisOver = true; } } Much love stay safe in these hard times.
@harm991
@harm991 2 жыл бұрын
texture creation from a spritesheet.png file with fixed width and height?
@martimiz
@martimiz 4 жыл бұрын
Hi, first of all many thanks for a very nice set of tutorials!!! I was just wondering if it is really necessary to implement pointerIsOver? I was thinking that onpointerup you would always be over, because if not you would be onpointerupoutside (which could again never be over). I found no difference on leaving it out. Please tell me where I'm wrong :)
@dowerchin
@dowerchin 4 жыл бұрын
The pointer over event is useful if you want something to happen when the mouse pointer enters the sprite in question. If you don't need that type of event then you can skip it. In my example, the girl does react when the pointer is over, and behaves differently when the pointer is down, while over the sprite.
@martimiz
@martimiz 4 жыл бұрын
thanks for you reply @@dowerchin, I was actually referring to the pointerIsOver flag, not to the pointerover event. I did code along with you, and just couldn't find the need for that particular flag, so I was wondering if I was missing something, is all :)
Pixi.js: Pointer Events Part 1
19:55
Dower Chin
Рет қаралды 8 М.
Pixi.js: Preloading Assets
13:10
Dower Chin
Рет қаралды 16 М.
My Daughter's Dumplings Are Filled With Coins #funny #cute #comedy
00:18
Funny daughter's daily life
Рет қаралды 33 МЛН
Who’s the Real Dad Doll Squid? Can You Guess in 60 Seconds? | Roblox 3D
00:34
I built the same app 10 times // Which JS Framework is best?
21:58
Fireship
Рет қаралды 2,5 МЛН
How I learned Unity without following tutorials (Developing 1)
18:11
Game Maker's Toolkit
Рет қаралды 2 МЛН
Top 6 React Hook Mistakes Beginners Make
21:18
Web Dev Simplified
Рет қаралды 577 М.
Intel's weapon against motherboard companies... will it work?
17:26
JayzTwoCents
Рет қаралды 184 М.
A new approach to container and wrapper classes
25:27
Kevin Powell
Рет қаралды 263 М.
Pixi.js: Parallax Scrolling and Tiling Sprites
14:42
Dower Chin
Рет қаралды 13 М.
JavaScript Pro Tips - Code This, NOT That
12:37
Fireship
Рет қаралды 2,5 МЛН
Writing Code That Runs FAST on a GPU
15:32
Low Level
Рет қаралды 563 М.
Pixi.js: SpriteSheet Animated Movement
19:34
Dower Chin
Рет қаралды 23 М.
There is No Algorithm for Truth - with Tom Scott
59:34
The Royal Institution
Рет қаралды 2,6 МЛН