ohzi-core 9.3.0 → 9.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/package.json +1 -1
  2. package/types/BaseApplication.d.ts +1 -0
  3. package/types/Browser.d.ts +14 -11
  4. package/types/CameraManager.d.ts +10 -5
  5. package/types/Capabilities.d.ts +7 -5
  6. package/types/Configuration.d.ts +7 -5
  7. package/types/CustomBezierCurve.d.ts +7 -0
  8. package/types/Debug.d.ts +36 -37
  9. package/types/EventManager.d.ts +43 -41
  10. package/types/Graphics.d.ts +48 -34
  11. package/types/Initializer.d.ts +5 -3
  12. package/types/Input.d.ts +43 -30
  13. package/types/KeyboardInput.d.ts +20 -0
  14. package/types/OS.d.ts +13 -11
  15. package/types/OScreen.d.ts +21 -17
  16. package/types/OrthographicCamera.d.ts +1 -0
  17. package/types/PerspectiveCamera.d.ts +1 -0
  18. package/types/ReflectionPlaneContext.d.ts +7 -5
  19. package/types/RenderOrder.d.ts +8 -0
  20. package/types/ResourceContainer.d.ts +9 -7
  21. package/types/SceneManager.d.ts +11 -9
  22. package/types/Screen.d.ts +11 -16
  23. package/types/Time.d.ts +14 -10
  24. package/types/UI.d.ts +16 -14
  25. package/types/action_sequencer/ActionSequencer.d.ts +8 -5
  26. package/types/action_sequencer/NumberInterpolator.d.ts +3 -2
  27. package/types/canvas_drawer/SimpleTextDrawer.d.ts +1 -0
  28. package/types/components/AudioClip.d.ts +2 -1
  29. package/types/data_textures/CustomDataTexture.d.ts +11 -0
  30. package/types/data_textures/RGBADataTexture.d.ts +4 -0
  31. package/types/data_textures/RGBAFloatDataTexture.d.ts +4 -0
  32. package/types/data_textures/RGBDataTexture.d.ts +4 -0
  33. package/types/data_textures/RGBFloatDataTexture.d.ts +4 -0
  34. package/types/gpu_particles/GPUParticleSystem.d.ts +9 -6
  35. package/types/gpu_particles/ParticleAttribute.d.ts +8 -5
  36. package/types/gpu_particles/ParticlePositionAttribute.d.ts +3 -1
  37. package/types/html_utilities/CSSAnimator.d.ts +3 -2
  38. package/types/index.d.ts +103 -90
  39. package/types/materials/UnrealBloomComposeMaterial.d.ts +0 -1
  40. package/types/materials/gpu_particles/ParticleStorageMaterial.d.ts +0 -1
  41. package/types/render_mode/DebugNormalsRender.d.ts +2 -4
  42. package/types/render_mode/NormalRender.d.ts +2 -3
  43. package/types/render_mode/UnrealBloomRender.d.ts +1 -0
  44. package/types/render_mode/VRRender.d.ts +4 -0
  45. package/types/render_utilities/Blitter.d.ts +1 -2
  46. package/types/render_utilities/Blurrer.d.ts +1 -2
  47. package/types/render_utilities/DepthAndNormalsRenderer.d.ts +2 -4
  48. package/types/render_utilities/DualFilteringBlurrer.d.ts +2 -4
  49. package/types/render_utilities/GaussianBlurrer.d.ts +1 -2
  50. package/types/render_utilities/MedianFilter.d.ts +1 -2
  51. package/types/resource_loader/AbstractLoader.d.ts +1 -1
  52. package/types/resource_loader/AsyncTextureLoader.d.ts +5 -0
  53. package/types/resource_loader/AudioLoader.d.ts +5 -4
  54. package/types/resource_loader/BasisLoader.d.ts +2 -2
  55. package/types/resource_loader/CubemapLoader.d.ts +2 -2
  56. package/types/resource_loader/DAELoader.d.ts +2 -2
  57. package/types/resource_loader/FileLoader.d.ts +2 -2
  58. package/types/resource_loader/FontLoader.d.ts +2 -2
  59. package/types/resource_loader/GLTFDRACOLoader.d.ts +2 -2
  60. package/types/resource_loader/GLTFLoader.d.ts +2 -3
  61. package/types/resource_loader/HDRCubeTextureLoader.d.ts +2 -2
  62. package/types/resource_loader/JSONLoader.d.ts +1 -3
  63. package/types/resource_loader/OBJLoader.d.ts +2 -2
  64. package/types/resource_loader/PointArrayLoader.d.ts +2 -2
  65. package/types/resource_loader/RGBETextureLoader.d.ts +2 -2
  66. package/types/resource_loader/TextLoader.d.ts +2 -2
  67. package/types/resource_loader/TextureLoader.d.ts +1 -3
  68. package/types/resource_loader/VideoLoader.d.ts +1 -3
  69. package/types/static_batcher/BatchedMesh.d.ts +15 -0
  70. package/types/static_batcher/GeometryBatcher.d.ts +8 -6
  71. package/types/static_batcher/MeshBatcher.d.ts +5 -0
  72. package/types/ui/ui_element_state/OnIdle.d.ts +2 -4
  73. package/types/ui/ui_element_state/OnMouseEnter.d.ts +2 -4
  74. package/types/ui/ui_element_state/OnMouseExit.d.ts +2 -4
  75. package/types/ui/ui_element_state/OnMouseHover.d.ts +1 -2
  76. package/types/utilities/CameraUtilities.d.ts +20 -20
  77. package/types/utilities/EasingFunctions.d.ts +1 -1
  78. package/types/utilities/FrustumPointFitter.d.ts +2 -2
  79. package/types/utilities/MeshSampler.d.ts +13 -7
  80. package/types/utilities/ModelUtilities.d.ts +11 -9
  81. package/types/view_components/ApplicationView.d.ts +1 -1
  82. package/types/view_components/ViewComponent.d.ts +3 -1
  83. package/types/view_components/ViewComponentManager.d.ts +12 -9
  84. package/types/view_components/ViewContext.d.ts +5 -5
  85. package/types/view_components/ViewManager.d.ts +33 -22
  86. package/types/view_components/transition/ActionSequencerBuilder.d.ts +5 -4
  87. package/types/view_components/transition/TransitionTable.d.ts +1 -1
  88. package/types/view_components/transition/ViewStateTransitionHandler.d.ts +3 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ohzi-core",
3
- "version": "9.3.0",
3
+ "version": "9.3.1",
4
4
  "description": "OHZI Core Library",
5
5
  "source": "src/index.js",
6
6
  "module": "build/index.module.js",
@@ -5,4 +5,5 @@ export class BaseApplication {
5
5
  update(): void;
6
6
  on_post_render(): void;
7
7
  on_pre_render(): void;
8
+ on_frame_end(): void;
8
9
  }
@@ -1,12 +1,15 @@
1
- export class Browser {
2
- static init(): void;
3
- static browser_name: string;
4
- static get name(): string;
5
- static get is_safari(): boolean;
6
- static get is_chrome(): boolean;
7
- static get is_ie(): boolean;
8
- static get is_firefox(): boolean;
9
- static get has_webm(): boolean;
10
- static get has_hvec(): boolean;
11
- static get preferred_video_extension(): string;
1
+ export { browser as Browser };
2
+ declare const browser: Browser;
3
+ declare class Browser {
4
+ init(): void;
5
+ browser_name: string;
6
+ agent: string;
7
+ get name(): string;
8
+ get is_safari(): boolean;
9
+ get is_chrome(): boolean;
10
+ get is_edge(): boolean;
11
+ get is_edge_chromium(): boolean;
12
+ get has_webm(): boolean;
13
+ get has_hvec(): boolean;
14
+ get preferred_video_extension(): "webm" | "hvec.mp4" | "mp4";
12
15
  }
@@ -1,8 +1,13 @@
1
1
  import { Camera } from "three";
2
2
 
3
- export class CameraManager {
4
- static init(): void;
5
- static _current: Camera;
6
- static set current(arg: Camera);
7
- static get current(): Camera;
3
+ export { camera_manager as CameraManager };
4
+ declare const camera_manager: CameraManager;
5
+ declare class CameraManager {
6
+ init(): void;
7
+ _current: Camera;
8
+ _spectator: Camera;
9
+ set current(arg: any);
10
+ get current(): any;
11
+ set spectator(arg: any);
12
+ get spectator(): any;
8
13
  }
@@ -1,6 +1,8 @@
1
- export class Capabilities {
2
- static init(): void;
3
- static max_anisotropy: number;
4
- static vertex_texture_sampler_available: boolean;
5
- static fp_textures_available: boolean;
1
+ export { capabilities as Capabilities };
2
+ declare const capabilities: Capabilities;
3
+ declare class Capabilities {
4
+ init(): void;
5
+ max_anisotropy: number;
6
+ vertex_texture_sampler_available: boolean;
7
+ fp_textures_available: boolean;
6
8
  }
@@ -1,6 +1,8 @@
1
- export class Configuration {
2
- static init(parameters?: {}): void;
3
- static dpr: number;
4
- static app: {};
5
- static from_json(json: any): void;
1
+ export { configuration as Configuration };
2
+ declare const configuration: Configuration;
3
+ declare class Configuration {
4
+ init(parameters?: {}): void;
5
+ dpr: number;
6
+ app: {};
7
+ from_json(json: any): void;
6
8
  }
@@ -0,0 +1,7 @@
1
+ export class CustomBezierCurve {
2
+ constructor(points: any);
3
+ original_points: any[];
4
+ tmp_points: any[];
5
+ build(point_amount: any): any[];
6
+ get_point_at(t: any): any;
7
+ }
package/types/Debug.d.ts CHANGED
@@ -1,38 +1,37 @@
1
- import { PerspectiveCamera } from "ohzi-core";
2
- import { AxisHelper } from "ohzi-core/types/components/AxisHelper";
3
- import { Arrow } from "ohzi-core/types/primitives/Arrow";
4
- import { Cube } from "ohzi-core/types/primitives/Cube";
5
- import { Sphere } from "ohzi-core/types/primitives/Sphere";
6
- import { Vector3 } from "three";
7
-
8
- export class Debug {
9
- static init(): void;
10
- static Vector3_one: any;
11
- static Vector3_zero: any;
12
- static canvas_renderer: any;
13
- static display_texture_meshes: any[];
14
- static ctx: any;
15
- static scene: any;
16
- static camera: PerspectiveCamera;
17
- static draw_arrow(origin: any, dir: any, color?: number): Arrow
18
- ;
19
- static draw_axis(): AxisHelper;
20
- static set_debug_RT(RT: any): void;
21
- static rt_debug: any;
22
- static draw_rectangle(position_2d: any, width: any, height: any, color: any): void;
23
- static clear(): void;
24
- static draw_line_2D(from: any, to: any, color: any): void;
25
- static draw_line(points: any, color?: number): any;
26
- static draw_cube(pos: any, size: any, color: any): Cube;
27
- static draw_oriented_cube(from: any, to: any, height?: number, color?: string, depth?: number): Cube;
28
- static draw_plane(width: any, height: any, color: any): any;
29
- static draw_empty_cube(pos: any, size: any, color: any): any;
30
- static draw_sphere(pos: Vector3, size: number, color: string): Sphere;
31
- static draw_point_array(input_points: any, open?: boolean, color?: number): any;
32
- static draw_sphere_helper(sphere: any, color: any): any;
33
- static draw_math_sphere(sphere: any): void;
34
- static draw_bounding_box(bb: any): void;
35
- static draw_curve(curve: any, options: any): void;
36
- static draw_texture(tex: any, w: any, h: any): any;
37
- static render(graphics: any): void;
1
+ export { debug as Debug };
2
+ declare const debug: Debug;
3
+ declare class Debug {
4
+ init(): void;
5
+ Vector3_one: any;
6
+ Vector3_zero: any;
7
+ canvas_renderer: any;
8
+ display_texture_meshes: any[];
9
+ ctx: any;
10
+ scene: any;
11
+ camera: PerspectiveCamera;
12
+ draw_arrow(origin: any, dir: any, color?: number): Arrow;
13
+ draw_axis(): AxisHelper;
14
+ set_debug_RT(RT: any): void;
15
+ rt_debug: any;
16
+ draw_rectangle(position_2d: any, width: any, height: any, color: any): void;
17
+ clear(): void;
18
+ draw_line_2D(from: any, to: any, color: any): void;
19
+ draw_line(points: any, color?: number): any;
20
+ draw_cube(pos: any, size: any, color: any): Cube;
21
+ draw_oriented_cube(from: any, to: any, height?: number, color?: string, depth?: number): Cube;
22
+ draw_plane(width: any, height: any, color: any): any;
23
+ draw_empty_cube(pos: any, size: any, color: any): any;
24
+ draw_sphere(pos: any, size: any, color: any): Sphere;
25
+ draw_point_array(input_points: any, open?: boolean, color?: number): any;
26
+ draw_sphere_helper(sphere: any, color: any): any;
27
+ draw_math_sphere(sphere: any): void;
28
+ draw_bounding_box(bb: any): void;
29
+ draw_curve(curve: any, options: any): void;
30
+ draw_texture(tex: any, w: any, h: any): any;
31
+ render(graphics: any): void;
38
32
  }
33
+ import { PerspectiveCamera } from "./PerspectiveCamera";
34
+ import { Arrow } from "./primitives/Arrow";
35
+ import { AxisHelper } from "./components/AxisHelper";
36
+ import { Cube } from "./primitives/Cube";
37
+ import { Sphere } from "./primitives/Sphere";
@@ -1,42 +1,44 @@
1
- export class EventManager {
2
- static init(): void;
3
- static queue: {};
4
- static zoom_changed_evt: string;
5
- static store_clickd_evt: string;
6
- static point_selected_evt: string;
7
- static config_changed: string;
8
- static path_substep_completed: string;
9
- static path_completed: string;
10
- static go_to_store_requested_evt: string;
11
- static resource_loaded_evt: string;
12
- static service_clicked_evt: string;
13
- static unit_pos_updated_evt: string;
14
- static floor_changed_evt: string;
15
- static on_enter_floor_navigation: string;
16
- static on_exit_floor_navigation: string;
17
- static on_enter_floor_selection: string;
18
- static on_exit_floor_selection: string;
19
- static on_enter_outside_navigation: string;
20
- static on_exit_outside_navigation: string;
21
- static step_selected_evt: string;
22
- static fire(event: any, payload: any): void;
23
- static on(event: any, callback: any): void;
24
- static fire_zoom_changed(zoom: any): void;
25
- static fire_store_selected(store_id: any): void;
26
- static fire_point_selected(hit_data: any): void;
27
- static fire_config_changed(): void;
28
- static fire_path_substep_completed(step_number: any): void;
29
- static fire_path_completed(): void;
30
- static fire_step_selected(step_index: any): void;
31
- static fire_go_to_store_requested(store_id: any): void;
32
- static fire_resource_loaded(resource: any): void;
33
- static fire_service_clicked(service: any): void;
34
- static fire_unit_position_updated(unit_data: any): void;
35
- static fire_floor_switched(floor_id: any): void;
36
- static fire_on_enter_floor_navigation(state: any): void;
37
- static fire_on_exit_floor_navigation(state: any): void;
38
- static fire_on_enter_floor_selection(state: any): void;
39
- static fire_on_exit_floor_selection(state: any): void;
40
- static fire_on_enter_outside_navigation(state: any): void;
41
- static fire_on_exit_outside_navigation(state: any): void;
1
+ export { event_manager as EventManager };
2
+ declare const event_manager: EventManager;
3
+ declare class EventManager {
4
+ init(): void;
5
+ queue: {};
6
+ zoom_changed_evt: string;
7
+ store_clickd_evt: string;
8
+ point_selected_evt: string;
9
+ config_changed: string;
10
+ path_substep_completed: string;
11
+ path_completed: string;
12
+ go_to_store_requested_evt: string;
13
+ resource_loaded_evt: string;
14
+ service_clicked_evt: string;
15
+ unit_pos_updated_evt: string;
16
+ floor_changed_evt: string;
17
+ on_enter_floor_navigation: string;
18
+ on_exit_floor_navigation: string;
19
+ on_enter_floor_selection: string;
20
+ on_exit_floor_selection: string;
21
+ on_enter_outside_navigation: string;
22
+ on_exit_outside_navigation: string;
23
+ step_selected_evt: string;
24
+ fire(event: any, payload: any): void;
25
+ on(event: any, callback: any): void;
26
+ fire_zoom_changed(zoom: any): void;
27
+ fire_store_selected(store_id: any): void;
28
+ fire_point_selected(hit_data: any): void;
29
+ fire_config_changed(): void;
30
+ fire_path_substep_completed(step_number: any): void;
31
+ fire_path_completed(): void;
32
+ fire_step_selected(step_index: any): void;
33
+ fire_go_to_store_requested(store_id: any): void;
34
+ fire_resource_loaded(resource: any): void;
35
+ fire_service_clicked(service: any): void;
36
+ fire_unit_position_updated(unit_data: any): void;
37
+ fire_floor_switched(floor_id: any): void;
38
+ fire_on_enter_floor_navigation(state: any): void;
39
+ fire_on_exit_floor_navigation(state: any): void;
40
+ fire_on_enter_floor_selection(state: any): void;
41
+ fire_on_exit_floor_selection(state: any): void;
42
+ fire_on_enter_outside_navigation(state: any): void;
43
+ fire_on_exit_outside_navigation(state: any): void;
42
44
  }
@@ -1,35 +1,49 @@
1
-
2
- export class Graphics {
3
- static init(canvas: any, context_attributes: any): void;
4
- static _renderer: any;
5
- static blitter: Blitter;
6
- static canvas: any;
7
- static no_render: BaseRender;
8
- static current_render_mode: any;
9
- static generateDepthNormalTexture: boolean;
10
- static depth_and_normals_renderer: DepthAndNormalsRenderer;
11
- static is_webgl2: boolean;
12
- static canvas_context: any;
13
- static context_attributes: any;
14
- static get dom_element(): any;
15
- static get depth_normals_RT(): any;
16
- static set_state(new_state: any): void;
17
- static update(): void;
18
- static __update_current_camera(): void;
19
- static render(scene: any, camera: any, RT: any, override_mat: any): void;
20
- static render_scene(scene: any): void;
21
- static __apply_override_material(scene: any, mat: any): void;
22
- static readback_RT(RT: any, buffer: any): void;
23
- static clear(RT: any, camera: any, clear_depth: any, clear_stencil: any): void;
24
- static on_resize(): void;
25
- static material_pass(mat: any, dst: any): void;
26
- static blit(src_RT: any, dst_RT: any, mat: any): void;
27
- static blit_clear_with_material(dst_RT: any, mat: any): void;
28
- static take_screenshot(blob_callback: any, width?: any, height?: any): void;
29
- static download_screenshot(blob: any): void;
30
- static dispose(): void;
1
+ export { graphics as Graphics };
2
+ declare const graphics: Graphics;
3
+ declare class Graphics {
4
+ init(canvas: any, context_attributes: any): void;
5
+ _renderer: any;
6
+ blitter: Blitter;
7
+ canvas: any;
8
+ no_render: BaseRender;
9
+ current_render_mode: any;
10
+ generateDepthNormalTexture: boolean;
11
+ depth_and_normals_renderer: DepthAndNormalsRenderer;
12
+ is_webgl2: boolean;
13
+ canvas_context: any;
14
+ context_attributes: {
15
+ alpha: boolean;
16
+ depth: boolean;
17
+ desynchronized: boolean;
18
+ stencil: boolean;
19
+ antialias: boolean;
20
+ premultipliedAlpha: boolean;
21
+ preserveDrawingBuffer: boolean;
22
+ powerPreference: string;
23
+ logarithmicDepthBuffer: boolean;
24
+ force_webgl2: boolean;
25
+ xr_enabled: boolean;
26
+ };
27
+ resize_observer: ResizeObserver;
28
+ get dom_element(): any;
29
+ get depth_normals_RT(): any;
30
+ set_state(new_state: any): void;
31
+ update(): void;
32
+ __update_current_camera(): void;
33
+ render(scene: any, camera: any, RT: any, override_mat: any): void;
34
+ render_scene(scene: any): void;
35
+ __apply_override_material(scene: any, mat: any): void;
36
+ readback_RT(RT: any, buffer: any): void;
37
+ clear(RT: any, camera: any, clear_depth: any, clear_stencil: any): void;
38
+ on_resize(entries: any): void;
39
+ material_pass(mat: any, dst: any): void;
40
+ blit(src_RT: any, dst_RT: any, mat: any): void;
41
+ blit_clear_with_material(dst_RT: any, mat: any): void;
42
+ take_screenshot(blob_callback: any, width?: any, height?: any): void;
43
+ download_screenshot(blob: any): void;
44
+ dispose(): void;
45
+ is_floating_point_texture_available(): boolean;
31
46
  }
32
- import { BaseRender } from "ohzi-core";
33
- import { Blitter } from "ohzi-core/types/render_utilities/Blitter";
34
- import { DepthAndNormalsRenderer } from "ohzi-core/types/render_utilities/DepthAndNormalsRenderer";
35
-
47
+ import { Blitter } from "./render_utilities/Blitter";
48
+ import { BaseRender } from "./render_mode/BaseRender";
49
+ import { DepthAndNormalsRenderer } from "./render_utilities/DepthAndNormalsRenderer";
@@ -1,4 +1,6 @@
1
- export class Initializer {
2
- static init(canvas: any, app_container: any, context_attributes: any): void;
3
- static dispose(render_loop: any): void;
1
+ export { initializer as Initializer };
2
+ declare const initializer: Initializer;
3
+ declare class Initializer {
4
+ init(canvas: any, app_container: any, context_attributes: any, keyboard_input_container?: Document): void;
5
+ dispose(render_loop: any): void;
4
6
  }
package/types/Input.d.ts CHANGED
@@ -1,54 +1,55 @@
1
- import { Vector2 } from "three";
2
1
 
3
- export class Input {
2
+ export { input as Input };
3
+ declare const input: Input;
4
+ declare class Input {
4
5
  /**
5
6
  * Works for left mouse button or first touch on the screen (primary touch).
6
7
  */
7
- static left_mouse_button_pressed: boolean;
8
+ left_mouse_button_pressed: boolean;
8
9
  /**
9
10
  * Works for left mouse button or first touch on the screen (primary touch).
10
11
  */
11
- static left_mouse_button_down: boolean;
12
+ left_mouse_button_down: boolean;
12
13
  /**
13
14
  * Works for left mouse button or first touch on the screen (primary touch).
14
15
  */
15
- static left_mouse_button_released: boolean;
16
+ left_mouse_button_released: boolean;
16
17
 
17
18
  /**
18
19
  * Mouse only.
19
20
  */
20
- static middle_mouse_button_pressed: boolean;
21
+ middle_mouse_button_pressed: boolean;
21
22
  /**
22
23
  * Mouse only.
23
24
  */
24
- static middle_mouse_button_down: boolean;
25
+ middle_mouse_button_down: boolean;
25
26
  /**
26
27
  * Mouse only.
27
28
  */
28
- static middle_mouse_button_released: boolean;
29
+ middle_mouse_button_released: boolean;
29
30
 
30
31
  /**
31
32
  * Mouse only.
32
33
  */
33
- static right_mouse_button_pressed: boolean;
34
+ right_mouse_button_pressed: boolean;
34
35
  /**
35
36
  * Mouse only.
36
37
  */
37
- static right_mouse_button_down: boolean;
38
+ right_mouse_button_down: boolean;
38
39
  /**
39
40
  * Mouse only.
40
41
  */
41
- static right_mouse_button_released: boolean;
42
+ right_mouse_button_released: boolean;
42
43
 
43
44
  /**
44
45
  * Mouse and primary touch.
45
46
  */
46
- static clicked: boolean;
47
+ clicked: boolean;
47
48
 
48
49
  /**
49
50
  * Screen coordinates of the mouse (or primary touch) position.
50
51
  */
51
- static pointer_pos: {
52
+ pointer_pos: {
52
53
  x: number;
53
54
  y: number;
54
55
  };
@@ -56,7 +57,7 @@ import { Vector2 } from "three";
56
57
  /**
57
58
  * Difference between previous position and current position.
58
59
  */
59
- static pointer_pos_delta: {
60
+ pointer_pos_delta: {
60
61
  x: number;
61
62
  y: number;
62
63
  };
@@ -64,7 +65,7 @@ import { Vector2 } from "three";
64
65
  /**
65
66
  * Screen coordinates of the mouse (or primary touch) position, where the origin is in the upper left corner (browser coordinates).
66
67
  */
67
- static html_pointer_pos: {
68
+ html_pointer_pos: {
68
69
  x: number;
69
70
  y: number;
70
71
  };
@@ -72,7 +73,7 @@ import { Vector2 } from "three";
72
73
  /**
73
74
  * The center of all active touches. If using mouse, this is the same as pointer_pos.
74
75
  */
75
- static pointer_center: {
76
+ pointer_center: {
76
77
  x: number;
77
78
  y: number;
78
79
  };
@@ -80,7 +81,7 @@ import { Vector2 } from "three";
80
81
  /**
81
82
  * The center of all active touches. If using mouse, this is the same as pointer_pos.
82
83
  */
83
- static pointer_center_delta: {
84
+ pointer_center_delta: {
84
85
  x: number;
85
86
  y: number;
86
87
  };
@@ -88,7 +89,7 @@ import { Vector2 } from "three";
88
89
  /**
89
90
  * [-1..1] the center of all active touches. If using mouse, this is the same as pointer_pos.
90
91
  */
91
- static pointer_center_NDC: {
92
+ pointer_center_NDC: {
92
93
  x: number;
93
94
  y: number;
94
95
  };
@@ -96,7 +97,7 @@ import { Vector2 } from "three";
96
97
  /**
97
98
  * [-1..1] difference between previous normalized center and current one.
98
99
  */
99
- static pointer_center_NDC_delta: {
100
+ pointer_center_NDC_delta: {
100
101
  x: number;
101
102
  y: number;
102
103
  };
@@ -104,7 +105,7 @@ import { Vector2 } from "three";
104
105
  /**
105
106
  * Normalized [-1..1] device coordinates for mouse or primary touch.
106
107
  */
107
- static NDC: {
108
+ NDC: {
108
109
  x: number;
109
110
  y: number;
110
111
  };
@@ -112,7 +113,7 @@ import { Vector2 } from "three";
112
113
  /**
113
114
  * [-1..1] difference between previous normalized position and current normalized position.
114
115
  */
115
- static NDC_delta: {
116
+ NDC_delta: {
116
117
  x: number;
117
118
  y: number;
118
119
  };
@@ -120,7 +121,7 @@ import { Vector2 } from "three";
120
121
  /**
121
122
  * Normalized [-1..1] device coordinates for mouse or primary touch, but in browser space (upper left corner maps to <-1,-1>).
122
123
  */
123
- static html_NDC: {
124
+ html_NDC: {
124
125
  x: number;
125
126
  y: number;
126
127
  };
@@ -128,7 +129,12 @@ import { Vector2 } from "three";
128
129
  /**
129
130
  * Normalized [-1..1] device coordinates for mouse or primary touch, captured when left click is pressed.
130
131
  */
131
- static captured_NDC: {
132
+ captured_NDC: {
133
+ x: number;
134
+ y: number;
135
+ };
136
+
137
+ current_NDC_delta: {
132
138
  x: number;
133
139
  y: number;
134
140
  };
@@ -136,35 +142,42 @@ import { Vector2 } from "three";
136
142
  /**
137
143
  * This is equivalent to the mouse wheel (-1, 0, 1) or dragging with one finger [-x..x] measured in pixels.
138
144
  */
139
- static scroll_delta: float;
145
+ scroll_delta: number;
140
146
 
141
147
  /**
142
148
  * This is equivalent to the mouse wheel (-1, 0, 1) or pinching with two fingers [-x..x] measured in pixels.
143
149
  */
144
- static zoom_delta: float;
150
+ zoom_delta: number;
145
151
 
146
152
  /**
147
153
  * Returns 1 if any mouse button is down, or return the amount of active touches.
148
154
  */
149
- static pointer_count: integer;
155
+ pointer_count: number;
150
156
 
151
157
  /**
152
158
  * True if the mouse or primary touch is contained within the bounds of the subregion
153
159
  */
154
- static pointer_is_within_bounds: boolean;
160
+ pointer_is_within_bounds: boolean;
155
161
 
156
162
  /**
157
163
  * True if the pointer is over an html element
158
164
  */
159
- static pointer_is_over_element(html_element: any): boolean;
165
+ pointer_is_over_element(html_element: any): boolean;
160
166
 
161
167
  /**
162
168
  * Call this at the beginning of the current frame.
163
169
  */
164
- static update(): void;
170
+ update(): void;
165
171
 
166
172
  /**
167
173
  * Call this at the end of the current frame.
168
174
  */
169
- static clear(): void;
175
+ clear(): void;
176
+
177
+ keyboard: KeyboardInput;
178
+
179
+ init(container: any, keyboard_input_container: any): void;
180
+ dispose(): void;
170
181
  }
182
+
183
+ import { KeyboardInput } from "./KeyboardInput";
@@ -0,0 +1,20 @@
1
+ export class KeyboardInput {
2
+ init(container: any): void;
3
+ ctrlz_pressed: boolean;
4
+ ctrlz_fired: boolean;
5
+ keys: {};
6
+ keys_keys: any[] | string[];
7
+ container: any;
8
+ on_key_down(e: any): void;
9
+ on_key_up(e: any): void;
10
+ clear(): void;
11
+ release_key(key_name: any): void;
12
+ release_keys(): void;
13
+ press_key(key_name: any): void;
14
+ is_key_pressed(key_name: any): any;
15
+ is_key_down(key_name: any): any;
16
+ is_key_released(key_name: any): any;
17
+ register_key(key: any): void;
18
+ unregister_key(key_name: any): void;
19
+ dispose(): void;
20
+ }
package/types/OS.d.ts CHANGED
@@ -1,18 +1,20 @@
1
- export class OS {
2
- static init(): void;
3
- static operating_systems: {
1
+ export { os as OS };
2
+ declare const os: OS;
3
+ declare class OS {
4
+ init(): void;
5
+ operating_systems: {
4
6
  ANDROID: string;
5
7
  IOS: string;
6
8
  LINUX: string;
7
9
  MAC: string;
8
10
  WINDOWS: string;
9
11
  };
10
- static get_os(): string;
11
- static get is_android(): boolean;
12
- static get is_ios(): boolean | RegExpMatchArray;
13
- static get is_ipad(): boolean;
14
- static get is_mobile(): boolean;
15
- static get is_linux(): boolean;
16
- static get is_mac(): boolean;
17
- static get is_windows(): boolean;
12
+ is_mobile: boolean;
13
+ is_ipad: boolean;
14
+ is_ios: boolean;
15
+ is_android: boolean;
16
+ is_linux: boolean;
17
+ is_mac: boolean;
18
+ is_windows: boolean;
19
+ get_os(): string;
18
20
  }