ohzi-core 12.2.0 → 12.2.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.
- package/build/index.mjs +1 -1
- package/build/index.mjs.map +1 -1
- package/build/index.module.js +2 -0
- package/build/index.module.js.map +1 -0
- package/package.json +2 -1
- package/src/BaseApplication.js +11 -2
- package/src/Browser.js +10 -3
- package/src/CameraManager.js +5 -0
- package/src/Capabilities.js +1 -0
- package/src/CustomBezierCurve.js +12 -0
- package/src/Debug.js +99 -5
- package/src/Graphics.js +86 -6
- package/src/Initializer.js +5 -0
- package/src/KeyboardInput.js +40 -1
- package/src/OS.js +1 -1
- package/src/OScreen.js +19 -4
- package/src/OrthographicCamera.js +13 -0
- package/src/PerspectiveCamera.js +11 -0
- package/src/ReflectionPlaneContext.js +5 -1
- package/src/RenderLayers.js +1 -1
- package/src/RenderLoop.js +9 -0
- package/src/RenderOrder.js +1 -1
- package/src/ResourceContainer.js +21 -0
- package/src/SceneManager.js +14 -4
- package/src/Screen.js +71 -0
- package/src/Time.js +4 -0
- package/src/UI.js +16 -1
- package/src/action_sequencer/ActionEvent.js +6 -1
- package/src/action_sequencer/ActionInterpolator.js +16 -2
- package/src/action_sequencer/ActionSequencer.js +65 -2
- package/src/action_sequencer/NumberInterpolator.js +15 -0
- package/src/action_sequencer/VectorInterpolator.js +13 -1
- package/src/blitter_index.js +1 -0
- package/src/canvas_drawer/CanvasDrawer.js +37 -4
- package/src/canvas_drawer/MultiLineTextDrawer.js +8 -1
- package/src/canvas_drawer/SimpleTextDrawer.js +7 -1
- package/src/components/AudioClip.js +11 -1
- package/src/components/AxisHelper.js +1 -1
- package/src/components/BaseObject.js +8 -5
- package/src/components/EdgeMesh.js +30 -2
- package/src/components/GeometryEdgeVisualizer.js +10 -1
- package/src/components/Grid.js +4 -0
- package/src/components/Line.js +31 -7
- package/src/components/MultiLinePath.js +9 -5
- package/src/components/MultiLineText2D.js +13 -2
- package/src/components/ObjectAxis.js +5 -0
- package/src/components/ObjectOrientedBoundingBox.js +26 -1
- package/src/components/PlaneHelper.js +1 -1
- package/src/components/Shape2D.js +11 -3
- package/src/components/Shape3D.js +10 -4
- package/src/components/Text2D.js +11 -3
- package/src/components/UIElement.js +40 -4
- package/src/components/UpdatableMaterialMesh.js +11 -3
- package/src/components/WorldImage.js +10 -2
- package/src/index.js +3 -1
- package/src/loaders/AsyncAbstractLoader.js +16 -0
- package/src/loaders/AsyncObjectsLoader.js +6 -0
- package/src/primitives/Arrow.js +6 -0
- package/src/primitives/Cube.js +6 -1
- package/src/primitives/HorizontalPlane.js +8 -1
- package/src/primitives/Sphere.js +7 -0
- package/src/primitives/VerticalPlane.js +8 -1
- package/src/ui/ui_element_state/OnIdle.js +5 -0
- package/src/ui/ui_element_state/OnMouseEnter.js +11 -0
- package/src/ui/ui_element_state/OnMouseExit.js +5 -0
- package/src/ui/ui_element_state/OnMouseHover.js +13 -0
- package/src/ui/ui_element_state/UIElementState.js +17 -3
- package/src/utilities/EasingFunctions.js +5 -0
- package/types/BaseApplication.d.ts +18 -11
- package/types/Browser.d.ts +20 -19
- package/types/CameraManager.d.ts +14 -13
- package/types/Capabilities.d.ts +8 -8
- package/types/CustomBezierCurve.d.ts +19 -7
- package/types/Debug.d.ts +198 -37
- package/types/Graphics.d.ts +143 -61
- package/types/Initializer.d.ts +10 -6
- package/types/KeyboardInput.d.ts +65 -20
- package/types/OS.d.ts +20 -20
- package/types/OScreen.d.ts +37 -22
- package/types/OrthographicCamera.d.ts +20 -6
- package/types/PerspectiveCamera.d.ts +18 -6
- package/types/ReflectionPlaneContext.d.ts +13 -8
- package/types/RenderLayers.d.ts +6 -6
- package/types/RenderLoop.d.ts +132 -14
- package/types/RenderOrder.d.ts +8 -8
- package/types/ResourceContainer.d.ts +29 -10
- package/types/SceneManager.d.ts +15 -12
- package/types/Screen.d.ts +27 -0
- package/types/Time.d.ts +29 -24
- package/types/UI.d.ts +92 -18
- package/types/action_sequencer/ActionEvent.d.ts +12 -7
- package/types/action_sequencer/ActionInterpolator.d.ts +18 -5
- package/types/action_sequencer/ActionSequencer.d.ts +104 -36
- package/types/action_sequencer/NumberInterpolator.d.ts +18 -9
- package/types/action_sequencer/VectorInterpolator.d.ts +13 -7
- package/types/blitter_index.d.ts +6 -6
- package/types/canvas_drawer/CanvasDrawer.d.ts +51 -13
- package/types/canvas_drawer/MultiLineTextDrawer.d.ts +13 -5
- package/types/canvas_drawer/SimpleTextDrawer.d.ts +13 -6
- package/types/components/AudioClip.d.ts +25 -13
- package/types/components/AxisHelper.d.ts +6 -6
- package/types/components/BaseObject.d.ts +12 -5
- package/types/components/EdgeMesh.d.ts +42 -13
- package/types/components/GeometryEdgeVisualizer.d.ts +12 -4
- package/types/components/Grid.d.ts +4 -2
- package/types/components/Line.d.ts +42 -16
- package/types/components/MultiLinePath.d.ts +10 -4
- package/types/components/MultiLineText2D.d.ts +22 -10
- package/types/components/ObjectAxis.d.ts +8 -3
- package/types/components/ObjectOrientedBoundingBox.d.ts +45 -18
- package/types/components/PlaneHelper.d.ts +6 -6
- package/types/components/Shape2D.d.ts +14 -4
- package/types/components/Shape3D.d.ts +10 -3
- package/types/components/Text2D.d.ts +21 -13
- package/types/components/UIElement.d.ts +87 -52
- package/types/components/UpdatableMaterialMesh.d.ts +12 -4
- package/types/components/WorldImage.d.ts +23 -13
- package/types/components/mouse_interactors/ObjectRotator.d.ts +12 -0
- package/types/components/sdf_text/SDFText.d.ts +35 -30
- package/types/components/sdf_text/SDFTextBatch.d.ts +12 -12
- package/types/components/sdf_text/TextGlyph.d.ts +8 -6
- package/types/data_textures/CustomDataTexture.d.ts +11 -11
- package/types/data_textures/RGBADataTexture.d.ts +4 -4
- package/types/data_textures/RGBAFloatDataTexture.d.ts +4 -4
- package/types/data_textures/RGBDataTexture.d.ts +4 -4
- package/types/data_textures/RGBFloatDataTexture.d.ts +4 -4
- package/types/editor/ManipulatorHandle.d.ts +23 -14
- package/types/editor/ObjectEditor.d.ts +18 -16
- package/types/editor/ObjectManipulator.d.ts +23 -19
- package/types/editor/ObjectPicker.d.ts +19 -16
- package/types/gpu_particles/GPUParticleSystem.d.ts +22 -15
- package/types/gpu_particles/ParticleAttribute.d.ts +19 -18
- package/types/gpu_particles/ParticlePositionAttribute.d.ts +6 -6
- package/types/html_utilities/CSSAnimator.d.ts +31 -31
- package/types/html_utilities/css_animator_states/Animating.d.ts +8 -8
- package/types/html_utilities/css_animator_states/Idle.d.ts +6 -6
- package/types/index.d.ts +110 -108
- package/types/loaders/AsyncAbstractLoader.d.ts +41 -27
- package/types/loaders/AsyncAudiosLoader.d.ts +6 -5
- package/types/loaders/AsyncObjectsLoader.d.ts +6 -6
- package/types/loaders/AsyncTexturesLoader.d.ts +9 -8
- package/types/loaders/assets_loader/AssetLoader.d.ts +4 -0
- package/types/loaders/assets_loader/AsyncAssetsLoaderWorker.d.ts +1 -0
- package/types/loaders/assets_loader/ResourceBatch.d.ts +14 -0
- package/types/loaders/assets_loader/ResourceContainer.d.ts +9 -0
- package/types/loaders/assets_loader/ResourceLoaderChecker.d.ts +8 -0
- package/types/materials/AddMaterial.d.ts +5 -5
- package/types/materials/AlphaFilterMaterial.d.ts +6 -6
- package/types/materials/BaseShaderMaterial.d.ts +4 -3
- package/types/materials/BlitMaterial.d.ts +4 -3
- package/types/materials/BloomComposeMaterial.d.ts +4 -7
- package/types/materials/BoxBlurMaterial.d.ts +4 -4
- package/types/materials/ClearAlphaMaterial.d.ts +3 -3
- package/types/materials/ClearColorMaterial.d.ts +7 -7
- package/types/materials/ClearDepthNormalMaterial.d.ts +4 -4
- package/types/materials/DeferredRendererComposeMaterial.d.ts +7 -7
- package/types/materials/DepthNormalMaterial.d.ts +6 -4
- package/types/materials/DisplayNormalTextureMaterial.d.ts +4 -4
- package/types/materials/DualFilteringBlurMaterial.d.ts +4 -4
- package/types/materials/FXAAMaterial.d.ts +3 -3
- package/types/materials/GaussianBlurMaterial.d.ts +6 -6
- package/types/materials/LuminosityHighPassMaterial.d.ts +4 -4
- package/types/materials/MedianFilterMaterial.d.ts +7 -6
- package/types/materials/NormalMaterial.d.ts +4 -2
- package/types/materials/SDFScreenTextMaterial.d.ts +9 -11
- package/types/materials/SDFTextMaterial.d.ts +10 -12
- package/types/materials/SSAOComposeMaterial.d.ts +4 -4
- package/types/materials/SSAOMaterial.d.ts +8 -6
- package/types/materials/ScreenSpaceTextureMaterial.d.ts +7 -7
- package/types/materials/UIElementMaterial.d.ts +4 -7
- package/types/materials/UnrealBloomComposeMaterial.d.ts +16 -16
- package/types/materials/UnrealBlurMaterial.d.ts +4 -4
- package/types/materials/UnrealComposeMaterial.d.ts +4 -4
- package/types/materials/ViewPositionMaterial.d.ts +4 -3
- package/types/materials/deferred/DeferredPointLightMaterial.d.ts +9 -10
- package/types/materials/gpu_particles/AttributeUpdateMaterial.d.ts +7 -0
- package/types/materials/gpu_particles/BasicParticleMaterial.d.ts +4 -0
- package/types/materials/gpu_particles/ParticleStorageMaterial.d.ts +4 -2
- package/types/materials/gpu_particles/PositionStorageMaterial.d.ts +3 -4
- package/types/object_pool/Pool.d.ts +10 -10
- package/types/primitives/Arrow.d.ts +15 -8
- package/types/primitives/Cube.d.ts +10 -3
- package/types/primitives/HorizontalPlane.d.ts +11 -3
- package/types/primitives/Sphere.d.ts +11 -3
- package/types/primitives/VerticalPlane.d.ts +11 -3
- package/types/raycast/GroupRaycaster.d.ts +15 -13
- package/types/raycast/PlaneDragResolver.d.ts +16 -15
- package/types/raycast/PlaneRaycastResolver.d.ts +5 -5
- package/types/raycast/PlaneRaycaster.d.ts +9 -7
- package/types/raycast/RaycastResolver.d.ts +5 -5
- package/types/raycast/SurfaceDragResolver.d.ts +15 -13
- package/types/raycast/states/BaseState.d.ts +5 -5
- package/types/raycast/states/IdleState.d.ts +3 -5
- package/types/raycast/states/OnRaycastEnter.d.ts +3 -5
- package/types/raycast/states/OnRaycastExit.d.ts +3 -4
- package/types/raycast/states/OnRaycastHover.d.ts +3 -5
- package/types/render_mode/BaseRender.d.ts +7 -7
- package/types/render_mode/BloomRender.d.ts +12 -10
- package/types/render_mode/DebugNormalsRender.d.ts +3 -3
- package/types/render_mode/DeferredRender.d.ts +13 -9
- package/types/render_mode/NormalAORender.d.ts +18 -17
- package/types/render_mode/NormalRender.d.ts +3 -3
- package/types/render_mode/OutlineRender.d.ts +25 -20
- package/types/render_mode/PlanarReflectionsRender.d.ts +19 -13
- package/types/render_mode/UnrealBloomRender.d.ts +21 -20
- package/types/render_mode/VRRender.d.ts +4 -4
- package/types/render_utilities/Blitter.d.ts +19 -15
- package/types/render_utilities/Blurrer.d.ts +9 -8
- package/types/render_utilities/DepthAndNormalsRenderer.d.ts +11 -10
- package/types/render_utilities/DualFilteringBlurrer.d.ts +18 -17
- package/types/render_utilities/GaussianBlurrer.d.ts +27 -26
- package/types/render_utilities/MedianFilter.d.ts +11 -9
- package/types/render_utilities/ViewPositionRenderer.d.ts +10 -9
- package/types/resource_loader/AbstractLoader.d.ts +21 -21
- package/types/resource_loader/AsyncTextureLoader.d.ts +11 -11
- package/types/resource_loader/AudioLoader.d.ts +9 -9
- package/types/resource_loader/BasisLoader.d.ts +6 -6
- package/types/resource_loader/CubemapLoader.d.ts +8 -7
- package/types/resource_loader/DAELoader.d.ts +7 -6
- package/types/resource_loader/DDSLoader.d.ts +7 -6
- package/types/resource_loader/FileLoader.d.ts +7 -6
- package/types/resource_loader/FontLoader.d.ts +7 -6
- package/types/resource_loader/GLTFDRACOLoader.d.ts +7 -6
- package/types/resource_loader/GLTFLoader.d.ts +7 -6
- package/types/resource_loader/HDRCubeTextureLoader.d.ts +8 -7
- package/types/resource_loader/JSONLoader.d.ts +5 -4
- package/types/resource_loader/OBJLoader.d.ts +7 -6
- package/types/resource_loader/PointArrayLoader.d.ts +9 -7
- package/types/resource_loader/RGBETextureLoader.d.ts +7 -6
- package/types/resource_loader/ResourceBatch.d.ts +13 -13
- package/types/resource_loader/SVGLoader.d.ts +7 -6
- package/types/resource_loader/TextLoader.d.ts +7 -6
- package/types/resource_loader/TextureLoader.d.ts +4 -4
- package/types/resource_loader/VideoLoader.d.ts +4 -4
- package/types/scenes/AbstractScene.d.ts +32 -32
- package/types/scenes/loading_states/CompilatorManager.d.ts +8 -8
- package/types/scenes/loading_states/HighQualityLoadingState.d.ts +3 -3
- package/types/scenes/loading_states/LoadingState.d.ts +31 -31
- package/types/scenes/loading_states/RegularLoadingState.d.ts +5 -5
- package/types/static_batcher/BatchedMesh.d.ts +16 -15
- package/types/static_batcher/GeometryBatch.d.ts +41 -37
- package/types/static_batcher/GeometryBatcher.d.ts +9 -9
- package/types/static_batcher/MeshBatcher.d.ts +5 -5
- package/types/ui/ui_element_position/ScreenSpacePosition.d.ts +5 -4
- package/types/ui/ui_element_position/WorldSpacePosition.d.ts +7 -5
- package/types/ui/ui_element_state/OnIdle.d.ts +9 -3
- package/types/ui/ui_element_state/OnMouseEnter.d.ts +3 -3
- package/types/ui/ui_element_state/OnMouseExit.d.ts +3 -3
- package/types/ui/ui_element_state/OnMouseHover.d.ts +8 -4
- package/types/ui/ui_element_state/UIElementState.d.ts +17 -5
- package/types/utilities/ArrayUtilities.d.ts +7 -7
- package/types/utilities/CameraUtilities.d.ts +40 -36
- package/types/utilities/EasingFunctions.d.ts +36 -35
- package/types/utilities/FrustumPointFitter.d.ts +14 -14
- package/types/utilities/GeometryUtilities.d.ts +5 -4
- package/types/utilities/HTMLUtilities.d.ts +6 -6
- package/types/utilities/ImageUtilities.d.ts +5 -4
- package/types/utilities/MeshSampler.d.ts +20 -20
- package/types/utilities/ModelUtilities.d.ts +15 -15
- package/types/utilities/OMath.d.ts +21 -21
- package/types/utilities/ObjectUtilities.d.ts +7 -7
- package/types/utilities/OrthographicFrustumPointFitter.d.ts +8 -7
- package/types/utilities/PerspectiveFrustumPointFitter.d.ts +14 -12
- package/types/utilities/StringUtilities.d.ts +6 -6
- package/types/utilities/TimeUtilities.d.ts +3 -3
- package/types/utilities/Validation.d.ts +6 -6
- package/types/view_components/ApplicationView.d.ts +13 -13
- package/types/view_components/TransitionManager.d.ts +20 -20
- package/types/view_components/ViewComponent.d.ts +15 -15
- package/types/view_components/ViewComponentManager.d.ts +13 -13
- package/types/view_components/ViewManager.d.ts +22 -23
- package/types/view_components/ViewState.d.ts +14 -14
- package/types/view_components/transition/ActionSequencerBuilder.d.ts +16 -16
- package/types/view_components/transition/DrawIOAnimationSheet.d.ts +17 -17
- package/types/view_components/transition/TransitionTable.d.ts +8 -8
- package/types/view_components/transition/ViewStateTransitionHandler.d.ts +19 -19
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
import { Vector2 } from 'three'; // eslint-disable-line no-unused-vars
|
|
3
|
+
import { UIElement } from '../../components/UIElement'; // eslint-disable-line no-unused-vars
|
|
1
4
|
import { UIElementState } from './UIElementState';
|
|
2
5
|
|
|
3
6
|
class OnMouseEnter extends UIElementState
|
|
@@ -7,11 +10,19 @@ class OnMouseEnter extends UIElementState
|
|
|
7
10
|
super();
|
|
8
11
|
}
|
|
9
12
|
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @param {UIElement} ui_element
|
|
16
|
+
*/
|
|
10
17
|
on_enter(ui_element)
|
|
11
18
|
{
|
|
12
19
|
ui_element.on_mouse_enter();
|
|
13
20
|
}
|
|
14
21
|
|
|
22
|
+
/**
|
|
23
|
+
* @param {UIElement} ui_element
|
|
24
|
+
* @param {Vector2} normalized_mouse_position
|
|
25
|
+
*/
|
|
15
26
|
update(ui_element, normalized_mouse_position)
|
|
16
27
|
{
|
|
17
28
|
if (ui_element.is_mouse_over(normalized_mouse_position))
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
import { UIElement } from '../../components/UIElement'; // eslint-disable-line no-unused-vars
|
|
1
3
|
import { UIElementState } from './UIElementState';
|
|
2
4
|
|
|
3
5
|
class OnMouseExit extends UIElementState
|
|
@@ -7,6 +9,9 @@ class OnMouseExit extends UIElementState
|
|
|
7
9
|
super();
|
|
8
10
|
}
|
|
9
11
|
|
|
12
|
+
/**
|
|
13
|
+
* @param {UIElement} ui_element
|
|
14
|
+
*/
|
|
10
15
|
on_enter(ui_element)
|
|
11
16
|
{
|
|
12
17
|
ui_element.on_mouse_exit();
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
import { Vector2 } from 'three'; // eslint-disable-line no-unused-vars
|
|
3
|
+
import { UIElement } from '../../components/UIElement'; // eslint-disable-line no-unused-vars
|
|
1
4
|
import { UIElementState } from './UIElementState';
|
|
2
5
|
|
|
3
6
|
class OnMouseHover extends UIElementState
|
|
@@ -7,11 +10,18 @@ class OnMouseHover extends UIElementState
|
|
|
7
10
|
super();
|
|
8
11
|
}
|
|
9
12
|
|
|
13
|
+
/**
|
|
14
|
+
* @param {UIElement} ui_element
|
|
15
|
+
*/
|
|
10
16
|
on_enter(ui_element)
|
|
11
17
|
{
|
|
12
18
|
this.__trigger_on_hover(ui_element);
|
|
13
19
|
}
|
|
14
20
|
|
|
21
|
+
/**
|
|
22
|
+
* @param {UIElement} ui_element
|
|
23
|
+
* @param {Vector2} normalized_mouse_position
|
|
24
|
+
*/
|
|
15
25
|
update(ui_element, normalized_mouse_position)
|
|
16
26
|
{
|
|
17
27
|
if (ui_element.is_mouse_over(normalized_mouse_position))
|
|
@@ -24,6 +34,9 @@ class OnMouseHover extends UIElementState
|
|
|
24
34
|
}
|
|
25
35
|
}
|
|
26
36
|
|
|
37
|
+
/**
|
|
38
|
+
* @param {UIElement} ui_element
|
|
39
|
+
*/
|
|
27
40
|
__trigger_on_hover(ui_element)
|
|
28
41
|
{
|
|
29
42
|
ui_element.on_mouse_hover();
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
import { Vector2 } from 'three'; // eslint-disable-line no-unused-vars
|
|
3
|
+
import { UIElement } from '../../components/UIElement'; // eslint-disable-line no-unused-vars
|
|
4
|
+
|
|
1
5
|
class UIElementState
|
|
2
6
|
{
|
|
3
7
|
constructor()
|
|
@@ -5,15 +9,25 @@ class UIElementState
|
|
|
5
9
|
|
|
6
10
|
}
|
|
7
11
|
|
|
8
|
-
|
|
12
|
+
/**
|
|
13
|
+
* @param {UIElement} ui_element
|
|
14
|
+
* @param {Vector2} normalized_mouse_position
|
|
15
|
+
*/
|
|
16
|
+
update(ui_element, normalized_mouse_position) // eslint-disable-line no-unused-vars
|
|
9
17
|
{
|
|
10
18
|
|
|
11
19
|
}
|
|
12
20
|
|
|
13
|
-
|
|
21
|
+
/**
|
|
22
|
+
* @param {UIElement} ui_element
|
|
23
|
+
*/
|
|
24
|
+
on_enter(ui_element) // eslint-disable-line no-unused-vars
|
|
14
25
|
{}
|
|
15
26
|
|
|
16
|
-
|
|
27
|
+
/**
|
|
28
|
+
* @param {UIElement} ui_element
|
|
29
|
+
*/
|
|
30
|
+
on_exit(ui_element) // eslint-disable-line no-unused-vars
|
|
17
31
|
{}
|
|
18
32
|
}
|
|
19
33
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
|
|
1
2
|
class EasingFunctions
|
|
2
3
|
{
|
|
3
4
|
constructor()
|
|
@@ -223,4 +224,8 @@ class EasingFunctions
|
|
|
223
224
|
}
|
|
224
225
|
}
|
|
225
226
|
|
|
227
|
+
/**
|
|
228
|
+
* @typedef {'linear'|'triangular'|'ease_in_sine'|'ease_out_sine'|'ease_in_out_sine'|'ease_in_cubic'|'ease_out_cubic'|'ease_in_out_cubic'|'ease_in_quad'|'ease_out_quad'|'ease_in_out_quad'|'ease_in_quart'|'ease_out_quart'|'ease_in_out_quart'|'ease_in_quint'|'ease_out_quint'|'ease_in_out_quint'|'ease_in_expo'|'ease_out_expo'|'ease_in_out_expo'|'ease_in_circ'|'ease_out_circ'|'ease_in_out_circ'|'ease_in_back'|'ease_out_back'|'ease_in_out_back'|'ease_in_elastic'|'ease_out_elastic'|'ease_in_out_elastic'|'ease_in_bounce'|'ease_out_bounce'|'ease_in_out_bounce'|'heartbeat'} EasingFunctionType
|
|
229
|
+
*/
|
|
230
|
+
|
|
226
231
|
export { EasingFunctions };
|
|
@@ -1,11 +1,18 @@
|
|
|
1
|
-
export class BaseApplication {
|
|
2
|
-
on_post_start(): void;
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
export class BaseApplication {
|
|
2
|
+
on_post_start(): void;
|
|
3
|
+
/**
|
|
4
|
+
* @param {RenderLoop} [loop]
|
|
5
|
+
*/
|
|
6
|
+
on_enter(loop?: RenderLoop): void;
|
|
7
|
+
/**
|
|
8
|
+
* @param {RenderLoop} [loop]
|
|
9
|
+
*/
|
|
10
|
+
on_exit(loop?: RenderLoop): void;
|
|
11
|
+
before_update(): void;
|
|
12
|
+
update(): void;
|
|
13
|
+
fixed_update(): void;
|
|
14
|
+
on_post_render(): void;
|
|
15
|
+
on_pre_render(): void;
|
|
16
|
+
on_frame_end(): void;
|
|
17
|
+
}
|
|
18
|
+
import { RenderLoop } from "./RenderLoop";
|
package/types/Browser.d.ts
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
export { browser as Browser };
|
|
2
|
-
declare const browser: Browser;
|
|
3
|
-
declare class Browser {
|
|
4
|
-
init(): Promise<void>;
|
|
5
|
-
browser_name: string;
|
|
6
|
-
agent: string;
|
|
7
|
-
has_web_xr_support: boolean;
|
|
8
|
-
is_vr:
|
|
9
|
-
version: number;
|
|
10
|
-
get name(): string;
|
|
11
|
-
get is_safari(): boolean;
|
|
12
|
-
get is_chrome(): boolean;
|
|
13
|
-
get
|
|
14
|
-
get
|
|
15
|
-
get
|
|
16
|
-
get
|
|
17
|
-
get
|
|
18
|
-
|
|
19
|
-
|
|
1
|
+
export { browser as Browser };
|
|
2
|
+
declare const browser: Browser;
|
|
3
|
+
declare class Browser {
|
|
4
|
+
init(): Promise<void>;
|
|
5
|
+
browser_name: string;
|
|
6
|
+
agent: string;
|
|
7
|
+
has_web_xr_support: boolean;
|
|
8
|
+
is_vr: boolean;
|
|
9
|
+
version: number;
|
|
10
|
+
get name(): string;
|
|
11
|
+
get is_safari(): boolean;
|
|
12
|
+
get is_chrome(): boolean;
|
|
13
|
+
get is_firefox(): boolean;
|
|
14
|
+
get is_edge(): boolean;
|
|
15
|
+
get is_edge_chromium(): boolean;
|
|
16
|
+
get has_webm(): boolean;
|
|
17
|
+
get has_hvec(): boolean;
|
|
18
|
+
get preferred_video_extension(): "webm" | "hvec.mp4" | "mp4";
|
|
19
|
+
get_version(): number;
|
|
20
|
+
}
|
package/types/CameraManager.d.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
get spectator():
|
|
13
|
-
}
|
|
1
|
+
export { camera_manager as CameraManager };
|
|
2
|
+
declare const camera_manager: CameraManager;
|
|
3
|
+
declare class CameraManager {
|
|
4
|
+
init(): void;
|
|
5
|
+
_current: PerspectiveCamera;
|
|
6
|
+
_spectator: PerspectiveCamera;
|
|
7
|
+
set current(arg: PerspectiveCamera);
|
|
8
|
+
/** @type {PerspectiveCamera} */
|
|
9
|
+
get current(): PerspectiveCamera;
|
|
10
|
+
set spectator(arg: PerspectiveCamera);
|
|
11
|
+
/** @type {PerspectiveCamera} */
|
|
12
|
+
get spectator(): PerspectiveCamera;
|
|
13
|
+
}
|
|
14
|
+
import { PerspectiveCamera } from "./PerspectiveCamera";
|
package/types/Capabilities.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
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;
|
|
8
|
-
}
|
|
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;
|
|
8
|
+
}
|
|
@@ -1,7 +1,19 @@
|
|
|
1
|
-
export class CustomBezierCurve {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
export class CustomBezierCurve {
|
|
2
|
+
/**
|
|
3
|
+
* @param {Vector3[]} points
|
|
4
|
+
*/
|
|
5
|
+
constructor(points: Vector3[]);
|
|
6
|
+
original_points: Vector3[];
|
|
7
|
+
tmp_points: Vector3[];
|
|
8
|
+
/**
|
|
9
|
+
* @param {number} point_amount
|
|
10
|
+
* @returns {Vector3[]}
|
|
11
|
+
*/
|
|
12
|
+
build(point_amount: number): Vector3[];
|
|
13
|
+
/**
|
|
14
|
+
* @param {number} t
|
|
15
|
+
* @returns {Vector3}
|
|
16
|
+
*/
|
|
17
|
+
get_point_at(t: number): Vector3;
|
|
18
|
+
}
|
|
19
|
+
import { Vector3 } from "three/src/math/Vector3";
|
package/types/Debug.d.ts
CHANGED
|
@@ -1,37 +1,198 @@
|
|
|
1
|
-
export { debug as Debug };
|
|
2
|
-
declare const debug: Debug;
|
|
3
|
-
declare class Debug {
|
|
4
|
-
init(): void;
|
|
5
|
-
Vector3_one:
|
|
6
|
-
Vector3_zero:
|
|
7
|
-
canvas_renderer: any;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
1
|
+
export { debug as Debug };
|
|
2
|
+
declare const debug: Debug;
|
|
3
|
+
declare class Debug {
|
|
4
|
+
init(): void;
|
|
5
|
+
Vector3_one: Vector3;
|
|
6
|
+
Vector3_zero: Vector3;
|
|
7
|
+
canvas_renderer: any;
|
|
8
|
+
/** @type { Mesh<PlaneGeometry, ScreenSpaceTextureMaterial>[] } */
|
|
9
|
+
display_texture_meshes: Mesh<PlaneGeometry, ScreenSpaceTextureMaterial>[];
|
|
10
|
+
ctx: any;
|
|
11
|
+
scene: Scene;
|
|
12
|
+
camera: PerspectiveCamera;
|
|
13
|
+
/**
|
|
14
|
+
* @param {Vector3} origin
|
|
15
|
+
* @param {Vector3} dir
|
|
16
|
+
* @param {number | string} color
|
|
17
|
+
* @returns {Arrow}
|
|
18
|
+
*/
|
|
19
|
+
draw_arrow(origin: Vector3, dir: Vector3, color?: number | string): Arrow;
|
|
20
|
+
draw_axis(): AxisHelper;
|
|
21
|
+
/**
|
|
22
|
+
* @param {RenderTarget} RT
|
|
23
|
+
*/
|
|
24
|
+
set_debug_RT(RT: RenderTarget): void;
|
|
25
|
+
rt_debug: RenderTarget<Texture>;
|
|
26
|
+
/**
|
|
27
|
+
* @param {Vector2 | Vector3} position_2d
|
|
28
|
+
* @param {number} width
|
|
29
|
+
* @param {number} height
|
|
30
|
+
* @param {number | string} color
|
|
31
|
+
*/
|
|
32
|
+
draw_rectangle(position_2d: Vector2 | Vector3, width: number, height: number, color: number | string): void;
|
|
33
|
+
clear(): void;
|
|
34
|
+
/**
|
|
35
|
+
* @param {Vector3 | Vector2} from
|
|
36
|
+
* @param {Vector3 | Vector2} to
|
|
37
|
+
* @param {number | string} color
|
|
38
|
+
*/
|
|
39
|
+
draw_line_2D(from: Vector3 | Vector2, to: Vector3 | Vector2, color: number | string): void;
|
|
40
|
+
/**
|
|
41
|
+
* @param {Vector3[]} points
|
|
42
|
+
* @param {number | string} color
|
|
43
|
+
* @returns {Line}
|
|
44
|
+
*/
|
|
45
|
+
draw_line(points: Vector3[], color?: number | string): Line;
|
|
46
|
+
/**
|
|
47
|
+
* @param {Vector3} pos
|
|
48
|
+
* @param {number} size
|
|
49
|
+
* @param {number | string} color
|
|
50
|
+
* @returns {Cube}
|
|
51
|
+
*/
|
|
52
|
+
draw_cube(pos: Vector3, size: number, color: number | string): Cube;
|
|
53
|
+
/**
|
|
54
|
+
* @param {Vector3} from
|
|
55
|
+
* @param {Vector3} to
|
|
56
|
+
* @param {number} height
|
|
57
|
+
* @param {number | string} color
|
|
58
|
+
* @param {number} depth
|
|
59
|
+
* @returns {Cube}
|
|
60
|
+
*/
|
|
61
|
+
draw_oriented_cube(from: Vector3, to: Vector3, height?: number, color?: number | string, depth?: number): Cube;
|
|
62
|
+
/**
|
|
63
|
+
*
|
|
64
|
+
* @param {number} [width]
|
|
65
|
+
* @param {number} [height]
|
|
66
|
+
* @param {number | string} [color]
|
|
67
|
+
* @returns
|
|
68
|
+
*/
|
|
69
|
+
draw_plane(width?: number, height?: number, color?: number | string): Mesh<PlaneGeometry, ShaderMaterial, import("three").Object3DEventMap>;
|
|
70
|
+
/**
|
|
71
|
+
* @param {Vector3} pos
|
|
72
|
+
* @param {number} size
|
|
73
|
+
* @param {number | string} color
|
|
74
|
+
* @returns {Box3Helper}
|
|
75
|
+
*/
|
|
76
|
+
draw_empty_cube(pos: Vector3, size: number, color: number | string): Box3Helper;
|
|
77
|
+
/**
|
|
78
|
+
* @param {Vector3} pos
|
|
79
|
+
* @param {number} size
|
|
80
|
+
* @param {number | string} color
|
|
81
|
+
* @returns {Sphere}
|
|
82
|
+
*/
|
|
83
|
+
draw_sphere(pos: Vector3, size: number, color: number | string): Sphere;
|
|
84
|
+
/**
|
|
85
|
+
*
|
|
86
|
+
* @param {Vector3[]} input_points
|
|
87
|
+
* @param {boolean} open
|
|
88
|
+
* @param {number | string} color
|
|
89
|
+
* @returns {Line}
|
|
90
|
+
*/
|
|
91
|
+
draw_point_array(input_points: Vector3[], open?: boolean, color?: number | string): Line;
|
|
92
|
+
/**
|
|
93
|
+
* @param {Sphere} sphere
|
|
94
|
+
* @param {number | string} color
|
|
95
|
+
* @returns {Mesh}
|
|
96
|
+
*/
|
|
97
|
+
draw_sphere_helper(sphere: Sphere, color: number | string): Mesh;
|
|
98
|
+
/**
|
|
99
|
+
* @param {Sphere} sphere
|
|
100
|
+
*/
|
|
101
|
+
draw_math_sphere(sphere: Sphere): void;
|
|
102
|
+
/**
|
|
103
|
+
* @param {Box3} bb
|
|
104
|
+
*/
|
|
105
|
+
draw_bounding_box(bb: Box3): void;
|
|
106
|
+
/**
|
|
107
|
+
* @param {Vector3[]} curve
|
|
108
|
+
* @param {object} options
|
|
109
|
+
* @param {number} options.offset
|
|
110
|
+
*/
|
|
111
|
+
draw_curve(curve: Vector3[], options: {
|
|
112
|
+
offset: number;
|
|
113
|
+
}): void;
|
|
114
|
+
/**
|
|
115
|
+
* @param {Texture} tex
|
|
116
|
+
* @param {number} w
|
|
117
|
+
* @param {number} h
|
|
118
|
+
* @returns {Mesh}
|
|
119
|
+
*/
|
|
120
|
+
draw_texture(tex: Texture, w: number, h: number): Mesh;
|
|
121
|
+
/**
|
|
122
|
+
* @param {Graphics} graphics
|
|
123
|
+
*/
|
|
124
|
+
render(graphics: {
|
|
125
|
+
init({ canvas, core_attributes, context_attributes, threejs_attributes, dpr }: {
|
|
126
|
+
canvas: HTMLCanvasElement;
|
|
127
|
+
core_attributes: Record<string, any>;
|
|
128
|
+
context_attributes: Record<string, any>;
|
|
129
|
+
threejs_attributes: Record<string, any>;
|
|
130
|
+
dpr: number;
|
|
131
|
+
}): void;
|
|
132
|
+
_renderer: WebGLRenderer;
|
|
133
|
+
blitter: import("./render_utilities/Blitter").Blitter;
|
|
134
|
+
canvas: HTMLCanvasElement;
|
|
135
|
+
no_render: import("./render_mode/BaseRender").BaseRender;
|
|
136
|
+
current_render_mode: import("./render_mode/BaseRender").BaseRender;
|
|
137
|
+
generateDepthNormalTexture: boolean;
|
|
138
|
+
depth_and_normals_renderer: import("./render_utilities/DepthAndNormalsRenderer").DepthAndNormalsRenderer;
|
|
139
|
+
is_webgl2: boolean;
|
|
140
|
+
canvas_context: RenderingContext;
|
|
141
|
+
context_attributes: {
|
|
142
|
+
alpha: boolean;
|
|
143
|
+
antialias: boolean;
|
|
144
|
+
depth: boolean;
|
|
145
|
+
desynchronized: boolean;
|
|
146
|
+
failIfMajorPerformanceCaveat: boolean;
|
|
147
|
+
powerPreference: string;
|
|
148
|
+
premultipliedAlpha: boolean;
|
|
149
|
+
preserveDrawingBuffer: boolean;
|
|
150
|
+
stencil: boolean;
|
|
151
|
+
};
|
|
152
|
+
core_attributes: {
|
|
153
|
+
force_webgl2: boolean;
|
|
154
|
+
xr_enabled: boolean;
|
|
155
|
+
};
|
|
156
|
+
threejs_attributes: Record<string, any>;
|
|
157
|
+
readonly dom_element: HTMLCanvasElement;
|
|
158
|
+
readonly depth_normals_RT: import("three").WebGLRenderTarget<Texture>;
|
|
159
|
+
set_state(new_state: import("./render_mode/BaseRender").BaseRender): void;
|
|
160
|
+
update(): void;
|
|
161
|
+
__update_current_camera(): void;
|
|
162
|
+
render(scene?: Scene, camera?: PerspectiveCamera | import("./OrthographicCamera").OrthographicCamera, RT?: import("three").WebGLRenderTarget<Texture>, override_mat?: import("three").Material): void;
|
|
163
|
+
compile(scene: Scene, camera: PerspectiveCamera, RT: import("three").WebGLRenderTarget<Texture>, override_mat: import("three").Material): void;
|
|
164
|
+
compile_async(scene: Scene, camera: PerspectiveCamera, RT: import("three").WebGLRenderTarget<Texture>, override_mat: import("three").Material, target_scene: Scene): Promise<import("three").Object3D<import("three").Object3DEventMap>>;
|
|
165
|
+
render_scene(scene: Scene | import("./BaseApplication").BaseApplication | {
|
|
166
|
+
render: () => void;
|
|
167
|
+
}): void;
|
|
168
|
+
__apply_override_material(scene: Scene, mat: import("three").Material): void;
|
|
169
|
+
readback_RT(RT: import("three").WebGLRenderTarget<Texture>, buffer: import("three").TypedArray): void;
|
|
170
|
+
clear(RT: import("three").WebGLRenderTarget<Texture>, camera: PerspectiveCamera, clear_depth: boolean, clear_stencil: boolean): void;
|
|
171
|
+
on_resize(entries: ResizeObserverEntry[], dpr: number): void;
|
|
172
|
+
material_pass(mat: import("three").Material, dst: import("three").WebGLRenderTarget<Texture>): void;
|
|
173
|
+
blit(src_RT: import("three").WebGLRenderTarget<Texture>, dst_RT: import("three").WebGLRenderTarget<Texture>, mat: import("three").Material): void;
|
|
174
|
+
blit_clear_with_material(dst_RT: import("three").WebGLRenderTarget<Texture>, mat: import("three").Material): void;
|
|
175
|
+
take_screenshot(blob_callback: BlobCallback, width?: number, height?: number): void;
|
|
176
|
+
download_screenshot(blob: Blob): void;
|
|
177
|
+
dispose(): void;
|
|
178
|
+
is_floating_point_texture_available(): boolean;
|
|
179
|
+
}): void;
|
|
180
|
+
}
|
|
181
|
+
import { Vector3 } from "three/src/math/Vector3";
|
|
182
|
+
import { Mesh } from "three/src/objects/Mesh";
|
|
183
|
+
import { PlaneGeometry } from "three/src/geometries/PlaneGeometry";
|
|
184
|
+
import { ScreenSpaceTextureMaterial } from "./materials/ScreenSpaceTextureMaterial";
|
|
185
|
+
import { Scene } from "three/src/scenes/Scene";
|
|
186
|
+
import { PerspectiveCamera } from "./PerspectiveCamera";
|
|
187
|
+
import { Arrow } from "./primitives/Arrow";
|
|
188
|
+
import { AxisHelper } from "./components/AxisHelper";
|
|
189
|
+
import { RenderTarget } from "three/src/core/RenderTarget";
|
|
190
|
+
import { Texture } from "three/src/textures/Texture";
|
|
191
|
+
import { Vector2 } from "three/src/math/Vector2";
|
|
192
|
+
import { Line } from "three/src/objects/Line";
|
|
193
|
+
import { Cube } from "./primitives/Cube";
|
|
194
|
+
import { ShaderMaterial } from "three/src/materials/ShaderMaterial";
|
|
195
|
+
import { Box3Helper } from "three/src/helpers/Box3Helper";
|
|
196
|
+
import { Sphere } from "./primitives/Sphere";
|
|
197
|
+
import { Box3 } from "three/src/math/Box3";
|
|
198
|
+
import { WebGLRenderer } from "three/src/renderers/WebGLRenderer";
|