Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove eslint-disable prettier/prettier line #429

Merged
merged 1 commit into from
Jun 18, 2024
Merged
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
11 changes: 6 additions & 5 deletions sample/multipleCanvases/main.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable prettier/prettier */
import { mat4, mat3 } from 'wgpu-matrix';
import { modelData } from './models';

Expand Down Expand Up @@ -26,7 +25,7 @@ type Model = {

function createVertexAndIndexBuffer(
device: GPUDevice,
{ vertices, indices }: { vertices: Float32Array, indices: Uint32Array },
{ vertices, indices }: { vertices: Float32Array; indices: Uint32Array }
): Model {
const vertexBuffer = createBufferWithData(
device,
Expand All @@ -49,7 +48,9 @@ function createVertexAndIndexBuffer(
const adapter = await navigator.gpu.requestAdapter();
const device = await adapter.requestDevice();

const models = Object.values(modelData).map(data => createVertexAndIndexBuffer(device, data));
const models = Object.values(modelData).map((data) =>
createVertexAndIndexBuffer(device, data)
);

function rand(min?: number, max?: number) {
if (min === undefined) {
Expand All @@ -70,7 +71,6 @@ function randColor() {
return [rand(), rand(), rand(), 1];
}


const presentationFormat = navigator.gpu.getPreferredCanvasFormat();
const depthFormat = 'depth24plus';

Expand Down Expand Up @@ -231,7 +231,8 @@ for (let i = 0; i < numProducts; ++i) {
const kColorOffset = 32;
const worldViewProjectionMatrixValue = uniformValues.subarray(
kWorldViewProjectionMatrixOffset,
kWorldViewProjectionMatrixOffset + 16);
kWorldViewProjectionMatrixOffset + 16
);
const worldMatrixValue = uniformValues.subarray(
kWorldMatrixOffset,
kWorldMatrixOffset + 15
Expand Down
Loading