generated from lucien/actix-react-template

- 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
20 lines
No EOL
533 B
TypeScript
20 lines
No EOL
533 B
TypeScript
|
|
import React from 'react'
|
|
import { Group } from 'three'
|
|
import * as THREE from 'three'
|
|
|
|
|
|
export default function Floor() {
|
|
const floor = new Group()
|
|
|
|
const floorGeometry = new THREE.PlaneGeometry(100, 100, 100, 100)
|
|
const floorMaterial = new THREE.MeshStandardMaterial({ color: 0x00ff00, side: THREE.DoubleSide })
|
|
const floorMesh = new THREE.Mesh(floorGeometry, floorMaterial)
|
|
|
|
floorMesh.rotation.x = -Math.PI / 2
|
|
floorMesh.position.y = -2
|
|
|
|
floor.add(floorMesh)
|
|
|
|
return <primitive object={floor} />
|
|
} |