Skip to content

Commit

Permalink
Fix typos and pseudo-typos 10 (#36251)
Browse files Browse the repository at this point in the history
* Fix typos and pseudo-typos 10

* Use underscore
  • Loading branch information
Josh-Cena authored Oct 27, 2024
1 parent fff34ae commit bff3a6a
Show file tree
Hide file tree
Showing 48 changed files with 151 additions and 149 deletions.
14 changes: 7 additions & 7 deletions files/en-us/web/api/gamepad_api/using_the_gamepad_api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,16 +193,16 @@ function gameLoop() {
This example shows how to use the {{domxref("Gamepad")}} object, as well as the {{domxref("Window/gamepadconnected_event", "gamepadconnected")}} and {{domxref("Window/gamepaddisconnected_event", "gamepaddisconnected")}} events to display the state of all gamepads connected to the system. The example is based on a [Gamepad demo](https://luser.github.io/gamepadtest/), which has the [source code available on GitHub](https://github.com/luser/gamepadtest).

```js
let loopstarted = false;
let loopStarted = false;

window.addEventListener("gamepadconnected", (evt) => {
addgamepad(evt.gamepad);
addGamepad(evt.gamepad);
});
window.addEventListener("gamepaddisconnected", (evt) => {
removegamepad(evt.gamepad);
removeGamepad(evt.gamepad);
});

function addgamepad(gamepad) {
function addGamepad(gamepad) {
const d = document.createElement("div");
d.setAttribute("id", `controller${gamepad.index}`);

Expand Down Expand Up @@ -242,13 +242,13 @@ function addgamepad(gamepad) {
}

document.body.append(d);
if (!loopstarted) {
if (!loopStarted) {
requestAnimationFrame(updateStatus);
loopstarted = true;
loopStarted = true;
}
}

function removegamepad(gamepad) {
function removeGamepad(gamepad) {
document.querySelector(`#controller${gamepad.index}`).remove();
}

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/gpuadapter/requestdevice/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ async function init() {

const device = await adapter.requestDevice({
defaultQueue: {
label: "myqueue",
label: "my_queue",
},
requiredFeatures,
requiredLimits,
Expand Down
8 changes: 4 additions & 4 deletions files/en-us/web/api/gpubindgroup/label/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ const bindGroup = device.createBindGroup({
],
});

bindGroup.label = "mybindgroup";
bindGroup.label = "my_bind_group";

console.log(bindGroup.label); // "mybindgroup";
console.log(bindGroup.label); // "my_bind_group"
```

Setting a label via the originating {{domxref("GPUDevice.createBindGroup()")}} call, and then getting it via `GPUBindGroup.label`:
Expand All @@ -58,10 +58,10 @@ const bindGroup = device.createBindGroup({
},
},
],
label: "mybindgroup",
label: "my_bind_group",
});

console.log(bindGroup.label); // "mybindgroup";
console.log(bindGroup.label); // "my_bind_group"
```

## Specifications
Expand Down
8 changes: 4 additions & 4 deletions files/en-us/web/api/gpubindgrouplayout/label/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ const bindGroupLayout = device.createBindGroupLayout({
],
});

bindGroupLayout.label = "mybindgrouplayout";
bindGroupLayout.label = "my_bind_group_layout";

console.log(bindGroupLayout.label); // "mybindgrouplayout";
console.log(bindGroupLayout.label); // "my_bind_group_layout"
```

Setting a label via the originating {{domxref("GPUDevice.createBindGroupLayout()")}} call, and then getting it via `GPUBindGroupLayout.label`:
Expand All @@ -58,10 +58,10 @@ const bindGroupLayout = device.createBindGroupLayout({
},
},
],
label: "mybindgrouplayout",
label: "my_bind_group_layout",
});

console.log(bindGroupLayout.label); // "mybindgrouplayout";
console.log(bindGroupLayout.label); // "my_bind_group_layout"
```

## Specifications
Expand Down
8 changes: 4 additions & 4 deletions files/en-us/web/api/gpubuffer/label/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ const output = device.createBuffer({
usage: GPUBufferUsage.STORAGE | GPUBufferUsage.COPY_SRC,
});

output.label = "mybuffer";
output.label = "my_buffer";

console.log(output.label); // "mybuffer"
console.log(output.label); // "my_buffer"
```

Setting a label via the originating {{domxref("GPUDevice.createBuffer()")}} call, and then getting it via `GPUBuffer.label`:
Expand All @@ -40,10 +40,10 @@ Setting a label via the originating {{domxref("GPUDevice.createBuffer()")}} call
const output = device.createBuffer({
size: BUFFER_SIZE,
usage: GPUBufferUsage.STORAGE | GPUBufferUsage.COPY_SRC,
label: "mybuffer",
label: "my_buffer",
});

console.log(output.label); // "mybuffer"
console.log(output.label); // "my_buffer"
```

## Specifications
Expand Down
8 changes: 4 additions & 4 deletions files/en-us/web/api/gpucommandbuffer/label/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,18 @@ Setting and getting a label via `GPUCommandBuffer.label`:

```js
const commandBuffer = commandEncoder.finish();
commandBuffer.label = "mycommandbuffer";
console.log(commandBuffer.label); // "mycommandbuffer";
commandBuffer.label = "my_command_buffer";
console.log(commandBuffer.label); // "my_command_buffer"
```

Setting a label via the originating {{domxref("GPUCommandEncoder.finish()")}} call, and then getting it via `GPUCommandBuffer.label`:

```js
const commandBuffer = commandEncoder.finish({
label: "mycommandbuffer",
label: "my_command_buffer",
});

console.log(commandBuffer.label); // "mycommandbuffer";
console.log(commandBuffer.label); // "my_command_buffer"
```

## Specifications
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ None ({{jsxref("Undefined")}}).
```js
// ...

commandEncoder.insertDebugMarker("mymarker");
commandEncoder.insertDebugMarker("my_marker");

// ...
```
Expand Down
8 changes: 4 additions & 4 deletions files/en-us/web/api/gpucommandencoder/label/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,18 @@ Setting and getting a label via `GPUCommandEncoder.label`:

```js
const commandEncoder = device.createCommandEncoder();
commandEncoder.label = "mycommandencoder";
console.log(commandEncoder.label); // "mycommandencoder";
commandEncoder.label = "my_command_encoder";
console.log(commandEncoder.label); // "my_command_encoder"
```

Setting a label via the originating {{domxref("GPUDevice.createCommandEncoder()")}} call, and then getting it via `GPUCommandEncoder.label`:

```js
const commandEncoder = device.createCommandEncoder({
label: "mycommandencoder",
label: "my_command_encoder",
});

console.log(commandEncoder.label); // "mycommandencoder";
console.log(commandEncoder.label); // "my_command_encoder"
```

## Specifications
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ The following criteria must be met when calling **`popDebugGroup()`**, otherwise
```js
// ...

commandEncoder.pushDebugGroup("mygroupmarker"); // Start labeled debug group
commandEncoder.pushDebugGroup("my_group_marker"); // Start labeled debug group

const passEncoder = commandEncoder.beginRenderPass(renderPassDescriptor);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ None ({{jsxref("Undefined")}}).
```js
// ...

commandEncoder.pushDebugGroup("mygroupmarker"); // Start labeled debug group
commandEncoder.pushDebugGroup("my_group_marker"); // Start labeled debug group

const passEncoder = commandEncoder.beginRenderPass(renderPassDescriptor);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ None ({{jsxref("Undefined")}}).
```js
// ...

passEncoder.insertDebugMarker("mymarker");
passEncoder.insertDebugMarker("my_marker");

// ...
```
Expand Down
8 changes: 4 additions & 4 deletions files/en-us/web/api/gpucomputepassencoder/label/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,19 @@ Setting and getting a label via `GPUComputePassEncoder.label`:
const commandEncoder = device.createCommandEncoder();
const passEncoder = commandEncoder.beginComputePass();

passEncoder.label = "mycomputepassencoder";
console.log(passEncoder.label); // "mycomputepassencoder"
passEncoder.label = "my_compute_pass_encoder";
console.log(passEncoder.label); // "my_compute_pass_encoder"
```

Setting a label via the originating {{domxref("GPUCommandEncoder.beginComputePass()")}} call, and then getting it via `GPUComputePassEncoder.label`:

```js
const commandEncoder = device.createCommandEncoder();
const passEncoder = commandEncoder.beginComputePass({
label: "mycomputepassencoder",
label: "my_compute_pass_encoder",
});

console.log(passEncoder.label); // "mycomputepassencoder"
console.log(passEncoder.label); // "my_compute_pass_encoder"
```

## Specifications
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ The following criteria must be met when calling **`popDebugGroup()`**, otherwise

const passEncoder = commandEncoder.beginComputePass();

passEncoder.pushDebugGroup("mygroupmarker"); // Start labeled debug group
passEncoder.pushDebugGroup("my_group_marker"); // Start labeled debug group

passEncoder.setPipeline(computePipeline);
passEncoder.setBindGroup(0, bindGroup);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ None ({{jsxref("Undefined")}}).

const passEncoder = commandEncoder.beginComputePass();

passEncoder.pushDebugGroup("mygroupmarker"); // Start labeled debug group
passEncoder.pushDebugGroup("my_group_marker"); // Start labeled debug group

passEncoder.setPipeline(computePipeline);
passEncoder.setBindGroup(0, bindGroup);
Expand Down
8 changes: 4 additions & 4 deletions files/en-us/web/api/gpucomputepipeline/label/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ const computePipeline = device.createComputePipeline({
},
});

computePipeline.label = "mycomputepipeline";
computePipeline.label = "my_compute_pipeline";

console.log(computePipeline.label); // "mycomputepipeline"
console.log(computePipeline.label); // "my_compute_pipeline"
```

Setting a label via a {{domxref("GPUDevice.createComputePipeline()")}} call, and then getting it via `GPUComputePipeline.label`:
Expand All @@ -54,10 +54,10 @@ const computePipeline = device.createComputePipeline({
module: shaderModule,
entryPoint: "main",
},
label: "mycomputepipeline",
label: "my_compute_pipeline",
});

console.log(computePipeline.label); // "mycomputepipeline"
console.log(computePipeline.label); // "my_compute_pipeline"
```

## Specifications
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/gpudevice/label/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ async function init() {
const device = await adapter.requestDevice();

// Set a label
device.label = "mylabel";
device.label = "my_label";

// Get a label
console.log(device.label);
Expand Down
8 changes: 4 additions & 4 deletions files/en-us/web/api/gpuexternaltexture/label/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ const externalTexture = device.importExternalTexture({
source: video,
});

externalTexture.label = "myExtTexture";
externalTexture.label = "my_ext_texture";

console.log(externalTexture.label); // "myExtTexture"
console.log(externalTexture.label); // "my_ext_texture"
```

Setting a label via the originating {{domxref("GPUDevice.importExternalTexture()")}} call, and then getting it via `GPUExternalTexture.label`:
Expand All @@ -42,10 +42,10 @@ Setting a label via the originating {{domxref("GPUDevice.importExternalTexture()

const externalTexture = device.importExternalTexture({
source: video,
label: "myExtTexture",
label: "my_ext_texture",
});

console.log(externalTexture.label); // "myExtTexture"
console.log(externalTexture.label); // "my_ext_texture"
```

## Specifications
Expand Down
2 changes: 2 additions & 0 deletions files/en-us/web/api/gpupipelineerror/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ _Inherits properties from its parent, {{domxref("DOMException")}}._

## Examples

<!-- cSpell:ignore maijn -->

In the following snippet we are attempting to create a {{domxref("GPUComputePipeline")}} using {{domxref("GPUDevice.createComputePipelineAsync()")}}. However, we have misspelt our compute pipeline `entryPoint` as `"maijn"` (it should be `"main"`), therefore pipeline creation fails, and our `catch` block prints the resulting reason and error message to the console.

```js
Expand Down
8 changes: 4 additions & 4 deletions files/en-us/web/api/gpupipelinelayout/label/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ const pipelineLayout = device.createPipelineLayout({
bindGroupLayouts: [bindGroupLayout],
});

pipelineLayout.label = "mypipelinelayout";
pipelineLayout.label = "my_pipeline_layout";

console.log(pipelineLayout.label); // "mypipelinelayout";
console.log(pipelineLayout.label); // "my_pipeline_layout"
```

Setting a label via the originating {{domxref("GPUDevice.createPipelineLayout()")}} call, and then getting it via `GPUPipelineLayout.label`:
Expand All @@ -42,10 +42,10 @@ Setting a label via the originating {{domxref("GPUDevice.createPipelineLayout()"

const pipelineLayout = device.createPipelineLayout({
bindGroupLayouts: [bindGroupLayout],
label: "mypipelinelayout",
label: "my_pipeline_layout",
});

console.log(pipelineLayout.label); // "mypipelinelayout";
console.log(pipelineLayout.label); // "my_pipeline_layout"
```

## Specifications
Expand Down
8 changes: 4 additions & 4 deletions files/en-us/web/api/gpuqueryset/label/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ const querySet = device.createQuerySet({
count: 32,
});

querySet.label = "myqueryset";
querySet.label = "my_query_set";

console.log(querySet.label); // "myqueryset"
console.log(querySet.label); // "my_query_set"
```

Setting a label via the originating {{domxref("GPUDevice.createQuerySet()")}} call, and then getting it via `GPUQuerySet.label`:
Expand All @@ -40,10 +40,10 @@ Setting a label via the originating {{domxref("GPUDevice.createQuerySet()")}} ca
const querySet = device.createQuerySet({
type: "occlusion",
count: 32,
label: "myqueryset",
label: "my_query_set",
});

console.log(querySet.label); // "myqueryset"
console.log(querySet.label); // "my_query_set"
```

## Specifications
Expand Down
6 changes: 3 additions & 3 deletions files/en-us/web/api/gpuqueue/label/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ A string. If no label value has previously been set, getting the label returns a
Setting and getting a label via `GPUQueue.label`:

```js
device.queue.label = "myqueue";
console.log(device.queue.label); // "myqueue"
device.queue.label = "my_queue";
console.log(device.queue.label); // "my_queue"
```

You can also set the queue's label at the time you request the device, like this:

```js
const device = adapter.requestDevice({
defaultQueue: { label: "myqueue" },
defaultQueue: { label: "my_queue" },
});
```

Expand Down
Loading

0 comments on commit bff3a6a

Please sign in to comment.