how to get click duration on pointerdown PhaserJs 3

19
December 17, 2018, at 00:20 AM

I want to get duration in real time while the user is clicking on a sprite with the event on pointerdown.

As I can see from PhaserJs v2 examples you can do this in that way game.input.activePointer.duration

Instead of that I need to get the duration when the user is clicking on the sprite. My code with the event is

sprite.on('pointerdown', e => {
        console.log(game.input.activePointer.duration);
});

This code in PhaserJs 3 returns undefined. I want to calculate the time that the user clicks down on pointerdown event and not in pointerup.

READ ALSO
How to send scheduled email in javascript?

How to send scheduled email in javascript?

I'm using SMTPJS to send emails by Gmail SMTPHere my simple work code:

60
page not rendering on first click

page not rendering on first click

simple program that grabs user information from an external APIGrabs user info and stores to database just fine, but unsure why click handler that submits username has to be clicked twice

24
Whats Wrong with LINK_TO , i use laravel V5.2

Whats Wrong with LINK_TO , i use laravel V5.2

this error enter image description here

26
Optimizing RabbitMQ consumers to consume in batch

Optimizing RabbitMQ consumers to consume in batch

I have an application where on every message consumption I need to query the MySQL database for some information and based on that process the consumed messageI would want to optimize this so as to prevent multiple queries on the database adding up to the load

43