generated from lucien/actix-react-template
Compare commits
No commits in common. "0e31e90af982fa9c615a85a0cd26e074cd63a55e" and "53853dcce59c13ec75674e265919a8c7e149b8e0" have entirely different histories.
0e31e90af9
...
53853dcce5
3 changed files with 6 additions and 20 deletions
|
@ -3,19 +3,19 @@ import { Group } from 'three'
|
|||
import * as THREE from 'three'
|
||||
|
||||
interface MarkerProps {
|
||||
position: number[],
|
||||
position: [number, number, number],
|
||||
color: string,
|
||||
onClick?: () => void
|
||||
}
|
||||
|
||||
export default function Marker({ position, color, onClick }: MarkerProps) {
|
||||
|
||||
const [positionState, setPositionState] = React.useState(new THREE.Vector3(...position))
|
||||
const [positionState, setPositionState] = React.useState(position)
|
||||
|
||||
// Return the marker object
|
||||
// return <primitive object={marker} />
|
||||
return (
|
||||
<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))}>
|
||||
<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>
|
||||
|
|
|
@ -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 className="material-symbols-outlined"
|
||||
<span class="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")
|
||||
|
@ -48,9 +48,6 @@ export default function ChaosPage(){
|
|||
}
|
||||
|
||||
|
||||
const [tel,setTel] = useState(0)
|
||||
|
||||
|
||||
return(
|
||||
<div>
|
||||
<h1>Chaos Page</h1>
|
||||
|
@ -65,17 +62,6 @@ 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