generated from lucien/actix-react-template
- Feature Complete -> Gray Boxing a faire.
This commit is contained in:
parent
60a12d9cf9
commit
f8c4481c88
3 changed files with 197 additions and 14 deletions
|
@ -10,12 +10,12 @@ interface MarkerProps {
|
|||
|
||||
export default function Marker({ position, color, onClick }: MarkerProps) {
|
||||
|
||||
const [positionState, setPositionState] = React.useState(position)
|
||||
|
||||
|
||||
// Return the marker object
|
||||
// return <primitive object={marker} />
|
||||
return (
|
||||
<mesh position={position} rotation={[Math.PI, 0, 0]} onClick={onClick}>
|
||||
<mesh position={positionState} rotation={[Math.PI,0,0]} onClick={onClick} onPointerOver={(e) => setPositionState([positionState[0], positionState[1], positionState[2] + 0.1])} onPointerOut={(e) => setPositionState(position)}>
|
||||
<coneGeometry args={[0.15, 0.6, 6]} />
|
||||
<meshStandardMaterial color={color} side={THREE.DoubleSide} />
|
||||
</mesh>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue