@galacean/engine-rhi-webgl 0.0.0-experimental-renderSort.4 → 0.0.0-experimental-shaderlab.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/LICENSE +2 -2
- package/dist/main.js +99 -100
- package/dist/main.js.map +1 -1
- package/dist/miniprogram.js +99 -100
- package/dist/module.js +99 -100
- package/dist/module.js.map +1 -1
- package/package.json +4 -4
- package/types/GLRenderTarget.d.ts +3 -2
- package/types/WebCanvas.d.ts +3 -13
- package/types/WebGLGraphicDevice.d.ts +5 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@galacean/engine-rhi-webgl",
|
|
3
|
-
"version": "0.0.0-experimental-
|
|
3
|
+
"version": "0.0.0-experimental-shaderlab.2",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
"types/**/*"
|
|
16
16
|
],
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@galacean/engine-math": "0.0.0-experimental-
|
|
19
|
-
"@galacean/engine-core": "0.0.0-experimental-
|
|
18
|
+
"@galacean/engine-math": "0.0.0-experimental-shaderlab.2",
|
|
19
|
+
"@galacean/engine-core": "0.0.0-experimental-shaderlab.2"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"@galacean/engine-design": "0.0.0-experimental-
|
|
22
|
+
"@galacean/engine-design": "0.0.0-experimental-shaderlab.2"
|
|
23
23
|
},
|
|
24
24
|
"scripts": {
|
|
25
25
|
"b:types": "tsc"
|
|
@@ -15,16 +15,17 @@ export declare class GLRenderTarget implements IPlatformRenderTarget {
|
|
|
15
15
|
private _oriDrawBuffers;
|
|
16
16
|
private _blitDrawBuffers;
|
|
17
17
|
private _curMipLevel;
|
|
18
|
+
private _curFaceIndex;
|
|
18
19
|
/**
|
|
19
20
|
* Create render target in WebGL platform.
|
|
20
21
|
*/
|
|
21
22
|
constructor(rhi: WebGLGraphicDevice, target: RenderTarget);
|
|
22
23
|
/**
|
|
23
24
|
* Set which face and mipLevel of the cube texture to render to.
|
|
24
|
-
* @param faceIndex - Cube texture face
|
|
25
25
|
* @param mipLevel - Set mip level the data want to write
|
|
26
|
+
* @param faceIndex - Cube texture face
|
|
26
27
|
*/
|
|
27
|
-
|
|
28
|
+
activeRenderTarget(mipLevel: number, faceIndex?: TextureCubeFace): void;
|
|
28
29
|
/**
|
|
29
30
|
* Blit FBO.
|
|
30
31
|
*/
|
package/types/WebCanvas.d.ts
CHANGED
|
@@ -4,21 +4,9 @@ type OffscreenCanvas = any;
|
|
|
4
4
|
/**
|
|
5
5
|
* The canvas used on the web, which can support HTMLCanvasElement and OffscreenCanvas.
|
|
6
6
|
*/
|
|
7
|
-
export declare class WebCanvas
|
|
7
|
+
export declare class WebCanvas extends Canvas {
|
|
8
8
|
_webCanvas: HTMLCanvasElement | OffscreenCanvas;
|
|
9
|
-
private _width;
|
|
10
|
-
private _height;
|
|
11
9
|
private _scale;
|
|
12
|
-
/**
|
|
13
|
-
* @inheritdoc
|
|
14
|
-
*/
|
|
15
|
-
get width(): number;
|
|
16
|
-
set width(value: number);
|
|
17
|
-
/**
|
|
18
|
-
* @inheritdoc
|
|
19
|
-
*/
|
|
20
|
-
get height(): number;
|
|
21
|
-
set height(value: number);
|
|
22
10
|
/**
|
|
23
11
|
* The scale of canvas, the value is visible width/height divide the render width/height.
|
|
24
12
|
* @remarks Need to re-assign after modification to ensure that the modification takes effect.
|
|
@@ -41,5 +29,7 @@ export declare class WebCanvas implements Canvas {
|
|
|
41
29
|
* @param y - Scale along the Y axis
|
|
42
30
|
*/
|
|
43
31
|
setScale(x: number, y: number): void;
|
|
32
|
+
protected _onWidthChanged(value: number): void;
|
|
33
|
+
protected _onHeightChange(value: number): void;
|
|
44
34
|
}
|
|
45
35
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BufferBindFlag, BufferUsage, CameraClearFlags, Canvas, Engine, GLCapabilityType,
|
|
2
|
-
import { IPlatformPrimitive } from "@galacean/engine-design";
|
|
1
|
+
import { BufferBindFlag, BufferUsage, CameraClearFlags, Canvas, Engine, GLCapabilityType, IPlatformBuffer, IPlatformRenderTarget, IPlatformTexture2D, IPlatformTextureCube, Mesh, RenderTarget, SubMesh, Texture2D, Texture2DArray, TextureCube, TextureCubeFace } from "@galacean/engine-core";
|
|
2
|
+
import { IHardwareRenderer, IPlatformPrimitive } from "@galacean/engine-design";
|
|
3
3
|
import { Color, Vector4 } from "@galacean/engine-math";
|
|
4
4
|
import { GLCapability } from "./GLCapability";
|
|
5
5
|
import { GLPrimitive } from "./GLPrimitive";
|
|
@@ -71,7 +71,9 @@ export declare class WebGLGraphicDevice implements IHardwareRenderer {
|
|
|
71
71
|
colorMask(r: boolean, g: boolean, b: boolean, a: boolean): void;
|
|
72
72
|
clearRenderTarget(engine: Engine, clearFlags: CameraClearFlags, clearColor: Color): void;
|
|
73
73
|
drawPrimitive(primitive: GLPrimitive, subPrimitive: SubMesh, shaderProgram: any): void;
|
|
74
|
-
|
|
74
|
+
getMainFrameBufferWidth(): number;
|
|
75
|
+
getMainFrameBufferHeight(): number;
|
|
76
|
+
activeRenderTarget(renderTarget: RenderTarget, viewport: Vector4, isFlipProjection: boolean, mipLevel: number, faceIndex?: TextureCubeFace): void;
|
|
75
77
|
activeTexture(textureID: number): void;
|
|
76
78
|
bindTexture(texture: GLTexture): void;
|
|
77
79
|
setGlobalDepthBias(bias: number, slopeBias: number): void;
|