generated from lucien/actix-react-template
Compare commits
3 commits
53853dcce5
...
0e31e90af9
Author | SHA1 | Date | |
---|---|---|---|
![]() |
0e31e90af9 | ||
![]() |
6e77233ac0 | ||
![]() |
4682f8a61e |
3 changed files with 20 additions and 6 deletions
|
@ -3,21 +3,21 @@ import { Group } from 'three'
|
|||
import * as THREE from 'three'
|
||||
|
||||
interface MarkerProps {
|
||||
position: [number, number, number],
|
||||
position: number[],
|
||||
color: string,
|
||||
onClick?: () => void
|
||||
}
|
||||
|
||||
export default function Marker({ position, color, onClick }: MarkerProps) {
|
||||
|
||||
const [positionState, setPositionState] = React.useState(position)
|
||||
const [positionState, setPositionState] = React.useState(new THREE.Vector3(...position))
|
||||
|
||||
// Return the marker object
|
||||
// return <primitive object={marker} />
|
||||
return (
|
||||
<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)}>
|
||||
<mesh position={positionState} rotation={[Math.PI,0,0]} onClick={onClick} onPointerOver={(e) => setPositionState(positionState.clone().setZ(positionState.z + 0.1))} onPointerOut={(e) => setPositionState(new THREE.Vector3(...position))}>
|
||||
<coneGeometry args={[0.15, 0.6, 6]} />
|
||||
<meshStandardMaterial color={color} side={THREE.DoubleSide} />
|
||||
</mesh>
|
||||
)
|
||||
)
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ export default function NavBar(){
|
|||
<nav style={{ display: "flex", alignItems: "center", justifyContent: "space-between", padding: "0.5em 1em"}}>
|
||||
<div style={{ display : "flex", alignItems: "center", flexDirection: "row"}}>
|
||||
{/* <LogoButton url="/" logo = "https://archlinux.org/static/hetzner_logo.41114a37d25f.png"/> */}
|
||||
<span class="material-symbols-outlined"
|
||||
<span className="material-symbols-outlined"
|
||||
style={{fontSize: "4em", color: "white", margin: "0.5em"}}>sailing</span>
|
||||
<ClickableLink url="/" text = "Accueil" />
|
||||
<ClickableLink url="/game" text = "Jeu" />
|
||||
|
|
|
@ -28,7 +28,7 @@ export default function ChaosPage(){
|
|||
const myArray = [1, 2, 3, 4, 5];
|
||||
const shuffledArray = shuffleArray(myArray);
|
||||
|
||||
console.log(shuffledArray); // Affiche un tableau mélangé
|
||||
// console.log(shuffledArray); // Affiche un tableau mélangé
|
||||
|
||||
|
||||
const [entry1,setEntry1] = useState("champ1")
|
||||
|
@ -47,6 +47,9 @@ export default function ChaosPage(){
|
|||
setFocus(()=>E);
|
||||
}
|
||||
|
||||
|
||||
const [tel,setTel] = useState(0)
|
||||
|
||||
|
||||
return(
|
||||
<div>
|
||||
|
@ -62,6 +65,17 @@ export default function ChaosPage(){
|
|||
rdmFront={randomFront}
|
||||
color={color}/> })}
|
||||
</div>
|
||||
<fieldset>
|
||||
<legend>Formulaire super mega bien</legend>
|
||||
<input type="text" placeholder="nom"/>
|
||||
<input type="text" placeholder="prenom"/>
|
||||
<input type="text" placeholder="email"/>
|
||||
<input type="text" placeholder="mdp"/>
|
||||
<input type="text" placeholder="mdp2"/>
|
||||
<label htmlFor="phone">phone : {tel}</label>
|
||||
<input type="range" min="0" max="9999999999" step="1" name="phone" id="phone" value={tel} onChange={(e)=>setTel(parseInt(e.target.value))}/>
|
||||
<input type="submit" value="envoyer"/>
|
||||
</fieldset>
|
||||
</div>
|
||||
)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue