mirror of
https://github.com/photonstorm/phaser
synced 2024-12-25 12:33:38 +00:00
1 line
No EOL
15 KiB
JSON
1 line
No EOL
15 KiB
JSON
{"class":{"name":"Phaser.Pointer","extends":"","static":false,"constructor":true,"parameters":[{"name":"game","type":["Phaser.Game"],"help":"A reference to the currently running game.","optional":false,"default":null},{"name":"id","type":["number"],"help":"The ID of the Pointer object within the game. Each game can have up to 10 active pointers.","optional":false,"default":null}],"help":"A Pointer object is used by the Mouse, Touch and MSPoint managers and represents a single finger on the touch screen."},"consts":[],"methods":{"public":[{"name":"justPressed","static":false,"returns":{"types":["boolean"],"help":"true if the Pointer was pressed down within the duration given."},"help":"The Pointer is considered justPressed if the time it was pressed onto the touchscreen or clicked is less than justPressedRate.\\nNote that calling justPressed doesn't reset the pressed status of the Pointer, it will return `true` for as long as the duration is valid.\\nIf you wish to check if the Pointer was pressed down just once then see the Sprite.events.onInputDown event.","line":648,"public":true,"protected":false,"private":false,"parameters":[{"name":"duration","type":["number"],"help":"The time to check against. If none given it will use InputManager.justPressedRate.","optional":true,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"justReleased","static":false,"returns":{"types":["boolean"],"help":"true if the Pointer was released within the duration given."},"help":"The Pointer is considered justReleased if the time it left the touchscreen is less than justReleasedRate.\\nNote that calling justReleased doesn't reset the pressed status of the Pointer, it will return `true` for as long as the duration is valid.\\nIf you wish to check if the Pointer was released just once then see the Sprite.events.onInputUp event.","line":664,"public":true,"protected":false,"private":false,"parameters":[{"name":"duration","type":["number"],"help":"The time to check against. If none given it will use InputManager.justReleasedRate.","optional":true,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"leave","static":false,"returns":null,"help":"Called when the Pointer leaves the target area.","line":567,"public":true,"protected":false,"private":false,"parameters":[{"name":"event","type":["MouseEvent","PointerEvent","TouchEvent"],"help":"The event passed up from the input handler.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"move","static":false,"returns":null,"help":"Called when the Pointer is moved.","line":375,"public":true,"protected":false,"private":false,"parameters":[{"name":"event","type":["MouseEvent","PointerEvent","TouchEvent"],"help":"The event passed up from the input handler.","optional":false,"default":null},{"name":"fromClick","type":["boolean"],"help":"Was this called from the click event?","optional":true,"default":"false"}],"inherited":false,"inheritedFrom":""},{"name":"reset","static":false,"returns":null,"help":"Resets the Pointer properties. Called by InputManager.reset when you perform a State change.","line":676,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"resetMovement","static":false,"returns":null,"help":"Resets the movementX and movementY properties. Use in your update handler after retrieving the values.","line":706,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"start","static":false,"returns":null,"help":"Called when the Pointer is pressed onto the touchscreen.","line":261,"public":true,"protected":false,"private":false,"parameters":[{"name":"event","type":["any"],"help":"The DOM event from the browser.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"stop","static":false,"returns":null,"help":"Called when the Pointer leaves the touchscreen.","line":580,"public":true,"protected":false,"private":false,"parameters":[{"name":"event","type":["MouseEvent","PointerEvent","TouchEvent"],"help":"The event passed up from the input handler.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"update","static":false,"returns":null,"help":"Called by the Input Manager.","line":324,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""}],"protected":[{"name":"processInteractiveObjects","static":false,"returns":{"types":["boolean"],"help":"True if this method processes an object (i.e. a Sprite becomes the Pointers currentTarget), otherwise false."},"help":"Process all interactive objects to find out which ones were updated in the recent Pointer move.","line":464,"public":false,"protected":true,"private":false,"parameters":[{"name":"fromClick","type":["boolean"],"help":"Was this called from the click event?","optional":true,"default":"false"}],"inherited":false,"inheritedFrom":""}],"private":[],"static":[]},"properties":{"public":[{"name":"active","type":["boolean"],"help":"","inlineHelp":"An active pointer is one that is currently pressed down on the display. A Mouse is always active.","line":217,"default":"false","public":true,"protected":false,"private":false,"readOnly":false},{"name":"button","type":["any"],"help":"","inlineHelp":"The button property of the Pointer as set by the DOM event when this Pointer is started.","line":61,"default":"null","public":true,"protected":false,"private":false,"readOnly":false},{"name":"circle","type":["Phaser.Circle"],"help":"A Phaser.Circle that is centered on the x\/y coordinates of this pointer, useful for hit detection.\\nThe Circle size is 44px (Apples recommended \"finger tip\" size).","inlineHelp":"","line":245,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"clientX","type":["number"],"help":"","inlineHelp":"The horizontal coordinate of the Pointer within the application's client area at which the event occurred (as opposed to the coordinates within the page).","line":96,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"clientY","type":["number"],"help":"","inlineHelp":"The vertical coordinate of the Pointer within the application's client area at which the event occurred (as opposed to the coordinates within the page).","line":101,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"dirty","type":["boolean"],"help":"","inlineHelp":"A dirty pointer needs to re-poll any interactive objects it may have been over, regardless if it has moved or not.","line":223,"default":"false","public":true,"protected":false,"private":false,"readOnly":false},{"name":"duration","type":["number"],"help":"Gets the Y value of this Pointer in world coordinates based on the world camera.","inlineHelp":"The Y value of this Pointer in world coordinates based on the world camera.","line":760,"default":null,"public":true,"protected":false,"private":false,"readOnly":true},{"name":"exists","type":["boolean"],"help":"","inlineHelp":"A Pointer object that exists is allowed to be checked for physics collisions and overlaps.","line":37,"default":"true","public":true,"protected":false,"private":false,"readOnly":false},{"name":"game","type":["Phaser.Game"],"help":"","inlineHelp":"A reference to the currently running game.","line":20,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"id","type":["number"],"help":"","inlineHelp":"The ID of the Pointer object within the game. Each game can have up to 10 active pointers.","line":25,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"identifier","type":["number"],"help":"","inlineHelp":"The identifier property of the Pointer as set by the DOM event when this Pointer is started.","line":43,"default":"0","public":true,"protected":false,"private":false,"readOnly":false},{"name":"isDown","type":["boolean"],"help":"","inlineHelp":"If the Pointer is touching the touchscreen, or the mouse button is held down, isDown is set to true.","line":169,"default":"false","public":true,"protected":false,"private":false,"readOnly":false},{"name":"isMouse","type":["boolean"],"help":"","inlineHelp":"If the Pointer is a mouse this is true, otherwise false.","line":163,"default":"false","public":true,"protected":false,"private":false,"readOnly":false},{"name":"isUp","type":["boolean"],"help":"","inlineHelp":"If the Pointer is not touching the touchscreen, or the mouse button is up, isUp is set to true.","line":175,"default":"true","public":true,"protected":false,"private":false,"readOnly":false},{"name":"movementX","type":["number"],"help":"","inlineHelp":"The horizontal processed relative movement of the Pointer in pixels since last event.","line":139,"default":"0","public":true,"protected":false,"private":false,"readOnly":false},{"name":"movementY","type":["number"],"help":"","inlineHelp":"The vertical processed relative movement of the Pointer in pixels since last event.","line":145,"default":"0","public":true,"protected":false,"private":false,"readOnly":false},{"name":"msSinceLastClick","type":["number"],"help":"","inlineHelp":"The number of milliseconds since the last click or touch event.","line":205,"default":"Number.MAX_VALUE","public":true,"protected":false,"private":false,"readOnly":false},{"name":"pageX","type":["number"],"help":"","inlineHelp":"The horizontal coordinate of the Pointer relative to whole document.","line":106,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"pageY","type":["number"],"help":"","inlineHelp":"The vertical coordinate of the Pointer relative to whole document.","line":111,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"pointerId","type":["number"],"help":"","inlineHelp":"The pointerId property of the Pointer as set by the DOM event when this Pointer is started. The browser can and will recycle this value.","line":49,"default":"null","public":true,"protected":false,"private":false,"readOnly":false},{"name":"position","type":["Phaser.Point"],"help":"","inlineHelp":"A Phaser.Point object containing the current x\/y values of the pointer on the display.","line":228,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"positionDown","type":["Phaser.Point"],"help":"","inlineHelp":"A Phaser.Point object containing the x\/y values of the pointer when it was last in a down state on the display.","line":233,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"positionUp","type":["Phaser.Point"],"help":"","inlineHelp":"A Phaser.Point object containing the x\/y values of the pointer when it was last released.","line":238,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"previousTapTime","type":["number"],"help":"","inlineHelp":"A timestamp representing when the Pointer was last tapped or clicked.","line":193,"default":"0","public":true,"protected":false,"private":false,"readOnly":false},{"name":"rawMovementX","type":["number"],"help":"","inlineHelp":"The horizontal raw relative movement of the Pointer in pixels since last event.","line":127,"default":"0","public":true,"protected":false,"private":false,"readOnly":false},{"name":"rawMovementY","type":["number"],"help":"","inlineHelp":"The vertical raw relative movement of the Pointer in pixels since last event.","line":133,"default":"0","public":true,"protected":false,"private":false,"readOnly":false},{"name":"screenX","type":["number"],"help":"","inlineHelp":"The horizontal coordinate of the Pointer relative to the screen.","line":116,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"screenY","type":["number"],"help":"","inlineHelp":"The vertical coordinate of the Pointer relative to the screen.","line":121,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"target","type":["any"],"help":"","inlineHelp":"The target property of the Pointer as set by the DOM event when this Pointer is started.","line":55,"default":"null","public":true,"protected":false,"private":false,"readOnly":false},{"name":"targetObject","type":["any"],"help":"","inlineHelp":"The Game Object this Pointer is currently over \/ touching \/ dragging.","line":211,"default":"null","public":true,"protected":false,"private":false,"readOnly":false},{"name":"timeDown","type":["number"],"help":"","inlineHelp":"A timestamp representing when the Pointer first touched the touchscreen.","line":181,"default":"0","public":true,"protected":false,"private":false,"readOnly":false},{"name":"timeUp","type":["number"],"help":"","inlineHelp":"A timestamp representing when the Pointer left the touchscreen.","line":187,"default":"0","public":true,"protected":false,"private":false,"readOnly":false},{"name":"totalTouches","type":["number"],"help":"","inlineHelp":"The total number of times this Pointer has been touched to the touchscreen.","line":199,"default":"0","public":true,"protected":false,"private":false,"readOnly":false},{"name":"type","type":["number"],"help":"","inlineHelp":"The const type of this object.","line":31,"default":null,"public":true,"protected":false,"private":false,"readOnly":true},{"name":"withinGame","type":["boolean"],"help":"","inlineHelp":"true if the Pointer is over the game canvas, otherwise false.","line":91,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"x","type":["number"],"help":"","inlineHelp":"The horizontal coordinate of the Pointer. This value is automatically scaled based on the game scale.","line":151,"default":"-1","public":true,"protected":false,"private":false,"readOnly":false},{"name":"y","type":["number"],"help":"","inlineHelp":"The vertical coordinate of the Pointer. This value is automatically scaled based on the game scale.","line":157,"default":"-1","public":true,"protected":false,"private":false,"readOnly":false}],"protected":[],"private":[{"name":"_history","type":["array"],"help":"","inlineHelp":"Local private variable storing the short-term history of pointer movements.","line":74,"default":null,"public":false,"protected":false,"private":true,"readOnly":false},{"name":"_holdSent","type":["boolean"],"help":"","inlineHelp":"Local private variable to store the status of dispatching a hold event.","line":68,"default":"false","public":false,"protected":false,"private":true,"readOnly":false},{"name":"_nextDrop","type":["number"],"help":"","inlineHelp":"Local private variable storing the time at which the next history drop should occur.","line":80,"default":null,"public":false,"protected":false,"private":true,"readOnly":false},{"name":"_stateReset","type":["boolean"],"help":"","inlineHelp":"Monitor events outside of a state reset loop.","line":86,"default":null,"public":false,"protected":false,"private":true,"readOnly":false}]}} |