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

chore: Enable prettier #1970

Merged
merged 6 commits into from
Feb 26, 2024
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .ocularrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ const config = {
}
};

export default config;
export default config;
26 changes: 2 additions & 24 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,27 +1,5 @@
**/dist*/**/*.js
**/dist
workers/
*.min.js
wip/
encoding.js
encoding-indexes.js
examples
modules
test
.ocularrc.js

# TODO(v9): Restore formatting on remainder of the codebase.
!modules/core/src/adapter/device.ts
!modules/core/src/adapter/resources/render-pipeline.ts
!modules/core/src/adapter/resources/transform-feedback.ts
!modules/core/src/adapter/types/shader-layout.ts
!modules/core/src/index.ts
!modules/engine/src/model/model.ts
!modules/engine/src/lib/shader-factory.ts
!modules/webgl/src/adapter/resources/webgl-buffer.ts
!modules/webgl/src/adapter/resources/webgl-render-pipeline.ts
!modules/webgl/src/adapter/resources/webgl-transform-feedback.ts
!modules/webgl/src/adapter/webgl-device.ts
!modules/webgl/src/index.ts
!modules/webgl/test/adapter/resources/webgl-transform-feedback.spec.ts
!modules/webgl/test/index.ts
!modules/webgpu/src/adapter/webgpu-device.ts
libs/
8 changes: 2 additions & 6 deletions examples/api/animation/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,6 @@ export default class AppAnimationLoopTemplate extends AnimationLoopTemplate {
new KeyFrames(this.keyFrameData),
new KeyFrames(this.keyFrameData)
];


for (let i = 0; i < 4; ++i) {
this.timeline.attachAnimation(keyFrames[i], channels[i]);
Expand Down Expand Up @@ -205,10 +204,7 @@ export default class AppAnimationLoopTemplate extends AnimationLoopTemplate {
},
bindings: {
app: cubeUniformStore.getManagedUniformBuffer(device, 'app'),
dirlight: this.globalUniformStore.getManagedUniformBuffer(
device,
'dirlight'
)
dirlight: this.globalUniformStore.getManagedUniformBuffer(device, 'dirlight')
}
})
};
Expand Down Expand Up @@ -252,7 +248,7 @@ export default class AppAnimationLoopTemplate extends AnimationLoopTemplate {

// Draw the cubes
const renderPass = device.beginRenderPass({
clearColor: [0, 0, 0, 1],
clearColor: [0, 0, 0, 1]
// clearDepth: true
});
for (const cube of this.cubes) {
Expand Down
6 changes: 3 additions & 3 deletions examples/api/animation/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineConfig } from 'vite'
import {defineConfig} from 'vite';

const alias = {
'@luma.gl/constants': `${__dirname}/../../../modules/constants/src`,
Expand All @@ -9,10 +9,10 @@ const alias = {
'@luma.gl/shadertools': `${__dirname}/../../../modules/shadertools/src`,
'@luma.gl/test-utils': `${__dirname}/../../../modules/test-utils/src`,
'@luma.gl/webgl': `${__dirname}/../../../modules/webgl/src`
}
};

// https://vitejs.dev/config/
export default defineConfig({
resolve: {alias},
server: {open: true}
})
});
14 changes: 10 additions & 4 deletions examples/api/cubemap/app.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
import {Device, loadImage, glsl} from '@luma.gl/core';
import {AnimationLoopTemplate, AnimationProps, CubeGeometry, Model, ModelProps} from '@luma.gl/engine';
import {
AnimationLoopTemplate,
AnimationProps,
CubeGeometry,
Model,
ModelProps
} from '@luma.gl/engine';
import {Matrix4, radians} from '@math.gl/core';

const INFO_HTML = `
Expand Down Expand Up @@ -131,14 +137,14 @@ export default class AppAnimationLoopTemplate extends AnimationLoopTemplate {
},
parameters: {
depthWriteEnabled: true,
depthCompare: 'less-equal'
depthCompare: 'less-equal'
}
});

this.prism = new Prism(device, {
bindings: {
uTexture: texture,
uTextureCube: cubemap,
uTextureCube: cubemap
},
parameters: {
depthWriteEnabled: true,
Expand All @@ -149,7 +155,7 @@ export default class AppAnimationLoopTemplate extends AnimationLoopTemplate {

onFinalize(): void {
this.prism.destroy();
this.cube.destroy();
this.cube.destroy();
}

onRender({device, aspect, tick}: AnimationProps): void {
Expand Down
6 changes: 3 additions & 3 deletions examples/api/cubemap/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineConfig } from 'vite'
import {defineConfig} from 'vite';

const alias = {
'@luma.gl/constants': `${__dirname}/../../../modules/constants/src`,
Expand All @@ -9,10 +9,10 @@ const alias = {
'@luma.gl/shadertools': `${__dirname}/../../../modules/shadertools/src`,
'@luma.gl/test-utils': `${__dirname}/../../../modules/test-utils/src`,
'@luma.gl/webgl': `${__dirname}/../../../modules/webgl/src`
}
};

// https://vitejs.dev/config/
export default defineConfig({
resolve: {alias},
server: {open: true}
})
});
8 changes: 5 additions & 3 deletions examples/api/texture-3d/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export default class AppAnimationLoopTemplate extends AnimationLoopTemplate {

constructor({device}: AnimationProps) {
super();

const noise = perlin({
interpolation: lerp,
permutation: shuffle(range(0, 255), random)
Expand Down Expand Up @@ -148,11 +148,13 @@ export default class AppAnimationLoopTemplate extends AnimationLoopTemplate {
}

onRender({device, tick, aspect}: AnimationProps) {
this.mvpMat.perspective({fovy: radians(75), aspect, near: NEAR, far: FAR}).multiplyRight(this.viewMat);
this.mvpMat
.perspective({fovy: radians(75), aspect, near: NEAR, far: FAR})
.multiplyRight(this.viewMat);

// Draw the cubes
const renderPass = device.beginRenderPass({
clearColor: [0, 0, 0, 1],
clearColor: [0, 0, 0, 1]
// clearDepth: true
});
this.cloud.setUniforms({
Expand Down
6 changes: 3 additions & 3 deletions examples/api/texture-3d/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineConfig } from 'vite'
import {defineConfig} from 'vite';

const alias = {
'@luma.gl/constants': `${__dirname}/../../../modules/constants/src`,
Expand All @@ -9,10 +9,10 @@ const alias = {
'@luma.gl/shadertools': `${__dirname}/../../../modules/shadertools/src`,
'@luma.gl/test-utils': `${__dirname}/../../../modules/test-utils/src`,
'@luma.gl/webgl': `${__dirname}/../../../modules/webgl/src`
}
};

// https://vitejs.dev/config/
export default defineConfig({
resolve: {alias},
server: {open: true}
})
});
Loading
Loading