ohzi-core 13.3.0 → 15.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/README.md +2 -1
- package/build/index.mjs +1 -1
- package/build/index.mjs.map +1 -1
- package/package.json +12 -6
- package/src/Capabilities.ts +0 -2
- package/src/Debug.ts +38 -33
- package/src/Graphics.ts +2 -2
- package/src/Initializer.ts +2 -1
- package/src/SceneManager.ts +4 -5
- package/src/action_sequencer/NumberInterpolator.ts +2 -0
- package/src/blitter_index.ts +1 -2
- package/src/camera_controller/CameraController.ts +106 -63
- package/src/camera_controller/states/common/CommonCameraState.ts +2 -1
- package/src/components/AxisHelper.ts +1 -0
- package/src/components/Line.ts +35 -27
- package/src/components/PlaneHelper.ts +1 -1
- package/src/components/Text2D.ts +3 -1
- package/src/components/WorldImage.ts +27 -20
- package/src/components/sdf_text/SDFTextBatch.ts +16 -26
- package/src/dev_bridge/CameraBridge.ts +363 -0
- package/src/dev_bridge/CaptureService.ts +256 -0
- package/src/dev_bridge/CommandDispatcher.ts +114 -0
- package/src/dev_bridge/ConsoleBuffer.ts +286 -0
- package/src/dev_bridge/DebugDrawer.ts +399 -0
- package/src/dev_bridge/DevBridge.ts +195 -0
- package/src/dev_bridge/InputSynthesizer.ts +287 -0
- package/src/dev_bridge/PerformanceProbe.ts +118 -0
- package/src/dev_bridge/RenderModeRegistry.ts +66 -0
- package/src/dev_bridge/SceneEditor.ts +288 -0
- package/src/dev_bridge/SceneInspector.ts +388 -0
- package/src/dev_bridge/ViewNavigator.ts +101 -0
- package/src/dev_bridge/protocol.ts +31 -0
- package/src/index.ts +21 -14
- package/src/materials/AddMaterial.ts +14 -7
- package/src/materials/BlitNodeMaterial.ts +85 -0
- package/src/materials/BloomComposeMaterial.ts +21 -9
- package/src/materials/BoxBlurMaterial.ts +26 -6
- package/src/materials/ClearDepthNormalMaterial.ts +12 -6
- package/src/materials/DepthNormalMaterial.ts +25 -14
- package/src/materials/DualFilteringBlurMaterial.ts +32 -5
- package/src/materials/GaussianBlurMaterial.ts +36 -14
- package/src/materials/LineMaterial.ts +52 -0
- package/src/materials/LuminosityHighPassMaterial.ts +23 -10
- package/src/materials/NormalMaterial.ts +10 -11
- package/src/materials/SDFTextMaterial.ts +63 -16
- package/src/materials/SSAOComposeMaterial.ts +14 -5
- package/src/materials/SSAOMaterial.ts +123 -24
- package/src/materials/ScreenSpaceTextureMaterial.ts +19 -31
- package/src/materials/UnrealBloomComposeMaterial.ts +41 -32
- package/src/materials/WorldImageMaterial.ts +51 -0
- package/src/materials/deferred/DeferredPointLightMaterial.ts +45 -14
- package/src/materials/deferred/depth_normal_encoding.ts +36 -0
- package/src/primitives/Cube.ts +1 -1
- package/src/primitives/Sphere.ts +1 -1
- package/src/raycast/GroupRaycaster.ts +2 -2
- package/src/render_mode/BloomRender.ts +18 -4
- package/src/render_mode/DebugNormalsRender.ts +6 -1
- package/src/render_mode/DeferredRender.ts +5 -34
- package/src/render_mode/NormalAORender.ts +9 -19
- package/src/render_mode/UnrealBloomRender.ts +2 -1
- package/src/render_mode/VRRender.ts +6 -3
- package/src/render_utilities/Blitter.ts +4 -4
- package/src/render_utilities/Blurrer.ts +7 -0
- package/src/render_utilities/DualFilteringBlurrer.ts +26 -10
- package/src/resource_loader/AudioLoader.ts +5 -3
- package/src/resource_loader/HDRTextureLoader.ts +1 -1
- package/src/scenes/AbstractScene.ts +7 -3
- package/src/scenes/Compilator.ts +5 -1
- package/src/scenes/loading_states/LoadingState.ts +15 -7
- package/src/scenes/loading_states/RegularLoadingState.ts +2 -1
- package/src/utilities/CameraUtilities.ts +57 -79
- package/src/utilities/HTMLUtilities.ts +2 -1
- package/src/utilities/MeshSampler.ts +8 -1
- package/src/utilities/OrthographicFrustumPointFitter.ts +53 -4
- package/src/view_components/ApplicationView.ts +1 -1
- package/src/view_components/ViewComponent.ts +1 -1
- package/src/view_components/ViewManager.ts +7 -1
- package/src/view_components/transition/DrawIOAnimationSheet.ts +1 -1
- package/types/Capabilities.d.ts +0 -1
- package/types/SceneManager.d.ts +1 -1
- package/types/blitter_index.d.ts +1 -2
- package/types/camera_controller/CameraController.d.ts +9 -0
- package/types/components/Line.d.ts +3 -2
- package/types/components/WorldImage.d.ts +3 -2
- package/types/index.d.ts +2 -7
- package/types/materials/AddMaterial.d.ts +2 -2
- package/types/materials/BlitNodeMaterial.d.ts +18 -0
- package/types/materials/BloomComposeMaterial.d.ts +2 -2
- package/types/materials/BoxBlurMaterial.d.ts +2 -2
- package/types/materials/ClearDepthNormalMaterial.d.ts +2 -2
- package/types/materials/DepthNormalMaterial.d.ts +2 -2
- package/types/materials/DualFilteringBlurMaterial.d.ts +2 -2
- package/types/materials/GaussianBlurMaterial.d.ts +2 -2
- package/types/materials/LuminosityHighPassMaterial.d.ts +2 -2
- package/types/materials/NormalMaterial.d.ts +2 -2
- package/types/materials/SDFTextMaterial.d.ts +2 -2
- package/types/materials/SSAOComposeMaterial.d.ts +2 -2
- package/types/materials/SSAOMaterial.d.ts +2 -2
- package/types/materials/ScreenSpaceTextureMaterial.d.ts +2 -2
- package/types/materials/UnrealBloomComposeMaterial.d.ts +2 -2
- package/types/materials/deferred/DeferredPointLightMaterial.d.ts +2 -2
- package/types/render_mode/DeferredRender.d.ts +0 -2
- package/types/render_mode/NormalAORender.d.ts +0 -2
- package/types/render_utilities/Blitter.d.ts +2 -2
- package/types/render_utilities/DualFilteringBlurrer.d.ts +0 -2
- package/types/utilities/CameraUtilities.d.ts +0 -1
- package/types/utilities/OrthographicFrustumPointFitter.d.ts +14 -8
- package/build/index.module.js +0 -2
- package/build/index.module.js.map +0 -1
- package/src/components/EdgeMesh.ts +0 -150
- package/src/components/GeometryEdgeVisualizer.ts +0 -49
- package/src/components/MultiLinePath.ts +0 -25
- package/src/components/MultiLineText2D.ts +0 -65
- package/src/components/Shape2D.ts +0 -42
- package/src/components/Shape3D.ts +0 -38
- package/src/gpu_particles/GPUParticleSystem.ts +0 -122
- package/src/gpu_particles/ParticleAttribute.ts +0 -110
- package/src/gpu_particles/ParticlePositionAttribute.ts +0 -46
- package/src/materials/AlphaFilterMaterial.ts +0 -21
- package/src/materials/BaseShaderMaterial.ts +0 -20
- package/src/materials/BlitMaterial.ts +0 -27
- package/src/materials/DeferredRendererComposeMaterial.ts +0 -36
- package/src/materials/DisplayNormalTextureMaterial.ts +0 -18
- package/src/materials/FXAAMaterial.ts +0 -12
- package/src/materials/MedianFilterMaterial.ts +0 -46
- package/src/materials/SDFScreenTextMaterial.ts +0 -32
- package/src/materials/UnrealBlurMaterial.ts +0 -20
- package/src/materials/UnrealComposeMaterial.ts +0 -27
- package/src/materials/ViewPositionMaterial.ts +0 -19
- package/src/materials/gpu_particles/AttributeUpdateMaterial.ts +0 -35
- package/src/materials/gpu_particles/BasicParticleMaterial.ts +0 -25
- package/src/materials/gpu_particles/ParticleStorageMaterial.ts +0 -36
- package/src/materials/gpu_particles/PositionStorageMaterial.ts +0 -27
- package/src/render_utilities/MedianFilter.ts +0 -72
- package/src/render_utilities/ViewPositionRenderer.ts +0 -53
- package/src/shaders/add/add.frag +0 -28
- package/src/shaders/anti_aliasing/fxaa.frag +0 -72
- package/src/shaders/basic_color/basic_color.frag +0 -6
- package/src/shaders/basic_color/basic_color.vert +0 -10
- package/src/shaders/basic_line/basic_line.frag +0 -37
- package/src/shaders/basic_line/basic_line.vert +0 -37
- package/src/shaders/basic_texture/basic_texture.frag +0 -10
- package/src/shaders/basic_texture/basic_texture.vert +0 -17
- package/src/shaders/bloom/bloom_compose.frag +0 -22
- package/src/shaders/bloom/cheap_bloom_compose.frag +0 -13
- package/src/shaders/box_blur/box_blur.frag +0 -24
- package/src/shaders/box_blur/compose.frag +0 -31
- package/src/shaders/clear/clear_depth_normal.frag +0 -25
- package/src/shaders/copy/copy.frag +0 -7
- package/src/shaders/copy/copy.vert +0 -6
- package/src/shaders/deferred/blit_copy.vert +0 -11
- package/src/shaders/deferred/deferred_compose.frag +0 -59
- package/src/shaders/deferred/point_light.frag +0 -66
- package/src/shaders/deferred/point_light.vert +0 -13
- package/src/shaders/depth_normals/debug_normals.frag +0 -48
- package/src/shaders/depth_normals/depth_normals.frag +0 -30
- package/src/shaders/depth_normals/depth_normals.vert +0 -13
- package/src/shaders/dual_filter_blur/alpha_filter.frag +0 -14
- package/src/shaders/dual_filter_blur/downsample.frag +0 -21
- package/src/shaders/dual_filter_blur/upsample.frag +0 -24
- package/src/shaders/edge_visualizer/edge_visualizer.frag +0 -18
- package/src/shaders/edge_visualizer/edge_visualizer.vert +0 -16
- package/src/shaders/edges/corners.frag +0 -11
- package/src/shaders/edges/corners.vert +0 -31
- package/src/shaders/edges/edges.frag +0 -7
- package/src/shaders/edges/edges.vert +0 -27
- package/src/shaders/gaussian_blur/gaussian_blur.frag +0 -44
- package/src/shaders/gaussian_blur/unreal_bloom_compose.frag +0 -36
- package/src/shaders/gpu_particles/common_utils.glsl +0 -13
- package/src/shaders/gpu_particles/generic_storage.frag +0 -6
- package/src/shaders/gpu_particles/store/store_position.vert +0 -14
- package/src/shaders/gpu_particles/update/basic_update.frag +0 -21
- package/src/shaders/gpu_particles/visualize/visualize.frag +0 -11
- package/src/shaders/gpu_particles/visualize/visualize.vert +0 -12
- package/src/shaders/grid/grid.frag +0 -17
- package/src/shaders/grid/grid.vert +0 -10
- package/src/shaders/luminosity_high_pass/luminosity_high_pass.frag +0 -38
- package/src/shaders/median_filter/median_filter.frag +0 -134
- package/src/shaders/normal/normal.frag +0 -6
- package/src/shaders/normal/normal.vert +0 -6
- package/src/shaders/sdf_text/sdf_screen_text.frag +0 -51
- package/src/shaders/sdf_text/sdf_screen_text.vert +0 -42
- package/src/shaders/sdf_text/sdf_text.frag +0 -53
- package/src/shaders/sdf_text/sdf_text.vert +0 -42
- package/src/shaders/ssao/hbao.frag +0 -264
- package/src/shaders/ssao/ssao.frag +0 -95
- package/src/shaders/ssao/ssao.vert +0 -11
- package/src/shaders/ssao/ssao_compose.frag +0 -14
- package/src/shaders/transparent_mix/copy.frag +0 -7
- package/src/shaders/transparent_mix/transparent_mix.frag +0 -19
- package/src/shaders/transparent_mix/transparent_mix.vert +0 -8
- package/src/shaders/ui/ss_texture.frag +0 -11
- package/src/shaders/ui/ss_texture.vert +0 -32
- package/src/shaders/ui/ws_texture.vert +0 -39
- package/src/shaders/unreal_blur/unreal_blur.frag +0 -25
- package/src/shaders/unreal_blur/unreal_compose.frag +0 -24
- package/src/shaders/write_view_position/write_view_position.frag +0 -7
- package/src/shaders/write_view_position/write_view_position.vert +0 -9
- package/src/types.d.ts +0 -14
- package/types/components/EdgeMesh.d.ts +0 -16
- package/types/components/GeometryEdgeVisualizer.d.ts +0 -8
- package/types/components/MultiLinePath.d.ts +0 -8
- package/types/components/MultiLineText2D.d.ts +0 -12
- package/types/components/Shape2D.d.ts +0 -7
- package/types/components/Shape3D.d.ts +0 -6
- package/types/gpu_particles/GPUParticleSystem.d.ts +0 -19
- package/types/gpu_particles/ParticleAttribute.d.ts +0 -20
- package/types/gpu_particles/ParticlePositionAttribute.d.ts +0 -6
- package/types/materials/AlphaFilterMaterial.d.ts +0 -7
- package/types/materials/BaseShaderMaterial.d.ts +0 -4
- package/types/materials/BlitMaterial.d.ts +0 -4
- package/types/materials/DeferredRendererComposeMaterial.d.ts +0 -10
- package/types/materials/DisplayNormalTextureMaterial.d.ts +0 -4
- package/types/materials/FXAAMaterial.d.ts +0 -5
- package/types/materials/MedianFilterMaterial.d.ts +0 -8
- package/types/materials/SDFScreenTextMaterial.d.ts +0 -8
- package/types/materials/UIElementMaterial.d.ts +0 -4
- package/types/materials/UnrealBlurMaterial.d.ts +0 -5
- package/types/materials/UnrealComposeMaterial.d.ts +0 -5
- package/types/materials/ViewPositionMaterial.d.ts +0 -5
- package/types/materials/gpu_particles/AttributeUpdateMaterial.d.ts +0 -8
- package/types/materials/gpu_particles/BasicParticleMaterial.d.ts +0 -5
- package/types/materials/gpu_particles/ParticleStorageMaterial.d.ts +0 -5
- package/types/materials/gpu_particles/PositionStorageMaterial.d.ts +0 -5
- package/types/render_utilities/MedianFilter.d.ts +0 -12
- package/types/render_utilities/ViewPositionRenderer.d.ts +0 -12
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { dot, float, fract, Fn, vec2, vec3 } from 'three/tsl';
|
|
2
|
+
import type { Node } from 'three/webgpu';
|
|
3
|
+
|
|
4
|
+
// Packing shared by DepthAndNormalsRenderer and its consumers: depth01 goes in RG,
|
|
5
|
+
// the view space normal in BA. Each value spreads over two 8 bit channels.
|
|
6
|
+
|
|
7
|
+
const NORMAL_SCALE = 1.7777;
|
|
8
|
+
|
|
9
|
+
// Splits a [0, 1) float over two channels. 1.0 itself wraps around to 0.
|
|
10
|
+
const encode_float_rg = Fn(([value]: [Node<'float'>]) =>
|
|
11
|
+
{
|
|
12
|
+
const encoded = fract(vec2(1, 255).mul(value));
|
|
13
|
+
|
|
14
|
+
return vec2(encoded.x.sub(encoded.y.div(255)), encoded.y);
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
const decode_float_rg = Fn(([encoded]: [Node<'vec2'>]) =>
|
|
18
|
+
{
|
|
19
|
+
return dot(encoded, vec2(1, 1 / 255));
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
// Stereographic projection of a unit normal onto two channels.
|
|
23
|
+
const encode_normal = Fn(([normal]: [Node<'vec3'>]) =>
|
|
24
|
+
{
|
|
25
|
+
return normal.xy.div(normal.z.add(1)).div(NORMAL_SCALE).mul(0.5).add(0.5);
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
const decode_normal = Fn(([encoded]: [Node<'vec2'>]) =>
|
|
29
|
+
{
|
|
30
|
+
const projected = vec3(encoded.mul(2 * NORMAL_SCALE).sub(NORMAL_SCALE), 1);
|
|
31
|
+
const g = float(2).div(dot(projected, projected));
|
|
32
|
+
|
|
33
|
+
return vec3(projected.xy.mul(g), g.sub(1));
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
export { decode_float_rg, decode_normal, encode_float_rg, encode_normal };
|
package/src/primitives/Cube.ts
CHANGED
|
@@ -6,7 +6,7 @@ class Cube extends Mesh
|
|
|
6
6
|
{
|
|
7
7
|
size = size || new Vector3(1, 1, 1);
|
|
8
8
|
segments = segments || new Vector3(1, 1, 1);
|
|
9
|
-
color = color
|
|
9
|
+
color = color ?? 0xff0000;
|
|
10
10
|
|
|
11
11
|
const geometry = new BoxGeometry(size.x, size.y, size.z, segments.x, segments.y, segments.z);
|
|
12
12
|
const material = new MeshBasicMaterial({ color: color });
|
package/src/primitives/Sphere.ts
CHANGED
|
@@ -9,7 +9,7 @@ class Sphere extends Mesh
|
|
|
9
9
|
|
|
10
10
|
constructor(radius: number, color: number | string)
|
|
11
11
|
{
|
|
12
|
-
color = color
|
|
12
|
+
color = color ?? '#FF0000';
|
|
13
13
|
radius = radius || 1;
|
|
14
14
|
const geometry = new SphereGeometry(radius, 64, 64);
|
|
15
15
|
const material = new MeshBasicMaterial({ color: color });
|
|
@@ -3,7 +3,7 @@ import type { Input } from '../lib/Input';
|
|
|
3
3
|
import { RaycastResolver } from './RaycastResolver';
|
|
4
4
|
import { IdleState } from './states/IdleState';
|
|
5
5
|
|
|
6
|
-
import type { Camera, Intersection, Object3D } from 'three';
|
|
6
|
+
import type { Camera, Intersection, Object3D, Vector2 } from 'three';
|
|
7
7
|
import { Raycaster } from 'three';
|
|
8
8
|
import type { BaseState } from './states/BaseState';
|
|
9
9
|
|
|
@@ -36,7 +36,7 @@ class GroupRaycaster
|
|
|
36
36
|
|
|
37
37
|
update()
|
|
38
38
|
{
|
|
39
|
-
this.raycaster.setFromCamera(this.input.NDC, this.camera);
|
|
39
|
+
this.raycaster.setFromCamera(this.input.NDC as Vector2, this.camera);
|
|
40
40
|
this.current_intersections = this.raycaster.intersectObjects(this.raycastee_group);
|
|
41
41
|
this.current_state.update(this);
|
|
42
42
|
}
|
|
@@ -7,19 +7,25 @@ import { CameraManager } from '../CameraManager';
|
|
|
7
7
|
import { Graphics } from '../Graphics';
|
|
8
8
|
import { OScreen } from '../OScreen';
|
|
9
9
|
import { Blurrer } from '../render_utilities/Blurrer';
|
|
10
|
+
import { DualFilteringBlurrer } from '../render_utilities/DualFilteringBlurrer';
|
|
10
11
|
import { SceneManager } from '../SceneManager';
|
|
11
12
|
|
|
12
13
|
class BloomRender extends BaseRender
|
|
13
14
|
{
|
|
14
15
|
bloom_compose_mat: BloomComposeMaterial;
|
|
15
16
|
blur_RT: RenderTarget;
|
|
16
|
-
blurrer: Blurrer;
|
|
17
|
+
blurrer: Blurrer | DualFilteringBlurrer;
|
|
17
18
|
main_RT: RenderTarget;
|
|
19
|
+
use_dual_filtering: boolean;
|
|
18
20
|
|
|
19
|
-
|
|
21
|
+
// use_dual_filtering swaps the box blur for the dual filtering (Kawase) blur, which
|
|
22
|
+
// spreads the glow much wider.
|
|
23
|
+
constructor(use_dual_filtering = false)
|
|
20
24
|
{
|
|
21
25
|
super();
|
|
22
26
|
|
|
27
|
+
this.use_dual_filtering = use_dual_filtering;
|
|
28
|
+
|
|
23
29
|
this.bloom_compose_mat = new BloomComposeMaterial();
|
|
24
30
|
// @ts-expect-error -- DEBUG --
|
|
25
31
|
window.bloom_mat = this.bloom_compose_mat;
|
|
@@ -31,12 +37,20 @@ class BloomRender extends BaseRender
|
|
|
31
37
|
|
|
32
38
|
on_enter()
|
|
33
39
|
{
|
|
34
|
-
this.blurrer = new Blurrer();
|
|
35
|
-
// this.blurrer = new DualFilteringBlurrer()
|
|
40
|
+
this.blurrer = this.use_dual_filtering ? new DualFilteringBlurrer() : new Blurrer();
|
|
36
41
|
this.main_RT = new RenderTarget(OScreen.width, OScreen.height);
|
|
37
42
|
this.blur_RT = new RenderTarget(OScreen.width, OScreen.height);
|
|
38
43
|
}
|
|
39
44
|
|
|
45
|
+
// Frees what on_enter built. Render modes are often built once per switch and then
|
|
46
|
+
// dropped, so anything kept past on_exit stays on the GPU.
|
|
47
|
+
on_exit()
|
|
48
|
+
{
|
|
49
|
+
this.blurrer.dispose();
|
|
50
|
+
this.main_RT.dispose();
|
|
51
|
+
this.blur_RT.dispose();
|
|
52
|
+
}
|
|
53
|
+
|
|
40
54
|
render()
|
|
41
55
|
{
|
|
42
56
|
this.__check_RT_size();
|
|
@@ -6,16 +6,21 @@ import { NormalMaterial } from '../materials/NormalMaterial';
|
|
|
6
6
|
|
|
7
7
|
class DebugNormalsRender extends BaseRender
|
|
8
8
|
{
|
|
9
|
+
normal_material: NormalMaterial;
|
|
10
|
+
|
|
9
11
|
constructor()
|
|
10
12
|
{
|
|
11
13
|
super();
|
|
14
|
+
|
|
15
|
+
// Built once: node materials compile per instance, so a new one per frame recompiles every frame.
|
|
16
|
+
this.normal_material = new NormalMaterial();
|
|
12
17
|
}
|
|
13
18
|
|
|
14
19
|
render()
|
|
15
20
|
{
|
|
16
21
|
Graphics.clear(undefined, CameraManager.current, true, true);
|
|
17
22
|
|
|
18
|
-
Graphics.render(SceneManager.current, CameraManager.current, undefined,
|
|
23
|
+
Graphics.render(SceneManager.current, CameraManager.current, undefined, this.normal_material);
|
|
19
24
|
}
|
|
20
25
|
}
|
|
21
26
|
|
|
@@ -2,7 +2,6 @@ import { CameraManager } from '../CameraManager';
|
|
|
2
2
|
import { Graphics } from '../Graphics';
|
|
3
3
|
import { OScreen } from '../OScreen';
|
|
4
4
|
import { SceneManager } from '../SceneManager';
|
|
5
|
-
import { DeferredRendererComposeMaterial } from '../materials/DeferredRendererComposeMaterial';
|
|
6
5
|
import { DeferredPointLightMaterial } from '../materials/deferred/DeferredPointLightMaterial';
|
|
7
6
|
import { BaseRender } from '../render_mode/BaseRender';
|
|
8
7
|
|
|
@@ -12,7 +11,6 @@ import { AbstractScene } from '../scenes/AbstractScene';
|
|
|
12
11
|
class DeferredRender extends BaseRender
|
|
13
12
|
{
|
|
14
13
|
camera_inverse_proj_mat: Matrix4;
|
|
15
|
-
compose_mat: DeferredRendererComposeMaterial;
|
|
16
14
|
main_rt: RenderTarget;
|
|
17
15
|
scene_lights: AbstractScene;
|
|
18
16
|
|
|
@@ -20,11 +18,7 @@ class DeferredRender extends BaseRender
|
|
|
20
18
|
{
|
|
21
19
|
super();
|
|
22
20
|
|
|
23
|
-
this.
|
|
24
|
-
this.main_rt = new RenderTarget(OScreen.width, OScreen.height, {
|
|
25
|
-
// magFilter: NearestFilter,
|
|
26
|
-
// minFilter: NearestFilter
|
|
27
|
-
});
|
|
21
|
+
this.main_rt = new RenderTarget(OScreen.width, OScreen.height);
|
|
28
22
|
|
|
29
23
|
this.scene_lights = new AbstractScene({ name: 'lights_scene', compilators: {} });
|
|
30
24
|
|
|
@@ -32,24 +26,6 @@ class DeferredRender extends BaseRender
|
|
|
32
26
|
const light_brightest_component = 1;
|
|
33
27
|
const radius_needed_for_intensity = Math.sqrt(4 * light_intensity * (light_brightest_component * (256.0 / 5.0))) / (2 * light_intensity);
|
|
34
28
|
const sphere = new Mesh(new SphereGeometry(radius_needed_for_intensity), new DeferredPointLightMaterial(light_intensity));
|
|
35
|
-
// sphere.position.y = 2;
|
|
36
|
-
// this.scene_lights.add(sphere);
|
|
37
|
-
|
|
38
|
-
// let sphere2 = sphere.clone();
|
|
39
|
-
// sphere2.position.x = 2;
|
|
40
|
-
// this.scene_lights.add(sphere2);
|
|
41
|
-
|
|
42
|
-
// let sphere3 = sphere.clone();
|
|
43
|
-
// sphere3.position.x = -2;
|
|
44
|
-
// this.scene_lights.add(sphere3);
|
|
45
|
-
|
|
46
|
-
// let sphere4 = sphere.clone();
|
|
47
|
-
// sphere4.position.z = -2;
|
|
48
|
-
// this.scene_lights.add(sphere4);
|
|
49
|
-
|
|
50
|
-
// let sphere5 = sphere.clone();
|
|
51
|
-
// sphere5.position.z = 2;
|
|
52
|
-
// this.scene_lights.add(sphere5);
|
|
53
29
|
|
|
54
30
|
const light_row = 2;
|
|
55
31
|
const light_col = 2;
|
|
@@ -79,18 +55,14 @@ class DeferredRender extends BaseRender
|
|
|
79
55
|
|
|
80
56
|
Graphics.render(SceneManager.current, CameraManager.current, this.main_rt);
|
|
81
57
|
|
|
82
|
-
|
|
83
|
-
// this.compose_mat.set_proj_matrix(CameraManager.current.projectionMatrix);
|
|
84
|
-
|
|
85
|
-
// Graphics.blit(this.main_rt, undefined, this.compose_mat);
|
|
86
|
-
|
|
87
|
-
this.camera_inverse_proj_mat = CameraManager.current.projectionMatrix.clone().invert()
|
|
58
|
+
this.camera_inverse_proj_mat.copy(CameraManager.current.projectionMatrix).invert();
|
|
88
59
|
|
|
89
60
|
const inverse_proj = this.camera_inverse_proj_mat;
|
|
90
61
|
const albedo_rt = this.main_rt;
|
|
91
62
|
const depth_normals_rt = Graphics.depth_normals_RT;
|
|
92
63
|
|
|
93
|
-
this.scene_lights.traverse((child: Mesh) =>
|
|
64
|
+
this.scene_lights.traverse((child: Mesh) =>
|
|
65
|
+
{
|
|
94
66
|
if (child.material)
|
|
95
67
|
{
|
|
96
68
|
(child.material as DeferredPointLightMaterial).set_inverse_proj_matrix(inverse_proj);
|
|
@@ -98,8 +70,7 @@ class DeferredRender extends BaseRender
|
|
|
98
70
|
(child.material as DeferredPointLightMaterial).set_albedo_rt(albedo_rt);
|
|
99
71
|
}
|
|
100
72
|
});
|
|
101
|
-
|
|
102
|
-
// Graphics.render(SceneManager.current, CameraManager.current);
|
|
73
|
+
|
|
103
74
|
Graphics.clear(undefined, CameraManager.current, true, true);
|
|
104
75
|
Graphics.render(this.scene_lights, CameraManager.current);
|
|
105
76
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { CameraManager } from '../CameraManager';
|
|
2
2
|
import { Graphics } from '../Graphics';
|
|
3
|
-
import { DisplayNormalTextureMaterial } from '../materials/DisplayNormalTextureMaterial';
|
|
4
3
|
import { SSAOComposeMaterial } from '../materials/SSAOComposeMaterial';
|
|
5
4
|
import { SSAOMaterial } from '../materials/SSAOMaterial';
|
|
6
5
|
import { OScreen } from '../OScreen';
|
|
@@ -14,19 +13,19 @@ class NormalAORender extends BaseRender
|
|
|
14
13
|
{
|
|
15
14
|
SSAO_RT: RenderTarget;
|
|
16
15
|
blurrer: Blurrer;
|
|
17
|
-
debug_normals: DisplayNormalTextureMaterial;
|
|
18
16
|
main_RT: RenderTarget;
|
|
19
17
|
ssaa: number;
|
|
20
18
|
ssao_compose_mat: SSAOComposeMaterial;
|
|
21
19
|
ssao_mat: SSAOMaterial;
|
|
22
20
|
|
|
23
|
-
|
|
21
|
+
// Turning use_exact_depth off swaps the SSAO pass's banding free depth reads for one
|
|
22
|
+
// filtered fetch per sample, which roughly halves the pass's cost. See SSAOMaterial.
|
|
23
|
+
constructor(use_ssaa = false, use_exact_depth = true)
|
|
24
24
|
{
|
|
25
25
|
super();
|
|
26
26
|
|
|
27
|
-
this.ssao_mat = new SSAOMaterial();
|
|
27
|
+
this.ssao_mat = new SSAOMaterial(use_exact_depth);
|
|
28
28
|
this.ssao_compose_mat = new SSAOComposeMaterial();
|
|
29
|
-
this.debug_normals = new DisplayNormalTextureMaterial();
|
|
30
29
|
|
|
31
30
|
this.ssaa = use_ssaa ? 2 : 1;
|
|
32
31
|
|
|
@@ -34,6 +33,10 @@ class NormalAORender extends BaseRender
|
|
|
34
33
|
this.SSAO_RT = new RenderTarget(OScreen.width, OScreen.height);
|
|
35
34
|
|
|
36
35
|
this.blurrer = new Blurrer();
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
on_enter()
|
|
39
|
+
{
|
|
37
40
|
Graphics.generate_depth_normal_texture = true;
|
|
38
41
|
}
|
|
39
42
|
|
|
@@ -44,26 +47,13 @@ class NormalAORender extends BaseRender
|
|
|
44
47
|
Graphics.clear(this.main_RT, CameraManager.current, true, false);
|
|
45
48
|
Graphics.render(SceneManager.current, CameraManager.current, this.main_RT);
|
|
46
49
|
|
|
47
|
-
this.
|
|
48
|
-
|
|
50
|
+
this.ssao_mat.set_projection_matrix(CameraManager.current.projectionMatrix);
|
|
49
51
|
Graphics.blit(Graphics.depth_normals_RT, this.SSAO_RT, this.ssao_mat);
|
|
50
52
|
|
|
51
|
-
// // BLUR
|
|
52
53
|
this.blurrer.blur(this.SSAO_RT);
|
|
53
|
-
Graphics.blit(this.SSAO_RT, undefined);
|
|
54
54
|
|
|
55
|
-
// // COMPOSE
|
|
56
55
|
this.ssao_compose_mat.uniforms._AO.value = this.SSAO_RT.texture;
|
|
57
56
|
Graphics.blit(this.main_RT, undefined, this.ssao_compose_mat);
|
|
58
|
-
|
|
59
|
-
// Graphics.blit(this.SSAO_RT, undefined);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
__update_uniforms()
|
|
63
|
-
{
|
|
64
|
-
this.ssao_mat.uniforms._InverseProjMatrix.value = CameraManager.current.projectionMatrix.clone().invert();
|
|
65
|
-
this.ssao_mat.uniforms._ProjectionMatrix.value = CameraManager.current.projectionMatrix.clone();
|
|
66
|
-
this.ssao_mat.uniforms._FarPlane.value = CameraManager.current.far;
|
|
67
57
|
}
|
|
68
58
|
|
|
69
59
|
__check_RT_size()
|
|
@@ -27,7 +27,8 @@ class UnrealBloomRender extends BaseRender
|
|
|
27
27
|
this.add_mat = new AddMaterial(use_half_float);
|
|
28
28
|
|
|
29
29
|
const rt_settings = {
|
|
30
|
-
samples
|
|
30
|
+
// WebGPU only supports 1 or 4 samples. Higher counts render nothing on both backends.
|
|
31
|
+
samples: use_antialiasing ? 4 : 1,
|
|
31
32
|
type: use_half_float ? HalfFloatType : UnsignedByteType,
|
|
32
33
|
format: RGBAFormat,
|
|
33
34
|
colorSpace: LinearSRGBColorSpace,
|
|
@@ -42,7 +42,10 @@ class VRRender extends BaseRender
|
|
|
42
42
|
|
|
43
43
|
if (spectator_camera && Graphics._renderer.xr.isPresenting)
|
|
44
44
|
{
|
|
45
|
-
|
|
45
|
+
// XRManager types isPresenting as readonly, but it is a plain field that three's
|
|
46
|
+
// own examples flip to render the spectator view without WebXR.
|
|
47
|
+
const xr = Graphics._renderer.xr as typeof Graphics._renderer.xr & { isPresenting: boolean };
|
|
48
|
+
const xrCam = xr.getCamera();
|
|
46
49
|
|
|
47
50
|
spectator_camera.projectionMatrix.copy(CameraManager.current.projectionMatrix);
|
|
48
51
|
|
|
@@ -53,7 +56,7 @@ class VRRender extends BaseRender
|
|
|
53
56
|
const currentRenderTarget = Graphics._renderer.getRenderTarget();
|
|
54
57
|
|
|
55
58
|
// turn off the WebXR rendering
|
|
56
|
-
|
|
59
|
+
xr.isPresenting = false;
|
|
57
60
|
|
|
58
61
|
// render to the canvas on our main display
|
|
59
62
|
Graphics._renderer.setRenderTarget(null);
|
|
@@ -61,7 +64,7 @@ class VRRender extends BaseRender
|
|
|
61
64
|
|
|
62
65
|
// reset back to enable WebXR
|
|
63
66
|
Graphics._renderer.setRenderTarget(currentRenderTarget);
|
|
64
|
-
|
|
67
|
+
xr.isPresenting = true;
|
|
65
68
|
}
|
|
66
69
|
}
|
|
67
70
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { Renderer } from 'three/webgpu';
|
|
2
|
-
import {
|
|
2
|
+
import { BlitNodeMaterial } from '../materials/BlitNodeMaterial';
|
|
3
3
|
|
|
4
4
|
import { Mesh, OrthographicCamera, PlaneGeometry, Scene } from 'three';
|
|
5
5
|
|
|
6
6
|
class Blitter
|
|
7
7
|
{
|
|
8
8
|
_blit_camera: OrthographicCamera;
|
|
9
|
-
_blit_material:
|
|
10
|
-
_blit_quad: Mesh
|
|
9
|
+
_blit_material: BlitNodeMaterial;
|
|
10
|
+
_blit_quad: Mesh<PlaneGeometry, BlitNodeMaterial>;
|
|
11
11
|
_blit_scene: Scene;
|
|
12
12
|
renderer: Renderer;
|
|
13
13
|
|
|
@@ -15,7 +15,7 @@ class Blitter
|
|
|
15
15
|
{
|
|
16
16
|
this.renderer = renderer;
|
|
17
17
|
this._blit_scene = new Scene();
|
|
18
|
-
this._blit_material = new
|
|
18
|
+
this._blit_material = new BlitNodeMaterial();
|
|
19
19
|
this._blit_quad = new Mesh(
|
|
20
20
|
new PlaneGeometry(1, 1), this._blit_material);
|
|
21
21
|
this._blit_scene.add(this._blit_quad);
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { RenderTarget } from 'three';
|
|
2
2
|
import { Graphics } from '../Graphics';
|
|
3
|
-
import { AlphaFilterMaterial } from '../materials/AlphaFilterMaterial';
|
|
4
3
|
import { DualFilteringBlurMaterial } from '../materials/DualFilteringBlurMaterial';
|
|
5
4
|
class DualFilteringBlurrer
|
|
6
5
|
{
|
|
@@ -9,7 +8,6 @@ class DualFilteringBlurrer
|
|
|
9
8
|
RT2: RenderTarget;
|
|
10
9
|
RT3: RenderTarget;
|
|
11
10
|
RT4: RenderTarget;
|
|
12
|
-
alpha_filter_mat: AlphaFilterMaterial;
|
|
13
11
|
current_height: number;
|
|
14
12
|
current_width: number;
|
|
15
13
|
downscale_blur_mat: DualFilteringBlurMaterial;
|
|
@@ -27,14 +25,12 @@ class DualFilteringBlurrer
|
|
|
27
25
|
|
|
28
26
|
this.upscale_blur_mat = new DualFilteringBlurMaterial(true);
|
|
29
27
|
this.downscale_blur_mat = new DualFilteringBlurMaterial(false);
|
|
30
|
-
|
|
31
|
-
this.alpha_filter_mat = new AlphaFilterMaterial();
|
|
32
28
|
}
|
|
33
29
|
|
|
34
30
|
blur(RT: RenderTarget)
|
|
35
31
|
{
|
|
36
32
|
this.check_RT_resize(RT.width, RT.height);
|
|
37
|
-
Graphics.blit(RT, this.RT1
|
|
33
|
+
Graphics.blit(RT, this.RT1);
|
|
38
34
|
|
|
39
35
|
// Graphics.blit(this.RT0, this.RT1, this.downscale_blur_mat);
|
|
40
36
|
Graphics.blit(this.RT1, this.RT2, this.downscale_blur_mat);
|
|
@@ -58,13 +54,33 @@ class DualFilteringBlurrer
|
|
|
58
54
|
this.current_width = width;
|
|
59
55
|
this.current_height = height;
|
|
60
56
|
|
|
61
|
-
this.
|
|
62
|
-
this.
|
|
63
|
-
this.
|
|
64
|
-
this.
|
|
65
|
-
this.
|
|
57
|
+
// this.resize(this.RT0, 2);
|
|
58
|
+
this.resize(this.RT1, 2);
|
|
59
|
+
this.resize(this.RT2, 4);
|
|
60
|
+
this.resize(this.RT3, 8);
|
|
61
|
+
this.resize(this.RT4, 16);
|
|
66
62
|
}
|
|
67
63
|
}
|
|
64
|
+
|
|
65
|
+
dispose()
|
|
66
|
+
{
|
|
67
|
+
this.RT0.dispose();
|
|
68
|
+
this.RT1.dispose();
|
|
69
|
+
this.RT2.dispose();
|
|
70
|
+
this.RT3.dispose();
|
|
71
|
+
this.RT4.dispose();
|
|
72
|
+
this.upscale_blur_mat.dispose();
|
|
73
|
+
this.downscale_blur_mat.dispose();
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// Whole pixels, and at least one: GPU textures have no fractional or zero sizes.
|
|
77
|
+
resize(target: RenderTarget, divisor: number)
|
|
78
|
+
{
|
|
79
|
+
target.setSize(
|
|
80
|
+
Math.max(1, Math.floor(this.current_width / divisor)),
|
|
81
|
+
Math.max(1, Math.floor(this.current_height / divisor))
|
|
82
|
+
);
|
|
83
|
+
}
|
|
68
84
|
}
|
|
69
85
|
|
|
70
86
|
export { DualFilteringBlurrer };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AudioContext } from 'three';
|
|
1
|
+
import { AudioContext as ThreeAudioContext } from 'three';
|
|
2
2
|
|
|
3
3
|
import { AudioClip } from '../components/AudioClip';
|
|
4
4
|
import type { ResourceContainer } from '../loaders/assets_loader/ResourceContainer';
|
|
@@ -42,7 +42,9 @@ class AudioLoader extends AbstractLoader
|
|
|
42
42
|
|
|
43
43
|
instantiate_audio(resource_container: ResourceContainer)
|
|
44
44
|
{
|
|
45
|
-
|
|
45
|
+
// three's typings declare getContext() as returning its own AudioContext helper class,
|
|
46
|
+
// but it returns the native Web Audio context.
|
|
47
|
+
const context = ThreeAudioContext.getContext() as unknown as AudioContext;
|
|
46
48
|
|
|
47
49
|
const buffer = context.createBuffer(2, 22050, 44100);
|
|
48
50
|
|
|
@@ -52,7 +54,7 @@ class AudioLoader extends AbstractLoader
|
|
|
52
54
|
{
|
|
53
55
|
response.arrayBuffer().then((array_buffer) =>
|
|
54
56
|
{
|
|
55
|
-
context.decodeAudioData(array_buffer, (audio_buffer) =>
|
|
57
|
+
void context.decodeAudioData(array_buffer, (audio_buffer) =>
|
|
56
58
|
{
|
|
57
59
|
resource_container.set_resource(
|
|
58
60
|
this.resource_id,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HDRLoader } from 'three/examples/jsm/loaders/HDRLoader';
|
|
1
|
+
import { HDRLoader } from 'three/examples/jsm/loaders/HDRLoader.js';
|
|
2
2
|
import type { ResourceContainer } from '../loaders/assets_loader/ResourceContainer';
|
|
3
3
|
import { AbstractLoader } from './AbstractLoader';
|
|
4
4
|
|
|
@@ -5,7 +5,9 @@ import { Mesh, Scene } from 'three';
|
|
|
5
5
|
import type { CameraController } from '../camera_controller/CameraController';
|
|
6
6
|
import { CameraManager } from '../CameraManager';
|
|
7
7
|
import { Graphics } from '../Graphics';
|
|
8
|
+
import type { CompilatorConstructor } from './Compilator';
|
|
8
9
|
import { HighQualityLoadingState } from './loading_states/HighQualityLoadingState';
|
|
10
|
+
import type { LoadingCompilators } from './loading_states/LoadingState';
|
|
9
11
|
import { LoadingState } from './loading_states/LoadingState';
|
|
10
12
|
import { RegularLoadingState } from './loading_states/RegularLoadingState';
|
|
11
13
|
|
|
@@ -25,7 +27,7 @@ class AbstractScene extends Scene
|
|
|
25
27
|
constructor({
|
|
26
28
|
name,
|
|
27
29
|
compilators
|
|
28
|
-
}: { name: string, compilators:
|
|
30
|
+
}: { name: string, compilators: LoadingCompilators })
|
|
29
31
|
{
|
|
30
32
|
super();
|
|
31
33
|
|
|
@@ -137,14 +139,16 @@ class AbstractScene extends Scene
|
|
|
137
139
|
// AvatarSystem.component_container.component_instancer.data_texture.data = new Float32Array(4);
|
|
138
140
|
|
|
139
141
|
this.initialized = false;
|
|
142
|
+
|
|
143
|
+
super.dispose();
|
|
140
144
|
}
|
|
141
145
|
|
|
142
|
-
set_assets(scene_objects: any[], scene_textures: any[], scene_sounds: any[], custom_loaders?: any[], custom_compilators?:
|
|
146
|
+
set_assets(scene_objects: any[], scene_textures: any[], scene_sounds: any[], custom_loaders?: any[], custom_compilators?: CompilatorConstructor[], custom_data?: any[])
|
|
143
147
|
{
|
|
144
148
|
this.loading_states.regular.set_assets(scene_objects, scene_textures, scene_sounds, custom_loaders, custom_compilators, custom_data);
|
|
145
149
|
}
|
|
146
150
|
|
|
147
|
-
set_high_assets(scene_objects: any[], scene_textures: any[], scene_sounds: any[], custom_loaders?: any[], custom_compilators?:
|
|
151
|
+
set_high_assets(scene_objects: any[], scene_textures: any[], scene_sounds: any[], custom_loaders?: any[], custom_compilators?: CompilatorConstructor[], custom_data?: any[])
|
|
148
152
|
{
|
|
149
153
|
this.loading_states.high.set_assets(scene_objects, scene_textures, scene_sounds, custom_loaders, custom_compilators, custom_data);
|
|
150
154
|
}
|
package/src/scenes/Compilator.ts
CHANGED
|
@@ -11,4 +11,8 @@ export class Compilator
|
|
|
11
11
|
{
|
|
12
12
|
this.finished = true;
|
|
13
13
|
}
|
|
14
|
-
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
// Compilators are handed around as classes and instantiated by the loading states,
|
|
17
|
+
// each subclass taking its own constructor arguments.
|
|
18
|
+
export type CompilatorConstructor = new (...args: any[]) => Compilator;
|
|
@@ -4,18 +4,26 @@ import { AsyncObjectsLoader } from '../../loaders/AsyncObjectsLoader';
|
|
|
4
4
|
import { AsyncTexturesLoader } from '../../loaders/AsyncTexturesLoader';
|
|
5
5
|
import { ResourceContainer } from '../../ResourceContainer';
|
|
6
6
|
import type { AbstractScene } from '../AbstractScene';
|
|
7
|
-
import type { Compilator } from '../Compilator';
|
|
7
|
+
import type { Compilator, CompilatorConstructor } from '../Compilator';
|
|
8
8
|
import { CompilatorManager } from '../CompilatorManager';
|
|
9
9
|
|
|
10
|
+
// Empty for scenes that never load assets, like the default and the deferred lights scenes.
|
|
11
|
+
export interface LoadingCompilators
|
|
12
|
+
{
|
|
13
|
+
AudiosCompilator?: CompilatorConstructor;
|
|
14
|
+
SceneCompilator?: CompilatorConstructor;
|
|
15
|
+
TexturesCompilator?: CompilatorConstructor;
|
|
16
|
+
}
|
|
17
|
+
|
|
10
18
|
export class LoadingState
|
|
11
19
|
{
|
|
12
|
-
AudiosCompilator:
|
|
13
|
-
SceneCompilator:
|
|
14
|
-
TexturesCompilator:
|
|
20
|
+
AudiosCompilator: CompilatorConstructor;
|
|
21
|
+
SceneCompilator: CompilatorConstructor;
|
|
22
|
+
TexturesCompilator: CompilatorConstructor;
|
|
15
23
|
callback_called: boolean;
|
|
16
24
|
compilator_manager: CompilatorManager;
|
|
17
25
|
compilators: Compilator[];
|
|
18
|
-
custom_compilators:
|
|
26
|
+
custom_compilators: CompilatorConstructor[];
|
|
19
27
|
custom_data: any[];
|
|
20
28
|
custom_loaders: any[];
|
|
21
29
|
loaders: AsyncAbstractLoader[];
|
|
@@ -28,7 +36,7 @@ export class LoadingState
|
|
|
28
36
|
SceneCompilator,
|
|
29
37
|
TexturesCompilator,
|
|
30
38
|
AudiosCompilator
|
|
31
|
-
}:
|
|
39
|
+
}: LoadingCompilators)
|
|
32
40
|
{
|
|
33
41
|
this.scene = scene;
|
|
34
42
|
|
|
@@ -42,7 +50,7 @@ export class LoadingState
|
|
|
42
50
|
this.callback_called = false;
|
|
43
51
|
}
|
|
44
52
|
|
|
45
|
-
set_assets(scene_objects: any[], scene_textures: any[], scene_sounds: any[], custom_loaders: any[] = [], custom_compilators:
|
|
53
|
+
set_assets(scene_objects: any[], scene_textures: any[], scene_sounds: any[], custom_loaders: any[] = [], custom_compilators: CompilatorConstructor[] = [], custom_data: any[] = [])
|
|
46
54
|
{
|
|
47
55
|
this.scene_objects = scene_objects;
|
|
48
56
|
this.scene_textures = scene_textures;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import type { AbstractScene } from '../AbstractScene';
|
|
2
|
+
import type { LoadingCompilators } from './LoadingState';
|
|
2
3
|
import { LoadingState } from './LoadingState';
|
|
3
4
|
|
|
4
5
|
export class RegularLoadingState extends LoadingState
|
|
5
6
|
{
|
|
6
7
|
on_assets_ready_called: boolean;
|
|
7
8
|
|
|
8
|
-
constructor(scene: AbstractScene, compilators:
|
|
9
|
+
constructor(scene: AbstractScene, compilators: LoadingCompilators)
|
|
9
10
|
{
|
|
10
11
|
super(scene, compilators);
|
|
11
12
|
|