@galacean/engine-core 0.0.0-experimental-1.2-xr.0 → 0.0.0-experimental-1.3-xr.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/dist/main.js +18595 -16071
  2. package/dist/main.js.map +1 -1
  3. package/dist/miniprogram.js +18595 -16071
  4. package/dist/module.js +18591 -16072
  5. package/dist/module.js.map +1 -1
  6. package/package.json +3 -3
  7. package/types/2d/sprite/SpriteMask.d.ts +11 -0
  8. package/types/2d/sprite/SpriteRenderer.d.ts +6 -3
  9. package/types/2d/text/TextRenderer.d.ts +10 -4
  10. package/types/Camera.d.ts +18 -7
  11. package/types/Engine.d.ts +3 -0
  12. package/types/Entity.d.ts +1 -4
  13. package/types/RenderPipeline/BasicRenderPipeline.d.ts +11 -5
  14. package/types/RenderPipeline/PipelinePass.d.ts +1 -1
  15. package/types/RenderPipeline/RenderElement.d.ts +9 -6
  16. package/types/RenderPipeline/RenderQueue.d.ts +1 -30
  17. package/types/RenderPipeline/index.d.ts +1 -1
  18. package/types/Renderer.d.ts +4 -3
  19. package/types/Scene.d.ts +6 -0
  20. package/types/animation/Animator.d.ts +35 -6
  21. package/types/animation/AnimatorController.d.ts +32 -2
  22. package/types/animation/AnimatorState.d.ts +15 -5
  23. package/types/animation/AnimatorStateMachine.d.ts +44 -0
  24. package/types/animation/enums/AnimatorConditionMode.d.ts +9 -0
  25. package/types/animation/index.d.ts +1 -1
  26. package/types/asset/AssetType.d.ts +2 -0
  27. package/types/asset/ResourceManager.d.ts +1 -3
  28. package/types/enums/ReplacementFailureStrategy.d.ts +9 -0
  29. package/types/graphic/SubMesh.d.ts +3 -16
  30. package/types/graphic/SubPrimitive.d.ts +10 -0
  31. package/types/graphic/index.d.ts +1 -0
  32. package/types/index.d.ts +4 -1
  33. package/types/material/BaseMaterial.d.ts +1 -1
  34. package/types/mesh/SkinnedMeshRenderer.d.ts +1 -1
  35. package/types/particle/ParticleGenerator.d.ts +20 -0
  36. package/types/particle/ParticleRenderer.d.ts +3 -1
  37. package/types/particle/modules/EmissionModule.d.ts +6 -2
  38. package/types/particle/modules/MainModule.d.ts +49 -15
  39. package/types/particle/modules/ParticleCompositeCurve.d.ts +35 -10
  40. package/types/particle/modules/ParticleCurve.d.ts +16 -9
  41. package/types/particle/modules/ParticleGeneratorModule.d.ts +6 -2
  42. package/types/particle/modules/SizeOverLifetimeModule.d.ts +27 -8
  43. package/types/particle/modules/VelocityOverLifetimeModule.d.ts +29 -8
  44. package/types/particle/modules/shape/BaseShape.d.ts +14 -4
  45. package/types/particle/modules/shape/BoxShape.d.ts +7 -2
  46. package/types/particle/modules/shape/CircleShape.d.ts +25 -8
  47. package/types/particle/modules/shape/ConeShape.d.ts +24 -8
  48. package/types/particle/modules/shape/HemisphereShape.d.ts +6 -2
  49. package/types/particle/modules/shape/SphereShape.d.ts +6 -2
  50. package/types/postProcess/PostProcessManager.d.ts +1 -0
  51. package/types/postProcess/effects/BloomEffect.d.ts +94 -0
  52. package/types/postProcess/effects/TonemappingEffect.d.ts +35 -0
  53. package/types/postProcess/effects/index.d.ts +2 -0
  54. package/types/postProcess/index.d.ts +3 -0
  55. package/types/shader/ShaderPass.d.ts +10 -0
  56. package/types/shader/enums/ShaderDataGroup.d.ts +4 -2
  57. package/types/shader/enums/ShaderPlatformTarget.d.ts +4 -0
  58. package/types/shader/enums/ShaderType.d.ts +1 -0
  59. package/types/shader/index.d.ts +1 -0
  60. package/types/shader/state/RenderState.d.ts +1 -0
  61. package/types/shaderlib/ShaderFactory.d.ts +2 -1
  62. package/types/texture/enums/TextureFormat.d.ts +2 -0
  63. package/types/utils/ClearableObjectPool.d.ts +6 -0
  64. package/types/utils/ObjectPool.d.ts +6 -0
  65. package/types/utils/ReturnableObjectPool.d.ts +6 -0
  66. package/types/utils/index.d.ts +3 -0
@@ -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,2 @@
1
+ export { BloomDownScaleMode, BloomEffect } from "./BloomEffect";
2
+ export { TonemappingEffect, TonemappingMode } from "./TonemappingEffect";
@@ -0,0 +1,3 @@
1
+ import { _PostProcessManager } from "./PostProcessManager";
2
+ export * from "./effects";
3
+ export { _PostProcessManager };
@@ -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
  }
@@ -8,6 +8,8 @@ export declare enum ShaderDataGroup {
8
8
  Camera = 1,
9
9
  /** Renderer group. */
10
10
  Renderer = 2,
11
- /** material group. */
12
- Material = 3
11
+ /** Material group. */
12
+ Material = 3,
13
+ /** Render element group. */
14
+ RenderElement = 4
13
15
  }
@@ -0,0 +1,4 @@
1
+ export declare enum ShaderPlatformTarget {
2
+ GLES100 = 0,
3
+ GLES300 = 1
4
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -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";
@@ -17,4 +17,5 @@ export declare class RenderState {
17
17
  readonly rasterState: RasterState;
18
18
  /** Render queue type. */
19
19
  renderQueueType: RenderQueueType;
20
+ private _applyStatesByShaderData;
20
21
  }
@@ -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: string[]): string;
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
  }
@@ -0,0 +1,3 @@
1
+ export { ClearableObjectPool } from "./ClearableObjectPool";
2
+ export type { IPoolElement } from "./ObjectPool";
3
+ export { ReturnableObjectPool } from "./ReturnableObjectPool";