@galacean/engine-core 1.1.0-beta.9 → 1.1.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 +7783 -7029
- package/dist/main.js.map +1 -1
- package/dist/miniprogram.js +7783 -7029
- package/dist/module.js +7784 -7031
- package/dist/module.js.map +1 -1
- package/package.json +3 -3
- package/types/2d/atlas/types.d.ts +5 -0
- package/types/2d/enums/SpriteModifyFlags.d.ts +2 -1
- package/types/2d/text/TextRenderer.d.ts +1 -0
- package/types/Camera.d.ts +1 -1
- package/types/Canvas.d.ts +15 -5
- package/types/Deprecated.d.ts +101 -0
- package/types/animation/AnimatorLayerMask.d.ts +45 -0
- package/types/animation/LayerPathMask.d.ts +16 -0
- package/types/animation/animationCurve/AnimationStringCurve.d.ts +7 -0
- package/types/asset/AssetPromise.d.ts +1 -0
- package/types/asset/ResourceManager.d.ts +0 -1
- package/types/enums/Downsampling.d.ts +11 -0
- package/types/enums/MSAASamples.d.ts +13 -0
- package/types/index.d.ts +1 -1
- package/types/mesh/PrimitiveMesh.d.ts +22 -0
- package/types/mesh/SkinnedMeshRenderer.d.ts +1 -1
- package/types/particle/modules/EmissionModule.d.ts +0 -1
- package/types/particle/modules/MainModule.d.ts +0 -1
- package/types/particle/modules/ParticleGradient.d.ts +38 -18
- package/types/physics/HitResult.d.ts +3 -0
- package/types/shader/Shader.d.ts +1 -1
- package/types/texture/enums/PixelFormat.d.ts +73 -0
- package/types/xr/XRManager.d.ts +3 -29
- package/types/RenderPipeline/MeshRenderData.d.ts +0 -17
- package/types/RenderPipeline/MeshRenderElement.d.ts +0 -19
- package/types/RenderPipeline/RenderElementX.d.ts +0 -12
- package/types/RenderPipeline/SpriteElement.d.ts +0 -15
- package/types/RenderPipeline/SpriteMaskElement.d.ts +0 -12
- package/types/RenderPipeline/TextRenderElement.d.ts +0 -8
- package/types/SafeLoopArray.d.ts +0 -37
- package/types/Ticker.d.ts +0 -30
- package/types/asset/IRefObject.d.ts +0 -2
- package/types/asset/RefObject.d.ts +0 -27
- package/types/base/Event.d.ts +0 -24
- package/types/base/Util.d.ts +0 -14
- package/types/particle/ParticleData.d.ts +0 -1
- package/types/particle/ParticleMesh.d.ts +0 -289
- package/types/particle/ParticleShaderDeclaration.d.ts +0 -1
- package/types/particle/ParticleShaderMacro.d.ts +0 -1
- package/types/particle/ParticleShaderProperty.d.ts +0 -1
- package/types/particle/ParticleSystem.d.ts +0 -41
- package/types/particle/ParticleVertexElements.d.ts +0 -1
- package/types/particle/ParticleVertexUtils.d.ts +0 -1
- package/types/particle/enum/ParticleAnimationRowMode.d.ts +0 -9
- package/types/particle/enum/ParticleAnimationType.d.ts +0 -9
- package/types/particle/enum/ParticleCurveMode.d.ts +0 -13
- package/types/particle/enum/ParticleGradientMode.d.ts +0 -13
- package/types/particle/enum/ParticleRenderMode.d.ts +0 -17
- package/types/particle/enum/ParticleScaleMode.d.ts +0 -11
- package/types/particle/enum/ParticleShapeMultiModeValue.d.ts +0 -9
- package/types/particle/enum/ParticleShapeType.d.ts +0 -15
- package/types/particle/enum/ParticleSimulationSpace.d.ts +0 -9
- package/types/particle/enum/index.d.ts +0 -9
- package/types/particle/module/Burst.d.ts +0 -38
- package/types/particle/module/ColorGradient.d.ts +0 -75
- package/types/particle/module/ColorOverLifetimeModule.d.ts +0 -20
- package/types/particle/module/EmissionModule.d.ts +0 -63
- package/types/particle/module/FrameOverTime.d.ts +0 -73
- package/types/particle/module/ParticleCurve.d.ts +0 -37
- package/types/particle/module/RotationOverLifetimeModule.d.ts +0 -21
- package/types/particle/module/RotationVelocityGradient.d.ts +0 -184
- package/types/particle/module/SizeGradient.d.ts +0 -151
- package/types/particle/module/SizeOverLifetimeModule.d.ts +0 -21
- package/types/particle/module/StartFrame.d.ts +0 -46
- package/types/particle/module/TextureSheetAnimationModule.d.ts +0 -37
- package/types/particle/module/VelocityGradient.d.ts +0 -110
- package/types/particle/module/VelocityOverLifetimeModule.d.ts +0 -22
- package/types/particle/module/index.d.ts +0 -15
- package/types/particle/module/shape/BaseShape.d.ts +0 -26
- package/types/particle/module/shape/BoxShape.d.ts +0 -20
- package/types/particle/module/shape/CircleShape.d.ts +0 -27
- package/types/particle/module/shape/ConeShape.d.ts +0 -35
- package/types/particle/module/shape/HemisphereShape.d.ts +0 -23
- package/types/particle/module/shape/ShapeUtils.d.ts +0 -1
- package/types/particle/module/shape/SphereShape.d.ts +0 -23
- package/types/particle/module/shape/index.d.ts +0 -5
- package/types/particle/modules/ShapeModule.d.ts +0 -9
- package/types/particle/modules/shape/enums/ParticleShapeMultiModeValue.d.ts +0 -9
- package/types/particle/moudules/Burst.d.ts +0 -25
- package/types/particle/moudules/Emission.d.ts +0 -47
- package/types/particle/moudules/EmissionModule.d.ts +0 -49
- package/types/particle/moudules/MainModule.d.ts +0 -59
- package/types/particle/moudules/ParticleCurve.d.ts +0 -27
- package/types/particle/moudules/ParticleGradient.d.ts +0 -28
- package/types/particle/moudules/ShapeModule.d.ts +0 -7
- package/types/particle/moudules/shape/BaseShape.d.ts +0 -28
- package/types/particle/moudules/shape/BoxShape.d.ts +0 -20
- package/types/particle/moudules/shape/CircleShape.d.ts +0 -27
- package/types/particle/moudules/shape/ConeShape.d.ts +0 -35
- package/types/particle/moudules/shape/HemisphereShape.d.ts +0 -23
- package/types/particle/moudules/shape/ShapeUtils.d.ts +0 -1
- package/types/particle/moudules/shape/SphereShape.d.ts +0 -23
- package/types/particle/moudules/shape/enums/ParticleShapeMultiModeValue.d.ts +0 -9
- package/types/particle/moudules/shape/enums/ParticleShapeType.d.ts +0 -15
- package/types/particle/moudules/shape/index.d.ts +0 -5
- package/types/physics/PhysicsManager.d.ts +0 -78
- package/types/shadow/PipelinePass.d.ts +0 -16
- package/types/utils/BoolUpdateFlag.d.ts +0 -12
- package/types/utils/DisorderedArray.d.ts +0 -18
- package/types/utils/UpdateFlag.d.ts +0 -20
- package/types/utils/UpdateFlagManager.d.ts +0 -1
- package/types/utils/Utils.d.ts +0 -31
- package/types/xr/component/XRPoseDriver.d.ts +0 -10
- package/types/xr/data/XRCamera.d.ts +0 -6
- package/types/xr/data/XRDevice.d.ts +0 -9
- package/types/xr/data/XRHandle.d.ts +0 -10
- package/types/xr/enum/EnumXRButton.d.ts +0 -5
- package/types/xr/enum/EnumXRDevicePhase.d.ts +0 -4
- package/types/xr/enum/EnumXRFeature.d.ts +0 -9
- package/types/xr/enum/EnumXRInputSource.d.ts +0 -8
- package/types/xr/enum/EnumXRMode.d.ts +0 -7
- package/types/xr/enum/EnumXRSubsystem.d.ts +0 -4
- package/types/xr/enum/EnumXRTrackingMode.d.ts +0 -7
- package/types/xr/feature/XRCameraManager.d.ts +0 -21
- package/types/xr/feature/XRFeature.d.ts +0 -29
- package/types/xr/feature/XRImageTrackManager.d.ts +0 -10
- package/types/xr/feature/XRInputManager.d.ts +0 -16
- package/types/xr/index.d.ts +0 -18
- package/types/xr/provider/XRProvider.d.ts +0 -19
- package/types/xr/subsystem/XRInputSubsystem.d.ts +0 -5
- package/types/xr/subsystem/XRSubsystem.d.ts +0 -30
- /package/types/{2d/data/RenderData2D.d.ts → BasicResources.d.ts} +0 -0
- /package/types/{animation/internal/AnimationCurveOwnerLayerData.d.ts → RenderPipeline/OpaqueTexturePass.d.ts} +0 -0
- /package/types/{graphic/PrimitiveVertexBinding.d.ts → enums/CameraType.d.ts} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@galacean/engine-core",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
"types/**/*"
|
|
16
16
|
],
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@galacean/engine-math": "1.1.
|
|
18
|
+
"@galacean/engine-math": "1.1.2"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@galacean/engine-design": "1.1.
|
|
21
|
+
"@galacean/engine-design": "1.1.2"
|
|
22
22
|
},
|
|
23
23
|
"scripts": {
|
|
24
24
|
"b:types": "tsc"
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AssetType } from "../../asset/AssetType";
|
|
1
2
|
import { TextureFilterMode, TextureFormat, TextureWrapMode } from "../../texture";
|
|
2
3
|
/**
|
|
3
4
|
* The original data type of the atlas.
|
|
@@ -16,6 +17,8 @@ export interface AtlasConfig {
|
|
|
16
17
|
atlasItems: {
|
|
17
18
|
/** The url of the sub atlas. */
|
|
18
19
|
img: string;
|
|
20
|
+
/** Image type. */
|
|
21
|
+
type: AssetType;
|
|
19
22
|
/** Sprites contained in the sub atlas. */
|
|
20
23
|
sprites: AtlasSprite[];
|
|
21
24
|
}[];
|
|
@@ -61,4 +64,6 @@ export interface AtlasSprite {
|
|
|
61
64
|
w: number;
|
|
62
65
|
};
|
|
63
66
|
pixelsPerUnit: number;
|
|
67
|
+
width: number;
|
|
68
|
+
height: number;
|
|
64
69
|
}
|
package/types/Camera.d.ts
CHANGED
|
@@ -55,7 +55,6 @@ export declare class Camera extends Component {
|
|
|
55
55
|
private _viewport;
|
|
56
56
|
private _pixelViewport;
|
|
57
57
|
private _inverseProjectionMatrix;
|
|
58
|
-
private _lastAspectSize;
|
|
59
58
|
private _invViewProjMat;
|
|
60
59
|
/**
|
|
61
60
|
* Shader data.
|
|
@@ -249,4 +248,5 @@ export declare class Camera extends Component {
|
|
|
249
248
|
* The inverse of the projection matrix.
|
|
250
249
|
*/
|
|
251
250
|
private _getInverseProjectionMatrix;
|
|
251
|
+
private _onPixelViewportChanged;
|
|
252
252
|
}
|
package/types/Canvas.d.ts
CHANGED
|
@@ -1,9 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Canvas.
|
|
3
3
|
*/
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
|
|
4
|
+
export declare abstract class Canvas {
|
|
5
|
+
private _width;
|
|
6
|
+
private _height;
|
|
7
|
+
/**
|
|
8
|
+
* The width of the canvas.
|
|
9
|
+
*/
|
|
10
|
+
get width(): number;
|
|
11
|
+
set width(value: number);
|
|
12
|
+
/**
|
|
13
|
+
*The height of the canvas.
|
|
14
|
+
*/
|
|
15
|
+
get height(): number;
|
|
16
|
+
set height(value: number);
|
|
17
|
+
protected abstract _onWidthChanged(value: number): void;
|
|
18
|
+
protected abstract _onHeightChange(value: number): void;
|
|
9
19
|
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @deprecated Please use `PixelFormat` instead.
|
|
3
|
+
* Defines various pixel formats.
|
|
4
|
+
*/
|
|
5
|
+
export declare enum TextureFormat {
|
|
6
|
+
/** RGB format, 8 bits per channel. */
|
|
7
|
+
R8G8B8 = 0,
|
|
8
|
+
/** RGBA format, 8 bits per channel. */
|
|
9
|
+
R8G8B8A8 = 1,
|
|
10
|
+
/** RGBA format, 4 bits per channel. */
|
|
11
|
+
R4G4B4A4 = 2,
|
|
12
|
+
/** RGBA format, 5 bits in R channel, 5 bits in G channel, 5 bits in B channel, 1 bit in A channel. */
|
|
13
|
+
R5G5B5A1 = 3,
|
|
14
|
+
/** RGB format, 5 bits in R channel, 6 bits in G channel, 5 bits in B channel. */
|
|
15
|
+
R5G6B5 = 4,
|
|
16
|
+
/** Transparent format, 8 bits. */
|
|
17
|
+
Alpha8 = 5,
|
|
18
|
+
/** Luminance/alpha in RGB channel, alpha in A channel. */
|
|
19
|
+
LuminanceAlpha = 6,
|
|
20
|
+
/** RGBA format, 16 bits per channel. */
|
|
21
|
+
R16G16B16A16 = 7,
|
|
22
|
+
/** RGBA format, 32 bits per channel. */
|
|
23
|
+
R32G32B32A32 = 8,
|
|
24
|
+
/** RGB compressed format, 4 bits per pixel. */
|
|
25
|
+
BC1 = 9,
|
|
26
|
+
/** RGBA compressed format, 8 bits per pixel. */
|
|
27
|
+
BC3 = 10,
|
|
28
|
+
/** RGB(A) compressed format, 128 bits per 4x4 pixel block. */
|
|
29
|
+
BC7 = 11,
|
|
30
|
+
/** RGB compressed format, 4 bits per pixel. */
|
|
31
|
+
ETC1_RGB = 12,
|
|
32
|
+
/** RGB compressed format, 4 bits per pixel. */
|
|
33
|
+
ETC2_RGB = 13,
|
|
34
|
+
/** RGBA compressed format, 5 bits per pixel, 4 bit in RGB, 1 bit in A. */
|
|
35
|
+
ETC2_RGBA5 = 14,
|
|
36
|
+
/** RGB compressed format, 8 bits per pixel. */
|
|
37
|
+
ETC2_RGBA8 = 15,
|
|
38
|
+
/** RGB compressed format, 2 bits per pixel. */
|
|
39
|
+
PVRTC_RGB2 = 16,
|
|
40
|
+
/** RGBA compressed format, 2 bits per pixel. */
|
|
41
|
+
PVRTC_RGBA2 = 17,
|
|
42
|
+
/** RGB compressed format, 4 bits per pixel. */
|
|
43
|
+
PVRTC_RGB4 = 18,
|
|
44
|
+
/** RGBA compressed format, 4 bits per pixel. */
|
|
45
|
+
PVRTC_RGBA4 = 19,
|
|
46
|
+
/** RGB(A) compressed format, 128 bits per 4x4 pixel block. */
|
|
47
|
+
ASTC_4x4 = 20,
|
|
48
|
+
/** RGB(A) compressed format, 128 bits per 5x5 pixel block. */
|
|
49
|
+
ASTC_5x5 = 21,
|
|
50
|
+
/** RGB(A) compressed format, 128 bits per 6x6 pixel block. */
|
|
51
|
+
ASTC_6x6 = 22,
|
|
52
|
+
/** RGB(A) compressed format, 128 bits per 8x8 pixel block. */
|
|
53
|
+
ASTC_8x8 = 23,
|
|
54
|
+
/** RGB(A) compressed format, 128 bits per 10x10 pixel block. */
|
|
55
|
+
ASTC_10x10 = 24,
|
|
56
|
+
/** RGB(A) compressed format, 128 bits per 12x12 pixel block. */
|
|
57
|
+
ASTC_12x12 = 25,
|
|
58
|
+
/** Automatic depth format, engine will automatically select the supported precision. */
|
|
59
|
+
Depth = 26,
|
|
60
|
+
/** Render to stencil buffer. */
|
|
61
|
+
Stencil = 27,
|
|
62
|
+
/** Automatic depth stencil format, engine will automatically select the supported precision. */
|
|
63
|
+
DepthStencil = 28,
|
|
64
|
+
/** 16-bit depth format. */
|
|
65
|
+
Depth16 = 29,
|
|
66
|
+
/** 24-bit depth format. */
|
|
67
|
+
Depth24 = 30,
|
|
68
|
+
/** 32-bit depth format. */
|
|
69
|
+
Depth32 = 31,
|
|
70
|
+
/** 16-bit depth + 8-bit stencil format. */
|
|
71
|
+
Depth24Stencil8 = 32,
|
|
72
|
+
/** 32-bit depth + 8-bit stencil format. */
|
|
73
|
+
Depth32Stencil8 = 33,
|
|
74
|
+
/** @deprecated Use `PixelFormat.BC1` instead. */
|
|
75
|
+
DXT1 = 9,
|
|
76
|
+
/** @deprecated Use `PixelFormat.BC3` instead. */
|
|
77
|
+
DXT5 = 10
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* @deprecated Use `PixelFormat` instead.
|
|
81
|
+
*
|
|
82
|
+
* Render buffer depth format enumeration.
|
|
83
|
+
*/
|
|
84
|
+
export declare enum RenderBufferDepthFormat {
|
|
85
|
+
/** Render to depth buffer,engine will automatically select the supported precision. */
|
|
86
|
+
Depth = 26,
|
|
87
|
+
/** Render to stencil buffer. */
|
|
88
|
+
Stencil = 27,
|
|
89
|
+
/** Render to depth stencil buffer, engine will automatically select the supported precision. */
|
|
90
|
+
DepthStencil = 28,
|
|
91
|
+
/** Force 16-bit depth buffer. */
|
|
92
|
+
Depth16 = 29,
|
|
93
|
+
/** Force 24-bit depth buffer. */
|
|
94
|
+
Depth24 = 30,
|
|
95
|
+
/** Force 32-bit depth buffer. */
|
|
96
|
+
Depth32 = 31,
|
|
97
|
+
/** Force 16-bit depth + 8-bit stencil buffer. */
|
|
98
|
+
Depth24Stencil8 = 32,
|
|
99
|
+
/** Force 32-bit depth + 8-bit stencil buffer. */
|
|
100
|
+
Depth32Stencil8 = 33
|
|
101
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Entity } from "../Entity";
|
|
2
|
+
import { LayerPathMask } from "./LayerPathMask";
|
|
3
|
+
/**
|
|
4
|
+
* AnimatorLayerMask is used to mask out certain entities from being animated by an AnimatorLayer.
|
|
5
|
+
*/
|
|
6
|
+
export declare class AnimatorLayerMask {
|
|
7
|
+
/**
|
|
8
|
+
* Creates an AnimatorLayerMask instance by specifying an entity.
|
|
9
|
+
* This will automatically add path masks for the entity and all its children.
|
|
10
|
+
* @param entity - The root entity to create path masks for
|
|
11
|
+
*/
|
|
12
|
+
static createByEntity(entity: Entity): AnimatorLayerMask;
|
|
13
|
+
private static _addPathMaskWithChildren;
|
|
14
|
+
private _pathMasks;
|
|
15
|
+
private _pathMaskMap;
|
|
16
|
+
/**
|
|
17
|
+
* The list of path masks.
|
|
18
|
+
*/
|
|
19
|
+
get pathMasks(): Readonly<LayerPathMask[]>;
|
|
20
|
+
/**
|
|
21
|
+
* Adds a path mask to the AnimatorLayerMask, the root path is "".
|
|
22
|
+
* @param path - The path to add a mask for
|
|
23
|
+
* @returns The created or existing LayerPathMask
|
|
24
|
+
*/
|
|
25
|
+
addPathMask(path: string): LayerPathMask;
|
|
26
|
+
/**
|
|
27
|
+
* Removes a path mask from the AnimatorLayerMask.
|
|
28
|
+
* @param path - The path of the mask to remove
|
|
29
|
+
*/
|
|
30
|
+
removePathMask(path: string): void;
|
|
31
|
+
/**
|
|
32
|
+
* Get a path mask based on the given path.
|
|
33
|
+
* @param path - The path of the mask to get
|
|
34
|
+
* @returns The LayerPathMask for the given path
|
|
35
|
+
*/
|
|
36
|
+
getPathMask(path: string): LayerPathMask;
|
|
37
|
+
/**
|
|
38
|
+
* Sets the active state of a path mask.
|
|
39
|
+
* If recursive is true, it also sets the active state of all child path masks.
|
|
40
|
+
* @param path - The path of the mask to modify
|
|
41
|
+
* @param active - The active state to set
|
|
42
|
+
* @param withChildren - Whether to apply the active state recursively to child paths
|
|
43
|
+
*/
|
|
44
|
+
setPathMaskActive(path: string, active: boolean, withChildren?: boolean): void;
|
|
45
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LayerPathMask represents a mask for a specific entity in an animation layer.
|
|
3
|
+
* It is used to control the animation whether to be applied to the entity or not.
|
|
4
|
+
*/
|
|
5
|
+
export declare class LayerPathMask {
|
|
6
|
+
/**
|
|
7
|
+
* It identifies a particular entity in the hierarchy.
|
|
8
|
+
* Example: "arm/left/hand" could be a path to the left hand of a character.
|
|
9
|
+
*/
|
|
10
|
+
path: string;
|
|
11
|
+
/**
|
|
12
|
+
* The active property is indicating whether the animation at this path is active or not.
|
|
13
|
+
* When true, the animation for this path is applied; when false, the animation for this path is ignored.
|
|
14
|
+
*/
|
|
15
|
+
active: boolean;
|
|
16
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Multi-sample anti-aliasing samples.
|
|
3
|
+
*/
|
|
4
|
+
export declare enum MSAASamples {
|
|
5
|
+
/** No multi-sample anti-aliasing. */
|
|
6
|
+
None = 1,
|
|
7
|
+
/** Multi-sample anti-aliasing with 2 samples. */
|
|
8
|
+
TwoX = 2,
|
|
9
|
+
/** Multi-sample anti-aliasing with 4 samples. */
|
|
10
|
+
FourX = 4,
|
|
11
|
+
/** Multi-sample anti-aliasing with 8 samples. */
|
|
12
|
+
EightX = 8
|
|
13
|
+
}
|
package/types/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { Platform } from "./Platform";
|
|
2
2
|
export { Engine } from "./Engine";
|
|
3
3
|
export { SystemInfo } from "./SystemInfo";
|
|
4
|
-
export
|
|
4
|
+
export { Canvas } from "./Canvas";
|
|
5
5
|
export { Scene } from "./Scene";
|
|
6
6
|
export { SceneManager } from "./SceneManager";
|
|
7
7
|
export { Entity } from "./Entity";
|
|
@@ -6,6 +6,10 @@ import { ModelMesh } from "./ModelMesh";
|
|
|
6
6
|
*/
|
|
7
7
|
export declare class PrimitiveMesh {
|
|
8
8
|
private static _tempVec30;
|
|
9
|
+
private static readonly _sphereSeedPositions;
|
|
10
|
+
private static readonly _sphereSeedCells;
|
|
11
|
+
private static _sphereEdgeIdx;
|
|
12
|
+
private static _spherePoleIdx;
|
|
9
13
|
/**
|
|
10
14
|
* Create a sphere mesh.
|
|
11
15
|
* @param engine - Engine
|
|
@@ -15,6 +19,16 @@ export declare class PrimitiveMesh {
|
|
|
15
19
|
* @returns Sphere model mesh
|
|
16
20
|
*/
|
|
17
21
|
static createSphere(engine: Engine, radius?: number, segments?: number, noLongerAccessible?: boolean): ModelMesh;
|
|
22
|
+
/**
|
|
23
|
+
* Create a sphere mesh by implementing Catmull-Clark Surface Subdivision Algorithm.
|
|
24
|
+
* Max step is limited to 6.
|
|
25
|
+
* @param engine - Engine
|
|
26
|
+
* @param radius - Sphere radius
|
|
27
|
+
* @param step - Number of subdiv steps
|
|
28
|
+
* @param noLongerAccessible - No longer access the vertices of the mesh after creation
|
|
29
|
+
* @returns Sphere model mesh
|
|
30
|
+
*/
|
|
31
|
+
static createSubdivisionSurfaceSphere(engine: Engine, radius?: number, step?: number, noLongerAccessible?: boolean): ModelMesh;
|
|
18
32
|
/**
|
|
19
33
|
* Create a cuboid mesh.
|
|
20
34
|
* @param engine - Engine
|
|
@@ -82,6 +96,14 @@ export declare class PrimitiveMesh {
|
|
|
82
96
|
* @returns Capsule model mesh
|
|
83
97
|
*/
|
|
84
98
|
static createCapsule(engine: Engine, radius?: number, height?: number, radialSegments?: number, heightSegments?: number, noLongerAccessible?: boolean): ModelMesh;
|
|
99
|
+
/**
|
|
100
|
+
* Duplicate vertices at the poles and adjust their UV coordinates.
|
|
101
|
+
*/
|
|
102
|
+
private static _generateAndReplacePoleUV;
|
|
103
|
+
/**
|
|
104
|
+
* Get edge point index for subdivision surface sphere.
|
|
105
|
+
*/
|
|
106
|
+
private static _calculateEdgeIndex;
|
|
85
107
|
static _setCylinderData(cylinderMesh: ModelMesh, radiusTop: number, radiusBottom: number, height: number, radialSegments: number, heightSegments: number, noLongerAccessible: boolean, isRestoreMode: boolean, restoreVertexBuffer?: Buffer): void;
|
|
86
108
|
static _setCapsuleData(capsuleMesh: ModelMesh, radius: number, height: number, radialSegments: number, heightSegments: number, noLongerAccessible: boolean, isRestoreMode: boolean, restoreVertexBuffer?: Buffer): void;
|
|
87
109
|
private static _initialize;
|
|
@@ -9,11 +9,11 @@ export declare class SkinnedMeshRenderer extends MeshRenderer {
|
|
|
9
9
|
private static _jointCountProperty;
|
|
10
10
|
private static _jointSamplerProperty;
|
|
11
11
|
private static _jointMatrixProperty;
|
|
12
|
+
private _localBounds;
|
|
12
13
|
private _jointDataCreateCache;
|
|
13
14
|
private _blendShapeWeights;
|
|
14
15
|
private _maxVertexUniformVectors;
|
|
15
16
|
private _rootBone;
|
|
16
|
-
private _localBounds;
|
|
17
17
|
private _jointMatrices;
|
|
18
18
|
private _jointTexture;
|
|
19
19
|
private _bones;
|
|
@@ -54,7 +54,6 @@ export declare class MainModule implements ICustomClone {
|
|
|
54
54
|
scalingMode: ParticleScaleMode;
|
|
55
55
|
/** If set to true, the Particle Generator automatically begins to play on startup. */
|
|
56
56
|
playOnEnabled: boolean;
|
|
57
|
-
private _maxParticles;
|
|
58
57
|
private _generator;
|
|
59
58
|
private _gravity;
|
|
60
59
|
/**
|
|
@@ -63,32 +63,52 @@ export declare class ParticleGradient {
|
|
|
63
63
|
setKeys(colorKeys: GradientColorKey[], alphaKeys: GradientAlphaKey[]): void;
|
|
64
64
|
private _addKey;
|
|
65
65
|
private _removeKey;
|
|
66
|
+
private _setColorTypeArrayDirty;
|
|
67
|
+
private _setAlphaTypeArrayDirty;
|
|
66
68
|
}
|
|
67
69
|
/**
|
|
68
70
|
* The color key of the particle gradient.
|
|
69
71
|
*/
|
|
70
72
|
export declare class GradientColorKey {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
time: number
|
|
78
|
-
/**
|
|
79
|
-
|
|
73
|
+
private _time;
|
|
74
|
+
private _color;
|
|
75
|
+
/**
|
|
76
|
+
* The key time.
|
|
77
|
+
*/
|
|
78
|
+
get time(): number;
|
|
79
|
+
set time(value: number);
|
|
80
|
+
/**
|
|
81
|
+
* The key color.
|
|
82
|
+
*/
|
|
83
|
+
get color(): Color;
|
|
84
|
+
set color(value: Color);
|
|
85
|
+
/**
|
|
86
|
+
* Constructor of GradientColorKey.
|
|
87
|
+
* @param time - The time of the gradient colorKey
|
|
88
|
+
* @param color - The alpha component of the gradient colorKey
|
|
89
|
+
*/
|
|
90
|
+
constructor(time: number, color: Color);
|
|
80
91
|
}
|
|
81
92
|
/**
|
|
82
93
|
* The alpha key of the particle gradient.
|
|
83
94
|
*/
|
|
84
95
|
export declare class GradientAlphaKey {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
time: number
|
|
92
|
-
/**
|
|
93
|
-
|
|
96
|
+
private _time;
|
|
97
|
+
private _alpha;
|
|
98
|
+
/**
|
|
99
|
+
* The key time.
|
|
100
|
+
*/
|
|
101
|
+
get time(): number;
|
|
102
|
+
set time(value: number);
|
|
103
|
+
/**
|
|
104
|
+
* The key alpha.
|
|
105
|
+
*/
|
|
106
|
+
get alpha(): number;
|
|
107
|
+
set alpha(value: number);
|
|
108
|
+
/**
|
|
109
|
+
* Constructor of GradientAlphaKey.
|
|
110
|
+
* @param time - The time of the gradient alpha key
|
|
111
|
+
* @param alpha - The alpha component of the gradient alpha key
|
|
112
|
+
*/
|
|
113
|
+
constructor(time: number, alpha: number);
|
|
94
114
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Entity } from "../Entity";
|
|
2
2
|
import { Vector3 } from "@galacean/engine-math";
|
|
3
|
+
import { ColliderShape } from "./shape";
|
|
3
4
|
/**
|
|
4
5
|
* Structure used to get information back from a raycast or a sweep.
|
|
5
6
|
*/
|
|
@@ -12,4 +13,6 @@ export declare class HitResult {
|
|
|
12
13
|
point: Vector3;
|
|
13
14
|
/** The normal of the surface the ray hit. */
|
|
14
15
|
normal: Vector3;
|
|
16
|
+
/** The shape of the collider that was hit. */
|
|
17
|
+
shape: ColliderShape;
|
|
15
18
|
}
|
package/types/shader/Shader.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export declare class Shader {
|
|
|
19
19
|
* // Import shaderLab
|
|
20
20
|
* import { ShaderLab } from "@galacean/engine-shader-lab";
|
|
21
21
|
* // Create engine with shaderLab
|
|
22
|
-
* const engine = await WebGLEngine.create({ canvas: "canvas", new ShaderLab() });
|
|
22
|
+
* const engine = await WebGLEngine.create({ canvas: "canvas", shader: new ShaderLab() });
|
|
23
23
|
* ...
|
|
24
24
|
* ```
|
|
25
25
|
*
|
|
@@ -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
|
+
}
|
package/types/xr/XRManager.d.ts
CHANGED
|
@@ -1,31 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import { EnumXRTrackingMode } from "./enum/EnumXRTrackingMode";
|
|
5
|
-
import { XRFeature } from "./feature/XRFeature";
|
|
6
|
-
import { EnumXRSubsystem } from "./enum/EnumXRSubsystem";
|
|
7
|
-
import { XRProvider } from "./provider/XRProvider";
|
|
8
|
-
import { XRSubsystem } from "./subsystem/XRSubsystem";
|
|
9
|
-
type FeatureConstructor = new (engine: Engine) => XRFeature;
|
|
1
|
+
/**
|
|
2
|
+
* XRManager located in the main package, its implementation logic is XRManagerExtended in the sub-package engine-xr.
|
|
3
|
+
*/
|
|
10
4
|
export declare class XRManager {
|
|
11
|
-
private _engine;
|
|
12
|
-
private _provider;
|
|
13
|
-
private _features;
|
|
14
|
-
private _subsystems;
|
|
15
|
-
private _isPaused;
|
|
16
|
-
isSupportedMode(mode: EnumXRMode): Promise<void>;
|
|
17
|
-
isSupportedTrackingMode(mode: EnumXRTrackingMode): Promise<void>;
|
|
18
|
-
isSupportedFeature(feature: EnumXRFeature): Promise<void>;
|
|
19
|
-
getFeature<T extends XRFeature>(feature: EnumXRFeature): T;
|
|
20
|
-
enableFeature(feature: EnumXRFeature): void;
|
|
21
|
-
disableFeature(feature: EnumXRFeature): void;
|
|
22
|
-
getSubsystem<T extends XRSubsystem>(subsystem: EnumXRSubsystem): T;
|
|
23
|
-
initialize(mode: EnumXRMode, trackingMode: EnumXRTrackingMode, requestFeatures?: EnumXRFeature[]): Promise<void>;
|
|
24
|
-
start(): Promise<void>;
|
|
25
|
-
pause(): void;
|
|
26
|
-
resume(): void;
|
|
27
|
-
destroy(): void;
|
|
28
|
-
constructor(engine: Engine, type: new (engine: Engine) => XRProvider);
|
|
29
5
|
}
|
|
30
|
-
export declare function registerFeature(feature: EnumXRFeature, dependentSubsystem?: EnumXRSubsystem[]): (featureConstructor: FeatureConstructor) => void;
|
|
31
|
-
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Mesh } from "../graphic/Mesh";
|
|
2
|
-
import { SubMesh } from "../graphic/SubMesh";
|
|
3
|
-
import { Material } from "../material/Material";
|
|
4
|
-
import { Renderer } from "../Renderer";
|
|
5
|
-
import { IPoolElement } from "./IPoolElement";
|
|
6
|
-
import { RenderData } from "./RenderData";
|
|
7
|
-
/**
|
|
8
|
-
* Render element.
|
|
9
|
-
*/
|
|
10
|
-
export declare class MeshRenderData extends RenderData implements IPoolElement {
|
|
11
|
-
/** Mesh. */
|
|
12
|
-
mesh: Mesh;
|
|
13
|
-
/** Sub mesh. */
|
|
14
|
-
subMesh: SubMesh;
|
|
15
|
-
set(component: Renderer, material: Material, mesh: Mesh, subMesh: SubMesh): void;
|
|
16
|
-
dispose(): void;
|
|
17
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Mesh } from "../graphic/Mesh";
|
|
2
|
-
import { SubMesh } from "../graphic/SubMesh";
|
|
3
|
-
import { Material } from "../material/Material";
|
|
4
|
-
import { Renderer } from "../Renderer";
|
|
5
|
-
import { ShaderPass } from "../shader/ShaderPass";
|
|
6
|
-
import { RenderState } from "../shader/state/RenderState";
|
|
7
|
-
import { IPoolElement } from "./IPoolElement";
|
|
8
|
-
import { RenderElement } from "./RenderElement";
|
|
9
|
-
/**
|
|
10
|
-
* Render element.
|
|
11
|
-
*/
|
|
12
|
-
export declare class MeshRenderElement extends RenderElement implements IPoolElement {
|
|
13
|
-
/** Mesh. */
|
|
14
|
-
mesh: Mesh;
|
|
15
|
-
/** Sub mesh. */
|
|
16
|
-
subMesh: SubMesh;
|
|
17
|
-
setValue(component: Renderer, mesh: Mesh, subMesh: SubMesh, material: Material, renderState: RenderState, shaderPass: ShaderPass): void;
|
|
18
|
-
dispose(): void;
|
|
19
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Renderer } from "../Renderer";
|
|
2
|
-
import { Primitive } from "../graphic/Primitive";
|
|
3
|
-
import { Material } from "../material/Material";
|
|
4
|
-
import { ShaderPass } from "../shader/ShaderPass";
|
|
5
|
-
import { IPoolElement } from "./IPoolElement";
|
|
6
|
-
export declare class RenderElementX implements IPoolElement {
|
|
7
|
-
shaderPasses: ReadonlyArray<ShaderPass>;
|
|
8
|
-
component: Renderer;
|
|
9
|
-
material: Material;
|
|
10
|
-
primitive: Primitive;
|
|
11
|
-
dispose(): void;
|
|
12
|
-
}
|