@galacean/engine-core 0.0.0-experimental-1.3-xr.10 → 0.0.0-experimental-1.4-small-language.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.
- package/dist/main.js +17038 -15366
- package/dist/main.js.map +1 -1
- package/dist/module.js +15833 -14279
- package/dist/module.js.map +1 -1
- package/package.json +3 -3
- package/types/2d/assembler/ISpriteAssembler.d.ts +11 -1
- package/types/2d/assembler/ISpriteRenderer.d.ts +16 -0
- package/types/2d/assembler/SimpleSpriteAssembler.d.ts +13 -1
- package/types/2d/assembler/SlicedSpriteAssembler.d.ts +15 -1
- package/types/2d/assembler/TiledSpriteAssembler.d.ts +17 -1
- package/types/2d/enums/SpriteModifyFlags.d.ts +9 -0
- package/types/2d/index.d.ts +12 -5
- package/types/2d/sprite/Sprite.d.ts +2 -2
- package/types/2d/sprite/SpriteMask.d.ts +4 -2
- package/types/2d/sprite/SpriteRenderer.d.ts +5 -4
- package/types/2d/sprite/index.d.ts +1 -1
- package/types/2d/text/ITextRenderer.d.ts +8 -0
- package/types/2d/text/TextRenderer.d.ts +26 -5
- package/types/2d/text/index.d.ts +3 -1
- package/types/BasicResources.d.ts +2 -1
- package/types/Camera.d.ts +7 -3
- package/types/ComponentsManager.d.ts +4 -0
- package/types/Engine.d.ts +12 -3
- package/types/Entity.d.ts +18 -4
- package/types/Polyfill.d.ts +1 -0
- package/types/RenderPipeline/BasicRenderPipeline.d.ts +4 -0
- package/types/RenderPipeline/Blitter.d.ts +28 -0
- package/types/RenderPipeline/enums/RenderQueueMaskType.d.ts +1 -0
- package/types/RenderPipeline/index.d.ts +3 -1
- package/types/Renderer.d.ts +15 -3
- package/types/Scene.d.ts +4 -1
- package/types/Script.d.ts +42 -18
- package/types/Transform.d.ts +17 -7
- package/types/animation/Animator.d.ts +27 -5
- package/types/animation/AnimatorController.d.ts +12 -2
- package/types/animation/AnimatorState.d.ts +0 -1
- package/types/animation/AnimatorStateMachine.d.ts +10 -6
- package/types/animation/AnimatorStateTransition.d.ts +13 -5
- package/types/animation/AnimatorStateTransitionCollection.d.ts +1 -0
- package/types/asset/AssetPromise.d.ts +30 -5
- package/types/asset/AssetType.d.ts +8 -2
- package/types/asset/Loader.d.ts +0 -2
- package/types/asset/ResourceManager.d.ts +4 -1
- package/types/asset/request.d.ts +10 -3
- package/types/audio/AudioClip.d.ts +24 -0
- package/types/audio/AudioManager.d.ts +1 -0
- package/types/audio/AudioSource.d.ts +72 -0
- package/types/audio/index.d.ts +3 -0
- package/types/base/Constant.d.ts +22 -22
- package/types/enums/CameraModifyFlags.d.ts +17 -0
- package/types/enums/EntityModifyFlags.d.ts +9 -0
- package/types/{2d/enums → enums}/SpriteMaskLayer.d.ts +3 -1
- package/types/index.d.ts +6 -1
- package/types/input/index.d.ts +5 -2
- package/types/input/pointer/Pointer.d.ts +8 -2
- package/types/input/pointer/PointerEventData.d.ts +12 -0
- package/types/input/pointer/PointerManager.d.ts +9 -1
- package/types/input/pointer/emitter/IHitResult.d.ts +1 -0
- package/types/input/pointer/emitter/PhysicsPointerEventEmitter.d.ts +1 -0
- package/types/input/pointer/emitter/PointerEventEmitter.d.ts +30 -0
- package/types/lighting/DirectLight.d.ts +5 -0
- package/types/lighting/Light.d.ts +4 -1
- package/types/material/BaseMaterial.d.ts +4 -2
- package/types/material/Material.d.ts +1 -0
- package/types/material/PBRMaterial.d.ts +130 -0
- package/types/material/enums/Refraction.d.ts +9 -0
- package/types/material/index.d.ts +1 -0
- package/types/material/utils/PrefilteredDFG.d.ts +7 -0
- package/types/particle/ParticleGenerator.d.ts +1 -0
- package/types/particle/modules/MainModule.d.ts +1 -2
- package/types/physics/CharacterController.d.ts +5 -6
- package/types/physics/Collider.d.ts +3 -1
- package/types/physics/Collision.d.ts +18 -0
- package/types/physics/ContactPoint.d.ts +14 -0
- package/types/physics/DynamicCollider.d.ts +35 -4
- package/types/physics/HitResult.d.ts +1 -1
- package/types/physics/PhysicsMaterial.d.ts +5 -1
- package/types/physics/index.d.ts +2 -0
- package/types/physics/joint/FixedJoint.d.ts +1 -0
- package/types/physics/joint/HingeJoint.d.ts +11 -7
- package/types/physics/joint/Joint.d.ts +32 -10
- package/types/physics/joint/JointLimits.d.ts +34 -10
- package/types/physics/joint/JointMotor.d.ts +27 -8
- package/types/physics/joint/SpringJoint.d.ts +2 -6
- package/types/physics/shape/BoxColliderShape.d.ts +1 -0
- package/types/physics/shape/CapsuleColliderShape.d.ts +1 -0
- package/types/physics/shape/ColliderShape.d.ts +11 -3
- package/types/physics/shape/PlaneColliderShape.d.ts +2 -0
- package/types/physics/shape/SphereColliderShape.d.ts +1 -1
- package/types/postProcess/PostProcess.d.ts +64 -0
- package/types/postProcess/PostProcessEffect.d.ts +26 -0
- package/types/postProcess/PostProcessEffectParameter.d.ts +119 -0
- package/types/postProcess/PostProcessManager.d.ts +37 -1
- package/types/postProcess/PostProcessPass.d.ts +50 -0
- package/types/postProcess/PostProcessUberPass.d.ts +25 -0
- package/types/postProcess/effects/BloomEffect.d.ts +22 -66
- package/types/postProcess/effects/TonemappingEffect.d.ts +6 -16
- package/types/postProcess/index.d.ts +6 -2
- package/types/shader/Shader.d.ts +1 -1
- package/types/shader/index.d.ts +1 -0
- package/types/shaderlib/ShaderLib.d.ts +2 -0
- package/types/shaderlib/pbr/index.d.ts +2 -0
- package/types/ui/IUICanvas.d.ts +1 -0
- package/types/ui/UIUtils.d.ts +11 -0
- package/dist/miniprogram.js +0 -34626
package/types/base/Constant.d.ts
CHANGED
|
@@ -3,37 +3,37 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export declare enum DataType {
|
|
5
5
|
/** Float */
|
|
6
|
-
FLOAT = 5126
|
|
6
|
+
FLOAT = 5126,// gl.FLOAT
|
|
7
7
|
/** Floating-point two-dimensional vector */
|
|
8
|
-
FLOAT_VEC2 = 35664
|
|
8
|
+
FLOAT_VEC2 = 35664,// gl.FLOAT_VEC2
|
|
9
9
|
/** Floating-point three-dimensional vector */
|
|
10
|
-
FLOAT_VEC3 = 35665
|
|
10
|
+
FLOAT_VEC3 = 35665,// gl.FLOAT_VEC3
|
|
11
11
|
/** Floating-point four-dimensional vector */
|
|
12
|
-
FLOAT_VEC4 = 35666
|
|
12
|
+
FLOAT_VEC4 = 35666,// gl.FLOAT_VEC4
|
|
13
13
|
/** Integer */
|
|
14
|
-
INT = 5124
|
|
14
|
+
INT = 5124,// gl.INT
|
|
15
15
|
/** Integer two-dimensional vector */
|
|
16
|
-
INT_VEC2 = 35667
|
|
16
|
+
INT_VEC2 = 35667,// gl.INT_VEC2
|
|
17
17
|
/** Integer three-dimensional vector */
|
|
18
|
-
INT_VEC3 = 35668
|
|
18
|
+
INT_VEC3 = 35668,// gl.INT_VEC3
|
|
19
19
|
/** Integer four-dimensional vector */
|
|
20
|
-
INT_VEC4 = 35669
|
|
20
|
+
INT_VEC4 = 35669,// gl.INT_VEC4
|
|
21
21
|
/** Boolean */
|
|
22
|
-
BOOL = 35670
|
|
22
|
+
BOOL = 35670,// gl.BOOL
|
|
23
23
|
/** Boolean two-dimensional vector */
|
|
24
|
-
BOOL_VEC2 = 35671
|
|
24
|
+
BOOL_VEC2 = 35671,// gl.BOOL_VEC2
|
|
25
25
|
/** Boolean three-dimensional vector */
|
|
26
|
-
BOOL_VEC3 = 35672
|
|
26
|
+
BOOL_VEC3 = 35672,// gl.BOOL_VEC3
|
|
27
27
|
/** Boolean four-dimensional vector */
|
|
28
|
-
BOOL_VEC4 = 35673
|
|
28
|
+
BOOL_VEC4 = 35673,// gl.BOOL_VEC4
|
|
29
29
|
/** Second-order matrix */
|
|
30
|
-
FLOAT_MAT2 = 35674
|
|
30
|
+
FLOAT_MAT2 = 35674,// gl.FLOAT_MAT2
|
|
31
31
|
/** Third-order matrix */
|
|
32
|
-
FLOAT_MAT3 = 35675
|
|
32
|
+
FLOAT_MAT3 = 35675,// gl.FLOAT_MAT3
|
|
33
33
|
/** Fourth-order matrix */
|
|
34
|
-
FLOAT_MAT4 = 35676
|
|
34
|
+
FLOAT_MAT4 = 35676,// gl.FLOAT_MAT4
|
|
35
35
|
/** Float array */
|
|
36
|
-
FLOAT_ARRAY = 35677
|
|
36
|
+
FLOAT_ARRAY = 35677,// gl.FLOAT_ARRAY
|
|
37
37
|
/** Floating-point two-dimensional vector array */
|
|
38
38
|
FLOAT_VEC2_ARRAY = 100000,
|
|
39
39
|
/** Floating-point three-dimensional vector array */
|
|
@@ -59,17 +59,17 @@ export declare enum DataType {
|
|
|
59
59
|
/** Cube map texture sampler array */
|
|
60
60
|
SAMPLER_CUBE_ARRAY = 100011,
|
|
61
61
|
/** 2D sampler */
|
|
62
|
-
SAMPLER_2D = 35678
|
|
62
|
+
SAMPLER_2D = 35678,// gl.SAMPLER_2D
|
|
63
63
|
/** Cube map Texture sampler */
|
|
64
|
-
SAMPLER_CUBE = 35680
|
|
64
|
+
SAMPLER_CUBE = 35680,// gl.SAMPLER_CUBE
|
|
65
65
|
/** Byte */
|
|
66
|
-
BYTE = 5120
|
|
66
|
+
BYTE = 5120,// gl.BYTE
|
|
67
67
|
/** Unsigned byte */
|
|
68
|
-
UNSIGNED_BYTE = 5121
|
|
68
|
+
UNSIGNED_BYTE = 5121,// gl.UNSIGNED_BYTE
|
|
69
69
|
/** Short */
|
|
70
|
-
SHORT = 5122
|
|
70
|
+
SHORT = 5122,// gl.SHORT
|
|
71
71
|
/** Unsigned short */
|
|
72
|
-
UNSIGNED_SHORT = 5123
|
|
72
|
+
UNSIGNED_SHORT = 5123,// gl.UNSIGNED_SHORT
|
|
73
73
|
/** Unsigned int */
|
|
74
74
|
UNSIGNED_INT = 5125
|
|
75
75
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The camera modify flags.
|
|
3
|
+
*/
|
|
4
|
+
export declare enum CameraModifyFlags {
|
|
5
|
+
/** The types of camera projections changes. */
|
|
6
|
+
ProjectionType = 1,
|
|
7
|
+
/** The aspect ratio of the camera changes. */
|
|
8
|
+
AspectRatio = 2,
|
|
9
|
+
/** The field of view of the camera changes. */
|
|
10
|
+
FieldOfView = 4,
|
|
11
|
+
/** The orthographic size of the camera changes. */
|
|
12
|
+
OrthographicSize = 8,
|
|
13
|
+
/** The camera becomes active in the scene. */
|
|
14
|
+
EnableInScene = 16,
|
|
15
|
+
/** The camera becomes inactive in the scene. */
|
|
16
|
+
DisableInScene = 32
|
|
17
|
+
}
|
package/types/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export { SceneManager } from "./SceneManager";
|
|
|
8
8
|
export { Entity } from "./Entity";
|
|
9
9
|
export { Component } from "./Component";
|
|
10
10
|
export { Script } from "./Script";
|
|
11
|
-
export { Renderer } from "./Renderer";
|
|
11
|
+
export { Renderer, RendererUpdateFlags } from "./Renderer";
|
|
12
12
|
export { dependentComponents, DependentMode } from "./ComponentsDependencies";
|
|
13
13
|
export { Camera } from "./Camera";
|
|
14
14
|
export { Transform } from "./Transform";
|
|
@@ -16,6 +16,7 @@ export { BoolUpdateFlag } from "./BoolUpdateFlag";
|
|
|
16
16
|
export type { EngineSettings } from "./EngineSettings";
|
|
17
17
|
export type { EngineConfiguration } from "./Engine";
|
|
18
18
|
export { request } from "./asset/request";
|
|
19
|
+
export type { RequestConfig } from "./asset/request";
|
|
19
20
|
export { Loader } from "./asset/Loader";
|
|
20
21
|
export { ContentRestorer } from "./asset/ContentRestorer";
|
|
21
22
|
export { ResourceManager, resourceLoader } from "./asset/ResourceManager";
|
|
@@ -31,11 +32,14 @@ export { DepthTextureMode } from "./enums/DepthTextureMode";
|
|
|
31
32
|
export { FogMode } from "./enums/FogMode";
|
|
32
33
|
export { CameraClearFlags } from "./enums/CameraClearFlags";
|
|
33
34
|
export { CameraType } from "./enums/CameraType";
|
|
35
|
+
export { CameraModifyFlags } from "./enums/CameraModifyFlags";
|
|
36
|
+
export { EntityModifyFlags } from "./enums/EntityModifyFlags";
|
|
34
37
|
export { MSAASamples } from "./enums/MSAASamples";
|
|
35
38
|
export { ReplacementFailureStrategy } from "./enums/ReplacementFailureStrategy";
|
|
36
39
|
export { Downsampling } from "./enums/Downsampling";
|
|
37
40
|
export { ColorSpace } from "./enums/ColorSpace";
|
|
38
41
|
export { BackgroundTextureFillMode } from "./enums/BackgroundTextureFillMode";
|
|
42
|
+
export { SpriteMaskLayer } from "./enums/SpriteMaskLayer";
|
|
39
43
|
export { XRManager } from "./xr/XRManager";
|
|
40
44
|
export * from "./utils/index";
|
|
41
45
|
export * from "./input/index";
|
|
@@ -58,5 +62,6 @@ export * from "./clone/CloneManager";
|
|
|
58
62
|
export * from "./renderingHardwareInterface/index";
|
|
59
63
|
export * from "./physics/index";
|
|
60
64
|
export * from "./Utils";
|
|
65
|
+
export * from "./audio/index";
|
|
61
66
|
export { ShaderMacroCollection } from "./shader/ShaderMacroCollection";
|
|
62
67
|
export * from "./postProcess";
|
package/types/input/index.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
export { PointerPhase } from "./enums/PointerPhase";
|
|
2
|
-
export { Pointer } from "./pointer/Pointer";
|
|
3
1
|
export { InputManager } from "./InputManager";
|
|
4
2
|
export { Keys } from "./enums/Keys";
|
|
5
3
|
export { PointerButton } from "./enums/PointerButton";
|
|
4
|
+
export { PointerPhase } from "./enums/PointerPhase";
|
|
5
|
+
export { Pointer } from "./pointer/Pointer";
|
|
6
|
+
export { PointerEventData } from "./pointer/PointerEventData";
|
|
7
|
+
export { registerPointerEventEmitter } from "./pointer/PointerManager";
|
|
8
|
+
export { PointerEventEmitter } from "./pointer/emitter/PointerEventEmitter";
|
|
@@ -20,6 +20,12 @@ export declare class Pointer {
|
|
|
20
20
|
position: Vector2;
|
|
21
21
|
/** The change of the pointer. */
|
|
22
22
|
deltaPosition: Vector2;
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
}
|
|
24
|
+
export declare enum PointerEventType {
|
|
25
|
+
None = 0,
|
|
26
|
+
Down = 1,
|
|
27
|
+
Up = 2,
|
|
28
|
+
Leave = 4,
|
|
29
|
+
Move = 8,
|
|
30
|
+
Cancel = 16
|
|
25
31
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Vector3 } from "@galacean/engine-math";
|
|
2
|
+
import { IPoolElement } from "../../utils/ObjectPool";
|
|
3
|
+
import { Pointer } from "./Pointer";
|
|
4
|
+
/**
|
|
5
|
+
* Pointer event data.
|
|
6
|
+
*/
|
|
7
|
+
export declare class PointerEventData implements IPoolElement {
|
|
8
|
+
/** The pointer that triggers this event. */
|
|
9
|
+
pointer: Pointer;
|
|
10
|
+
/** The position of the event trigger (in world space). */
|
|
11
|
+
worldPosition: Vector3;
|
|
12
|
+
}
|
|
@@ -1 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import { ClearableObjectPool } from "../../utils/ClearableObjectPool";
|
|
2
|
+
import { PointerEventData } from "./PointerEventData";
|
|
3
|
+
import { PointerEventEmitter } from "./emitter/PointerEventEmitter";
|
|
4
|
+
/**
|
|
5
|
+
* Declare pointer event emitter decorator.
|
|
6
|
+
*/
|
|
7
|
+
export declare function registerPointerEventEmitter(): <T extends PointerEventEmitter>(Target: {
|
|
8
|
+
new (pool: ClearableObjectPool<PointerEventData>): T;
|
|
9
|
+
}) => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Ray } from "@galacean/engine-math";
|
|
2
|
+
import { Entity } from "../../../Entity";
|
|
3
|
+
import { Scene } from "../../../Scene";
|
|
4
|
+
import { ClearableObjectPool } from "../../../utils/ClearableObjectPool";
|
|
5
|
+
import { Pointer } from "../Pointer";
|
|
6
|
+
import { PointerEventData } from "../PointerEventData";
|
|
7
|
+
import { IHitResult } from "./IHitResult";
|
|
8
|
+
export declare abstract class PointerEventEmitter {
|
|
9
|
+
protected static _tempRay: Ray;
|
|
10
|
+
protected _hitResult: IHitResult;
|
|
11
|
+
protected _pool: ClearableObjectPool<PointerEventData>;
|
|
12
|
+
constructor(pool: ClearableObjectPool<PointerEventData>);
|
|
13
|
+
abstract processRaycast(scenes: readonly Scene[], pointer: Pointer): void;
|
|
14
|
+
abstract processDrag(pointer: Pointer): void;
|
|
15
|
+
abstract processDown(pointer: Pointer): void;
|
|
16
|
+
abstract processUp(pointer: Pointer): void;
|
|
17
|
+
abstract processLeave(pointer: Pointer): void;
|
|
18
|
+
abstract dispose(): void;
|
|
19
|
+
protected abstract _init(): void;
|
|
20
|
+
protected _createEventData(pointer: Pointer): PointerEventData;
|
|
21
|
+
protected _fireDown(entity: Entity, eventData: PointerEventData): void;
|
|
22
|
+
protected _fireUp(entity: Entity, eventData: PointerEventData): void;
|
|
23
|
+
protected _fireClick(entity: Entity, eventData: PointerEventData): void;
|
|
24
|
+
protected _fireEnter(entity: Entity, eventData: PointerEventData): void;
|
|
25
|
+
protected _fireExit(entity: Entity, eventData: PointerEventData): void;
|
|
26
|
+
protected _fireBeginDrag(entity: Entity, eventData: PointerEventData): void;
|
|
27
|
+
protected _fireDrag(entity: Entity, eventData: PointerEventData): void;
|
|
28
|
+
protected _fireEndDrag(entity: Entity, eventData: PointerEventData): void;
|
|
29
|
+
protected _fireDrop(entity: Entity, eventData: PointerEventData): void;
|
|
30
|
+
}
|
|
@@ -7,6 +7,11 @@ export declare class DirectLight extends Light {
|
|
|
7
7
|
private static _cullingMaskProperty;
|
|
8
8
|
private static _colorProperty;
|
|
9
9
|
private static _directionProperty;
|
|
10
|
+
/**
|
|
11
|
+
* The offset distance in the opposite direction of light direction when generating shadows.
|
|
12
|
+
* @remarks Increasing this value can avoid the holes in the shadow caused by low polygon models.
|
|
13
|
+
*/
|
|
14
|
+
shadowNearPlaneOffset: number;
|
|
10
15
|
private _reverseDirection;
|
|
11
16
|
/**
|
|
12
17
|
* Get direction.
|
|
@@ -19,7 +19,10 @@ export declare abstract class Light extends Component {
|
|
|
19
19
|
shadowBias: number;
|
|
20
20
|
/** Shadow mapping normal-based bias. */
|
|
21
21
|
shadowNormalBias: number;
|
|
22
|
-
/**
|
|
22
|
+
/**
|
|
23
|
+
* @deprecated
|
|
24
|
+
* Please use `shadowNearPlaneOffset` instead.
|
|
25
|
+
*/
|
|
23
26
|
shadowNearPlane: number;
|
|
24
27
|
private _shadowStrength;
|
|
25
28
|
private _color;
|
|
@@ -16,10 +16,10 @@ export declare class BaseMaterial extends Material {
|
|
|
16
16
|
protected static _normalIntensityProp: ShaderProperty;
|
|
17
17
|
protected static _emissiveColorProp: ShaderProperty;
|
|
18
18
|
protected static _emissiveTextureProp: ShaderProperty;
|
|
19
|
-
|
|
19
|
+
protected static _alphaCutoffProp: ShaderProperty;
|
|
20
20
|
private static _alphaCutoffMacro;
|
|
21
21
|
private _renderFace;
|
|
22
|
-
|
|
22
|
+
protected _isTransparent: boolean;
|
|
23
23
|
private _blendMode;
|
|
24
24
|
/**
|
|
25
25
|
* Shader used by the material.
|
|
@@ -83,4 +83,6 @@ export declare class BaseMaterial extends Material {
|
|
|
83
83
|
* @param target - target material
|
|
84
84
|
*/
|
|
85
85
|
cloneTo(target: BaseMaterial): void;
|
|
86
|
+
protected _seIsTransparent(value: boolean): void;
|
|
87
|
+
protected _setAlphaCutoff(value: number): void;
|
|
86
88
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { Color, Vector2 } from "@galacean/engine-math";
|
|
1
2
|
import { Engine } from "../Engine";
|
|
2
3
|
import { Texture2D } from "../texture/Texture2D";
|
|
3
4
|
import { PBRBaseMaterial } from "./PBRBaseMaterial";
|
|
5
|
+
import { RefractionMode } from "./enums/Refraction";
|
|
4
6
|
/**
|
|
5
7
|
* PBR (Metallic-Roughness Workflow) Material.
|
|
6
8
|
*/
|
|
@@ -11,7 +13,27 @@ export declare class PBRMaterial extends PBRBaseMaterial {
|
|
|
11
13
|
private static _iorProp;
|
|
12
14
|
private static _anisotropyInfoProp;
|
|
13
15
|
private static _anisotropyTextureProp;
|
|
16
|
+
private static _iridescenceInfoProp;
|
|
17
|
+
private static _iridescenceThicknessTextureProp;
|
|
18
|
+
private static _iridescenceTextureProp;
|
|
19
|
+
private static _sheenColorProp;
|
|
20
|
+
private static _sheenRoughnessProp;
|
|
21
|
+
private static _sheenTextureProp;
|
|
22
|
+
private static _sheenRoughnessTextureProp;
|
|
23
|
+
private static _transmissionMacro;
|
|
24
|
+
private static _thicknessMacro;
|
|
25
|
+
private static _thicknessTextureMacro;
|
|
26
|
+
private static _transmissionTextureMacro;
|
|
27
|
+
private static _transmissionProp;
|
|
28
|
+
private static _transmissionTextureProp;
|
|
29
|
+
private static _attenuationColorProp;
|
|
30
|
+
private static _attenuationDistanceProp;
|
|
31
|
+
private static _thicknessProp;
|
|
32
|
+
private static _thicknessTextureProp;
|
|
33
|
+
private _refractionMode;
|
|
14
34
|
private _anisotropyRotation;
|
|
35
|
+
private _iridescenceRange;
|
|
36
|
+
private _sheenEnabled;
|
|
15
37
|
/**
|
|
16
38
|
* Index Of Refraction.
|
|
17
39
|
* @defaultValue `1.5`
|
|
@@ -56,6 +78,112 @@ export declare class PBRMaterial extends PBRBaseMaterial {
|
|
|
56
78
|
*/
|
|
57
79
|
get anisotropyTexture(): Texture2D;
|
|
58
80
|
set anisotropyTexture(value: Texture2D);
|
|
81
|
+
/**
|
|
82
|
+
* The iridescence intensity factor, from 0.0 to 1.0.
|
|
83
|
+
* @defaultValue `0.0`
|
|
84
|
+
*/
|
|
85
|
+
get iridescence(): number;
|
|
86
|
+
set iridescence(value: number);
|
|
87
|
+
/**
|
|
88
|
+
* The iridescence intensity texture, sampling red channel, and multiply 'iridescence'.
|
|
89
|
+
*/
|
|
90
|
+
get iridescenceTexture(): Texture2D;
|
|
91
|
+
set iridescenceTexture(value: Texture2D);
|
|
92
|
+
/**
|
|
93
|
+
* The index of refraction of the dielectric thin-film layer, greater than or equal to 1.0.
|
|
94
|
+
* @defaultValue `1.3`
|
|
95
|
+
*/
|
|
96
|
+
get iridescenceIOR(): number;
|
|
97
|
+
set iridescenceIOR(value: number);
|
|
98
|
+
/**
|
|
99
|
+
* The range of iridescence thickness, x is minimum, y is maximum.
|
|
100
|
+
* @defaultValue `[100, 400]`
|
|
101
|
+
*/
|
|
102
|
+
get iridescenceThicknessRange(): Vector2;
|
|
103
|
+
set iridescenceThicknessRange(value: Vector2);
|
|
104
|
+
/**
|
|
105
|
+
* The thickness texture of the thin-film layer, sampling green channel.
|
|
106
|
+
* @remarks
|
|
107
|
+
* If iridescenceThicknessTexture is defined, iridescence thickness between the 'iridescenceThicknessRange'.
|
|
108
|
+
* If iridescenceThicknessTexture is not defined, iridescence thickness will use only 'iridescenceThicknessRange.y'.
|
|
109
|
+
*/
|
|
110
|
+
get iridescenceThicknessTexture(): Texture2D;
|
|
111
|
+
set iridescenceThicknessTexture(value: Texture2D);
|
|
112
|
+
/**
|
|
113
|
+
* Sheen color.
|
|
114
|
+
* @defaultValue `[0,0,0]`
|
|
115
|
+
*/
|
|
116
|
+
get sheenColor(): Color;
|
|
117
|
+
set sheenColor(value: Color);
|
|
118
|
+
/**
|
|
119
|
+
* Sheen roughness, from 0.0 to 1.0.
|
|
120
|
+
* @defaultValue `0.0`
|
|
121
|
+
*/
|
|
122
|
+
get sheenRoughness(): number;
|
|
123
|
+
set sheenRoughness(value: number);
|
|
124
|
+
/**
|
|
125
|
+
* Sheen color texture, multiply ‘sheenColor’.
|
|
126
|
+
*/
|
|
127
|
+
get sheenColorTexture(): Texture2D;
|
|
128
|
+
set sheenColorTexture(value: Texture2D);
|
|
129
|
+
/**
|
|
130
|
+
* Sheen roughness texture.
|
|
131
|
+
* @remarks Use alpha channel, and multiply 'sheenRoughness'.
|
|
132
|
+
*/
|
|
133
|
+
get sheenRoughnessTexture(): Texture2D;
|
|
134
|
+
set sheenRoughnessTexture(value: Texture2D);
|
|
135
|
+
/**
|
|
136
|
+
* Refraction switch.
|
|
137
|
+
* @remarks Use refractionMode to set the refraction shape.
|
|
138
|
+
*/
|
|
139
|
+
get refractionMode(): RefractionMode;
|
|
140
|
+
set refractionMode(value: RefractionMode);
|
|
141
|
+
/**
|
|
142
|
+
* @inheritdoc
|
|
143
|
+
*/
|
|
144
|
+
get isTransparent(): boolean;
|
|
145
|
+
set isTransparent(value: boolean);
|
|
146
|
+
/**
|
|
147
|
+
* @inheritdoc
|
|
148
|
+
*/
|
|
149
|
+
get alphaCutoff(): number;
|
|
150
|
+
set alphaCutoff(value: number);
|
|
151
|
+
/**
|
|
152
|
+
* Transmission factor.
|
|
153
|
+
* @defaultValue `0.0`
|
|
154
|
+
*/
|
|
155
|
+
get transmission(): number;
|
|
156
|
+
set transmission(value: number);
|
|
157
|
+
/**
|
|
158
|
+
* Transmission texture.
|
|
159
|
+
* @remarks Use red channel, and multiply 'transmission'.
|
|
160
|
+
*/
|
|
161
|
+
get transmissionTexture(): Texture2D;
|
|
162
|
+
set transmissionTexture(value: Texture2D);
|
|
163
|
+
/**
|
|
164
|
+
* Attenuation color.
|
|
165
|
+
* @defaultValue `[1,1,1]`
|
|
166
|
+
*/
|
|
167
|
+
get attenuationColor(): Color;
|
|
168
|
+
set attenuationColor(value: Color);
|
|
169
|
+
/**
|
|
170
|
+
* Attenuation distance, greater than 0.0.
|
|
171
|
+
* @defaultValue `infinity`
|
|
172
|
+
*/
|
|
173
|
+
get attenuationDistance(): number;
|
|
174
|
+
set attenuationDistance(value: number);
|
|
175
|
+
/**
|
|
176
|
+
* Thickness, greater than or equal to 0.0.
|
|
177
|
+
* @defaultValue `0.0`
|
|
178
|
+
*/
|
|
179
|
+
get thickness(): number;
|
|
180
|
+
set thickness(value: number);
|
|
181
|
+
/**
|
|
182
|
+
* Thickness texture.
|
|
183
|
+
* @remarks Use green channel, and multiply 'thickness', range is 0.0 to 1.0.
|
|
184
|
+
*/
|
|
185
|
+
get thicknessTexture(): Texture2D;
|
|
186
|
+
set thicknessTexture(value: Texture2D);
|
|
59
187
|
/**
|
|
60
188
|
* Create a pbr metallic-roughness workflow material instance.
|
|
61
189
|
* @param engine - Engine to which the material belongs
|
|
@@ -65,4 +193,6 @@ export declare class PBRMaterial extends PBRBaseMaterial {
|
|
|
65
193
|
* @inheritdoc
|
|
66
194
|
*/
|
|
67
195
|
clone(): PBRMaterial;
|
|
196
|
+
private _onIridescenceRangeChanged;
|
|
197
|
+
private _onSheenColorChanged;
|
|
68
198
|
}
|
|
@@ -46,6 +46,7 @@ export declare class ParticleGenerator {
|
|
|
46
46
|
private _transformedBoundsCount;
|
|
47
47
|
private _firstActiveTransformedBoundingBox;
|
|
48
48
|
private _firstFreeTransformedBoundingBox;
|
|
49
|
+
private _playStartDelay;
|
|
49
50
|
/**
|
|
50
51
|
* Whether the particle generator is contain alive or is still creating particles.
|
|
51
52
|
*/
|
|
@@ -5,7 +5,7 @@ import { ParticleSimulationSpace } from "../enums/ParticleSimulationSpace";
|
|
|
5
5
|
import { ParticleCompositeCurve } from "./ParticleCompositeCurve";
|
|
6
6
|
import { ParticleCompositeGradient } from "./ParticleCompositeGradient";
|
|
7
7
|
export declare class MainModule implements ICustomClone {
|
|
8
|
-
private
|
|
8
|
+
private _tempVector40;
|
|
9
9
|
private static _vector3One;
|
|
10
10
|
private static readonly _positionScale;
|
|
11
11
|
private static readonly _sizeScale;
|
|
@@ -50,7 +50,6 @@ export declare class MainModule implements ICustomClone {
|
|
|
50
50
|
private _gravityModifier;
|
|
51
51
|
private _simulationSpace;
|
|
52
52
|
private _generator;
|
|
53
|
-
private _gravity;
|
|
54
53
|
/**
|
|
55
54
|
* The initial lifetime of particles when emitted.
|
|
56
55
|
*/
|
|
@@ -11,7 +11,8 @@ export declare class CharacterController extends Collider {
|
|
|
11
11
|
private _upDirection;
|
|
12
12
|
private _slopeLimit;
|
|
13
13
|
/**
|
|
14
|
-
* The step offset for the controller.
|
|
14
|
+
* The step offset for the controller, the value must be greater than or equal to 0.
|
|
15
|
+
* @remarks Character can overcome obstacle less than the height(stepOffset + contractOffset of the shape).
|
|
15
16
|
*/
|
|
16
17
|
get stepOffset(): number;
|
|
17
18
|
set stepOffset(value: number);
|
|
@@ -26,7 +27,8 @@ export declare class CharacterController extends Collider {
|
|
|
26
27
|
get upDirection(): Vector3;
|
|
27
28
|
set upDirection(value: Vector3);
|
|
28
29
|
/**
|
|
29
|
-
* The slope limit for the controller.
|
|
30
|
+
* The slope limit in degrees for the controller, the value is the cosine value of the maximum slope angle.
|
|
31
|
+
* @defaultValue 45 degrees
|
|
30
32
|
*/
|
|
31
33
|
get slopeLimit(): number;
|
|
32
34
|
set slopeLimit(value: number);
|
|
@@ -43,10 +45,7 @@ export declare class CharacterController extends Collider {
|
|
|
43
45
|
* @param shape - Collider shape
|
|
44
46
|
*/
|
|
45
47
|
addShape(shape: ColliderShape): void;
|
|
46
|
-
|
|
47
|
-
* Remove all shape attached.
|
|
48
|
-
*/
|
|
49
|
-
clearShapes(): void;
|
|
48
|
+
protected _syncNative(): void;
|
|
50
49
|
private _syncWorldPositionFromPhysicalSpace;
|
|
51
50
|
private _setUpDirection;
|
|
52
51
|
}
|
|
@@ -27,5 +27,7 @@ export declare class Collider extends Component implements ICustomClone {
|
|
|
27
27
|
* Remove all shape attached.
|
|
28
28
|
*/
|
|
29
29
|
clearShapes(): void;
|
|
30
|
-
protected
|
|
30
|
+
protected _syncNative(): void;
|
|
31
|
+
protected _addNativeShape(shape: ColliderShape): void;
|
|
32
|
+
protected _removeNativeShape(shape: ColliderShape): void;
|
|
31
33
|
}
|
|
@@ -1,4 +1,22 @@
|
|
|
1
|
+
import { ContactPoint } from "./ContactPoint";
|
|
1
2
|
import { ColliderShape } from "./shape";
|
|
3
|
+
/**
|
|
4
|
+
* Collision information between two shapes when they collide.
|
|
5
|
+
*/
|
|
2
6
|
export declare class Collision {
|
|
7
|
+
/** The target shape be collided. */
|
|
3
8
|
shape: ColliderShape;
|
|
9
|
+
/**
|
|
10
|
+
* Count of contact points.
|
|
11
|
+
*/
|
|
12
|
+
get contactCount(): number;
|
|
13
|
+
/**
|
|
14
|
+
* Get contact points.
|
|
15
|
+
* @param outContacts - The result of contact points
|
|
16
|
+
* @returns The actual count of contact points
|
|
17
|
+
*
|
|
18
|
+
* @remarks To optimize performance, the engine does not modify the length of the array you pass.
|
|
19
|
+
* You need to obtain the actual number of contact points from the function's return value.
|
|
20
|
+
*/
|
|
21
|
+
getContacts(outContacts: ContactPoint[]): number;
|
|
4
22
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Vector3 } from "@galacean/engine-math";
|
|
2
|
+
/**
|
|
3
|
+
* Describes a contact point where the collision occurs.
|
|
4
|
+
*/
|
|
5
|
+
export declare class ContactPoint {
|
|
6
|
+
/** The position of the contact point between the shapes, in world space. */
|
|
7
|
+
readonly position: Vector3;
|
|
8
|
+
/** The normal of the contacting surfaces at the contact point. The normal direction points from the other shape to the self shape. */
|
|
9
|
+
readonly normal: Vector3;
|
|
10
|
+
/** The impulse applied at the contact point, in world space. Divide by the simulation time step to get a force value. */
|
|
11
|
+
readonly impulse: Vector3;
|
|
12
|
+
/** The separation of the shapes at the contact point. A negative separation denotes a penetration. */
|
|
13
|
+
separation: number;
|
|
14
|
+
}
|