Skip to content

Commit 903e834

Browse files
committed
prettier
1 parent c4fb980 commit 903e834

File tree

12 files changed

+178
-134
lines changed

12 files changed

+178
-134
lines changed

src/components/Grids/Grid/Grid.tsx

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -568,21 +568,21 @@ export const Grid = ({
568568
args={
569569
side === 'back'
570570
? [
571-
size[0] / 2,
572-
size[0] / -2,
573-
size[1] / 2,
574-
size[1] / -2,
575-
1,
576-
projectionDistance,
577-
]
571+
size[0] / 2,
572+
size[0] / -2,
573+
size[1] / 2,
574+
size[1] / -2,
575+
1,
576+
projectionDistance,
577+
]
578578
: [
579-
size[0] / -2,
580-
size[0] / 2,
581-
size[1] / 2,
582-
size[1] / -2,
583-
1,
584-
projectionDistance,
585-
]
579+
size[0] / -2,
580+
size[0] / 2,
581+
size[1] / 2,
582+
size[1] / -2,
583+
1,
584+
projectionDistance,
585+
]
586586
}
587587
rotation-y={side === 'back' ? 0 : Math.PI}
588588
/>

src/components/Symbol/Symbol.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ export const Symbols = forwardRef<Group, SymbolProps>(
139139
onPointerMove,
140140
]);
141141

142-
useEffect(() => { }, []);
142+
useEffect(() => {}, []);
143143

144144
return (
145145
<group

src/components/Wellbores/BasicTrajectory/BasicTrajectory.tsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ import { useGenerator } from '../../../hooks/useGenerator';
1010
import { unpackBufferGeometry } from '../../../sdk/geometries/packing';
1111

1212
import { extend } from '@react-three/fiber';
13-
import { CommonComponentProps, CustomMaterialProps } from '../../../common/types';
13+
import {
14+
CommonComponentProps,
15+
CustomMaterialProps,
16+
} from '../../../common/types';
1417
import { useWellboreContext } from '../../../hooks/useWellboreContext';
1518
import {
1619
basicTrajectory,
@@ -76,9 +79,9 @@ export const BasicTrajectory = ({
7679
return onMaterialPropertiesChange
7780
? onMaterialPropertiesChange
7881
: (props: Record<string, any>, material: Material | Material[]) => {
79-
const m = material as LineBasicMaterial;
80-
m.color = new Color(props.color);
81-
};
82+
const m = material as LineBasicMaterial;
83+
m.color = new Color(props.color);
84+
};
8285
}, [onMaterialPropertiesChange]);
8386

8487
const material = useMemo<Material | Material[]>(() => {

src/components/Wellbores/Casings/Casings.tsx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ import {
1313
MeshStandardMaterial,
1414
Object3D,
1515
} from 'three';
16-
import { CommonComponentProps, CustomMaterialProps } from '../../../common/types';
16+
import {
17+
CommonComponentProps,
18+
CustomMaterialProps,
19+
} from '../../../common/types';
1720
import { useGenerator } from '../../../hooks/useGenerator';
1821
import { useWellboreContext } from '../../../hooks/useWellboreContext';
1922
import { unpackBufferGeometry } from '../../../sdk/geometries/packing';
@@ -138,10 +141,10 @@ export const Casings = forwardRef(
138141
return onMaterialPropertiesChange
139142
? onMaterialPropertiesChange
140143
: (props: Record<string, any>, material: Material | Material[]) => {
141-
const m = material as Material[];
142-
m[1].opacity = props.opacity;
143-
m[2].opacity = props.opacity;
144-
};
144+
const m = material as Material[];
145+
m[1].opacity = props.opacity;
146+
m[2].opacity = props.opacity;
147+
};
145148
}, [onMaterialPropertiesChange]);
146149

147150
useEffect(() => {

src/components/Wellbores/CompletionTools/CompletionTools.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ import {
66
MeshStandardMaterial,
77
Object3D,
88
} from 'three';
9-
import { CommonComponentProps, CustomMaterialProps } from '../../../common/types';
9+
import {
10+
CommonComponentProps,
11+
CustomMaterialProps,
12+
} from '../../../common/types';
1013
import { useGenerator } from '../../../hooks/useGenerator';
1114
import { useWellboreContext } from '../../../hooks/useWellboreContext';
1215
import { unpackBufferGeometry } from '../../../sdk/geometries/packing';

src/components/Wellbores/Perforations/Perforations.tsx

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@ import {
1616
ShaderMaterial,
1717
Uniform,
1818
} from 'three';
19-
import { CommonComponentProps, CustomMaterialProps } from '../../../common/types';
19+
import {
20+
CommonComponentProps,
21+
CustomMaterialProps,
22+
} from '../../../common/types';
2023
import { useGenerator } from '../../../hooks/useGenerator';
2124
import { useWellboreContext } from '../../../hooks/useWellboreContext';
2225
import { createLayers, LAYERS } from '../../../layers/layers';
@@ -118,11 +121,11 @@ export const Perforations = forwardRef(
118121
return onMaterialPropertiesChange
119122
? onMaterialPropertiesChange
120123
: (props: Record<string, any>, material: Material | Material[]) => {
121-
const m = material as ShaderMaterial;
122-
m.uniforms.uTime.value = props.time;
123-
m.uniforms.uRadius.value = props.baseRadius;
124-
m.uniforms.uLength.value = props.length;
125-
};
124+
const m = material as ShaderMaterial;
125+
m.uniforms.uTime.value = props.time;
126+
m.uniforms.uRadius.value = props.baseRadius;
127+
m.uniforms.uLength.value = props.length;
128+
};
126129
}, [onMaterialPropertiesChange]);
127130

128131
useEffect(() => {

src/components/Wellbores/Perimeter/Perimeter.tsx

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ import {
99
ShaderMaterial,
1010
Uniform,
1111
} from 'three';
12-
import { CommonComponentProps, CustomMaterialProps } from '../../../common/types';
12+
import {
13+
CommonComponentProps,
14+
CustomMaterialProps,
15+
} from '../../../common/types';
1316
import { useGenerator } from '../../../hooks/useGenerator';
1417
import { useWellboreContext } from '../../../hooks/useWellboreContext';
1518
import { createLayers, LAYERS } from '../../../layers/layers';
@@ -109,31 +112,31 @@ export const Perimeter = ({
109112
return onMaterialPropertiesChange
110113
? onMaterialPropertiesChange
111114
: (props: Record<string, any>, material: Material | Material[]) => {
112-
const m = material as ShaderMaterial;
113-
m.uniforms.uColor.value = new Color(props.color);
114-
m.uniforms.uFrom.value = props.from;
115-
m.uniforms.uTo.value = props.to;
116-
m.uniforms.uOpacity.value = props.opacity;
117-
m.uniforms.uTime.value = props.time;
118-
};
115+
const m = material as ShaderMaterial;
116+
m.uniforms.uColor.value = new Color(props.color);
117+
m.uniforms.uFrom.value = props.from;
118+
m.uniforms.uTo.value = props.to;
119+
m.uniforms.uOpacity.value = props.opacity;
120+
m.uniforms.uTime.value = props.time;
121+
};
119122
}, [onMaterialPropertiesChange]);
120123

121124
const material = useMemo<Material | Material[]>(() => {
122125
const m = customMaterial
123126
? customMaterial
124127
: new ShaderMaterial({
125-
transparent: true,
126-
side: DoubleSide,
127-
vertexShader,
128-
fragmentShader,
129-
uniforms: {
130-
uTime: new Uniform(0),
131-
uFrom: new Uniform(0),
132-
uTo: new Uniform(0),
133-
uOpacity: new Uniform(0),
134-
uColor: new Uniform(new Color('#56af3b')),
135-
},
136-
});
128+
transparent: true,
129+
side: DoubleSide,
130+
vertexShader,
131+
fragmentShader,
132+
uniforms: {
133+
uTime: new Uniform(0),
134+
uFrom: new Uniform(0),
135+
uTo: new Uniform(0),
136+
uOpacity: new Uniform(0),
137+
uColor: new Uniform(new Color('#56af3b')),
138+
},
139+
});
137140
return m;
138141
}, [customMaterial]);
139142

src/components/Wellbores/TubeTrajectory/TubeTrajectory.tsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import { useEffect, useMemo, useState } from 'react';
22
import { BufferGeometry, Color, Material } from 'three';
3-
import { CommonComponentProps, CustomMaterialProps } from '../../../common/types';
3+
import {
4+
CommonComponentProps,
5+
CustomMaterialProps,
6+
} from '../../../common/types';
47
import { useGenerator } from '../../../hooks/useGenerator';
58
import { useWellboreContext } from '../../../hooks/useWellboreContext';
69
import { unpackBufferGeometry } from '../../../sdk/geometries/packing';
@@ -67,9 +70,9 @@ export const TubeTrajectory = ({
6770
return onMaterialPropertiesChange
6871
? onMaterialPropertiesChange
6972
: (props: Record<string, any>, material: Material | Material[]) => {
70-
const m = material as TubeMaterial;
71-
m.color = new Color(props.color);
72-
};
73+
const m = material as TubeMaterial;
74+
m.color = new Color(props.color);
75+
};
7376
}, [onMaterialPropertiesChange]);
7477

7578
const material = useMemo(() => {

src/components/Wellbores/WellboreSeismicSection/WellboreSeismicSection.stories.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ const meta = {
1515
component: Wellbore,
1616
} satisfies Meta<typeof Wellbore>;
1717

18-
type StoryArgs = React.ComponentProps<typeof WellboreSeismicSection> & { id: string };
18+
type StoryArgs = React.ComponentProps<typeof WellboreSeismicSection> & {
19+
id: string;
20+
};
1921

2022
export default meta;
2123
type Story = StoryObj<StoryArgs>;

0 commit comments

Comments
 (0)