@galacean/engine-core 0.0.0-experimental-1.3-xr.9 → 0.0.0-experimental-1.4-small-language.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/main.js +18058 -16130
- package/dist/main.js.map +1 -1
- package/dist/module.js +16443 -14637
- package/dist/module.js.map +1 -1
- package/package.json +6 -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 +22 -6
- package/types/RenderPipeline/BasicRenderPipeline.d.ts +4 -0
- package/types/RenderPipeline/Blitter.d.ts +28 -0
- package/types/RenderPipeline/index.d.ts +3 -1
- package/types/Renderer.d.ts +19 -2
- 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 +42 -7
- package/types/animation/AnimatorCondition.d.ts +2 -2
- package/types/animation/AnimatorController.d.ts +26 -16
- package/types/animation/AnimatorControllerParameter.d.ts +9 -5
- 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/index.d.ts +3 -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 +7 -2
- package/types/asset/request.d.ts +10 -3
- package/types/audio/AudioClip.d.ts +24 -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 +7 -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/PointerEventEmitter.d.ts +30 -0
- package/types/lighting/DirectLight.d.ts +5 -0
- package/types/lighting/Light.d.ts +8 -3
- 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/mesh/SkinnedMeshRenderer.d.ts +1 -1
- package/types/particle/ParticleGenerator.d.ts +1 -0
- package/types/particle/ParticleRenderer.d.ts +1 -1
- package/types/particle/modules/MainModule.d.ts +1 -2
- package/types/particle/modules/TextureSheetAnimationModule.d.ts +3 -5
- package/types/physics/CharacterController.d.ts +6 -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/UIUtils.d.ts +11 -0
- package/types/utils/DisorderedArray.d.ts +70 -0
- package/dist/miniprogram.js +0 -34351
- package/types/DisorderedArray.d.ts +0 -27
- package/types/RenderPipeline/Basic2DBatcher.d.ts +0 -19
- package/types/RenderPipeline/ClassPool.d.ts +0 -19
- package/types/RenderPipeline/IPoolElement.d.ts +0 -3
- package/types/RenderPipeline/RenderData.d.ts +0 -14
- package/types/RenderPipeline/RenderData2D.d.ts +0 -14
- package/types/RenderPipeline/RenderPass.d.ts +0 -55
- package/types/RenderPipeline/SpriteMaskBatcher.d.ts +0 -11
- package/types/RenderPipeline/SpriteMaskManager.d.ts +0 -1
- package/types/RenderPipeline/SpriteMaskRenderData.d.ts +0 -12
- package/types/RenderPipeline/SpriteRenderData.d.ts +0 -14
- package/types/RenderPipeline/TextRenderData.d.ts +0 -8
- package/types/RenderPipeline/enums/ForceUploadShaderDataFlag.d.ts +0 -15
- package/types/RenderPipeline/enums/RenderDataUsage.d.ts +0 -13
- package/types/animation/AnimatorTransition.d.ts +0 -14
- package/types/input/pointer/PointerEvent.d.ts +0 -4
- package/types/input/pointer/PointerEventType.d.ts +0 -7
- package/types/renderingHardwareInterface/IHardwareRenderer.d.ts +0 -6
- package/types/ui/Image.d.ts +0 -38
- package/types/ui/RedBlackTree.d.ts +0 -2
- package/types/ui/UICanvas.d.ts +0 -55
- package/types/ui/UIRenderer.d.ts +0 -14
- 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
- package/types/utils/Pool.d.ts +0 -12
- /package/types/{2d/assembler/IAssembler.d.ts → Polyfill.d.ts} +0 -0
- /package/types/{2d/data/VertexData2D.d.ts → RenderPipeline/enums/RenderQueueMaskType.d.ts} +0 -0
- /package/types/{2d/text/CharRenderData.d.ts → animation/AnimatorStateTransitionCollection.d.ts} +0 -0
- /package/types/{2d/text/CharRenderDataPool.d.ts → audio/AudioManager.d.ts} +0 -0
- /package/types/{RenderPipeline/DynamicGeometryData.d.ts → input/pointer/emitter/IHitResult.d.ts} +0 -0
- /package/types/{RenderPipeline/DynamicGeometryDataManager.d.ts → input/pointer/emitter/PhysicsPointerEventEmitter.d.ts} +0 -0
- /package/types/{RenderPipeline/SpriteBatcher.d.ts → ui/IUICanvas.d.ts} +0 -0
package/types/asset/request.d.ts
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import { AssetPromise } from "./AssetPromise";
|
|
2
|
+
/**
|
|
3
|
+
* Configuration options for `request`.
|
|
4
|
+
* @remarks
|
|
5
|
+
* This type extends the standard `RequestInit` options with additional
|
|
6
|
+
* properties for handling retries, timeouts, and custom response types.
|
|
7
|
+
*/
|
|
2
8
|
export type RequestConfig = {
|
|
3
9
|
type?: XMLHttpRequestResponseType | "image";
|
|
4
10
|
retryCount?: number;
|
|
@@ -6,9 +12,10 @@ export type RequestConfig = {
|
|
|
6
12
|
timeout?: number;
|
|
7
13
|
} & RequestInit;
|
|
8
14
|
/**
|
|
9
|
-
*
|
|
10
|
-
* @param url - The
|
|
11
|
-
* @param config -
|
|
15
|
+
* Sends a request to the specified URL and returns a promise for the response.
|
|
16
|
+
* @param url - The URL to send the request to
|
|
17
|
+
* @param config - Configuration options for the request
|
|
18
|
+
* @returns A promise that resolves with the response of type `T`
|
|
12
19
|
*/
|
|
13
20
|
export declare function request<T>(url: string, config?: RequestConfig): AssetPromise<T>;
|
|
14
21
|
export declare class MultiExecutor {
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Engine } from "../Engine";
|
|
2
|
+
import { ReferResource } from "../asset/ReferResource";
|
|
3
|
+
/**
|
|
4
|
+
* Audio Clip.
|
|
5
|
+
*/
|
|
6
|
+
export declare class AudioClip extends ReferResource {
|
|
7
|
+
private _audioBuffer;
|
|
8
|
+
/** Name of clip. */
|
|
9
|
+
name: string;
|
|
10
|
+
/**
|
|
11
|
+
* Number of discrete audio channels.
|
|
12
|
+
*/
|
|
13
|
+
get channels(): number;
|
|
14
|
+
/**
|
|
15
|
+
* Sample rate, in samples per second.
|
|
16
|
+
*/
|
|
17
|
+
get sampleRate(): number;
|
|
18
|
+
/**
|
|
19
|
+
* Duration, in seconds.
|
|
20
|
+
*/
|
|
21
|
+
get duration(): number;
|
|
22
|
+
constructor(engine: Engine, name?: string);
|
|
23
|
+
protected _onDestroy(): void;
|
|
24
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { Component } from "../Component";
|
|
2
|
+
import { AudioClip } from "./AudioClip";
|
|
3
|
+
/**
|
|
4
|
+
* Audio Source Component.
|
|
5
|
+
*/
|
|
6
|
+
export declare class AudioSource extends Component {
|
|
7
|
+
/** If set to true, the audio component automatically begins to play on startup. */
|
|
8
|
+
playOnEnabled: boolean;
|
|
9
|
+
private _isPlaying;
|
|
10
|
+
private _clip;
|
|
11
|
+
private _gainNode;
|
|
12
|
+
private _sourceNode;
|
|
13
|
+
private _pausedTime;
|
|
14
|
+
private _playTime;
|
|
15
|
+
private _volume;
|
|
16
|
+
private _lastVolume;
|
|
17
|
+
private _playbackRate;
|
|
18
|
+
private _loop;
|
|
19
|
+
/**
|
|
20
|
+
* The audio clip to play.
|
|
21
|
+
*/
|
|
22
|
+
get clip(): AudioClip;
|
|
23
|
+
set clip(value: AudioClip);
|
|
24
|
+
/**
|
|
25
|
+
* Whether the clip playing right now.
|
|
26
|
+
*/
|
|
27
|
+
get isPlaying(): boolean;
|
|
28
|
+
/**
|
|
29
|
+
* The volume of the audio source, ranging from 0 to 1.
|
|
30
|
+
* @defaultValue `1`
|
|
31
|
+
*/
|
|
32
|
+
get volume(): number;
|
|
33
|
+
set volume(value: number);
|
|
34
|
+
/**
|
|
35
|
+
* The playback rate of the audio source.
|
|
36
|
+
* @defaultValue `1`
|
|
37
|
+
*/
|
|
38
|
+
get playbackRate(): number;
|
|
39
|
+
set playbackRate(value: number);
|
|
40
|
+
/**
|
|
41
|
+
* Mutes or unmute the audio source.
|
|
42
|
+
* Mute sets volume as 0, unmute restore volume.
|
|
43
|
+
*/
|
|
44
|
+
get mute(): boolean;
|
|
45
|
+
set mute(value: boolean);
|
|
46
|
+
/**
|
|
47
|
+
* Whether the audio clip looping.
|
|
48
|
+
* @defaultValue `false`
|
|
49
|
+
*/
|
|
50
|
+
get loop(): boolean;
|
|
51
|
+
set loop(value: boolean);
|
|
52
|
+
/**
|
|
53
|
+
* Playback position in seconds.
|
|
54
|
+
*/
|
|
55
|
+
get time(): number;
|
|
56
|
+
/**
|
|
57
|
+
* Play the clip.
|
|
58
|
+
*/
|
|
59
|
+
play(): void;
|
|
60
|
+
/**
|
|
61
|
+
* Stops playing the clip.
|
|
62
|
+
*/
|
|
63
|
+
stop(): void;
|
|
64
|
+
/**
|
|
65
|
+
* Pauses playing the clip.
|
|
66
|
+
*/
|
|
67
|
+
pause(): void;
|
|
68
|
+
private _onPlayEnd;
|
|
69
|
+
private _initSourceNode;
|
|
70
|
+
private _clearSourceNode;
|
|
71
|
+
private _canPlay;
|
|
72
|
+
}
|
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
|
@@ -2,12 +2,13 @@ export { Platform } from "./Platform";
|
|
|
2
2
|
export { Engine } from "./Engine";
|
|
3
3
|
export { SystemInfo } from "./SystemInfo";
|
|
4
4
|
export { Canvas } from "./Canvas";
|
|
5
|
+
export { DisorderedArray } from "./utils/DisorderedArray";
|
|
5
6
|
export { Scene } from "./Scene";
|
|
6
7
|
export { SceneManager } from "./SceneManager";
|
|
7
8
|
export { Entity } from "./Entity";
|
|
8
9
|
export { Component } from "./Component";
|
|
9
10
|
export { Script } from "./Script";
|
|
10
|
-
export { Renderer } from "./Renderer";
|
|
11
|
+
export { Renderer, RendererUpdateFlags } from "./Renderer";
|
|
11
12
|
export { dependentComponents, DependentMode } from "./ComponentsDependencies";
|
|
12
13
|
export { Camera } from "./Camera";
|
|
13
14
|
export { Transform } from "./Transform";
|
|
@@ -15,6 +16,7 @@ export { BoolUpdateFlag } from "./BoolUpdateFlag";
|
|
|
15
16
|
export type { EngineSettings } from "./EngineSettings";
|
|
16
17
|
export type { EngineConfiguration } from "./Engine";
|
|
17
18
|
export { request } from "./asset/request";
|
|
19
|
+
export type { RequestConfig } from "./asset/request";
|
|
18
20
|
export { Loader } from "./asset/Loader";
|
|
19
21
|
export { ContentRestorer } from "./asset/ContentRestorer";
|
|
20
22
|
export { ResourceManager, resourceLoader } from "./asset/ResourceManager";
|
|
@@ -30,11 +32,14 @@ export { DepthTextureMode } from "./enums/DepthTextureMode";
|
|
|
30
32
|
export { FogMode } from "./enums/FogMode";
|
|
31
33
|
export { CameraClearFlags } from "./enums/CameraClearFlags";
|
|
32
34
|
export { CameraType } from "./enums/CameraType";
|
|
35
|
+
export { CameraModifyFlags } from "./enums/CameraModifyFlags";
|
|
36
|
+
export { EntityModifyFlags } from "./enums/EntityModifyFlags";
|
|
33
37
|
export { MSAASamples } from "./enums/MSAASamples";
|
|
34
38
|
export { ReplacementFailureStrategy } from "./enums/ReplacementFailureStrategy";
|
|
35
39
|
export { Downsampling } from "./enums/Downsampling";
|
|
36
40
|
export { ColorSpace } from "./enums/ColorSpace";
|
|
37
41
|
export { BackgroundTextureFillMode } from "./enums/BackgroundTextureFillMode";
|
|
42
|
+
export { SpriteMaskLayer } from "./enums/SpriteMaskLayer";
|
|
38
43
|
export { XRManager } from "./xr/XRManager";
|
|
39
44
|
export * from "./utils/index";
|
|
40
45
|
export * from "./input/index";
|
|
@@ -57,5 +62,6 @@ export * from "./clone/CloneManager";
|
|
|
57
62
|
export * from "./renderingHardwareInterface/index";
|
|
58
63
|
export * from "./physics/index";
|
|
59
64
|
export * from "./Utils";
|
|
65
|
+
export * from "./audio/index";
|
|
60
66
|
export { ShaderMacroCollection } from "./shader/ShaderMacroCollection";
|
|
61
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,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,13 +19,18 @@ 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
|
-
|
|
25
|
-
shadowStrength: number;
|
|
27
|
+
private _shadowStrength;
|
|
26
28
|
private _color;
|
|
27
29
|
private _viewMat;
|
|
28
30
|
private _inverseViewMat;
|
|
31
|
+
/** Shadow intensity, the larger the value, the clearer and darker the shadow, range [0,1]. */
|
|
32
|
+
get shadowStrength(): number;
|
|
33
|
+
set shadowStrength(value: number);
|
|
29
34
|
/**
|
|
30
35
|
* Light Color.
|
|
31
36
|
*/
|
|
@@ -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
|
}
|
|
@@ -32,7 +32,7 @@ export declare class SkinnedMeshRenderer extends MeshRenderer {
|
|
|
32
32
|
*/
|
|
33
33
|
get localBounds(): BoundingBox;
|
|
34
34
|
set localBounds(value: BoundingBox);
|
|
35
|
-
protected
|
|
35
|
+
protected _update(context: RenderContext): void;
|
|
36
36
|
private _checkBlendShapeWeightLength;
|
|
37
37
|
private _onLocalBoundsChanged;
|
|
38
38
|
private _onSkinUpdated;
|
|
@@ -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
|
*/
|
|
@@ -41,7 +41,7 @@ export declare class ParticleRenderer extends Renderer {
|
|
|
41
41
|
get mesh(): ModelMesh;
|
|
42
42
|
set mesh(value: ModelMesh);
|
|
43
43
|
protected _updateBounds(worldBounds: BoundingBox): void;
|
|
44
|
-
protected
|
|
44
|
+
protected _update(context: RenderContext): void;
|
|
45
45
|
protected _render(context: RenderContext): void;
|
|
46
46
|
protected _onDestroy(): void;
|
|
47
47
|
}
|
|
@@ -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
|
*/
|