ohzi-core 8.1.0 → 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.
Files changed (210) hide show
  1. package/build/index.module.js +1 -1
  2. package/build/index.module.js.map +1 -1
  3. package/package.json +1 -1
  4. package/src/BaseApplication.js +3 -1
  5. package/src/Browser.js +2 -1
  6. package/src/CameraManager.js +2 -1
  7. package/src/Capabilities.js +2 -1
  8. package/src/Configuration.js +2 -1
  9. package/src/CustomBezierCurve.js +3 -1
  10. package/src/Debug.js +15 -11
  11. package/src/EventManager.js +2 -1
  12. package/src/Graphics.js +11 -10
  13. package/src/Initializer.js +19 -18
  14. package/src/Input.js +3 -2
  15. package/src/KeyboardInput.js +3 -1
  16. package/src/OS.js +2 -1
  17. package/src/OScreen.js +2 -1
  18. package/src/OrthographicCamera.js +4 -2
  19. package/src/PerspectiveCamera.js +4 -2
  20. package/src/ReflectionPlaneContext.js +2 -1
  21. package/src/RenderLayers.js +3 -1
  22. package/src/RenderLoop.js +11 -9
  23. package/src/RenderOrder.js +3 -1
  24. package/src/ResourceContainer.js +3 -2
  25. package/src/SceneManager.js +2 -1
  26. package/src/Screen.js +3 -2
  27. package/src/Time.js +2 -1
  28. package/src/UI.js +5 -4
  29. package/src/action_sequencer/ActionEvent.js +4 -2
  30. package/src/action_sequencer/ActionInterpolator.js +4 -2
  31. package/src/action_sequencer/ActionSequencer.js +4 -2
  32. package/src/action_sequencer/NumberInterpolator.js +5 -3
  33. package/src/action_sequencer/VectorInterpolator.js +4 -2
  34. package/src/blitter_index.js +5 -5
  35. package/src/canvas_drawer/CanvasDrawer.js +3 -1
  36. package/src/canvas_drawer/MultiLineTextDrawer.js +4 -2
  37. package/src/canvas_drawer/SimpleTextDrawer.js +4 -2
  38. package/src/components/AudioClip.js +3 -1
  39. package/src/components/AxisHelper.js +3 -1
  40. package/src/components/BaseObject.js +3 -1
  41. package/src/components/EdgeMesh.js +3 -1
  42. package/src/components/GeometryEdgeVisualizer.js +5 -2
  43. package/src/components/Grid.js +5 -2
  44. package/src/components/Line.js +3 -1
  45. package/src/components/MultiLinePath.js +4 -2
  46. package/src/components/MultiLineText2D.js +4 -2
  47. package/src/components/ObjectAxis.js +4 -2
  48. package/src/components/ObjectOrientedBoundingBox.js +3 -1
  49. package/src/components/PlaneHelper.js +3 -1
  50. package/src/components/Shape2D.js +4 -2
  51. package/src/components/Shape3D.js +4 -2
  52. package/src/components/Text2D.js +5 -3
  53. package/src/components/UIElement.js +11 -9
  54. package/src/components/UpdatableMaterialMesh.js +3 -1
  55. package/src/components/WorldImage.js +3 -1
  56. package/src/components/mouse_interactors/ObjectRotator.js +6 -4
  57. package/src/components/sdf_text/SDFText.js +4 -2
  58. package/src/components/sdf_text/SDFTextBatch.js +6 -4
  59. package/src/components/sdf_text/TextGlyph.js +3 -1
  60. package/src/data_textures/CustomDataTexture.js +3 -1
  61. package/src/data_textures/RGBADataTexture.js +4 -2
  62. package/src/data_textures/RGBAFloatDataTexture.js +4 -2
  63. package/src/data_textures/RGBDataTexture.js +4 -2
  64. package/src/data_textures/RGBFloatDataTexture.js +4 -2
  65. package/src/editor/ManipulatorHandle.js +6 -4
  66. package/src/editor/ObjectEditor.js +6 -4
  67. package/src/editor/ObjectManipulator.js +6 -4
  68. package/src/editor/ObjectPicker.js +5 -3
  69. package/src/gpu_particles/GPUParticleSystem.js +4 -2
  70. package/src/gpu_particles/ParticleAttribute.js +5 -3
  71. package/src/gpu_particles/ParticlePositionAttribute.js +5 -3
  72. package/src/html_utilities/CSSAnimator.js +6 -4
  73. package/src/html_utilities/css_animator_states/Animating.js +6 -4
  74. package/src/html_utilities/css_animator_states/Idle.js +3 -1
  75. package/src/index.js +111 -111
  76. package/src/materials/AddMaterial.js +5 -2
  77. package/src/materials/AlphaFilterMaterial.js +5 -2
  78. package/src/materials/BaseShaderMaterial.js +3 -1
  79. package/src/materials/BlitMaterial.js +3 -1
  80. package/src/materials/BloomComposeMaterial.js +6 -4
  81. package/src/materials/BoxBlurMaterial.js +5 -2
  82. package/src/materials/ClearAlphaMaterial.js +5 -3
  83. package/src/materials/ClearColorMaterial.js +5 -3
  84. package/src/materials/ClearDepthNormalMaterial.js +5 -2
  85. package/src/materials/DeferredRendererComposeMaterial.js +5 -2
  86. package/src/materials/DepthNormalMaterial.js +3 -1
  87. package/src/materials/DisplayNormalTextureMaterial.js +5 -2
  88. package/src/materials/DualFilteringBlurMaterial.js +5 -2
  89. package/src/materials/FXAAMaterial.js +5 -3
  90. package/src/materials/GaussianBlurMaterial.js +6 -2
  91. package/src/materials/LuminosityHighPassMaterial.js +6 -2
  92. package/src/materials/MedianFilterMaterial.js +5 -2
  93. package/src/materials/NormalMaterial.js +3 -1
  94. package/src/materials/SDFScreenTextMaterial.js +5 -2
  95. package/src/materials/SDFTextMaterial.js +6 -3
  96. package/src/materials/SSAOComposeMaterial.js +5 -2
  97. package/src/materials/SSAOMaterial.js +7 -3
  98. package/src/materials/ScreenSpaceTextureMaterial.js +4 -2
  99. package/src/materials/UIElementMaterial.js +6 -3
  100. package/src/materials/UnrealBloomComposeMaterial.js +6 -2
  101. package/src/materials/UnrealBlurMaterial.js +5 -2
  102. package/src/materials/UnrealComposeMaterial.js +5 -2
  103. package/src/materials/ViewPositionMaterial.js +3 -1
  104. package/src/materials/deferred/DeferredPointLightMaterial.js +5 -2
  105. package/src/materials/gpu_particles/AttributeUpdateMaterial.js +8 -4
  106. package/src/materials/gpu_particles/BasicParticleMaterial.js +3 -1
  107. package/src/materials/gpu_particles/ParticleStorageMaterial.js +4 -1
  108. package/src/materials/gpu_particles/PositionStorageMaterial.js +5 -4
  109. package/src/object_pool/Pool.js +3 -1
  110. package/src/primitives/Arrow.js +3 -1
  111. package/src/primitives/Cube.js +3 -1
  112. package/src/primitives/HorizontalPlane.js +3 -1
  113. package/src/primitives/Sphere.js +3 -1
  114. package/src/primitives/VerticalPlane.js +3 -1
  115. package/src/raycast/GroupRaycaster.js +7 -5
  116. package/src/raycast/PlaneDragResolver.js +6 -4
  117. package/src/raycast/PlaneRaycastResolver.js +3 -1
  118. package/src/raycast/PlaneRaycaster.js +5 -3
  119. package/src/raycast/RaycastResolver.js +3 -1
  120. package/src/raycast/SurfaceDragResolver.js +6 -4
  121. package/src/raycast/states/BaseState.js +3 -1
  122. package/src/raycast/states/IdleState.js +5 -3
  123. package/src/raycast/states/OnRaycastEnter.js +5 -3
  124. package/src/raycast/states/OnRaycastExit.js +5 -3
  125. package/src/raycast/states/OnRaycastHover.js +5 -3
  126. package/src/render_mode/BaseRender.js +3 -1
  127. package/src/render_mode/BloomRender.js +10 -8
  128. package/src/render_mode/DebugNormalsRender.js +8 -6
  129. package/src/render_mode/DeferredRender.js +10 -8
  130. package/src/render_mode/NormalAORender.js +13 -11
  131. package/src/render_mode/NormalRender.js +7 -5
  132. package/src/render_mode/OutlineRender.js +6 -3
  133. package/src/render_mode/PlanarReflectionsRender.js +9 -6
  134. package/src/render_mode/TransparencyMixRender.js +8 -4
  135. package/src/render_mode/UnrealBloomRender.js +11 -9
  136. package/src/render_mode/VRRender.js +7 -5
  137. package/src/render_utilities/Blitter.js +4 -2
  138. package/src/render_utilities/Blurrer.js +5 -3
  139. package/src/render_utilities/DepthAndNormalsRenderer.js +7 -5
  140. package/src/render_utilities/DualFilteringBlurrer.js +6 -4
  141. package/src/render_utilities/GaussianBlurrer.js +6 -4
  142. package/src/render_utilities/MedianFilter.js +5 -3
  143. package/src/render_utilities/ViewPositionRenderer.js +7 -5
  144. package/src/resource_loader/AbstractLoader.js +5 -3
  145. package/src/resource_loader/AsyncTextureLoader.js +4 -2
  146. package/src/resource_loader/AudioLoader.js +5 -3
  147. package/src/resource_loader/BasisLoader.js +4 -2
  148. package/src/resource_loader/CubemapLoader.js +6 -4
  149. package/src/resource_loader/DAELoader.js +6 -4
  150. package/src/resource_loader/DDSLoader.js +6 -4
  151. package/src/resource_loader/FileLoader.js +6 -4
  152. package/src/resource_loader/FontLoader.js +4 -2
  153. package/src/resource_loader/GLTFDRACOLoader.js +6 -4
  154. package/src/resource_loader/GLTFLoader.js +6 -4
  155. package/src/resource_loader/HDRCubeTextureLoader.js +6 -4
  156. package/src/resource_loader/JSONLoader.js +4 -2
  157. package/src/resource_loader/OBJLoader.js +6 -4
  158. package/src/resource_loader/PointArrayLoader.js +8 -6
  159. package/src/resource_loader/RGBETextureLoader.js +6 -4
  160. package/src/resource_loader/ResourceBatch.js +4 -2
  161. package/src/resource_loader/SVGLoader.js +6 -4
  162. package/src/resource_loader/TextLoader.js +6 -4
  163. package/src/resource_loader/TextureLoader.js +4 -2
  164. package/src/resource_loader/VideoLoader.js +4 -2
  165. package/src/shaders/anti_aliasing/fxaa.frag +10 -10
  166. package/src/shaders/basic_line/basic_line.vert +1 -1
  167. package/src/static_batcher/BatchedMesh.js +7 -5
  168. package/src/static_batcher/GeometryBatch.js +3 -1
  169. package/src/static_batcher/GeometryBatcher.js +4 -3
  170. package/src/static_batcher/MeshBatcher.js +4 -2
  171. package/src/ui/ui_element_position/ScreenSpacePosition.js +3 -1
  172. package/src/ui/ui_element_position/WorldSpacePosition.js +4 -2
  173. package/src/ui/ui_element_state/OnIdle.js +4 -2
  174. package/src/ui/ui_element_state/OnMouseEnter.js +4 -2
  175. package/src/ui/ui_element_state/OnMouseExit.js +4 -2
  176. package/src/ui/ui_element_state/OnMouseHover.js +4 -2
  177. package/src/ui/ui_element_state/UIElementState.js +3 -1
  178. package/src/utilities/ArrayUtilities.js +3 -1
  179. package/src/utilities/CameraUtilities.js +6 -5
  180. package/src/utilities/EasingFunctions.js +35 -35
  181. package/src/utilities/FrustumPointFitter.js +3 -1
  182. package/src/utilities/GeometryUtilities.js +3 -1
  183. package/src/utilities/HTMLUtilities.js +3 -1
  184. package/src/utilities/ImageUtilities.js +3 -1
  185. package/src/utilities/MeshSampler.js +2 -1
  186. package/src/utilities/ModelUtilities.js +2 -1
  187. package/src/utilities/OMath.js +3 -1
  188. package/src/utilities/ObjectUtilities.js +3 -1
  189. package/src/utilities/OrthographicFrustumPointFitter.js +3 -1
  190. package/src/utilities/PerspectiveFrustumPointFitter.js +5 -2
  191. package/src/utilities/StringUtilities.js +3 -1
  192. package/src/utilities/TimeUtilities.js +3 -1
  193. package/src/utilities/Validation.js +3 -1
  194. package/src/view_components/ApplicationView.js +7 -5
  195. package/src/view_components/ViewComponent.js +5 -3
  196. package/src/view_components/ViewComponentManager.js +3 -2
  197. package/src/view_components/ViewContext.js +2 -1
  198. package/src/view_components/ViewManager.js +4 -3
  199. package/src/view_components/ViewState.js +3 -1
  200. package/src/view_components/transition/ActionSequencerBuilder.js +7 -5
  201. package/src/view_components/transition/DrawIOAnimationSheet.js +3 -1
  202. package/src/view_components/transition/TransitionTable.js +4 -2
  203. package/src/view_components/transition/ViewStateTransitionHandler.js +5 -3
  204. package/types/raycast/states/OnRaycastHover.d.ts +2 -1
  205. package/types/render_mode/DebugNormalsRender.d.ts +2 -1
  206. package/types/resource_loader/GLTFLoader.d.ts +3 -1
  207. package/types/ui/ui_element_state/OnIdle.d.ts +1 -1
  208. package/types/ui/ui_element_state/OnMouseEnter.d.ts +1 -1
  209. package/types/ui/ui_element_state/OnMouseExit.d.ts +1 -1
  210. package/types/view_components/ApplicationView.d.ts +1 -1
@@ -1,6 +1,6 @@
1
- import ResourceContainer from '../ResourceContainer';
1
+ import { ResourceContainer } from '../ResourceContainer';
2
2
 
3
- export default class ResourceBatch
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 * as THREESVGLoader from 'three/examples/jsm/loaders/SVGLoader.js';
3
+ import { SVGLoader as TSVGLoader } from 'three/examples/jsm/loaders/SVGLoader.js';
4
4
 
5
- export default class SVGLoader extends AbstractLoader
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 THREESVGLoader.SVGLoader();
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 THREEFileLoader } from 'three';
3
+ import { FileLoader as TFileLoader } from 'three';
4
4
 
5
- export default class TextLoader extends AbstractLoader
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 THREEFileLoader();
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
- export default class TextureLoader extends AbstractLoader
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
- export default class VideoLoader extends AbstractLoader
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
+ }
@@ -34,4 +34,4 @@ void main()
34
34
  line_coverage = coverage;
35
35
  uv_u = orientation * 0.5 + 0.5;
36
36
 
37
- }
37
+ }
@@ -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
- export default class BatchedMesh extends Mesh
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
- export default class GeometryBatch
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
- export default new GeometryBatcher();
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
- export default class MeshBatcher
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
- export default class ScreenSpacePosition
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
- export default class WorldSpacePosition
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
- export default class OnIdle extends UIElementState
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
- export default class OnMouseEnter extends UIElementState
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
- export default class OnMouseExit extends UIElementState
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
- export default class OnMouseHover extends UIElementState
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,4 +1,4 @@
1
- export default class UIElementState
1
+ class UIElementState
2
2
  {
3
3
  constructor()
4
4
  {
@@ -16,3 +16,5 @@ export default class UIElementState
16
16
  on_exit(ui_element)
17
17
  {}
18
18
  }
19
+
20
+ export { UIElementState };
@@ -1,4 +1,4 @@
1
- export default class ArrayUtilities
1
+ class ArrayUtilities
2
2
  {
3
3
  constructor()
4
4
  {}
@@ -53,3 +53,5 @@ export default class ArrayUtilities
53
53
  return arr;
54
54
  }
55
55
  }
56
+
57
+ export { ArrayUtilities };
@@ -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
- export default new CameraUtilities();
210
+ const camera_utilities = new CameraUtilities();
211
+ export { camera_utilities as CameraUtilities };
@@ -1,112 +1,112 @@
1
1
  class EasingFunctions
2
2
  {
3
3
  constructor()
4
- { }
4
+ {}
5
5
 
6
- linear(x)
6
+ static linear(x)
7
7
  {
8
8
  return x;
9
9
  }
10
10
 
11
- triangular(x)
11
+ static triangular(x)
12
12
  {
13
13
  return 1 - Math.abs((x * 2) % (1 * 2) - 1);
14
14
  }
15
15
 
16
- ease_in_sine(x)
16
+ static ease_in_sine(x)
17
17
  {
18
18
  return 1 - Math.cos(x * 3.1415926 / 2);
19
19
  }
20
20
 
21
- ease_out_sine(x)
21
+ static ease_out_sine(x)
22
22
  {
23
23
  return Math.sin(x * 3.1415926 / 2);
24
24
  }
25
25
 
26
- ease_in_out_sine(x)
26
+ static ease_in_out_sine(x)
27
27
  {
28
28
  return -(Math.cos(3.1415926 * x) - 1) / 2;
29
29
  }
30
30
 
31
- ease_in_cubic(x)
31
+ static ease_in_cubic(x)
32
32
  {
33
33
  return x * x * x;
34
34
  }
35
35
 
36
- ease_out_cubic(x)
36
+ static ease_out_cubic(x)
37
37
  {
38
38
  return 1 - Math.pow(1 - x, 3);
39
39
  }
40
40
 
41
- ease_in_out_cubic(x)
41
+ static ease_in_out_cubic(x)
42
42
  {
43
43
  return x < 0.5
44
44
  ? 4 * x * x * x
45
45
  : 1 - Math.pow(-2 * x + 2, 3) / 2;
46
46
  }
47
47
 
48
- ease_in_quad(x)
48
+ static ease_in_quad(x)
49
49
  {
50
50
  return x * x;
51
51
  }
52
52
 
53
- ease_out_quad(x)
53
+ static ease_out_quad(x)
54
54
  {
55
55
  return 1 - (1 - x) * (1 - x);
56
56
  }
57
57
 
58
- ease_in_out_quad(x)
58
+ static ease_in_out_quad(x)
59
59
  {
60
60
  return x < 0.5
61
61
  ? 2 * x * x
62
62
  : 1 - Math.pow(-2 * x + 2, 2) / 2;
63
63
  }
64
64
 
65
- ease_in_quart(x)
65
+ static ease_in_quart(x)
66
66
  {
67
67
  return x * x * x * x;
68
68
  }
69
69
 
70
- ease_out_quart(x)
70
+ static ease_out_quart(x)
71
71
  {
72
72
  return 1 - Math.pow(1 - x, 4);
73
73
  }
74
74
 
75
- ease_in_out_quart(x)
75
+ static ease_in_out_quart(x)
76
76
  {
77
77
  return x < 0.5
78
78
  ? 8 * x * x * x * x
79
79
  : 1 - Math.pow(-2 * x + 2, 4) / 2;
80
80
  }
81
81
 
82
- ease_in_quint(x)
82
+ static ease_in_quint(x)
83
83
  {
84
84
  return x * x * x * x * x;
85
85
  }
86
86
 
87
- ease_out_quint(x)
87
+ static ease_out_quint(x)
88
88
  {
89
89
  return 1 - Math.pow(1 - x, 5);
90
90
  }
91
91
 
92
- ease_in_out_quint(x)
92
+ static ease_in_out_quint(x)
93
93
  {
94
94
  return x < 0.5
95
95
  ? 16 * x * x * x * x * x
96
96
  : 1 - Math.pow(-2 * x + 2, 5) / 2;
97
97
  }
98
98
 
99
- ease_in_expo(x)
99
+ static ease_in_expo(x)
100
100
  {
101
101
  return x === 0 ? 0 : Math.pow(2, 10 * x - 10);
102
102
  }
103
103
 
104
- ease_out_expo(x)
104
+ static ease_out_expo(x)
105
105
  {
106
106
  return x === 1 ? 1 : 1 - Math.pow(2, -10 * x);
107
107
  }
108
108
 
109
- ease_in_out_expo(x)
109
+ static ease_in_out_expo(x)
110
110
  {
111
111
  return x === 0
112
112
  ? 0
@@ -117,41 +117,41 @@ class EasingFunctions
117
117
  : (2 - Math.pow(2, -20 * x + 10)) / 2;
118
118
  }
119
119
 
120
- ease_in_circ(x)
120
+ static ease_in_circ(x)
121
121
  {
122
122
  return 1 - Math.sqrt(1 - Math.pow(x, 2));
123
123
  }
124
124
 
125
- ease_out_circ(x)
125
+ static ease_out_circ(x)
126
126
  {
127
127
  return Math.sqrt(1 - Math.pow(x - 1, 2));
128
128
  }
129
129
 
130
- ease_in_out_circ(x)
130
+ static ease_in_out_circ(x)
131
131
  {
132
132
  return x < 0.5
133
133
  ? (1 - Math.sqrt(1 - Math.pow(2 * x, 2))) / 2
134
134
  : (Math.sqrt(1 - Math.pow(-2 * x + 2, 2)) + 1) / 2;
135
135
  }
136
136
 
137
- ease_in_back(x)
137
+ static ease_in_back(x)
138
138
  {
139
139
  return 2.7015 * x * x * x - 1.7015 * x * x;
140
140
  }
141
141
 
142
- ease_out_back(x)
142
+ static ease_out_back(x)
143
143
  {
144
144
  return 1 + 2.7015 * Math.pow(x - 1, 3) + 1.7015 * Math.pow(x - 1, 2);
145
145
  }
146
146
 
147
- ease_in_out_back(x)
147
+ static ease_in_out_back(x)
148
148
  {
149
149
  return x < 0.5
150
150
  ? (Math.pow(2 * x, 2) * ((2.5949095 + 1) * 2 * x - 2.5949095)) / 2
151
151
  : (Math.pow(2 * x - 2, 2) * ((2.5949095 + 1) * (x * 2 - 2) + 2.5949095) + 2) / 2;
152
152
  }
153
153
 
154
- ease_in_elastic(x)
154
+ static ease_in_elastic(x)
155
155
  {
156
156
  const c4 = (2 * Math.PI) / 3;
157
157
 
@@ -162,7 +162,7 @@ class EasingFunctions
162
162
  : -Math.pow(2, 10 * x - 10) * Math.sin((x * 10 - 10.75) * c4);
163
163
  }
164
164
 
165
- ease_out_elastic(x)
165
+ static ease_out_elastic(x)
166
166
  {
167
167
  return x === 0
168
168
  ? 0
@@ -171,7 +171,7 @@ class EasingFunctions
171
171
  : Math.pow(2, -10 * x) * Math.sin((x * 10 - 0.75) * 2.0943950) + 1;
172
172
  }
173
173
 
174
- ease_in_out_elastic(x)
174
+ static ease_in_out_elastic(x)
175
175
  {
176
176
  return x === 0
177
177
  ? 0
@@ -182,12 +182,12 @@ class EasingFunctions
182
182
  : Math.pow(2, -20 * x + 10) * Math.sin((20 * x - 11.125) * 1.3962633) / 2 + 1;
183
183
  }
184
184
 
185
- ease_in_bounce(x)
185
+ static ease_in_bounce(x)
186
186
  {
187
187
  return 1 - this.ease_out_bounce(1 - x);
188
188
  }
189
189
 
190
- ease_out_bounce(x)
190
+ static ease_out_bounce(x)
191
191
  {
192
192
  const n1 = 7.5625;
193
193
  const d1 = 2.75;
@@ -210,17 +210,17 @@ class EasingFunctions
210
210
  }
211
211
  }
212
212
 
213
- ease_in_out_bounce(x)
213
+ static ease_in_out_bounce(x)
214
214
  {
215
215
  return x < 0.5
216
216
  ? (1 - this.ease_out_bounce(1 - 2 * x)) / 2
217
217
  : (1 + this.ease_out_bounce(2 * x - 1)) / 2;
218
218
  }
219
219
 
220
- heartbeat(t)
220
+ static heartbeat(t)
221
221
  {
222
222
  return 1.0 - Math.pow(Math.abs(Math.sin(t + 1.0)), 63.0) * Math.sign(Math.sin(t)) * Math.sin(t + 1.5 + 1.0) * 0.8;
223
223
  }
224
224
  }
225
225
 
226
- export default new EasingFunctions();
226
+ export { EasingFunctions };
@@ -1,6 +1,6 @@
1
1
  import { Line3, Plane, Quaternion, Sphere, Vector3 } from 'three';
2
2
 
3
- export default class FrustumPointFitter
3
+ class FrustumPointFitter
4
4
  {
5
5
  constructor()
6
6
  {
@@ -253,3 +253,5 @@ export default class FrustumPointFitter
253
253
  return Math.max(Math.abs(distH), Math.abs(distV));
254
254
  }
255
255
  }
256
+
257
+ export { FrustumPointFitter };
@@ -1,7 +1,7 @@
1
1
  import { BufferAttribute } from 'three';
2
2
  import { BufferGeometry } from 'three';
3
3
 
4
- export default class GeometryUtilities
4
+ class GeometryUtilities
5
5
  {
6
6
  static convert_to_non_indexed_geometry(geometry_buffer)
7
7
  {
@@ -72,3 +72,5 @@ export default class GeometryUtilities
72
72
  non_indexed_geometry_buffer.setAttribute('barycentric', new BufferAttribute(new Float32Array(bar_coordinates), 3));
73
73
  }
74
74
  }
75
+
76
+ export { GeometryUtilities };
@@ -1,4 +1,4 @@
1
- export default class HTMLUtilities
1
+ class HTMLUtilities
2
2
  {
3
3
  static load_images(container)
4
4
  {
@@ -42,3 +42,5 @@ export default class HTMLUtilities
42
42
  }
43
43
  }
44
44
  }
45
+
46
+ export { HTMLUtilities };
@@ -1,6 +1,6 @@
1
1
  import { Vector4 } from 'three';
2
2
 
3
- export default class ImageUtilities
3
+ class ImageUtilities
4
4
  {
5
5
  constructor()
6
6
  { }
@@ -24,3 +24,5 @@ export default class ImageUtilities
24
24
  return new Vector4(data[position + 0], data[position + 1], data[position + 2], data[position + 3]);
25
25
  }
26
26
  }
27
+
28
+ export { ImageUtilities };
@@ -202,4 +202,5 @@ class MeshSampler
202
202
  }
203
203
  }
204
204
 
205
- export default new MeshSampler();
205
+ const mesh_sampler = new MeshSampler();
206
+ export { mesh_sampler as MeshSampler };
@@ -158,4 +158,5 @@ class ModelUtilities
158
158
  }
159
159
  }
160
160
 
161
- export default new ModelUtilities();
161
+ const model_utilities = new ModelUtilities();
162
+ export { model_utilities as ModelUtilities };