1 |
- {"ast":null,"code":"import { Vector2 } from \"../Maths/math.vector.js\";\n/**\n * Gather the list of pointer event types as constants.\n */\nexport class PointerEventTypes {}\n/**\n * The pointerdown event is fired when a pointer becomes active. For mouse, it is fired when the device transitions from no buttons depressed to at least one button depressed. For touch, it is fired when physical contact is made with the digitizer. For pen, it is fired when the stylus makes physical contact with the digitizer.\n */\nPointerEventTypes.POINTERDOWN = 0x01;\n/**\n * The pointerup event is fired when a pointer is no longer active.\n */\nPointerEventTypes.POINTERUP = 0x02;\n/**\n * The pointermove event is fired when a pointer changes coordinates.\n */\nPointerEventTypes.POINTERMOVE = 0x04;\n/**\n * The pointerwheel event is fired when a mouse wheel has been rotated.\n */\nPointerEventTypes.POINTERWHEEL = 0x08;\n/**\n * The pointerpick event is fired when a mesh or sprite has been picked by the pointer.\n */\nPointerEventTypes.POINTERPICK = 0x10;\n/**\n * The pointertap event is fired when a the object has been touched and released without drag.\n */\nPointerEventTypes.POINTERTAP = 0x20;\n/**\n * The pointerdoubletap event is fired when a the object has been touched and released twice without drag.\n */\nPointerEventTypes.POINTERDOUBLETAP = 0x40;\n/**\n * Base class of pointer info types.\n */\nexport class PointerInfoBase {\n /**\n * Instantiates the base class of pointers info.\n * @param type Defines the type of event (PointerEventTypes)\n * @param event Defines the related dom event\n */\n constructor(\n /**\n * Defines the type of event (PointerEventTypes)\n */\n type,\n /**\n * Defines the related dom event\n */\n event) {\n this.type = type;\n this.event = event;\n }\n}\n/**\n * This class is used to store pointer related info for the onPrePointerObservable event.\n * Set the skipOnPointerObservable property to true if you want the engine to stop any process after this event is triggered, even not calling onPointerObservable\n */\nexport class PointerInfoPre extends PointerInfoBase {\n /**\n * Instantiates a PointerInfoPre to store pointer related info to the onPrePointerObservable event.\n * @param type Defines the type of event (PointerEventTypes)\n * @param event Defines the related dom event\n * @param localX Defines the local x coordinates of the pointer when the event occured\n * @param localY Defines the local y coordinates of the pointer when the event occured\n */\n constructor(type, event, localX, localY) {\n super(type, event);\n /**\n * Ray from a pointer if available (eg. 6dof controller)\n */\n this.ray = null;\n /**\n * The original picking info that was used to trigger the pointer event\n */\n this.originalPickingInfo = null;\n this.skipOnPointerObservable = false;\n this.localPosition = new Vector2(localX, localY);\n }\n}\n/**\n * This type contains all the data related to a pointer event in Babylon.js.\n * The event member is an instance of PointerEvent for all types except PointerWheel and is of type MouseWheelEvent when type equals PointerWheel. The different event types can be found in the PointerEventTypes class.\n */\nexport class PointerInfo extends PointerInfoBase {\n /**\n * Defines the picking info associated with this PointerInfo object (if applicable)\n */\n get pickInfo() {\n if (!this._pickInfo) {\n this._generatePickInfo();\n }\n return this._pickInfo;\n }\n /**\n * Instantiates a PointerInfo to store pointer related info to the onPointerObservable event.\n * @param type Defines the type of event (PointerEventTypes)\n * @param event Defines the related dom event\n * @param pickInfo Defines the picking info associated to the info (if any)\n * @param inputManager Defines the InputManager to use if there is no pickInfo\n */\n constructor(type, event, pickInfo, inputManager = null) {\n super(type, event);\n this._pickInfo = pickInfo;\n this._inputManager = inputManager;\n }\n /**\n * Generates the picking info if needed\n */\n /** @internal */\n _generatePickInfo() {\n if (this._inputManager) {\n this._pickInfo = this._inputManager._pickMove(this.event);\n this._inputManager._setRayOnPointerInfo(this._pickInfo, this.event);\n this._inputManager = null;\n }\n }\n}","map":{"version":3,"names":["Vector2","PointerEventTypes","POINTERDOWN","POINTERUP","POINTERMOVE","POINTERWHEEL","POINTERPICK","POINTERTAP","POINTERDOUBLETAP","PointerInfoBase","constructor","type","event","PointerInfoPre","localX","localY","ray","originalPickingInfo","skipOnPointerObservable","localPosition","PointerInfo","pickInfo","_pickInfo","_generatePickInfo","inputManager","_inputManager","_pickMove","_setRayOnPointerInfo"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/Events/pointerEvents.js"],"sourcesContent":["import { Vector2 } from \"../Maths/math.vector.js\";\n/**\n * Gather the list of pointer event types as constants.\n */\nexport class PointerEventTypes {\n}\n/**\n * The pointerdown event is fired when a pointer becomes active. For mouse, it is fired when the device transitions from no buttons depressed to at least one button depressed. For touch, it is fired when physical contact is made with the digitizer. For pen, it is fired when the stylus makes physical contact with the digitizer.\n */\nPointerEventTypes.POINTERDOWN = 0x01;\n/**\n * The pointerup event is fired when a pointer is no longer active.\n */\nPointerEventTypes.POINTERUP = 0x02;\n/**\n * The pointermove event is fired when a pointer changes coordinates.\n */\nPointerEventTypes.POINTERMOVE = 0x04;\n/**\n * The pointerwheel event is fired when a mouse wheel has been rotated.\n */\nPointerEventTypes.POINTERWHEEL = 0x08;\n/**\n * The pointerpick event is fired when a mesh or sprite has been picked by the pointer.\n */\nPointerEventTypes.POINTERPICK = 0x10;\n/**\n * The pointertap event is fired when a the object has been touched and released without drag.\n */\nPointerEventTypes.POINTERTAP = 0x20;\n/**\n * The pointerdoubletap event is fired when a the object has been touched and released twice without drag.\n */\nPointerEventTypes.POINTERDOUBLETAP = 0x40;\n/**\n * Base class of pointer info types.\n */\nexport class PointerInfoBase {\n /**\n * Instantiates the base class of pointers info.\n * @param type Defines the type of event (PointerEventTypes)\n * @param event Defines the related dom event\n */\n constructor(\n /**\n * Defines the type of event (PointerEventTypes)\n */\n type, \n /**\n * Defines the related dom event\n */\n event) {\n this.type = type;\n this.event = event;\n }\n}\n/**\n * This class is used to store pointer related info for the onPrePointerObservable event.\n * Set the skipOnPointerObservable property to true if you want the engine to stop any process after this event is triggered, even not calling onPointerObservable\n */\nexport class PointerInfoPre extends PointerInfoBase {\n /**\n * Instantiates a PointerInfoPre to store pointer related info to the onPrePointerObservable event.\n * @param type Defines the type of event (PointerEventTypes)\n * @param event Defines the related dom event\n * @param localX Defines the local x coordinates of the pointer when the event occured\n * @param localY Defines the local y coordinates of the pointer when the event occured\n */\n constructor(type, event, localX, localY) {\n super(type, event);\n /**\n * Ray from a pointer if available (eg. 6dof controller)\n */\n this.ray = null;\n /**\n * The original picking info that was used to trigger the pointer event\n */\n this.originalPickingInfo = null;\n this.skipOnPointerObservable = false;\n this.localPosition = new Vector2(localX, localY);\n }\n}\n/**\n * This type contains all the data related to a pointer event in Babylon.js.\n * The event member is an instance of PointerEvent for all types except PointerWheel and is of type MouseWheelEvent when type equals PointerWheel. The different event types can be found in the PointerEventTypes class.\n */\nexport class PointerInfo extends PointerInfoBase {\n /**\n * Defines the picking info associated with this PointerInfo object (if applicable)\n */\n get pickInfo() {\n if (!this._pickInfo) {\n this._generatePickInfo();\n }\n return this._pickInfo;\n }\n /**\n * Instantiates a PointerInfo to store pointer related info to the onPointerObservable event.\n * @param type Defines the type of event (PointerEventTypes)\n * @param event Defines the related dom event\n * @param pickInfo Defines the picking info associated to the info (if any)\n * @param inputManager Defines the InputManager to use if there is no pickInfo\n */\n constructor(type, event, pickInfo, inputManager = null) {\n super(type, event);\n this._pickInfo = pickInfo;\n this._inputManager = inputManager;\n }\n /**\n * Generates the picking info if needed\n */\n /** @internal */\n _generatePickInfo() {\n if (this._inputManager) {\n this._pickInfo = this._inputManager._pickMove(this.event);\n this._inputManager._setRayOnPointerInfo(this._pickInfo, this.event);\n this._inputManager = null;\n }\n }\n}\n"],"mappings":"AAAA,SAASA,OAAO,QAAQ,yBAAyB;AACjD;AACA;AACA;AACA,OAAO,MAAMC,iBAAiB,CAAC;AAE/B;AACA;AACA;AACAA,iBAAiB,CAACC,WAAW,GAAG,IAAI;AACpC;AACA;AACA;AACAD,iBAAiB,CAACE,SAAS,GAAG,IAAI;AAClC;AACA;AACA;AACAF,iBAAiB,CAACG,WAAW,GAAG,IAAI;AACpC;AACA;AACA;AACAH,iBAAiB,CAACI,YAAY,GAAG,IAAI;AACrC;AACA;AACA;AACAJ,iBAAiB,CAACK,WAAW,GAAG,IAAI;AACpC;AACA;AACA;AACAL,iBAAiB,CAACM,UAAU,GAAG,IAAI;AACnC;AACA;AACA;AACAN,iBAAiB,CAACO,gBAAgB,GAAG,IAAI;AACzC;AACA;AACA;AACA,OAAO,MAAMC,eAAe,CAAC;EACzB;AACJ;AACA;AACA;AACA;EACIC,WAAWA;EACX;AACJ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C;MACzD,IAAI,CAACa,aAAa,CAACE,oBAAoB,CAAC,IAAI,CAACL,SAAS,EAAE,IAAI,CAACV,KAAK,CAAC;MACnE,IAAI,CAACa,aAAa,GAAG,IAAI;IAC7B;EACJ;AACJ","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}
|