Skip to content

Commit 70ef83c

Browse files
committed
chore: new linter
1 parent b7810ba commit 70ef83c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+1168
-930
lines changed

.eslintignore

Lines changed: 0 additions & 8 deletions
This file was deleted.

.eslintrc.json

Lines changed: 0 additions & 7 deletions
This file was deleted.

CODE_OF_CONDUCT.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,16 @@ Project maintainers are responsible for clarifying the standards of acceptable b
2828

2929
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
3030

31-
## Scope
31+
## Scope
3232

3333
This Code of Conduct applies within all project spaces, and it also applies when an individual is representing the project or its community in public spaces. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
3434

35-
## Enforcement
35+
## Enforcement
3636

3737
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team by DM at [TresJS Discord](https://discord.gg/UCr96AQmWn). All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
3838

3939
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project’s leadership.
4040

41-
## Attribution
41+
## Attribution
4242

4343
This Code of Conduct is adapted from the Contributor Covenant, version 1.4, available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

docs/.vitepress/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export default defineConfig({
2828
content: '/og-banner.png',
2929
},
3030
],
31-
['script', { defer: 'true', 'data-site': 'OWBUVCJK', src: 'https://cdn.usefathom.com/script.js' }],
31+
['script', { 'defer': 'true', 'data-site': 'OWBUVCJK', 'src': 'https://cdn.usefathom.com/script.js' }],
3232
],
3333
themeConfig: {
3434
logo: '/logo.svg',

docs/.vitepress/config.ts.timestamp-1700208814950-61916cb6f3fe3.mjs

Lines changed: 0 additions & 67 deletions
This file was deleted.

docs/.vitepress/theme/TresLayout.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<script setup>
2-
// eslint-disable-next-line import/no-named-as-default
32
import DefaultTheme from 'vitepress/theme'
43
import LoveVueThreeJS from './components/LoveVueThreeJS.vue'
54
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<script setup lang="ts">
22
import { useGLTF } from '@tresjs/cientos'
33
4-
const { nodes }
4+
const { nodes }
55
= await useGLTF('https://raw.githubusercontent.com/Tresjs/assets/main/models/gltf/blender-cube.glb', { draco: true })
66
const model = nodes.Cube
77
</script>
88

99
<template>
1010
<primitive :object="model" />
11-
</template>
11+
</template>

docs/.vitepress/theme/components/BloomDemo.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<script setup lang="ts">
22
import { Color } from 'three'
3-
import { reactive, ref } from 'vue'
3+
import { reactive } from 'vue'
44
import { TresCanvas } from '@tresjs/core'
55
import { BlendFunction } from 'postprocessing'
6-
import { EffectComposer, Bloom } from '@tresjs/post-processing'
6+
import { Bloom, EffectComposer } from '@tresjs/post-processing'
77
88
import { useRouteDisposal } from '../composables/useRouteDisposal'
99

docs/.vitepress/theme/components/DepthOfFieldDemo.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import { ref } from 'vue'
33
import { gsap } from 'gsap'
44
import { TresCanvas } from '@tresjs/core'
5-
import { EffectComposer, DepthOfField } from '@tresjs/post-processing'
5+
import { DepthOfField, EffectComposer } from '@tresjs/post-processing'
66
77
import { useRouteDisposal } from '../composables/useRouteDisposal'
88

docs/.vitepress/theme/components/DocsDemo.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
style="aspect-ratio: 16/9; height: auto; margin: 2rem 0; border-radius: 8px; overflow:hidden;"
99
>
1010
<Suspense>
11-
<slot />
11+
<slot></slot>
1212
</Suspense>
13-
</div>
13+
</div>
1414
</ClientOnly>
15-
</template>
15+
</template>

docs/.vitepress/theme/components/LoveVueThreeJS.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script setup lang="ts">
2-
///<reference types="vite-svg-loader" />
2+
/// <reference types="vite-svg-loader" />
33
import { gsap } from 'gsap'
44
import { onMounted, ref } from 'vue'
55
import Triangle from '../assets/triangle.svg'

docs/.vitepress/theme/components/NoiseDemo.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script setup lang="ts">
22
import { TresCanvas } from '@tresjs/core'
3-
import { BasicShadowMap, SRGBColorSpace, NoToneMapping } from 'three'
3+
import { BasicShadowMap, NoToneMapping, SRGBColorSpace } from 'three'
44
import { EffectComposer, Noise } from '@tresjs/post-processing'
55
import { OrbitControls } from '@tresjs/cientos'
66
import { BlendFunction } from 'postprocessing'
@@ -35,4 +35,4 @@ const { effectComposer } = useRouteDisposal()
3535
</EffectComposer>
3636
</Suspense>
3737
</TresCanvas>
38-
</template>
38+
</template>

docs/.vitepress/theme/components/OutlineDemo.vue

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import type { Intersection, Object3D } from 'three'
44
import { NoToneMapping } from 'three'
55
import { TresCanvas } from '@tresjs/core'
66
import { OrbitControls } from '@tresjs/cientos'
7-
import { Outline, EffectComposer } from '@tresjs/post-processing'
7+
import { EffectComposer, Outline } from '@tresjs/post-processing'
88
import { KernelSize } from 'postprocessing'
99
1010
import { TresLeches, useControls } from '@tresjs/leches'
@@ -23,9 +23,8 @@ const { effectComposer } = useRouteDisposal()
2323
const outlinedObjects = ref<Object3D[]>([])
2424
2525
const toggleMeshSelectionState = ({ object }: Intersection) => {
26-
if (outlinedObjects.value.some(({ uuid }) => uuid === object.uuid))
27-
outlinedObjects.value = outlinedObjects.value.filter(({ uuid }) => uuid !== object.uuid)
28-
else outlinedObjects.value = [...outlinedObjects.value, object]
26+
if (outlinedObjects.value.some(({ uuid }) => uuid === object.uuid)) { outlinedObjects.value = outlinedObjects.value.filter(({ uuid }) => uuid !== object.uuid) }
27+
else { outlinedObjects.value = [...outlinedObjects.value, object] }
2928
}
3029
3130
const { edgeStrength, pulseSpeed, visibleEdgeColor, blur, kernelSize } = useControls({

docs/.vitepress/theme/components/PixelationDemo.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { TresCanvas } from '@tresjs/core'
33
import { OrbitControls } from '@tresjs/cientos'
44
import { EffectComposer, Pixelation } from '@tresjs/post-processing'
55
6-
import { ref } from 'vue'
76
import { useRouteDisposal } from '../composables/useRouteDisposal'
87
98
// Need to dispose of the effect composer when the route changes because Vitepress doesnt unmount the components
@@ -54,4 +53,3 @@ const { effectComposer } = useRouteDisposal()
5453
</Suspense>
5554
</TresCanvas>
5655
</template>
57-

docs/.vitepress/theme/components/VignetteDemo.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<script setup lang="ts">
22
import { TresCanvas } from '@tresjs/core'
3-
import { BasicShadowMap, SRGBColorSpace, NoToneMapping } from 'three'
3+
import { BasicShadowMap, NoToneMapping, SRGBColorSpace } from 'three'
44
import { OrbitControls } from '@tresjs/cientos'
5-
import { EffectComposer, Vignette, DepthOfField } from '@tresjs/post-processing'
5+
import { DepthOfField, EffectComposer, Vignette } from '@tresjs/post-processing'
66
77
import { useRouteDisposal } from '../composables/useRouteDisposal'
88
@@ -42,4 +42,4 @@ const { effectComposer } = useRouteDisposal()
4242
</EffectComposer>
4343
<TresAmbientLight :intensity="1" />
4444
</TresCanvas>
45-
</template>
45+
</template>

docs/.vitepress/theme/composables/useRouteDisposal.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ export function useRouteDisposal() {
1414
return {
1515
effectComposer,
1616
}
17-
}
17+
}

docs/.vitepress/theme/style.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,4 @@
6060

6161
.VPNavBarTitle .logo {
6262
height: 16px !important;
63-
}
63+
}

docs/guide/effects/bloom.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Bloom is an effect that simulates the way that bright objects in the real world
1010

1111
```vue
1212
<script setup lang="ts">
13-
import { EffectComposer, Bloom } from '@tresjs/post-processing'
13+
import { Bloom, EffectComposer } from '@tresjs/post-processing'
1414
</script>
1515
1616
<template>
@@ -30,12 +30,12 @@ import { EffectComposer, Bloom } from '@tresjs/post-processing'
3030

3131
| Prop | Description | Default |
3232
| -------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
33-
| `blendFunction` | The blend function of this effect. This prop is not reactive. |  [BlendFunction.SCREEN](https://github.com/pmndrs/postprocessing/blob/c3ce388be247916437a314f17748a75329d65df1/src/enums/BlendFunction.js#L40) |
33+
| `blendFunction` | The blend function of this effect. This prop is not reactive. | [BlendFunction.SCREEN](https://github.com/pmndrs/postprocessing/blob/c3ce388be247916437a314f17748a75329d65df1/src/enums/BlendFunction.js#L40) |
3434
| `intensity` | The intensity of the bloom effect. | `1` |
3535
| `kernelSize` | The kernel size. | `KernelSize.LARGE` |
3636
| `luminanceThreshold` | The luminance threshold. Raise this value to mask out darker elements in the scene. Range is [0, 1]. | `0.9` |
3737
| `luminanceSmoothing` | Controls the smoothness of the luminance threshold. Range is [0, 1]. | `0.025` |
3838
| `mipMapBlur` | Enables mip map blur (UnrealBloom). This prop is not reactive. | `false` |
3939

4040
## Further Reading
41-
see [postprocessing docs](https://pmndrs.github.io/postprocessing/public/docs/class/src/effects/BloomEffect.js~BloomEffect.html)
41+
see [postprocessing docs](https://pmndrs.github.io/postprocessing/public/docs/class/src/effects/BloomEffect.js~BloomEffect.html)

docs/guide/effects/depth-of-field.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ This photographic technique allows photographers and filmmakers to draw attentio
1212

1313
```vue
1414
<script setup lang="ts">
15-
import { EffectComposer, DepthOfField } from '@tresjs/post-processing'
15+
import { DepthOfField, EffectComposer } from '@tresjs/post-processing'
1616
</script>
1717
1818
<template>
@@ -26,13 +26,12 @@ import { EffectComposer, DepthOfField } from '@tresjs/post-processing'
2626

2727
| Prop | Description | Default |
2828
| --------------- | ------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
29-
| `blendFunction` | The blend function of this effect. This prop is not reactive. |  [BlendFunction.SCREEN](https://github.com/pmndrs/postprocessing/blob/c3ce388be247916437a314f17748a75329d65df1/src/enums/BlendFunction.js#L40) |
29+
| `blendFunction` | The blend function of this effect. This prop is not reactive. | [BlendFunction.SCREEN](https://github.com/pmndrs/postprocessing/blob/c3ce388be247916437a314f17748a75329d65df1/src/enums/BlendFunction.js#L40) |
3030
| `worldFocusDistance` | The focus distance in world units. | 0.3 |
3131
| `worldFocusRange` | The focus range in world units. | depends on camera |
3232
| `focusDistance` | The normalized focus distance. Range is [0.0, 1.0]. | depends on camera |
3333
| `focusRange` | The focus range. Range is [0.0, 1.0]. | 0.1 |
3434
| `bokehScale` | The scale of the bokeh blur. | 1.0 |
3535

36-
3736
## Further Reading
38-
see [postprocessing docs](https://pmndrs.github.io/postprocessing/public/docs/class/src/effects/DepthOfFieldEffect.js~DepthOfFieldEffect.html)
37+
see [postprocessing docs](https://pmndrs.github.io/postprocessing/public/docs/class/src/effects/DepthOfFieldEffect.js~DepthOfFieldEffect.html)

0 commit comments

Comments
 (0)