Comparing version 2.0.1 to 2.1.1
@@ -224,2 +224,7 @@ 'use strict'; | ||
get html_position() | ||
{ | ||
return this.position_array.get_first(); | ||
} | ||
get previous_position() | ||
@@ -349,2 +354,3 @@ { | ||
{ | ||
this.region = region; | ||
this.left_mouse_button_pressed = false; | ||
@@ -370,2 +376,4 @@ this.left_mouse_button_down = false; | ||
this.pointers = [this.pointer]; | ||
this.scroll_delta = 0; | ||
@@ -381,12 +389,3 @@ } | ||
{ | ||
if (this.left_mouse_button_down || | ||
this.right_mouse_button_down || | ||
this.middle_mouse_button_down) | ||
{ | ||
return 1; | ||
} | ||
else | ||
{ | ||
return 0; | ||
} | ||
return 1; | ||
} | ||
@@ -569,2 +568,17 @@ | ||
} | ||
get_primary_html_pointer_position() | ||
{ | ||
return this.pointer.html_position; | ||
} | ||
get_primary_pointer_NDC() | ||
{ | ||
return this.pointer.NDC; | ||
} | ||
get_primary_pointer_html_NDC() | ||
{ | ||
return this.pointer.html_NDC; | ||
} | ||
} | ||
@@ -722,2 +736,20 @@ | ||
get_primary_pointer_NDC() | ||
{ | ||
const pos = this.get_primary_pointer_position(); | ||
return this.region.transform_pos_to_NDC(pos); | ||
} | ||
get_primary_pointer_html_NDC() | ||
{ | ||
const pos = this.get_primary_html_pointer_position(); | ||
return this.region.transform_pos_to_NDC(pos); | ||
} | ||
get_primary_html_pointer_position() | ||
{ | ||
const pos = this.get_primary_pointer_position(); | ||
return this.region.invert_y(pos); | ||
} | ||
get pointer_pos_delta() | ||
@@ -1168,2 +1200,7 @@ { | ||
get pointers() | ||
{ | ||
return this.active_input_module.pointers; | ||
} | ||
get pointer_pos() | ||
@@ -1174,2 +1211,7 @@ { | ||
get html_pointer_pos() | ||
{ | ||
return this.active_input_module.get_primary_html_pointer_position(); | ||
} | ||
get pointer_pos_delta() | ||
@@ -1182,3 +1224,3 @@ { | ||
{ | ||
return this.active_input_module.get_primary_pointer().NDC; | ||
return this.active_input_module.get_primary_pointer_NDC(); | ||
} | ||
@@ -1188,3 +1230,3 @@ | ||
{ | ||
return this.active_input_module.get_primary_pointer().html_NDC; | ||
return this.active_input_module.get_primary_pointer_html_NDC(); | ||
} | ||
@@ -1199,3 +1241,3 @@ | ||
{ | ||
return this.invert_y(this.transform_pos_to_subregion(this.active_input_module.pointer_center)); | ||
return this.active_input_module.pointer_center; | ||
} | ||
@@ -1202,0 +1244,0 @@ |
@@ -220,2 +220,7 @@ class Vector2 | ||
get html_position() | ||
{ | ||
return this.position_array.get_first(); | ||
} | ||
get previous_position() | ||
@@ -345,2 +350,3 @@ { | ||
{ | ||
this.region = region; | ||
this.left_mouse_button_pressed = false; | ||
@@ -366,2 +372,4 @@ this.left_mouse_button_down = false; | ||
this.pointers = [this.pointer]; | ||
this.scroll_delta = 0; | ||
@@ -377,12 +385,3 @@ } | ||
{ | ||
if (this.left_mouse_button_down || | ||
this.right_mouse_button_down || | ||
this.middle_mouse_button_down) | ||
{ | ||
return 1; | ||
} | ||
else | ||
{ | ||
return 0; | ||
} | ||
return 1; | ||
} | ||
@@ -565,2 +564,17 @@ | ||
} | ||
get_primary_html_pointer_position() | ||
{ | ||
return this.pointer.html_position; | ||
} | ||
get_primary_pointer_NDC() | ||
{ | ||
return this.pointer.NDC; | ||
} | ||
get_primary_pointer_html_NDC() | ||
{ | ||
return this.pointer.html_NDC; | ||
} | ||
} | ||
@@ -718,2 +732,20 @@ | ||
get_primary_pointer_NDC() | ||
{ | ||
const pos = this.get_primary_pointer_position(); | ||
return this.region.transform_pos_to_NDC(pos); | ||
} | ||
get_primary_pointer_html_NDC() | ||
{ | ||
const pos = this.get_primary_html_pointer_position(); | ||
return this.region.transform_pos_to_NDC(pos); | ||
} | ||
get_primary_html_pointer_position() | ||
{ | ||
const pos = this.get_primary_pointer_position(); | ||
return this.region.invert_y(pos); | ||
} | ||
get pointer_pos_delta() | ||
@@ -1164,2 +1196,7 @@ { | ||
get pointers() | ||
{ | ||
return this.active_input_module.pointers; | ||
} | ||
get pointer_pos() | ||
@@ -1170,2 +1207,7 @@ { | ||
get html_pointer_pos() | ||
{ | ||
return this.active_input_module.get_primary_html_pointer_position(); | ||
} | ||
get pointer_pos_delta() | ||
@@ -1178,3 +1220,3 @@ { | ||
{ | ||
return this.active_input_module.get_primary_pointer().NDC; | ||
return this.active_input_module.get_primary_pointer_NDC(); | ||
} | ||
@@ -1184,3 +1226,3 @@ | ||
{ | ||
return this.active_input_module.get_primary_pointer().html_NDC; | ||
return this.active_input_module.get_primary_pointer_html_NDC(); | ||
} | ||
@@ -1195,3 +1237,3 @@ | ||
{ | ||
return this.invert_y(this.transform_pos_to_subregion(this.active_input_module.pointer_center)); | ||
return this.active_input_module.pointer_center; | ||
} | ||
@@ -1198,0 +1240,0 @@ |
{ | ||
"name": "pit-js", | ||
"version": "2.0.1", | ||
"version": "2.1.1", | ||
"description": "Pollable Input", | ||
@@ -5,0 +5,0 @@ "module": "examples/build/PIT.module.js", |
@@ -235,2 +235,7 @@ import MouseInputModule from './MouseInputModule'; | ||
get pointers() | ||
{ | ||
return this.active_input_module.pointers; | ||
} | ||
get pointer_pos() | ||
@@ -241,2 +246,7 @@ { | ||
get html_pointer_pos() | ||
{ | ||
return this.active_input_module.get_primary_html_pointer_position(); | ||
} | ||
get pointer_pos_delta() | ||
@@ -249,3 +259,3 @@ { | ||
{ | ||
return this.active_input_module.get_primary_pointer().NDC; | ||
return this.active_input_module.get_primary_pointer_NDC(); | ||
} | ||
@@ -255,3 +265,3 @@ | ||
{ | ||
return this.active_input_module.get_primary_pointer().html_NDC; | ||
return this.active_input_module.get_primary_pointer_html_NDC(); | ||
} | ||
@@ -266,3 +276,3 @@ | ||
{ | ||
return this.invert_y(this.transform_pos_to_subregion(this.active_input_module.pointer_center)); | ||
return this.active_input_module.pointer_center; | ||
} | ||
@@ -269,0 +279,0 @@ |
@@ -8,2 +8,3 @@ import Pointer from './Pointer'; | ||
{ | ||
this.region = region; | ||
this.left_mouse_button_pressed = false; | ||
@@ -29,2 +30,4 @@ this.left_mouse_button_down = false; | ||
this.pointers = [this.pointer]; | ||
this.scroll_delta = 0; | ||
@@ -40,12 +43,3 @@ } | ||
{ | ||
if (this.left_mouse_button_down || | ||
this.right_mouse_button_down || | ||
this.middle_mouse_button_down) | ||
{ | ||
return 1; | ||
} | ||
else | ||
{ | ||
return 0; | ||
} | ||
return 1; | ||
} | ||
@@ -233,2 +227,17 @@ | ||
} | ||
get_primary_html_pointer_position() | ||
{ | ||
return this.pointer.html_position; | ||
} | ||
get_primary_pointer_NDC() | ||
{ | ||
return this.pointer.NDC; | ||
} | ||
get_primary_pointer_html_NDC() | ||
{ | ||
return this.pointer.html_NDC; | ||
} | ||
} |
@@ -28,2 +28,7 @@ import { Vector2 } from './Vector2'; | ||
get html_position() | ||
{ | ||
return this.position_array.get_first(); | ||
} | ||
get previous_position() | ||
@@ -30,0 +35,0 @@ { |
@@ -80,2 +80,20 @@ import { Vector2 } from './Vector2'; | ||
get_primary_pointer_NDC() | ||
{ | ||
const pos = this.get_primary_pointer_position(); | ||
return this.region.transform_pos_to_NDC(pos); | ||
} | ||
get_primary_pointer_html_NDC() | ||
{ | ||
const pos = this.get_primary_html_pointer_position(); | ||
return this.region.transform_pos_to_NDC(pos); | ||
} | ||
get_primary_html_pointer_position() | ||
{ | ||
const pos = this.get_primary_pointer_position(); | ||
return this.region.invert_y(pos); | ||
} | ||
get pointer_pos_delta() | ||
@@ -82,0 +100,0 @@ { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
226451
3236