Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion files/en-us/web/api/vrpose/angularvelocity/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function drawVRScene() {
const avz = angVel[2];

// render the scene
//

// WebVR: submit the rendered frame to the VR display
vrDisplay.submitFrame();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ playButton.addEventListener('click', function() {
if (this.dataset.playing === 'false') {
srcNode = playSourceNode(audioCtx, sample);
// …
}
}, false);
```

Expand All @@ -115,6 +116,7 @@ filterButton.addEventListener('click', function() {
srcNode.disconnect(audioCtx.destination);
srcNode.connect(iirfilter).connect(audioCtx.destination);
// …
}
}, false);
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ Next, it's necessary to add code to look up the attribute location for the color
vertexColor: gl.getAttribLocation(shaderProgram, 'aVertexColor'),
},
// …
}
```

Then, `drawScene()` can have the following added to it so it actually uses these colors when drawing the square:
Expand Down
7 changes: 5 additions & 2 deletions files/en-us/web/api/webgl_multi_draw/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,14 @@ and [`ext.multiDrawArraysInstancedWEBGL()`](/en-US/docs/Web/API/WEBGL_multi_draw
const firsts = new Int32Array(/* … */);
const counts = new Int32Array(/* … */);
ext.multiDrawArraysWEBGL(gl.TRIANGLES, firsts, 0, counts, 0, firsts.length);
```

```js
// multiDrawArraysInstanced variant
const firsts = new Int32Array(/* … */);
const counts = new Int32Array(/* … */);
const instanceCounts = new Int32Array(/* … */);
ext.multiDrawArraysInstancedWEBGL(
gl.TRIANGLES, firsts, 0, counts, 0, instanceCounts, 0, firsts.length);
ext.multiDrawArraysInstancedWEBGL(gl.TRIANGLES, firsts, 0, counts, 0, instanceCounts, 0, firsts.length);
```

### Drawing multiple elements
Expand All @@ -111,7 +112,9 @@ Assumes that the indices which have been previously uploaded to the
const counts = new Int32Array(/* … */);
const offsets = new Int32Array(/* … */);
ext.multiDrawElementsWEBGL(gl.TRIANGLES, counts, 0, gl.UNSIGNED_SHORT, offsets, 0, counts.length);
```

```js
// multiDrawElementsInstanced variant
const counts = new Int32Array(/* … */);
const offsets = new Int32Array(/* … */);
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/window/showsavefilepicker/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ A {{jsxref("Promise")}} whose fulfillment handler receives a {{domxref('FileSyst
The following function shows a file picker, with text files highlighted for selection.

```js
function getNewFileHandle() {
async function getNewFileHandle() {
const opts = {
types: [{
description: 'Text file',
Expand Down