mirror of
https://github.com/ad044/lainTSX.git
synced 2024-10-22 23:19:06 +00:00
changed static file structure, fixed more stuff
This commit is contained in:
parent
5e6c635c1b
commit
cad1712a8c
20 changed files with 49 additions and 44 deletions
|
@ -160,6 +160,7 @@ const BootAuthorizeUser = (props: BootAuthorizeUserProps) => {
|
|||
map={authorizeInactiveLettersTex}
|
||||
attach="material"
|
||||
transparent={true}
|
||||
opacity={0.6}
|
||||
/>
|
||||
</mesh>
|
||||
<mesh
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { useFrame } from "react-three-fiber";
|
||||
import { playAudio, useStore } from "../store";
|
||||
import * as audio from "../static/audio/sfx";
|
||||
import * as audio from "../static/sfx";
|
||||
import {
|
||||
playIdleAudio,
|
||||
playIdleVideo,
|
||||
|
|
|
@ -43,7 +43,7 @@ const Images = () => {
|
|||
imgTries++;
|
||||
if (img[1] !== "-1") {
|
||||
import(
|
||||
"../static/media_images/" + activeSite + "/" + img[1] + ".png"
|
||||
"../static/media/images/" + activeSite + "/" + img[1] + ".png"
|
||||
).then((imageSrc: { default: string }) => {
|
||||
imgArr.splice(parseInt(img[0]), 0, imageSrc);
|
||||
if (imgTries === 3) {
|
||||
|
|
|
@ -59,7 +59,7 @@ const MediaPlayer = () => {
|
|||
|
||||
return (
|
||||
<>
|
||||
<video width="800" height="600" id="media" ref={videoRef}>
|
||||
<video id="media" ref={videoRef}>
|
||||
<track id={"track"} ref={trackRef} kind="captions" default />
|
||||
</video>
|
||||
<div id={"subtitle-container"}>
|
||||
|
|
|
@ -2,7 +2,7 @@ import orangeFont from "../../static/sprites/fonts/orange_font_texture.png";
|
|||
import yellowFont from "../../static/sprites/fonts/yellow_font_texture.png";
|
||||
import * as THREE from "three";
|
||||
import { useLoader } from "react-three-fiber";
|
||||
import orange_font_json from "../../resources/font_data/big_font.json";
|
||||
import orange_font_json from "../../resources/fonts/big_font.json";
|
||||
import { a, useSpring } from "@react-spring/three";
|
||||
import React, { memo, useEffect, useMemo, useState } from "react";
|
||||
import { useStore } from "../../store";
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { useLoader } from "react-three-fiber";
|
||||
import * as THREE from "three";
|
||||
import greenFont from "../../static/sprites/fonts/white_and_green_texture.png";
|
||||
import medium_font_json from "../../resources/font_data/medium_font.json";
|
||||
import medium_font_json from "../../resources/fonts/medium_font.json";
|
||||
import { a } from "@react-spring/three";
|
||||
import React, { memo, useMemo } from "react";
|
||||
import { useStore } from "../../store";
|
||||
|
|
|
@ -3,7 +3,7 @@ import yellowFont from "../../static/sprites/fonts/yellow_font_texture.png";
|
|||
import whiteFont from "../../static/sprites/fonts/white_and_green_texture.png";
|
||||
import * as THREE from "three";
|
||||
import { useLoader } from "react-three-fiber";
|
||||
import orange_font_json from "../../resources/font_data/big_font.json";
|
||||
import orange_font_json from "../../resources/fonts/big_font.json";
|
||||
import { a, useSpring } from "@react-spring/three";
|
||||
import React, { useMemo, memo } from "react";
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import orangeFont from "../../static/sprites/fonts/orange_jp_font.png";
|
||||
import * as THREE from "three";
|
||||
import { useLoader } from "react-three-fiber";
|
||||
import jp_font_json from "../../resources/font_data/jp_font.json";
|
||||
import jp_font_json from "../../resources/fonts/jp_font.json";
|
||||
import React, { memo, useMemo } from "react";
|
||||
|
||||
const StaticJpCharacter = memo((props: { char: string; charIdx: number }) => {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import orangeFont from "../../static/sprites/fonts/orange_font_texture.png";
|
||||
import * as THREE from "three";
|
||||
import { useLoader } from "react-three-fiber";
|
||||
import orange_font_json from "../../resources/font_data/big_font.json";
|
||||
import orange_font_json from "../../resources/fonts/big_font.json";
|
||||
import React, { memo, useMemo } from "react";
|
||||
|
||||
const StaticOrangeLetter = memo(
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import * as audio from "../static/audio/sfx";
|
||||
import * as audio from "../static/sfx";
|
||||
import {
|
||||
nodeExplodeAnimation,
|
||||
nodeKnockAndFallAnimation,
|
||||
|
|
|
@ -3,10 +3,10 @@ import * as THREE from "three";
|
|||
import { useFrame } from "react-three-fiber";
|
||||
import { useStore } from "../store";
|
||||
import EndSelectionScreen from "../components/EndScene/EndSelectionScreen";
|
||||
import endroll from "../static/movie/ENDROLL1.STR[0].webm";
|
||||
import endrollVtt from "../static/webvtt/Endroll.vtt";
|
||||
import Xa0001 from "../static/audio/Xa0001.mp4";
|
||||
import Xa0006 from "../static/audio/Xa0006.mp4";
|
||||
import endroll from "../static/media/movie/ENDROLL1.STR[0].webm";
|
||||
import endrollVtt from "../static/media/webvtt/Endroll.vtt";
|
||||
import Xa0001 from "../static/media/audio/Xa0001.mp4";
|
||||
import Xa0006 from "../static/media/audio/Xa0006.mp4";
|
||||
import LainSpeak from "../components/LainSpeak";
|
||||
import EndSphere from "../components/EndScene/EndSphere";
|
||||
import EndCylinder from "../components/EndScene/EndCylinder";
|
||||
|
|
|
@ -32,7 +32,7 @@ const IdleMediaScene = () => {
|
|||
if (mediaElement) {
|
||||
mediaElement.currentTime = 0;
|
||||
if (idleNodeName) {
|
||||
import("../static/webvtt/" + idleNodeName + ".vtt")
|
||||
import("../static/media/webvtt/" + idleNodeName + ".vtt")
|
||||
.then((vtt) => {
|
||||
if (vtt) trackElement.src = vtt.default;
|
||||
})
|
||||
|
@ -43,13 +43,13 @@ const IdleMediaScene = () => {
|
|||
}
|
||||
|
||||
if (idleMedia.includes("XA")) {
|
||||
import("../static/audio/" + idleMedia + ".ogg").then((media) => {
|
||||
import("../static/media/audio/" + idleMedia + ".ogg").then((media) => {
|
||||
mediaElement.src = media.default;
|
||||
mediaElement.load();
|
||||
mediaElement.play();
|
||||
});
|
||||
} else {
|
||||
import("../static/movie/" + idleMedia + "[0].webm").then((media) => {
|
||||
import("../static/media/movie/" + idleMedia + "[0].webm").then((media) => {
|
||||
mediaElement.src = media.default;
|
||||
mediaElement.load();
|
||||
mediaElement.play();
|
||||
|
|
|
@ -12,7 +12,7 @@ import Lain from "../components/MainScene/Lain";
|
|||
import * as THREE from "three";
|
||||
import { useFrame } from "react-three-fiber";
|
||||
import Popups from "../components/MainScene/Popups/Popups";
|
||||
import * as audio from "../static/audio/sfx";
|
||||
import * as audio from "../static/sfx";
|
||||
import Loading from "../components/Loading";
|
||||
import usePrevious from "../hooks/usePrevious";
|
||||
import MainSceneBackground from "../components/MainScene/Site/MainSceneBackground";
|
||||
|
|
|
@ -43,27 +43,29 @@ const MediaScene = () => {
|
|||
setAudioAnalyser(createAudioAnalyser());
|
||||
|
||||
mediaElement.currentTime = 0;
|
||||
import("../static/webvtt/" + activeNode.node_name + ".vtt")
|
||||
import("../static/media/webvtt/" + activeNode.node_name + ".vtt")
|
||||
.then((vtt) => {
|
||||
if (vtt) trackElement.src = vtt.default;
|
||||
})
|
||||
// some entries have no spoken words, so the file doesnt exist. we catch that here.
|
||||
.catch((e) => console.log(e));
|
||||
.catch(() => {
|
||||
trackElement.removeAttribute("src");
|
||||
});
|
||||
|
||||
if (activeNode.media_file.includes("XA")) {
|
||||
import("../static/audio/" + activeNode.media_file + ".ogg").then(
|
||||
import("../static/media/audio/" + activeNode.media_file + ".ogg").then(
|
||||
(media) => {
|
||||
mediaElement.src = media.default;
|
||||
mediaElement.load();
|
||||
}
|
||||
);
|
||||
} else {
|
||||
import("../static/movie/" + activeNode.media_file + "[0].webm").then(
|
||||
(media) => {
|
||||
mediaElement.src = media.default;
|
||||
mediaElement.load();
|
||||
}
|
||||
);
|
||||
import(
|
||||
"../static/media/movie/" + activeNode.media_file + "[0].webm"
|
||||
).then((media) => {
|
||||
mediaElement.src = media.default;
|
||||
mediaElement.load();
|
||||
});
|
||||
}
|
||||
}
|
||||
}, [activeNode.media_file, activeNode.node_name, setAudioAnalyser]);
|
||||
|
|
|
@ -38,29 +38,31 @@ const TaKScene = () => {
|
|||
if (mediaElement) {
|
||||
setAudioAnalyser(createAudioAnalyser());
|
||||
mediaElement.currentTime = 0;
|
||||
import("../static/webvtt/" + activeNode.node_name + ".vtt")
|
||||
import("../static/media/webvtt/" + activeNode.node_name + ".vtt")
|
||||
.then((vtt) => {
|
||||
if (vtt) trackElement.src = vtt.default;
|
||||
})
|
||||
// some entries have no spoken words, so the file doesnt exist. we catch that here.
|
||||
.catch((e) => console.log(e));
|
||||
.catch(() => {
|
||||
trackElement.removeAttribute("src");
|
||||
});
|
||||
|
||||
if (activeNode.media_file.includes("XA")) {
|
||||
import("../static/audio/" + activeNode.media_file + ".ogg").then(
|
||||
(media) => {
|
||||
mediaElement.src = media.default;
|
||||
mediaElement.load();
|
||||
mediaElement.play();
|
||||
}
|
||||
);
|
||||
import(
|
||||
"../static/media/audio/" + activeNode.media_file + ".ogg"
|
||||
).then((media) => {
|
||||
mediaElement.src = media.default;
|
||||
mediaElement.load();
|
||||
mediaElement.play();
|
||||
});
|
||||
} else {
|
||||
import("../static/movie/" + activeNode.media_file + "[0].webm").then(
|
||||
(media) => {
|
||||
mediaElement.src = media.default;
|
||||
mediaElement.load();
|
||||
mediaElement.play();
|
||||
}
|
||||
);
|
||||
import(
|
||||
"../static/media/movie/" + activeNode.media_file + "[0].webm"
|
||||
).then((media) => {
|
||||
mediaElement.src = media.default;
|
||||
mediaElement.load();
|
||||
mediaElement.play();
|
||||
});
|
||||
}
|
||||
setIsIntro(false);
|
||||
}
|
||||
|
|
|
@ -112,7 +112,7 @@ export const useStore = create(
|
|||
combine(
|
||||
{
|
||||
// scene data
|
||||
currentScene: "main",
|
||||
currentScene: "boot",
|
||||
|
||||
// game progress
|
||||
gameProgress: game_progress,
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
const mobileAndTabletCheck = () => {
|
||||
let check = false;
|
||||
(function (a) {
|
||||
((a) => {
|
||||
if (
|
||||
/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(
|
||||
a
|
||||
|
|
Loading…
Reference in a new issue