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
|
||||
position={props.position as [number, number, number]}
|
||||
rotation-y={props.rotation[1]}
|
||||
scale={[0.36, 0.2, 0.36]}
|
||||
scale={[0.36, 0.18, 0.36]}
|
||||
renderOrder={1}
|
||||
>
|
||||
<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]}
|
||||
>
|
||||
<cylinderBufferGeometry
|
||||
args={[0.04, 0.04, 0.0025, 64, 64, true]}
|
||||
args={[0.036, 0.036, 0.003, 64, 64, true]}
|
||||
attach="geometry"
|
||||
/>
|
||||
<shaderMaterial
|
||||
|
|
|
@ -420,7 +420,7 @@ const InputHandler = () => {
|
|||
setBigHudText("Tda031");
|
||||
setBigLetterOffSetXCoeff(0);
|
||||
}, 1000);
|
||||
rotateCamera(0.785);
|
||||
rotateCamera(Math.PI / 4);
|
||||
moveDispatcher(move, key);
|
||||
}
|
||||
},
|
||||
|
|
|
@ -184,9 +184,8 @@ const PurpleRing = memo((props: PurpleRingProps) => {
|
|||
return (
|
||||
<mesh
|
||||
position={[0, props.purpleRingPosY, 0]}
|
||||
rotation={[0, 0.5, 0]}
|
||||
renderOrder={1}
|
||||
scale={[25, 25, 25]}
|
||||
scale={[26, 26, 26]}
|
||||
ref={purpleRingRef}
|
||||
>
|
||||
<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 Level from "../Level";
|
||||
import level_y_values from "../../resources/level_y_values.json";
|
||||
import Column from "../Column";
|
||||
import columns from "../../resources/columns.json";
|
||||
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 ColumnsJsonData = {
|
||||
[id: string]: string[];
|
||||
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;
|
||||
};
|
||||
|
||||
const Site = memo(() => {
|
||||
const siteData = useMemo(
|
||||
() => ({
|
||||
columnJson: columns as ColumnsJsonData,
|
||||
siteA: Object.entries(site_a),
|
||||
}),
|
||||
[]
|
||||
);
|
||||
const currentBlueOrb = useRecoilValue(currentBlueOrbAtom);
|
||||
|
||||
return (
|
||||
<>
|
||||
<Suspense fallback={<>loading...</>}>
|
||||
{/* distance between LEVELS is 1.5 */}
|
||||
{/*{Object.values(level_y_values).map((yVal) => {*/}
|
||||
{/* return <Level levelPosY={yVal} key={yVal} />;*/}
|
||||
{/*})}*/}
|
||||
{/*distance between LEVELS is 1.5*/}
|
||||
{Object.values(level_y_values).map((yVal) => {
|
||||
return <Level levelPosY={yVal} key={yVal} />;
|
||||
})}
|
||||
|
||||
{/*{Array.from(Array(8).keys()).map((colIdx: number) => {*/}
|
||||
{/* return (*/}
|
||||
{/* <Column*/}
|
||||
{/* columnData={siteData.siteA.filter((blueOrb) =>*/}
|
||||
{/* siteData.columnJson[colIdx].includes(blueOrb[0].substr(2))*/}
|
||||
{/* )}*/}
|
||||
{/* key={colIdx}*/}
|
||||
{/* />*/}
|
||||
{/* );*/}
|
||||
{/*})}*/}
|
||||
{Object.entries(site_a).map((blueOrb) => {
|
||||
if ((blueOrb as any)[1]["unlocked_by"] === "-1")
|
||||
return (
|
||||
<BlueOrb
|
||||
sprite={(blueOrb as any)[1]["node_name"]}
|
||||
position={
|
||||
(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>
|
||||
</>
|
||||
);
|
||||
|
|
|
@ -1,28 +1,28 @@
|
|||
{
|
||||
"05": {
|
||||
"position": [0.4, -0.25, 1.3],
|
||||
"rotation": [0, 0.2, 0]
|
||||
"position": [0.4, -0.35, 1.1],
|
||||
"rotation": [0, 0.35, 0]
|
||||
},
|
||||
"13": {
|
||||
"position": [0.4, 0, 1.3],
|
||||
"rotation": [0, 0.27, 0]
|
||||
"position": [0.4, 0, 1.1],
|
||||
"rotation": [0, 0.35, 0]
|
||||
},
|
||||
"21": {
|
||||
"position": [0.4, 0.3, 1.3],
|
||||
"rotation": [0, 0.27, 0]
|
||||
"position": [0.4, 0.35, 1.1],
|
||||
"rotation": [0, 0.35, 0]
|
||||
},
|
||||
|
||||
"14": {
|
||||
"position": [-0.5, 0, 1.1],
|
||||
"rotation": [0, -0.23, 0]
|
||||
"position": [-0.49, 0, 1.12],
|
||||
"rotation": [0, -0.37, 0]
|
||||
},
|
||||
"22": {
|
||||
"position": [-0.5, 0.4, 1.1],
|
||||
"rotation": [0, -0.23, 0]
|
||||
"position": [-0.49, 0.33, 1.12],
|
||||
"rotation": [0, -0.37, 0]
|
||||
},
|
||||
"06": {
|
||||
"position": [-0.5, -0.4, 1.1],
|
||||
"rotation": [0, -0.23, 0]
|
||||
"position": [-0.49, -0.33, 1.12],
|
||||
"rotation": [0, -0.37, 0]
|
||||
},
|
||||
|
||||
"07": {
|
||||
|
|
Loading…
Reference in a new issue