Download pool/shard002/JavaScript/0012711_PointerOverEvent.js from Variable-role/sajaniemi_variable_dataset_large: direct link, hf CLI and curl.
- Browser
- Download file 1.21 kB
-
https://huggingface.co/datasets/Variable-role/sajaniemi_variable_dataset_large/resolve/main/pool/shard002/JavaScript/0012711_PointerOverEvent.js
- Command line
-
hf download hf://datasets/Variable-role/sajaniemi_variable_dataset_large/pool/shard002/JavaScript/0012711_PointerOverEvent.js
-
curl -L -o 0012711_PointerOverEvent.js https://huggingface.co/datasets/Variable-role/sajaniemi_variable_dataset_large/resolve/main/pool/shard002/JavaScript/0012711_PointerOverEvent.js
1.21 kB
| var Class = require('../../../utils/Class'); | |
| var Event = require('../../../events/Event'); | |
| var PointerOverEvent = new Class({ | |
| Extends: Event, | |
| initialize: | |
| function PointerOverEvent (pointer, gameObjects) | |
| { | |
| Event.call(this, 'POINTER_OVER_EVENT'); | |
| // The Pointer that triggered the event | |
| this.pointer = pointer; | |
| // The native DOM event (MouseEvent, TouchEvent, etc) | |
| this.event = pointer.event; | |
| // The camera on which the input event occurred | |
| this.camera = pointer.camera; | |
| // The x/y coordinates of the event | |
| this.x = pointer.x; | |
| this.y = pointer.y; | |
| // An array of all the game objects the pointer event occurred on in display list order. | |
| // Will be undefined if no objects were interacted with. | |
| // If populated, the bottom element (list[0]) is the highest object on the display list. | |
| // If InputManager.topOnly is true this array will only contain one element. | |
| this.list = gameObjects; | |
| // A reference to the top-most object on the display list (also this.list[0]) | |
| this.gameObject = gameObjects[0]; | |
| } | |
| }); | |
| module.exports = PointerOverEvent; | |