diff --git a/src/neptune.jsx b/src/neptune.jsx
index 73da056..968aebb 100644
--- a/src/neptune.jsx
+++ b/src/neptune.jsx
@@ -58,34 +58,7 @@ export const Neptune = ({ positions }) => {
}, []);
useFrame(() => {
- if (poss.length % 1000 == 0) {
- setPos(poss.slice(0, 500));
- }
- let date;
- if (firstRef.current) {
- date = new Date(Date.now());
- date.setMilliseconds(0);
- date.setSeconds(0);
- }
- //console.log(poss.length);
- //console.log(group.current.userData.counter);
- if (group.current.userData.counter % 250 == 0 || getAgain) {
- if (!firstRef.current)
- date = new Date(poss[poss.length - 1].date).toUTCString();
- const fetchData = async () => {
- let res = await fetch(
- `http://127.0.0.1:8000/duration/neptune?date=${date}&speed=${speed}` //example and simple data
- );
- let response = await res.json();
-
- setPos(poss.concat(response)); // parse json
- firstRef.current = false;
- setGetAgain(false);
- //console.log(`psss : ${poss.length}`);
- };
- fetchData();
- }
- if (true && group.current.userData.counter < poss.length) {
+ if (false && group.current.userData.counter < poss.length) {
group.current.position.set(
Number(
poss[group.current.userData.counter].position.x / distanceScaleFactor
diff --git a/src/omnioverlay.jsx b/src/omnioverlay.jsx
index 77bff3f..75b5bad 100644
--- a/src/omnioverlay.jsx
+++ b/src/omnioverlay.jsx
@@ -33,9 +33,9 @@ export const ScreenOverlay = () => {
-
+
>
diff --git a/src/saturn.jsx b/src/saturn.jsx
index 7f2e184..ee542b0 100644
--- a/src/saturn.jsx
+++ b/src/saturn.jsx
@@ -86,33 +86,6 @@ export const Saturn = ({ positions }) => {
}, []);
useFrame(() => {
- if (poss.length % 1000 == 0) {
- setPos(poss.slice(0, 500));
- }
- let date;
- if (firstRef.current) {
- date = new Date(Date.now());
- date.setMilliseconds(0);
- date.setSeconds(0);
- }
- //console.log(poss.length);
- //console.log(group.current.userData.counter);
- if (group.current.userData.counter % 250 == 0 || getAgain) {
- if (!firstRef.current)
- date = new Date(poss[poss.length - 1].date).toUTCString();
- const fetchData = async () => {
- let res = await fetch(
- `http://127.0.0.1:8000/duration/saturn?date=${date}&speed=${speed}` //example and simple data
- );
- let response = await res.json();
-
- setPos(poss.concat(response)); // parse json
- firstRef.current = false;
- setGetAgain(false);
- //console.log(`psss : ${poss.length}`);
- };
- fetchData();
- }
if (true && group.current.userData.counter < poss.length) {
group.current.position.set(
Number(
diff --git a/src/uranus.jsx b/src/uranus.jsx
index 60b22dd..14b7efd 100644
--- a/src/uranus.jsx
+++ b/src/uranus.jsx
@@ -69,7 +69,7 @@ export const Uranus = ({ positions }) => {
}
//console.log(poss.length);
//console.log(group.current.userData.counter);
- if (group.current.userData.counter % 250 == 0 || getAgain) {
+ if (false && group.current.userData.counter % 250 == 0 && getAgain) {
if (!firstRef.current)
date = new Date(poss[poss.length - 1].date).toUTCString();
const fetchData = async () => {
diff --git a/src/venus.jsx b/src/venus.jsx
index 7d9c4ed..ff9d76a 100644
--- a/src/venus.jsx
+++ b/src/venus.jsx
@@ -66,23 +66,7 @@ export const Venus = ({ positions }) => {
}
//console.log(poss.length);
//console.log(group.current.userData.counter);
- if (group.current.userData.counter % 250 == 0 || getAgain) {
- if (!firstRef.current)
- date = new Date(poss[poss.length - 1].date).toUTCString();
- const fetchData = async () => {
- let res = await fetch(
- `http://127.0.0.1:8000/duration/venus?date=${date}&speed=${speed}` //example and simple data
- );
- let response = await res.json();
-
- setPos(poss.concat(response)); // parse json
- firstRef.current = false;
- setGetAgain(false);
- //console.log(`psss : ${poss.length}`);
- };
- fetchData();
- }
- if (true && group.current.userData.counter < poss.length) {
+ if (false && group.current.userData.counter < poss.length) {
group.current.position.set(
Number(
poss[group.current.userData.counter].position.x / distanceScaleFactor