ohzi-core 9.3.0 → 9.4.0
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.
- package/build/index.module.js +1 -1
- package/build/index.module.js.map +1 -1
- package/package.json +1 -1
- package/src/Browser.js +26 -0
- package/src/resource_loader/AsyncTextureLoader.js +50 -0
- package/types/BaseApplication.d.ts +1 -0
- package/types/Browser.d.ts +14 -11
- package/types/CameraManager.d.ts +10 -5
- package/types/Capabilities.d.ts +7 -5
- package/types/Configuration.d.ts +7 -5
- package/types/CustomBezierCurve.d.ts +7 -0
- package/types/Debug.d.ts +36 -37
- package/types/EventManager.d.ts +43 -41
- package/types/Graphics.d.ts +48 -34
- package/types/Initializer.d.ts +5 -3
- package/types/Input.d.ts +43 -30
- package/types/KeyboardInput.d.ts +20 -0
- package/types/OS.d.ts +13 -11
- package/types/OScreen.d.ts +21 -17
- package/types/OrthographicCamera.d.ts +1 -0
- package/types/PerspectiveCamera.d.ts +1 -0
- package/types/ReflectionPlaneContext.d.ts +7 -5
- package/types/RenderOrder.d.ts +8 -0
- package/types/ResourceContainer.d.ts +9 -7
- package/types/SceneManager.d.ts +11 -9
- package/types/Screen.d.ts +11 -16
- package/types/Time.d.ts +14 -10
- package/types/UI.d.ts +16 -14
- package/types/action_sequencer/ActionSequencer.d.ts +8 -5
- package/types/action_sequencer/NumberInterpolator.d.ts +3 -2
- package/types/canvas_drawer/SimpleTextDrawer.d.ts +1 -0
- package/types/components/AudioClip.d.ts +2 -1
- package/types/data_textures/CustomDataTexture.d.ts +11 -0
- package/types/data_textures/RGBADataTexture.d.ts +4 -0
- package/types/data_textures/RGBAFloatDataTexture.d.ts +4 -0
- package/types/data_textures/RGBDataTexture.d.ts +4 -0
- package/types/data_textures/RGBFloatDataTexture.d.ts +4 -0
- package/types/gpu_particles/GPUParticleSystem.d.ts +9 -6
- package/types/gpu_particles/ParticleAttribute.d.ts +8 -5
- package/types/gpu_particles/ParticlePositionAttribute.d.ts +3 -1
- package/types/html_utilities/CSSAnimator.d.ts +3 -2
- package/types/index.d.ts +103 -90
- package/types/materials/UnrealBloomComposeMaterial.d.ts +0 -1
- package/types/materials/gpu_particles/ParticleStorageMaterial.d.ts +0 -1
- package/types/render_mode/DebugNormalsRender.d.ts +2 -4
- package/types/render_mode/NormalRender.d.ts +2 -3
- package/types/render_mode/UnrealBloomRender.d.ts +1 -0
- package/types/render_mode/VRRender.d.ts +4 -0
- package/types/render_utilities/Blitter.d.ts +1 -2
- package/types/render_utilities/Blurrer.d.ts +1 -2
- package/types/render_utilities/DepthAndNormalsRenderer.d.ts +2 -4
- package/types/render_utilities/DualFilteringBlurrer.d.ts +2 -4
- package/types/render_utilities/GaussianBlurrer.d.ts +1 -2
- package/types/render_utilities/MedianFilter.d.ts +1 -2
- package/types/resource_loader/AbstractLoader.d.ts +1 -1
- package/types/resource_loader/AsyncTextureLoader.d.ts +5 -0
- package/types/resource_loader/AudioLoader.d.ts +5 -4
- package/types/resource_loader/BasisLoader.d.ts +2 -2
- package/types/resource_loader/CubemapLoader.d.ts +2 -2
- package/types/resource_loader/DAELoader.d.ts +2 -2
- package/types/resource_loader/FileLoader.d.ts +2 -2
- package/types/resource_loader/FontLoader.d.ts +2 -2
- package/types/resource_loader/GLTFDRACOLoader.d.ts +2 -2
- package/types/resource_loader/GLTFLoader.d.ts +2 -3
- package/types/resource_loader/HDRCubeTextureLoader.d.ts +2 -2
- package/types/resource_loader/JSONLoader.d.ts +1 -3
- package/types/resource_loader/OBJLoader.d.ts +2 -2
- package/types/resource_loader/PointArrayLoader.d.ts +2 -2
- package/types/resource_loader/RGBETextureLoader.d.ts +2 -2
- package/types/resource_loader/TextLoader.d.ts +2 -2
- package/types/resource_loader/TextureLoader.d.ts +1 -3
- package/types/resource_loader/VideoLoader.d.ts +1 -3
- package/types/static_batcher/BatchedMesh.d.ts +15 -0
- package/types/static_batcher/GeometryBatcher.d.ts +8 -6
- package/types/static_batcher/MeshBatcher.d.ts +5 -0
- package/types/ui/ui_element_state/OnIdle.d.ts +2 -4
- package/types/ui/ui_element_state/OnMouseEnter.d.ts +2 -4
- package/types/ui/ui_element_state/OnMouseExit.d.ts +2 -4
- package/types/ui/ui_element_state/OnMouseHover.d.ts +1 -2
- package/types/utilities/CameraUtilities.d.ts +20 -20
- package/types/utilities/EasingFunctions.d.ts +1 -1
- package/types/utilities/FrustumPointFitter.d.ts +2 -2
- package/types/utilities/MeshSampler.d.ts +13 -7
- package/types/utilities/ModelUtilities.d.ts +11 -9
- package/types/view_components/ApplicationView.d.ts +1 -1
- package/types/view_components/ViewComponent.d.ts +3 -1
- package/types/view_components/ViewComponentManager.d.ts +12 -9
- package/types/view_components/ViewContext.d.ts +5 -5
- package/types/view_components/ViewManager.d.ts +33 -22
- package/types/view_components/transition/ActionSequencerBuilder.d.ts +5 -4
- package/types/view_components/transition/TransitionTable.d.ts +1 -1
- package/types/view_components/transition/ViewStateTransitionHandler.d.ts +3 -2
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
export { camera_utilities as CameraUtilities };
|
|
2
|
+
declare const camera_utilities: CameraUtilities;
|
|
3
|
+
declare class CameraUtilities {
|
|
4
|
+
init(): void;
|
|
5
|
+
tmp_mat: any;
|
|
6
|
+
plane: any;
|
|
7
|
+
ray: any;
|
|
8
|
+
tmp_size: any;
|
|
9
|
+
tmp_unproj: any;
|
|
10
|
+
get_up_dir(camera: any): any;
|
|
11
|
+
get_forward_dir(camera: any): any;
|
|
12
|
+
get_right_dir(camera: any): any;
|
|
13
|
+
unproject_mouse_position(NDC: any, camera: any): any;
|
|
14
|
+
get_plane_intersection(plane_position: any, plane_normal: any, NDC: any, camera: any): any;
|
|
15
|
+
fit_points_on_camera(points: any, zoom_scale?: number): {
|
|
16
16
|
position: any;
|
|
17
17
|
zoom: number;
|
|
18
18
|
};
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
get_zoom_to_fit_rect(width: any, height: any): number;
|
|
20
|
+
get_zoom_to_fit_box(bb: any, camera: any): number;
|
|
21
|
+
get_html_screen_pos(object: any, camera: any): any;
|
|
22
|
+
world_pos_to_screen(pos: any, camera: any): any;
|
|
23
|
+
update_projection(camera: any): void;
|
|
24
24
|
}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { Sphere } from "three";
|
|
2
|
-
|
|
3
1
|
export class FrustumPointFitter {
|
|
4
2
|
sphere: Sphere;
|
|
5
3
|
fit_points(points: any, camera_quaternion: any, vertical_fov: any, aspect: any): any;
|
|
@@ -12,3 +10,5 @@ export class FrustumPointFitter {
|
|
|
12
10
|
get_right_plane_normal(camera_quaternion: any, h_fov: any): any;
|
|
13
11
|
get_distance_to_fit_rect(width: any, height: any, vertical_fov: any, aspect: any): number;
|
|
14
12
|
}
|
|
13
|
+
|
|
14
|
+
import { Sphere } from "three";
|
|
@@ -1,14 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
export { mesh_sampler as MeshSampler };
|
|
2
|
+
declare const mesh_sampler: MeshSampler;
|
|
3
|
+
declare class MeshSampler {
|
|
4
|
+
sample(buffer_geometry: any, sample_count: any): {
|
|
3
5
|
points: any[];
|
|
4
6
|
normals: any[];
|
|
7
|
+
tangents: any[];
|
|
8
|
+
uvs: any[];
|
|
5
9
|
};
|
|
6
|
-
|
|
10
|
+
sample_data_from_faces(faces: any): {
|
|
7
11
|
points: any[];
|
|
8
12
|
normals: any[];
|
|
13
|
+
tangents: any[];
|
|
14
|
+
uvs: any[];
|
|
9
15
|
};
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
16
|
+
select_random_faces(faces: any, amount: any): any[];
|
|
17
|
+
get_uniform_face_distribution(face_areas: any, minimum_area: any, faces: any): any[];
|
|
18
|
+
get_face_area(face: any): number;
|
|
19
|
+
sample_point_in_face(w1: any, w2: any, v1: any, v2: any, v3: any): any;
|
|
14
20
|
}
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
export { model_utilities as ModelUtilities };
|
|
2
|
+
declare const model_utilities: ModelUtilities;
|
|
3
|
+
declare class ModelUtilities {
|
|
4
|
+
get_mesh(scene: any, result_callback: any): void;
|
|
5
|
+
get_geometries(scene: any): any[];
|
|
6
|
+
assign_material(scene: any, material: any, name: any): void;
|
|
7
|
+
clone_animated_gltf(gltf: any): {
|
|
6
8
|
animations: any;
|
|
7
9
|
scene: any;
|
|
8
10
|
};
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
set_shadow_config(scene: any, cast: any, receive: any): void;
|
|
12
|
+
__find_object(scene: any, object_name: any, result_callback: any): void;
|
|
13
|
+
get_object(scene: any, object_name: any): any;
|
|
14
|
+
get_object_by_type(scene: any, object_type: any): any;
|
|
13
15
|
}
|
|
@@ -13,8 +13,8 @@ export class ApplicationView extends ViewState {
|
|
|
13
13
|
before_exit(): void;
|
|
14
14
|
on_exit(): void;
|
|
15
15
|
update(): void;
|
|
16
|
-
set_opacity(opacity: any): void;
|
|
17
16
|
load_html_images(): void;
|
|
18
17
|
load_html_videos(): void;
|
|
18
|
+
set_opacity(current_state_data: any): void;
|
|
19
19
|
}
|
|
20
20
|
import { ViewState } from "./ViewState";
|
|
@@ -5,11 +5,13 @@ export class ViewComponent {
|
|
|
5
5
|
});
|
|
6
6
|
name: any;
|
|
7
7
|
container: any;
|
|
8
|
+
hidden: boolean;
|
|
8
9
|
start(): void;
|
|
9
10
|
on_enter(): void;
|
|
10
11
|
update(): void;
|
|
11
12
|
on_exit(): void;
|
|
12
|
-
set_opacity(
|
|
13
|
+
set_opacity(current_state_data: any): void;
|
|
14
|
+
toggle_hidden(): void;
|
|
13
15
|
load_html_images(): void;
|
|
14
16
|
load_html_videos(): void;
|
|
15
17
|
}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
export { view_component_manager as ViewComponentManager };
|
|
2
|
+
declare const view_component_manager: ViewComponentManager;
|
|
3
|
+
declare class ViewComponentManager {
|
|
4
|
+
components: any[];
|
|
5
|
+
enabled_components: Set<any>;
|
|
6
|
+
update(): void;
|
|
7
|
+
register_component(component: any): void;
|
|
8
|
+
enable_component(component: any): void;
|
|
9
|
+
disable_component(component: any): void;
|
|
10
|
+
get_component_by_name(component_name: any): void;
|
|
11
|
+
get(component_name: any): any;
|
|
12
|
+
__set_components_opacities(): void;
|
|
10
13
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
export { view_context as ViewContext };
|
|
2
|
+
declare const view_context: ViewContext;
|
|
3
|
+
declare class ViewContext {
|
|
4
|
+
app: any;
|
|
5
|
+
set_app(app: any): void;
|
|
6
6
|
}
|
|
@@ -1,24 +1,35 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
1
|
+
export { view_manager as ViewManager };
|
|
2
|
+
declare const view_manager: ViewManager;
|
|
3
|
+
declare class ViewManager {
|
|
4
|
+
views: ViewState[];
|
|
5
|
+
transition_table: TransitionTable;
|
|
6
|
+
transition_handler: ViewStateTransitionHandler;
|
|
7
|
+
view_change_subscribers: any[];
|
|
8
|
+
browser_title_suffix: string;
|
|
9
|
+
update(): void;
|
|
10
|
+
go_to_view(view_name: any, change_url?: boolean, skip?: boolean): void;
|
|
11
|
+
go_to_scene(scene_name: any, change_url?: boolean, skip?: boolean): void;
|
|
12
|
+
subscribe_to_view_change(subscriber: any): void;
|
|
13
|
+
notify_view_change(view_name: any): void;
|
|
14
|
+
register_view(view: any): void;
|
|
15
|
+
has_view(view_name: any): boolean;
|
|
16
|
+
add_transitions(transitions: any): void;
|
|
17
|
+
set_transitions(transitions: any): void;
|
|
18
|
+
set_view(view_name: any): void;
|
|
19
|
+
set_browser_title_suffix(title_suffix: any): void;
|
|
20
|
+
get_current_view(): import("./ViewState").ViewState;
|
|
21
|
+
get_view_by_name(view_name: any): void;
|
|
22
|
+
get(view_name: any): any;
|
|
23
|
+
get_view_by_url(url: any): void;
|
|
24
|
+
get_by_url(url: any): any;
|
|
25
|
+
set_default_state_data(default_state_data: any): void;
|
|
26
|
+
__change_browser_url(url: any): void;
|
|
27
|
+
__change_browser_title(name: any): void;
|
|
28
|
+
__set_views_opacities(): void;
|
|
29
|
+
__capitalize(string: any): any;
|
|
30
|
+
__snake_to_whitespace(string: any): any;
|
|
23
31
|
}
|
|
32
|
+
import { TransitionTable } from "./transition/TransitionTable";
|
|
33
|
+
import { ViewStateTransitionHandler } from "./transition/ViewStateTransitionHandler";
|
|
34
|
+
import { ViewState } from "./ViewState";
|
|
24
35
|
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { ActionSequencer } from "ohzi-core";
|
|
2
|
-
|
|
3
1
|
export class ActionSequencerBuilder {
|
|
4
2
|
constructor(default_state_data: any);
|
|
5
3
|
default_state_data: any;
|
|
6
4
|
from_animation_sheet(animation_data: any, current_context: any, initial_context: any): ActionSequencer;
|
|
7
|
-
state_to_tracks(state: any): {
|
|
5
|
+
state_to_tracks(state: any, longest_time: any): {
|
|
8
6
|
attribute_name: string;
|
|
9
7
|
from_time: number;
|
|
10
|
-
to_time:
|
|
8
|
+
to_time: any;
|
|
11
9
|
to_value: any;
|
|
10
|
+
initial: boolean;
|
|
12
11
|
easing_function: string;
|
|
13
12
|
}[];
|
|
14
13
|
from_draw_io(xml: any, context: any): ActionSequencer;
|
|
14
|
+
get_longest_time(tracks: any): number;
|
|
15
15
|
}
|
|
16
|
+
import { ActionSequencer } from "../../action_sequencer/ActionSequencer";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export class TransitionTable {
|
|
2
2
|
transitions: any[];
|
|
3
3
|
default_state_data: {};
|
|
4
|
-
get(
|
|
4
|
+
get(from_state_name: any, to_state_name: any, current_context: any): import("../../action_sequencer/ActionSequencer").ActionSequencer;
|
|
5
5
|
add_transitions(transitions: any): void;
|
|
6
6
|
set_transitions(transitions: any): void;
|
|
7
7
|
set_default_state_data(default_state_data: any): void;
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { ViewState } from "ohzi-core/types/view_components/ViewState";
|
|
2
|
-
|
|
3
1
|
export class ViewStateTransitionHandler {
|
|
4
2
|
constructor(transition_table: any);
|
|
5
3
|
last_state: ViewState;
|
|
@@ -13,4 +11,7 @@ export class ViewStateTransitionHandler {
|
|
|
13
11
|
update(): void;
|
|
14
12
|
set_state(state: any): void;
|
|
15
13
|
set_default_state_data(default_state_data: any): void;
|
|
14
|
+
__update_transitions(): void;
|
|
15
|
+
__exit_last_state(): void;
|
|
16
16
|
}
|
|
17
|
+
import { ViewState } from "../ViewState";
|