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,6 +1,6 @@
|
|
|
1
|
-
import AbstractLoader from './AbstractLoader';
|
|
1
|
+
import { AbstractLoader } from './AbstractLoader';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
class JSONLoader extends AbstractLoader
|
|
4
4
|
{
|
|
5
5
|
constructor(resource_id, url, size)
|
|
6
6
|
{
|
|
@@ -28,3 +28,5 @@ export default class JSONLoader extends AbstractLoader
|
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
|
+
|
|
32
|
+
export { JSONLoader };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import AbstractLoader from './AbstractLoader';
|
|
1
|
+
import { AbstractLoader } from './AbstractLoader';
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import { OBJLoader as TOBJLoader } from 'three/examples/jsm/loaders/OBJLoader.js';
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
class OBJLoader extends AbstractLoader
|
|
6
6
|
{
|
|
7
7
|
constructor(resource_id, url, size)
|
|
8
8
|
{
|
|
9
9
|
super(resource_id, url, size);
|
|
10
|
-
this.loader = new
|
|
10
|
+
this.loader = new TOBJLoader();
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
on_preloaded_finished(resource_container)
|
|
@@ -44,3 +44,5 @@ export default class OBJLoader extends AbstractLoader
|
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
+
|
|
48
|
+
export { OBJLoader };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import AbstractLoader from './AbstractLoader';
|
|
1
|
+
import { AbstractLoader } from './AbstractLoader';
|
|
2
2
|
|
|
3
|
-
import { Vector3
|
|
4
|
-
import { FileLoader
|
|
3
|
+
import { Vector3 } from 'three';
|
|
4
|
+
import { FileLoader } from 'three';
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
class PointArrayLoader extends AbstractLoader
|
|
7
7
|
{
|
|
8
8
|
constructor(resource_id, url, size)
|
|
9
9
|
{
|
|
10
10
|
super(resource_id, url, size);
|
|
11
|
-
this.loader = new
|
|
11
|
+
this.loader = new FileLoader();
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
on_preloaded_finished(resource_container)
|
|
@@ -61,10 +61,12 @@ export default class PointArrayLoader extends AbstractLoader
|
|
|
61
61
|
const x = parseFloat(string_array[i + 0]);
|
|
62
62
|
const y = parseFloat(string_array[i + 1]);
|
|
63
63
|
const z = parseFloat(string_array[i + 2]);
|
|
64
|
-
positions.push(new
|
|
64
|
+
positions.push(new Vector3(x, y, z));
|
|
65
65
|
}
|
|
66
66
|
return positions;
|
|
67
67
|
// let curve = new THREE.CatmullRomCurve3(positions);
|
|
68
68
|
// return curve.getPoints(100);
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
|
+
|
|
72
|
+
export { PointArrayLoader };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import AbstractLoader from './AbstractLoader';
|
|
1
|
+
import { AbstractLoader } from './AbstractLoader';
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import { RGBELoader } from 'three/examples/jsm/loaders/RGBELoader.js';
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
class RGBETextureLoader extends AbstractLoader
|
|
6
6
|
{
|
|
7
7
|
constructor(resource_id, url, size)
|
|
8
8
|
{
|
|
9
9
|
super(resource_id, url, size);
|
|
10
|
-
this.loader = new
|
|
10
|
+
this.loader = new RGBELoader();
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
on_preloaded_finished(resource_container)
|
|
@@ -44,3 +44,5 @@ export default class RGBETextureLoader extends AbstractLoader
|
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
+
|
|
48
|
+
export { RGBETextureLoader };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import ResourceContainer from '../ResourceContainer';
|
|
1
|
+
import { ResourceContainer } from '../ResourceContainer';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
class ResourceBatch
|
|
4
4
|
{
|
|
5
5
|
constructor(batch_name)
|
|
6
6
|
{
|
|
@@ -82,3 +82,5 @@ export default class ResourceBatch
|
|
|
82
82
|
return total_bytes;
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
|
+
|
|
86
|
+
export { ResourceBatch };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import AbstractLoader from './AbstractLoader';
|
|
1
|
+
import { AbstractLoader } from './AbstractLoader';
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import { SVGLoader as TSVGLoader } from 'three/examples/jsm/loaders/SVGLoader.js';
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
class SVGLoader extends AbstractLoader
|
|
6
6
|
{
|
|
7
7
|
constructor(resource_id, url, size)
|
|
8
8
|
{
|
|
9
9
|
super(resource_id, url, size);
|
|
10
|
-
this.loader = new
|
|
10
|
+
this.loader = new TSVGLoader();
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
on_preloaded_finished(resource_container)
|
|
@@ -44,3 +44,5 @@ export default class SVGLoader extends AbstractLoader
|
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
+
|
|
48
|
+
export { SVGLoader };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import AbstractLoader from './AbstractLoader';
|
|
1
|
+
import { AbstractLoader } from './AbstractLoader';
|
|
2
2
|
|
|
3
|
-
import { FileLoader as
|
|
3
|
+
import { FileLoader as TFileLoader } from 'three';
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
class TextLoader extends AbstractLoader
|
|
6
6
|
{
|
|
7
7
|
constructor(resource_id, url, size)
|
|
8
8
|
{
|
|
9
9
|
super(resource_id, url, size);
|
|
10
|
-
this.loader = new
|
|
10
|
+
this.loader = new TFileLoader();
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
on_preloaded_finished(resource_container)
|
|
@@ -44,3 +44,5 @@ export default class TextLoader extends AbstractLoader
|
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
+
|
|
48
|
+
export { TextLoader };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import AbstractLoader from './AbstractLoader';
|
|
1
|
+
import { AbstractLoader } from './AbstractLoader';
|
|
2
2
|
|
|
3
3
|
import { Texture } from 'three';
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
class TextureLoader extends AbstractLoader
|
|
6
6
|
{
|
|
7
7
|
constructor(resource_id, url, size)
|
|
8
8
|
{
|
|
@@ -48,3 +48,5 @@ export default class TextureLoader extends AbstractLoader
|
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
|
+
|
|
52
|
+
export { TextureLoader };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import AbstractLoader from './AbstractLoader';
|
|
1
|
+
import { AbstractLoader } from './AbstractLoader';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
class VideoLoader extends AbstractLoader
|
|
4
4
|
{
|
|
5
5
|
constructor(resource_id, url, size)
|
|
6
6
|
{
|
|
@@ -28,3 +28,5 @@ export default class VideoLoader extends AbstractLoader
|
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
|
+
|
|
32
|
+
export { VideoLoader };
|
|
@@ -29,28 +29,28 @@ void main() {
|
|
|
29
29
|
vec3 rgbSW = texture2D(_MainTex, vertTexcoord.xy + (vec2(-1.0, +1.0) * texcoordOffset)).xyz;
|
|
30
30
|
vec3 rgbSE = texture2D(_MainTex, vertTexcoord.xy + (vec2(+1.0, +1.0) * texcoordOffset)).xyz;
|
|
31
31
|
vec3 rgbM = texture2D(_MainTex, vertTexcoord.xy).xyz;
|
|
32
|
-
|
|
32
|
+
|
|
33
33
|
vec3 luma = vec3(0.299, 0.587, 0.114);
|
|
34
34
|
float lumaNW = dot(rgbNW, luma);
|
|
35
35
|
float lumaNE = dot(rgbNE, luma);
|
|
36
36
|
float lumaSW = dot(rgbSW, luma);
|
|
37
37
|
float lumaSE = dot(rgbSE, luma);
|
|
38
38
|
float lumaM = dot( rgbM, luma);
|
|
39
|
-
|
|
39
|
+
|
|
40
40
|
float lumaMin = min(lumaM, min(min(lumaNW, lumaNE), min(lumaSW, lumaSE)));
|
|
41
41
|
float lumaMax = max(lumaM, max(max(lumaNW, lumaNE), max(lumaSW, lumaSE)));
|
|
42
|
-
|
|
42
|
+
|
|
43
43
|
vec2 dir;
|
|
44
44
|
dir.x = -((lumaNW + lumaNE) - (lumaSW + lumaSE));
|
|
45
45
|
dir.y = ((lumaNW + lumaSW) - (lumaNE + lumaSE));
|
|
46
|
-
|
|
46
|
+
|
|
47
47
|
float dirReduce = max((lumaNW + lumaNE + lumaSW + lumaSE) * (0.25 * FXAA_REDUCE_MUL), FXAA_REDUCE_MIN);
|
|
48
|
-
|
|
48
|
+
|
|
49
49
|
float rcpDirMin = 1.0/(min(abs(dir.x), abs(dir.y)) + dirReduce);
|
|
50
|
-
|
|
51
|
-
dir = min(vec2(FXAA_SPAN_MAX, FXAA_SPAN_MAX),
|
|
50
|
+
|
|
51
|
+
dir = min(vec2(FXAA_SPAN_MAX, FXAA_SPAN_MAX),
|
|
52
52
|
max(vec2(-FXAA_SPAN_MAX, -FXAA_SPAN_MAX), dir * rcpDirMin)) * texcoordOffset;
|
|
53
|
-
|
|
53
|
+
|
|
54
54
|
vec3 rgbA = (1.0/2.0) * (
|
|
55
55
|
texture2D(_MainTex, vertTexcoord.xy + dir * (1.0/3.0 - 0.5)).xyz +
|
|
56
56
|
texture2D(_MainTex, vertTexcoord.xy + dir * (2.0/3.0 - 0.5)).xyz);
|
|
@@ -65,8 +65,8 @@ void main() {
|
|
|
65
65
|
gl_FragColor.xyz=rgbB;
|
|
66
66
|
}
|
|
67
67
|
gl_FragColor.a = 1.0;
|
|
68
|
-
|
|
68
|
+
|
|
69
69
|
// gl_FragColor = vec4(texture2D(_MainTex, vUv).rgb, 1.0);
|
|
70
70
|
// gl_FragColor = vec4(1.0, 0.0, 0.0, 0.0);
|
|
71
71
|
//gl_FragColor *= vertColor;
|
|
72
|
-
}
|
|
72
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Mesh } from 'three';
|
|
2
|
-
import RGBDataTexture from '../data_textures/RGBDataTexture';
|
|
3
|
-
import RGBADataTexture from '../data_textures/RGBADataTexture';
|
|
4
|
-
import RGBFloatDataTexture from '../data_textures/RGBFloatDataTexture';
|
|
5
|
-
import RGBAFloatDataTexture from '../data_textures/RGBAFloatDataTexture';
|
|
2
|
+
import { RGBDataTexture } from '../data_textures/RGBDataTexture';
|
|
3
|
+
import { RGBADataTexture } from '../data_textures/RGBADataTexture';
|
|
4
|
+
import { RGBFloatDataTexture } from '../data_textures/RGBFloatDataTexture';
|
|
5
|
+
import { RGBAFloatDataTexture } from '../data_textures/RGBAFloatDataTexture';
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
class BatchedMesh extends Mesh
|
|
8
8
|
{
|
|
9
9
|
constructor(id_table, geometry, material, max_texture_width)
|
|
10
10
|
{
|
|
@@ -52,3 +52,5 @@ export default class BatchedMesh extends Mesh
|
|
|
52
52
|
this.material.uniforms[uniform_name].set_rgba(this.get_mesh_index(mesh_name), r, g, b, a);
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
+
|
|
56
|
+
export { BatchedMesh };
|
|
@@ -6,7 +6,7 @@ import { RGBAFormat } from 'three';
|
|
|
6
6
|
import { RGBFormat } from 'three';
|
|
7
7
|
import { FloatType } from 'three';
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
class GeometryBatch
|
|
10
10
|
{
|
|
11
11
|
constructor(geometry, batch_width)
|
|
12
12
|
{
|
|
@@ -310,3 +310,5 @@ export default class GeometryBatch
|
|
|
310
310
|
}
|
|
311
311
|
}
|
|
312
312
|
}
|
|
313
|
+
|
|
314
|
+
export { GeometryBatch };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import GeometryBatch from './GeometryBatch';
|
|
1
|
+
import { GeometryBatch } from './GeometryBatch';
|
|
2
2
|
|
|
3
3
|
import * as BufferGeometryUtils from 'three/examples/jsm/utils/BufferGeometryUtils.js';
|
|
4
4
|
|
|
5
5
|
import { BufferAttribute } from 'three';
|
|
6
|
-
import OMath from '../utilities/OMath';
|
|
6
|
+
import { OMath } from '../utilities/OMath';
|
|
7
7
|
|
|
8
8
|
class GeometryBatcher
|
|
9
9
|
{
|
|
@@ -60,4 +60,5 @@ class GeometryBatcher
|
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
|
|
63
|
+
const geometry_batcher = new GeometryBatcher();
|
|
64
|
+
export { geometry_batcher as GeometryBatcher };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import BatchedMesh from './BatchedMesh';
|
|
1
|
+
import { BatchedMesh } from './BatchedMesh';
|
|
2
2
|
|
|
3
3
|
import * as BufferGeometryUtils from 'three/examples/jsm/utils/BufferGeometryUtils.js';
|
|
4
4
|
|
|
5
5
|
import { BufferAttribute } from 'three';
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
class MeshBatcher
|
|
8
8
|
{
|
|
9
9
|
batch(meshes, material)
|
|
10
10
|
{
|
|
@@ -54,3 +54,5 @@ export default class MeshBatcher
|
|
|
54
54
|
return new BatchedMesh(id_table, buffer_geometry, material, max_texture_width);
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
+
|
|
58
|
+
export { MeshBatcher };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Vector2 } from 'three';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
class ScreenSpacePosition
|
|
4
4
|
{
|
|
5
5
|
constructor()
|
|
6
6
|
{
|
|
@@ -12,3 +12,5 @@ export default class ScreenSpacePosition
|
|
|
12
12
|
return this.tmp_vec.set(position.x, position.y);
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
|
+
|
|
16
|
+
export { ScreenSpacePosition };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import CameraManager from '../../CameraManager';
|
|
1
|
+
import { CameraManager } from '../../CameraManager';
|
|
2
2
|
|
|
3
3
|
import { Vector2 } from 'three';
|
|
4
4
|
import { Vector3 } from 'three';
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
class WorldSpacePosition
|
|
7
7
|
{
|
|
8
8
|
constructor()
|
|
9
9
|
{
|
|
@@ -19,3 +19,5 @@ export default class WorldSpacePosition
|
|
|
19
19
|
return this.tmp_vec2.set(this.tmp_vec3.x, this.tmp_vec3.y);
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
+
|
|
23
|
+
export { WorldSpacePosition };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import UIElementState from './UIElementState';
|
|
1
|
+
import { UIElementState } from './UIElementState';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
class OnIdle extends UIElementState
|
|
4
4
|
{
|
|
5
5
|
constructor()
|
|
6
6
|
{
|
|
@@ -15,3 +15,5 @@ export default class OnIdle extends UIElementState
|
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
|
+
|
|
19
|
+
export { OnIdle };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import UIElementState from './UIElementState';
|
|
1
|
+
import { UIElementState } from './UIElementState';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
class OnMouseEnter extends UIElementState
|
|
4
4
|
{
|
|
5
5
|
constructor()
|
|
6
6
|
{
|
|
@@ -24,3 +24,5 @@ export default class OnMouseEnter extends UIElementState
|
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
+
|
|
28
|
+
export { OnMouseEnter };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import UIElementState from './UIElementState';
|
|
1
|
+
import { UIElementState } from './UIElementState';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
class OnMouseExit extends UIElementState
|
|
4
4
|
{
|
|
5
5
|
constructor()
|
|
6
6
|
{
|
|
@@ -13,3 +13,5 @@ export default class OnMouseExit extends UIElementState
|
|
|
13
13
|
ui_element.set_state(ui_element._on_idle_state);
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
|
+
|
|
17
|
+
export { OnMouseExit };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import UIElementState from './UIElementState';
|
|
1
|
+
import { UIElementState } from './UIElementState';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
class OnMouseHover extends UIElementState
|
|
4
4
|
{
|
|
5
5
|
constructor()
|
|
6
6
|
{
|
|
@@ -29,3 +29,5 @@ export default class OnMouseHover extends UIElementState
|
|
|
29
29
|
ui_element.on_mouse_hover();
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
|
+
|
|
33
|
+
export { OnMouseHover };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import CameraManager from '../CameraManager';
|
|
2
|
-
import Input from '../Input';
|
|
3
|
-
import OMath from '../utilities/OMath';
|
|
4
|
-
import OScreen from '../OScreen';
|
|
1
|
+
import { CameraManager } from '../CameraManager';
|
|
2
|
+
import { Input } from '../Input';
|
|
3
|
+
import { OMath } from '../utilities/OMath';
|
|
4
|
+
import { OScreen } from '../OScreen';
|
|
5
5
|
|
|
6
6
|
import { Vector3 } from 'three';
|
|
7
7
|
import { Matrix4 } from 'three';
|
|
@@ -207,4 +207,5 @@ class CameraUtilities
|
|
|
207
207
|
}
|
|
208
208
|
}
|
|
209
209
|
|
|
210
|
-
|
|
210
|
+
const camera_utilities = new CameraUtilities();
|
|
211
|
+
export { camera_utilities as CameraUtilities };
|