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
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import BlitMaterial from '../materials/BlitMaterial';
|
|
1
|
+
import { BlitMaterial } from '../materials/BlitMaterial';
|
|
2
|
+
|
|
2
3
|
import frag from '../shaders/ssao/ssao.frag';
|
|
3
4
|
import vert from '../shaders/ssao/ssao.vert';
|
|
4
5
|
|
|
@@ -7,8 +8,9 @@ import { Vector3 } from 'three';
|
|
|
7
8
|
import { DataTexture } from 'three';
|
|
8
9
|
import { RGBFormat } from 'three';
|
|
9
10
|
import { RepeatWrapping } from 'three';
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
|
|
12
|
+
import { OMath } from '../utilities/OMath';
|
|
13
|
+
class SSAOMaterial extends BlitMaterial
|
|
12
14
|
{
|
|
13
15
|
constructor()
|
|
14
16
|
{
|
|
@@ -63,3 +65,5 @@ export default class SSAOMaterial extends BlitMaterial
|
|
|
63
65
|
return rotation_texture;
|
|
64
66
|
}
|
|
65
67
|
}
|
|
68
|
+
|
|
69
|
+
export { SSAOMaterial };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import BaseShaderMaterial from './BaseShaderMaterial';
|
|
1
|
+
import { BaseShaderMaterial } from './BaseShaderMaterial';
|
|
2
2
|
import { Vector2 } from 'three';
|
|
3
|
-
|
|
3
|
+
class ScreenSpaceTextureMaterial extends BaseShaderMaterial
|
|
4
4
|
{
|
|
5
5
|
constructor(x, y, w, h)
|
|
6
6
|
{
|
|
@@ -63,3 +63,5 @@ export default class ScreenSpaceTextureMaterial extends BaseShaderMaterial
|
|
|
63
63
|
this.uniforms._ScreenSize.value.set(w, h);
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
|
+
|
|
67
|
+
export { ScreenSpaceTextureMaterial };
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import vert from '../shaders/ui_element/ui_element.vert';
|
|
2
2
|
import frag from '../shaders/ui_element/ui_element.frag';
|
|
3
|
-
|
|
3
|
+
|
|
4
|
+
import { BaseShaderMaterial } from '../materials/BaseShaderMaterial';
|
|
4
5
|
|
|
5
6
|
import { Vector2 } from 'three';
|
|
6
7
|
import { Vector3 } from 'three';
|
|
7
8
|
|
|
8
|
-
import OScreen from '../OScreen';
|
|
9
|
+
import { OScreen } from '../OScreen';
|
|
9
10
|
|
|
10
|
-
|
|
11
|
+
class UIElementMaterial extends BaseShaderMaterial
|
|
11
12
|
{
|
|
12
13
|
constructor(intensity = 1)
|
|
13
14
|
{
|
|
@@ -25,3 +26,5 @@ export default class UIElementMaterial extends BaseShaderMaterial
|
|
|
25
26
|
this.depthTest = false;
|
|
26
27
|
}
|
|
27
28
|
}
|
|
29
|
+
|
|
30
|
+
export { UIElementMaterial };
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import BlitMaterial from './BlitMaterial';
|
|
1
|
+
import { BlitMaterial } from './BlitMaterial';
|
|
2
|
+
|
|
2
3
|
import frag from '../shaders/gaussian_blur/unreal_bloom_compose.frag';
|
|
4
|
+
|
|
3
5
|
import { Color } from 'three';
|
|
4
|
-
|
|
6
|
+
class UnrealBloomComposeMaterial extends BlitMaterial
|
|
5
7
|
{
|
|
6
8
|
constructor(nMips)
|
|
7
9
|
{
|
|
@@ -93,3 +95,5 @@ export default class UnrealBloomComposeMaterial extends BlitMaterial
|
|
|
93
95
|
this.uniforms.bloomTintColors.value[4].set(col_string);
|
|
94
96
|
}
|
|
95
97
|
}
|
|
98
|
+
|
|
99
|
+
export { UnrealBloomComposeMaterial };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import BlitMaterial from '../materials/BlitMaterial';
|
|
1
|
+
import { BlitMaterial } from '../materials/BlitMaterial';
|
|
2
|
+
|
|
2
3
|
import frag from '../shaders/unreal_blur/unreal_blur.frag';
|
|
3
4
|
|
|
4
5
|
import { Vector2 } from 'three';
|
|
5
6
|
|
|
6
|
-
|
|
7
|
+
class UnrealBlurMaterial extends BlitMaterial
|
|
7
8
|
{
|
|
8
9
|
constructor(kernel_radius)
|
|
9
10
|
{
|
|
@@ -15,3 +16,5 @@ export default class UnrealBlurMaterial extends BlitMaterial
|
|
|
15
16
|
this.uniforms._SampleDir = { value: new Vector2(0.5, 0.5) };
|
|
16
17
|
}
|
|
17
18
|
}
|
|
19
|
+
|
|
20
|
+
export { UnrealBlurMaterial };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import BlitMaterial from '../materials/BlitMaterial';
|
|
1
|
+
import { BlitMaterial } from '../materials/BlitMaterial';
|
|
2
|
+
|
|
2
3
|
import frag from '../shaders/unreal_blur/unreal_compose.frag';
|
|
3
4
|
|
|
4
|
-
|
|
5
|
+
class UnrealComposeMaterial extends BlitMaterial
|
|
5
6
|
{
|
|
6
7
|
constructor(nMips)
|
|
7
8
|
{
|
|
@@ -22,3 +23,5 @@ export default class UnrealComposeMaterial extends BlitMaterial
|
|
|
22
23
|
this.uniforms.bloomRadius = { value: 0.0 };
|
|
23
24
|
}
|
|
24
25
|
}
|
|
26
|
+
|
|
27
|
+
export { UnrealComposeMaterial };
|
|
@@ -3,7 +3,7 @@ import vert from '../shaders/write_view_position/write_view_position.vert';
|
|
|
3
3
|
|
|
4
4
|
import { ShaderMaterial } from 'three';
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
class ViewPositionMaterial extends ShaderMaterial
|
|
7
7
|
{
|
|
8
8
|
constructor()
|
|
9
9
|
{
|
|
@@ -15,3 +15,5 @@ export default class ViewPositionMaterial extends ShaderMaterial
|
|
|
15
15
|
});
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
|
+
|
|
19
|
+
export { ViewPositionMaterial };
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import vert from '../../shaders/deferred/point_light.vert';
|
|
2
2
|
import frag from '../../shaders/deferred/point_light.frag';
|
|
3
|
-
|
|
3
|
+
|
|
4
|
+
import { BaseShaderMaterial } from '../../materials/BaseShaderMaterial';
|
|
4
5
|
|
|
5
6
|
import { Matrix4 } from 'three';
|
|
6
7
|
import { AdditiveBlending } from 'three';
|
|
7
8
|
import { BackSide } from 'three';
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
class DeferredPointLightMaterial extends BaseShaderMaterial
|
|
10
11
|
{
|
|
11
12
|
constructor(intensity = 1)
|
|
12
13
|
{
|
|
@@ -37,3 +38,5 @@ export default class DeferredPointLightMaterial extends BaseShaderMaterial
|
|
|
37
38
|
this.uniforms._AlbedoTex.value = rt.texture;
|
|
38
39
|
}
|
|
39
40
|
}
|
|
41
|
+
|
|
42
|
+
export { DeferredPointLightMaterial };
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import BlitMaterial from '../../materials/BlitMaterial';
|
|
1
|
+
import { BlitMaterial } from '../../materials/BlitMaterial';
|
|
2
|
+
|
|
2
3
|
import frag from '../../shaders/gpu_particles/update/basic_update.frag';
|
|
3
|
-
import Time from '../../Time';
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import { Time } from '../../Time';
|
|
6
|
+
|
|
7
|
+
import { common_utils } from '../../shaders/gpu_particles/common_utils';
|
|
6
8
|
|
|
7
9
|
import { Vector2 } from 'three';
|
|
8
10
|
import { ShaderChunk } from 'three';
|
|
9
11
|
|
|
10
|
-
|
|
12
|
+
class AttributeUpdateMaterial extends BlitMaterial
|
|
11
13
|
{
|
|
12
14
|
constructor(custom_frag)
|
|
13
15
|
{
|
|
@@ -31,3 +33,5 @@ export default class AttributeUpdateMaterial extends BlitMaterial
|
|
|
31
33
|
this.multiplier = val;
|
|
32
34
|
}
|
|
33
35
|
}
|
|
36
|
+
|
|
37
|
+
export { AttributeUpdateMaterial };
|
|
@@ -3,7 +3,7 @@ import frag from '../../shaders/gpu_particles/visualize/visualize.frag';
|
|
|
3
3
|
|
|
4
4
|
import { ShaderMaterial } from 'three';
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
class BasicParticleMaterial extends ShaderMaterial
|
|
7
7
|
{
|
|
8
8
|
constructor()
|
|
9
9
|
{
|
|
@@ -21,3 +21,5 @@ export default class BasicParticleMaterial extends ShaderMaterial
|
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
|
+
|
|
25
|
+
export { BasicParticleMaterial };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import frag from '../../shaders/gpu_particles/generic_storage.frag';
|
|
2
|
+
|
|
2
3
|
import { ShaderMaterial } from 'three';
|
|
3
4
|
import { NoBlending } from 'three';
|
|
4
5
|
import { AlwaysDepth } from 'three';
|
|
5
6
|
|
|
6
|
-
|
|
7
|
+
class ParticleStorageMaterial extends ShaderMaterial
|
|
7
8
|
{
|
|
8
9
|
constructor()
|
|
9
10
|
{
|
|
@@ -32,3 +33,5 @@ export default class ParticleStorageMaterial extends ShaderMaterial
|
|
|
32
33
|
});
|
|
33
34
|
}
|
|
34
35
|
}
|
|
36
|
+
|
|
37
|
+
export { ParticleStorageMaterial };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import ParticleStorageMaterial from '../../materials/gpu_particles/ParticleStorageMaterial';
|
|
1
|
+
import { ParticleStorageMaterial } from '../../materials/gpu_particles/ParticleStorageMaterial';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
class PositionStorageMaterial extends ParticleStorageMaterial
|
|
4
4
|
{
|
|
5
5
|
constructor()
|
|
6
6
|
{
|
|
@@ -9,7 +9,6 @@ export default class PositionStorageMaterial extends ParticleStorageMaterial
|
|
|
9
9
|
varying vec4 value;
|
|
10
10
|
|
|
11
11
|
attribute vec2 storage_uv;
|
|
12
|
-
|
|
13
12
|
|
|
14
13
|
void main()
|
|
15
14
|
{
|
|
@@ -18,8 +17,10 @@ export default class PositionStorageMaterial extends ParticleStorageMaterial
|
|
|
18
17
|
|
|
19
18
|
value = vec4(position.xyz, 1.0);
|
|
20
19
|
}
|
|
21
|
-
|
|
20
|
+
|
|
22
21
|
`;
|
|
23
22
|
super(vert);
|
|
24
23
|
}
|
|
25
24
|
}
|
|
25
|
+
|
|
26
|
+
export { PositionStorageMaterial };
|
package/src/object_pool/Pool.js
CHANGED
package/src/primitives/Arrow.js
CHANGED
|
@@ -5,7 +5,7 @@ import { Vector3, Mesh } from 'three';
|
|
|
5
5
|
|
|
6
6
|
import * as BufferGeometryUtils from 'three/examples/jsm/utils/BufferGeometryUtils.js';
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
class Arrow extends Mesh
|
|
9
9
|
{
|
|
10
10
|
constructor(color, length, dir)
|
|
11
11
|
{
|
|
@@ -55,3 +55,5 @@ export default class Arrow extends Mesh
|
|
|
55
55
|
return this.scale.z;
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
+
|
|
59
|
+
export { Arrow };
|
package/src/primitives/Cube.js
CHANGED
|
@@ -3,7 +3,7 @@ import { Vector3, Mesh } from 'three';
|
|
|
3
3
|
import { BoxGeometry } from 'three';
|
|
4
4
|
import { MeshBasicMaterial } from 'three';
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
class Cube extends Mesh
|
|
7
7
|
{
|
|
8
8
|
constructor(size, segments, color)
|
|
9
9
|
{
|
|
@@ -15,3 +15,5 @@ export default class Cube extends Mesh
|
|
|
15
15
|
super(geometry, material);
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
|
+
|
|
19
|
+
export { Cube };
|
|
@@ -2,7 +2,7 @@ import { Mesh } from 'three';
|
|
|
2
2
|
import { MeshBasicMaterial } from 'three';
|
|
3
3
|
import { PlaneGeometry } from 'three';
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
class HorizontalPlane extends Mesh
|
|
6
6
|
{
|
|
7
7
|
constructor(width, height, color, material)
|
|
8
8
|
{
|
|
@@ -16,3 +16,5 @@ export default class HorizontalPlane extends Mesh
|
|
|
16
16
|
super(geometry, material);
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
|
+
|
|
20
|
+
export { HorizontalPlane };
|
package/src/primitives/Sphere.js
CHANGED
|
@@ -2,7 +2,7 @@ import { Mesh } from 'three';
|
|
|
2
2
|
import { SphereBufferGeometry } from 'three';
|
|
3
3
|
import { MeshBasicMaterial } from 'three';
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
class Sphere extends Mesh
|
|
6
6
|
{
|
|
7
7
|
constructor(radius, color)
|
|
8
8
|
{
|
|
@@ -13,3 +13,5 @@ export default class Sphere extends Mesh
|
|
|
13
13
|
super(geometry, material);
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
|
+
|
|
17
|
+
export { Sphere };
|
|
@@ -2,7 +2,7 @@ import { Mesh } from 'three';
|
|
|
2
2
|
import { PlaneGeometry } from 'three';
|
|
3
3
|
import { MeshBasicMaterial } from 'three';
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
class VerticalPlane extends Mesh
|
|
6
6
|
{
|
|
7
7
|
constructor(width, height, color, material)
|
|
8
8
|
{
|
|
@@ -15,3 +15,5 @@ export default class VerticalPlane extends Mesh
|
|
|
15
15
|
super(geometry, material);
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
|
+
|
|
19
|
+
export { VerticalPlane };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import CameraManager from '../CameraManager';
|
|
2
|
-
import Input from '../Input';
|
|
3
|
-
import RaycastResolver from './RaycastResolver';
|
|
4
|
-
import IdleState from './states/IdleState';
|
|
1
|
+
import { CameraManager } from '../CameraManager';
|
|
2
|
+
import { Input } from '../Input';
|
|
3
|
+
import { RaycastResolver } from './RaycastResolver';
|
|
4
|
+
import { IdleState } from './states/IdleState';
|
|
5
5
|
|
|
6
6
|
import { Raycaster } from 'three';
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
class GroupRaycaster
|
|
9
9
|
{
|
|
10
10
|
constructor(raycastee_group, raycast_resolver, camera)
|
|
11
11
|
{
|
|
@@ -39,3 +39,5 @@ export default class GroupRaycaster
|
|
|
39
39
|
this.current_state.on_enter(this);
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
+
|
|
43
|
+
export { GroupRaycaster };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import PlaneRaycaster from './PlaneRaycaster';
|
|
2
|
-
import PlaneRaycastResolver from './PlaneRaycastResolver';
|
|
3
|
-
import Input from '../Input';
|
|
1
|
+
import { PlaneRaycaster } from './PlaneRaycaster';
|
|
2
|
+
import { PlaneRaycastResolver } from './PlaneRaycastResolver';
|
|
3
|
+
import { Input } from '../Input';
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
class PlaneDragResolver extends PlaneRaycastResolver
|
|
6
6
|
{
|
|
7
7
|
constructor()
|
|
8
8
|
{
|
|
@@ -87,3 +87,5 @@ export default class PlaneDragResolver extends PlaneRaycastResolver
|
|
|
87
87
|
this.on_update();
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
|
+
|
|
91
|
+
export { PlaneDragResolver };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
|
|
2
|
-
import PlaneRaycastResolver from './PlaneRaycastResolver';
|
|
3
|
-
import CameraUtilities from '../utilities/CameraUtilities';
|
|
2
|
+
import { PlaneRaycastResolver } from './PlaneRaycastResolver';
|
|
3
|
+
import { CameraUtilities } from '../utilities/CameraUtilities';
|
|
4
4
|
|
|
5
5
|
import { Raycaster } from 'three';
|
|
6
6
|
import { Vector3 } from 'three';
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
class PlaneRaycaster
|
|
9
9
|
{
|
|
10
10
|
constructor(raycast_resolver)
|
|
11
11
|
{
|
|
@@ -21,3 +21,5 @@ export default class PlaneRaycaster
|
|
|
21
21
|
this.raycast_resolver.on_hover(this.current_intersected_point);
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
|
+
|
|
25
|
+
export { PlaneRaycaster };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import RaycastResolver from './RaycastResolver';
|
|
2
|
-
import GroupRaycaster from './GroupRaycaster';
|
|
3
|
-
import Input from '../Input';
|
|
1
|
+
import { RaycastResolver } from './RaycastResolver';
|
|
2
|
+
import { GroupRaycaster } from './GroupRaycaster';
|
|
3
|
+
import { Input } from '../Input';
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
class SurfaceDragResolver extends RaycastResolver
|
|
6
6
|
{
|
|
7
7
|
constructor(surface_mesh)
|
|
8
8
|
{
|
|
@@ -75,3 +75,5 @@ export default class SurfaceDragResolver extends RaycastResolver
|
|
|
75
75
|
this._on_update();
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
|
+
|
|
79
|
+
export { SurfaceDragResolver };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import OnRaycastEnter from './OnRaycastEnter';
|
|
2
|
-
import BaseState from './BaseState';
|
|
3
|
-
|
|
1
|
+
import { OnRaycastEnter } from './OnRaycastEnter';
|
|
2
|
+
import { BaseState } from './BaseState';
|
|
3
|
+
class IdleState extends BaseState
|
|
4
4
|
{
|
|
5
5
|
constructor()
|
|
6
6
|
{
|
|
@@ -15,3 +15,5 @@ export default class IdleState extends BaseState
|
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
|
+
|
|
19
|
+
export { IdleState };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import BaseState from './BaseState';
|
|
2
|
-
import OnRaycastHover from './OnRaycastHover';
|
|
3
|
-
|
|
1
|
+
import { BaseState } from './BaseState';
|
|
2
|
+
import { OnRaycastHover } from './OnRaycastHover';
|
|
3
|
+
class OnRaycastEnter extends BaseState
|
|
4
4
|
{
|
|
5
5
|
constructor()
|
|
6
6
|
{
|
|
@@ -13,3 +13,5 @@ export default class OnRaycastEnter extends BaseState
|
|
|
13
13
|
context.set_state(new OnRaycastHover());
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
|
+
|
|
17
|
+
export { OnRaycastEnter };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import BaseState from './BaseState';
|
|
2
|
-
import IdleState from './IdleState';
|
|
1
|
+
import { BaseState } from './BaseState';
|
|
2
|
+
import { IdleState } from './IdleState';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
class OnRaycastExit extends BaseState
|
|
5
5
|
{
|
|
6
6
|
constructor()
|
|
7
7
|
{
|
|
@@ -14,3 +14,5 @@ export default class OnRaycastExit extends BaseState
|
|
|
14
14
|
context.set_state(new IdleState());
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
|
+
|
|
18
|
+
export { OnRaycastExit };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import BaseState from './BaseState';
|
|
2
|
-
import OnRaycastExit from './OnRaycastExit';
|
|
3
|
-
|
|
1
|
+
import { BaseState } from './BaseState';
|
|
2
|
+
import { OnRaycastExit } from './OnRaycastExit';
|
|
3
|
+
class OnRaycastHover extends BaseState
|
|
4
4
|
{
|
|
5
5
|
constructor()
|
|
6
6
|
{
|
|
@@ -23,3 +23,5 @@ export default class OnRaycastHover extends BaseState
|
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
+
|
|
27
|
+
export { OnRaycastHover };
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
|
|
2
|
-
import BaseRender from '../render_mode/BaseRender';
|
|
3
|
-
import BloomComposeMaterial from '../materials/BloomComposeMaterial';
|
|
2
|
+
import { BaseRender } from '../render_mode/BaseRender';
|
|
3
|
+
import { BloomComposeMaterial } from '../materials/BloomComposeMaterial';
|
|
4
4
|
|
|
5
5
|
import { WebGLRenderTarget } from 'three';
|
|
6
6
|
|
|
7
|
-
import Blurrer from '../render_utilities/Blurrer';
|
|
8
|
-
import Graphics from '../Graphics';
|
|
9
|
-
import CameraManager from '../CameraManager';
|
|
10
|
-
import SceneManager from '../SceneManager';
|
|
11
|
-
import OScreen from '../OScreen';
|
|
7
|
+
import { Blurrer } from '../render_utilities/Blurrer';
|
|
8
|
+
import { Graphics } from '../Graphics';
|
|
9
|
+
import { CameraManager } from '../CameraManager';
|
|
10
|
+
import { SceneManager } from '../SceneManager';
|
|
11
|
+
import { OScreen } from '../OScreen';
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
class BloomRender extends BaseRender
|
|
14
14
|
{
|
|
15
15
|
constructor()
|
|
16
16
|
{
|
|
@@ -59,3 +59,5 @@ export default class BloomRender extends BaseRender
|
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
+
|
|
63
|
+
export { BloomRender };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import CameraManager from '../CameraManager';
|
|
2
|
-
import SceneManager from '../SceneManager';
|
|
3
|
-
import BaseRender from '../render_mode/BaseRender';
|
|
4
|
-
import Graphics from '../Graphics';
|
|
5
|
-
import NormalMaterial from '../materials/NormalMaterial';
|
|
1
|
+
import { CameraManager } from '../CameraManager';
|
|
2
|
+
import { SceneManager } from '../SceneManager';
|
|
3
|
+
import { BaseRender } from '../render_mode/BaseRender';
|
|
4
|
+
import { Graphics } from '../Graphics';
|
|
5
|
+
import { NormalMaterial } from '../materials/NormalMaterial';
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
class DebugNormalsRender extends BaseRender
|
|
8
8
|
{
|
|
9
9
|
constructor()
|
|
10
10
|
{
|
|
@@ -18,3 +18,5 @@ export default class DebugNormalsRender extends BaseRender
|
|
|
18
18
|
Graphics.render(SceneManager.current, CameraManager.current, undefined, new NormalMaterial());
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
+
|
|
22
|
+
export { DebugNormalsRender };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import CameraManager from '../CameraManager';
|
|
2
|
-
import SceneManager from '../SceneManager';
|
|
3
|
-
import OScreen from '../OScreen';
|
|
4
|
-
import BaseRender from '../render_mode/BaseRender';
|
|
5
|
-
import DeferredRendererComposeMaterial from '../materials/DeferredRendererComposeMaterial';
|
|
6
|
-
import Graphics from '../Graphics';
|
|
7
|
-
import DeferredPointLightMaterial from '../materials/deferred/DeferredPointLightMaterial';
|
|
1
|
+
import { CameraManager } from '../CameraManager';
|
|
2
|
+
import { SceneManager } from '../SceneManager';
|
|
3
|
+
import { OScreen } from '../OScreen';
|
|
4
|
+
import { BaseRender } from '../render_mode/BaseRender';
|
|
5
|
+
import { DeferredRendererComposeMaterial } from '../materials/DeferredRendererComposeMaterial';
|
|
6
|
+
import { Graphics } from '../Graphics';
|
|
7
|
+
import { DeferredPointLightMaterial } from '../materials/deferred/DeferredPointLightMaterial';
|
|
8
8
|
|
|
9
9
|
import { WebGLRenderTarget } from 'three';
|
|
10
10
|
import { Scene } from 'three';
|
|
@@ -12,7 +12,7 @@ import { Mesh } from 'three';
|
|
|
12
12
|
import { SphereBufferGeometry } from 'three';
|
|
13
13
|
import { Matrix4 } from 'three';
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
class DeferredRender extends BaseRender
|
|
16
16
|
{
|
|
17
17
|
constructor()
|
|
18
18
|
{
|
|
@@ -110,3 +110,5 @@ export default class DeferredRender extends BaseRender
|
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
|
+
|
|
114
|
+
export { DeferredRender };
|