generated from lucien/actix-react-template
- Ajout d'un océan.
- Ajout d'un personnage manequin. --> *Modèle 3D du manequin inclus* - Ajout d'une représentation des axes x,y,z. - Ajout d'une entité Marker pour mettre des markers sur le manequin. - Maj du CSS de GamePage.tsx
This commit is contained in:
parent
5d156416c9
commit
60a12d9cf9
8 changed files with 141 additions and 18 deletions
23
front/src/components/3d/Marker.tsx
Normal file
23
front/src/components/3d/Marker.tsx
Normal file
|
@ -0,0 +1,23 @@
|
|||
import React from 'react'
|
||||
import { Group } from 'three'
|
||||
import * as THREE from 'three'
|
||||
|
||||
interface MarkerProps {
|
||||
position: [number, number, number],
|
||||
color: string,
|
||||
onClick?: () => void
|
||||
}
|
||||
|
||||
export default function Marker({ position, color, onClick }: MarkerProps) {
|
||||
|
||||
|
||||
|
||||
// Return the marker object
|
||||
// return <primitive object={marker} />
|
||||
return (
|
||||
<mesh position={position} rotation={[Math.PI, 0, 0]} onClick={onClick}>
|
||||
<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