@zephyr3d/scene 0.5.0 → 0.6.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/dist/animation/animationset.js +37 -37
- package/dist/animation/morphtrack.js +7 -5
- package/dist/animation/morphtrack.js.map +1 -1
- package/dist/animation/skeleton.js +11 -9
- package/dist/animation/skeleton.js.map +1 -1
- package/dist/asset/assetmanager.js +2 -2
- package/dist/asset/loaders/gltf/gltf_loader.js +7 -3
- package/dist/asset/loaders/gltf/gltf_loader.js.map +1 -1
- package/dist/asset/loaders/image/webimage_loader.js +16 -0
- package/dist/asset/loaders/image/webimage_loader.js.map +1 -1
- package/dist/asset/model.js +3 -9
- package/dist/asset/model.js.map +1 -1
- package/dist/blitter/bilateralblur.js +222 -0
- package/dist/{render/temporalcache.js.map → blitter/bilateralblur.js.map} +1 -1
- package/dist/blitter/blitter.js +7 -1
- package/dist/blitter/blitter.js.map +1 -1
- package/dist/blitter/depthlimitedgaussion.js +96 -39
- package/dist/blitter/depthlimitedgaussion.js.map +1 -1
- package/dist/blitter/gaussianblur.js +21 -21
- package/dist/camera/camera.js +142 -1
- package/dist/camera/camera.js.map +1 -1
- package/dist/index.d.ts +1178 -745
- package/dist/index.js +11 -6
- package/dist/index.js.map +1 -1
- package/dist/material/blinn.js +9 -3
- package/dist/material/blinn.js.map +1 -1
- package/dist/material/lambert.js +6 -2
- package/dist/material/lambert.js.map +1 -1
- package/dist/material/material.js +3 -1
- package/dist/material/material.js.map +1 -1
- package/dist/material/meshmaterial.js +73 -33
- package/dist/material/meshmaterial.js.map +1 -1
- package/dist/material/mixins/albedocolor.js +5 -4
- package/dist/material/mixins/albedocolor.js.map +1 -1
- package/dist/material/mixins/lightmodel/blinnphong.js +17 -7
- package/dist/material/mixins/lightmodel/blinnphong.js.map +1 -1
- package/dist/material/mixins/lightmodel/lambert.js +5 -5
- package/dist/material/mixins/lightmodel/pbrmetallicroughness.js +13 -4
- package/dist/material/mixins/lightmodel/pbrmetallicroughness.js.map +1 -1
- package/dist/material/mixins/lightmodel/pbrspecularglossness.js +13 -4
- package/dist/material/mixins/lightmodel/pbrspecularglossness.js.map +1 -1
- package/dist/material/mixins/pbr/common.js +27 -15
- package/dist/material/mixins/pbr/common.js.map +1 -1
- package/dist/material/pbrmr.js +14 -3
- package/dist/material/pbrmr.js.map +1 -1
- package/dist/material/pbrsg.js +14 -3
- package/dist/material/pbrsg.js.map +1 -1
- package/dist/material/shader/helper.js +36 -21
- package/dist/material/shader/helper.js.map +1 -1
- package/dist/posteffect/bloom.js +1 -10
- package/dist/posteffect/bloom.js.map +1 -1
- package/dist/posteffect/compositor.js +43 -24
- package/dist/posteffect/compositor.js.map +1 -1
- package/dist/posteffect/fxaa.js +3 -11
- package/dist/posteffect/fxaa.js.map +1 -1
- package/dist/posteffect/grayscale.js +3 -11
- package/dist/posteffect/grayscale.js.map +1 -1
- package/dist/posteffect/posteffect.js +4 -0
- package/dist/posteffect/posteffect.js.map +1 -1
- package/dist/posteffect/sao.js +44 -24
- package/dist/posteffect/sao.js.map +1 -1
- package/dist/posteffect/ssr.js +536 -0
- package/dist/{material/lit.js.map → posteffect/ssr.js.map} +1 -1
- package/dist/posteffect/tonemap.js +3 -11
- package/dist/posteffect/tonemap.js.map +1 -1
- package/dist/posteffect/water.js +305 -337
- package/dist/posteffect/water.js.map +1 -1
- package/dist/render/abuffer_oit.js +2 -2
- package/dist/render/clipmap.js +16 -19
- package/dist/render/clipmap.js.map +1 -1
- package/dist/render/cull_visitor.js +5 -3
- package/dist/render/cull_visitor.js.map +1 -1
- package/dist/render/depthpass.js +17 -1
- package/dist/render/depthpass.js.map +1 -1
- package/dist/render/drawable_mixin.js +25 -19
- package/dist/render/drawable_mixin.js.map +1 -1
- package/dist/render/envlight.js +4 -2
- package/dist/render/envlight.js.map +1 -1
- package/dist/render/fft_wavegenerator.js +989 -0
- package/dist/{shaders/framework.js.map → render/fft_wavegenerator.js.map} +1 -1
- package/dist/render/gerstner_wavegenerator.js +265 -0
- package/dist/{material/standard.js.map → render/gerstner_wavegenerator.js.map} +1 -1
- package/dist/render/globalbindgroup_allocator.js +2 -1
- package/dist/render/globalbindgroup_allocator.js.map +1 -1
- package/dist/render/hzb.js +273 -0
- package/dist/{material/terrainlightmodel.js.map → render/hzb.js.map} +1 -1
- package/dist/render/lightpass.js +35 -3
- package/dist/render/lightpass.js.map +1 -1
- package/dist/render/objectcolorpass.js +2 -1
- package/dist/render/objectcolorpass.js.map +1 -1
- package/dist/render/render_queue.js +72 -52
- package/dist/render/render_queue.js.map +1 -1
- package/dist/render/renderbundle_wrapper.js +79 -0
- package/dist/render/renderbundle_wrapper.js.map +1 -1
- package/dist/render/renderer.js +75 -36
- package/dist/render/renderer.js.map +1 -1
- package/dist/render/renderpass.js +16 -13
- package/dist/render/renderpass.js.map +1 -1
- package/dist/render/shadowmap_pass.js +6 -0
- package/dist/render/shadowmap_pass.js.map +1 -1
- package/dist/render/sky.js +12 -13
- package/dist/render/sky.js.map +1 -1
- package/dist/render/watermesh.js +94 -828
- package/dist/render/watermesh.js.map +1 -1
- package/dist/render/wavegenerator.js +8 -0
- package/dist/render/wavegenerator.js.map +1 -0
- package/dist/scene/batchgroup.js +60 -14
- package/dist/scene/batchgroup.js.map +1 -1
- package/dist/scene/environment.js +2 -2
- package/dist/scene/graph_node.js +0 -5
- package/dist/scene/graph_node.js.map +1 -1
- package/dist/scene/light.js +5 -5
- package/dist/scene/mesh.js +34 -18
- package/dist/scene/mesh.js.map +1 -1
- package/dist/scene/octree.js +5 -2
- package/dist/scene/octree.js.map +1 -1
- package/dist/scene/raycast_visitor.js +4 -2
- package/dist/scene/raycast_visitor.js.map +1 -1
- package/dist/scene/scene.js +1 -1
- package/dist/scene/scene_node.js +9 -5
- package/dist/scene/scene_node.js.map +1 -1
- package/dist/scene/terrain/grass.js +3 -4
- package/dist/scene/terrain/grass.js.map +1 -1
- package/dist/scene/terrain/heightfield.js +135 -53
- package/dist/scene/terrain/heightfield.js.map +1 -1
- package/dist/scene/terrain/patch.js +3 -4
- package/dist/scene/terrain/patch.js.map +1 -1
- package/dist/scene/terrain/terrain.js +1 -1
- package/dist/scene/xform.js +7 -9
- package/dist/scene/xform.js.map +1 -1
- package/dist/shaders/misc.js +10 -1
- package/dist/shaders/misc.js.map +1 -1
- package/dist/shaders/noise.js +81 -16
- package/dist/shaders/noise.js.map +1 -1
- package/dist/shaders/shadow.js +1 -9
- package/dist/shaders/shadow.js.map +1 -1
- package/dist/shaders/ssr.js +442 -0
- package/dist/{material/terrainmat.js.map → shaders/ssr.js.map} +1 -1
- package/dist/shaders/water.js +377 -250
- package/dist/shaders/water.js.map +1 -1
- package/dist/shadow/shadowmapper.js +11 -11
- package/dist/shapes/cylinder.js +6 -5
- package/dist/shapes/cylinder.js.map +1 -1
- package/dist/utility/bounding_volume.js +1 -53
- package/dist/utility/bounding_volume.js.map +1 -1
- package/dist/utility/misc.js +93 -0
- package/dist/utility/misc.js.map +1 -0
- package/dist/utility/shprojection.js +2 -7
- package/dist/utility/shprojection.js.map +1 -1
- package/dist/utility/textures/ggxlut.js +213 -0
- package/dist/utility/textures/ggxlut.js.map +1 -0
- package/dist/utility/textures/gradientnoise.js +61 -0
- package/dist/utility/textures/gradientnoise.js.map +1 -0
- package/dist/utility/textures/randomnoise.js +41 -0
- package/dist/utility/textures/randomnoise.js.map +1 -0
- package/dist/values.js +8 -1
- package/dist/values.js.map +1 -1
- package/package.json +4 -8
- package/dist/animation/usertrack.js +0 -47
- package/dist/animation/usertrack.js.map +0 -1
- package/dist/material/grassmat.js +0 -127
- package/dist/material/grassmat.js.map +0 -1
- package/dist/material/lightmodel.js +0 -2074
- package/dist/material/lightmodel.js.map +0 -1
- package/dist/material/lit.js +0 -578
- package/dist/material/mixins/pbr/metallicroughness.js +0 -126
- package/dist/material/mixins/pbr/metallicroughness.js.map +0 -1
- package/dist/material/mixins/pbr/specularglossness.js +0 -104
- package/dist/material/mixins/pbr/specularglossness.js.map +0 -1
- package/dist/material/pbr.js +0 -27
- package/dist/material/pbr.js.map +0 -1
- package/dist/material/standard.js +0 -282
- package/dist/material/terrainlightmodel.js +0 -259
- package/dist/material/terrainmat.js +0 -357
- package/dist/render/depth_pass.js +0 -47
- package/dist/render/depth_pass.js.map +0 -1
- package/dist/render/forward.js +0 -186
- package/dist/render/forward.js.map +0 -1
- package/dist/render/forward_pass.js +0 -137
- package/dist/render/forward_pass.js.map +0 -1
- package/dist/render/helper.js +0 -38
- package/dist/render/helper.js.map +0 -1
- package/dist/render/objectpool.js +0 -295
- package/dist/render/objectpool.js.map +0 -1
- package/dist/render/renderscheme.js +0 -61
- package/dist/render/renderscheme.js.map +0 -1
- package/dist/render/temporalcache.js +0 -222
- package/dist/scene/model.js +0 -111
- package/dist/scene/model.js.map +0 -1
- package/dist/scene/octree_update_visitor.js +0 -20
- package/dist/scene/octree_update_visitor.js.map +0 -1
- package/dist/shaders/builtins.js +0 -110
- package/dist/shaders/builtins.js.map +0 -1
- package/dist/shaders/framework.js +0 -723
- package/dist/shaders/lighting.js +0 -335
- package/dist/shaders/lighting.js.map +0 -1
- package/dist/utility/sheenlut.js +0 -196
- package/dist/utility/sheenlut.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as _zephyr3d_device from '@zephyr3d/device';
|
|
2
|
-
import { TextureCube, Texture2D, PrimitiveType, VertexLayout, VertexLayoutOptions, StructuredBuffer, VertexSemantic, VertexBufferInfo, VertexAttribFormat, VertexStepMode, IndexBuffer, RenderStateSet,
|
|
2
|
+
import { TextureCube, Texture2D, PrimitiveType, AbstractDevice, VertexLayout, VertexLayoutOptions, StructuredBuffer, VertexSemantic, VertexBufferInfo, VertexAttribFormat, VertexStepMode, IndexBuffer, RenderStateSet, PBGlobalScope, PBInsideFunctionScope, PBShaderExp, BindGroup, FrameBuffer, BindGroupLayout, ProgramBuilder, GPUProgram, FaceMode, PBFunctionScope, TextureSampler, ShaderTypeFunc, Texture2DArray, TextureFormat, BaseTexture, TextureType, GPUDataBuffer, SamplerOptions, ColorState, DeviceBackend } from '@zephyr3d/device';
|
|
3
3
|
import * as _zephyr3d_base from '@zephyr3d/base';
|
|
4
|
-
import { Vector3, TypedArray, Ray, AABB, Matrix4x4, Plane, Frustum,
|
|
4
|
+
import { Vector3, TypedArray, Ray, AABB, Matrix4x4, Plane, Frustum, Vector4, CubeFace, Vector2, ClipState, Interpolator, Quaternion, HttpRequest, ObservableVector3, ObservableQuaternion, InterpolationMode } from '@zephyr3d/base';
|
|
5
5
|
import { DecoderModule } from 'draco3d';
|
|
6
6
|
|
|
7
7
|
type DistributionType = 'lambertian' | 'ggx';
|
|
@@ -172,31 +172,12 @@ declare class BoundingBox extends AABB implements BoundingVolume {
|
|
|
172
172
|
/** {@inheritDoc BoundingVolume.toAABB} */
|
|
173
173
|
toAABB(): AABB;
|
|
174
174
|
}
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
* Creates an empty bounding box tree
|
|
182
|
-
*/
|
|
183
|
-
constructor();
|
|
184
|
-
/**
|
|
185
|
-
* Creates a bounding box tree from an AABB tree
|
|
186
|
-
* @param aabbtree - The AABB tree to be copied from
|
|
187
|
-
*/
|
|
188
|
-
constructor(aabbtree: AABBTree);
|
|
189
|
-
/** {@inheritDoc BoundingVolume.clone} */
|
|
190
|
-
clone(): BoundingVolume;
|
|
191
|
-
/** {@inheritDoc BoundingVolume.transform} */
|
|
192
|
-
transform(matrix: Matrix4x4): BoundingVolume;
|
|
193
|
-
/** {@inheritDoc BoundingVolume.behindPlane} */
|
|
194
|
-
behindPlane(plane: Plane): boolean;
|
|
195
|
-
/** {@inheritDoc BoundingVolume.outsideFrustum} */
|
|
196
|
-
outsideFrustum(frustum: Frustum | Matrix4x4): boolean;
|
|
197
|
-
/** {@inheritDoc BoundingVolume.toAABB} */
|
|
198
|
-
toAABB(): AABB;
|
|
199
|
-
}
|
|
175
|
+
|
|
176
|
+
/** @internal */
|
|
177
|
+
declare function createGradientNoiseTexture(device: AbstractDevice, size: number, uvscale: number, mono?: boolean, seed?: number): _zephyr3d_device.Texture2D<unknown>;
|
|
178
|
+
|
|
179
|
+
/** @internal */
|
|
180
|
+
declare function createRandomNoiseTexture(device: AbstractDevice, size: number): _zephyr3d_device.Texture2D<unknown>;
|
|
200
181
|
|
|
201
182
|
/**
|
|
202
183
|
* Primitive contains only the vertex and index data of a mesh
|
|
@@ -451,15 +432,17 @@ declare class BoxFrameShape extends Shape<BoxCreationOptions> {
|
|
|
451
432
|
*/
|
|
452
433
|
interface CylinderCreationOptions extends ShapeCreationOptions {
|
|
453
434
|
/** Top radius, default is 1.0 **/
|
|
454
|
-
topRadius?: number;
|
|
455
|
-
/** Bottom radius, default is 1.0 */
|
|
456
435
|
bottomRadius?: number;
|
|
436
|
+
/** Bottom radius, default is 1.0 */
|
|
437
|
+
topRadius?: number;
|
|
457
438
|
/** Height, default is 1.0 */
|
|
458
439
|
height?: number;
|
|
459
440
|
/** Height detail, default is 1 */
|
|
460
441
|
heightDetail?: number;
|
|
461
|
-
/** Radial detail, default is 20*/
|
|
442
|
+
/** Radial detail, default is 20 */
|
|
462
443
|
radialDetail?: number;
|
|
444
|
+
/** Anchor point, default is 0 */
|
|
445
|
+
anchor?: number;
|
|
463
446
|
}
|
|
464
447
|
/**
|
|
465
448
|
* Box shape
|
|
@@ -586,7 +569,8 @@ declare class SphereShape extends Shape<SphereCreationOptions> {
|
|
|
586
569
|
* Base class for any type of post effect
|
|
587
570
|
* @public
|
|
588
571
|
*/
|
|
589
|
-
declare abstract class AbstractPostEffect {
|
|
572
|
+
declare abstract class AbstractPostEffect<ClassName extends string> {
|
|
573
|
+
static readonly className: string;
|
|
590
574
|
protected _outputTexture: Texture2D;
|
|
591
575
|
protected _quadVertexLayout: VertexLayout;
|
|
592
576
|
protected _quadRenderStateSet: RenderStateSet;
|
|
@@ -597,6 +581,8 @@ declare abstract class AbstractPostEffect {
|
|
|
597
581
|
* @param name - Name of the post effect
|
|
598
582
|
*/
|
|
599
583
|
constructor();
|
|
584
|
+
/** Gets class name of this instance */
|
|
585
|
+
getClassName(): ClassName;
|
|
600
586
|
/** Whether this post effect is enabled */
|
|
601
587
|
get enabled(): boolean;
|
|
602
588
|
set enabled(val: boolean);
|
|
@@ -612,12 +598,12 @@ declare abstract class AbstractPostEffect {
|
|
|
612
598
|
* Checks whether this post effect requires the linear depth texture
|
|
613
599
|
* @returns true if the linear depth texture is required.
|
|
614
600
|
*/
|
|
615
|
-
abstract requireLinearDepthTexture(): boolean;
|
|
601
|
+
abstract requireLinearDepthTexture(ctx: DrawContext): boolean;
|
|
616
602
|
/**
|
|
617
603
|
* Checks whether this post effect requires the scene depth buffer
|
|
618
604
|
* @returns true if the scene depth buffer is required.
|
|
619
605
|
*/
|
|
620
|
-
abstract requireDepthAttachment(): boolean;
|
|
606
|
+
abstract requireDepthAttachment(ctx: DrawContext): boolean;
|
|
621
607
|
/**
|
|
622
608
|
* Apply the post effect
|
|
623
609
|
* @param camera - Camera used the render the scene
|
|
@@ -648,9 +634,9 @@ declare abstract class AbstractPostEffect {
|
|
|
648
634
|
* Grayscale post effect
|
|
649
635
|
* @public
|
|
650
636
|
*/
|
|
651
|
-
declare class Grayscale extends AbstractPostEffect {
|
|
637
|
+
declare class Grayscale extends AbstractPostEffect<'Grayscale'> {
|
|
638
|
+
static readonly className: "Grayscale";
|
|
652
639
|
private static _program;
|
|
653
|
-
private static _sampler;
|
|
654
640
|
private _bindgroup;
|
|
655
641
|
/**
|
|
656
642
|
* Creates an instance of grayscale post effect
|
|
@@ -672,8 +658,8 @@ declare class Grayscale extends AbstractPostEffect {
|
|
|
672
658
|
* The tonemap post effect
|
|
673
659
|
* @public
|
|
674
660
|
*/
|
|
675
|
-
declare class Tonemap extends AbstractPostEffect {
|
|
676
|
-
|
|
661
|
+
declare class Tonemap extends AbstractPostEffect<'Tonemap'> {
|
|
662
|
+
static readonly className: "Tonemap";
|
|
677
663
|
private static _programTonemap;
|
|
678
664
|
private _bindgroupTonemap;
|
|
679
665
|
private _exposure;
|
|
@@ -702,8 +688,8 @@ declare class Tonemap extends AbstractPostEffect {
|
|
|
702
688
|
* The bloom post effect
|
|
703
689
|
* @public
|
|
704
690
|
*/
|
|
705
|
-
declare class Bloom extends AbstractPostEffect {
|
|
706
|
-
|
|
691
|
+
declare class Bloom extends AbstractPostEffect<'Bloom'> {
|
|
692
|
+
static readonly className: "Bloom";
|
|
707
693
|
private static _programDownsampleH;
|
|
708
694
|
private static _programDownsampleV;
|
|
709
695
|
private static _programUpsample;
|
|
@@ -765,8 +751,8 @@ declare class Bloom extends AbstractPostEffect {
|
|
|
765
751
|
* The Scalable Ambient Obscurance (SAO) post effect
|
|
766
752
|
* @public
|
|
767
753
|
*/
|
|
768
|
-
declare class SAO extends AbstractPostEffect {
|
|
769
|
-
|
|
754
|
+
declare class SAO extends AbstractPostEffect<'SAO'> {
|
|
755
|
+
static readonly className: "SAO";
|
|
770
756
|
private static _program;
|
|
771
757
|
private static _programPacked;
|
|
772
758
|
private static _renderState;
|
|
@@ -782,7 +768,6 @@ declare class SAO extends AbstractPostEffect {
|
|
|
782
768
|
private _saoBlurDepthCutoff;
|
|
783
769
|
private _blitterH;
|
|
784
770
|
private _blitterV;
|
|
785
|
-
private _copyBlitter;
|
|
786
771
|
private _supported;
|
|
787
772
|
/**
|
|
788
773
|
* Creates an instance of SAO post effect
|
|
@@ -829,9 +814,9 @@ declare class SAO extends AbstractPostEffect {
|
|
|
829
814
|
* FXAA post effect
|
|
830
815
|
* @public
|
|
831
816
|
*/
|
|
832
|
-
declare class FXAA extends AbstractPostEffect {
|
|
817
|
+
declare class FXAA extends AbstractPostEffect<'FXAA'> {
|
|
818
|
+
static readonly className: "FXAA";
|
|
833
819
|
private static _program;
|
|
834
|
-
private static _sampler;
|
|
835
820
|
private _bindgroup;
|
|
836
821
|
private _invTexSize;
|
|
837
822
|
/**
|
|
@@ -850,14 +835,80 @@ declare class FXAA extends AbstractPostEffect {
|
|
|
850
835
|
private _prepare;
|
|
851
836
|
}
|
|
852
837
|
|
|
838
|
+
/**
|
|
839
|
+
* Abstract class for wave generators.
|
|
840
|
+
* @public
|
|
841
|
+
*/
|
|
842
|
+
declare abstract class WaveGenerator {
|
|
843
|
+
/**
|
|
844
|
+
* Setup uniforms for the shader program.
|
|
845
|
+
* @param scope - Global scope of the shader program.
|
|
846
|
+
*/
|
|
847
|
+
abstract setupUniforms(scope: PBGlobalScope): void;
|
|
848
|
+
/**
|
|
849
|
+
* Calculate vertex position and normal.
|
|
850
|
+
* @param scope - Global scope of the shader program.
|
|
851
|
+
* @param inPos - Input position.
|
|
852
|
+
* @param outPos - Output position.
|
|
853
|
+
* @param outNormal - Output normal.
|
|
854
|
+
*/
|
|
855
|
+
abstract calcVertexPositionAndNormal(scope: PBInsideFunctionScope, inPos: PBShaderExp, outPos: PBShaderExp, outNormal: PBShaderExp): void;
|
|
856
|
+
/**
|
|
857
|
+
*
|
|
858
|
+
* @param scope - Global scope of the shader program.
|
|
859
|
+
* @param xz - XZ position.
|
|
860
|
+
* @param vertexNormal - Vertex normal.
|
|
861
|
+
*/
|
|
862
|
+
abstract calcFragmentNormal(scope: PBInsideFunctionScope, xz: PBShaderExp, vertexNormal: PBShaderExp): PBShaderExp;
|
|
863
|
+
/**
|
|
864
|
+
* Calculate fragment normal and foam.
|
|
865
|
+
* @param scope - Global scope of the shader program.
|
|
866
|
+
* @param xz - XZ position.
|
|
867
|
+
* @param vertexNormal - Vertex normal.
|
|
868
|
+
*/
|
|
869
|
+
abstract calcFragmentNormalAndFoam(scope: PBInsideFunctionScope, xz: PBShaderExp, vertexNormal: PBShaderExp): PBShaderExp;
|
|
870
|
+
/**
|
|
871
|
+
* Apply water bind group.
|
|
872
|
+
* @param bindGroup - Bind group to apply.
|
|
873
|
+
*/
|
|
874
|
+
abstract applyWaterBindGroup(bindGroup: BindGroup): void;
|
|
875
|
+
/**
|
|
876
|
+
*
|
|
877
|
+
* @param minX - Minimum X position of the clipmap tile.
|
|
878
|
+
* @param maxX - Maximum X position of the clipmap tile.
|
|
879
|
+
* @param minZ - Minimum Z position of the clipmap tile.
|
|
880
|
+
* @param maxZ - Maximum Z position of the clipmap tile.
|
|
881
|
+
* @param y - Y position of the water surface.
|
|
882
|
+
* @param outAABB - Output AABB.
|
|
883
|
+
*/
|
|
884
|
+
abstract calcClipmapTileAABB(minX: number, maxX: number, minZ: number, maxZ: number, y: number, outAABB: AABB): any;
|
|
885
|
+
/**
|
|
886
|
+
* Update the wave generator.
|
|
887
|
+
* @param timeInSeconds - Time in seconds.
|
|
888
|
+
*/
|
|
889
|
+
abstract update(timeInSeconds: number): void;
|
|
890
|
+
/**
|
|
891
|
+
* Get the shader hash of the wave generator.
|
|
892
|
+
* @param device - Rendering device.
|
|
893
|
+
*/
|
|
894
|
+
abstract getHash(device: AbstractDevice): string;
|
|
895
|
+
/**
|
|
896
|
+
* Check if the wave generator is ok.
|
|
897
|
+
* @param device - Rendering device.
|
|
898
|
+
*/
|
|
899
|
+
abstract isOk(device: AbstractDevice): boolean;
|
|
900
|
+
/**
|
|
901
|
+
* Dispose the wave generator.
|
|
902
|
+
*/
|
|
903
|
+
abstract dispose(): void;
|
|
904
|
+
}
|
|
905
|
+
|
|
853
906
|
/**
|
|
854
907
|
* The post water effect
|
|
855
908
|
* @public
|
|
856
909
|
*/
|
|
857
|
-
declare class PostWater extends AbstractPostEffect {
|
|
858
|
-
|
|
859
|
-
private _region;
|
|
860
|
-
private _gridScale;
|
|
910
|
+
declare class PostWater extends AbstractPostEffect<'PostWater'> {
|
|
911
|
+
static readonly className: "PostWater";
|
|
861
912
|
private _reflectSize;
|
|
862
913
|
private _copyBlitter;
|
|
863
914
|
private _renderingReflections;
|
|
@@ -865,58 +916,38 @@ declare class PostWater extends AbstractPostEffect {
|
|
|
865
916
|
private _displace;
|
|
866
917
|
private _depthMulti;
|
|
867
918
|
private _refractionStrength;
|
|
919
|
+
private _causticsParams;
|
|
868
920
|
private _absorptionGrad;
|
|
869
921
|
private _scatterGrad;
|
|
870
922
|
private _rampTex;
|
|
871
|
-
private
|
|
872
|
-
private
|
|
873
|
-
private
|
|
874
|
-
private
|
|
875
|
-
private
|
|
876
|
-
private
|
|
877
|
-
private _waveStrength0;
|
|
878
|
-
private _waveCroppiness0;
|
|
879
|
-
private _waveLength1;
|
|
880
|
-
private _waveStrength1;
|
|
881
|
-
private _waveCroppiness1;
|
|
882
|
-
private _waveLength2;
|
|
883
|
-
private _waveStrength2;
|
|
884
|
-
private _waveCroppiness2;
|
|
885
|
-
private _currentWaterMesh;
|
|
886
|
-
private _waterMeshes;
|
|
923
|
+
private _targetSize;
|
|
924
|
+
private _envMap;
|
|
925
|
+
private _ssr;
|
|
926
|
+
private _ssrParams;
|
|
927
|
+
private _waterImpls;
|
|
928
|
+
private _waterMesh;
|
|
887
929
|
/**
|
|
888
930
|
* Creates an instance of PostWater.
|
|
889
931
|
* @param elevation - Elevation of the water
|
|
890
932
|
*/
|
|
891
|
-
constructor(elevation: number);
|
|
933
|
+
constructor(elevation: number, waveGenerator: WaveGenerator);
|
|
934
|
+
get waveGenerator(): WaveGenerator;
|
|
892
935
|
get wireframe(): boolean;
|
|
893
936
|
set wireframe(val: boolean);
|
|
894
|
-
get
|
|
895
|
-
set
|
|
896
|
-
get
|
|
897
|
-
set
|
|
898
|
-
get
|
|
899
|
-
set
|
|
900
|
-
get
|
|
901
|
-
set
|
|
902
|
-
get
|
|
903
|
-
set
|
|
904
|
-
get
|
|
905
|
-
set
|
|
906
|
-
get
|
|
907
|
-
set
|
|
908
|
-
get waveLength1(): number;
|
|
909
|
-
set waveLength1(val: number);
|
|
910
|
-
get waveStrength1(): number;
|
|
911
|
-
set waveStrength1(val: number);
|
|
912
|
-
get waveCroppiness1(): number;
|
|
913
|
-
set waveCroppiness1(val: number);
|
|
914
|
-
get waveLength2(): number;
|
|
915
|
-
set waveLength2(val: number);
|
|
916
|
-
get waveStrength2(): number;
|
|
917
|
-
set waveStrength2(val: number);
|
|
918
|
-
get waveCroppiness2(): number;
|
|
919
|
-
set waveCroppiness2(val: number);
|
|
937
|
+
get ssrMaxDistance(): number;
|
|
938
|
+
set ssrMaxDistance(val: number);
|
|
939
|
+
get causticsSlopeMin(): number;
|
|
940
|
+
set causticsSlopeMin(val: number);
|
|
941
|
+
get causticsSlopeMax(): number;
|
|
942
|
+
set causticsSlopeMax(val: number);
|
|
943
|
+
get causticsFalloff(): number;
|
|
944
|
+
set causticsFalloff(val: number);
|
|
945
|
+
get causticsIntensity(): number;
|
|
946
|
+
set causticsIntensity(val: number);
|
|
947
|
+
get ssrIterations(): number;
|
|
948
|
+
set ssrIterations(val: number);
|
|
949
|
+
get ssrThickness(): number;
|
|
950
|
+
set ssrThickness(val: number);
|
|
920
951
|
/** Refraction strength */
|
|
921
952
|
get refractionStrength(): number;
|
|
922
953
|
set refractionStrength(val: number);
|
|
@@ -932,12 +963,21 @@ declare class PostWater extends AbstractPostEffect {
|
|
|
932
963
|
/** Water clipmap grid scale */
|
|
933
964
|
get gridScale(): number;
|
|
934
965
|
set gridScale(val: number);
|
|
966
|
+
/** Water animation speed factor */
|
|
967
|
+
get speed(): number;
|
|
968
|
+
set speed(val: number);
|
|
935
969
|
/** The amount for increasing the water elevation to reduce leaking artifact */
|
|
936
970
|
get antiReflectanceLeak(): number;
|
|
937
971
|
set antiReflectanceLeak(val: number);
|
|
938
972
|
/** Texture displace */
|
|
939
973
|
get displace(): number;
|
|
940
974
|
set displace(val: number);
|
|
975
|
+
/** Environment map */
|
|
976
|
+
get envMap(): TextureCube;
|
|
977
|
+
set envMap(tex: TextureCube);
|
|
978
|
+
/** SSR */
|
|
979
|
+
get ssr(): boolean;
|
|
980
|
+
set ssr(val: boolean);
|
|
941
981
|
/** {@inheritDoc AbstractPostEffect.requireLinearDepthTexture} */
|
|
942
982
|
requireLinearDepthTexture(): boolean;
|
|
943
983
|
/** {@inheritDoc AbstractPostEffect.requireDepthAttachment} */
|
|
@@ -966,11 +1006,11 @@ interface CompositorContext {
|
|
|
966
1006
|
*/
|
|
967
1007
|
declare class Compositor {
|
|
968
1008
|
/** @internal */
|
|
969
|
-
|
|
1009
|
+
private static _SSRPostEffect;
|
|
970
1010
|
/** @internal */
|
|
971
|
-
protected
|
|
1011
|
+
protected _postEffectsOpaque: AbstractPostEffect<any>[];
|
|
972
1012
|
/** @internal */
|
|
973
|
-
|
|
1013
|
+
protected _postEffectsTransparency: AbstractPostEffect<any>[];
|
|
974
1014
|
/** @internal */
|
|
975
1015
|
private static _blitProgram;
|
|
976
1016
|
/** @internal */
|
|
@@ -984,20 +1024,20 @@ declare class Compositor {
|
|
|
984
1024
|
*/
|
|
985
1025
|
constructor();
|
|
986
1026
|
/** @internal */
|
|
987
|
-
requireLinearDepth(): boolean;
|
|
1027
|
+
requireLinearDepth(ctx: DrawContext): boolean;
|
|
988
1028
|
/**
|
|
989
1029
|
* Adds a posteffect
|
|
990
1030
|
*
|
|
991
1031
|
* @param postEffect - The post effect to add
|
|
992
1032
|
* @param opaque - true if the post effect should be applied after the opaque pass and before the transparent pass, otherwise the post effect should be applied after the transparent pass
|
|
993
1033
|
*/
|
|
994
|
-
appendPostEffect(postEffect: AbstractPostEffect): void;
|
|
1034
|
+
appendPostEffect(postEffect: AbstractPostEffect<any>): void;
|
|
995
1035
|
/**
|
|
996
1036
|
* Removes a posteffect that was previously added
|
|
997
1037
|
*
|
|
998
1038
|
* @param postEffect - The posteffect to be remove.
|
|
999
1039
|
*/
|
|
1000
|
-
removePostEffect(postEffect: AbstractPostEffect): void;
|
|
1040
|
+
removePostEffect(postEffect: AbstractPostEffect<any>): void;
|
|
1001
1041
|
/**
|
|
1002
1042
|
* Removes all post effects
|
|
1003
1043
|
*/
|
|
@@ -1005,7 +1045,7 @@ declare class Compositor {
|
|
|
1005
1045
|
/**
|
|
1006
1046
|
* Gets all post effects
|
|
1007
1047
|
*/
|
|
1008
|
-
getPostEffects(): AbstractPostEffect[];
|
|
1048
|
+
getPostEffects(): AbstractPostEffect<any>[];
|
|
1009
1049
|
/** @internal */
|
|
1010
1050
|
begin(ctx: DrawContext): void;
|
|
1011
1051
|
/** @internal */
|
|
@@ -1199,137 +1239,479 @@ declare abstract class OIT {
|
|
|
1199
1239
|
}
|
|
1200
1240
|
|
|
1201
1241
|
/**
|
|
1202
|
-
*
|
|
1203
|
-
*
|
|
1204
|
-
* @remarks
|
|
1205
|
-
* none - Sky will not be rendered
|
|
1206
|
-
* color - Sky will be rendered with a solid color.
|
|
1207
|
-
* skybox - Sky will be rendered as box using a preloaded cube texture.
|
|
1208
|
-
* scatter - Render dynamic sky with atmospheric scattering.
|
|
1209
|
-
*
|
|
1210
|
-
* @public
|
|
1211
|
-
*/
|
|
1212
|
-
type SkyType = 'color' | 'skybox' | 'scatter' | 'scatter-nocloud' | 'none';
|
|
1213
|
-
/**
|
|
1214
|
-
* Type of fog
|
|
1242
|
+
* Camera pick result
|
|
1215
1243
|
* @public
|
|
1216
1244
|
*/
|
|
1217
|
-
type
|
|
1245
|
+
type PickResult = {
|
|
1246
|
+
drawable: Drawable;
|
|
1247
|
+
target: PickTarget;
|
|
1248
|
+
};
|
|
1218
1249
|
/**
|
|
1219
|
-
* The
|
|
1250
|
+
* The camera node class
|
|
1220
1251
|
* @public
|
|
1221
1252
|
*/
|
|
1222
|
-
declare class
|
|
1223
|
-
private _skyType;
|
|
1224
|
-
private _skyColor;
|
|
1225
|
-
private _skyboxTexture;
|
|
1226
|
-
private _updateRadianceMaps;
|
|
1227
|
-
private _radianceMapDirty;
|
|
1228
|
-
private _scatterSkyboxFramebuffer;
|
|
1229
|
-
private _scatterSkyboxTextureWidth;
|
|
1230
|
-
private _aerialPerspectiveDensity;
|
|
1231
|
-
private _radianceMap;
|
|
1232
|
-
private _radianceMapWidth;
|
|
1233
|
-
private _irradianceMap;
|
|
1234
|
-
private _irradianceMapWidth;
|
|
1235
|
-
private _fogType;
|
|
1236
|
-
private _fogColor;
|
|
1237
|
-
private _fogParams;
|
|
1238
|
-
private _cloudy;
|
|
1239
|
-
private _cloudIntensity;
|
|
1240
|
-
private _wind;
|
|
1241
|
-
private _nearestSampler;
|
|
1242
|
-
private _programSky;
|
|
1243
|
-
private _bindgroupSky;
|
|
1244
|
-
private _programFog;
|
|
1245
|
-
private _bindgroupFog;
|
|
1246
|
-
private _programFogScatter;
|
|
1247
|
-
private _bindgroupFogScatter;
|
|
1248
|
-
private _vertexLayout;
|
|
1249
|
-
private _primitiveSky;
|
|
1250
|
-
private _skyWorldMatrix;
|
|
1251
|
-
private _renderStatesSky;
|
|
1252
|
-
private _renderStatesSkyNoDepthTest;
|
|
1253
|
-
private _renderStatesFog;
|
|
1254
|
-
private _renderStatesFogScatter;
|
|
1255
|
-
private _drawGround;
|
|
1256
|
-
private _lastSunDir;
|
|
1257
|
-
/**
|
|
1258
|
-
* Creates an instance of SkyRenderer
|
|
1259
|
-
*/
|
|
1260
|
-
constructor();
|
|
1253
|
+
declare class Camera extends SceneNode {
|
|
1261
1254
|
/** @internal */
|
|
1262
|
-
|
|
1263
|
-
/**
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1255
|
+
protected _projMatrix: Matrix4x4;
|
|
1256
|
+
/** @internal */
|
|
1257
|
+
protected _viewMatrix: Matrix4x4;
|
|
1258
|
+
/** @internal */
|
|
1259
|
+
protected _viewProjMatrix: Matrix4x4;
|
|
1260
|
+
/** @internal */
|
|
1261
|
+
protected _rotationMatrix: Matrix4x4;
|
|
1262
|
+
/** @internal */
|
|
1263
|
+
protected _invViewProjMatrix: Matrix4x4;
|
|
1264
|
+
/** @internal */
|
|
1265
|
+
protected _clipPlane: Plane;
|
|
1266
|
+
/** @internal */
|
|
1267
|
+
protected _controller: BaseCameraController;
|
|
1268
|
+
/** @internal */
|
|
1269
|
+
protected _frustum: Frustum;
|
|
1270
|
+
/** @internal */
|
|
1271
|
+
protected _frustumV: Frustum;
|
|
1272
|
+
/** @internal */
|
|
1273
|
+
protected _dirty: boolean;
|
|
1274
|
+
/** @internal */
|
|
1275
|
+
protected _sampleCount: number;
|
|
1276
|
+
/** @internal */
|
|
1277
|
+
protected _framebuffer: FrameBuffer;
|
|
1278
|
+
/** @internal */
|
|
1279
|
+
protected _viewport: number[];
|
|
1280
|
+
/** @internal */
|
|
1281
|
+
protected _scissor: number[];
|
|
1282
|
+
/** @internal */
|
|
1283
|
+
protected _clearColor: Vector4;
|
|
1284
|
+
/** @internal */
|
|
1285
|
+
protected _clipMask: number;
|
|
1286
|
+
/** @internal */
|
|
1287
|
+
protected _oit: OIT;
|
|
1288
|
+
/** @internal */
|
|
1289
|
+
protected _depthPrePass: boolean;
|
|
1290
|
+
/** @internal */
|
|
1291
|
+
protected _commandBufferReuse: boolean;
|
|
1292
|
+
/** @internal */
|
|
1293
|
+
protected _HiZ: boolean;
|
|
1294
|
+
/** @internal */
|
|
1295
|
+
protected _SSR: boolean;
|
|
1296
|
+
/** @internal */
|
|
1297
|
+
protected _ssrParams: Vector4;
|
|
1298
|
+
/** @internal */
|
|
1299
|
+
protected _ssrMaxRoughness: number;
|
|
1300
|
+
/** @internal */
|
|
1301
|
+
protected _ssrRoughnessFactor: number;
|
|
1302
|
+
/** @internal */
|
|
1303
|
+
protected _ssrStride: number;
|
|
1304
|
+
/** @internal */
|
|
1305
|
+
protected _ssrCalcThickness: boolean;
|
|
1306
|
+
/** @internal */
|
|
1307
|
+
protected _ssrBlurriness: number;
|
|
1308
|
+
/** @internal */
|
|
1309
|
+
protected _ssrBlurDepthCutoff: number;
|
|
1310
|
+
/** @internal */
|
|
1311
|
+
protected _ssrBlurKernelSize: number;
|
|
1312
|
+
/** @internal */
|
|
1313
|
+
protected _ssrBlurStdDev: number;
|
|
1314
|
+
/** @internal */
|
|
1315
|
+
protected _picking: boolean;
|
|
1316
|
+
/** @internal */
|
|
1317
|
+
protected _pickPosX: number;
|
|
1318
|
+
/** @internal */
|
|
1319
|
+
protected _pickPosY: number;
|
|
1320
|
+
/** @internal */
|
|
1321
|
+
protected _pickResultPromise: Promise<PickResult>;
|
|
1322
|
+
/** @internal */
|
|
1323
|
+
protected _pickResult: PickResult;
|
|
1269
1324
|
/**
|
|
1270
|
-
*
|
|
1271
|
-
*
|
|
1272
|
-
* @remarks
|
|
1273
|
-
* If use use the sky for image-based lighting, the value shoud be set to true. default is false
|
|
1325
|
+
* Creates a new camera node
|
|
1274
1326
|
*
|
|
1327
|
+
* @param scene - The scene that the camera belongs to
|
|
1328
|
+
* @param projectionMatrix - Projection matrix for this camera
|
|
1275
1329
|
*/
|
|
1276
|
-
|
|
1277
|
-
|
|
1330
|
+
constructor(scene: Scene, projectionMatrix?: Matrix4x4);
|
|
1331
|
+
/** Clip plane in camera space */
|
|
1332
|
+
get clipPlane(): Plane;
|
|
1333
|
+
set clipPlane(plane: Plane);
|
|
1278
1334
|
/**
|
|
1279
|
-
*
|
|
1335
|
+
* Gets whether Hi-Z acceleration is enabled.
|
|
1336
|
+
* When enabled, it can significantly improve SSR performance with minimal quality impact.
|
|
1280
1337
|
*/
|
|
1281
|
-
get
|
|
1282
|
-
set
|
|
1283
|
-
/** Aerial perspective density */
|
|
1284
|
-
get aerialPerspectiveDensity(): number;
|
|
1285
|
-
set aerialPerspectiveDensity(val: number);
|
|
1338
|
+
get HiZ(): boolean;
|
|
1339
|
+
set HiZ(val: boolean);
|
|
1286
1340
|
/**
|
|
1287
|
-
*
|
|
1288
|
-
*
|
|
1289
|
-
* @remarks
|
|
1290
|
-
* This value controls how much cloud should be rendered when the sky type is scatter.
|
|
1291
|
-
* Typically, the value should be in the range of 0 to 1.
|
|
1341
|
+
* Gets whether Screen Space Reflections (SSR) is enabled.
|
|
1292
1342
|
*/
|
|
1293
|
-
get
|
|
1294
|
-
set
|
|
1343
|
+
get SSR(): boolean;
|
|
1344
|
+
set SSR(val: boolean);
|
|
1295
1345
|
/**
|
|
1296
|
-
*
|
|
1346
|
+
* Gets the maximum roughness value for screen space reflections.
|
|
1347
|
+
* Controls the cutoff point where surfaces are considered too rough for SSR.
|
|
1297
1348
|
*/
|
|
1298
|
-
get
|
|
1299
|
-
set
|
|
1349
|
+
get ssrMaxRoughness(): number;
|
|
1350
|
+
set ssrMaxRoughness(val: number);
|
|
1300
1351
|
/**
|
|
1301
|
-
*
|
|
1302
|
-
*
|
|
1303
|
-
* @remarks
|
|
1304
|
-
* This value affects the movement of the cloud
|
|
1352
|
+
* Gets the roughness factor for SSR calculations.
|
|
1353
|
+
* Affects how surface roughness influences reflection clarity.
|
|
1305
1354
|
*/
|
|
1306
|
-
get
|
|
1307
|
-
set
|
|
1355
|
+
get ssrRoughnessFactor(): number;
|
|
1356
|
+
set ssrRoughnessFactor(val: number);
|
|
1308
1357
|
/**
|
|
1309
|
-
*
|
|
1358
|
+
* Gets the stride value for SSR ray marching.
|
|
1359
|
+
* Controls the step size during ray marching. Larger values improve performance but may miss details.
|
|
1310
1360
|
*/
|
|
1311
|
-
get
|
|
1361
|
+
get ssrStride(): number;
|
|
1362
|
+
set ssrStride(val: number);
|
|
1312
1363
|
/**
|
|
1313
|
-
*
|
|
1364
|
+
* Gets the maximum distance for SSR ray marching.
|
|
1365
|
+
* Defines how far rays will travel when searching for reflection intersections.
|
|
1314
1366
|
*/
|
|
1315
|
-
get
|
|
1367
|
+
get ssrMaxDistance(): number;
|
|
1368
|
+
set ssrMaxDistance(val: number);
|
|
1316
1369
|
/**
|
|
1317
|
-
*
|
|
1370
|
+
* Gets the number of iterations for SSR ray marching.
|
|
1371
|
+
* Higher values provide more accurate reflections but impact performance.
|
|
1318
1372
|
*/
|
|
1319
|
-
get
|
|
1320
|
-
set
|
|
1321
|
-
/**
|
|
1322
|
-
|
|
1323
|
-
|
|
1373
|
+
get ssrIterations(): number;
|
|
1374
|
+
set ssrIterations(val: number);
|
|
1375
|
+
/**
|
|
1376
|
+
* Gets the thickness value for SSR calculations.
|
|
1377
|
+
* Determines the thickness threshold for surfaces when calculating reflections.
|
|
1378
|
+
*/
|
|
1379
|
+
get ssrThickness(): number;
|
|
1380
|
+
set ssrThickness(val: number);
|
|
1381
|
+
/**
|
|
1382
|
+
* Gets whether SSR should calculate thickness automatically.
|
|
1383
|
+
* When enabled, the system will dynamically compute surface thickness for reflections.
|
|
1384
|
+
*/
|
|
1385
|
+
get ssrCalcThickness(): boolean;
|
|
1386
|
+
set ssrCalcThickness(val: boolean);
|
|
1387
|
+
/**
|
|
1388
|
+
* Gets the blur scale factor for SSR.
|
|
1389
|
+
* Controls the overall intensity of the blur effect applied to reflections.
|
|
1390
|
+
*/
|
|
1391
|
+
get ssrBlurScale(): number;
|
|
1392
|
+
set ssrBlurScale(val: number);
|
|
1393
|
+
/**
|
|
1394
|
+
* Gets the depth cutoff value for SSR blur.
|
|
1395
|
+
* Determines at what depth difference the blur effect should be reduced or eliminated.
|
|
1396
|
+
*/
|
|
1397
|
+
get ssrBlurDepthCutoff(): number;
|
|
1398
|
+
set ssrBlurDepthCutoff(val: number);
|
|
1399
|
+
/**
|
|
1400
|
+
* Gets the kernel size for the SSR blur effect.
|
|
1401
|
+
* Defines the size of the blur kernel. Larger values create softer, more spread-out blur.
|
|
1402
|
+
*/
|
|
1403
|
+
get ssrBlurKernelSize(): number;
|
|
1404
|
+
set ssrBlurKernelSize(val: number);
|
|
1405
|
+
/**
|
|
1406
|
+
* Gets the standard deviation for the SSR Gaussian blur.
|
|
1407
|
+
* Controls the distribution of the blur effect. Higher values create more pronounced blur.
|
|
1408
|
+
*/
|
|
1409
|
+
get ssrBlurStdDev(): number;
|
|
1410
|
+
set ssrBlurStdDev(val: number);
|
|
1324
1411
|
/** @internal */
|
|
1325
|
-
get
|
|
1326
|
-
/**
|
|
1327
|
-
get
|
|
1328
|
-
set
|
|
1329
|
-
/**
|
|
1330
|
-
get
|
|
1331
|
-
set
|
|
1332
|
-
/**
|
|
1412
|
+
get ssrParams(): Vector4;
|
|
1413
|
+
/** Whether to perform a depth pass */
|
|
1414
|
+
get depthPrePass(): boolean;
|
|
1415
|
+
set depthPrePass(val: boolean);
|
|
1416
|
+
/** Whether to allow command buffer reuse optimization */
|
|
1417
|
+
get commandBufferReuse(): boolean;
|
|
1418
|
+
set commandBufferReuse(val: boolean);
|
|
1419
|
+
/** Whether GPU picking is enabled for this camera */
|
|
1420
|
+
get enablePicking(): boolean;
|
|
1421
|
+
set enablePicking(enable: boolean);
|
|
1422
|
+
/** X coordinate for picking related to viewport */
|
|
1423
|
+
get pickPosX(): number;
|
|
1424
|
+
set pickPosX(val: number);
|
|
1425
|
+
/** Y coordinate for picking related to viewport */
|
|
1426
|
+
get pickPosY(): number;
|
|
1427
|
+
set pickPosY(val: number);
|
|
1428
|
+
/** Pick result */
|
|
1429
|
+
get pickResult(): PickResult;
|
|
1430
|
+
set pickResult(val: PickResult);
|
|
1431
|
+
/** @internal */
|
|
1432
|
+
get pickResultAsync(): Promise<PickResult>;
|
|
1433
|
+
set pickResultAsync(val: Promise<PickResult>);
|
|
1434
|
+
/**
|
|
1435
|
+
* Sample count for MSAA
|
|
1436
|
+
*
|
|
1437
|
+
* @remarks
|
|
1438
|
+
* If greater than one, force the scene to be rendered using multisampled framebuffer
|
|
1439
|
+
*/
|
|
1440
|
+
get sampleCount(): number;
|
|
1441
|
+
set sampleCount(val: number);
|
|
1442
|
+
/** OIT */
|
|
1443
|
+
get oit(): OIT;
|
|
1444
|
+
set oit(val: OIT);
|
|
1445
|
+
/** Clip plane mask */
|
|
1446
|
+
get clipMask(): number;
|
|
1447
|
+
set clipMask(val: number);
|
|
1448
|
+
/** Framebuffer object into which the scene will be rendered */
|
|
1449
|
+
get framebuffer(): FrameBuffer;
|
|
1450
|
+
set framebuffer(fb: FrameBuffer);
|
|
1451
|
+
/** Viewport used for rendering, if null, use full framebuffer size */
|
|
1452
|
+
get viewport(): number[];
|
|
1453
|
+
set viewport(rect: number[]);
|
|
1454
|
+
/** Scissor rectangle used for rendering, if null, use viewport value */
|
|
1455
|
+
get scissor(): number[];
|
|
1456
|
+
set scissor(rect: number[]);
|
|
1457
|
+
/** Color value used to clear color buffer before rendering, if null, color buffer will not be cleared */
|
|
1458
|
+
get clearColor(): Vector4;
|
|
1459
|
+
set clearColor(val: Vector4);
|
|
1460
|
+
/**
|
|
1461
|
+
* Handle input events
|
|
1462
|
+
* @param ev - input event object
|
|
1463
|
+
* @param type - event type, default to ev.type
|
|
1464
|
+
* @returns Boolean value indicates whether the event was handled.
|
|
1465
|
+
*/
|
|
1466
|
+
handleEvent(ev: Event, type?: string): boolean;
|
|
1467
|
+
/**
|
|
1468
|
+
* Constructs a ray based on the given screen coordinates.
|
|
1469
|
+
*
|
|
1470
|
+
* @param x - The x-component of the screen coordinates, relative to the top-left corner of the viewport.
|
|
1471
|
+
* @param y - The y-component of the screen coordinates, relative to the top-left corner of the viewport.
|
|
1472
|
+
* @returns The ray originating from the camera position and passing through the given screen coordinates.
|
|
1473
|
+
*/
|
|
1474
|
+
constructRay(x: number, y: number): Ray;
|
|
1475
|
+
/**
|
|
1476
|
+
* Place the camera by specifying the camera position and the target point
|
|
1477
|
+
* @param eye - The camera position
|
|
1478
|
+
* @param target - The target point to look at
|
|
1479
|
+
* @param up - The up vector
|
|
1480
|
+
* @returns self
|
|
1481
|
+
*/
|
|
1482
|
+
lookAt(eye: Vector3, target: Vector3, up: Vector3): this;
|
|
1483
|
+
/**
|
|
1484
|
+
* Place the camera to look at a given cube face at a given camera position
|
|
1485
|
+
* @param face - The cube face to look at
|
|
1486
|
+
* @param position - The camera position
|
|
1487
|
+
* @returns self
|
|
1488
|
+
*/
|
|
1489
|
+
lookAtCubeFace(face: CubeFace, position?: Vector3): this;
|
|
1490
|
+
/**
|
|
1491
|
+
* Setup a perspective projection matrix for the camera
|
|
1492
|
+
* @param fovY - The vertical field of view in radians.
|
|
1493
|
+
* @param aspect - The aspect ratio
|
|
1494
|
+
* @param zNear - The near clip plane
|
|
1495
|
+
* @param zFar - The far clip plane
|
|
1496
|
+
* @returns self
|
|
1497
|
+
*/
|
|
1498
|
+
setPerspective(fovY: number, aspect: number, zNear: number, zFar: number): this;
|
|
1499
|
+
/**
|
|
1500
|
+
* Setup a orthogonal projection matrix for the camera
|
|
1501
|
+
* @param left - Left bound of the frustum
|
|
1502
|
+
* @param right - Right bound of the frustum
|
|
1503
|
+
* @param bottom - Bottom bound of the frustum
|
|
1504
|
+
* @param top - Top bound of the frustum
|
|
1505
|
+
* @param near - Near bound of the frustum.
|
|
1506
|
+
* @param far - Far bound of the frustum.
|
|
1507
|
+
* @returns self
|
|
1508
|
+
*/
|
|
1509
|
+
setOrtho(left: number, right: number, bottom: number, top: number, near: number, far: number): this;
|
|
1510
|
+
/**
|
|
1511
|
+
* Setup a projection matrix for the camera
|
|
1512
|
+
* @param matrix - The projection matrix
|
|
1513
|
+
*/
|
|
1514
|
+
setProjectionMatrix(matrix: Matrix4x4): void;
|
|
1515
|
+
/**
|
|
1516
|
+
* Gets the projection matrix of the camera
|
|
1517
|
+
* @returns The projection matrix
|
|
1518
|
+
*/
|
|
1519
|
+
getProjectionMatrix(): Matrix4x4;
|
|
1520
|
+
getRotationMatrix(): Matrix4x4;
|
|
1521
|
+
/**
|
|
1522
|
+
* View matrix of the camera
|
|
1523
|
+
*
|
|
1524
|
+
* @remarks
|
|
1525
|
+
* Camera's view matrix will transform a point from the world space to the camera space
|
|
1526
|
+
*/
|
|
1527
|
+
get viewMatrix(): Matrix4x4;
|
|
1528
|
+
get viewProjectionMatrix(): Matrix4x4;
|
|
1529
|
+
/**
|
|
1530
|
+
* The inverse-view-projection matrix of the camera
|
|
1531
|
+
*
|
|
1532
|
+
* @remarks
|
|
1533
|
+
* The inverse-view-projection matrix transforms a point from the clip space to the camera space
|
|
1534
|
+
*/
|
|
1535
|
+
get invViewProjectionMatrix(): Matrix4x4;
|
|
1536
|
+
/** Gets the frustum of the camera */
|
|
1537
|
+
get frustum(): Frustum;
|
|
1538
|
+
get frustumViewSpace(): Frustum;
|
|
1539
|
+
/** The camera controller */
|
|
1540
|
+
get controller(): BaseCameraController;
|
|
1541
|
+
set controller(controller: BaseCameraController);
|
|
1542
|
+
/** {@inheritDoc SceneNode.isCamera} */
|
|
1543
|
+
isCamera(): this is Camera;
|
|
1544
|
+
/** Gets the near clip plane of the camera */
|
|
1545
|
+
getNearPlane(): number;
|
|
1546
|
+
/** Gets the far clip plane of the camera */
|
|
1547
|
+
getFarPlane(): number;
|
|
1548
|
+
/** Gets the vertical field of view of the camera */
|
|
1549
|
+
getFOV(): number;
|
|
1550
|
+
/** Gets the tangent of half of the vertical field of view */
|
|
1551
|
+
getTanHalfFovy(): number;
|
|
1552
|
+
/** Gets the aspect ratio */
|
|
1553
|
+
getAspect(): number;
|
|
1554
|
+
/**
|
|
1555
|
+
* Renders a scene
|
|
1556
|
+
* @param scene - The scene to be rendered
|
|
1557
|
+
* @param compositor - Compositor instance that will be used to apply postprocess effects
|
|
1558
|
+
*/
|
|
1559
|
+
render(scene: Scene, compositor?: Compositor): void;
|
|
1560
|
+
/**
|
|
1561
|
+
* Updates the controller state
|
|
1562
|
+
*/
|
|
1563
|
+
updateController(): void;
|
|
1564
|
+
/**
|
|
1565
|
+
* Reset the controller
|
|
1566
|
+
*/
|
|
1567
|
+
resetController(): void;
|
|
1568
|
+
/** @internal */
|
|
1569
|
+
private setController;
|
|
1570
|
+
/** @internal */
|
|
1571
|
+
protected _invalidate(projectMatrixChanged: boolean): void;
|
|
1572
|
+
/** @internal */
|
|
1573
|
+
protected _compute(): void;
|
|
1574
|
+
/** @internal */
|
|
1575
|
+
protected _computeProj(): void;
|
|
1576
|
+
/** @internal */
|
|
1577
|
+
protected _onTransformChanged(invalidateLocal: boolean): void;
|
|
1578
|
+
/** {@inheritdoc SceneNode.dispose} */
|
|
1579
|
+
dispose(): void;
|
|
1580
|
+
}
|
|
1581
|
+
|
|
1582
|
+
/**
|
|
1583
|
+
* Type of sky
|
|
1584
|
+
*
|
|
1585
|
+
* @remarks
|
|
1586
|
+
* none - Sky will not be rendered
|
|
1587
|
+
* color - Sky will be rendered with a solid color.
|
|
1588
|
+
* skybox - Sky will be rendered as box using a preloaded cube texture.
|
|
1589
|
+
* scatter - Render dynamic sky with atmospheric scattering.
|
|
1590
|
+
*
|
|
1591
|
+
* @public
|
|
1592
|
+
*/
|
|
1593
|
+
type SkyType = 'color' | 'skybox' | 'scatter' | 'scatter-nocloud' | 'none';
|
|
1594
|
+
/**
|
|
1595
|
+
* Type of fog
|
|
1596
|
+
* @public
|
|
1597
|
+
*/
|
|
1598
|
+
type FogType = 'linear' | 'exp' | 'exp2' | 'scatter' | 'none';
|
|
1599
|
+
/**
|
|
1600
|
+
* The sky renderer
|
|
1601
|
+
* @public
|
|
1602
|
+
*/
|
|
1603
|
+
declare class SkyRenderer {
|
|
1604
|
+
private _skyType;
|
|
1605
|
+
private _skyColor;
|
|
1606
|
+
private _skyboxTexture;
|
|
1607
|
+
private _updateRadianceMaps;
|
|
1608
|
+
private _radianceMapDirty;
|
|
1609
|
+
private _scatterSkyboxFramebuffer;
|
|
1610
|
+
private _scatterSkyboxTextureWidth;
|
|
1611
|
+
private _aerialPerspectiveDensity;
|
|
1612
|
+
private _radianceMap;
|
|
1613
|
+
private _radianceMapWidth;
|
|
1614
|
+
private _irradianceMap;
|
|
1615
|
+
private _irradianceMapWidth;
|
|
1616
|
+
private _fogType;
|
|
1617
|
+
private _fogColor;
|
|
1618
|
+
private _fogParams;
|
|
1619
|
+
private _cloudy;
|
|
1620
|
+
private _cloudIntensity;
|
|
1621
|
+
private _wind;
|
|
1622
|
+
private _programSky;
|
|
1623
|
+
private _bindgroupSky;
|
|
1624
|
+
private _programFog;
|
|
1625
|
+
private _bindgroupFog;
|
|
1626
|
+
private _programFogScatter;
|
|
1627
|
+
private _bindgroupFogScatter;
|
|
1628
|
+
private _vertexLayout;
|
|
1629
|
+
private _primitiveSky;
|
|
1630
|
+
private _skyWorldMatrix;
|
|
1631
|
+
private _renderStatesSky;
|
|
1632
|
+
private _renderStatesSkyNoDepthTest;
|
|
1633
|
+
private _renderStatesFog;
|
|
1634
|
+
private _renderStatesFogScatter;
|
|
1635
|
+
private _drawGround;
|
|
1636
|
+
private _lastSunDir;
|
|
1637
|
+
/**
|
|
1638
|
+
* Creates an instance of SkyRenderer
|
|
1639
|
+
*/
|
|
1640
|
+
constructor();
|
|
1641
|
+
/** @internal */
|
|
1642
|
+
getHash(ctx: DrawContext): string;
|
|
1643
|
+
/** Which type of the sky should be rendered */
|
|
1644
|
+
get skyType(): SkyType;
|
|
1645
|
+
set skyType(val: SkyType);
|
|
1646
|
+
/** Whether ground should be rendered */
|
|
1647
|
+
get drawGround(): boolean;
|
|
1648
|
+
set drawGround(val: boolean);
|
|
1649
|
+
/** Baked sky texture */
|
|
1650
|
+
get bakedSkyTexture(): TextureCube;
|
|
1651
|
+
/**
|
|
1652
|
+
* Wether the IBL maps should be updated automatically.
|
|
1653
|
+
*
|
|
1654
|
+
* @remarks
|
|
1655
|
+
* If use use the sky for image-based lighting, the value shoud be set to true. default is false
|
|
1656
|
+
*
|
|
1657
|
+
*/
|
|
1658
|
+
get autoUpdateIBLMaps(): boolean;
|
|
1659
|
+
set autoUpdateIBLMaps(val: boolean);
|
|
1660
|
+
/**
|
|
1661
|
+
* The solid sky color
|
|
1662
|
+
*/
|
|
1663
|
+
get skyColor(): Vector4;
|
|
1664
|
+
set skyColor(val: Vector4);
|
|
1665
|
+
/** Aerial perspective density */
|
|
1666
|
+
get aerialPerspectiveDensity(): number;
|
|
1667
|
+
set aerialPerspectiveDensity(val: number);
|
|
1668
|
+
/**
|
|
1669
|
+
* Light density of the sky.
|
|
1670
|
+
*
|
|
1671
|
+
* @remarks
|
|
1672
|
+
* This value controls how much cloud should be rendered when the sky type is scatter.
|
|
1673
|
+
* Typically, the value should be in the range of 0 to 1.
|
|
1674
|
+
*/
|
|
1675
|
+
get cloudy(): number;
|
|
1676
|
+
set cloudy(val: number);
|
|
1677
|
+
/**
|
|
1678
|
+
* Intensity of the sky color
|
|
1679
|
+
*/
|
|
1680
|
+
get cloudIntensity(): number;
|
|
1681
|
+
set cloudIntensity(val: number);
|
|
1682
|
+
/**
|
|
1683
|
+
* Wind velocity
|
|
1684
|
+
*
|
|
1685
|
+
* @remarks
|
|
1686
|
+
* This value affects the movement of the cloud
|
|
1687
|
+
*/
|
|
1688
|
+
get wind(): Vector2;
|
|
1689
|
+
set wind(val: Vector2);
|
|
1690
|
+
/**
|
|
1691
|
+
* Radiance map of the sky.
|
|
1692
|
+
*/
|
|
1693
|
+
get radianceMap(): TextureCube;
|
|
1694
|
+
/**
|
|
1695
|
+
* Irradiance map of the sky.
|
|
1696
|
+
*/
|
|
1697
|
+
get irradianceMap(): TextureCube;
|
|
1698
|
+
/**
|
|
1699
|
+
* Cube texture for skybox.
|
|
1700
|
+
*/
|
|
1701
|
+
get skyboxTexture(): TextureCube;
|
|
1702
|
+
set skyboxTexture(tex: TextureCube);
|
|
1703
|
+
/** @internal */
|
|
1704
|
+
get skyWorldMatrix(): Matrix4x4;
|
|
1705
|
+
set skyWorldMatrix(val: Matrix4x4);
|
|
1706
|
+
/** @internal */
|
|
1707
|
+
get mappedFogType(): number;
|
|
1708
|
+
/** Current fog type */
|
|
1709
|
+
get fogType(): FogType;
|
|
1710
|
+
set fogType(val: FogType);
|
|
1711
|
+
/** Start distance of linear fog */
|
|
1712
|
+
get fogStart(): number;
|
|
1713
|
+
set fogStart(val: number);
|
|
1714
|
+
/** End distance of linear fog */
|
|
1333
1715
|
get fogEnd(): number;
|
|
1334
1716
|
set fogEnd(val: number);
|
|
1335
1717
|
/** Top distance of fog if fog type is not scatter */
|
|
@@ -1393,7 +1775,7 @@ declare class EnvLightWrapper {
|
|
|
1393
1775
|
/** @internal */
|
|
1394
1776
|
constructor();
|
|
1395
1777
|
/** @internal */
|
|
1396
|
-
getHash(ctx
|
|
1778
|
+
getHash(ctx?: DrawContext): string;
|
|
1397
1779
|
/** @internal */
|
|
1398
1780
|
get envLight(): EnvironmentLighting;
|
|
1399
1781
|
/** The strength of environment lighting */
|
|
@@ -1756,6 +2138,8 @@ declare class ShaderHelper {
|
|
|
1756
2138
|
/** @internal */
|
|
1757
2139
|
private static readonly SKIN_MATRIX_NAME;
|
|
1758
2140
|
/** @internal */
|
|
2141
|
+
private static _drawableBindGroupLayouts;
|
|
2142
|
+
/** @internal */
|
|
1759
2143
|
private static _lightUniformShadow;
|
|
1760
2144
|
/** @internal */
|
|
1761
2145
|
private static _fogUniforms;
|
|
@@ -1769,6 +2153,7 @@ declare class ShaderHelper {
|
|
|
1769
2153
|
static getMorphDataUniformName(): string;
|
|
1770
2154
|
static getMorphInfoUniformName(): string;
|
|
1771
2155
|
static getLightBufferUniformName(): string;
|
|
2156
|
+
static getDrawableBindGroupLayout(skinning: boolean, morphing: boolean, instancing: boolean): BindGroupLayout;
|
|
1772
2157
|
/**
|
|
1773
2158
|
* Prepares the fragment shader which is going to be used in our material system
|
|
1774
2159
|
*
|
|
@@ -1898,6 +2283,12 @@ declare class ShaderHelper {
|
|
|
1898
2283
|
* @returns The camera position
|
|
1899
2284
|
*/
|
|
1900
2285
|
static getCameraPosition(scope: PBInsideFunctionScope): PBShaderExp;
|
|
2286
|
+
/**
|
|
2287
|
+
* Gets the uniform variable of type float which holds the roughness factor
|
|
2288
|
+
* @param scope - Current shader scope
|
|
2289
|
+
* @returns The roughness factor
|
|
2290
|
+
*/
|
|
2291
|
+
static getCameraRoughnessFactor(scope: PBInsideFunctionScope): PBShaderExp;
|
|
1901
2292
|
/**
|
|
1902
2293
|
* Discard the fragment if it was clipped by the clip plane
|
|
1903
2294
|
* @param scope - Current shader scope
|
|
@@ -2398,7 +2789,7 @@ declare class MeshMaterial extends Material {
|
|
|
2398
2789
|
*
|
|
2399
2790
|
* @returns The final fragment color
|
|
2400
2791
|
*/
|
|
2401
|
-
outputFragmentColor(scope: PBInsideFunctionScope, worldPos: PBShaderExp, color: PBShaderExp): void;
|
|
2792
|
+
outputFragmentColor(scope: PBInsideFunctionScope, worldPos: PBShaderExp, color: PBShaderExp, ssrRoughness?: PBShaderExp, ssrNormal?: PBShaderExp): void;
|
|
2402
2793
|
}
|
|
2403
2794
|
|
|
2404
2795
|
/**
|
|
@@ -2538,7 +2929,7 @@ declare class LambertMaterial extends LambertMaterial_base {
|
|
|
2538
2929
|
*/
|
|
2539
2930
|
type IMixinBlinnPhong = {
|
|
2540
2931
|
shininess: number;
|
|
2541
|
-
blinnPhongLight(scope: PBInsideFunctionScope, worldPos: PBShaderExp, normal: PBShaderExp, viewVec: PBShaderExp, albedo: PBShaderExp): PBShaderExp;
|
|
2932
|
+
blinnPhongLight(scope: PBInsideFunctionScope, worldPos: PBShaderExp, normal: PBShaderExp, viewVec: PBShaderExp, albedo: PBShaderExp, outRoughness?: PBShaderExp): PBShaderExp;
|
|
2542
2933
|
} & IMixinLight;
|
|
2543
2934
|
/**
|
|
2544
2935
|
* Blinn-phong lighting model mixin
|
|
@@ -2637,7 +3028,7 @@ type IMixinPBRCommon = {
|
|
|
2637
3028
|
calculateEmissiveColor(scope: PBInsideFunctionScope): PBShaderExp;
|
|
2638
3029
|
getF0(scope: PBInsideFunctionScope): PBShaderExp;
|
|
2639
3030
|
directLighting(scope: PBInsideFunctionScope, lightDir: PBShaderExp, lightColor: PBShaderExp, normal: PBShaderExp, viewVec: PBShaderExp, commonData: PBShaderExp, outColor: PBShaderExp): any;
|
|
2640
|
-
indirectLighting(scope: PBInsideFunctionScope, normal: PBShaderExp, viewVec: PBShaderExp, commonData: PBShaderExp, outColor: PBShaderExp): any;
|
|
3031
|
+
indirectLighting(scope: PBInsideFunctionScope, normal: PBShaderExp, viewVec: PBShaderExp, commonData: PBShaderExp, outColor: PBShaderExp, outRoughness?: PBShaderExp): any;
|
|
2641
3032
|
} & TextureMixinInstanceTypes<[
|
|
2642
3033
|
'occlusion',
|
|
2643
3034
|
'emissive',
|
|
@@ -2668,7 +3059,7 @@ type IMixinPBRMetallicRoughness = {
|
|
|
2668
3059
|
metallic: number;
|
|
2669
3060
|
roughness: number;
|
|
2670
3061
|
specularFactor: Vector4;
|
|
2671
|
-
PBRLight(scope: PBInsideFunctionScope, worldPos: PBShaderExp, normal: PBShaderExp, viewVec: PBShaderExp, albedo: PBShaderExp, TBN?: PBShaderExp): PBShaderExp;
|
|
3062
|
+
PBRLight(scope: PBInsideFunctionScope, worldPos: PBShaderExp, normal: PBShaderExp, viewVec: PBShaderExp, albedo: PBShaderExp, TBN: PBShaderExp, outRoughness?: PBShaderExp): PBShaderExp;
|
|
2672
3063
|
calculateCommonData(scope: PBInsideFunctionScope, albedo: PBShaderExp, normal: PBShaderExp, viewVec: PBShaderExp, TBN: PBShaderExp, data: PBShaderExp): void;
|
|
2673
3064
|
} & IMixinPBRCommon & IMixinLight & TextureMixinInstanceTypes<['metallicRoughness', 'occlusion', 'specular', 'specularColor']>;
|
|
2674
3065
|
/**
|
|
@@ -2831,7 +3222,7 @@ declare class PBRMetallicRoughnessMaterial extends PBRMetallicRoughnessMaterial_
|
|
|
2831
3222
|
type IMixinPBRSpecularGlossiness = {
|
|
2832
3223
|
specularFactor: Vector4;
|
|
2833
3224
|
glossinessFactor: number;
|
|
2834
|
-
PBRLight(scope: PBInsideFunctionScope, worldPos: PBShaderExp, normal: PBShaderExp, viewVec: PBShaderExp, albedo: PBShaderExp, TBN?: PBShaderExp): PBShaderExp;
|
|
3225
|
+
PBRLight(scope: PBInsideFunctionScope, worldPos: PBShaderExp, normal: PBShaderExp, viewVec: PBShaderExp, albedo: PBShaderExp, TBN: PBShaderExp, outRoughness?: PBShaderExp): PBShaderExp;
|
|
2835
3226
|
calculateCommonData(scope: PBInsideFunctionScope, albedo: PBShaderExp, viewVec: PBShaderExp, TBN: PBShaderExp, data: PBShaderExp): void;
|
|
2836
3227
|
} & IMixinPBRCommon & IMixinLight & TextureMixinInstanceTypes<['specular']>;
|
|
2837
3228
|
/**
|
|
@@ -2885,10 +3276,26 @@ declare function mixinLambert<T extends typeof MeshMaterial>(BaseCls: T): T & (n
|
|
|
2885
3276
|
|
|
2886
3277
|
declare class RenderBundleWrapper {
|
|
2887
3278
|
private _renderBundles;
|
|
3279
|
+
private _disposed;
|
|
3280
|
+
private static _drawableContainer;
|
|
3281
|
+
private static _materialContainer;
|
|
3282
|
+
/** @internal */
|
|
3283
|
+
static addDrawable(drawable: Drawable, material: Material, wrapper: RenderBundleWrapper, hash: string): void;
|
|
3284
|
+
/** @internal */
|
|
3285
|
+
static drawableChanged(drawable: Drawable): void;
|
|
3286
|
+
/** @internal */
|
|
3287
|
+
static materialChanged(material: Material): void;
|
|
3288
|
+
/** @internal */
|
|
3289
|
+
static materialAttached(material: Material, drawable: Drawable): void;
|
|
3290
|
+
/** @internal */
|
|
3291
|
+
static materialDetached(material: Material, drawable: Drawable): void;
|
|
2888
3292
|
constructor();
|
|
3293
|
+
get disposed(): boolean;
|
|
2889
3294
|
getRenderBundle(hash: string): unknown;
|
|
2890
3295
|
beginRenderBundle(): void;
|
|
2891
3296
|
endRenderBundle(hash: string): void;
|
|
3297
|
+
invalidate(hash: string): void;
|
|
3298
|
+
dispose(): void;
|
|
2892
3299
|
}
|
|
2893
3300
|
|
|
2894
3301
|
/** @internal */
|
|
@@ -2955,6 +3362,7 @@ interface RenderItemList {
|
|
|
2955
3362
|
opaque: RenderItemListBundle;
|
|
2956
3363
|
transmission: RenderItemListBundle;
|
|
2957
3364
|
transparent: RenderItemListBundle;
|
|
3365
|
+
transmission_trans: RenderItemListBundle;
|
|
2958
3366
|
}
|
|
2959
3367
|
/**
|
|
2960
3368
|
* Render queue reference
|
|
@@ -3383,7 +3791,7 @@ declare class ShadowMapper {
|
|
|
3383
3791
|
/** @internal */
|
|
3384
3792
|
calcSplitDistances(nearPlane: number, farPlane: number, numCascades: number): number[];
|
|
3385
3793
|
/** @internal */
|
|
3386
|
-
protected calcDepthBiasParams(
|
|
3794
|
+
protected calcDepthBiasParams(camera: Camera, shadowMapSize: number, depthBias: number, normalBias: number, depthScale: number, result: Vector4): void;
|
|
3387
3795
|
/** @internal */
|
|
3388
3796
|
protected postRenderShadowMap(shadowMapParams: ShadowMapParams): void;
|
|
3389
3797
|
/** @internal */
|
|
@@ -3572,7 +3980,7 @@ declare class DirectionalLight extends PunctualLight {
|
|
|
3572
3980
|
*/
|
|
3573
3981
|
isDirectionLight(): this is DirectionalLight;
|
|
3574
3982
|
/** @internal */
|
|
3575
|
-
computeBoundingVolume(
|
|
3983
|
+
computeBoundingVolume(): BoundingVolume;
|
|
3576
3984
|
/** @internal */
|
|
3577
3985
|
computeUniforms(): void;
|
|
3578
3986
|
}
|
|
@@ -3603,7 +4011,7 @@ declare class PointLight extends PunctualLight {
|
|
|
3603
4011
|
*/
|
|
3604
4012
|
isPointLight(): this is PointLight;
|
|
3605
4013
|
/** @internal */
|
|
3606
|
-
computeBoundingVolume(
|
|
4014
|
+
computeBoundingVolume(): BoundingVolume;
|
|
3607
4015
|
/** @internal */
|
|
3608
4016
|
computeUniforms(): void;
|
|
3609
4017
|
}
|
|
@@ -3645,7 +4053,7 @@ declare class SpotLight extends PunctualLight {
|
|
|
3645
4053
|
*/
|
|
3646
4054
|
isSpotLight(): this is SpotLight;
|
|
3647
4055
|
/** @internal */
|
|
3648
|
-
computeBoundingVolume(
|
|
4056
|
+
computeBoundingVolume(): BoundingVolume;
|
|
3649
4057
|
/** @internal */
|
|
3650
4058
|
computeUniforms(): void;
|
|
3651
4059
|
}
|
|
@@ -3682,8 +4090,6 @@ declare class Mesh extends Mesh_base implements BatchDrawable {
|
|
|
3682
4090
|
/** @internal */
|
|
3683
4091
|
protected _boneMatrices: Texture2D;
|
|
3684
4092
|
/** @internal */
|
|
3685
|
-
protected _invBindMatrix: Matrix4x4;
|
|
3686
|
-
/** @internal */
|
|
3687
4093
|
protected _morphData: Texture2D;
|
|
3688
4094
|
/** @internal */
|
|
3689
4095
|
protected _morphInfo: GPUDataBuffer;
|
|
@@ -3692,6 +4098,8 @@ declare class Mesh extends Mesh_base implements BatchDrawable {
|
|
|
3692
4098
|
/** @internal */
|
|
3693
4099
|
protected _batchable: boolean;
|
|
3694
4100
|
/** @internal */
|
|
4101
|
+
protected _pickTarget: PickTarget;
|
|
4102
|
+
/** @internal */
|
|
3695
4103
|
protected _boundingBoxNode: Mesh;
|
|
3696
4104
|
/** @internal */
|
|
3697
4105
|
protected _instanceColor: Vector4;
|
|
@@ -3719,7 +4127,8 @@ declare class Mesh extends Mesh_base implements BatchDrawable {
|
|
|
3719
4127
|
/**
|
|
3720
4128
|
* {@inheritDoc Drawable.getPickTarget }
|
|
3721
4129
|
*/
|
|
3722
|
-
getPickTarget():
|
|
4130
|
+
getPickTarget(): PickTarget;
|
|
4131
|
+
setPickTarget(node: SceneNode, label?: string): void;
|
|
3723
4132
|
/** Wether the mesh node casts shadows */
|
|
3724
4133
|
get castShadow(): boolean;
|
|
3725
4134
|
set castShadow(b: boolean);
|
|
@@ -3735,7 +4144,7 @@ declare class Mesh extends Mesh_base implements BatchDrawable {
|
|
|
3735
4144
|
/**
|
|
3736
4145
|
* {@inheritDoc SceneNode.isMesh}
|
|
3737
4146
|
*/
|
|
3738
|
-
isMesh():
|
|
4147
|
+
isMesh(): this is Mesh;
|
|
3739
4148
|
/**
|
|
3740
4149
|
* Sets the bounding box for animation
|
|
3741
4150
|
* @param bbox - The bounding box for animation
|
|
@@ -3746,11 +4155,6 @@ declare class Mesh extends Mesh_base implements BatchDrawable {
|
|
|
3746
4155
|
* @param matrices - The texture that contains the bone matrices
|
|
3747
4156
|
*/
|
|
3748
4157
|
setBoneMatrices(matrices: Texture2D): void;
|
|
3749
|
-
/**
|
|
3750
|
-
* Sets the inverse bind matrix for skeletal animation
|
|
3751
|
-
* @param matrix - The matrix to set
|
|
3752
|
-
*/
|
|
3753
|
-
setInvBindMatrix(matrix: Matrix4x4): void;
|
|
3754
4158
|
/**
|
|
3755
4159
|
* Sets the texture that contains the morph target data
|
|
3756
4160
|
* @param data - The texture that contains the morph target data
|
|
@@ -3799,16 +4203,12 @@ declare class Mesh extends Mesh_base implements BatchDrawable {
|
|
|
3799
4203
|
* {@inheritDoc Drawable.getBoneMatrices}
|
|
3800
4204
|
*/
|
|
3801
4205
|
getBoneMatrices(): Texture2D;
|
|
3802
|
-
/**
|
|
3803
|
-
* {@inheritDoc Drawable.getInvBindMatrix}
|
|
3804
|
-
*/
|
|
3805
|
-
getInvBindMatrix(): Matrix4x4;
|
|
3806
4206
|
/**
|
|
3807
4207
|
* {@inheritDoc Drawable.getXForm}
|
|
3808
4208
|
*/
|
|
3809
4209
|
getXForm(): XForm;
|
|
3810
4210
|
/** @internal */
|
|
3811
|
-
computeBoundingVolume(
|
|
4211
|
+
computeBoundingVolume(): BoundingVolume;
|
|
3812
4212
|
/** @internal */
|
|
3813
4213
|
private _onBoundingboxChange;
|
|
3814
4214
|
/** @internal */
|
|
@@ -3827,6 +4227,7 @@ declare class BatchGroup extends GraphNode {
|
|
|
3827
4227
|
private _renderQueueMap;
|
|
3828
4228
|
private _bindGroupAllocator;
|
|
3829
4229
|
private _changeTag;
|
|
4230
|
+
private _staticBV;
|
|
3830
4231
|
/**
|
|
3831
4232
|
* Creates an instance of mesh node
|
|
3832
4233
|
* @param scene - The scene to which the mesh node belongs
|
|
@@ -3839,10 +4240,21 @@ declare class BatchGroup extends GraphNode {
|
|
|
3839
4240
|
/**
|
|
3840
4241
|
* {@inheritDoc SceneNode.isBatchGroup}
|
|
3841
4242
|
*/
|
|
3842
|
-
isBatchGroup():
|
|
4243
|
+
isBatchGroup(): this is BatchGroup;
|
|
4244
|
+
/**
|
|
4245
|
+
* Force the batch state to be rebuilt
|
|
4246
|
+
*/
|
|
4247
|
+
invalidate(): void;
|
|
4248
|
+
/** @internal */
|
|
4249
|
+
protected _detached(): void;
|
|
4250
|
+
/** @internal */
|
|
4251
|
+
protected _attached(): void;
|
|
4252
|
+
/** @internal */
|
|
4253
|
+
computeBoundingVolume(): BoundingVolume;
|
|
3843
4254
|
/** @internal */
|
|
3844
|
-
|
|
3845
|
-
|
|
4255
|
+
setBoundingVolume(bv: BoundingVolume): void;
|
|
4256
|
+
/** @internal */
|
|
4257
|
+
cull(cullVisitor: CullVisitor): void;
|
|
3846
4258
|
}
|
|
3847
4259
|
|
|
3848
4260
|
/** @internal */
|
|
@@ -3871,13 +4283,12 @@ declare class TerrainPatch extends TerrainPatch_base implements Drawable {
|
|
|
3871
4283
|
constructor(terrain: Terrain);
|
|
3872
4284
|
initialize(quadtree: Quadtree, parent: TerrainPatch, rowIndex: number, colIndex: number, baseVertices: Float32Array, normals: Vector3[], heightScale: number, elevations: Float32Array): boolean;
|
|
3873
4285
|
getInstanceColor(): Vector4;
|
|
3874
|
-
getPickTarget():
|
|
4286
|
+
getPickTarget(): PickTarget;
|
|
3875
4287
|
getMaterial(): MeshMaterial;
|
|
3876
4288
|
draw(ctx: DrawContext): void;
|
|
3877
4289
|
setupCamera(viewportH: number, tanHalfFovy: number, maxPixelError: number): void;
|
|
3878
4290
|
getName(): string;
|
|
3879
4291
|
getBoneMatrices(): Texture2D<unknown>;
|
|
3880
|
-
getInvBindMatrix(): Matrix4x4;
|
|
3881
4292
|
getMorphData(): Texture2D;
|
|
3882
4293
|
getMorphInfo(): GPUDataBuffer;
|
|
3883
4294
|
getSortDistance(camera: Camera): number;
|
|
@@ -3911,7 +4322,6 @@ declare class TerrainPatch extends TerrainPatch_base implements Drawable {
|
|
|
3911
4322
|
/** @internal */
|
|
3912
4323
|
interface HeightfieldBBoxTreeNode {
|
|
3913
4324
|
bbox: BoundingBox;
|
|
3914
|
-
h: number[];
|
|
3915
4325
|
rc: {
|
|
3916
4326
|
x: number;
|
|
3917
4327
|
y: number;
|
|
@@ -3941,7 +4351,8 @@ declare class HeightfieldBBoxTree {
|
|
|
3941
4351
|
computeNodeBoundingBox(node: HeightfieldBBoxTreeNode, bbox: BoundingBox, vertices: Vector4[]): void;
|
|
3942
4352
|
createChildNode(node: HeightfieldBBoxTreeNode, x: number, y: number, w: number, h: number, vertices: Vector4[]): boolean;
|
|
3943
4353
|
rayIntersect(ray: Ray): number | null;
|
|
3944
|
-
|
|
4354
|
+
rayIntersectLeaf(ray: Ray, node: HeightfieldBBoxTreeNode): number | null;
|
|
4355
|
+
rayIntersectRecursive(ray: Ray): number | null;
|
|
3945
4356
|
}
|
|
3946
4357
|
/** @internal */
|
|
3947
4358
|
declare class HeightField {
|
|
@@ -3977,15 +4388,15 @@ declare class HeightField {
|
|
|
3977
4388
|
* Visior
|
|
3978
4389
|
* @public
|
|
3979
4390
|
*/
|
|
3980
|
-
interface Visitor {
|
|
3981
|
-
visit(target:
|
|
4391
|
+
interface Visitor<T> {
|
|
4392
|
+
visit(target: T): unknown;
|
|
3982
4393
|
}
|
|
3983
4394
|
|
|
3984
4395
|
/**
|
|
3985
4396
|
* Node visitor for culling
|
|
3986
4397
|
* @public
|
|
3987
4398
|
*/
|
|
3988
|
-
declare class CullVisitor implements Visitor {
|
|
4399
|
+
declare class CullVisitor implements Visitor<SceneNode | OctreeNode> {
|
|
3989
4400
|
/** @internal */
|
|
3990
4401
|
private _primaryCamera;
|
|
3991
4402
|
/** @internal */
|
|
@@ -4045,7 +4456,7 @@ declare class CullVisitor implements Visitor {
|
|
|
4045
4456
|
}
|
|
4046
4457
|
|
|
4047
4458
|
declare class GrassClusterBase {
|
|
4048
|
-
protected _terrain:
|
|
4459
|
+
protected _terrain: Terrain;
|
|
4049
4460
|
constructor(terrain: Terrain);
|
|
4050
4461
|
getXForm(): XForm<XForm<any>>;
|
|
4051
4462
|
}
|
|
@@ -4060,9 +4471,8 @@ declare class GrassCluster extends GrassCluster_base implements Drawable {
|
|
|
4060
4471
|
getName(): string;
|
|
4061
4472
|
getMaterial(): MeshMaterial;
|
|
4062
4473
|
getInstanceColor(): Vector4;
|
|
4063
|
-
getPickTarget():
|
|
4474
|
+
getPickTarget(): PickTarget;
|
|
4064
4475
|
getBoneMatrices(): Texture2D<unknown>;
|
|
4065
|
-
getInvBindMatrix(): Matrix4x4;
|
|
4066
4476
|
getMorphData(): Texture2D;
|
|
4067
4477
|
getMorphInfo(): GPUDataBuffer;
|
|
4068
4478
|
getSortDistance(camera: Camera): number;
|
|
@@ -4166,336 +4576,96 @@ declare class Terrain extends GraphNode {
|
|
|
4166
4576
|
/** @internal */
|
|
4167
4577
|
private _wireframe;
|
|
4168
4578
|
/** @internal */
|
|
4169
|
-
private _viewPoint;
|
|
4170
|
-
/** @internal */
|
|
4171
|
-
private _castShadow;
|
|
4172
|
-
/** @internal */
|
|
4173
|
-
private _instanceColor;
|
|
4174
|
-
/**
|
|
4175
|
-
* Creates an instance of Terrain
|
|
4176
|
-
* @param scene - The scene to which the terrain belongs
|
|
4177
|
-
*/
|
|
4178
|
-
constructor(scene: Scene);
|
|
4179
|
-
/** @internal */
|
|
4180
|
-
get quadtree(): Quadtree;
|
|
4181
|
-
/**
|
|
4182
|
-
* {@inheritDoc Drawable.getName}
|
|
4183
|
-
*/
|
|
4184
|
-
getName(): string;
|
|
4185
|
-
/**
|
|
4186
|
-
* {@inheritDoc Drawable.getInstanceColor}
|
|
4187
|
-
*/
|
|
4188
|
-
getInstanceColor(): Vector4;
|
|
4189
|
-
/** Wether the mesh node casts shadows */
|
|
4190
|
-
get castShadow(): boolean;
|
|
4191
|
-
set castShadow(val: boolean);
|
|
4192
|
-
/** The maximum pixel error for terrain LOD */
|
|
4193
|
-
get maxPixelError(): number;
|
|
4194
|
-
set maxPixelError(val: number);
|
|
4195
|
-
/** Camera that will be used to compute LOD level of terrain patches */
|
|
4196
|
-
get LODCamera(): Camera;
|
|
4197
|
-
set LODCamera(camera: Camera);
|
|
4198
|
-
/** Scaled terrain width */
|
|
4199
|
-
get scaledWidth(): number;
|
|
4200
|
-
/** Scaled terrain height */
|
|
4201
|
-
get scaledHeight(): number;
|
|
4202
|
-
/** Scale value of the height field */
|
|
4203
|
-
get heightFieldScale(): Vector3;
|
|
4204
|
-
/** @internal */
|
|
4205
|
-
get patchSize(): number;
|
|
4206
|
-
/** Width of the terrain */
|
|
4207
|
-
get width(): number;
|
|
4208
|
-
/** Height of the terrain */
|
|
4209
|
-
get height(): number;
|
|
4210
|
-
/** Material of the terrain */
|
|
4211
|
-
get material(): TerrainMaterial;
|
|
4212
|
-
/** Grass material */
|
|
4213
|
-
get grassMaterial(): GrassMaterial;
|
|
4214
|
-
/** Whether the terrain should be rendered in wireframe mode */
|
|
4215
|
-
get wireframe(): boolean;
|
|
4216
|
-
set wireframe(b: boolean);
|
|
4217
|
-
/** Normal map of the terrain */
|
|
4218
|
-
get normalMap(): Texture2D;
|
|
4219
|
-
/**
|
|
4220
|
-
* Creates the terrain
|
|
4221
|
-
*
|
|
4222
|
-
* @param sizeX - Terrain size in X axis
|
|
4223
|
-
* @param sizeZ - Terrain size in Z axis
|
|
4224
|
-
* @param elevations - Elevation data of the terrain
|
|
4225
|
-
* @param scale - Scale of the terrain
|
|
4226
|
-
* @param patchSize - Patch size of the terrain
|
|
4227
|
-
* @returns true if succeeded
|
|
4228
|
-
*/
|
|
4229
|
-
create(sizeX: number, sizeZ: number, elevations: Float32Array, scale: Vector3, patchSize: number, options?: TerrainMaterialOptions): boolean;
|
|
4230
|
-
/**
|
|
4231
|
-
* Create grass fields
|
|
4232
|
-
* @param maxGrassPerCell - Maximum number of grasses in a cell (world space 1x1)
|
|
4233
|
-
* @param density - The density map
|
|
4234
|
-
*/
|
|
4235
|
-
createGrass(density: number[][], bladeWidth: number, bladeHeight: number, offset: number, grassTexture: Texture2D): void;
|
|
4236
|
-
/** Get elevation at specified position in terrain coordinate space */
|
|
4237
|
-
getElevation(x: number, z: number): number;
|
|
4238
|
-
/** Get normal at specified position in terrain coordinate space */
|
|
4239
|
-
getNormal(x: number, z: number, normal?: Vector3): Vector3;
|
|
4240
|
-
/** Get intersection distance by a ray in terrain coordinate space */
|
|
4241
|
-
rayIntersect(ray: Ray): number | null;
|
|
4242
|
-
/**
|
|
4243
|
-
* {@inheritDoc SceneNode.computeBoundingVolume}
|
|
4244
|
-
* @override
|
|
4245
|
-
*/
|
|
4246
|
-
computeBoundingVolume(bv: BoundingVolume): BoundingVolume;
|
|
4247
|
-
/**
|
|
4248
|
-
* Traverse quadtree node top down
|
|
4249
|
-
* @param callback - the callback function
|
|
4250
|
-
*/
|
|
4251
|
-
traverseQuadtree(callback: (node: QuadtreeNode) => void): void;
|
|
4252
|
-
/** @internal */
|
|
4253
|
-
cull(cullVisitor: CullVisitor): number;
|
|
4254
|
-
/**
|
|
4255
|
-
* {@inheritDoc SceneNode.isTerrain}
|
|
4256
|
-
* @override
|
|
4257
|
-
*/
|
|
4258
|
-
isTerrain(): this is Terrain;
|
|
4259
|
-
}
|
|
4260
|
-
|
|
4261
|
-
/**
|
|
4262
|
-
* Camera pick result
|
|
4263
|
-
* @public
|
|
4264
|
-
*/
|
|
4265
|
-
type PickResult = {
|
|
4266
|
-
drawable: Drawable;
|
|
4267
|
-
node: GraphNode;
|
|
4268
|
-
};
|
|
4269
|
-
/**
|
|
4270
|
-
* The camera node class
|
|
4271
|
-
* @public
|
|
4272
|
-
*/
|
|
4273
|
-
declare class Camera extends SceneNode {
|
|
4274
|
-
/** @internal */
|
|
4275
|
-
protected _projMatrix: Matrix4x4;
|
|
4276
|
-
/** @internal */
|
|
4277
|
-
protected _viewMatrix: Matrix4x4;
|
|
4278
|
-
/** @internal */
|
|
4279
|
-
protected _viewProjMatrix: Matrix4x4;
|
|
4280
|
-
/** @internal */
|
|
4281
|
-
protected _rotationMatrix: Matrix4x4;
|
|
4282
|
-
/** @internal */
|
|
4283
|
-
protected _invViewProjMatrix: Matrix4x4;
|
|
4284
|
-
/** @internal */
|
|
4285
|
-
protected _clipPlane: Plane;
|
|
4286
|
-
/** @internal */
|
|
4287
|
-
protected _controller: BaseCameraController;
|
|
4288
|
-
/** @internal */
|
|
4289
|
-
protected _frustum: Frustum;
|
|
4290
|
-
/** @internal */
|
|
4291
|
-
protected _frustumV: Frustum;
|
|
4292
|
-
/** @internal */
|
|
4293
|
-
protected _dirty: boolean;
|
|
4294
|
-
/** @internal */
|
|
4295
|
-
protected _sampleCount: number;
|
|
4296
|
-
/** @internal */
|
|
4297
|
-
protected _framebuffer: FrameBuffer;
|
|
4298
|
-
/** @internal */
|
|
4299
|
-
protected _viewport: number[];
|
|
4300
|
-
/** @internal */
|
|
4301
|
-
protected _scissor: number[];
|
|
4302
|
-
/** @internal */
|
|
4303
|
-
protected _clearColor: Vector4;
|
|
4304
|
-
/** @internal */
|
|
4305
|
-
protected _clipMask: number;
|
|
4306
|
-
/** @internal */
|
|
4307
|
-
protected _oit: OIT;
|
|
4308
|
-
/** @internal */
|
|
4309
|
-
protected _depthPrePass: boolean;
|
|
4310
|
-
/** @internal */
|
|
4311
|
-
protected _commandBufferReuse: boolean;
|
|
4312
|
-
/** @internal */
|
|
4313
|
-
protected _picking: boolean;
|
|
4314
|
-
/** @internal */
|
|
4315
|
-
protected _pickPosX: number;
|
|
4316
|
-
/** @internal */
|
|
4317
|
-
protected _pickPosY: number;
|
|
4318
|
-
/** @internal */
|
|
4319
|
-
protected _pickResultPromise: Promise<PickResult>;
|
|
4320
|
-
/** @internal */
|
|
4321
|
-
protected _pickResult: PickResult;
|
|
4322
|
-
/**
|
|
4323
|
-
* Creates a new camera node
|
|
4324
|
-
*
|
|
4325
|
-
* @param scene - The scene that the camera belongs to
|
|
4326
|
-
* @param projectionMatrix - Projection matrix for this camera
|
|
4327
|
-
*/
|
|
4328
|
-
constructor(scene: Scene, projectionMatrix?: Matrix4x4);
|
|
4329
|
-
/** Clip plane in camera space */
|
|
4330
|
-
get clipPlane(): Plane;
|
|
4331
|
-
set clipPlane(plane: Plane);
|
|
4332
|
-
/** Whether to perform a depth pass */
|
|
4333
|
-
get depthPrePass(): boolean;
|
|
4334
|
-
set depthPrePass(val: boolean);
|
|
4335
|
-
/** Whether to allow command buffer reuse optimization */
|
|
4336
|
-
get commandBufferReuse(): boolean;
|
|
4337
|
-
set commandBufferReuse(val: boolean);
|
|
4338
|
-
/** Whether GPU picking is enabled for this camera */
|
|
4339
|
-
get enablePicking(): boolean;
|
|
4340
|
-
set enablePicking(enable: boolean);
|
|
4341
|
-
/** X coordinate for picking related to viewport */
|
|
4342
|
-
get pickPosX(): number;
|
|
4343
|
-
set pickPosX(val: number);
|
|
4344
|
-
/** Y coordinate for picking related to viewport */
|
|
4345
|
-
get pickPosY(): number;
|
|
4346
|
-
set pickPosY(val: number);
|
|
4347
|
-
/** Pick result */
|
|
4348
|
-
get pickResult(): PickResult;
|
|
4349
|
-
set pickResult(val: PickResult);
|
|
4579
|
+
private _viewPoint;
|
|
4350
4580
|
/** @internal */
|
|
4351
|
-
|
|
4352
|
-
|
|
4353
|
-
|
|
4354
|
-
* Sample count for MSAA
|
|
4355
|
-
*
|
|
4356
|
-
* @remarks
|
|
4357
|
-
* If greater than one, force the scene to be rendered using multisampled framebuffer
|
|
4358
|
-
*/
|
|
4359
|
-
get sampleCount(): number;
|
|
4360
|
-
set sampleCount(val: number);
|
|
4361
|
-
/** OIT */
|
|
4362
|
-
get oit(): OIT;
|
|
4363
|
-
set oit(val: OIT);
|
|
4364
|
-
/** Clip plane mask */
|
|
4365
|
-
get clipMask(): number;
|
|
4366
|
-
set clipMask(val: number);
|
|
4367
|
-
/** Framebuffer object into which the scene will be rendered */
|
|
4368
|
-
get framebuffer(): FrameBuffer;
|
|
4369
|
-
set framebuffer(fb: FrameBuffer);
|
|
4370
|
-
/** Viewport used for rendering, if null, use full framebuffer size */
|
|
4371
|
-
get viewport(): number[];
|
|
4372
|
-
set viewport(rect: number[]);
|
|
4373
|
-
/** Scissor rectangle used for rendering, if null, use viewport value */
|
|
4374
|
-
get scissor(): number[];
|
|
4375
|
-
set scissor(rect: number[]);
|
|
4376
|
-
/** Color value used to clear color buffer before rendering, if null, color buffer will not be cleared */
|
|
4377
|
-
get clearColor(): Vector4;
|
|
4378
|
-
set clearColor(val: Vector4);
|
|
4379
|
-
/**
|
|
4380
|
-
* Handle input events
|
|
4381
|
-
* @param ev - input event object
|
|
4382
|
-
* @param type - event type, default to ev.type
|
|
4383
|
-
* @returns Boolean value indicates whether the event was handled.
|
|
4384
|
-
*/
|
|
4385
|
-
handleEvent(ev: Event, type?: string): boolean;
|
|
4386
|
-
/**
|
|
4387
|
-
* Constructs a ray based on the given screen coordinates.
|
|
4388
|
-
*
|
|
4389
|
-
* @param x - The x-component of the screen coordinates, relative to the top-left corner of the viewport.
|
|
4390
|
-
* @param y - The y-component of the screen coordinates, relative to the top-left corner of the viewport.
|
|
4391
|
-
* @returns The ray originating from the camera position and passing through the given screen coordinates.
|
|
4392
|
-
*/
|
|
4393
|
-
constructRay(x: number, y: number): Ray;
|
|
4394
|
-
/**
|
|
4395
|
-
* Place the camera by specifying the camera position and the target point
|
|
4396
|
-
* @param eye - The camera position
|
|
4397
|
-
* @param target - The target point to look at
|
|
4398
|
-
* @param up - The up vector
|
|
4399
|
-
* @returns self
|
|
4400
|
-
*/
|
|
4401
|
-
lookAt(eye: Vector3, target: Vector3, up: Vector3): this;
|
|
4402
|
-
/**
|
|
4403
|
-
* Place the camera to look at a given cube face at a given camera position
|
|
4404
|
-
* @param face - The cube face to look at
|
|
4405
|
-
* @param position - The camera position
|
|
4406
|
-
* @returns self
|
|
4407
|
-
*/
|
|
4408
|
-
lookAtCubeFace(face: CubeFace, position?: Vector3): this;
|
|
4409
|
-
/**
|
|
4410
|
-
* Setup a perspective projection matrix for the camera
|
|
4411
|
-
* @param fovY - The vertical field of view in radians.
|
|
4412
|
-
* @param aspect - The aspect ratio
|
|
4413
|
-
* @param zNear - The near clip plane
|
|
4414
|
-
* @param zFar - The far clip plane
|
|
4415
|
-
* @returns self
|
|
4416
|
-
*/
|
|
4417
|
-
setPerspective(fovY: number, aspect: number, zNear: number, zFar: number): this;
|
|
4581
|
+
private _castShadow;
|
|
4582
|
+
/** @internal */
|
|
4583
|
+
private _instanceColor;
|
|
4418
4584
|
/**
|
|
4419
|
-
*
|
|
4420
|
-
* @param
|
|
4421
|
-
* @param right - Right bound of the frustum
|
|
4422
|
-
* @param bottom - Bottom bound of the frustum
|
|
4423
|
-
* @param top - Top bound of the frustum
|
|
4424
|
-
* @param near - Near bound of the frustum.
|
|
4425
|
-
* @param far - Far bound of the frustum.
|
|
4426
|
-
* @returns self
|
|
4585
|
+
* Creates an instance of Terrain
|
|
4586
|
+
* @param scene - The scene to which the terrain belongs
|
|
4427
4587
|
*/
|
|
4428
|
-
|
|
4588
|
+
constructor(scene: Scene);
|
|
4589
|
+
/** @internal */
|
|
4590
|
+
get quadtree(): Quadtree;
|
|
4429
4591
|
/**
|
|
4430
|
-
*
|
|
4431
|
-
* @param matrix - The projection matrix
|
|
4592
|
+
* {@inheritDoc Drawable.getName}
|
|
4432
4593
|
*/
|
|
4433
|
-
|
|
4594
|
+
getName(): string;
|
|
4434
4595
|
/**
|
|
4435
|
-
*
|
|
4436
|
-
* @returns The projection matrix
|
|
4596
|
+
* {@inheritDoc Drawable.getInstanceColor}
|
|
4437
4597
|
*/
|
|
4438
|
-
|
|
4439
|
-
|
|
4598
|
+
getInstanceColor(): Vector4;
|
|
4599
|
+
/** Wether the mesh node casts shadows */
|
|
4600
|
+
get castShadow(): boolean;
|
|
4601
|
+
set castShadow(val: boolean);
|
|
4602
|
+
/** The maximum pixel error for terrain LOD */
|
|
4603
|
+
get maxPixelError(): number;
|
|
4604
|
+
set maxPixelError(val: number);
|
|
4605
|
+
/** Camera that will be used to compute LOD level of terrain patches */
|
|
4606
|
+
get LODCamera(): Camera;
|
|
4607
|
+
set LODCamera(camera: Camera);
|
|
4608
|
+
/** Scaled terrain width */
|
|
4609
|
+
get scaledWidth(): number;
|
|
4610
|
+
/** Scaled terrain height */
|
|
4611
|
+
get scaledHeight(): number;
|
|
4612
|
+
/** Scale value of the height field */
|
|
4613
|
+
get heightFieldScale(): Vector3;
|
|
4614
|
+
/** @internal */
|
|
4615
|
+
get patchSize(): number;
|
|
4616
|
+
/** Width of the terrain */
|
|
4617
|
+
get width(): number;
|
|
4618
|
+
/** Height of the terrain */
|
|
4619
|
+
get height(): number;
|
|
4620
|
+
/** Material of the terrain */
|
|
4621
|
+
get material(): TerrainMaterial;
|
|
4622
|
+
/** Grass material */
|
|
4623
|
+
get grassMaterial(): GrassMaterial;
|
|
4624
|
+
/** Whether the terrain should be rendered in wireframe mode */
|
|
4625
|
+
get wireframe(): boolean;
|
|
4626
|
+
set wireframe(b: boolean);
|
|
4627
|
+
/** Normal map of the terrain */
|
|
4628
|
+
get normalMap(): Texture2D;
|
|
4440
4629
|
/**
|
|
4441
|
-
*
|
|
4630
|
+
* Creates the terrain
|
|
4442
4631
|
*
|
|
4443
|
-
* @
|
|
4444
|
-
*
|
|
4632
|
+
* @param sizeX - Terrain size in X axis
|
|
4633
|
+
* @param sizeZ - Terrain size in Z axis
|
|
4634
|
+
* @param elevations - Elevation data of the terrain
|
|
4635
|
+
* @param scale - Scale of the terrain
|
|
4636
|
+
* @param patchSize - Patch size of the terrain
|
|
4637
|
+
* @returns true if succeeded
|
|
4445
4638
|
*/
|
|
4446
|
-
|
|
4447
|
-
get viewProjectionMatrix(): Matrix4x4;
|
|
4639
|
+
create(sizeX: number, sizeZ: number, elevations: Float32Array, scale: Vector3, patchSize: number, options?: TerrainMaterialOptions): boolean;
|
|
4448
4640
|
/**
|
|
4449
|
-
*
|
|
4450
|
-
*
|
|
4451
|
-
* @
|
|
4452
|
-
* The inverse-view-projection matrix transforms a point from the clip space to the camera space
|
|
4641
|
+
* Create grass fields
|
|
4642
|
+
* @param maxGrassPerCell - Maximum number of grasses in a cell (world space 1x1)
|
|
4643
|
+
* @param density - The density map
|
|
4453
4644
|
*/
|
|
4454
|
-
|
|
4455
|
-
/**
|
|
4456
|
-
|
|
4457
|
-
|
|
4458
|
-
|
|
4459
|
-
|
|
4460
|
-
|
|
4461
|
-
/** {@inheritDoc SceneNode.isCamera} */
|
|
4462
|
-
isCamera(): this is Camera;
|
|
4463
|
-
/** Gets the near clip plane of the camera */
|
|
4464
|
-
getNearPlane(): number;
|
|
4465
|
-
/** Gets the far clip plane of the camera */
|
|
4466
|
-
getFarPlane(): number;
|
|
4467
|
-
/** Gets the vertical field of view of the camera */
|
|
4468
|
-
getFOV(): number;
|
|
4469
|
-
/** Gets the tangent of half of the vertical field of view */
|
|
4470
|
-
getTanHalfFovy(): number;
|
|
4471
|
-
/** Gets the aspect ratio */
|
|
4472
|
-
getAspect(): number;
|
|
4645
|
+
createGrass(density: number[][], bladeWidth: number, bladeHeight: number, offset: number, grassTexture: Texture2D): void;
|
|
4646
|
+
/** Get elevation at specified position in terrain coordinate space */
|
|
4647
|
+
getElevation(x: number, z: number): number;
|
|
4648
|
+
/** Get normal at specified position in terrain coordinate space */
|
|
4649
|
+
getNormal(x: number, z: number, normal?: Vector3): Vector3;
|
|
4650
|
+
/** Get intersection distance by a ray in terrain coordinate space */
|
|
4651
|
+
rayIntersect(ray: Ray): number | null;
|
|
4473
4652
|
/**
|
|
4474
|
-
*
|
|
4475
|
-
* @
|
|
4476
|
-
* @param compositor - Compositor instance that will be used to apply postprocess effects
|
|
4653
|
+
* {@inheritDoc SceneNode.computeBoundingVolume}
|
|
4654
|
+
* @override
|
|
4477
4655
|
*/
|
|
4478
|
-
|
|
4656
|
+
computeBoundingVolume(): BoundingVolume;
|
|
4479
4657
|
/**
|
|
4480
|
-
*
|
|
4658
|
+
* Traverse quadtree node top down
|
|
4659
|
+
* @param callback - the callback function
|
|
4481
4660
|
*/
|
|
4482
|
-
|
|
4661
|
+
traverseQuadtree(callback: (node: QuadtreeNode) => void): void;
|
|
4662
|
+
/** @internal */
|
|
4663
|
+
cull(cullVisitor: CullVisitor): number;
|
|
4483
4664
|
/**
|
|
4484
|
-
*
|
|
4665
|
+
* {@inheritDoc SceneNode.isTerrain}
|
|
4666
|
+
* @override
|
|
4485
4667
|
*/
|
|
4486
|
-
|
|
4487
|
-
/** @internal */
|
|
4488
|
-
private setController;
|
|
4489
|
-
/** @internal */
|
|
4490
|
-
protected _invalidate(projectMatrixChanged: boolean): void;
|
|
4491
|
-
/** @internal */
|
|
4492
|
-
protected _compute(): void;
|
|
4493
|
-
/** @internal */
|
|
4494
|
-
protected _computeProj(): void;
|
|
4495
|
-
/** @internal */
|
|
4496
|
-
protected _onTransformChanged(invalidateLocal: boolean): void;
|
|
4497
|
-
/** {@inheritdoc SceneNode.dispose} */
|
|
4498
|
-
dispose(): void;
|
|
4668
|
+
isTerrain(): this is Terrain;
|
|
4499
4669
|
}
|
|
4500
4670
|
|
|
4501
4671
|
/**
|
|
@@ -4531,10 +4701,6 @@ declare class GraphNode extends SceneNode {
|
|
|
4531
4701
|
* {@inheritDoc Drawable.getBoneMatrices}
|
|
4532
4702
|
*/
|
|
4533
4703
|
getBoneMatrices(): Texture2D;
|
|
4534
|
-
/**
|
|
4535
|
-
* {@inheritDoc Drawable.getInvBindMatrix}
|
|
4536
|
-
*/
|
|
4537
|
-
getInvBindMatrix(): Matrix4x4;
|
|
4538
4704
|
/**
|
|
4539
4705
|
* {@inheritDoc Drawable.getSortDistance}
|
|
4540
4706
|
*/
|
|
@@ -4682,7 +4848,7 @@ declare class OctreeNode {
|
|
|
4682
4848
|
* Traverse this node by a visitor
|
|
4683
4849
|
* @param v - The visitor
|
|
4684
4850
|
*/
|
|
4685
|
-
traverse(v: Visitor): void;
|
|
4851
|
+
traverse(v: Visitor<OctreeNode>): void;
|
|
4686
4852
|
}
|
|
4687
4853
|
/**
|
|
4688
4854
|
* Octree node chunk
|
|
@@ -5178,7 +5344,6 @@ declare class AssetHierarchyNode extends NamedObject {
|
|
|
5178
5344
|
private _mesh;
|
|
5179
5345
|
private _skeleton;
|
|
5180
5346
|
private _attachToSkeleton;
|
|
5181
|
-
private _attachIndex;
|
|
5182
5347
|
private _meshAttached;
|
|
5183
5348
|
private _matrix;
|
|
5184
5349
|
private _worldMatrix;
|
|
@@ -5226,9 +5391,7 @@ declare class AssetHierarchyNode extends NamedObject {
|
|
|
5226
5391
|
/** Children of the node */
|
|
5227
5392
|
get children(): AssetHierarchyNode[];
|
|
5228
5393
|
/** The skeleton to which the node belongs if this is a joint node */
|
|
5229
|
-
get skeletonAttached(): AssetSkeleton
|
|
5230
|
-
/** The joint index if this is a joint node */
|
|
5231
|
-
get attachIndex(): number;
|
|
5394
|
+
get skeletonAttached(): Set<AssetSkeleton>;
|
|
5232
5395
|
/** @internal */
|
|
5233
5396
|
computeTransforms(parentTransform: Matrix4x4): void;
|
|
5234
5397
|
/**
|
|
@@ -5652,9 +5815,9 @@ declare class Skeleton {
|
|
|
5652
5815
|
*/
|
|
5653
5816
|
get jointTexture(): Texture2D;
|
|
5654
5817
|
/** @internal */
|
|
5655
|
-
updateJointMatrices(jointTransforms?: Matrix4x4[]): void;
|
|
5818
|
+
updateJointMatrices(jointTransforms?: Matrix4x4[], worldMatrix?: Matrix4x4): void;
|
|
5656
5819
|
/** @internal */
|
|
5657
|
-
computeBindPose(): void;
|
|
5820
|
+
computeBindPose(model: SceneNode): void;
|
|
5658
5821
|
/** @internal */
|
|
5659
5822
|
computeJoints(): void;
|
|
5660
5823
|
/** @internal */
|
|
@@ -5970,7 +6133,7 @@ declare class Scene extends Scene_base {
|
|
|
5970
6133
|
* @returns The closest object hit by the ray
|
|
5971
6134
|
*/
|
|
5972
6135
|
raycast(ray: Ray, length?: number): {
|
|
5973
|
-
|
|
6136
|
+
target: PickTarget;
|
|
5974
6137
|
dist: number;
|
|
5975
6138
|
point: Vector3;
|
|
5976
6139
|
};
|
|
@@ -5995,13 +6158,6 @@ declare class Scene extends Scene_base {
|
|
|
5995
6158
|
updateNodePlacement(octree: Octree, list: Set<GraphNode>): void;
|
|
5996
6159
|
}
|
|
5997
6160
|
|
|
5998
|
-
/**
|
|
5999
|
-
* Base interface for all scene node visitors
|
|
6000
|
-
* @public
|
|
6001
|
-
*/
|
|
6002
|
-
interface SceneNodeVisitor {
|
|
6003
|
-
visit(target: SceneNode): unknown;
|
|
6004
|
-
}
|
|
6005
6161
|
/**
|
|
6006
6162
|
* Scene node visible state
|
|
6007
6163
|
* @public
|
|
@@ -6087,7 +6243,7 @@ declare class SceneNode extends XForm<SceneNode> {
|
|
|
6087
6243
|
* @param v - The visitor that will travel the subtree of this node
|
|
6088
6244
|
* @param inverse - true if traversing from bottom to top, otherwise top to bottom
|
|
6089
6245
|
*/
|
|
6090
|
-
traverse(v:
|
|
6246
|
+
traverse(v: Visitor<SceneNode>, inverse?: boolean): void;
|
|
6091
6247
|
/**
|
|
6092
6248
|
* Iterate self and all of the children
|
|
6093
6249
|
*
|
|
@@ -6115,10 +6271,9 @@ declare class SceneNode extends XForm<SceneNode> {
|
|
|
6115
6271
|
dispose(): void;
|
|
6116
6272
|
/**
|
|
6117
6273
|
* Computes the bounding volume of the node
|
|
6118
|
-
* @param bv - The output bounding volume
|
|
6119
6274
|
* @returns The output bounding volume
|
|
6120
6275
|
*/
|
|
6121
|
-
computeBoundingVolume(
|
|
6276
|
+
computeBoundingVolume(): BoundingVolume;
|
|
6122
6277
|
/**
|
|
6123
6278
|
* Gets the bounding volume of the node
|
|
6124
6279
|
* @returns The bounding volume of the node
|
|
@@ -6182,37 +6337,42 @@ declare const XForm_base: (new (...args: any[]) => {
|
|
|
6182
6337
|
noderemoved: SceneNode;
|
|
6183
6338
|
visiblechanged: SceneNode;
|
|
6184
6339
|
transformchanged: SceneNode;
|
|
6340
|
+
bvchanged: SceneNode;
|
|
6185
6341
|
}, any>;
|
|
6186
6342
|
options: _zephyr3d_base.REventHandlerOptions;
|
|
6187
6343
|
removed: boolean;
|
|
6188
6344
|
}[];
|
|
6189
6345
|
}>;
|
|
6190
|
-
on<K extends "
|
|
6346
|
+
on<K extends "nodeattached" | "noderemoved" | "visiblechanged" | "transformchanged" | "bvchanged">(type: K, listener: _zephyr3d_base.EventListener<{
|
|
6191
6347
|
nodeattached: SceneNode;
|
|
6192
6348
|
noderemoved: SceneNode;
|
|
6193
6349
|
visiblechanged: SceneNode;
|
|
6194
6350
|
transformchanged: SceneNode;
|
|
6351
|
+
bvchanged: SceneNode;
|
|
6195
6352
|
}, K>, context?: unknown): void;
|
|
6196
|
-
once<K_1 extends "
|
|
6353
|
+
once<K_1 extends "nodeattached" | "noderemoved" | "visiblechanged" | "transformchanged" | "bvchanged">(type: K_1, listener: _zephyr3d_base.EventListener<{
|
|
6197
6354
|
nodeattached: SceneNode;
|
|
6198
6355
|
noderemoved: SceneNode;
|
|
6199
6356
|
visiblechanged: SceneNode;
|
|
6200
6357
|
transformchanged: SceneNode;
|
|
6358
|
+
bvchanged: SceneNode;
|
|
6201
6359
|
}, K_1>, context?: unknown): void;
|
|
6202
|
-
off<K_2 extends "
|
|
6360
|
+
off<K_2 extends "nodeattached" | "noderemoved" | "visiblechanged" | "transformchanged" | "bvchanged">(type: K_2, listener: _zephyr3d_base.EventListener<{
|
|
6203
6361
|
nodeattached: SceneNode;
|
|
6204
6362
|
noderemoved: SceneNode;
|
|
6205
6363
|
visiblechanged: SceneNode;
|
|
6206
6364
|
transformchanged: SceneNode;
|
|
6365
|
+
bvchanged: SceneNode;
|
|
6207
6366
|
}, K_2>): void;
|
|
6208
|
-
dispatchEvent(evt: SceneNode, type?: "
|
|
6209
|
-
_internalAddEventListener<K_3 extends "
|
|
6367
|
+
dispatchEvent(evt: SceneNode, type?: "nodeattached" | "noderemoved" | "visiblechanged" | "transformchanged" | "bvchanged"): void;
|
|
6368
|
+
_internalAddEventListener<K_3 extends "nodeattached" | "noderemoved" | "visiblechanged" | "transformchanged" | "bvchanged">(listenerMap: Partial<{
|
|
6210
6369
|
[type: string]: {
|
|
6211
6370
|
handler: _zephyr3d_base.EventListener<{
|
|
6212
6371
|
nodeattached: SceneNode;
|
|
6213
6372
|
noderemoved: SceneNode;
|
|
6214
6373
|
visiblechanged: SceneNode;
|
|
6215
6374
|
transformchanged: SceneNode;
|
|
6375
|
+
bvchanged: SceneNode;
|
|
6216
6376
|
}, any>;
|
|
6217
6377
|
options: _zephyr3d_base.REventHandlerOptions;
|
|
6218
6378
|
removed: boolean;
|
|
@@ -6222,6 +6382,7 @@ declare const XForm_base: (new (...args: any[]) => {
|
|
|
6222
6382
|
noderemoved: SceneNode;
|
|
6223
6383
|
visiblechanged: SceneNode;
|
|
6224
6384
|
transformchanged: SceneNode;
|
|
6385
|
+
bvchanged: SceneNode;
|
|
6225
6386
|
}, K_3>, options?: _zephyr3d_base.REventHandlerOptions): Partial<{
|
|
6226
6387
|
[type: string]: {
|
|
6227
6388
|
handler: _zephyr3d_base.EventListener<{
|
|
@@ -6229,18 +6390,20 @@ declare const XForm_base: (new (...args: any[]) => {
|
|
|
6229
6390
|
noderemoved: SceneNode;
|
|
6230
6391
|
visiblechanged: SceneNode;
|
|
6231
6392
|
transformchanged: SceneNode;
|
|
6393
|
+
bvchanged: SceneNode;
|
|
6232
6394
|
}, any>;
|
|
6233
6395
|
options: _zephyr3d_base.REventHandlerOptions;
|
|
6234
6396
|
removed: boolean;
|
|
6235
6397
|
}[];
|
|
6236
6398
|
}>;
|
|
6237
|
-
_internalRemoveEventListener<K_4 extends "
|
|
6399
|
+
_internalRemoveEventListener<K_4 extends "nodeattached" | "noderemoved" | "visiblechanged" | "transformchanged" | "bvchanged">(listenerMap: Partial<{
|
|
6238
6400
|
[type: string]: {
|
|
6239
6401
|
handler: _zephyr3d_base.EventListener<{
|
|
6240
6402
|
nodeattached: SceneNode;
|
|
6241
6403
|
noderemoved: SceneNode;
|
|
6242
6404
|
visiblechanged: SceneNode;
|
|
6243
6405
|
transformchanged: SceneNode;
|
|
6406
|
+
bvchanged: SceneNode;
|
|
6244
6407
|
}, any>;
|
|
6245
6408
|
options: _zephyr3d_base.REventHandlerOptions;
|
|
6246
6409
|
removed: boolean;
|
|
@@ -6250,6 +6413,7 @@ declare const XForm_base: (new (...args: any[]) => {
|
|
|
6250
6413
|
noderemoved: SceneNode;
|
|
6251
6414
|
visiblechanged: SceneNode;
|
|
6252
6415
|
transformchanged: SceneNode;
|
|
6416
|
+
bvchanged: SceneNode;
|
|
6253
6417
|
}, K_4>): void;
|
|
6254
6418
|
_invokeLocalListeners(evt: SceneNode, type?: string): void;
|
|
6255
6419
|
}) & ObjectConstructor;
|
|
@@ -6389,7 +6553,7 @@ declare class XForm<T extends XForm<T> = XForm<any>> extends XForm_base {
|
|
|
6389
6553
|
*/
|
|
6390
6554
|
reparent(p?: T): this;
|
|
6391
6555
|
/** @internal */
|
|
6392
|
-
|
|
6556
|
+
get transformTag(): number;
|
|
6393
6557
|
/** @internal */
|
|
6394
6558
|
private syncTRS;
|
|
6395
6559
|
/** @internal */
|
|
@@ -6464,7 +6628,7 @@ declare abstract class Blitter {
|
|
|
6464
6628
|
* @param srcLayer - The layer of the source texture
|
|
6465
6629
|
* @returns The read texel
|
|
6466
6630
|
*/
|
|
6467
|
-
readTexel(scope: PBInsideFunctionScope, type: BlitType, srcTex: PBShaderExp, uv: PBShaderExp, srcLayer: PBShaderExp, sampleType: 'float' | 'int' | 'uint'): PBShaderExp;
|
|
6631
|
+
readTexel(scope: PBInsideFunctionScope, type: BlitType, srcTex: PBShaderExp, uv: PBShaderExp, srcLayer: PBShaderExp, sampleType: 'float' | 'int' | 'uint' | 'depth'): PBShaderExp;
|
|
6468
6632
|
/**
|
|
6469
6633
|
* Writes a texel to destination texture
|
|
6470
6634
|
* @param scope - The shader scope
|
|
@@ -6494,7 +6658,7 @@ declare abstract class Blitter {
|
|
|
6494
6658
|
* @param srcLayer - The layer of the source texture
|
|
6495
6659
|
* @returns the destination texel
|
|
6496
6660
|
*/
|
|
6497
|
-
abstract filter(scope: PBInsideFunctionScope, type: BlitType, srcTex: PBShaderExp, srcUV: PBShaderExp, srcLayer: PBShaderExp, sampeType: 'float' | 'int' | 'uint'): PBShaderExp;
|
|
6661
|
+
abstract filter(scope: PBInsideFunctionScope, type: BlitType, srcTex: PBShaderExp, srcUV: PBShaderExp, srcLayer: PBShaderExp, sampeType: 'float' | 'int' | 'uint' | 'depth'): PBShaderExp;
|
|
6498
6662
|
/**
|
|
6499
6663
|
* Calculates the hash code
|
|
6500
6664
|
* @returns the calculated hash code
|
|
@@ -6559,6 +6723,7 @@ declare abstract class Blitter {
|
|
|
6559
6723
|
* @param sampler - Sampler for source texture
|
|
6560
6724
|
*/
|
|
6561
6725
|
blit(source: TextureCube, dest: Texture2D | FrameBuffer, face: number, sampler?: TextureSampler): void;
|
|
6726
|
+
blit(source: BaseTexture, dest: BaseTexture | FrameBuffer, layer?: number | TextureSampler, sampler?: TextureSampler): void;
|
|
6562
6727
|
}
|
|
6563
6728
|
|
|
6564
6729
|
/**
|
|
@@ -6924,6 +7089,14 @@ declare class GlobalBindGroupAllocator {
|
|
|
6924
7089
|
getGlobalBindGroup(ctx: DrawContext): BindGroup;
|
|
6925
7090
|
}
|
|
6926
7091
|
|
|
7092
|
+
/**
|
|
7093
|
+
* Pick target
|
|
7094
|
+
* @public
|
|
7095
|
+
*/
|
|
7096
|
+
type PickTarget = {
|
|
7097
|
+
node: SceneNode;
|
|
7098
|
+
label?: string;
|
|
7099
|
+
};
|
|
6927
7100
|
/**
|
|
6928
7101
|
* The context for drawing objects
|
|
6929
7102
|
* @public
|
|
@@ -6941,6 +7114,10 @@ interface DrawContext {
|
|
|
6941
7114
|
camera: Camera;
|
|
6942
7115
|
/** OIT */
|
|
6943
7116
|
oit: OIT;
|
|
7117
|
+
/** hierarchical depth */
|
|
7118
|
+
HiZ: boolean;
|
|
7119
|
+
/** hierarchical depth buffer */
|
|
7120
|
+
HiZTexture: Texture2D;
|
|
6944
7121
|
/** The scene that is currently been drawing */
|
|
6945
7122
|
scene: Scene;
|
|
6946
7123
|
/** The render pass to which the current drawing task belongs */
|
|
@@ -6995,12 +7172,12 @@ interface DrawContext {
|
|
|
6995
7172
|
sunLight?: DirectionalLight;
|
|
6996
7173
|
/** clustered light index */
|
|
6997
7174
|
clusteredLight?: ClusteredLight;
|
|
6998
|
-
/**
|
|
6999
|
-
|
|
7000
|
-
/**
|
|
7001
|
-
|
|
7002
|
-
/**
|
|
7003
|
-
|
|
7175
|
+
/** Material varying flags */
|
|
7176
|
+
materialFlags: number;
|
|
7177
|
+
/** Force cull mode */
|
|
7178
|
+
forceCullMode?: FaceMode;
|
|
7179
|
+
/** Force color mask state */
|
|
7180
|
+
forceColorState?: ColorState;
|
|
7004
7181
|
}
|
|
7005
7182
|
/**
|
|
7006
7183
|
* Base interface for a drawble object
|
|
@@ -7016,11 +7193,9 @@ interface Drawable {
|
|
|
7016
7193
|
/** Gets the instance color */
|
|
7017
7194
|
getInstanceColor(): Vector4;
|
|
7018
7195
|
/** If set, the pick target will be returned as the pick result */
|
|
7019
|
-
getPickTarget():
|
|
7196
|
+
getPickTarget(): PickTarget;
|
|
7020
7197
|
/** Gets the texture that contains the bone matrices of the object */
|
|
7021
7198
|
getBoneMatrices(): Texture2D;
|
|
7022
|
-
/** Gets the inversed bind matrix for skeleton animation */
|
|
7023
|
-
getInvBindMatrix(): Matrix4x4;
|
|
7024
7199
|
/** Gets the object color used for GPU picking */
|
|
7025
7200
|
getObjectColor(): Vector4;
|
|
7026
7201
|
/** Gets the morph texture */
|
|
@@ -7101,10 +7276,16 @@ declare class LightPass extends RenderPass {
|
|
|
7101
7276
|
* @public
|
|
7102
7277
|
*/
|
|
7103
7278
|
declare class DepthPass extends RenderPass {
|
|
7279
|
+
private _renderBackface;
|
|
7280
|
+
private _encodeDepth;
|
|
7104
7281
|
/**
|
|
7105
7282
|
* Creates an instance of DepthRenderPass
|
|
7106
7283
|
*/
|
|
7107
7284
|
constructor();
|
|
7285
|
+
get renderBackface(): boolean;
|
|
7286
|
+
set renderBackface(val: boolean);
|
|
7287
|
+
get encodeDepth(): boolean;
|
|
7288
|
+
set encodeDepth(val: boolean);
|
|
7108
7289
|
/** @internal */
|
|
7109
7290
|
protected _getGlobalBindGroupHash(ctx: DrawContext): string;
|
|
7110
7291
|
/** @internal */
|
|
@@ -7116,6 +7297,8 @@ declare class DepthPass extends RenderPass {
|
|
|
7116
7297
|
* @internal
|
|
7117
7298
|
*/
|
|
7118
7299
|
declare class SceneRenderer {
|
|
7300
|
+
/** @internal */
|
|
7301
|
+
private static _defaultCompositor;
|
|
7119
7302
|
/** @internal */
|
|
7120
7303
|
private static _scenePass;
|
|
7121
7304
|
/** @internal */
|
|
@@ -7125,6 +7308,10 @@ declare class SceneRenderer {
|
|
|
7125
7308
|
/** @internal */
|
|
7126
7309
|
private static _objectColorPass;
|
|
7127
7310
|
/** @internal */
|
|
7311
|
+
private static _frontDepthColorState;
|
|
7312
|
+
/** @internal */
|
|
7313
|
+
private static _backDepthColorState;
|
|
7314
|
+
/** @internal */
|
|
7128
7315
|
private static _clusters;
|
|
7129
7316
|
/** lighting render pass */
|
|
7130
7317
|
static get sceneRenderPass(): LightPass;
|
|
@@ -7146,7 +7333,7 @@ declare class SceneRenderer {
|
|
|
7146
7333
|
*/
|
|
7147
7334
|
static renderScene(scene: Scene, camera: Camera, compositor?: Compositor): void;
|
|
7148
7335
|
/** @internal */
|
|
7149
|
-
protected static _renderSceneDepth(ctx: DrawContext, renderQueue: RenderQueue, depthFramebuffer: FrameBuffer): void;
|
|
7336
|
+
protected static _renderSceneDepth(ctx: DrawContext, renderQueue: RenderQueue, depthFramebuffer: FrameBuffer, renderBackfaceDepth?: boolean): void;
|
|
7150
7337
|
/** @internal */
|
|
7151
7338
|
protected static _renderScene(ctx: DrawContext): void;
|
|
7152
7339
|
/** @internal */
|
|
@@ -7164,9 +7351,9 @@ type ClipmapDrawContext = {
|
|
|
7164
7351
|
camera: Camera;
|
|
7165
7352
|
position: Vector3;
|
|
7166
7353
|
gridScale: number;
|
|
7167
|
-
|
|
7168
|
-
|
|
7169
|
-
|
|
7354
|
+
minMaxWorldPos: Vector4;
|
|
7355
|
+
userData: unknown;
|
|
7356
|
+
calcAABB(userData: unknown, minX: number, maxX: number, minZ: number, maxZ: number, outAABB: AABB): any;
|
|
7170
7357
|
drawPrimitive(prim: Primitive, modelMatrix: Matrix4x4, offset: Vector2, scale: number, gridScale: number): any;
|
|
7171
7358
|
};
|
|
7172
7359
|
/** @internal */
|
|
@@ -7229,7 +7416,8 @@ declare abstract class EnvironmentLighting {
|
|
|
7229
7416
|
* Get radiance for a fragment
|
|
7230
7417
|
*
|
|
7231
7418
|
* @param scope - The shader scope
|
|
7232
|
-
* @param
|
|
7419
|
+
* @param refl - Reflection vector
|
|
7420
|
+
* @param roughness - Surface roughness
|
|
7233
7421
|
*
|
|
7234
7422
|
* @returns The radiance for the fragment
|
|
7235
7423
|
*/
|
|
@@ -7238,7 +7426,7 @@ declare abstract class EnvironmentLighting {
|
|
|
7238
7426
|
* Get irradiance for a fragment
|
|
7239
7427
|
*
|
|
7240
7428
|
* @param scope - The shader scope
|
|
7241
|
-
* @param
|
|
7429
|
+
* @param normal - surface normal
|
|
7242
7430
|
*
|
|
7243
7431
|
* @returns The radiance for the fragment
|
|
7244
7432
|
*/
|
|
@@ -7494,143 +7682,68 @@ declare class EnvHemisphericAmbient extends EnvironmentLighting {
|
|
|
7494
7682
|
}
|
|
7495
7683
|
|
|
7496
7684
|
/** @internal */
|
|
7497
|
-
|
|
7498
|
-
setupUniforms(scope: PBGlobalScope): void;
|
|
7499
|
-
shading(scope: PBInsideFunctionScope, worldPos: PBShaderExp, worldNormal: PBShaderExp, foamFactor: PBShaderExp): PBShaderExp;
|
|
7500
|
-
}
|
|
7501
|
-
/** @internal */
|
|
7502
|
-
declare function createProgramOcean(impl?: WaterShaderImpl): _zephyr3d_device.GPUProgram<unknown>;
|
|
7685
|
+
type WaterVertexFunc = (this: WaterShaderImpl, scope: PBInsideFunctionScope, pos: PBShaderExp, xz: PBShaderExp, waveGenerator: WaveGenerator) => void;
|
|
7503
7686
|
/** @internal */
|
|
7504
|
-
|
|
7687
|
+
type WaterShadingFunc = (scope: PBInsideFunctionScope, worldPos: PBShaderExp, worldNormal: PBShaderExp, foamFactor: PBShaderExp, discardable: PBShaderExp, waveGenerator: WaveGenerator) => PBShaderExp;
|
|
7505
7688
|
/** @internal */
|
|
7506
|
-
|
|
7689
|
+
type WaterSetupUniformFunc = (this: WaterShaderImpl, scope: PBGlobalScope) => void;
|
|
7507
7690
|
/** @internal */
|
|
7508
|
-
declare
|
|
7691
|
+
declare class WaterShaderImpl {
|
|
7692
|
+
private _vertexFunc;
|
|
7693
|
+
private _shadingFunc;
|
|
7694
|
+
private _setupUniformsFunc;
|
|
7695
|
+
constructor(setupUniformsFunc: WaterSetupUniformFunc, vertexFunc: WaterVertexFunc, shadingFunc: WaterShadingFunc);
|
|
7696
|
+
setupUniforms(scope: PBGlobalScope): void;
|
|
7697
|
+
vertex(scope: PBInsideFunctionScope, pos: PBShaderExp, xz: PBShaderExp, waveGenerator: WaveGenerator): void;
|
|
7698
|
+
getVertexNormal(scope: PBInsideFunctionScope, xz: PBShaderExp, useComputeShader: boolean): PBShaderExp;
|
|
7699
|
+
shading(scope: PBInsideFunctionScope, worldPos: PBShaderExp, worldNormal: PBShaderExp, foamFactor: PBShaderExp, discardable: PBShaderExp, waveGenerator: WaveGenerator): PBShaderExp;
|
|
7700
|
+
}
|
|
7509
7701
|
/** @internal */
|
|
7510
|
-
declare function
|
|
7702
|
+
declare function createProgramOcean(waveGenerator: WaveGenerator, shadingImpl: WaterShaderImpl): _zephyr3d_device.GPUProgram<unknown>;
|
|
7511
7703
|
/** @internal */
|
|
7512
|
-
declare function
|
|
7513
|
-
|
|
7704
|
+
declare function createProgramPostFFT2(useComputeShader: boolean, threadGroupSize: number, targetFormat?: TextureFormat, limit?: 4 | 2): _zephyr3d_device.GPUProgram<unknown>;
|
|
7514
7705
|
/** @internal */
|
|
7515
|
-
|
|
7516
|
-
/**
|
|
7517
|
-
* The size of simulated patch of field. (in meters)
|
|
7518
|
-
*/
|
|
7519
|
-
size: number;
|
|
7520
|
-
/**
|
|
7521
|
-
* How "croppy" this pattern would be
|
|
7522
|
-
*/
|
|
7523
|
-
croppiness: number;
|
|
7524
|
-
/**
|
|
7525
|
-
* Strength factor for this pattern
|
|
7526
|
-
*/
|
|
7527
|
-
strength: number;
|
|
7528
|
-
/**
|
|
7529
|
-
* Min wave length. Kind of spectrum filter. (Waves less that this thresold are not involved in spectrum generation)
|
|
7530
|
-
*/
|
|
7531
|
-
minWave: number;
|
|
7532
|
-
/**
|
|
7533
|
-
* Max wave length. Kind of spectrum filter.
|
|
7534
|
-
*/
|
|
7535
|
-
maxWave: number;
|
|
7536
|
-
}
|
|
7706
|
+
declare function createProgramHk(useComputeShader?: boolean, threadGroupSize?: number, targetFormat?: TextureFormat, limit?: 4 | 2): _zephyr3d_device.GPUProgram<unknown>;
|
|
7537
7707
|
/** @internal */
|
|
7538
|
-
|
|
7539
|
-
/**
|
|
7540
|
-
* Size of generated texture. Must be power of 2
|
|
7541
|
-
*/
|
|
7542
|
-
resolution: number;
|
|
7543
|
-
/**
|
|
7544
|
-
* Ocean field sub-pattern options.
|
|
7545
|
-
* @see OceanFieldCascade
|
|
7546
|
-
*/
|
|
7547
|
-
cascades: [OceanFieldCascade, OceanFieldCascade, OceanFieldCascade];
|
|
7548
|
-
/**
|
|
7549
|
-
* Wind vector. Module correspond to wind force.
|
|
7550
|
-
*/
|
|
7551
|
-
wind: Vector2;
|
|
7552
|
-
/**
|
|
7553
|
-
* Parameter for waves motion. 0 means no wave motion
|
|
7554
|
-
*/
|
|
7555
|
-
alignment: number;
|
|
7556
|
-
/**
|
|
7557
|
-
* Foam parameters
|
|
7558
|
-
*/
|
|
7559
|
-
foamParams: Vector2;
|
|
7560
|
-
/**
|
|
7561
|
-
* Seed of random generator
|
|
7562
|
-
*/
|
|
7563
|
-
randomSeed: number;
|
|
7564
|
-
}
|
|
7708
|
+
declare function createProgramH0(useComputeShader?: boolean, threadGroupSize?: number, targetFormat?: TextureFormat): _zephyr3d_device.GPUProgram<unknown>;
|
|
7565
7709
|
/** @internal */
|
|
7566
|
-
declare
|
|
7710
|
+
declare function createProgramFFT2V(useComputeShader: boolean, threadGroupSize: number, targetFormat?: TextureFormat, limit?: 4 | 2): _zephyr3d_device.GPUProgram<unknown>;
|
|
7711
|
+
/** @internal */
|
|
7712
|
+
declare function createProgramFFT2H(useComputeShader: boolean, threadGroupSize: number, targetFormat?: TextureFormat, limit?: 4 | 2): _zephyr3d_device.GPUProgram<unknown>;
|
|
7713
|
+
|
|
7567
7714
|
/** @internal */
|
|
7568
7715
|
declare class WaterMesh {
|
|
7569
|
-
private
|
|
7570
|
-
private
|
|
7571
|
-
private _hkBindGroup;
|
|
7572
|
-
private _hkBindGroup2;
|
|
7573
|
-
private _hkBindGroup4;
|
|
7574
|
-
private _fft2hBindGroup;
|
|
7575
|
-
private _fft2vBindGroup;
|
|
7576
|
-
private _fft2hBindGroup2Used;
|
|
7577
|
-
private _fft2hBindGroup2Free;
|
|
7578
|
-
private _fft2hBindGroup4Used;
|
|
7579
|
-
private _fft2hBindGroup4Free;
|
|
7580
|
-
private _fft2vBindGroup2Used;
|
|
7581
|
-
private _fft2vBindGroup2Free;
|
|
7582
|
-
private _fft2vBindGroup4Used;
|
|
7583
|
-
private _fft2vBindGroup4Free;
|
|
7584
|
-
private _postfft2BindGroup;
|
|
7585
|
-
private _postfft2BindGroup2;
|
|
7586
|
-
private _postfft2BindGroup4;
|
|
7716
|
+
private _impl;
|
|
7717
|
+
private _waveGenerator;
|
|
7587
7718
|
private _waterBindGroup;
|
|
7588
7719
|
private _usedClipmapBindGroups;
|
|
7589
7720
|
private _freeClipmapBindGroups;
|
|
7590
|
-
private _nearestRepeatSampler;
|
|
7591
|
-
private _linearRepeatSampler;
|
|
7592
|
-
private _updateRenderStates;
|
|
7593
7721
|
private _waterRenderStates;
|
|
7594
7722
|
private _wireframe;
|
|
7595
7723
|
private _gridScale;
|
|
7724
|
+
private _speed;
|
|
7596
7725
|
private _level;
|
|
7597
7726
|
private _tileSize;
|
|
7598
|
-
private
|
|
7599
|
-
private _regionMax;
|
|
7600
|
-
private _sizes;
|
|
7601
|
-
private _croppinesses;
|
|
7602
|
-
private _params;
|
|
7603
|
-
private _instanceData;
|
|
7604
|
-
private _ifftTextures;
|
|
7727
|
+
private _region;
|
|
7605
7728
|
private _clipmap;
|
|
7606
|
-
private _aabbExtents;
|
|
7607
|
-
private _cascades;
|
|
7608
|
-
private _paramsChanged;
|
|
7609
|
-
private _resolutionChanged;
|
|
7610
|
-
private _textureFormat;
|
|
7611
|
-
private _h0TextureFormat;
|
|
7612
|
-
private _dataTextureFormat;
|
|
7613
|
-
private _renderMode;
|
|
7614
7729
|
private _updateFrameStamp;
|
|
7615
7730
|
private _waterProgram;
|
|
7616
|
-
|
|
7617
|
-
|
|
7618
|
-
|
|
7619
|
-
|
|
7620
|
-
|
|
7621
|
-
get
|
|
7622
|
-
|
|
7623
|
-
|
|
7624
|
-
|
|
7625
|
-
get
|
|
7626
|
-
|
|
7627
|
-
|
|
7628
|
-
|
|
7629
|
-
|
|
7630
|
-
|
|
7631
|
-
|
|
7632
|
-
setWaveCroppiness(cascade: number, croppiness: number): void;
|
|
7633
|
-
get bindGroup(): BindGroup;
|
|
7731
|
+
private _waveGeneratorHash;
|
|
7732
|
+
constructor();
|
|
7733
|
+
get speed(): number;
|
|
7734
|
+
set speed(val: number);
|
|
7735
|
+
/** @internal */
|
|
7736
|
+
get shadingImpl(): WaterShaderImpl;
|
|
7737
|
+
/** @internal */
|
|
7738
|
+
set shadingImpl(val: WaterShaderImpl);
|
|
7739
|
+
/** @internal */
|
|
7740
|
+
get waveImpl(): WaveGenerator;
|
|
7741
|
+
/** @internal */
|
|
7742
|
+
set waveImpl(val: WaveGenerator);
|
|
7743
|
+
/** @internal */
|
|
7744
|
+
getWaterBindGroup(device: AbstractDevice): BindGroup;
|
|
7745
|
+
/** @internal */
|
|
7746
|
+
prepareForRender(device: AbstractDevice): boolean;
|
|
7634
7747
|
get level(): number;
|
|
7635
7748
|
set level(val: number);
|
|
7636
7749
|
get wireframe(): boolean;
|
|
@@ -7639,33 +7752,10 @@ declare class WaterMesh {
|
|
|
7639
7752
|
set gridScale(val: number);
|
|
7640
7753
|
get tileSize(): number;
|
|
7641
7754
|
set tileSize(val: number);
|
|
7642
|
-
get
|
|
7643
|
-
set
|
|
7644
|
-
get regionMax(): Vector2;
|
|
7645
|
-
set regionMax(val: Vector2);
|
|
7755
|
+
get region(): Vector4;
|
|
7756
|
+
set region(val: Vector4);
|
|
7646
7757
|
getClipmapBindGroup(device: AbstractDevice): BindGroup;
|
|
7647
|
-
render(camera: Camera, flip?: boolean): void;
|
|
7648
|
-
update(device: AbstractDevice, time: number): void;
|
|
7649
|
-
disposeInstanceData(): void;
|
|
7650
|
-
private generateSpectrum;
|
|
7651
|
-
private generateSpectrumTwoPass;
|
|
7652
|
-
private ifft2;
|
|
7653
|
-
private getFFT2hBindGroup2;
|
|
7654
|
-
private getFFT2hBindGroup4;
|
|
7655
|
-
private getFFT2vBindGroup2;
|
|
7656
|
-
private getFFT2vBindGroup4;
|
|
7657
|
-
private ifft2TwoPass;
|
|
7658
|
-
private postIfft2;
|
|
7659
|
-
private postIfft2TwoPass;
|
|
7660
|
-
private createNTextures;
|
|
7661
|
-
private getInstanceData;
|
|
7662
|
-
private static createQuad;
|
|
7663
|
-
private getButterflyTexture;
|
|
7664
|
-
private generateInitialSpectrum;
|
|
7665
|
-
private getNoiseTexture;
|
|
7666
|
-
private getNoise2d;
|
|
7667
|
-
private reverseBits;
|
|
7668
|
-
private createButterflyTexture;
|
|
7758
|
+
render(device: AbstractDevice, camera: Camera, flip?: boolean): void;
|
|
7669
7759
|
}
|
|
7670
7760
|
|
|
7671
7761
|
/**
|
|
@@ -7828,6 +7918,297 @@ declare class ABufferOIT extends OIT {
|
|
|
7828
7918
|
private static getCompositeProgram;
|
|
7829
7919
|
}
|
|
7830
7920
|
|
|
7921
|
+
type OceanFieldCascade = {
|
|
7922
|
+
/** The size of simulated patch of field. (in meters) */
|
|
7923
|
+
size: number;
|
|
7924
|
+
/** How "croppy" this pattern would be */
|
|
7925
|
+
croppiness: number;
|
|
7926
|
+
/** Strength factor for this pattern */
|
|
7927
|
+
strength: number;
|
|
7928
|
+
/** Min wave length. Kind of spectrum filter. (Waves less that this thresold are not involved in spectrum generation) */
|
|
7929
|
+
minWave: number;
|
|
7930
|
+
/** Max wave length. Kind of spectrum filter. */
|
|
7931
|
+
maxWave: number;
|
|
7932
|
+
};
|
|
7933
|
+
type OceanFieldBuildParams = {
|
|
7934
|
+
/** Size of generated texture. Must be power of 2 */
|
|
7935
|
+
resolution: number;
|
|
7936
|
+
/** Ocean field sub-pattern options. */
|
|
7937
|
+
cascades: [OceanFieldCascade, OceanFieldCascade, OceanFieldCascade];
|
|
7938
|
+
/** Wind vector. Module correspond to wind force. */
|
|
7939
|
+
wind: Vector2;
|
|
7940
|
+
/** Parameter for waves motion. 0 means no wave motion */
|
|
7941
|
+
alignment: number;
|
|
7942
|
+
/** Foam parameters */
|
|
7943
|
+
foamParams: Vector2;
|
|
7944
|
+
/** Seed of random generator */
|
|
7945
|
+
randomSeed: number;
|
|
7946
|
+
};
|
|
7947
|
+
/**
|
|
7948
|
+
* This class generates a 2D ocean field using the Fast Fourier Transform (FFT) algorithm.
|
|
7949
|
+
* @public
|
|
7950
|
+
*/
|
|
7951
|
+
declare class FFTWaveGenerator extends WaveGenerator {
|
|
7952
|
+
private static _globals;
|
|
7953
|
+
private _useComputeShader;
|
|
7954
|
+
private _h0BindGroup;
|
|
7955
|
+
private _hkBindGroup;
|
|
7956
|
+
private _hkBindGroup2;
|
|
7957
|
+
private _hkBindGroup4;
|
|
7958
|
+
private _fft2hBindGroup;
|
|
7959
|
+
private _fft2vBindGroup;
|
|
7960
|
+
private _fft2hBindGroup2Used;
|
|
7961
|
+
private _fft2hBindGroup2Free;
|
|
7962
|
+
private _fft2hBindGroup4Used;
|
|
7963
|
+
private _fft2hBindGroup4Free;
|
|
7964
|
+
private _fft2vBindGroup2Used;
|
|
7965
|
+
private _fft2vBindGroup2Free;
|
|
7966
|
+
private _fft2vBindGroup4Used;
|
|
7967
|
+
private _fft2vBindGroup4Free;
|
|
7968
|
+
private _postfft2BindGroup;
|
|
7969
|
+
private _postfft2BindGroup2;
|
|
7970
|
+
private _postfft2BindGroup4;
|
|
7971
|
+
private _updateRenderStates;
|
|
7972
|
+
private _sizes;
|
|
7973
|
+
private _croppinesses;
|
|
7974
|
+
private _params;
|
|
7975
|
+
private _instanceData;
|
|
7976
|
+
private _ifftTextures;
|
|
7977
|
+
private _cascades;
|
|
7978
|
+
private _paramsChanged;
|
|
7979
|
+
private _resolutionChanged;
|
|
7980
|
+
private _textureFormat;
|
|
7981
|
+
private _h0TextureFormat;
|
|
7982
|
+
private _dataTextureFormat;
|
|
7983
|
+
private _renderMode;
|
|
7984
|
+
/**
|
|
7985
|
+
* Create a new instance of the FFTWaveGenerator class.
|
|
7986
|
+
* @param params - Ocean field build parameters. If not provided, default parameters will be used.
|
|
7987
|
+
*/
|
|
7988
|
+
constructor(params?: OceanFieldBuildParams);
|
|
7989
|
+
private paramsChanged;
|
|
7990
|
+
/** Gets the wave alighment */
|
|
7991
|
+
get alignment(): number;
|
|
7992
|
+
set alignment(val: number);
|
|
7993
|
+
/** Gets the wind vector */
|
|
7994
|
+
get wind(): Vector2;
|
|
7995
|
+
set wind(val: Vector2);
|
|
7996
|
+
/** Gets the foam width */
|
|
7997
|
+
get foamWidth(): number;
|
|
7998
|
+
set foamWidth(val: number);
|
|
7999
|
+
/** Gets the foam contrast */
|
|
8000
|
+
get foamContrast(): number;
|
|
8001
|
+
set foamContrast(val: number);
|
|
8002
|
+
/** Gets the wave length for the specified cascade */
|
|
8003
|
+
getWaveLength(cascade: number): number;
|
|
8004
|
+
/**
|
|
8005
|
+
* Sets the wave length for the specified cascade
|
|
8006
|
+
* @param cascade - The cascade index
|
|
8007
|
+
* @param length - The new wave length for the specified cascade
|
|
8008
|
+
*/
|
|
8009
|
+
setWaveLength(cascade: number, length: number): void;
|
|
8010
|
+
/** Gets the wave strength for the specified cascade */
|
|
8011
|
+
getWaveStrength(cascade: number): number;
|
|
8012
|
+
/**
|
|
8013
|
+
* Sets the wave strength for the specified cascade
|
|
8014
|
+
* @param cascade - The cascade index
|
|
8015
|
+
* @param strength - The new wave strength for the specified cascade
|
|
8016
|
+
*/
|
|
8017
|
+
setWaveStrength(cascade: number, strength: number): void;
|
|
8018
|
+
/** Gets the wave croppiness for the specified cascade */
|
|
8019
|
+
getWaveCroppiness(cascade: number): number;
|
|
8020
|
+
/**
|
|
8021
|
+
* Sets the wave croppiness for the specified cascade
|
|
8022
|
+
* @param cascade - The cascade index
|
|
8023
|
+
* @param croppiness - The new wave croppiness for the specified cascade
|
|
8024
|
+
*/
|
|
8025
|
+
setWaveCroppiness(cascade: number, croppiness: number): void;
|
|
8026
|
+
/** @internal */
|
|
8027
|
+
private static createQuad;
|
|
8028
|
+
/** @internal */
|
|
8029
|
+
private getButterflyTexture;
|
|
8030
|
+
/** @internal */
|
|
8031
|
+
private generateInitialSpectrum;
|
|
8032
|
+
/** @internal */
|
|
8033
|
+
private getNoiseTexture;
|
|
8034
|
+
/** @internal */
|
|
8035
|
+
private getNoise2d;
|
|
8036
|
+
/** @internal */
|
|
8037
|
+
private reverseBits;
|
|
8038
|
+
/** @internal */
|
|
8039
|
+
private createButterflyTexture;
|
|
8040
|
+
/** @internal */
|
|
8041
|
+
private getInstanceData;
|
|
8042
|
+
/** @internal */
|
|
8043
|
+
private createNTextures;
|
|
8044
|
+
/** {@inheritDoc WaveGenerator.update} */
|
|
8045
|
+
update(time: number): void;
|
|
8046
|
+
/** @internal */
|
|
8047
|
+
private disposeNTextures;
|
|
8048
|
+
/** @internal */
|
|
8049
|
+
private disposeInstanceData;
|
|
8050
|
+
/** @internal */
|
|
8051
|
+
private generateSpectrum;
|
|
8052
|
+
/** @internal */
|
|
8053
|
+
private generateSpectrumTwoPass;
|
|
8054
|
+
/** @internal */
|
|
8055
|
+
private ifft2;
|
|
8056
|
+
/** @internal */
|
|
8057
|
+
private getFFT2hBindGroup2;
|
|
8058
|
+
/** @internal */
|
|
8059
|
+
private getFFT2hBindGroup4;
|
|
8060
|
+
/** @internal */
|
|
8061
|
+
private getFFT2vBindGroup2;
|
|
8062
|
+
/** @internal */
|
|
8063
|
+
private getFFT2vBindGroup4;
|
|
8064
|
+
/** @internal */
|
|
8065
|
+
private ifft2TwoPass;
|
|
8066
|
+
/** @internal */
|
|
8067
|
+
private postIfft2;
|
|
8068
|
+
/** @internal */
|
|
8069
|
+
private postIfft2TwoPass;
|
|
8070
|
+
/** {@inheritDoc WaveGenerator.setupUniforms} */
|
|
8071
|
+
setupUniforms(scope: PBGlobalScope): void;
|
|
8072
|
+
/** {@inheritDoc WaveGenerator.calcVertexPositionAndNormal} */
|
|
8073
|
+
calcVertexPositionAndNormal(scope: PBInsideFunctionScope, inPos: PBShaderExp, outPos: PBShaderExp, outNormal: PBShaderExp): void;
|
|
8074
|
+
/** {@inheritDoc WaveGenerator.calcFragmentNormal} */
|
|
8075
|
+
calcFragmentNormal(scope: PBInsideFunctionScope, xz: PBShaderExp, vertexNormal: PBShaderExp): PBShaderExp;
|
|
8076
|
+
/** {@inheritDoc WaveGenerator.calcFragmentNormalAndFoam} */
|
|
8077
|
+
calcFragmentNormalAndFoam(scope: PBInsideFunctionScope, xz: PBShaderExp): PBShaderExp;
|
|
8078
|
+
/** {@inheritDoc WaveGenerator.isOk} */
|
|
8079
|
+
isOk(): boolean;
|
|
8080
|
+
/** {@inheritDoc WaveGenerator.applyWaterBindGroup} */
|
|
8081
|
+
applyWaterBindGroup(bindGroup: BindGroup): void;
|
|
8082
|
+
/** {@inheritDoc WaveGenerator.dispose} */
|
|
8083
|
+
dispose(): void;
|
|
8084
|
+
/** {@inheritDoc WaveGenerator.calcClipmapTileAABB} */
|
|
8085
|
+
calcClipmapTileAABB(minX: number, maxX: number, minZ: number, maxZ: number, y: number, outAABB: AABB): void;
|
|
8086
|
+
/** {@inheritDoc WaveGenerator.getHash} */
|
|
8087
|
+
getHash(): string;
|
|
8088
|
+
}
|
|
8089
|
+
|
|
8090
|
+
/**
|
|
8091
|
+
* Gerstner wave generator.
|
|
8092
|
+
* @public
|
|
8093
|
+
*/
|
|
8094
|
+
declare class GerstnerWaveGenerator extends WaveGenerator {
|
|
8095
|
+
private _currentTime;
|
|
8096
|
+
private _waveParams;
|
|
8097
|
+
private _numWaves;
|
|
8098
|
+
/**
|
|
8099
|
+
* Creates a new Gerstner wave generator.
|
|
8100
|
+
*/
|
|
8101
|
+
constructor();
|
|
8102
|
+
/** Gets the number of waves. */
|
|
8103
|
+
get numWaves(): number;
|
|
8104
|
+
set numWaves(val: number);
|
|
8105
|
+
/**
|
|
8106
|
+
* Sets the angle of the wave direction in radians.
|
|
8107
|
+
* @param waveIndex - index of the wave to set.
|
|
8108
|
+
* @param angle - angle of the wave direction in radians.
|
|
8109
|
+
*/
|
|
8110
|
+
setWaveDirection(waveIndex: number, angle: number): void;
|
|
8111
|
+
/**
|
|
8112
|
+
* Gets the angle of the wave direction in radians.
|
|
8113
|
+
* @param waveIndex - index of the wave to get.
|
|
8114
|
+
* @returns Angle of the wave direction in radians.
|
|
8115
|
+
*/
|
|
8116
|
+
getWaveDirection(waveIndex: number): number;
|
|
8117
|
+
/**
|
|
8118
|
+
* Sets the steepness of the wave.
|
|
8119
|
+
* @param waveIndex - index of the wave to set.
|
|
8120
|
+
* @param steepness - Steepness of the wave.
|
|
8121
|
+
*/
|
|
8122
|
+
setWaveSteepness(waveIndex: number, steepness: number): void;
|
|
8123
|
+
/**
|
|
8124
|
+
* Gets the steepness of the wave.
|
|
8125
|
+
* @param waveIndex - index of the wave to set.
|
|
8126
|
+
* @returns Steepness of the wave.
|
|
8127
|
+
*/
|
|
8128
|
+
getWaveSteepness(waveIndex: number): number;
|
|
8129
|
+
/**
|
|
8130
|
+
* Sets the amplitude of the wave.
|
|
8131
|
+
* @param waveIndex - index of the wave to set.
|
|
8132
|
+
* @param val - Amplitude of the wave.
|
|
8133
|
+
*/
|
|
8134
|
+
setWaveAmplitude(waveIndex: number, val: number): void;
|
|
8135
|
+
/**
|
|
8136
|
+
* Gets the amplitude of the wave.
|
|
8137
|
+
* @param waveIndex - index of the wave to set.
|
|
8138
|
+
* @returns Amplitude of the wave.
|
|
8139
|
+
*/
|
|
8140
|
+
getWaveAmplitude(waveIndex: number): number;
|
|
8141
|
+
/**
|
|
8142
|
+
* Sets the length of the wave.
|
|
8143
|
+
* @param waveIndex - index of the wave to set.
|
|
8144
|
+
* @param val - Length of the wave.
|
|
8145
|
+
*/
|
|
8146
|
+
setWaveLength(waveIndex: number, val: number): void;
|
|
8147
|
+
/**
|
|
8148
|
+
* Gets the length of the wave.
|
|
8149
|
+
* @param waveIndex - index of the wave to set.
|
|
8150
|
+
* @returns Length of the wave.
|
|
8151
|
+
*/
|
|
8152
|
+
getWaveLength(waveIndex: number): number;
|
|
8153
|
+
/**
|
|
8154
|
+
* Query if the wave is an omni-directional wave.
|
|
8155
|
+
* @param waveIndex - index of the wave to set.
|
|
8156
|
+
* @returns true if the wave is an omni-directional wave, false otherwise.
|
|
8157
|
+
*/
|
|
8158
|
+
isOmniWave(waveIndex: number): boolean;
|
|
8159
|
+
/**
|
|
8160
|
+
* Sets whether the wave is an omni-directional wave.
|
|
8161
|
+
* @param waveIndex - index of the wave to set.
|
|
8162
|
+
* @param isOmni - true if the wave is an omni-directional wave, false otherwise.
|
|
8163
|
+
*/
|
|
8164
|
+
setOmniWave(waveIndex: number, isOmni: boolean): void;
|
|
8165
|
+
/**
|
|
8166
|
+
* Gets the X coordinate of the wave origin if it is an omni-directional wave.
|
|
8167
|
+
* @param waveIndex - index of the wave to set.
|
|
8168
|
+
* @returns X coordinate of the wave origin if it is an omni-directional wave, 0 otherwise.
|
|
8169
|
+
*/
|
|
8170
|
+
getOriginX(waveIndex: number): number;
|
|
8171
|
+
/**
|
|
8172
|
+
* Gets the Z coordinate of the wave origin if it is an omni-directional wave.
|
|
8173
|
+
* @param waveIndex - index of the wave to set.
|
|
8174
|
+
* @returns Z coordinate of the wave origin if it is an omni-directional wave, 0 otherwise.
|
|
8175
|
+
*/
|
|
8176
|
+
getOriginZ(waveIndex: number): number;
|
|
8177
|
+
/**
|
|
8178
|
+
* Sets the X and Z coordinates of the wave origin if it is an omni-directional wave.
|
|
8179
|
+
* @param waveIndex - index of the wave to set.
|
|
8180
|
+
* @param x - X coordinate of the wave origin
|
|
8181
|
+
* @param z - Z coordinate of the wave origin
|
|
8182
|
+
*/
|
|
8183
|
+
setOrigin(waveIndex: number, x: number, z: number): void;
|
|
8184
|
+
/** @internal */
|
|
8185
|
+
private randomWave;
|
|
8186
|
+
/** {@inheritDoc WaveGenerator.update} */
|
|
8187
|
+
update(timeInSeconds: number): void;
|
|
8188
|
+
/** {@inheritDoc WaveGenerator.calcClipmapTileAABB} */
|
|
8189
|
+
calcClipmapTileAABB(minX: number, maxX: number, minZ: number, maxZ: number, y: number, outAABB: AABB): void;
|
|
8190
|
+
/** {@inheritDoc WaveGenerator.calcFragmentNormal} */
|
|
8191
|
+
calcFragmentNormal(scope: PBInsideFunctionScope, xz: PBShaderExp): PBShaderExp;
|
|
8192
|
+
/** {@inheritDoc WaveGenerator.calcFragmentNormalAndFoam} */
|
|
8193
|
+
calcFragmentNormalAndFoam(scope: PBInsideFunctionScope, xz: PBShaderExp): PBShaderExp;
|
|
8194
|
+
/** {@inheritDoc WaveGenerator.setupUniforms} */
|
|
8195
|
+
setupUniforms(scope: PBGlobalScope): void;
|
|
8196
|
+
/** @internal */
|
|
8197
|
+
private gerstnerWave;
|
|
8198
|
+
/** @internal */
|
|
8199
|
+
private calcNormalAndPos;
|
|
8200
|
+
/** {@inheritDoc WaveGenerator.calcVertexPositionAndNormal} */
|
|
8201
|
+
calcVertexPositionAndNormal(scope: PBInsideFunctionScope, inPos: PBShaderExp, outPos: PBShaderExp, outNormal: PBShaderExp): void;
|
|
8202
|
+
/** {@inheritDoc WaveGenerator.applyWaterBindGroup} */
|
|
8203
|
+
applyWaterBindGroup(bindGroup: BindGroup): void;
|
|
8204
|
+
/** {@inheritDoc WaveGenerator.isOk} */
|
|
8205
|
+
isOk(): boolean;
|
|
8206
|
+
/** {@inheritDoc WaveGenerator.getHash} */
|
|
8207
|
+
getHash(device: AbstractDevice): string;
|
|
8208
|
+
/** {@inheritDoc WaveGenerator.dispose} */
|
|
8209
|
+
dispose(): void;
|
|
8210
|
+
}
|
|
8211
|
+
|
|
7831
8212
|
/**
|
|
7832
8213
|
* Translate animation track
|
|
7833
8214
|
* @public
|
|
@@ -8030,17 +8411,49 @@ declare function gammaToLinear(scope: PBInsideFunctionScope, color: PBShaderExp)
|
|
|
8030
8411
|
* @public
|
|
8031
8412
|
*/
|
|
8032
8413
|
declare function linearToGamma(scope: PBInsideFunctionScope, color: PBShaderExp): any;
|
|
8414
|
+
/** @internal */
|
|
8415
|
+
declare function fetchNormalizedFloatForDevice(scope: PBInsideFunctionScope, tex: PBShaderExp, uv: PBShaderExp, level?: PBShaderExp | number): PBShaderExp;
|
|
8033
8416
|
|
|
8034
8417
|
/**
|
|
8035
|
-
* Generate
|
|
8418
|
+
* Generate random float value from a vec2
|
|
8419
|
+
*
|
|
8420
|
+
* @param scope - Current shader scope
|
|
8421
|
+
* @param p - random seed
|
|
8422
|
+
* @returns random float value
|
|
8423
|
+
*
|
|
8424
|
+
* @public
|
|
8425
|
+
*/
|
|
8426
|
+
declare function hash(scope: PBInsideFunctionScope, p: PBShaderExp): any;
|
|
8427
|
+
/**
|
|
8428
|
+
* Generate random float value from a vec2
|
|
8036
8429
|
*
|
|
8037
8430
|
* @param scope - Current shader scope
|
|
8038
8431
|
* @param p - random seed
|
|
8432
|
+
* @returns random float value
|
|
8433
|
+
*
|
|
8434
|
+
* @public
|
|
8435
|
+
*/
|
|
8436
|
+
declare function gradient(scope: PBInsideFunctionScope, p: PBShaderExp, t: PBShaderExp | number): any;
|
|
8437
|
+
/**
|
|
8438
|
+
* Generate a float perlin noise value from a vec2
|
|
8439
|
+
*
|
|
8440
|
+
* @param scope - Current shader scope
|
|
8441
|
+
* @param p - 2d vector
|
|
8442
|
+
* @returns a float noise value
|
|
8443
|
+
*
|
|
8444
|
+
* @public
|
|
8445
|
+
*/
|
|
8446
|
+
declare function perlinNoise2D(scope: PBInsideFunctionScope, p: PBShaderExp): any;
|
|
8447
|
+
/**
|
|
8448
|
+
* Generate a float perlin noise value from a vec3
|
|
8449
|
+
*
|
|
8450
|
+
* @param scope - Current shader scope
|
|
8451
|
+
* @param p - 3d vector
|
|
8039
8452
|
* @returns a float noise value
|
|
8040
8453
|
*
|
|
8041
8454
|
* @public
|
|
8042
8455
|
*/
|
|
8043
|
-
declare function
|
|
8456
|
+
declare function perlinNoise3D(scope: PBInsideFunctionScope, p: PBShaderExp): any;
|
|
8044
8457
|
/**
|
|
8045
8458
|
* worley 3d noise
|
|
8046
8459
|
*
|
|
@@ -8084,6 +8497,16 @@ declare function noise3D(scope: PBInsideFunctionScope, p: PBShaderExp): PBShader
|
|
|
8084
8497
|
* @public
|
|
8085
8498
|
*/
|
|
8086
8499
|
declare function smoothNoise3D(scope: PBInsideFunctionScope, p: PBShaderExp): PBShaderExp;
|
|
8500
|
+
/**
|
|
8501
|
+
* Calculate interleaved gradient noise
|
|
8502
|
+
*
|
|
8503
|
+
* @param scope - current shader scope
|
|
8504
|
+
* @param c - 2d position at where to calculate noise
|
|
8505
|
+
* @returns noise value
|
|
8506
|
+
*
|
|
8507
|
+
* @public
|
|
8508
|
+
*/
|
|
8509
|
+
declare function interleavedGradientNoise(scope: PBInsideFunctionScope, c: PBShaderExp): PBShaderExp;
|
|
8087
8510
|
|
|
8088
8511
|
/**
|
|
8089
8512
|
* Forward render pass type
|
|
@@ -8174,6 +8597,16 @@ declare const MAX_MORPH_TARGETS = 256;
|
|
|
8174
8597
|
declare const MORPH_WEIGHTS_VECTOR_COUNT: number;
|
|
8175
8598
|
/** @internal */
|
|
8176
8599
|
declare const MORPH_ATTRIBUTE_VECTOR_COUNT: number;
|
|
8600
|
+
/**
|
|
8601
|
+
* Material varying flags
|
|
8602
|
+
* @public
|
|
8603
|
+
*/
|
|
8604
|
+
declare const enum MaterialVaryingFlags {
|
|
8605
|
+
MORPH_ANIMATION = 1,
|
|
8606
|
+
SKIN_ANIMATION = 2,
|
|
8607
|
+
INSTANCING = 4,
|
|
8608
|
+
SSR_STORE_ROUGHNESS = 8
|
|
8609
|
+
}
|
|
8177
8610
|
|
|
8178
8611
|
/**
|
|
8179
8612
|
* Input handler type
|
|
@@ -8398,4 +8831,4 @@ declare class Application extends Application_base {
|
|
|
8398
8831
|
log(text: string, mode?: LogMode): void;
|
|
8399
8832
|
}
|
|
8400
8833
|
|
|
8401
|
-
export { AABBTree, ABufferOIT, AbstractPostEffect, AnimationClip, AnimationSet, AnimationTrack, AppOptions, AppResizeEvent, AppTickEvent, Application, AssetAnimationData, AssetAnimationTrack, AssetHierarchyNode, AssetManager, AssetMaterial, AssetMaterialClearcoat, AssetMaterialCommon, AssetMaterialIridescence, AssetMaterialSheen, AssetMaterialTransmission, AssetMeshData, AssetPBRMaterialCommon, AssetPBRMaterialMR, AssetPBRMaterialSG, AssetRotationTrack, AssetScaleTrack, AssetScene, AssetSkeletalAnimationTrack, AssetSkeleton, AssetSubMeshData, AssetTranslationTrack, AssetUnlitMaterial, BUILTIN_ASSET_TEST_CUBEMAP, BUILTIN_ASSET_TEXTURE_SHEEN_LUT, BaseCameraController, BaseLight, BatchDrawable, BatchGroup, BlendMode, BlinnMaterial, BlitType, Blitter, Bloom, BoundingBox,
|
|
8834
|
+
export { AABBTree, ABufferOIT, AbstractPostEffect, AnimationClip, AnimationSet, AnimationTrack, AppOptions, AppResizeEvent, AppTickEvent, Application, AssetAnimationData, AssetAnimationTrack, AssetHierarchyNode, AssetManager, AssetMaterial, AssetMaterialClearcoat, AssetMaterialCommon, AssetMaterialIridescence, AssetMaterialSheen, AssetMaterialTransmission, AssetMeshData, AssetPBRMaterialCommon, AssetPBRMaterialMR, AssetPBRMaterialSG, AssetRotationTrack, AssetScaleTrack, AssetScene, AssetSkeletalAnimationTrack, AssetSkeleton, AssetSubMeshData, AssetTranslationTrack, AssetUnlitMaterial, BUILTIN_ASSET_TEST_CUBEMAP, BUILTIN_ASSET_TEXTURE_SHEEN_LUT, BaseCameraController, BaseLight, BatchDrawable, BatchGroup, BlendMode, BlinnMaterial, BlitType, Blitter, Bloom, BoundingBox, BoundingVolume, BoxCreationOptions, BoxFilterBlitter, BoxFrameShape, BoxShape, CachedBindGroup, Camera, Clipmap, ClipmapDrawContext, Compositor, CompositorContext, CopyBlitter, CullVisitor, CylinderCreationOptions, CylinderShape, DepthPass, DirectionalLight, DrawContext, Drawable, DrawableInstanceInfo, ESM, EnvConstantAmbient, EnvHemisphericAmbient, EnvIBL, EnvLightType, EnvLightWrapper, EnvShIBL, Environment, EnvironmentLighting, EulerRotationTrack, ExtractMixinReturnType, ExtractMixinType, FFTWaveGenerator, FPSCameraController, FPSCameraControllerOptions, FXAA, FogType, GaussianBlurBlitter, GerstnerWaveGenerator, GraphNode, GrassMaterial, Grayscale, HeightField, HeightfieldBBoxTree, HeightfieldBBoxTreeNode, IMixinAlbedoColor, IMixinBlinnPhong, IMixinFoliage, IMixinLambert, IMixinLight, IMixinPBRCommon, IMixinPBRMetallicRoughness, IMixinPBRSpecularGlossiness, IMixinVertexColor, InstanceBindGroupAllocator, InstanceData, InstanceUniformType, LIGHT_TYPE_DIRECTIONAL, LIGHT_TYPE_NONE, LIGHT_TYPE_POINT, LIGHT_TYPE_SPOT, LambertMaterial, LightPass, LogMode, Logger, MAX_CLUSTERED_LIGHTS, MAX_MORPH_ATTRIBUTES, MAX_MORPH_TARGETS, MORPH_ATTRIBUTE_VECTOR_COUNT, MORPH_TARGET_COLOR, MORPH_TARGET_NORMAL, MORPH_TARGET_POSITION, MORPH_TARGET_TANGENT, MORPH_TARGET_TEX0, MORPH_TARGET_TEX1, MORPH_TARGET_TEX2, MORPH_TARGET_TEX3, MORPH_WEIGHTS_VECTOR_COUNT, Material, MaterialTextureInfo, MaterialVaryingFlags, Mesh, MeshMaterial, ModelFetchOptions, ModelInfo, NamedObject, OIT, Octree, OctreeNode, OctreeNodeChunk, OctreePlacement, OrbitCameraController, OrbitCameraControllerOptions, OrthoCamera, PBRMetallicRoughnessMaterial, PBRSpecularGlossinessMaterial, PCFOPT, PCFPD, PerspectiveCamera, PickResult, PickTarget, PlaneCreationOptions, PlaneShape, PlayAnimationOptions, PointLight, PostWater, Primitive, PunctualLight, QUEUE_OPAQUE, QUEUE_TRANSPARENT, Quadtree, QuadtreeNode, RENDER_PASS_TYPE_DEPTH, RENDER_PASS_TYPE_LIGHT, RENDER_PASS_TYPE_OBJECT_COLOR, RENDER_PASS_TYPE_SHADOWMAP, RenderItemList, RenderItemListBundle, RenderItemListInfo, RenderPass, RenderQueue, RenderQueueItem, RenderQueueRef, RotationTrack, SAO, ScaleTrack, Scene, SceneNode, SceneNodeVisible, SceneRenderer, SceneUpdateEvent, ShaderHelper, ShadowConfig, ShadowMapParams, ShadowMapPass, ShadowMapType, ShadowMapper, ShadowMode, Shape, ShapeCreationOptions, SharedModel, Skeleton, SkyRenderer, SkyType, SphereCreationOptions, SphereShape, SpotLight, StopAnimationOptions, Terrain, TerrainDetailMapInfo, TerrainMaterial, TerrainMaterialOptions, TerrainPatch, TerrainPatchBase, TextureFetchOptions, TextureMixinInstanceTypes, TextureMixinTypes, TextureProp, TexturePropUniforms, ToMixedTextureType, Tonemap, TorusCreationOptions, TorusShape, TranslationTrack, UnlitMaterial, VSM, Visitor, WaterMesh, WaterSetupUniformFunc, WaterShaderImpl, WaterShadingFunc, WaterVertexFunc, WaveGenerator, WeightedBlendedOIT, XForm, applyMaterialMixins, createGradientNoiseTexture, createProgramFFT2H, createProgramFFT2V, createProgramH0, createProgramHk, createProgramOcean, createProgramPostFFT2, createRandomNoiseTexture, decode2HalfFromRGBA, decodeFloatFromRGBA, decodeNormalizedFloatFromRGBA, decodeRGBM, encode2HalfToRGBA, encodeFloatToRGBA, encodeNormalizedFloatToRGBA, encodeRGBM, fetchNormalizedFloatForDevice, gammaToLinear, gradient, hash, interleavedGradientNoise, linearToGamma, mixinAlbedoColor, mixinBlinnPhong, mixinFoliage, mixinLambert, mixinLight, mixinPBRCommon, mixinPBRMetallicRoughness, mixinPBRSpecularGlossness, mixinTextureProps, mixinVertexColor, noise3D, panoramaToCubemap, perlinNoise2D, perlinNoise3D, prefilterCubemap, projectCubemap, projectCubemapCPU, smoothNoise3D, worleyFBM, worleyNoise };
|