@galacean/engine-core 1.2.0-alpha.1 → 1.2.0-alpha.3
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 +180 -195
- package/dist/main.js.map +1 -1
- package/dist/miniprogram.js +180 -195
- package/dist/module.js +180 -195
- package/dist/module.js.map +1 -1
- package/package.json +3 -3
- package/types/Camera.d.ts +11 -5
- package/types/Engine.d.ts +4 -2
- package/types/Utils.d.ts +6 -0
- package/types/asset/AssetType.d.ts +2 -0
- package/types/asset/ResourceManager.d.ts +2 -0
- package/types/input/InputManager.d.ts +0 -2
- package/types/input/interface/IInput.d.ts +0 -8
- package/types/shaderlib/ShaderFactory.d.ts +5 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@galacean/engine-core",
|
|
3
|
-
"version": "1.2.0-alpha.
|
|
3
|
+
"version": "1.2.0-alpha.3",
|
|
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.2.0-alpha.
|
|
18
|
+
"@galacean/engine-math": "1.2.0-alpha.3"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@galacean/engine-design": "1.2.0-alpha.
|
|
21
|
+
"@galacean/engine-design": "1.2.0-alpha.3"
|
|
22
22
|
},
|
|
23
23
|
"scripts": {
|
|
24
24
|
"b:types": "tsc"
|
package/types/Camera.d.ts
CHANGED
|
@@ -37,18 +37,18 @@ export declare class Camera extends Component {
|
|
|
37
37
|
depthTextureMode: DepthTextureMode;
|
|
38
38
|
private _priority;
|
|
39
39
|
private _shaderData;
|
|
40
|
-
private
|
|
40
|
+
private _isCustomViewMatrix;
|
|
41
|
+
private _isCustomProjectionMatrix;
|
|
41
42
|
private _nearClipPlane;
|
|
42
43
|
private _farClipPlane;
|
|
43
44
|
private _fieldOfView;
|
|
44
45
|
private _orthographicSize;
|
|
45
46
|
private _isProjectionDirty;
|
|
46
47
|
private _isInvProjMatDirty;
|
|
47
|
-
private _isFrustumProjectDirty;
|
|
48
48
|
private _customAspectRatio;
|
|
49
49
|
private _renderTarget;
|
|
50
50
|
private _depthBufferParams;
|
|
51
|
-
private
|
|
51
|
+
private _frustumChangeFlag;
|
|
52
52
|
private _transform;
|
|
53
53
|
private _isViewMatrixDirty;
|
|
54
54
|
private _isInvViewProjDirty;
|
|
@@ -112,12 +112,13 @@ export declare class Camera extends Component {
|
|
|
112
112
|
* View matrix.
|
|
113
113
|
*/
|
|
114
114
|
get viewMatrix(): Readonly<Matrix>;
|
|
115
|
+
set viewMatrix(value: Matrix);
|
|
115
116
|
/**
|
|
116
117
|
* The projection matrix is calculated by the relevant parameters of the camera by default.
|
|
117
118
|
* If it is manually set, the manual value will be maintained. Call resetProjectionMatrix() to restore it.
|
|
118
119
|
*/
|
|
120
|
+
get projectionMatrix(): Readonly<Matrix>;
|
|
119
121
|
set projectionMatrix(value: Matrix);
|
|
120
|
-
get projectionMatrix(): Matrix;
|
|
121
122
|
/**
|
|
122
123
|
* Whether to enable HDR.
|
|
123
124
|
* @todo When render pipeline modification
|
|
@@ -129,6 +130,10 @@ export declare class Camera extends Component {
|
|
|
129
130
|
*/
|
|
130
131
|
get renderTarget(): RenderTarget | null;
|
|
131
132
|
set renderTarget(value: RenderTarget | null);
|
|
133
|
+
/**
|
|
134
|
+
* Restore the view matrix to the world matrix of the entity.
|
|
135
|
+
*/
|
|
136
|
+
resetViewMatrix(): void;
|
|
132
137
|
/**
|
|
133
138
|
* Restore the automatic calculation of projection matrix through fieldOfView, nearClipPlane and farClipPlane.
|
|
134
139
|
*/
|
|
@@ -237,7 +242,8 @@ export declare class Camera extends Component {
|
|
|
237
242
|
*/
|
|
238
243
|
_onDisableInScene(): void;
|
|
239
244
|
private _updatePixelViewport;
|
|
240
|
-
private
|
|
245
|
+
private _viewMatrixChange;
|
|
246
|
+
private _projectionMatrixChange;
|
|
241
247
|
private _innerViewportToWorldPoint;
|
|
242
248
|
private _updateShaderData;
|
|
243
249
|
/**
|
package/types/Engine.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IHardwareRenderer, IPhysics, IShaderLab, IXRDevice } from "@galacean/engine-design";
|
|
1
|
+
import { IHardwareRenderer, IInputOptions, IPhysics, IShaderLab, IXRDevice } from "@galacean/engine-design";
|
|
2
2
|
import { Canvas } from "./Canvas";
|
|
3
3
|
import { EngineSettings } from "./EngineSettings";
|
|
4
4
|
import { Entity } from "./Entity";
|
|
@@ -136,6 +136,8 @@ export interface EngineConfiguration {
|
|
|
136
136
|
xrDevice?: IXRDevice;
|
|
137
137
|
/** Color space. */
|
|
138
138
|
colorSpace?: ColorSpace;
|
|
139
|
-
/** Shader lab */
|
|
139
|
+
/** Shader lab. */
|
|
140
140
|
shaderLab?: IShaderLab;
|
|
141
|
+
/** Input options. */
|
|
142
|
+
input?: IInputOptions;
|
|
141
143
|
}
|
package/types/Utils.d.ts
CHANGED
|
@@ -15,6 +15,12 @@ export declare class Utils {
|
|
|
15
15
|
* @returns Whether the url is absolute url.
|
|
16
16
|
*/
|
|
17
17
|
static isAbsoluteUrl(url: string): boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Judge whether the url is base64 url.
|
|
20
|
+
* @param url - The url to be judged.
|
|
21
|
+
* @returns Whether the url is base64 url.
|
|
22
|
+
*/
|
|
23
|
+
static isBase64Url(url: string): boolean;
|
|
18
24
|
/**
|
|
19
25
|
* Get the values of an object.
|
|
20
26
|
*/
|
|
@@ -15,6 +15,8 @@ export declare class ResourceManager {
|
|
|
15
15
|
retryInterval: number;
|
|
16
16
|
/** The default timeout period for loading assets, in milliseconds. */
|
|
17
17
|
timeout: number;
|
|
18
|
+
/** Base url for loading assets. */
|
|
19
|
+
baseUrl: string | null;
|
|
18
20
|
private _loadingPromises;
|
|
19
21
|
/** Asset path pool, key is the `instanceID` of resource, value is asset path. */
|
|
20
22
|
private _assetPool;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
export declare class ShaderFactory {
|
|
2
2
|
static parseCustomMacros(macros: string[]): string;
|
|
3
3
|
static registerInclude(includeName: string, includeSource: string): void;
|
|
4
|
-
|
|
4
|
+
/**
|
|
5
|
+
* @param regex The default regex is for engine's builtin glsl `#include` syntax,
|
|
6
|
+
* since `ShaderLab` use the same parsing function but different syntax for `#include` --- `/^[ \t]*#include +"([\w\d.]+)"/gm`
|
|
7
|
+
*/
|
|
8
|
+
static parseIncludes(src: string, regex?: RegExp): string;
|
|
5
9
|
/**
|
|
6
10
|
* Convert lower GLSL version to GLSL 300 es.
|
|
7
11
|
* @param shader - code
|