@galacean/engine-core 1.2.0-beta.6 → 1.3.0-alpha.1
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/main.js +18802 -16268
- package/dist/main.js.map +1 -1
- package/dist/miniprogram.js +18802 -16268
- package/dist/module.js +18798 -16269
- package/dist/module.js.map +1 -1
- package/package.json +3 -3
- package/types/2d/sprite/SpriteMask.d.ts +11 -0
- package/types/2d/sprite/SpriteRenderer.d.ts +6 -3
- package/types/2d/text/TextRenderer.d.ts +10 -4
- package/types/Camera.d.ts +11 -3
- package/types/Deprecated.d.ts +101 -0
- package/types/Engine.d.ts +3 -0
- package/types/RenderPipeline/BasicRenderPipeline.d.ts +11 -5
- package/types/RenderPipeline/BatchUtils.d.ts +1 -0
- package/types/RenderPipeline/BatcherManager.d.ts +1 -12
- package/types/RenderPipeline/Chunk.d.ts +1 -0
- package/types/RenderPipeline/MaskManager.d.ts +1 -0
- package/types/RenderPipeline/PipelinePass.d.ts +1 -1
- package/types/RenderPipeline/PrimitiveChunk.d.ts +1 -0
- package/types/RenderPipeline/PrimitiveChunkManager.d.ts +1 -0
- package/types/RenderPipeline/RenderElement.d.ts +9 -6
- package/types/RenderPipeline/RenderQueue.d.ts +1 -30
- package/types/RenderPipeline/SubPrimitiveChunk.d.ts +1 -0
- package/types/RenderPipeline/SubRenderElement.d.ts +22 -0
- package/types/RenderPipeline/VertexArea.d.ts +1 -0
- package/types/RenderPipeline/batcher/MeshBuffer.d.ts +1 -0
- package/types/RenderPipeline/enums/RenderBufferStoreAction.d.ts +13 -0
- package/types/RenderPipeline/index.d.ts +1 -1
- package/types/Renderer.d.ts +4 -3
- package/types/Scene.d.ts +6 -0
- package/types/animation/Animator.d.ts +35 -6
- package/types/animation/AnimatorCondition.d.ts +13 -0
- package/types/animation/AnimatorController.d.ts +32 -2
- package/types/animation/AnimatorControllerParameter.d.ts +10 -0
- package/types/animation/AnimatorState.d.ts +15 -5
- package/types/animation/AnimatorStateMachine.d.ts +44 -0
- package/types/animation/AnimatorStateTransition.d.ts +51 -0
- package/types/animation/enums/AnimatorConditionMode.d.ts +9 -0
- package/types/animation/index.d.ts +1 -1
- package/types/asset/AssetType.d.ts +2 -0
- package/types/graphic/SubMesh.d.ts +3 -16
- package/types/graphic/SubPrimitive.d.ts +10 -0
- package/types/graphic/index.d.ts +1 -0
- package/types/index.d.ts +2 -1
- package/types/material/BaseMaterial.d.ts +1 -1
- package/types/mesh/SkinnedMeshRenderer.d.ts +1 -1
- package/types/particle/ParticleGenerator.d.ts +20 -0
- package/types/particle/ParticleRenderer.d.ts +3 -1
- package/types/particle/modules/EmissionModule.d.ts +6 -2
- package/types/particle/modules/MainModule.d.ts +49 -15
- package/types/particle/modules/ParticleCompositeCurve.d.ts +35 -10
- package/types/particle/modules/ParticleCurve.d.ts +16 -9
- package/types/particle/modules/ParticleGeneratorModule.d.ts +6 -2
- package/types/particle/modules/SizeOverLifetimeModule.d.ts +27 -8
- package/types/particle/modules/VelocityOverLifetimeModule.d.ts +29 -8
- package/types/particle/modules/shape/BaseShape.d.ts +14 -4
- package/types/particle/modules/shape/BoxShape.d.ts +7 -2
- package/types/particle/modules/shape/CircleShape.d.ts +25 -8
- package/types/particle/modules/shape/ConeShape.d.ts +24 -8
- package/types/particle/modules/shape/HemisphereShape.d.ts +6 -2
- package/types/particle/modules/shape/SphereShape.d.ts +6 -2
- package/types/postProcess/PostProcessEffect.d.ts +13 -0
- package/types/postProcess/PostProcessManager.d.ts +1 -0
- package/types/postProcess/PostProcessPass.d.ts +55 -0
- package/types/postProcess/effects/BloomEffect.d.ts +94 -0
- package/types/postProcess/effects/TonemappingEffect.d.ts +35 -0
- package/types/postProcess/effects/index.d.ts +2 -0
- package/types/postProcess/index.d.ts +3 -0
- package/types/shader/enums/ShaderDataGroup.d.ts +4 -2
- package/types/shader/enums/ShaderPlatformTarget.d.ts +4 -0
- package/types/shader/enums/ShaderType.d.ts +1 -0
- package/types/shader/state/RenderState.d.ts +1 -0
- package/types/texture/enums/PixelFormat.d.ts +73 -0
- package/types/texture/enums/TextureFormat.d.ts +2 -0
- package/types/utils/ClearableObjectPool.d.ts +16 -0
- package/types/utils/ObjectPool.d.ts +16 -0
- package/types/utils/ReturnableObjectPool.d.ts +16 -0
- package/types/utils/index.d.ts +3 -0
- package/types/input/pointer/PointerEvent.d.ts +0 -4
- package/types/input/pointer/PointerEventType.d.ts +0 -7
- package/types/ui/Image.d.ts +0 -41
- package/types/ui/RedBlackTree.d.ts +0 -2
- package/types/ui/UICanvas.d.ts +0 -49
- package/types/ui/UIRenderer.d.ts +0 -20
- package/types/ui/UITransform.d.ts +0 -20
- package/types/ui/enums/BlockingObjects.d.ts +0 -6
- package/types/ui/enums/CanvasRenderMode.d.ts +0 -8
- package/types/ui/enums/ResolutionAdaptationStrategy.d.ts +0 -10
- package/types/ui/index.d.ts +0 -6
|
@@ -3,6 +3,7 @@ import { ShaderProperty } from "../../shader/ShaderProperty";
|
|
|
3
3
|
import { ParticleSimulationSpace } from "../enums/ParticleSimulationSpace";
|
|
4
4
|
import { ParticleCompositeCurve } from "./ParticleCompositeCurve";
|
|
5
5
|
import { ParticleGeneratorModule } from "./ParticleGeneratorModule";
|
|
6
|
+
import { ParticleGenerator } from "../ParticleGenerator";
|
|
6
7
|
/**
|
|
7
8
|
* Velocity over lifetime module.
|
|
8
9
|
*/
|
|
@@ -20,15 +21,35 @@ export declare class VelocityOverLifetimeModule extends ParticleGeneratorModule
|
|
|
20
21
|
static readonly _maxGradientYProperty: ShaderProperty;
|
|
21
22
|
static readonly _maxGradientZProperty: ShaderProperty;
|
|
22
23
|
static readonly _spaceProperty: ShaderProperty;
|
|
23
|
-
/** Velocity over lifetime for x axis. */
|
|
24
|
-
velocityX: ParticleCompositeCurve;
|
|
25
|
-
/** Velocity over lifetime for z axis. */
|
|
26
|
-
velocityY: ParticleCompositeCurve;
|
|
27
|
-
/** Velocity over lifetime for z axis. */
|
|
28
|
-
velocityZ: ParticleCompositeCurve;
|
|
29
|
-
/** Velocity space. */
|
|
30
|
-
space: ParticleSimulationSpace;
|
|
31
24
|
private _velocityMinConstant;
|
|
32
25
|
private _velocityMaxConstant;
|
|
33
26
|
private _velocityMacro;
|
|
27
|
+
private _velocityX;
|
|
28
|
+
private _velocityY;
|
|
29
|
+
private _velocityZ;
|
|
30
|
+
private _space;
|
|
31
|
+
/**
|
|
32
|
+
* Velocity over lifetime for x axis.
|
|
33
|
+
*/
|
|
34
|
+
get velocityX(): ParticleCompositeCurve;
|
|
35
|
+
set velocityX(value: ParticleCompositeCurve);
|
|
36
|
+
/**
|
|
37
|
+
* Velocity over lifetime for y axis.
|
|
38
|
+
*/
|
|
39
|
+
get velocityY(): ParticleCompositeCurve;
|
|
40
|
+
set velocityY(value: ParticleCompositeCurve);
|
|
41
|
+
/**
|
|
42
|
+
* Velocity over lifetime for z axis.
|
|
43
|
+
*/
|
|
44
|
+
get velocityZ(): ParticleCompositeCurve;
|
|
45
|
+
set velocityZ(value: ParticleCompositeCurve);
|
|
46
|
+
/**
|
|
47
|
+
* Velocity space.
|
|
48
|
+
*/
|
|
49
|
+
get space(): ParticleSimulationSpace;
|
|
50
|
+
set space(value: ParticleSimulationSpace);
|
|
51
|
+
get enabled(): boolean;
|
|
52
|
+
set enabled(value: boolean);
|
|
53
|
+
constructor(generator: ParticleGenerator);
|
|
54
|
+
private _onCompositeCurveChange;
|
|
34
55
|
}
|
|
@@ -1,12 +1,22 @@
|
|
|
1
1
|
import { ParticleShapeType } from "./enums/ParticleShapeType";
|
|
2
|
+
import { UpdateFlagManager } from "../../../UpdateFlagManager";
|
|
2
3
|
/**
|
|
3
4
|
* Base class for all particle shapes.
|
|
4
5
|
*/
|
|
5
6
|
export declare abstract class BaseShape {
|
|
6
7
|
/** The type of shape to emit particles from. */
|
|
7
8
|
abstract readonly shapeType: ParticleShapeType;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
protected _updateManager: UpdateFlagManager;
|
|
10
|
+
private _enabled;
|
|
11
|
+
private _randomDirectionAmount;
|
|
12
|
+
/**
|
|
13
|
+
* Specifies whether the ShapeModule is enabled or disabled.
|
|
14
|
+
*/
|
|
15
|
+
get enabled(): boolean;
|
|
16
|
+
set enabled(value: boolean);
|
|
17
|
+
/**
|
|
18
|
+
* Randomizes the starting direction of particles.
|
|
19
|
+
*/
|
|
20
|
+
get randomDirectionAmount(): number;
|
|
21
|
+
set randomDirectionAmount(value: number);
|
|
12
22
|
}
|
|
@@ -7,6 +7,11 @@ import { ParticleShapeType } from "./enums/ParticleShapeType";
|
|
|
7
7
|
export declare class BoxShape extends BaseShape {
|
|
8
8
|
private static _tempVector30;
|
|
9
9
|
readonly shapeType = ParticleShapeType.Box;
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
private _size;
|
|
11
|
+
/**
|
|
12
|
+
* The size of the box.
|
|
13
|
+
*/
|
|
14
|
+
get size(): Vector3;
|
|
15
|
+
set size(value: Vector3);
|
|
16
|
+
constructor();
|
|
12
17
|
}
|
|
@@ -7,12 +7,29 @@ import { ParticleShapeType } from "./enums/ParticleShapeType";
|
|
|
7
7
|
export declare class CircleShape extends BaseShape {
|
|
8
8
|
private static _tempPositionPoint;
|
|
9
9
|
readonly shapeType = ParticleShapeType.Circle;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
10
|
+
private _radius;
|
|
11
|
+
private _arc;
|
|
12
|
+
private _arcMode;
|
|
13
|
+
private _arcSpeed;
|
|
14
|
+
/**
|
|
15
|
+
* Radius of the shape to emit particles from.
|
|
16
|
+
*/
|
|
17
|
+
get radius(): number;
|
|
18
|
+
set radius(value: number);
|
|
19
|
+
/**
|
|
20
|
+
* Angle of the circle arc to emit particles from.
|
|
21
|
+
*/
|
|
22
|
+
get arc(): number;
|
|
23
|
+
set arc(value: number);
|
|
24
|
+
/**
|
|
25
|
+
* The mode to generate particles around the arc.
|
|
26
|
+
*/
|
|
27
|
+
get arcMode(): ParticleShapeArcMode;
|
|
28
|
+
set arcMode(value: ParticleShapeArcMode);
|
|
29
|
+
/**
|
|
30
|
+
* The speed of complete 360 degree rotation.
|
|
31
|
+
*/
|
|
32
|
+
get arcSpeed(): number;
|
|
33
|
+
set arcSpeed(value: number);
|
|
34
|
+
private _getUnitArcRange;
|
|
18
35
|
}
|
|
@@ -9,14 +9,30 @@ export declare class ConeShape extends BaseShape {
|
|
|
9
9
|
private static _tempVector30;
|
|
10
10
|
private static _tempVector31;
|
|
11
11
|
readonly shapeType = ParticleShapeType.Cone;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
12
|
+
private _angle;
|
|
13
|
+
private _radius;
|
|
14
|
+
private _length;
|
|
15
|
+
private _emitType;
|
|
16
|
+
/**
|
|
17
|
+
* Angle of the cone to emit particles from.
|
|
18
|
+
*/
|
|
19
|
+
get angle(): number;
|
|
20
|
+
set angle(value: number);
|
|
21
|
+
/**
|
|
22
|
+
* Radius of the shape to emit particles from.
|
|
23
|
+
*/
|
|
24
|
+
get radius(): number;
|
|
25
|
+
set radius(value: number);
|
|
26
|
+
/**
|
|
27
|
+
* Length of the cone to emit particles from.
|
|
28
|
+
*/
|
|
29
|
+
get length(): number;
|
|
30
|
+
set length(value: number);
|
|
31
|
+
/**
|
|
32
|
+
* Cone emitter type.
|
|
33
|
+
*/
|
|
34
|
+
get emitType(): ConeEmitType;
|
|
35
|
+
set emitType(value: ConeEmitType);
|
|
20
36
|
}
|
|
21
37
|
/**
|
|
22
38
|
* Cone emitter type.
|
|
@@ -5,6 +5,10 @@ import { ParticleShapeType } from "./enums/ParticleShapeType";
|
|
|
5
5
|
*/
|
|
6
6
|
export declare class HemisphereShape extends BaseShape {
|
|
7
7
|
readonly shapeType = ParticleShapeType.Hemisphere;
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
private _radius;
|
|
9
|
+
/**
|
|
10
|
+
* Radius of the shape to emit particles from.
|
|
11
|
+
*/
|
|
12
|
+
get radius(): number;
|
|
13
|
+
set radius(value: number);
|
|
10
14
|
}
|
|
@@ -5,6 +5,10 @@ import { ParticleShapeType } from "./enums/ParticleShapeType";
|
|
|
5
5
|
*/
|
|
6
6
|
export declare class SphereShape extends BaseShape {
|
|
7
7
|
readonly shapeType = ParticleShapeType.Sphere;
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
private _radius;
|
|
9
|
+
/**
|
|
10
|
+
* Radius of the shape to emit particles from.
|
|
11
|
+
*/
|
|
12
|
+
get radius(): number;
|
|
13
|
+
set radius(value: number);
|
|
10
14
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { RenderContext } from "../RenderPipeline/RenderContext";
|
|
2
|
+
import { RenderTarget, Texture2D } from "../texture";
|
|
3
|
+
export declare abstract class PostProcessEffect {
|
|
4
|
+
readonly engine: any;
|
|
5
|
+
private _enabled;
|
|
6
|
+
/**
|
|
7
|
+
* Indicates whether the post process effect is enabled.
|
|
8
|
+
*/
|
|
9
|
+
get enabled(): boolean;
|
|
10
|
+
set enabled(value: boolean);
|
|
11
|
+
constructor(engine: any);
|
|
12
|
+
abstract onRender(context: RenderContext, srcTexture: Texture2D, destRenderTarget: RenderTarget): void;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Engine } from "../Engine";
|
|
2
|
+
import { PipelinePass } from "../RenderPipeline/PipelinePass";
|
|
3
|
+
import { RenderContext } from "../RenderPipeline/RenderContext";
|
|
4
|
+
import { PostProcessEffect } from "./PostProcessEffect";
|
|
5
|
+
export declare class PostProcessPass extends PipelinePass {
|
|
6
|
+
private _isActive;
|
|
7
|
+
private _effects;
|
|
8
|
+
/** The name of pass. */
|
|
9
|
+
name: string;
|
|
10
|
+
/**
|
|
11
|
+
* Whether to activate current post process.
|
|
12
|
+
*/
|
|
13
|
+
get isActive(): boolean;
|
|
14
|
+
set isActive(value: boolean);
|
|
15
|
+
/**
|
|
16
|
+
* Get the post process effect list.
|
|
17
|
+
*/
|
|
18
|
+
get effects(): ReadonlyArray<PostProcessEffect>;
|
|
19
|
+
/**
|
|
20
|
+
* Create a post process pass.
|
|
21
|
+
* @param engine - The engine the pass belongs to
|
|
22
|
+
* @param name - The pass name if need
|
|
23
|
+
*/
|
|
24
|
+
constructor(engine: Engine, name?: string);
|
|
25
|
+
onRender(context: RenderContext): void;
|
|
26
|
+
/**
|
|
27
|
+
* Get post process effect which match the type.
|
|
28
|
+
* @param type - The type of the post process effect
|
|
29
|
+
* @returns The first post process effect which match type
|
|
30
|
+
*/
|
|
31
|
+
getEffect(type: typeof PostProcessEffect): PostProcessEffect | null;
|
|
32
|
+
/**
|
|
33
|
+
* Get post process effects which match the type.
|
|
34
|
+
* @param type - The type of the post process effect
|
|
35
|
+
* @param results - The effects which match type
|
|
36
|
+
* @returns The effects which match type
|
|
37
|
+
*/
|
|
38
|
+
getEffects(type: typeof PostProcessEffect, results: PostProcessEffect[]): PostProcessEffect[];
|
|
39
|
+
/**
|
|
40
|
+
* Add post process effect.
|
|
41
|
+
* @param effect - The post process effect want to be added
|
|
42
|
+
*/
|
|
43
|
+
addEffect(effect: PostProcessEffect): void;
|
|
44
|
+
/**
|
|
45
|
+
* Add post process at specified index.
|
|
46
|
+
* @param indexOrEffect - Specified index
|
|
47
|
+
* @param effect - The post process effect want to be added
|
|
48
|
+
*/
|
|
49
|
+
addEffect(index: number, effect: PostProcessEffect): void;
|
|
50
|
+
/**
|
|
51
|
+
* Remove post process effect.
|
|
52
|
+
* @param effect - The post process effect want to be removed
|
|
53
|
+
*/
|
|
54
|
+
removeEffect(effect: PostProcessEffect): void;
|
|
55
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { Color } from "@galacean/engine-math";
|
|
2
|
+
import { RenderContext } from "../../RenderPipeline/RenderContext";
|
|
3
|
+
import { Material } from "../../material";
|
|
4
|
+
import { Texture2D } from "../../texture";
|
|
5
|
+
/**
|
|
6
|
+
* This controls the size of the bloom texture.
|
|
7
|
+
*/
|
|
8
|
+
export declare enum BloomDownScaleMode {
|
|
9
|
+
/**
|
|
10
|
+
* Use this to select half size as the starting resolution.
|
|
11
|
+
*/
|
|
12
|
+
Half = 0,
|
|
13
|
+
/**
|
|
14
|
+
* Use this to select quarter size as the starting resolution.
|
|
15
|
+
*/
|
|
16
|
+
Quarter = 1
|
|
17
|
+
}
|
|
18
|
+
export declare class BloomEffect {
|
|
19
|
+
private _uberMaterial;
|
|
20
|
+
static readonly SHADER_NAME = "PostProcessEffect Bloom";
|
|
21
|
+
private static _hqMacro;
|
|
22
|
+
private static _dirtMacro;
|
|
23
|
+
private static _bloomParams;
|
|
24
|
+
private static _lowMipTextureProp;
|
|
25
|
+
private static _lowMipTexelSizeProp;
|
|
26
|
+
private static _enableMacro;
|
|
27
|
+
private static _bloomTextureProp;
|
|
28
|
+
private static _dirtTextureProp;
|
|
29
|
+
private static _tintProp;
|
|
30
|
+
private static _bloomIntensityParams;
|
|
31
|
+
private static _dirtTilingOffsetProp;
|
|
32
|
+
private _bloomMaterial;
|
|
33
|
+
private _threshold;
|
|
34
|
+
private _scatter;
|
|
35
|
+
private _highQualityFiltering;
|
|
36
|
+
private _mipDownRT;
|
|
37
|
+
private _mipUpRT;
|
|
38
|
+
private _maxIterations;
|
|
39
|
+
private _enabled;
|
|
40
|
+
/**
|
|
41
|
+
* Controls the starting resolution that this effect begins processing.
|
|
42
|
+
*/
|
|
43
|
+
downScale: BloomDownScaleMode;
|
|
44
|
+
/**
|
|
45
|
+
* Indicates whether the post process effect is enabled.
|
|
46
|
+
*/
|
|
47
|
+
get enabled(): boolean;
|
|
48
|
+
set enabled(value: boolean);
|
|
49
|
+
/**
|
|
50
|
+
* Set the level of brightness to filter out pixels under this level.
|
|
51
|
+
* @remarks This value is expressed in gamma-space.
|
|
52
|
+
*/
|
|
53
|
+
get threshold(): number;
|
|
54
|
+
set threshold(value: number);
|
|
55
|
+
/**
|
|
56
|
+
* Controls the radius of the bloom effect.
|
|
57
|
+
*/
|
|
58
|
+
get scatter(): number;
|
|
59
|
+
set scatter(value: number);
|
|
60
|
+
/**
|
|
61
|
+
* Controls the strength of the bloom effect.
|
|
62
|
+
*/
|
|
63
|
+
get intensity(): number;
|
|
64
|
+
set intensity(value: number);
|
|
65
|
+
/**
|
|
66
|
+
* Specifies the tint of the bloom effect.
|
|
67
|
+
*/
|
|
68
|
+
get tint(): Color;
|
|
69
|
+
set tint(value: Color);
|
|
70
|
+
/**
|
|
71
|
+
* Controls whether to use bicubic sampling instead of bilinear sampling for the upSampling passes.
|
|
72
|
+
* @remarks This is slightly more expensive but helps getting smoother visuals.
|
|
73
|
+
*/
|
|
74
|
+
get highQualityFiltering(): boolean;
|
|
75
|
+
set highQualityFiltering(value: boolean);
|
|
76
|
+
/**
|
|
77
|
+
* Specifies a Texture to add smudges or dust to the bloom effect.
|
|
78
|
+
*/
|
|
79
|
+
get dirtTexture(): Texture2D;
|
|
80
|
+
set dirtTexture(value: Texture2D);
|
|
81
|
+
/**
|
|
82
|
+
* Controls the strength of the lens dirt.
|
|
83
|
+
*/
|
|
84
|
+
get dirtIntensity(): number;
|
|
85
|
+
set dirtIntensity(value: number);
|
|
86
|
+
constructor(_uberMaterial: Material);
|
|
87
|
+
onRender(context: RenderContext, srcTexture: Texture2D): void;
|
|
88
|
+
private _calculateMipCount;
|
|
89
|
+
private _prefilter;
|
|
90
|
+
private _downsample;
|
|
91
|
+
private _upsample;
|
|
92
|
+
private _setupUber;
|
|
93
|
+
private _releaseRenderTargets;
|
|
94
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Material } from "../../material";
|
|
2
|
+
/**
|
|
3
|
+
* Options to select a tonemapping algorithm to use.
|
|
4
|
+
*/
|
|
5
|
+
export declare enum TonemappingMode {
|
|
6
|
+
/**
|
|
7
|
+
* Neutral tonemapper
|
|
8
|
+
* @remarks Use this option if you only want range-remapping with minimal impact on color hue and saturation.
|
|
9
|
+
*/
|
|
10
|
+
Neutral = 0,
|
|
11
|
+
/**
|
|
12
|
+
* ACES Filmic reference tonemapper (custom approximation)
|
|
13
|
+
* @remarks
|
|
14
|
+
* Use this option to apply a close approximation of the reference ACES tonemapper for a more filmic look.
|
|
15
|
+
* It is more contrasted than Neutral and has an effect on actual color hue and saturation.
|
|
16
|
+
*/
|
|
17
|
+
ACES = 1
|
|
18
|
+
}
|
|
19
|
+
export declare class TonemappingEffect {
|
|
20
|
+
private _uberMaterial;
|
|
21
|
+
private static _enableMacro;
|
|
22
|
+
private _mode;
|
|
23
|
+
private _enabled;
|
|
24
|
+
/**
|
|
25
|
+
* Indicates whether the post process effect is enabled.
|
|
26
|
+
*/
|
|
27
|
+
get enabled(): boolean;
|
|
28
|
+
set enabled(value: boolean);
|
|
29
|
+
/**
|
|
30
|
+
* Use this to select a tonemapping algorithm to use.
|
|
31
|
+
*/
|
|
32
|
+
get mode(): TonemappingMode;
|
|
33
|
+
set mode(value: TonemappingMode);
|
|
34
|
+
constructor(_uberMaterial: Material);
|
|
35
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Defines various pixel formats.
|
|
3
|
+
*/
|
|
4
|
+
export declare enum PixelFormat {
|
|
5
|
+
/** RGB format, 8 bits per channel. */
|
|
6
|
+
R8G8B8 = 0,
|
|
7
|
+
/** RGBA format, 8 bits per channel. */
|
|
8
|
+
R8G8B8A8 = 1,
|
|
9
|
+
/** RGBA format, 4 bits per channel. */
|
|
10
|
+
R4G4B4A4 = 2,
|
|
11
|
+
/** RGBA format, 5 bits in R channel, 5 bits in G channel, 5 bits in B channel, 1 bit in A channel. */
|
|
12
|
+
R5G5B5A1 = 3,
|
|
13
|
+
/** RGB format, 5 bits in R channel, 6 bits in G channel, 5 bits in B channel. */
|
|
14
|
+
R5G6B5 = 4,
|
|
15
|
+
/** Transparent format, 8 bits. */
|
|
16
|
+
Alpha8 = 5,
|
|
17
|
+
/** Luminance/alpha in RGB channel, alpha in A channel. */
|
|
18
|
+
LuminanceAlpha = 6,
|
|
19
|
+
/** RGBA format, 16 bits per channel. */
|
|
20
|
+
R16G16B16A16 = 7,
|
|
21
|
+
/** RGBA format, 32 bits per channel. */
|
|
22
|
+
R32G32B32A32 = 8,
|
|
23
|
+
/** RGB compressed format, 4 bits per pixel. */
|
|
24
|
+
BC1 = 9,
|
|
25
|
+
/** RGBA compressed format, 8 bits per pixel. */
|
|
26
|
+
BC3 = 10,
|
|
27
|
+
/** RGB(A) compressed format, 128 bits per 4x4 pixel block. */
|
|
28
|
+
BC7 = 11,
|
|
29
|
+
/** RGB compressed format, 4 bits per pixel. */
|
|
30
|
+
ETC1_RGB = 12,
|
|
31
|
+
/** RGB compressed format, 4 bits per pixel. */
|
|
32
|
+
ETC2_RGB = 13,
|
|
33
|
+
/** RGBA compressed format, 5 bits per pixel, 4 bit in RGB, 1 bit in A. */
|
|
34
|
+
ETC2_RGBA5 = 14,
|
|
35
|
+
/** RGB compressed format, 8 bits per pixel. */
|
|
36
|
+
ETC2_RGBA8 = 15,
|
|
37
|
+
/** RGB compressed format, 2 bits per pixel. */
|
|
38
|
+
PVRTC_RGB2 = 16,
|
|
39
|
+
/** RGBA compressed format, 2 bits per pixel. */
|
|
40
|
+
PVRTC_RGBA2 = 17,
|
|
41
|
+
/** RGB compressed format, 4 bits per pixel. */
|
|
42
|
+
PVRTC_RGB4 = 18,
|
|
43
|
+
/** RGBA compressed format, 4 bits per pixel. */
|
|
44
|
+
PVRTC_RGBA4 = 19,
|
|
45
|
+
/** RGB(A) compressed format, 128 bits per 4x4 pixel block. */
|
|
46
|
+
ASTC_4x4 = 20,
|
|
47
|
+
/** RGB(A) compressed format, 128 bits per 5x5 pixel block. */
|
|
48
|
+
ASTC_5x5 = 21,
|
|
49
|
+
/** RGB(A) compressed format, 128 bits per 6x6 pixel block. */
|
|
50
|
+
ASTC_6x6 = 22,
|
|
51
|
+
/** RGB(A) compressed format, 128 bits per 8x8 pixel block. */
|
|
52
|
+
ASTC_8x8 = 23,
|
|
53
|
+
/** RGB(A) compressed format, 128 bits per 10x10 pixel block. */
|
|
54
|
+
ASTC_10x10 = 24,
|
|
55
|
+
/** RGB(A) compressed format, 128 bits per 12x12 pixel block. */
|
|
56
|
+
ASTC_12x12 = 25,
|
|
57
|
+
/** Automatic depth format, engine will automatically select the supported precision. */
|
|
58
|
+
Depth = 26,
|
|
59
|
+
/** Render to stencil buffer. */
|
|
60
|
+
Stencil = 27,
|
|
61
|
+
/** Automatic depth stencil format, engine will automatically select the supported precision. */
|
|
62
|
+
DepthStencil = 28,
|
|
63
|
+
/** 16-bit depth format. */
|
|
64
|
+
Depth16 = 29,
|
|
65
|
+
/** 24-bit depth format. */
|
|
66
|
+
Depth24 = 30,
|
|
67
|
+
/** 32-bit depth format. */
|
|
68
|
+
Depth32 = 31,
|
|
69
|
+
/** 16-bit depth + 8-bit stencil format. */
|
|
70
|
+
Depth24Stencil8 = 32,
|
|
71
|
+
/** 32-bit depth + 8-bit stencil format. */
|
|
72
|
+
Depth32Stencil8 = 33
|
|
73
|
+
}
|
|
@@ -22,6 +22,8 @@ export declare enum TextureFormat {
|
|
|
22
22
|
R32G32B32A32 = 8,
|
|
23
23
|
/** RGBA unsigned integer format, 32 bits per channel. */
|
|
24
24
|
R32G32B32A32_UInt = 9,
|
|
25
|
+
/** RGB unsigned float format, 11 bits in R channel, 11 bits in G channel, 10 bits in B channel. */
|
|
26
|
+
R11G11B10_UFloat = 35,
|
|
25
27
|
/** RGB compressed format, 4 bits per pixel. */
|
|
26
28
|
BC1 = 10,
|
|
27
29
|
/** RGBA compressed format, 8 bits per pixel. */
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { IPoolElement, ObjectPool } from "./ObjectPool";
|
|
2
|
+
/**
|
|
3
|
+
* Clearable Object Pool.
|
|
4
|
+
*/
|
|
5
|
+
export declare class ClearableObjectPool<T extends IPoolElement> extends ObjectPool<T> {
|
|
6
|
+
private _usedElementCount;
|
|
7
|
+
constructor(type: new () => T);
|
|
8
|
+
/**
|
|
9
|
+
* Get an object.
|
|
10
|
+
*/
|
|
11
|
+
get(): T;
|
|
12
|
+
/**
|
|
13
|
+
* Clear used object count to 0, not destroy any object, just change index.
|
|
14
|
+
*/
|
|
15
|
+
clear(): void;
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare abstract class ObjectPool<T extends IPoolElement> {
|
|
2
|
+
protected _type: new () => T;
|
|
3
|
+
protected _elements: T[];
|
|
4
|
+
constructor(type: new () => T);
|
|
5
|
+
garbageCollection(): void;
|
|
6
|
+
abstract get(): T;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* The basic interface for Object Pool's element.
|
|
10
|
+
*/
|
|
11
|
+
export interface IPoolElement {
|
|
12
|
+
/**
|
|
13
|
+
* Called when the object need be release.
|
|
14
|
+
*/
|
|
15
|
+
dispose?(): void;
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { IPoolElement, ObjectPool } from "./ObjectPool";
|
|
2
|
+
/**
|
|
3
|
+
* Returnable Object Pool.
|
|
4
|
+
*/
|
|
5
|
+
export declare class ReturnableObjectPool<T extends IPoolElement> extends ObjectPool<T> {
|
|
6
|
+
private _lastElementIndex;
|
|
7
|
+
constructor(type: new () => T, initializeCount?: number);
|
|
8
|
+
/**
|
|
9
|
+
* Get an object from the pool.
|
|
10
|
+
*/
|
|
11
|
+
get(): T;
|
|
12
|
+
/**
|
|
13
|
+
* Return an object to the pool.
|
|
14
|
+
*/
|
|
15
|
+
return(element: T): void;
|
|
16
|
+
}
|
package/types/ui/Image.d.ts
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { Color } from "@galacean/engine-math";
|
|
2
|
-
import { Sprite, SpriteDrawMode, SpriteTileMode } from "../2d";
|
|
3
|
-
import { RenderElement } from "../RenderPipeline/RenderElement";
|
|
4
|
-
import { UIRenderer } from "./UIRenderer";
|
|
5
|
-
export declare class Image extends UIRenderer {
|
|
6
|
-
private _color;
|
|
7
|
-
private _sprite;
|
|
8
|
-
private _drawMode;
|
|
9
|
-
private _assembler;
|
|
10
|
-
private _tileMode;
|
|
11
|
-
private _tiledAdaptiveThreshold;
|
|
12
|
-
/**
|
|
13
|
-
* The draw mode of the sprite renderer.
|
|
14
|
-
*/
|
|
15
|
-
get drawMode(): SpriteDrawMode;
|
|
16
|
-
set drawMode(value: SpriteDrawMode);
|
|
17
|
-
/**
|
|
18
|
-
* The tiling mode of the sprite renderer. (Only works in tiled mode.)
|
|
19
|
-
*/
|
|
20
|
-
get tileMode(): SpriteTileMode;
|
|
21
|
-
set tileMode(value: SpriteTileMode);
|
|
22
|
-
/**
|
|
23
|
-
* Stretch Threshold in Tile Adaptive Mode, specified in normalized. (Only works in tiled adaptive mode.)
|
|
24
|
-
*/
|
|
25
|
-
get tiledAdaptiveThreshold(): number;
|
|
26
|
-
set tiledAdaptiveThreshold(value: number);
|
|
27
|
-
/**
|
|
28
|
-
* The Sprite to render.
|
|
29
|
-
*/
|
|
30
|
-
get sprite(): Sprite;
|
|
31
|
-
set sprite(value: Sprite | null);
|
|
32
|
-
/**
|
|
33
|
-
* Rendering color for the Sprite graphic.
|
|
34
|
-
*/
|
|
35
|
-
get color(): Color;
|
|
36
|
-
set color(value: Color);
|
|
37
|
-
protected _canBatch(elementA: RenderElement, elementB: RenderElement): boolean;
|
|
38
|
-
protected _batchRenderElement(elementA: RenderElement, elementB?: RenderElement): void;
|
|
39
|
-
protected _onDestroy(): void;
|
|
40
|
-
private _onSpriteChange;
|
|
41
|
-
}
|