mirror of
https://github.com/ad044/lainTSX.git
synced 2024-10-22 23:19:06 +00:00
tweaked site
This commit is contained in:
parent
2fe65f6ed5
commit
2a1424f4ea
7 changed files with 87 additions and 126 deletions
|
@ -123,7 +123,7 @@ const BlueOrb = memo((props: BlueOrbContructorProps) => {
|
||||||
<a.mesh
|
<a.mesh
|
||||||
position={props.position as [number, number, number]}
|
position={props.position as [number, number, number]}
|
||||||
rotation-y={props.rotation[1]}
|
rotation-y={props.rotation[1]}
|
||||||
scale={[0.36, 0.2, 0.36]}
|
scale={[0.36, 0.18, 0.36]}
|
||||||
renderOrder={1}
|
renderOrder={1}
|
||||||
>
|
>
|
||||||
<planeBufferGeometry attach="geometry" />
|
<planeBufferGeometry attach="geometry" />
|
||||||
|
|
|
@ -1,83 +0,0 @@
|
||||||
import React from "react";
|
|
||||||
import blue_orb_positions from "../resources/blue_orb_positions.json";
|
|
||||||
import BlueOrb from "./BlueOrb/BlueOrb";
|
|
||||||
import { useRecoilValue } from "recoil";
|
|
||||||
import { currentBlueOrbAtom } from "./BlueOrb/CurrentBlueOrbAtom";
|
|
||||||
|
|
||||||
type ImageTableIndices = {
|
|
||||||
1: string;
|
|
||||||
2: string;
|
|
||||||
3: string;
|
|
||||||
};
|
|
||||||
|
|
||||||
type ProtocolLines = {
|
|
||||||
1: string;
|
|
||||||
2: string;
|
|
||||||
3: string;
|
|
||||||
4: string;
|
|
||||||
};
|
|
||||||
|
|
||||||
type Words = {
|
|
||||||
1: string;
|
|
||||||
2: string;
|
|
||||||
3: string;
|
|
||||||
};
|
|
||||||
|
|
||||||
type BlueOrbData = {
|
|
||||||
"SLPS_016_0x offset": string;
|
|
||||||
image_table_indices: ImageTableIndices;
|
|
||||||
is_hidden: string;
|
|
||||||
media_file: string;
|
|
||||||
node_name: string;
|
|
||||||
protocol_lines: ProtocolLines;
|
|
||||||
site: string;
|
|
||||||
type: string;
|
|
||||||
unlocked_by: string;
|
|
||||||
upgrade_requirement: string;
|
|
||||||
words: Words;
|
|
||||||
};
|
|
||||||
|
|
||||||
type BlueOrbPositionData = {
|
|
||||||
position: number[];
|
|
||||||
rotation: number[];
|
|
||||||
};
|
|
||||||
|
|
||||||
type BlueOrbPositions = {
|
|
||||||
[orbPos: string]: BlueOrbPositionData;
|
|
||||||
};
|
|
||||||
|
|
||||||
type ColumnProps = {
|
|
||||||
columnData: [string, BlueOrbData][];
|
|
||||||
};
|
|
||||||
|
|
||||||
const Column = (props: ColumnProps) => {
|
|
||||||
const currentBlueOrb = useRecoilValue(currentBlueOrbAtom);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
{props.columnData.map((blueOrb: [string, BlueOrbData]) => {
|
|
||||||
// if (blueOrb[1]["unlocked_by"] === "-1")
|
|
||||||
return (
|
|
||||||
<BlueOrb
|
|
||||||
sprite={blueOrb[1]["node_name"]}
|
|
||||||
position={
|
|
||||||
(blue_orb_positions as BlueOrbPositions)[blueOrb[0].substr(2)][
|
|
||||||
"position"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
rotation={
|
|
||||||
(blue_orb_positions as BlueOrbPositions)[blueOrb[0].substr(2)][
|
|
||||||
"rotation"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
key={blueOrb[1]["node_name"]}
|
|
||||||
active={blueOrb[0] === currentBlueOrb}
|
|
||||||
level={blueOrb[0].substr(0, 2)}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
})}
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default Column;
|
|
|
@ -159,7 +159,7 @@ const GrayRing = memo((props: GrayRingProps) => {
|
||||||
scale={[33, 33, 33]}
|
scale={[33, 33, 33]}
|
||||||
>
|
>
|
||||||
<cylinderBufferGeometry
|
<cylinderBufferGeometry
|
||||||
args={[0.04, 0.04, 0.0025, 64, 64, true]}
|
args={[0.036, 0.036, 0.003, 64, 64, true]}
|
||||||
attach="geometry"
|
attach="geometry"
|
||||||
/>
|
/>
|
||||||
<shaderMaterial
|
<shaderMaterial
|
||||||
|
|
|
@ -420,7 +420,7 @@ const InputHandler = () => {
|
||||||
setBigHudText("Tda031");
|
setBigHudText("Tda031");
|
||||||
setBigLetterOffSetXCoeff(0);
|
setBigLetterOffSetXCoeff(0);
|
||||||
}, 1000);
|
}, 1000);
|
||||||
rotateCamera(0.785);
|
rotateCamera(Math.PI / 4);
|
||||||
moveDispatcher(move, key);
|
moveDispatcher(move, key);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -184,9 +184,8 @@ const PurpleRing = memo((props: PurpleRingProps) => {
|
||||||
return (
|
return (
|
||||||
<mesh
|
<mesh
|
||||||
position={[0, props.purpleRingPosY, 0]}
|
position={[0, props.purpleRingPosY, 0]}
|
||||||
rotation={[0, 0.5, 0]}
|
|
||||||
renderOrder={1}
|
renderOrder={1}
|
||||||
scale={[25, 25, 25]}
|
scale={[26, 26, 26]}
|
||||||
ref={purpleRingRef}
|
ref={purpleRingRef}
|
||||||
>
|
>
|
||||||
<cylinderBufferGeometry
|
<cylinderBufferGeometry
|
||||||
|
|
|
@ -1,41 +1,86 @@
|
||||||
import React, { memo, Suspense, useMemo } from "react";
|
import React, { memo, Suspense } from "react";
|
||||||
import site_a from "../../resources/site_a.json";
|
import site_a from "../../resources/site_a.json";
|
||||||
import Level from "../Level";
|
import Level from "../Level";
|
||||||
import level_y_values from "../../resources/level_y_values.json";
|
import level_y_values from "../../resources/level_y_values.json";
|
||||||
import Column from "../Column";
|
import blue_orb_positions from "../../resources/blue_orb_positions.json";
|
||||||
import columns from "../../resources/columns.json";
|
import BlueOrb from "../BlueOrb/BlueOrb";
|
||||||
|
import { useRecoilValue } from "recoil";
|
||||||
|
import { currentBlueOrbAtom } from "../BlueOrb/CurrentBlueOrbAtom";
|
||||||
|
|
||||||
type ColumnsJsonData = {
|
type ImageTableIndices = {
|
||||||
[id: string]: string[];
|
1: string;
|
||||||
|
2: string;
|
||||||
|
3: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
type ProtocolLines = {
|
||||||
|
1: string;
|
||||||
|
2: string;
|
||||||
|
3: string;
|
||||||
|
4: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
type Words = {
|
||||||
|
1: string;
|
||||||
|
2: string;
|
||||||
|
3: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
type BlueOrbData = {
|
||||||
|
"SLPS_016_0x offset": string;
|
||||||
|
image_table_indices: ImageTableIndices;
|
||||||
|
is_hidden: string;
|
||||||
|
media_file: string;
|
||||||
|
node_name: string;
|
||||||
|
protocol_lines: ProtocolLines;
|
||||||
|
site: string;
|
||||||
|
type: string;
|
||||||
|
unlocked_by: string;
|
||||||
|
upgrade_requirement: string;
|
||||||
|
words: Words;
|
||||||
|
};
|
||||||
|
|
||||||
|
type BlueOrbPositionData = {
|
||||||
|
position: number[];
|
||||||
|
rotation: number[];
|
||||||
|
};
|
||||||
|
|
||||||
|
type BlueOrbPositions = {
|
||||||
|
[orbPos: string]: BlueOrbPositionData;
|
||||||
};
|
};
|
||||||
|
|
||||||
const Site = memo(() => {
|
const Site = memo(() => {
|
||||||
const siteData = useMemo(
|
const currentBlueOrb = useRecoilValue(currentBlueOrbAtom);
|
||||||
() => ({
|
|
||||||
columnJson: columns as ColumnsJsonData,
|
|
||||||
siteA: Object.entries(site_a),
|
|
||||||
}),
|
|
||||||
[]
|
|
||||||
);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Suspense fallback={<>loading...</>}>
|
<Suspense fallback={<>loading...</>}>
|
||||||
{/* distance between LEVELS is 1.5 */}
|
{/*distance between LEVELS is 1.5*/}
|
||||||
{/*{Object.values(level_y_values).map((yVal) => {*/}
|
{Object.values(level_y_values).map((yVal) => {
|
||||||
{/* return <Level levelPosY={yVal} key={yVal} />;*/}
|
return <Level levelPosY={yVal} key={yVal} />;
|
||||||
{/*})}*/}
|
})}
|
||||||
|
|
||||||
{/*{Array.from(Array(8).keys()).map((colIdx: number) => {*/}
|
{Object.entries(site_a).map((blueOrb) => {
|
||||||
{/* return (*/}
|
if ((blueOrb as any)[1]["unlocked_by"] === "-1")
|
||||||
{/* <Column*/}
|
return (
|
||||||
{/* columnData={siteData.siteA.filter((blueOrb) =>*/}
|
<BlueOrb
|
||||||
{/* siteData.columnJson[colIdx].includes(blueOrb[0].substr(2))*/}
|
sprite={(blueOrb as any)[1]["node_name"]}
|
||||||
{/* )}*/}
|
position={
|
||||||
{/* key={colIdx}*/}
|
(blue_orb_positions as any)[(blueOrb as any)[0].substr(2)][
|
||||||
{/* />*/}
|
"position"
|
||||||
{/* );*/}
|
]
|
||||||
{/*})}*/}
|
}
|
||||||
|
rotation={
|
||||||
|
(blue_orb_positions as any)[(blueOrb as any)[0].substr(2)][
|
||||||
|
"rotation"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
key={(blueOrb as any)[1]["node_name"]}
|
||||||
|
active={(blueOrb as any)[0] === currentBlueOrb}
|
||||||
|
level={(blueOrb as any)[0].substr(0, 2)}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
})}
|
||||||
</Suspense>
|
</Suspense>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|
|
@ -1,28 +1,28 @@
|
||||||
{
|
{
|
||||||
"05": {
|
"05": {
|
||||||
"position": [0.4, -0.25, 1.3],
|
"position": [0.4, -0.35, 1.1],
|
||||||
"rotation": [0, 0.2, 0]
|
"rotation": [0, 0.35, 0]
|
||||||
},
|
},
|
||||||
"13": {
|
"13": {
|
||||||
"position": [0.4, 0, 1.3],
|
"position": [0.4, 0, 1.1],
|
||||||
"rotation": [0, 0.27, 0]
|
"rotation": [0, 0.35, 0]
|
||||||
},
|
},
|
||||||
"21": {
|
"21": {
|
||||||
"position": [0.4, 0.3, 1.3],
|
"position": [0.4, 0.35, 1.1],
|
||||||
"rotation": [0, 0.27, 0]
|
"rotation": [0, 0.35, 0]
|
||||||
},
|
},
|
||||||
|
|
||||||
"14": {
|
"14": {
|
||||||
"position": [-0.5, 0, 1.1],
|
"position": [-0.49, 0, 1.12],
|
||||||
"rotation": [0, -0.23, 0]
|
"rotation": [0, -0.37, 0]
|
||||||
},
|
},
|
||||||
"22": {
|
"22": {
|
||||||
"position": [-0.5, 0.4, 1.1],
|
"position": [-0.49, 0.33, 1.12],
|
||||||
"rotation": [0, -0.23, 0]
|
"rotation": [0, -0.37, 0]
|
||||||
},
|
},
|
||||||
"06": {
|
"06": {
|
||||||
"position": [-0.5, -0.4, 1.1],
|
"position": [-0.49, -0.33, 1.12],
|
||||||
"rotation": [0, -0.23, 0]
|
"rotation": [0, -0.37, 0]
|
||||||
},
|
},
|
||||||
|
|
||||||
"07": {
|
"07": {
|
||||||
|
|
Loading…
Reference in a new issue