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,19 +3,19 @@ import { Group } from 'three'
|
||||||
import * as THREE from 'three'
|
import * as THREE from 'three'
|
||||||
|
|
||||||
interface MarkerProps {
|
interface MarkerProps {
|
||||||
position: [number, number, number],
|
position: number[],
|
||||||
color: string,
|
color: string,
|
||||||
onClick?: () => void
|
onClick?: () => void
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function Marker({ position, color, onClick }: MarkerProps) {
|
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 the marker object
|
||||||
// return <primitive object={marker} />
|
// return <primitive object={marker} />
|
||||||
return (
|
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]} />
|
<coneGeometry args={[0.15, 0.6, 6]} />
|
||||||
<meshStandardMaterial color={color} side={THREE.DoubleSide} />
|
<meshStandardMaterial color={color} side={THREE.DoubleSide} />
|
||||||
</mesh>
|
</mesh>
|
||||||
|
|
|
@ -7,7 +7,7 @@ export default function NavBar(){
|
||||||
<nav style={{ display: "flex", alignItems: "center", justifyContent: "space-between", padding: "0.5em 1em"}}>
|
<nav style={{ display: "flex", alignItems: "center", justifyContent: "space-between", padding: "0.5em 1em"}}>
|
||||||
<div style={{ display : "flex", alignItems: "center", flexDirection: "row"}}>
|
<div style={{ display : "flex", alignItems: "center", flexDirection: "row"}}>
|
||||||
{/* <LogoButton url="/" logo = "https://archlinux.org/static/hetzner_logo.41114a37d25f.png"/> */}
|
{/* <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>
|
style={{fontSize: "4em", color: "white", margin: "0.5em"}}>sailing</span>
|
||||||
<ClickableLink url="/" text = "Accueil" />
|
<ClickableLink url="/" text = "Accueil" />
|
||||||
<ClickableLink url="/game" text = "Jeu" />
|
<ClickableLink url="/game" text = "Jeu" />
|
||||||
|
|
|
@ -28,7 +28,7 @@ export default function ChaosPage(){
|
||||||
const myArray = [1, 2, 3, 4, 5];
|
const myArray = [1, 2, 3, 4, 5];
|
||||||
const shuffledArray = shuffleArray(myArray);
|
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")
|
const [entry1,setEntry1] = useState("champ1")
|
||||||
|
@ -48,6 +48,9 @@ export default function ChaosPage(){
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const [tel,setTel] = useState(0)
|
||||||
|
|
||||||
|
|
||||||
return(
|
return(
|
||||||
<div>
|
<div>
|
||||||
<h1>Chaos Page</h1>
|
<h1>Chaos Page</h1>
|
||||||
|
@ -62,6 +65,17 @@ export default function ChaosPage(){
|
||||||
rdmFront={randomFront}
|
rdmFront={randomFront}
|
||||||
color={color}/> })}
|
color={color}/> })}
|
||||||
</div>
|
</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>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue