diff --git a/cocos/core/gfx/webgl/webgl-command-buffer.ts b/cocos/core/gfx/webgl/webgl-command-buffer.ts index d3367606b3..1112fd65f1 100644 --- a/cocos/core/gfx/webgl/webgl-command-buffer.ts +++ b/cocos/core/gfx/webgl/webgl-command-buffer.ts @@ -238,20 +238,20 @@ export class WebGLGFXCommandBuffer extends GFXCommandBuffer { } } - public setDepthBias (depthBiasConstantFacotr: number, depthBiasClamp: number, depthBiasSlopeFactor: number) { + public setDepthBias (depthBiasConstantFactor: number, depthBiasClamp: number, depthBiasSlopeFactor: number) { if (!this._curDepthBias) { this._curDepthBias = { - constantFactor: depthBiasConstantFacotr, + constantFactor: depthBiasConstantFactor, clamp: depthBiasClamp, slopeFactor: depthBiasSlopeFactor, }; this._isStateInvalied = true; } else { - if (this._curDepthBias.constantFactor !== depthBiasConstantFacotr || + if (this._curDepthBias.constantFactor !== depthBiasConstantFactor || this._curDepthBias.clamp !== depthBiasClamp || this._curDepthBias.slopeFactor !== depthBiasSlopeFactor) { - this._curDepthBias.constantFactor = depthBiasConstantFacotr; + this._curDepthBias.constantFactor = depthBiasConstantFactor; this._curDepthBias.clamp = depthBiasClamp; this._curDepthBias.slopeFactor = depthBiasSlopeFactor; this._isStateInvalied = true; diff --git a/cocos/core/gfx/webgl/webgl-commands.ts b/cocos/core/gfx/webgl/webgl-commands.ts index f7f22199dd..389aefffa6 100644 --- a/cocos/core/gfx/webgl/webgl-commands.ts +++ b/cocos/core/gfx/webgl/webgl-commands.ts @@ -1195,7 +1195,7 @@ export function WebGLCmdFuncCreateShader (device: WebGLGFXDevice, gpuShader: Web gl.linkProgram(gpuShader.glProgram); if (gl.getProgramParameter(gpuShader.glProgram, gl.LINK_STATUS)) { - console.info('Shader \'' + gpuShader.name + '\' compilation successed.'); + console.info('Shader \'' + gpuShader.name + '\' compilation succeeded.'); } else { console.error('Failed to link shader \'' + gpuShader.name + '\'.'); console.error(gl.getProgramInfoLog(gpuShader.glProgram)); @@ -1545,7 +1545,7 @@ export function WebGLCmdFuncExecuteCmds (device: WebGLGFXDevice, cmdPackage: Web if (colorAttachment.format !== GFXFormat.UNKNOWN) { switch (colorAttachment.loadOp) { - case GFXLoadOp.LOAD: break; // GL default behaviour + case GFXLoadOp.LOAD: break; // GL default behavior case GFXLoadOp.CLEAR: { if (cmd0.clearFlag & GFXClearFlag.COLOR) { if (cache.bs.targets[0].blendColorMask !== GFXColorMask.ALL) { @@ -1572,7 +1572,7 @@ export function WebGLCmdFuncExecuteCmds (device: WebGLGFXDevice, cmdPackage: Web if (curGPURenderPass.depthStencilAttachment.format !== GFXFormat.UNKNOWN) { switch (curGPURenderPass.depthStencilAttachment.depthLoadOp) { - case GFXLoadOp.LOAD: break; // GL default behaviour + case GFXLoadOp.LOAD: break; // GL default behavior case GFXLoadOp.CLEAR: { if (cmd0.clearFlag & GFXClearFlag.DEPTH) { if (!cache.dss.depthWrite) { @@ -1595,7 +1595,7 @@ export function WebGLCmdFuncExecuteCmds (device: WebGLGFXDevice, cmdPackage: Web if (GFXFormatInfos[curGPURenderPass.depthStencilAttachment.format].hasStencil) { switch (curGPURenderPass.depthStencilAttachment.stencilLoadOp) { - case GFXLoadOp.LOAD: break; // GL default behaviour + case GFXLoadOp.LOAD: break; // GL default behavior case GFXLoadOp.CLEAR: { if (cmd0.clearFlag & GFXClearFlag.STENCIL) { if (!cache.dss.stencilWriteMaskFront) { @@ -1666,7 +1666,7 @@ export function WebGLCmdFuncExecuteCmds (device: WebGLGFXDevice, cmdPackage: Web /* case WebGLCmd.END_RENDER_PASS: { // WebGL 1.0 doesn't support store operation of attachments. - // GFXStoreOp.Store is the default GL behaviour. + // GFXStoreOp.Store is the default GL behavior. break; } */ diff --git a/cocos/core/gfx/webgl2/webgl2-command-buffer.ts b/cocos/core/gfx/webgl2/webgl2-command-buffer.ts index 17e64dfe94..b621f78750 100644 --- a/cocos/core/gfx/webgl2/webgl2-command-buffer.ts +++ b/cocos/core/gfx/webgl2/webgl2-command-buffer.ts @@ -237,20 +237,20 @@ export class WebGL2GFXCommandBuffer extends GFXCommandBuffer { } } - public setDepthBias (depthBiasConstantFacotr: number, depthBiasClamp: number, depthBiasSlopeFactor: number) { + public setDepthBias (depthBiasConstantFactor: number, depthBiasClamp: number, depthBiasSlopeFactor: number) { if (!this._curDepthBias) { this._curDepthBias = { - constantFactor: depthBiasConstantFacotr, + constantFactor: depthBiasConstantFactor, clamp: depthBiasClamp, slopeFactor: depthBiasSlopeFactor, }; this._isStateInvalied = true; } else { - if (this._curDepthBias.constantFactor !== depthBiasConstantFacotr || + if (this._curDepthBias.constantFactor !== depthBiasConstantFactor || this._curDepthBias.clamp !== depthBiasClamp || this._curDepthBias.slopeFactor !== depthBiasSlopeFactor) { - this._curDepthBias.constantFactor = depthBiasConstantFacotr; + this._curDepthBias.constantFactor = depthBiasConstantFactor; this._curDepthBias.clamp = depthBiasClamp; this._curDepthBias.slopeFactor = depthBiasSlopeFactor; this._isStateInvalied = true; diff --git a/cocos/core/gfx/webgl2/webgl2-commands.ts b/cocos/core/gfx/webgl2/webgl2-commands.ts index eb422cf2d6..2104f1a1d0 100644 --- a/cocos/core/gfx/webgl2/webgl2-commands.ts +++ b/cocos/core/gfx/webgl2/webgl2-commands.ts @@ -1784,7 +1784,7 @@ export function WebGL2CmdFuncExecuteCmds (device: WebGL2GFXDevice, cmdPackage: W if (colorAttachment.format !== GFXFormat.UNKNOWN) { switch (colorAttachment.loadOp) { - case GFXLoadOp.LOAD: break; // GL default behaviour + case GFXLoadOp.LOAD: break; // GL default behavior case GFXLoadOp.CLEAR: { if (cmd0.clearFlag & GFXClearFlag.COLOR) { if (cache.bs.targets[0].blendColorMask !== GFXColorMask.ALL) { @@ -1819,7 +1819,7 @@ export function WebGL2CmdFuncExecuteCmds (device: WebGL2GFXDevice, cmdPackage: W if (curGPURenderPass.depthStencilAttachment.format !== GFXFormat.UNKNOWN) { switch (curGPURenderPass.depthStencilAttachment.depthLoadOp) { - case GFXLoadOp.LOAD: break; // GL default behaviour + case GFXLoadOp.LOAD: break; // GL default behavior case GFXLoadOp.CLEAR: { if (cmd0.clearFlag & GFXClearFlag.DEPTH) { if (!cache.dss.depthWrite) { @@ -1842,7 +1842,7 @@ export function WebGL2CmdFuncExecuteCmds (device: WebGL2GFXDevice, cmdPackage: W if (GFXFormatInfos[curGPURenderPass.depthStencilAttachment.format].hasStencil) { switch (curGPURenderPass.depthStencilAttachment.stencilLoadOp) { - case GFXLoadOp.LOAD: break; // GL default behaviour + case GFXLoadOp.LOAD: break; // GL default behavior case GFXLoadOp.CLEAR: { if (cmd0.clearFlag & GFXClearFlag.STENCIL) { if (!cache.dss.stencilWriteMaskFront) { @@ -1910,7 +1910,7 @@ export function WebGL2CmdFuncExecuteCmds (device: WebGL2GFXDevice, cmdPackage: W } case WebGL2Cmd.END_RENDER_PASS: { // WebGL 2.0 doesn't support store operation of attachments. - // GFXStoreOp.Store is the default GL behaviour. + // GFXStoreOp.Store is the default GL behavior. break; } case WebGL2Cmd.BIND_STATES: { diff --git a/cocos/core/renderer/ui/mesh-buffer.ts b/cocos/core/renderer/ui/mesh-buffer.ts index ccc1335442..41bc1cc144 100644 --- a/cocos/core/renderer/ui/mesh-buffer.ts +++ b/cocos/core/renderer/ui/mesh-buffer.ts @@ -151,13 +151,13 @@ export class MeshBuffer { return; } - const vertexsData = new Float32Array(this.vData!.buffer, 0, this.byteOffset >> 2); + const verticesData = new Float32Array(this.vData!.buffer, 0, this.byteOffset >> 2); const indicesData = new Uint16Array(this.iData!.buffer, 0, this.indiceOffset); if (this.byteOffset > this.vb!.size) { this.vb!.resize(this.byteOffset); } - this.vb!.update(vertexsData); + this.vb!.update(verticesData); if (this.indiceOffset * 2 > this.ib!.size) { this.ib!.resize(this.indiceOffset * 2);