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 Jul 28, 2024
1 parent 055d8cf commit 6d391d3
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions packages/base/src/3dview/mainview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,18 +106,18 @@ export class MainView extends React.Component<IProps, IStates> {
loading: true,
annotations: {},
firstLoad: true,
wireframe: false,
wireframe: false
};
this.toggleWireframe = this.toggleWireframe.bind(this);
}

toggleWireframe() {
this.setState(
(prevState) => ({
wireframe: !prevState.wireframe,
prevState => ({
wireframe: !prevState.wireframe
}),
() => {
this._scene.traverse((child) => {
this._scene.traverse(child => {
if (child instanceof THREE.Mesh) {
child.material.wireframe = this.state.wireframe;
child.material.needsUpdate = true;
Expand Down Expand Up @@ -326,7 +326,7 @@ export class MainView extends React.Component<IProps, IStates> {
opacity: 0.2,
transparent: true,
side: THREE.DoubleSide,
wireframe: this.state.wireframe,
wireframe: this.state.wireframe
})
);
this._clippingPlaneMeshControl.visible = false;
Expand Down Expand Up @@ -666,7 +666,7 @@ export class MainView extends React.Component<IProps, IStates> {
stencilZFail: THREE.ReplaceStencilOp,
stencilZPass: THREE.ReplaceStencilOp,
side: THREE.DoubleSide,
wireframe: this.state.wireframe,
wireframe: this.state.wireframe
});
this._clippingPlaneMesh = new THREE.Mesh(planeGeom, planeMat);
this._clippingPlaneMesh.onAfterRender = renderer => {
Expand Down Expand Up @@ -853,7 +853,7 @@ export class MainView extends React.Component<IProps, IStates> {
clientColor.b / 255
)
: 'black',
wireframe: this.state.wireframe,
wireframe: this.state.wireframe
});

return new THREE.Mesh(this._pointerGeometry, material);
Expand Down Expand Up @@ -1283,9 +1283,7 @@ export class MainView extends React.Component<IProps, IStates> {
: 'unset'
}}
>
<button onClick={this.toggleWireframe}>
Toggle Wireframe
</button>
<button onClick={this.toggleWireframe}>Toggle Wireframe</button>
<Spinner loading={this.state.loading} />
<FollowIndicator remoteUser={this.state.remoteUser} />
{Object.entries(this.state.annotations).map(([key, annotation]) => {
Expand Down

0 comments on commit 6d391d3

Please sign in to comment.