readme
This commit is contained in:
parent
33fa6fe5a9
commit
ed2c7db811
3 changed files with 3 additions and 2 deletions
|
@ -11,3 +11,5 @@ $ ./run.sh
|
||||||
- Télécharger [ThreeJS](https://github.com/mrdoob/three.js) et placer le
|
- Télécharger [ThreeJS](https://github.com/mrdoob/three.js) et placer le
|
||||||
fichier [`.js`](https://unpkg.com/three@0.146.0/build/three.min.js) dans
|
fichier [`.js`](https://unpkg.com/three@0.146.0/build/three.min.js) dans
|
||||||
[`js/lib`](./js/lib/).
|
[`js/lib`](./js/lib/).
|
||||||
|
|
||||||
|
- Placer une image `player.png` dans le dossier [`assets/images`](./assets/images/).
|
||||||
|
|
|
@ -8,7 +8,6 @@ export class Cube extends Element {
|
||||||
if (img) {
|
if (img) {
|
||||||
const loader = new THREE.TextureLoader();
|
const loader = new THREE.TextureLoader();
|
||||||
texture = loader.load(img);
|
texture = loader.load(img);
|
||||||
loader.load;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.data = new THREE.Mesh(
|
this.data = new THREE.Mesh(
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { Rotation } from "./utils.js";
|
||||||
|
|
||||||
export class Joueur extends Cube {
|
export class Joueur extends Cube {
|
||||||
constructor(color) {
|
constructor(color) {
|
||||||
super(color, "assets/images/player1.png");
|
super(color, "assets/images/player.png");
|
||||||
|
|
||||||
this.data.position.y = 0.5;
|
this.data.position.y = 0.5;
|
||||||
this.data.position.x = -2;
|
this.data.position.x = -2;
|
||||||
|
|
Reference in a new issue