function drawScene(gl, view, programInfo, buffers, texture, deltaTime) {
// …
for (const object in scene) {
const vertexList = [/* … */];
const normalMatrix = mat4.create();
const modelViewMatrix = mat4.create();
const objectMatrix = mat4.create();
// Apply rotation updates to the object if needed
mat4.rotate(/* … */);
}
}WebXR performance guide / notebook
WebXR performance guide
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
const vertexList = [/* … */];
const normalMatrix = mat4.create();
const modelViewMatrix = mat4.create();
function drawScene(gl, view, programInfo, buffers, texture, deltaTime) {
// …
for (const object in scene) {
// …
}
}