Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Nov 18, 2024
1 parent ec2c92e commit 04ee825
Showing 1 changed file with 36 additions and 6 deletions.
42 changes: 36 additions & 6 deletions app/src/components/particles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,19 @@ const ParticleBondMaterial = ({
switch (highlight) {
case "backside":
return (
<meshBasicMaterial side={THREE.BackSide} transparent opacity={hover_opacity} />
<meshBasicMaterial
side={THREE.BackSide}
transparent
opacity={hover_opacity}
/>
);
case "selection":
return (
<meshBasicMaterial side={THREE.FrontSide} transparent opacity={selection_opacity} />
<meshBasicMaterial
side={THREE.FrontSide}
transparent
opacity={selection_opacity}
/>
);
case "constraint":
return (
Expand Down Expand Up @@ -184,7 +192,13 @@ export const ParticleInstances = ({

const { colors, radii } = frame.arrays;
const positions = frame.positions;
const { selection_color, material, particle_size, hover_opacity, selection_opacity } = sceneSettings;
const {
selection_color,
material,
particle_size,
hover_opacity,
selection_opacity,
} = sceneSettings;

const geometry = useMemo(() => {
const _geometry = new THREE.SphereGeometry(1, 32, 32);
Expand Down Expand Up @@ -339,7 +353,12 @@ export const ParticleInstances = ({
castShadow
frustumCulled={false}
>
<ParticleBondMaterial highlight={highlight} material={material} hover_opacity={hover_opacity} selection_opacity={selection_opacity}/>
<ParticleBondMaterial
highlight={highlight}
material={material}
hover_opacity={hover_opacity}
selection_opacity={selection_opacity}
/>
</instancedMesh>
</>
);
Expand All @@ -360,7 +379,13 @@ export const BondInstances = ({
}) => {
const meshRef = useRef<THREE.InstancedMesh | null>(null);

const { material, selection_color, bond_size, hover_opacity, selection_opacity } = sceneSettings;
const {
material,
selection_color,
bond_size,
hover_opacity,
selection_opacity,
} = sceneSettings;

const actualVisibleConnectivity = useMemo(() => {
if (!visibleIndices) {
Expand Down Expand Up @@ -473,7 +498,12 @@ export const BondInstances = ({
castShadow
// receiveShadow
>
<ParticleBondMaterial highlight={highlight} material={material} hover_opacity={hover_opacity} selection_opacity={selection_opacity}/>
<ParticleBondMaterial
highlight={highlight}
material={material}
hover_opacity={hover_opacity}
selection_opacity={selection_opacity}
/>
</instancedMesh>
);
};
Expand Down

0 comments on commit 04ee825

Please sign in to comment.