Skip to content

Commit

Permalink
feat - fix multi select
Browse files Browse the repository at this point in the history
  • Loading branch information
sdubourg committed Jul 26, 2023
1 parent 500ad08 commit 370af88
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 14 deletions.
9 changes: 0 additions & 9 deletions src/components/gl/House/Appartment_v1.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -327,15 +327,6 @@ export const AppartmentModel = forwardRef<
scale={11.879}
/>

<AppartmentHotspot
geometry={nodes.cheloupee.geometry}
materials={materials.cheloupee}
position={[50.937, 3.299, -2.056]}
rotation={[Math.PI / 2, 0, 0]}
scale={4.715}
hotSpotMachine={toiletMachine}
/>

<AppartmentHotspot
geometry={nodes.cheloupee.geometry}
materials={materials.cheloupee}
Expand Down
13 changes: 8 additions & 5 deletions src/components/gl/Person/Person.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { a, useSpring } from '@react-spring/three';
import { Box, Html, useTexture } from '@react-three/drei';
import { Html, useTexture } from '@react-three/drei';
import { useFrame } from '@react-three/fiber';
import { useSelector } from '@xstate/react';
import { useControls } from 'leva';
Expand Down Expand Up @@ -97,8 +97,8 @@ export const Person = ({
return;
}

const intersects =
refFloor.current && raycaster.intersectObject(refFloor.current);
// const intersects =
// refFloor.current && raycaster.intersectObject(refFloor.current);

// drag
// if (intersects && intersects.length > 0 && isBeingDragged) {
Expand All @@ -118,7 +118,7 @@ export const Person = ({
// }
// }

if (isDragging) {
if (isBeingDragged) {
refGroup.current.position.lerp(
new Vector3(camera.position.x, refGroup.current.position.y, 8),
0.75,
Expand Down Expand Up @@ -170,7 +170,7 @@ export const Person = ({
<a.mesh
ref={refShadow}
rotation-x={Math.PI * -0.5}
position-y={-0.9}
position-y={-1.1}
scale={shadow.scale}
>
<circleBufferGeometry />
Expand All @@ -181,6 +181,9 @@ export const Person = ({
opacity={shadow.opacity}
depthWrite={false}
color={shadow.color}
toneMapped={false}
emissive={0xf4f400}
emissiveIntensity={0.15}
/>
</a.mesh>

Expand Down

0 comments on commit 370af88

Please sign in to comment.