- Update player class
This commit is contained in:
Kum1ta
2024-08-19 00:42:53 +02:00
parent 8da97c8e60
commit aee1f94ea3
5 changed files with 131 additions and 98 deletions

View File

@ -6,7 +6,7 @@
/* By: edbernar <edbernar@student.42angouleme. +#+ +:+ +#+ */ /* By: edbernar <edbernar@student.42angouleme. +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2024/08/18 00:30:31 by edbernar #+# #+# */ /* Created: 2024/08/18 00:30:31 by edbernar #+# #+# */
/* Updated: 2024/08/18 16:17:18 by edbernar ### ########.fr */ /* Updated: 2024/08/19 00:42:13 by edbernar ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@ -20,11 +20,13 @@ import * as THREE from 'three';
Exemple : w et a sont pressées -> pressedButton = ['w', 'a'] Exemple : w et a sont pressées -> pressedButton = ['w', 'a']
- Les lignes avec cleanup sont l'êquivalent d'un destructeur en CPP - Les lignes avec cleanup sont l'êquivalent d'un destructeur en CPP
- Pour appliquer des actions sur les touches, il suffit de faire ça dans la fonction - Pour appliquer des actions sur les touches, il suffit de faire ça dans la fonction
update en regardant si la touche voulue est pressée dans la variable "pressedButton" update en regardant si la touche voulue est dans la variable "pressedButton"
- Par défaut, la caméra est accroché, si on veut qu'elle ne bouge plus, il faut - Par défaut, la caméra est accroché, si on veut qu'elle ne bouge plus, il faut
modifier "cameraFixed" à true modifier "cameraFixed" à true (se fait avec la touche 'm' en jeu)
- Si on utilise une touche qui ne sera utilisée que pour un appui simple, il faudra la - Si on utilise une touche qui ne sera utilisée que pour un appui simple, il faudra la
mettre dans 'addEventListerner('keypress') et pas dans update() mettre dans 'addEventListerner('keypress') et pas dans update() pour eviter les
problèmes de touche non détecté
- La variable "limits" sert à délimiter les mouvements de la barre
*/ */
/* /*
@ -32,18 +34,27 @@ import * as THREE from 'three';
- Ajouter une camera sur l'object (OK) - Ajouter une camera sur l'object (OK)
- Faire une fonction pour changer le mode de la camera (fix ou accrochée) (OK) - Faire une fonction pour changer le mode de la camera (fix ou accrochée) (OK)
- Ajouter une rotation quand la caméra est fixe (OK) - Ajouter une rotation quand la caméra est fixe (OK)
- Corriger bug quand changement de caméra (camera qui se remet au dessus
quand on repasse au dessus alors qu'elle devrait être en dessous vu que la
barre est en haut). Mais peut etre faire ça quand la barre aura des mouvements
définis sur la hauteur.
*/ */
let playerExist = false; let playerExist = false;
const limits = {
up : 2,
down: 0.2,
left: -4,
right: 4,
}
class Player class Player
{ {
pressedButton = []; pressedButton = [];
object = null; object = null;
camera = null; camera = null;
speed = 0.05; speed = 0.1;
cameraFixed = false; cameraFixed = false;
orbital = null;
constructor (object, renderer) constructor (object, renderer)
{ {
@ -51,10 +62,7 @@ class Player
throw Error("Player is already init."); throw Error("Player is already init.");
playerExist = true; playerExist = true;
this.object = object; this.object = object;
this.camera = new THREE.PerspectiveCamera(90, window.innerWidth / window.innerHeight, 0.1, 10000); this.camera = new THREE.PerspectiveCamera(80, window.innerWidth / window.innerHeight, 0.1, 10000);
this.orbital = new OrbitControls(this.camera, renderer.domElement);
this.orbital.enableZoom = false;
this.cleanup = new FinalizationRegistry((heldValue) => { this.cleanup = new FinalizationRegistry((heldValue) => {
playerExist = false; playerExist = false;
@ -86,13 +94,16 @@ class Player
{ {
this.cameraFixed = !this.cameraFixed; this.cameraFixed = !this.cameraFixed;
if (!this.cameraFixed) if (!this.cameraFixed)
{
this.setCameraPosition( this.setCameraPosition(
this.object.position.x, this.object.position.x,
this.object.position.y + 0.5, this.object.position.y + 0.5,
this.object.position.z + 1 this.object.position.z + 1
); );
this.camera.rotation.set(0, 0, 0);
}
else else
this.setCameraPosition(0, 1, 1) this.setCameraPosition(0, 1, 0.7)
} }
}); });
} }
@ -103,27 +114,36 @@ class Player
i = 0; i = 0;
if (this.cameraFixed) if (this.cameraFixed)
{ this.camera.lookAt(new THREE.Vector3(this.object.position.x / 4, (this.object.position.y + 1) / 1.75, this.object.position.z - 1.5));
this.orbital.target = new THREE.Vector3(this.object.position.x, this.object.position.y, this.object.position.z - 5);
this.orbital.update();
}
else
this.camera.rotation.set(0, 0, 0);
while (i < this.pressedButton.length) while (i < this.pressedButton.length)
{ {
if (this.pressedButton[i] == 'w' || this.pressedButton[i] == 's') if (this.pressedButton[i] == 'w' && this.object.position.y < limits.up)
{ {
this.object.position.y += (this.pressedButton[i] == 'w' ? this.speed : -this.speed); this.object.position.y += this.speed;
if (!this.cameraFixed) if (!this.cameraFixed)
this.camera.position.y += (this.pressedButton[i] == 'w' ? this.speed : -this.speed); this.camera.position.y += (this.speed / 2);
} }
if (this.pressedButton[i] == 'a' || this.pressedButton[i] == 'd') if (this.pressedButton[i] == 's' && this.object.position.y > limits.down)
{ {
this.object.position.x += (this.pressedButton[i] == 'a' ? -this.speed : this.speed); this.object.position.y -= this.speed;
if (!this.cameraFixed) if (!this.cameraFixed)
this.camera.position.x += (this.pressedButton[i] == 'a' ? -this.speed : this.speed); this.camera.position.y -= (this.speed / 2);
}
if (this.pressedButton[i] == 'd' && this.object.position.x < limits.right)
{
this.object.position.x += this.speed;
if (!this.cameraFixed)
this.camera.position.x += this.speed;
}
if (this.pressedButton[i] == 'a' && this.object.position.x > limits.left)
{
this.object.position.x -= this.speed;
if (!this.cameraFixed)
this.camera.position.x -= this.speed;
} }
i++; i++;
} }
} }

View File

@ -6,6 +6,8 @@
body { body {
margin: 0; margin: 0;
padding: 0; padding: 0;
width: 100%;
height: 100%;
} }
</style> </style>
<script src="./main.js" type="module"></script> <script src="./main.js" type="module"></script>

View File

@ -6,7 +6,7 @@
/* By: edbernar <edbernar@student.42angouleme. +#+ +:+ +#+ */ /* By: edbernar <edbernar@student.42angouleme. +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2024/08/18 00:53:53 by edbernar #+# #+# */ /* Created: 2024/08/18 00:53:53 by edbernar #+# #+# */
/* Updated: 2024/08/18 15:52:03 by edbernar ### ########.fr */ /* Updated: 2024/08/19 00:37:34 by edbernar ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@ -19,29 +19,38 @@ function createBarPlayer(color)
const material = new THREE.MeshPhysicalMaterial({color: color}); const material = new THREE.MeshPhysicalMaterial({color: color});
const mesh = new THREE.Mesh(geometry, material); const mesh = new THREE.Mesh(geometry, material);
mesh.position.set(0, 0.2, 0);
return (mesh); return (mesh);
} }
function loop() function loop()
{ {
// controls.update();
player.update(); player.update();
renderer.render(scene, player.camera); renderer.render(scene, player.camera);
} }
function createMap()
{
const geometry = new THREE.PlaneGeometry(10, 10);
const material = new THREE.MeshPhysicalMaterial();
const mesh = new THREE.Mesh(geometry, material);
mesh.rotateX(-(Math.PI / 2));
return (mesh);
}
const scene = new THREE.Scene(); const scene = new THREE.Scene();
const bar = createBarPlayer(0xed56ea); const bar = createBarPlayer(0xed56ea);
const renderer = new THREE.WebGLRenderer(); const renderer = new THREE.WebGLRenderer();
const player = new Player(bar, renderer); const player = new Player(bar, renderer);
const spotLight = new THREE.SpotLight(0xffffff, 1, 0, Math.PI / 4); const spotLight = new THREE.SpotLight(0xffffff, 1000, 0, Math.PI / 4);
const helper = new THREE.SpotLightHelper(spotLight); const map = createMap();
// const controls = new OrbitControls(player.camera, renderer.domElement);
scene.add(player.object); scene.add(player.object);
spotLight.target = player.object; spotLight.position.set(0, 100, 0);
scene.add(spotLight); scene.add(spotLight);
scene.add(helper); scene.add(map);
scene.background = new THREE.Color(0x1a1a1a); scene.background = new THREE.Color(0x1a1a1a);
renderer.setSize(window.innerWidth, window.innerHeight); renderer.setSize(window.innerWidth, window.innerHeight);
document.body.appendChild(renderer.domElement); document.body.appendChild(renderer.domElement);

View File

@ -1,10 +1,11 @@
{ {
"name": "class", "name": "real_game",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"dependencies": { "dependencies": {
"rollup": "^4.21.0",
"three": "^0.167.1", "three": "^0.167.1",
"vite": "^5.4.1" "vite": "^5.4.1"
} }
@ -378,9 +379,9 @@
} }
}, },
"node_modules/@rollup/rollup-android-arm-eabi": { "node_modules/@rollup/rollup-android-arm-eabi": {
"version": "4.20.0", "version": "4.21.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.20.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.21.0.tgz",
"integrity": "sha512-TSpWzflCc4VGAUJZlPpgAJE1+V60MePDQnBd7PPkpuEmOy8i87aL6tinFGKBFKuEDikYpig72QzdT3QPYIi+oA==", "integrity": "sha512-WTWD8PfoSAJ+qL87lE7votj3syLavxunWhzCnx3XFxFiI/BA/r3X7MUM8dVrH8rb2r4AiO8jJsr3ZjdaftmnfA==",
"cpu": [ "cpu": [
"arm" "arm"
], ],
@ -391,9 +392,9 @@
] ]
}, },
"node_modules/@rollup/rollup-android-arm64": { "node_modules/@rollup/rollup-android-arm64": {
"version": "4.20.0", "version": "4.21.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.20.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.21.0.tgz",
"integrity": "sha512-u00Ro/nok7oGzVuh/FMYfNoGqxU5CPWz1mxV85S2w9LxHR8OoMQBuSk+3BKVIDYgkpeOET5yXkx90OYFc+ytpQ==", "integrity": "sha512-a1sR2zSK1B4eYkiZu17ZUZhmUQcKjk2/j9Me2IDjk1GHW7LB5Z35LEzj9iJch6gtUfsnvZs1ZNyDW2oZSThrkA==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@ -404,9 +405,9 @@
] ]
}, },
"node_modules/@rollup/rollup-darwin-arm64": { "node_modules/@rollup/rollup-darwin-arm64": {
"version": "4.20.0", "version": "4.21.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.20.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.21.0.tgz",
"integrity": "sha512-uFVfvzvsdGtlSLuL0ZlvPJvl6ZmrH4CBwLGEFPe7hUmf7htGAN+aXo43R/V6LATyxlKVC/m6UsLb7jbG+LG39Q==", "integrity": "sha512-zOnKWLgDld/svhKO5PD9ozmL6roy5OQ5T4ThvdYZLpiOhEGY+dp2NwUmxK0Ld91LrbjrvtNAE0ERBwjqhZTRAA==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@ -417,9 +418,9 @@
] ]
}, },
"node_modules/@rollup/rollup-darwin-x64": { "node_modules/@rollup/rollup-darwin-x64": {
"version": "4.20.0", "version": "4.21.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.20.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.21.0.tgz",
"integrity": "sha512-xbrMDdlev53vNXexEa6l0LffojxhqDTBeL+VUxuuIXys4x6xyvbKq5XqTXBCEUA8ty8iEJblHvFaWRJTk/icAQ==", "integrity": "sha512-7doS8br0xAkg48SKE2QNtMSFPFUlRdw9+votl27MvT46vo44ATBmdZdGysOevNELmZlfd+NEa0UYOA8f01WSrg==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@ -430,9 +431,9 @@
] ]
}, },
"node_modules/@rollup/rollup-linux-arm-gnueabihf": { "node_modules/@rollup/rollup-linux-arm-gnueabihf": {
"version": "4.20.0", "version": "4.21.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.20.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.21.0.tgz",
"integrity": "sha512-jMYvxZwGmoHFBTbr12Xc6wOdc2xA5tF5F2q6t7Rcfab68TT0n+r7dgawD4qhPEvasDsVpQi+MgDzj2faOLsZjA==", "integrity": "sha512-pWJsfQjNWNGsoCq53KjMtwdJDmh/6NubwQcz52aEwLEuvx08bzcy6tOUuawAOncPnxz/3siRtd8hiQ32G1y8VA==",
"cpu": [ "cpu": [
"arm" "arm"
], ],
@ -443,9 +444,9 @@
] ]
}, },
"node_modules/@rollup/rollup-linux-arm-musleabihf": { "node_modules/@rollup/rollup-linux-arm-musleabihf": {
"version": "4.20.0", "version": "4.21.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.20.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.21.0.tgz",
"integrity": "sha512-1asSTl4HKuIHIB1GcdFHNNZhxAYEdqML/MW4QmPS4G0ivbEcBr1JKlFLKsIRqjSwOBkdItn3/ZDlyvZ/N6KPlw==", "integrity": "sha512-efRIANsz3UHZrnZXuEvxS9LoCOWMGD1rweciD6uJQIx2myN3a8Im1FafZBzh7zk1RJ6oKcR16dU3UPldaKd83w==",
"cpu": [ "cpu": [
"arm" "arm"
], ],
@ -456,9 +457,9 @@
] ]
}, },
"node_modules/@rollup/rollup-linux-arm64-gnu": { "node_modules/@rollup/rollup-linux-arm64-gnu": {
"version": "4.20.0", "version": "4.21.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.20.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.21.0.tgz",
"integrity": "sha512-COBb8Bkx56KldOYJfMf6wKeYJrtJ9vEgBRAOkfw6Ens0tnmzPqvlpjZiLgkhg6cA3DGzCmLmmd319pmHvKWWlQ==", "integrity": "sha512-ZrPhydkTVhyeGTW94WJ8pnl1uroqVHM3j3hjdquwAcWnmivjAwOYjTEAuEDeJvGX7xv3Z9GAvrBkEzCgHq9U1w==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@ -469,9 +470,9 @@
] ]
}, },
"node_modules/@rollup/rollup-linux-arm64-musl": { "node_modules/@rollup/rollup-linux-arm64-musl": {
"version": "4.20.0", "version": "4.21.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.20.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.21.0.tgz",
"integrity": "sha512-+it+mBSyMslVQa8wSPvBx53fYuZK/oLTu5RJoXogjk6x7Q7sz1GNRsXWjn6SwyJm8E/oMjNVwPhmNdIjwP135Q==", "integrity": "sha512-cfaupqd+UEFeURmqNP2eEvXqgbSox/LHOyN9/d2pSdV8xTrjdg3NgOFJCtc1vQ/jEke1qD0IejbBfxleBPHnPw==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@ -482,9 +483,9 @@
] ]
}, },
"node_modules/@rollup/rollup-linux-powerpc64le-gnu": { "node_modules/@rollup/rollup-linux-powerpc64le-gnu": {
"version": "4.20.0", "version": "4.21.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.20.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.21.0.tgz",
"integrity": "sha512-yAMvqhPfGKsAxHN8I4+jE0CpLWD8cv4z7CK7BMmhjDuz606Q2tFKkWRY8bHR9JQXYcoLfopo5TTqzxgPUjUMfw==", "integrity": "sha512-ZKPan1/RvAhrUylwBXC9t7B2hXdpb/ufeu22pG2psV7RN8roOfGurEghw1ySmX/CmDDHNTDDjY3lo9hRlgtaHg==",
"cpu": [ "cpu": [
"ppc64" "ppc64"
], ],
@ -495,9 +496,9 @@
] ]
}, },
"node_modules/@rollup/rollup-linux-riscv64-gnu": { "node_modules/@rollup/rollup-linux-riscv64-gnu": {
"version": "4.20.0", "version": "4.21.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.20.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.21.0.tgz",
"integrity": "sha512-qmuxFpfmi/2SUkAw95TtNq/w/I7Gpjurx609OOOV7U4vhvUhBcftcmXwl3rqAek+ADBwSjIC4IVNLiszoj3dPA==", "integrity": "sha512-H1eRaCwd5E8eS8leiS+o/NqMdljkcb1d6r2h4fKSsCXQilLKArq6WS7XBLDu80Yz+nMqHVFDquwcVrQmGr28rg==",
"cpu": [ "cpu": [
"riscv64" "riscv64"
], ],
@ -508,9 +509,9 @@
] ]
}, },
"node_modules/@rollup/rollup-linux-s390x-gnu": { "node_modules/@rollup/rollup-linux-s390x-gnu": {
"version": "4.20.0", "version": "4.21.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.20.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.21.0.tgz",
"integrity": "sha512-I0BtGXddHSHjV1mqTNkgUZLnS3WtsqebAXv11D5BZE/gfw5KoyXSAXVqyJximQXNvNzUo4GKlCK/dIwXlz+jlg==", "integrity": "sha512-zJ4hA+3b5tu8u7L58CCSI0A9N1vkfwPhWd/puGXwtZlsB5bTkwDNW/+JCU84+3QYmKpLi+XvHdmrlwUwDA6kqw==",
"cpu": [ "cpu": [
"s390x" "s390x"
], ],
@ -521,9 +522,9 @@
] ]
}, },
"node_modules/@rollup/rollup-linux-x64-gnu": { "node_modules/@rollup/rollup-linux-x64-gnu": {
"version": "4.20.0", "version": "4.21.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.20.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.21.0.tgz",
"integrity": "sha512-y+eoL2I3iphUg9tN9GB6ku1FA8kOfmF4oUEWhztDJ4KXJy1agk/9+pejOuZkNFhRwHAOxMsBPLbXPd6mJiCwew==", "integrity": "sha512-e2hrvElFIh6kW/UNBQK/kzqMNY5mO+67YtEh9OA65RM5IJXYTWiXjX6fjIiPaqOkBthYF1EqgiZ6OXKcQsM0hg==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@ -534,9 +535,9 @@
] ]
}, },
"node_modules/@rollup/rollup-linux-x64-musl": { "node_modules/@rollup/rollup-linux-x64-musl": {
"version": "4.20.0", "version": "4.21.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.20.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.21.0.tgz",
"integrity": "sha512-hM3nhW40kBNYUkZb/r9k2FKK+/MnKglX7UYd4ZUy5DJs8/sMsIbqWK2piZtVGE3kcXVNj3B2IrUYROJMMCikNg==", "integrity": "sha512-1vvmgDdUSebVGXWX2lIcgRebqfQSff0hMEkLJyakQ9JQUbLDkEaMsPTLOmyccyC6IJ/l3FZuJbmrBw/u0A0uCQ==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@ -547,9 +548,9 @@
] ]
}, },
"node_modules/@rollup/rollup-win32-arm64-msvc": { "node_modules/@rollup/rollup-win32-arm64-msvc": {
"version": "4.20.0", "version": "4.21.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.20.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.21.0.tgz",
"integrity": "sha512-psegMvP+Ik/Bg7QRJbv8w8PAytPA7Uo8fpFjXyCRHWm6Nt42L+JtoqH8eDQ5hRP7/XW2UiIriy1Z46jf0Oa1kA==", "integrity": "sha512-s5oFkZ/hFcrlAyBTONFY1TWndfyre1wOMwU+6KCpm/iatybvrRgmZVM+vCFwxmC5ZhdlgfE0N4XorsDpi7/4XQ==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@ -560,9 +561,9 @@
] ]
}, },
"node_modules/@rollup/rollup-win32-ia32-msvc": { "node_modules/@rollup/rollup-win32-ia32-msvc": {
"version": "4.20.0", "version": "4.21.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.20.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.21.0.tgz",
"integrity": "sha512-GabekH3w4lgAJpVxkk7hUzUf2hICSQO0a/BLFA11/RMxQT92MabKAqyubzDZmMOC/hcJNlc+rrypzNzYl4Dx7A==", "integrity": "sha512-G9+TEqRnAA6nbpqyUqgTiopmnfgnMkR3kMukFBDsiyy23LZvUCpiUwjTRx6ezYCjJODXrh52rBR9oXvm+Fp5wg==",
"cpu": [ "cpu": [
"ia32" "ia32"
], ],
@ -573,9 +574,9 @@
] ]
}, },
"node_modules/@rollup/rollup-win32-x64-msvc": { "node_modules/@rollup/rollup-win32-x64-msvc": {
"version": "4.20.0", "version": "4.21.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.20.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.21.0.tgz",
"integrity": "sha512-aJ1EJSuTdGnM6qbVC4B5DSmozPTqIag9fSzXRNNo+humQLG89XpPgdt16Ia56ORD7s+H8Pmyx44uczDQ0yDzpg==", "integrity": "sha512-2jsCDZwtQvRhejHLfZ1JY6w6kEuEtfF9nzYsZxzSlNVKDX+DpsDJ+Rbjkm74nvg2rdx0gwBS+IMdvwJuq3S9pQ==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@ -696,9 +697,9 @@
} }
}, },
"node_modules/rollup": { "node_modules/rollup": {
"version": "4.20.0", "version": "4.21.0",
"resolved": "https://registry.npmjs.org/rollup/-/rollup-4.20.0.tgz", "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.21.0.tgz",
"integrity": "sha512-6rbWBChcnSGzIlXeIdNIZTopKYad8ZG8ajhl78lGRLsI2rX8IkaotQhVas2Ma+GPxJav19wrSzvRvuiv0YKzWw==", "integrity": "sha512-vo+S/lfA2lMS7rZ2Qoubi6I5hwZwzXeUIctILZLbHI+laNtvhhOIon2S1JksA5UEDQ7l3vberd0fxK44lTYjbQ==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@types/estree": "1.0.5" "@types/estree": "1.0.5"
@ -711,22 +712,22 @@
"npm": ">=8.0.0" "npm": ">=8.0.0"
}, },
"optionalDependencies": { "optionalDependencies": {
"@rollup/rollup-android-arm-eabi": "4.20.0", "@rollup/rollup-android-arm-eabi": "4.21.0",
"@rollup/rollup-android-arm64": "4.20.0", "@rollup/rollup-android-arm64": "4.21.0",
"@rollup/rollup-darwin-arm64": "4.20.0", "@rollup/rollup-darwin-arm64": "4.21.0",
"@rollup/rollup-darwin-x64": "4.20.0", "@rollup/rollup-darwin-x64": "4.21.0",
"@rollup/rollup-linux-arm-gnueabihf": "4.20.0", "@rollup/rollup-linux-arm-gnueabihf": "4.21.0",
"@rollup/rollup-linux-arm-musleabihf": "4.20.0", "@rollup/rollup-linux-arm-musleabihf": "4.21.0",
"@rollup/rollup-linux-arm64-gnu": "4.20.0", "@rollup/rollup-linux-arm64-gnu": "4.21.0",
"@rollup/rollup-linux-arm64-musl": "4.20.0", "@rollup/rollup-linux-arm64-musl": "4.21.0",
"@rollup/rollup-linux-powerpc64le-gnu": "4.20.0", "@rollup/rollup-linux-powerpc64le-gnu": "4.21.0",
"@rollup/rollup-linux-riscv64-gnu": "4.20.0", "@rollup/rollup-linux-riscv64-gnu": "4.21.0",
"@rollup/rollup-linux-s390x-gnu": "4.20.0", "@rollup/rollup-linux-s390x-gnu": "4.21.0",
"@rollup/rollup-linux-x64-gnu": "4.20.0", "@rollup/rollup-linux-x64-gnu": "4.21.0",
"@rollup/rollup-linux-x64-musl": "4.20.0", "@rollup/rollup-linux-x64-musl": "4.21.0",
"@rollup/rollup-win32-arm64-msvc": "4.20.0", "@rollup/rollup-win32-arm64-msvc": "4.21.0",
"@rollup/rollup-win32-ia32-msvc": "4.20.0", "@rollup/rollup-win32-ia32-msvc": "4.21.0",
"@rollup/rollup-win32-x64-msvc": "4.20.0", "@rollup/rollup-win32-x64-msvc": "4.21.0",
"fsevents": "~2.3.2" "fsevents": "~2.3.2"
} }
}, },

View File

@ -3,6 +3,7 @@
"dev": "vite" "dev": "vite"
}, },
"dependencies": { "dependencies": {
"rollup": "^4.21.0",
"three": "^0.167.1", "three": "^0.167.1",
"vite": "^5.4.1" "vite": "^5.4.1"
} }