ohzi-core 8.0.2 → 9.0.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/BaseApplication.js +3 -1
- package/src/Browser.js +2 -1
- package/src/CameraManager.js +14 -1
- package/src/Capabilities.js +2 -1
- package/src/Configuration.js +2 -1
- package/src/CustomBezierCurve.js +3 -1
- package/src/Debug.js +15 -11
- package/src/EventManager.js +2 -1
- package/src/Graphics.js +15 -12
- package/src/Initializer.js +19 -18
- package/src/Input.js +3 -2
- package/src/KeyboardInput.js +3 -1
- package/src/OS.js +2 -1
- package/src/OScreen.js +2 -1
- package/src/OrthographicCamera.js +4 -2
- package/src/PerspectiveCamera.js +4 -2
- package/src/ReflectionPlaneContext.js +2 -1
- package/src/RenderLayers.js +3 -1
- package/src/RenderLoop.js +11 -9
- package/src/RenderOrder.js +3 -1
- package/src/ResourceContainer.js +3 -2
- package/src/SceneManager.js +2 -1
- package/src/Screen.js +3 -2
- package/src/Time.js +2 -1
- package/src/UI.js +5 -4
- package/src/action_sequencer/ActionEvent.js +4 -2
- package/src/action_sequencer/ActionInterpolator.js +4 -2
- package/src/action_sequencer/ActionSequencer.js +4 -2
- package/src/action_sequencer/NumberInterpolator.js +5 -3
- package/src/action_sequencer/VectorInterpolator.js +4 -2
- package/src/blitter_index.js +5 -5
- package/src/canvas_drawer/CanvasDrawer.js +3 -1
- package/src/canvas_drawer/MultiLineTextDrawer.js +4 -2
- package/src/canvas_drawer/SimpleTextDrawer.js +4 -2
- package/src/components/AudioClip.js +3 -1
- package/src/components/AxisHelper.js +3 -1
- package/src/components/BaseObject.js +3 -1
- package/src/components/EdgeMesh.js +3 -1
- package/src/components/GeometryEdgeVisualizer.js +5 -2
- package/src/components/Grid.js +5 -2
- package/src/components/Line.js +3 -1
- package/src/components/MultiLinePath.js +4 -2
- package/src/components/MultiLineText2D.js +4 -2
- package/src/components/ObjectAxis.js +4 -2
- package/src/components/ObjectOrientedBoundingBox.js +3 -1
- package/src/components/PlaneHelper.js +3 -1
- package/src/components/Shape2D.js +4 -2
- package/src/components/Shape3D.js +4 -2
- package/src/components/Text2D.js +5 -3
- package/src/components/UIElement.js +11 -9
- package/src/components/UpdatableMaterialMesh.js +3 -1
- package/src/components/WorldImage.js +3 -1
- package/src/components/mouse_interactors/ObjectRotator.js +6 -4
- package/src/components/sdf_text/SDFText.js +4 -2
- package/src/components/sdf_text/SDFTextBatch.js +6 -4
- package/src/components/sdf_text/TextGlyph.js +3 -1
- package/src/data_textures/CustomDataTexture.js +3 -1
- package/src/data_textures/RGBADataTexture.js +4 -2
- package/src/data_textures/RGBAFloatDataTexture.js +4 -2
- package/src/data_textures/RGBDataTexture.js +4 -2
- package/src/data_textures/RGBFloatDataTexture.js +4 -2
- package/src/editor/ManipulatorHandle.js +6 -4
- package/src/editor/ObjectEditor.js +6 -4
- package/src/editor/ObjectManipulator.js +6 -4
- package/src/editor/ObjectPicker.js +5 -3
- package/src/gpu_particles/GPUParticleSystem.js +4 -2
- package/src/gpu_particles/ParticleAttribute.js +5 -3
- package/src/gpu_particles/ParticlePositionAttribute.js +5 -3
- package/src/html_utilities/CSSAnimator.js +6 -4
- package/src/html_utilities/css_animator_states/Animating.js +6 -4
- package/src/html_utilities/css_animator_states/Idle.js +3 -1
- package/src/index.js +112 -110
- package/src/materials/AddMaterial.js +5 -2
- package/src/materials/AlphaFilterMaterial.js +5 -2
- package/src/materials/BaseShaderMaterial.js +3 -1
- package/src/materials/BlitMaterial.js +3 -1
- package/src/materials/BloomComposeMaterial.js +6 -4
- package/src/materials/BoxBlurMaterial.js +5 -2
- package/src/materials/ClearAlphaMaterial.js +5 -3
- package/src/materials/ClearColorMaterial.js +5 -3
- package/src/materials/ClearDepthNormalMaterial.js +5 -2
- package/src/materials/DeferredRendererComposeMaterial.js +5 -2
- package/src/materials/DepthNormalMaterial.js +3 -1
- package/src/materials/DisplayNormalTextureMaterial.js +5 -2
- package/src/materials/DualFilteringBlurMaterial.js +5 -2
- package/src/materials/FXAAMaterial.js +5 -3
- package/src/materials/GaussianBlurMaterial.js +6 -2
- package/src/materials/LuminosityHighPassMaterial.js +6 -2
- package/src/materials/MedianFilterMaterial.js +5 -2
- package/src/materials/NormalMaterial.js +3 -1
- package/src/materials/SDFScreenTextMaterial.js +5 -2
- package/src/materials/SDFTextMaterial.js +6 -3
- package/src/materials/SSAOComposeMaterial.js +5 -2
- package/src/materials/SSAOMaterial.js +7 -3
- package/src/materials/ScreenSpaceTextureMaterial.js +4 -2
- package/src/materials/UIElementMaterial.js +6 -3
- package/src/materials/UnrealBloomComposeMaterial.js +6 -2
- package/src/materials/UnrealBlurMaterial.js +5 -2
- package/src/materials/UnrealComposeMaterial.js +5 -2
- package/src/materials/ViewPositionMaterial.js +3 -1
- package/src/materials/deferred/DeferredPointLightMaterial.js +5 -2
- package/src/materials/gpu_particles/AttributeUpdateMaterial.js +8 -4
- package/src/materials/gpu_particles/BasicParticleMaterial.js +3 -1
- package/src/materials/gpu_particles/ParticleStorageMaterial.js +4 -1
- package/src/materials/gpu_particles/PositionStorageMaterial.js +5 -4
- package/src/object_pool/Pool.js +3 -1
- package/src/primitives/Arrow.js +3 -1
- package/src/primitives/Cube.js +3 -1
- package/src/primitives/HorizontalPlane.js +3 -1
- package/src/primitives/Sphere.js +3 -1
- package/src/primitives/VerticalPlane.js +3 -1
- package/src/raycast/GroupRaycaster.js +7 -5
- package/src/raycast/PlaneDragResolver.js +6 -4
- package/src/raycast/PlaneRaycastResolver.js +3 -1
- package/src/raycast/PlaneRaycaster.js +5 -3
- package/src/raycast/RaycastResolver.js +3 -1
- package/src/raycast/SurfaceDragResolver.js +6 -4
- package/src/raycast/states/BaseState.js +3 -1
- package/src/raycast/states/IdleState.js +5 -3
- package/src/raycast/states/OnRaycastEnter.js +5 -3
- package/src/raycast/states/OnRaycastExit.js +5 -3
- package/src/raycast/states/OnRaycastHover.js +5 -3
- package/src/render_mode/BaseRender.js +3 -1
- package/src/render_mode/BloomRender.js +10 -8
- package/src/render_mode/DebugNormalsRender.js +8 -6
- package/src/render_mode/DeferredRender.js +10 -8
- package/src/render_mode/NormalAORender.js +13 -11
- package/src/render_mode/NormalRender.js +7 -5
- package/src/render_mode/OutlineRender.js +6 -3
- package/src/render_mode/PlanarReflectionsRender.js +9 -6
- package/src/render_mode/TransparencyMixRender.js +8 -4
- package/src/render_mode/UnrealBloomRender.js +11 -9
- package/src/render_mode/VRRender.js +71 -0
- package/src/render_utilities/Blitter.js +4 -2
- package/src/render_utilities/Blurrer.js +5 -3
- package/src/render_utilities/DepthAndNormalsRenderer.js +7 -5
- package/src/render_utilities/DualFilteringBlurrer.js +6 -4
- package/src/render_utilities/GaussianBlurrer.js +6 -4
- package/src/render_utilities/MedianFilter.js +5 -3
- package/src/render_utilities/ViewPositionRenderer.js +7 -5
- package/src/resource_loader/AbstractLoader.js +5 -3
- package/src/resource_loader/AsyncTextureLoader.js +4 -2
- package/src/resource_loader/AudioLoader.js +5 -3
- package/src/resource_loader/BasisLoader.js +4 -2
- package/src/resource_loader/CubemapLoader.js +6 -4
- package/src/resource_loader/DAELoader.js +6 -4
- package/src/resource_loader/DDSLoader.js +6 -4
- package/src/resource_loader/FileLoader.js +6 -4
- package/src/resource_loader/FontLoader.js +4 -2
- package/src/resource_loader/GLTFDRACOLoader.js +6 -4
- package/src/resource_loader/GLTFLoader.js +6 -4
- package/src/resource_loader/HDRCubeTextureLoader.js +6 -4
- package/src/resource_loader/JSONLoader.js +4 -2
- package/src/resource_loader/OBJLoader.js +6 -4
- package/src/resource_loader/PointArrayLoader.js +8 -6
- package/src/resource_loader/RGBETextureLoader.js +6 -4
- package/src/resource_loader/ResourceBatch.js +4 -2
- package/src/resource_loader/SVGLoader.js +6 -4
- package/src/resource_loader/TextLoader.js +6 -4
- package/src/resource_loader/TextureLoader.js +4 -2
- package/src/resource_loader/VideoLoader.js +4 -2
- package/src/shaders/anti_aliasing/fxaa.frag +10 -10
- package/src/shaders/basic_line/basic_line.vert +1 -1
- package/src/static_batcher/BatchedMesh.js +7 -5
- package/src/static_batcher/GeometryBatch.js +3 -1
- package/src/static_batcher/GeometryBatcher.js +4 -3
- package/src/static_batcher/MeshBatcher.js +4 -2
- package/src/ui/ui_element_position/ScreenSpacePosition.js +3 -1
- package/src/ui/ui_element_position/WorldSpacePosition.js +4 -2
- package/src/ui/ui_element_state/OnIdle.js +4 -2
- package/src/ui/ui_element_state/OnMouseEnter.js +4 -2
- package/src/ui/ui_element_state/OnMouseExit.js +4 -2
- package/src/ui/ui_element_state/OnMouseHover.js +4 -2
- package/src/ui/ui_element_state/UIElementState.js +3 -1
- package/src/utilities/ArrayUtilities.js +3 -1
- package/src/utilities/CameraUtilities.js +6 -5
- package/src/utilities/EasingFunctions.js +35 -35
- package/src/utilities/FrustumPointFitter.js +3 -1
- package/src/utilities/GeometryUtilities.js +3 -1
- package/src/utilities/HTMLUtilities.js +3 -1
- package/src/utilities/ImageUtilities.js +3 -1
- package/src/utilities/MeshSampler.js +2 -1
- package/src/utilities/ModelUtilities.js +2 -1
- package/src/utilities/OMath.js +3 -1
- package/src/utilities/ObjectUtilities.js +3 -1
- package/src/utilities/OrthographicFrustumPointFitter.js +3 -1
- package/src/utilities/PerspectiveFrustumPointFitter.js +5 -2
- package/src/utilities/StringUtilities.js +3 -1
- package/src/utilities/TimeUtilities.js +3 -1
- package/src/utilities/Validation.js +3 -1
- package/src/view_components/ApplicationView.js +7 -5
- package/src/view_components/ViewComponent.js +5 -3
- package/src/view_components/ViewComponentManager.js +3 -2
- package/src/view_components/ViewContext.js +2 -1
- package/src/view_components/ViewManager.js +4 -3
- package/src/view_components/ViewState.js +3 -1
- package/src/view_components/transition/ActionSequencerBuilder.js +7 -5
- package/src/view_components/transition/DrawIOAnimationSheet.js +3 -1
- package/src/view_components/transition/TransitionTable.js +4 -2
- package/src/view_components/transition/ViewStateTransitionHandler.js +5 -3
- package/types/raycast/states/OnRaycastHover.d.ts +2 -1
- package/types/render_mode/DebugNormalsRender.d.ts +2 -1
- package/types/resource_loader/GLTFLoader.d.ts +3 -1
- package/types/ui/ui_element_state/OnIdle.d.ts +1 -1
- package/types/ui/ui_element_state/OnMouseEnter.d.ts +1 -1
- package/types/ui/ui_element_state/OnMouseExit.d.ts +1 -1
- package/types/view_components/ApplicationView.d.ts +1 -1
package/package.json
CHANGED
package/src/BaseApplication.js
CHANGED
package/src/Browser.js
CHANGED
package/src/CameraManager.js
CHANGED
|
@@ -3,6 +3,8 @@ class CameraManager
|
|
|
3
3
|
init()
|
|
4
4
|
{
|
|
5
5
|
this._current = undefined;
|
|
6
|
+
// VR Spectator
|
|
7
|
+
this._spectator = undefined;
|
|
6
8
|
}
|
|
7
9
|
|
|
8
10
|
set current(camera)
|
|
@@ -14,6 +16,17 @@ class CameraManager
|
|
|
14
16
|
{
|
|
15
17
|
return this._current;
|
|
16
18
|
}
|
|
19
|
+
|
|
20
|
+
set spectator(camera)
|
|
21
|
+
{
|
|
22
|
+
this._spectator = camera;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
get spectator()
|
|
26
|
+
{
|
|
27
|
+
return this._spectator;
|
|
28
|
+
}
|
|
17
29
|
}
|
|
18
30
|
|
|
19
|
-
|
|
31
|
+
const camera_manager = new CameraManager();
|
|
32
|
+
export { camera_manager as CameraManager };
|
package/src/Capabilities.js
CHANGED
package/src/Configuration.js
CHANGED
package/src/CustomBezierCurve.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Vector3 } from 'three';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
class CustomBezierCurve
|
|
4
4
|
{
|
|
5
5
|
constructor(points)
|
|
6
6
|
{
|
|
@@ -42,3 +42,5 @@ export default class CustomBezierCurve
|
|
|
42
42
|
return this.tmp_points[0].clone();
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
|
+
|
|
46
|
+
export { CustomBezierCurve };
|
package/src/Debug.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import AxisHelper from './components/AxisHelper';
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
1
|
+
import { AxisHelper } from './components/AxisHelper';
|
|
2
|
+
|
|
3
|
+
import { SceneManager } from './SceneManager';
|
|
4
|
+
import { Cube } from './primitives/Cube';
|
|
5
|
+
import { Sphere } from './primitives/Sphere';
|
|
6
|
+
import { Arrow } from './primitives/Arrow';
|
|
7
|
+
import { OScreen } from './OScreen';
|
|
8
|
+
import { ScreenSpaceTextureMaterial } from './materials/ScreenSpaceTextureMaterial';
|
|
9
|
+
import { PerspectiveCamera } from './PerspectiveCamera';
|
|
10
|
+
|
|
10
11
|
import { Vector3 } from 'three';
|
|
11
12
|
import { LineBasicMaterial } from 'three';
|
|
12
13
|
import { BufferGeometry } from 'three';
|
|
@@ -21,7 +22,9 @@ import { Scene } from 'three';
|
|
|
21
22
|
import { CatmullRomCurve3 } from 'three';
|
|
22
23
|
import { SphereGeometry } from 'three';
|
|
23
24
|
import { MeshBasicMaterial } from 'three';
|
|
24
|
-
|
|
25
|
+
|
|
26
|
+
import basic_color_vert from './shaders/basic_color/basic_color.vert';
|
|
27
|
+
import basic_color_frag from './shaders/basic_color/basic_color.frag';
|
|
25
28
|
|
|
26
29
|
class Debug
|
|
27
30
|
{
|
|
@@ -257,4 +260,5 @@ class Debug
|
|
|
257
260
|
}
|
|
258
261
|
}
|
|
259
262
|
|
|
260
|
-
|
|
263
|
+
const debug = new Debug();
|
|
264
|
+
export { debug as Debug };
|
package/src/EventManager.js
CHANGED
package/src/Graphics.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import Configuration from './Configuration';
|
|
2
|
-
import BaseRender from './render_mode/BaseRender';
|
|
3
|
-
import OScreen from './OScreen';
|
|
4
|
-
import CameraManager from './CameraManager';
|
|
5
|
-
import SceneManager from './SceneManager';
|
|
6
|
-
import Capabilities from './Capabilities';
|
|
7
|
-
import DepthAndNormalsRenderer from './render_utilities/DepthAndNormalsRenderer';
|
|
8
|
-
import Blitter from './render_utilities/Blitter';
|
|
1
|
+
import { Configuration } from './Configuration';
|
|
2
|
+
import { BaseRender } from './render_mode/BaseRender';
|
|
3
|
+
import { OScreen } from './OScreen';
|
|
4
|
+
import { CameraManager } from './CameraManager';
|
|
5
|
+
import { SceneManager } from './SceneManager';
|
|
6
|
+
import { Capabilities } from './Capabilities';
|
|
7
|
+
import { DepthAndNormalsRenderer } from './render_utilities/DepthAndNormalsRenderer';
|
|
8
|
+
import { Blitter } from './render_utilities/Blitter';
|
|
9
9
|
|
|
10
10
|
import {
|
|
11
11
|
NearestFilter,
|
|
@@ -77,8 +77,10 @@ class Graphics
|
|
|
77
77
|
{
|
|
78
78
|
this._renderer.xr.enabled = true;
|
|
79
79
|
}
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
else
|
|
81
|
+
{
|
|
82
|
+
this._renderer.autoClear = false;
|
|
83
|
+
}
|
|
82
84
|
|
|
83
85
|
this._renderer.setPixelRatio(1);
|
|
84
86
|
|
|
@@ -305,7 +307,7 @@ class Graphics
|
|
|
305
307
|
}
|
|
306
308
|
|
|
307
309
|
// transform the result canvas into a blob
|
|
308
|
-
// from them the callback turns into a ULR and download it
|
|
310
|
+
// } from them the callback turns into a ULR and download it
|
|
309
311
|
ctx_2D.canvas.toBlob(blob_callback, 'image/png;base64;');
|
|
310
312
|
|
|
311
313
|
CameraManager.current.clearViewOffset();
|
|
@@ -387,4 +389,5 @@ class Graphics
|
|
|
387
389
|
}
|
|
388
390
|
}
|
|
389
391
|
|
|
390
|
-
|
|
392
|
+
const graphics = new Graphics();
|
|
393
|
+
export { graphics as Graphics };
|
package/src/Initializer.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import Browser from './Browser';
|
|
2
|
-
import CameraManager from './CameraManager';
|
|
3
|
-
import Capabilities from './Capabilities';
|
|
4
|
-
import Configuration from './Configuration';
|
|
5
|
-
import Debug from './Debug';
|
|
6
|
-
import EventManager from './EventManager';
|
|
7
|
-
import Graphics from './Graphics';
|
|
8
|
-
import Input from './Input';
|
|
9
|
-
import OS from './OS';
|
|
10
|
-
import OScreen from './OScreen';
|
|
11
|
-
import ReflectionPlaneContext from './ReflectionPlaneContext';
|
|
12
|
-
import ResourceContainer from './ResourceContainer';
|
|
13
|
-
import SceneManager from './SceneManager';
|
|
14
|
-
import GeometryBatcher from './static_batcher/GeometryBatcher';
|
|
15
|
-
import Time from './Time';
|
|
16
|
-
import UI from './UI';
|
|
17
|
-
import CameraUtilities from './utilities/CameraUtilities';
|
|
1
|
+
import { Browser } from './Browser';
|
|
2
|
+
import { CameraManager } from './CameraManager';
|
|
3
|
+
import { Capabilities } from './Capabilities';
|
|
4
|
+
import { Configuration } from './Configuration';
|
|
5
|
+
import { Debug } from './Debug';
|
|
6
|
+
import { EventManager } from './EventManager';
|
|
7
|
+
import { Graphics } from './Graphics';
|
|
8
|
+
import { Input } from './Input';
|
|
9
|
+
import { OS } from './OS';
|
|
10
|
+
import { OScreen } from './OScreen';
|
|
11
|
+
import { ReflectionPlaneContext } from './ReflectionPlaneContext';
|
|
12
|
+
import { ResourceContainer } from './ResourceContainer';
|
|
13
|
+
import { SceneManager } from './SceneManager';
|
|
14
|
+
import { GeometryBatcher } from './static_batcher/GeometryBatcher';
|
|
15
|
+
import { Time } from './Time';
|
|
16
|
+
import { UI } from './UI';
|
|
17
|
+
import { CameraUtilities } from './utilities/CameraUtilities';
|
|
18
18
|
|
|
19
19
|
class Initializer
|
|
20
20
|
{
|
|
@@ -54,4 +54,5 @@ class Initializer
|
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
const initializer = new Initializer();
|
|
58
|
+
export { initializer as Initializer };
|
package/src/Input.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { InputController } from 'pit-js';
|
|
2
|
-
import KeyboardInput from './KeyboardInput';
|
|
2
|
+
import { KeyboardInput } from './KeyboardInput';
|
|
3
3
|
|
|
4
4
|
class Input extends InputController
|
|
5
5
|
{
|
|
@@ -63,4 +63,5 @@ class Input extends InputController
|
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
|
|
66
|
+
const input = new Input();
|
|
67
|
+
export { input as Input };
|
package/src/KeyboardInput.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
class KeyboardInput
|
|
2
2
|
{
|
|
3
3
|
init(container)
|
|
4
4
|
{
|
|
@@ -133,3 +133,5 @@ export default class KeyboardInput
|
|
|
133
133
|
this.container.removeEventListener('keyup', this.on_key_up.bind(this), false);
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
|
+
|
|
137
|
+
export { KeyboardInput };
|
package/src/OS.js
CHANGED
package/src/OScreen.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Color } from 'three';
|
|
2
|
-
import { OrthographicCamera as
|
|
2
|
+
import { OrthographicCamera as TOrthographicCamera } from 'three';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
class OrthographicCamera extends TOrthographicCamera
|
|
5
5
|
{
|
|
6
6
|
constructor(left, right, top, bottom, near, far)
|
|
7
7
|
{
|
|
@@ -19,3 +19,5 @@ export default class OrthographicCamera extends THREEOrthographicCamera
|
|
|
19
19
|
return this;
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
+
|
|
23
|
+
export { OrthographicCamera };
|
package/src/PerspectiveCamera.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Color } from 'three';
|
|
2
|
-
import { PerspectiveCamera as
|
|
2
|
+
import { PerspectiveCamera as TPerspectiveCamera } from 'three';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
class PerspectiveCamera extends TPerspectiveCamera
|
|
5
5
|
{
|
|
6
6
|
constructor(fov, aspect, near, far)
|
|
7
7
|
{
|
|
@@ -19,3 +19,5 @@ export default class PerspectiveCamera extends THREEPerspectiveCamera
|
|
|
19
19
|
return this;
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
+
|
|
23
|
+
export { PerspectiveCamera };
|
package/src/RenderLayers.js
CHANGED
package/src/RenderLoop.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import Time from './Time';
|
|
2
|
-
import Input from './Input';
|
|
3
|
-
import UI from './UI';
|
|
4
|
-
import Debug from './Debug';
|
|
5
|
-
import BaseApplication from './BaseApplication';
|
|
6
|
-
import ViewManager from './view_components/ViewManager';
|
|
7
|
-
import ViewComponentManager from './view_components/ViewComponentManager';
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { Time } from './Time';
|
|
2
|
+
import { Input } from './Input';
|
|
3
|
+
import { UI } from './UI';
|
|
4
|
+
import { Debug } from './Debug';
|
|
5
|
+
import { BaseApplication } from './BaseApplication';
|
|
6
|
+
import { ViewManager } from './view_components/ViewManager';
|
|
7
|
+
import { ViewComponentManager } from './view_components/ViewComponentManager';
|
|
8
|
+
|
|
9
|
+
class RenderLoop
|
|
10
10
|
{
|
|
11
11
|
constructor(target_application, graphics)
|
|
12
12
|
{
|
|
@@ -95,3 +95,5 @@ export default class RenderLoop
|
|
|
95
95
|
this.frames_passed = 0;
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
|
+
|
|
99
|
+
export { RenderLoop };
|
package/src/RenderOrder.js
CHANGED
package/src/ResourceContainer.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import EventManager from './EventManager';
|
|
1
|
+
import { EventManager } from './EventManager';
|
|
2
2
|
|
|
3
3
|
class ResourceContainer
|
|
4
4
|
{
|
|
@@ -36,4 +36,5 @@ class ResourceContainer
|
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
const resource_container = new ResourceContainer();
|
|
40
|
+
export { resource_container as ResourceContainer };
|
package/src/SceneManager.js
CHANGED
package/src/Screen.js
CHANGED
package/src/Time.js
CHANGED
package/src/UI.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import Input from './Input';
|
|
2
|
-
import CameraManager from './CameraManager';
|
|
3
|
-
import Graphics from './Graphics';
|
|
1
|
+
import { Input } from './Input';
|
|
2
|
+
import { CameraManager } from './CameraManager';
|
|
3
|
+
import { Graphics } from './Graphics';
|
|
4
4
|
|
|
5
5
|
import { Vector2 } from 'three';
|
|
6
6
|
import { Scene } from 'three';
|
|
@@ -87,4 +87,5 @@ class UI
|
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
-
|
|
90
|
+
const ui = new UI();
|
|
91
|
+
export { ui as UI };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import ViewContext from '../view_components/ViewContext';
|
|
1
|
+
import { ViewContext } from '../view_components/ViewContext';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
class ActionEvent
|
|
4
4
|
{
|
|
5
5
|
constructor(name, method)
|
|
6
6
|
{
|
|
@@ -13,3 +13,5 @@ export default class ActionEvent
|
|
|
13
13
|
ViewContext.app[this.name][this.method]();
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
|
+
|
|
17
|
+
export { ActionEvent };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import EasingFunctions from '../utilities/EasingFunctions';
|
|
1
|
+
import { EasingFunctions } from '../utilities/EasingFunctions';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
class ActionInterpolator
|
|
4
4
|
{
|
|
5
5
|
constructor(easing_function = 'linear')
|
|
6
6
|
{
|
|
@@ -21,3 +21,5 @@ export default class ActionInterpolator
|
|
|
21
21
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
|
+
|
|
25
|
+
export { ActionInterpolator };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
|
-
import OMath from '../utilities/OMath';
|
|
2
|
+
import { OMath } from '../utilities/OMath';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
class ActionSequencer
|
|
5
5
|
{
|
|
6
6
|
constructor(context)
|
|
7
7
|
{
|
|
@@ -243,3 +243,5 @@ export default class ActionSequencer
|
|
|
243
243
|
return current;
|
|
244
244
|
}
|
|
245
245
|
}
|
|
246
|
+
|
|
247
|
+
export { ActionSequencer };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import ActionInterpolator from './ActionInterpolator';
|
|
2
|
-
import OMath from '../utilities/OMath';
|
|
1
|
+
import { ActionInterpolator } from './ActionInterpolator';
|
|
2
|
+
import { OMath } from '../utilities/OMath';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
class NumberInterpolator extends ActionInterpolator
|
|
5
5
|
{
|
|
6
6
|
constructor(attribute_name, from = 0, to = 1, initial = false, easing_function = 'linear')
|
|
7
7
|
{
|
|
@@ -23,3 +23,5 @@ export default class NumberInterpolator extends ActionInterpolator
|
|
|
23
23
|
return OMath.lerp(this.from, this.to, this.easing_function(t));
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
+
|
|
27
|
+
export { NumberInterpolator };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import ActionInterpolator from './ActionInterpolator';
|
|
1
|
+
import { ActionInterpolator } from './ActionInterpolator';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
class VectorInterpolator extends ActionInterpolator
|
|
4
4
|
{
|
|
5
5
|
constructor(attribute_name, from = 0, to = 1, easing_function = 'linear')
|
|
6
6
|
{
|
|
@@ -18,3 +18,5 @@ export default class VectorInterpolator extends ActionInterpolator
|
|
|
18
18
|
context[this.attribute_name].copy(tmp);
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
+
|
|
22
|
+
export { VectorInterpolator };
|
package/src/blitter_index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import MedianFilter from './render_utilities/MedianFilter';
|
|
2
|
-
import GaussianBlurrer from './render_utilities/GaussianBlurrer';
|
|
3
|
-
import Blurrer from './render_utilities/Blurrer';
|
|
4
|
-
import Blitter from './render_utilities/Blitter';
|
|
1
|
+
import { MedianFilter } from './render_utilities/MedianFilter';
|
|
2
|
+
import { GaussianBlurrer } from './render_utilities/GaussianBlurrer';
|
|
3
|
+
import { Blurrer } from './render_utilities/Blurrer';
|
|
4
|
+
import { Blitter } from './render_utilities/Blitter';
|
|
5
5
|
|
|
6
|
-
import DualFilteringBlurMaterial from './materials/DualFilteringBlurMaterial';
|
|
6
|
+
import { DualFilteringBlurMaterial } from './materials/DualFilteringBlurMaterial';
|
|
7
7
|
export {
|
|
8
8
|
MedianFilter,
|
|
9
9
|
GaussianBlurrer,
|
|
@@ -4,7 +4,7 @@ import { UVMapping } from 'three';
|
|
|
4
4
|
import { ClampToEdgeWrapping } from 'three';
|
|
5
5
|
import { NearestFilter } from 'three';
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
class CanvasDrawer
|
|
8
8
|
{
|
|
9
9
|
constructor(uses_dynamic_font)
|
|
10
10
|
{
|
|
@@ -109,3 +109,5 @@ export default class CanvasDrawer
|
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
|
+
|
|
113
|
+
export { CanvasDrawer };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import CanvasDrawer from './CanvasDrawer';
|
|
1
|
+
import { CanvasDrawer } from './CanvasDrawer';
|
|
2
2
|
|
|
3
3
|
import { Vector2 } from 'three';
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
class MultiLineTextDrawer extends CanvasDrawer
|
|
6
6
|
{
|
|
7
7
|
constructor()
|
|
8
8
|
{
|
|
@@ -47,3 +47,5 @@ export default class MultiLineTextDrawer extends CanvasDrawer
|
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
+
|
|
51
|
+
export { MultiLineTextDrawer };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
|
|
2
|
-
import CanvasDrawer from './CanvasDrawer';
|
|
2
|
+
import { CanvasDrawer } from './CanvasDrawer';
|
|
3
3
|
|
|
4
4
|
import { Vector2 } from 'three';
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
class SimpleTextDrawer extends CanvasDrawer
|
|
7
7
|
{
|
|
8
8
|
constructor()
|
|
9
9
|
{
|
|
@@ -45,3 +45,5 @@ export default class SimpleTextDrawer extends CanvasDrawer
|
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
+
|
|
49
|
+
export { SimpleTextDrawer };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Audio as TAudio } from 'three';
|
|
2
2
|
import { PositionalAudio as TPositionalAudio } from 'three';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
class AudioClip
|
|
5
5
|
{
|
|
6
6
|
constructor(buffer, loop = true, volume = 1, positional = false)
|
|
7
7
|
{
|
|
@@ -53,3 +53,5 @@ export default class AudioClip
|
|
|
53
53
|
return this.audio.isPlaying;
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
|
+
|
|
57
|
+
export { AudioClip };
|
|
@@ -6,7 +6,7 @@ import { BufferGeometry } from 'three';
|
|
|
6
6
|
import { Vector3 } from 'three';
|
|
7
7
|
import { Line } from 'three';
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
class AxisHelper extends Object3D
|
|
10
10
|
{
|
|
11
11
|
constructor(scale = 1.0)
|
|
12
12
|
{
|
|
@@ -56,3 +56,5 @@ export default class AxisHelper extends Object3D
|
|
|
56
56
|
{
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
|
+
|
|
60
|
+
export { AxisHelper };
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { Object3D } from 'three';
|
|
3
3
|
import { Vector3 } from 'three';
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
class BaseObject extends Object3D
|
|
6
6
|
{
|
|
7
7
|
constructor()
|
|
8
8
|
{
|
|
@@ -43,3 +43,5 @@ export default class BaseObject extends Object3D
|
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
+
|
|
47
|
+
export { BaseObject };
|
|
@@ -16,7 +16,7 @@ import { Vector3 } from 'three';
|
|
|
16
16
|
import { PlaneGeometry } from 'three';
|
|
17
17
|
import { BufferAttribute } from 'three';
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
class EdgeMesh extends Object3D
|
|
20
20
|
{
|
|
21
21
|
constructor(buffer_geometry, thickness, color)
|
|
22
22
|
{
|
|
@@ -149,3 +149,5 @@ export default class EdgeMesh extends Object3D
|
|
|
149
149
|
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
|
+
|
|
153
|
+
export { EdgeMesh };
|