@galacean/engine-core 0.0.0-experimental-1.2-xr.0 → 0.0.0-experimental-1.3-xr.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 +18595 -16071
- package/dist/main.js.map +1 -1
- package/dist/miniprogram.js +18595 -16071
- package/dist/module.js +18591 -16072
- package/dist/module.js.map +1 -1
- package/package.json +7 -7
- 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 +18 -7
- package/types/Engine.d.ts +3 -0
- package/types/Entity.d.ts +1 -4
- package/types/RenderPipeline/BasicRenderPipeline.d.ts +11 -5
- package/types/RenderPipeline/PipelinePass.d.ts +1 -1
- package/types/RenderPipeline/RenderElement.d.ts +9 -6
- package/types/RenderPipeline/RenderQueue.d.ts +1 -30
- 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/AnimatorController.d.ts +32 -2
- package/types/animation/AnimatorState.d.ts +15 -5
- package/types/animation/AnimatorStateMachine.d.ts +44 -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/asset/ResourceManager.d.ts +1 -3
- package/types/enums/ReplacementFailureStrategy.d.ts +9 -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 +4 -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/PostProcessManager.d.ts +1 -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/ShaderPass.d.ts +10 -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/index.d.ts +1 -0
- package/types/shader/state/RenderState.d.ts +1 -0
- package/types/shaderlib/ShaderFactory.d.ts +2 -1
- package/types/texture/enums/TextureFormat.d.ts +2 -0
- package/types/utils/ClearableObjectPool.d.ts +6 -0
- package/types/utils/ObjectPool.d.ts +6 -0
- package/types/utils/ReturnableObjectPool.d.ts +6 -0
- package/types/utils/index.d.ts +3 -0
- package/LICENSE +0 -21
|
@@ -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 @@
|
|
|
1
|
+
export {};
|
|
@@ -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
|
+
}
|
|
@@ -6,6 +6,11 @@ export declare class ShaderPass extends ShaderPart {
|
|
|
6
6
|
private static _shaderPassCounter;
|
|
7
7
|
private _vertexSource;
|
|
8
8
|
private _fragmentSource;
|
|
9
|
+
private readonly _type;
|
|
10
|
+
private readonly _shaderLabSource;
|
|
11
|
+
private readonly _vertexEntry;
|
|
12
|
+
private readonly _fragmentEntry;
|
|
13
|
+
private _platformMacros;
|
|
9
14
|
/**
|
|
10
15
|
* Create a shader pass.
|
|
11
16
|
* @param name - Shader pass name
|
|
@@ -21,4 +26,9 @@ export declare class ShaderPass extends ShaderPart {
|
|
|
21
26
|
* @param tags - Tags
|
|
22
27
|
*/
|
|
23
28
|
constructor(vertexSource: string, fragmentSource: string, tags?: Record<string, number | string | boolean>);
|
|
29
|
+
/**
|
|
30
|
+
* Shader Lab compilation
|
|
31
|
+
*/
|
|
32
|
+
private _compileShaderProgram;
|
|
33
|
+
private _getCanonicalShaderProgram;
|
|
24
34
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/types/shader/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export { RenderStateElementKey as RenderStateDataKey } from "./enums/RenderState
|
|
|
7
7
|
export { RenderQueueType } from "./enums/RenderQueueType";
|
|
8
8
|
export { ShaderPropertyType } from "./enums/ShaderPropertyType";
|
|
9
9
|
export { StencilOperation } from "./enums/StencilOperation";
|
|
10
|
+
export { ShaderPlatformTarget } from "./enums/ShaderPlatformTarget";
|
|
10
11
|
export { Shader } from "./Shader";
|
|
11
12
|
export { ShaderData } from "./ShaderData";
|
|
12
13
|
export { ShaderMacro } from "./ShaderMacro";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { ShaderMacro } from "../shader/ShaderMacro";
|
|
1
2
|
export declare class ShaderFactory {
|
|
2
3
|
private static readonly _has300OutInFragReg;
|
|
3
|
-
static parseCustomMacros(macros:
|
|
4
|
+
static parseCustomMacros(macros: ShaderMacro[]): string;
|
|
4
5
|
static registerInclude(includeName: string, includeSource: string): void;
|
|
5
6
|
static unRegisterInclude(includeName: string): void;
|
|
6
7
|
/**
|
|
@@ -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. */
|
|
@@ -5,6 +5,12 @@ import { IPoolElement, ObjectPool } from "./ObjectPool";
|
|
|
5
5
|
export declare class ClearableObjectPool<T extends IPoolElement> extends ObjectPool<T> {
|
|
6
6
|
private _usedElementCount;
|
|
7
7
|
constructor(type: new () => T);
|
|
8
|
+
/**
|
|
9
|
+
* Get an object.
|
|
10
|
+
*/
|
|
8
11
|
get(): T;
|
|
12
|
+
/**
|
|
13
|
+
* Clear used object count to 0, not destroy any object, just change index.
|
|
14
|
+
*/
|
|
9
15
|
clear(): void;
|
|
10
16
|
}
|
|
@@ -5,6 +5,12 @@ export declare abstract class ObjectPool<T extends IPoolElement> {
|
|
|
5
5
|
garbageCollection(): void;
|
|
6
6
|
abstract get(): T;
|
|
7
7
|
}
|
|
8
|
+
/**
|
|
9
|
+
* The basic interface for Object Pool's element.
|
|
10
|
+
*/
|
|
8
11
|
export interface IPoolElement {
|
|
12
|
+
/**
|
|
13
|
+
* Called when the object need be release.
|
|
14
|
+
*/
|
|
9
15
|
dispose?(): void;
|
|
10
16
|
}
|
|
@@ -5,6 +5,12 @@ import { IPoolElement, ObjectPool } from "./ObjectPool";
|
|
|
5
5
|
export declare class ReturnableObjectPool<T extends IPoolElement> extends ObjectPool<T> {
|
|
6
6
|
private _lastElementIndex;
|
|
7
7
|
constructor(type: new () => T, initializeCount?: number);
|
|
8
|
+
/**
|
|
9
|
+
* Get an object from the pool.
|
|
10
|
+
*/
|
|
8
11
|
get(): T;
|
|
12
|
+
/**
|
|
13
|
+
* Return an object to the pool.
|
|
14
|
+
*/
|
|
9
15
|
return(element: T): void;
|
|
10
16
|
}
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
The MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2020 - present Ant Group
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
|
13
|
-
all copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
-
THE SOFTWARE.
|