WebGpuContext
Extends:
cables webgpu context/state manager
Constructor Summary
Public Constructor | ||
public |
|
Member Summary
Public Members | ||
public |
CULL_MODES: string[] |
|
public |
DEPTH_FUNCS: string[] |
|
public |
gApi: * |
|
public |
patch: * |
Private Members | ||
private |
_shaderStack: *[] |
|
private |
|
|
private |
_stackCullFace: *[] |
|
private |
_stackCullFaceFacing: *[] |
|
private |
_stackDepthFunc: *[] |
|
private |
_stackDepthTest: *[] |
|
private |
_stackDepthWrite: *[] |
|
private |
_viewport: number[] |
Method Summary
Public Methods | ||
public |
createMesh(geom: *, glPrimitive: *): * |
|
public |
getShader(): {} |
|
public |
getShader(): * |
|
public |
getViewPort(): number[] |
|
public |
getViewPort(): Array |
|
public |
pop face culling enabled state |
|
public |
pop face culling face side |
|
public |
pop depth compare func |
|
public |
pop depth testing state |
|
public |
pop depth writing state |
|
public |
popErrorScope(name: *, cb: *) |
|
public |
pop current used shader from shader stack |
|
public |
pushCullFace(b: Boolean) push face culling face enabled state |
|
public |
pushCullFaceFacing(b: *) push face culling face side |
|
public |
pushDepthFunc(f: string) |
|
public |
pushDepthTest(b: Boolean) push depth testing enabled state |
|
public |
pushDepthWrite(b: Boolean) push depth write enabled state |
|
public |
|
|
public |
pushShader(shader: Object) push a shader to the shader stack |
|
public |
|
|
public |
renderStart(cgp: *, identTranslate: *, identTranslateView: *) |
|
public |
setViewPort(x: *, y: *, w: *, h: *) |
|
public |
stateCullFace(): Boolean current state of face culling |
|
public |
stateCullFaceFacing(): Boolean current state of face culling side |
|
public |
stateDepthFunc(): string |
|
public |
stateDepthTest(): Boolean current state of depth testing |
|
public |
stateDepthWrite(): Boolean current state of depth writing |
Inherited Summary
From class CGState | ||
public get |
canvas: * |
|
public get |
canvasHeight: * |
|
public get |
canvasWidth: * |
|
public get |
pixelDensity: * |
|
public set |
|
|
public |
DEPTH_COMPARE_FUNC_ALWAYS: number |
|
public |
DEPTH_COMPARE_FUNC_EQUAL: number |
|
public |
DEPTH_COMPARE_FUNC_GREATER: number |
|
public |
DEPTH_COMPARE_FUNC_GREATEREQUAL: number |
|
public |
DEPTH_COMPARE_FUNC_LESS: number |
|
public |
DEPTH_COMPARE_FUNC_LESSEQUAL: number |
|
public |
DEPTH_COMPARE_FUNC_NEVER: number |
|
public |
DEPTH_COMPARE_FUNC_NOTEQUAL: number |
|
public |
aborted: boolean |
|
public |
canvasScale: number |
|
public |
cgCanvas: * |
|
public |
fpsCounter: * |
|
public |
mMatrix: mat4 Current model matrix |
|
public |
pMatrix: mat4 Current projection matrix |
|
public |
patch: * |
|
public |
vMatrix: mat4 Current view matrix |
|
private |
_ident: * |
|
private |
_identView: * |
|
private |
|
|
private |
|
|
private |
_textureslots: *[] |
|
private |
|
|
public |
dispose() |
|
public |
getGApiName(): * |
|
public |
|
|
public |
|
|
public |
modelMatrix(): mat4 get model matrix |
|
public |
popModelMatrix(): mat4 pop model matrix stack |
|
public |
popPMatrix(): mat4 pop projection matrix stack |
|
public |
popViewMatrix(): mat4 pop view matrix stack |
|
public |
push a matrix to the model matrix stack |
|
public |
push a matrix to the projection matrix stack |
|
public |
push a matrix to the view matrix stack |
|
public |
setAutoResize(parent: *) |
|
public |
setCanvas(canvEle: *) |
|
public |
setSize(w: *, h: *, ignorestyle: *) |
|
public |
|
|
private |
|
|
private |
|
|
private |
|
|
private |
_startMatrixStacks(identTranslate: *, identTranslateView: *) |
Public Constructors
Public Members
public CULL_MODES: string[] source
public DEPTH_FUNCS: string[] source
public gApi: * source
Private Members
private _shaderStack: *[] source
private _simpleShader: * source
private _stackCullFace: *[] source
private _stackCullFaceFacing: *[] source
private _stackDepthFunc: *[] source
private _stackDepthTest: *[] source
private _stackDepthWrite: *[] source
private _viewport: number[] source
Public Methods
public createMesh(geom: *, glPrimitive: *): * source
Params:
Name | Type | Attribute | Description |
geom | * | ||
glPrimitive | * |
Return:
* |
public popErrorScope(name: *, cb: *) source
Params:
Name | Type | Attribute | Description |
name | * | ||
cb | * |
public pushCullFace(b: Boolean) source
push face culling face enabled state
Params:
Name | Type | Attribute | Description |
b | Boolean | enabled |
public pushCullFaceFacing(b: *) source
push face culling face side
Params:
Name | Type | Attribute | Description |
b | * |
public pushDepthFunc(f: string) source
Params:
Name | Type | Attribute | Description |
f | string | depth compare func |
public pushDepthTest(b: Boolean) source
push depth testing enabled state
Params:
Name | Type | Attribute | Description |
b | Boolean | enabled |
public pushDepthWrite(b: Boolean) source
push depth write enabled state
Params:
Name | Type | Attribute | Description |
b | Boolean | enabled |
public pushErrorScope() source
public pushShader(shader: Object) source
push a shader to the shader stack
Params:
Name | Type | Attribute | Description |
shader | Object |
public renderEnd() source
public renderStart(cgp: *, identTranslate: *, identTranslateView: *) source
Params:
Name | Type | Attribute | Description |
cgp | * | ||
identTranslate | * | ||
identTranslateView | * |
public setViewPort(x: *, y: *, w: *, h: *) source
Params:
Name | Type | Attribute | Description |
x | * | ||
y | * | ||
w | * | ||
h | * |
public stateCullFaceFacing(): Boolean source
current state of face culling side
Return:
Boolean | enabled |