refactor: constants
This commit is contained in:
parent
bd6dade614
commit
05e1bb5f92
|
@ -1,5 +1,5 @@
|
|||
import {CHUNK_SIZE} from '@/constants.js';
|
||||
import Component from '@/ecs/component.js';
|
||||
import {CHUNK_SIZE} from '@/util/constants.js';
|
||||
import {floodwalk2D, ortho, removeCollinear} from '@/util/math.js';
|
||||
|
||||
import vector2d from './helpers/vector-2d';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import {IRL_MINUTES_PER_GAME_DAY} from '@/constants';
|
||||
import Component from '@/ecs/component.js';
|
||||
import {IRL_MINUTES_PER_GAME_DAY} from '@/util/constants';
|
||||
|
||||
const realSecondsPerGameDay = 60 * IRL_MINUTES_PER_GAME_DAY;
|
||||
const realSecondsPerGameHour = realSecondsPerGameDay / 24;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// import {RESOLUTION} from '@/constants.js'
|
||||
import {System} from '@/ecs/index.js';
|
||||
// import {RESOLUTION} from '@/util/constants.js'
|
||||
|
||||
// const [hx, hy] = [RESOLUTION.x / 2, RESOLUTION.y / 2];
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import Ecs from '@/ecs/ecs.js';
|
||||
import {decode, encode} from '@/packets/index.js';
|
||||
import {
|
||||
CHUNK_SIZE,
|
||||
RESOLUTION,
|
||||
TPS,
|
||||
} from '@/constants.js';
|
||||
import Ecs from '@/ecs/ecs.js';
|
||||
import {decode, encode} from '@/packets/index.js';
|
||||
} from '@/util/constants.js';
|
||||
import Script from '@/util/script.js';
|
||||
|
||||
import createEcs from './create/ecs.js';
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import {CLIENT_LATENCY} from '@/constants.js';
|
||||
import {CLIENT_LATENCY} from '@/util/constants.js';
|
||||
|
||||
export default class Client {
|
||||
constructor() {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import {CLIENT_PREDICTION} from '@/constants.js';
|
||||
import {encode} from '@/packets/index.js';
|
||||
import {CLIENT_PREDICTION} from '@/util/constants.js';
|
||||
|
||||
import Client from './client.js';
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import {SERVER_LATENCY} from '@/constants.js';
|
||||
import {SERVER_LATENCY} from '@/util/constants.js';
|
||||
|
||||
export default class Server {
|
||||
constructor() {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import {memo, useEffect, useState} from 'react';
|
||||
|
||||
import {render} from '@/dialogue.js';
|
||||
import {useRadians} from '@/react/context/radians.js';
|
||||
import {render} from '@/util/dialogue.js';
|
||||
|
||||
import styles from './message.module.css';
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import {useEffect, useMemo, useRef, useState} from 'react';
|
||||
|
||||
import {RESOLUTION} from '@/constants.js';
|
||||
import {render} from '@/dialogue.js';
|
||||
import {useDomScale} from '@/react/context/dom-scale.js';
|
||||
import {useRadians} from '@/react/context/radians.js';
|
||||
import {RESOLUTION} from '@/util/constants.js';
|
||||
import {render} from '@/util/dialogue.js';
|
||||
|
||||
import styles from './dialogue.module.css';
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import {useEffect, useRef, useState} from 'react';
|
||||
|
||||
import {RESOLUTION} from '@/constants.js';
|
||||
import DomContext from '@/react/context/dom-scale.js';
|
||||
import {RESOLUTION} from '@/util/constants.js';
|
||||
|
||||
import styles from './dom.module.css';
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import {useState} from 'react';
|
||||
|
||||
import {parseLetters} from '@/dialogue.js';
|
||||
import {usePacket} from '@/react/context/client.js';
|
||||
import {useEcs, useEcsTick} from '@/react/context/ecs.js';
|
||||
import {parseLetters} from '@/util/dialogue.js';
|
||||
|
||||
import Entity from './entity.jsx';
|
||||
|
||||
|
|
|
@ -3,13 +3,13 @@ import {BaseTexture, extensions} from '@pixi/core';
|
|||
import {Stage as PixiStage} from '@pixi/react';
|
||||
import {createElement, useContext} from 'react';
|
||||
|
||||
import {RESOLUTION} from '@/constants.js';
|
||||
import AssetsContext from '@/react/context/assets.js';
|
||||
import ClientContext from '@/react/context/client.js';
|
||||
import DebugContext from '@/react/context/debug.js';
|
||||
import EcsContext from '@/react/context/ecs.js';
|
||||
import MainEntityContext from '@/react/context/main-entity.js';
|
||||
import RadiansContext from '@/react/context/radians.js';
|
||||
import {RESOLUTION} from '@/util/constants.js';
|
||||
|
||||
import Ecs from './ecs.jsx';
|
||||
import {ApplicationStageLayers, ApplicationStageLights} from './extensions.js';
|
||||
|
|
|
@ -5,8 +5,8 @@ import {Sprite} from '@pixi/sprite';
|
|||
import '@pixi/spritesheet'; // NECESSARY!
|
||||
import {CompositeTilemap} from '@pixi/tilemap';
|
||||
|
||||
import {CHUNK_SIZE} from '@/constants.js';
|
||||
import {useAsset} from '@/react/context/assets.js';
|
||||
import {CHUNK_SIZE} from '@/util/constants.js';
|
||||
|
||||
import {deferredLighting} from './lights.js';
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import {memo, useEffect, useRef, useState} from 'react';
|
||||
|
||||
import {RESOLUTION} from '@/constants.js';
|
||||
import {useClient, usePacket} from '@/react/context/client.js';
|
||||
import {useDebug} from '@/react/context/debug.js';
|
||||
import {useEcs, useEcsTick} from '@/react/context/ecs.js';
|
||||
import {useMainEntity} from '@/react/context/main-entity.js';
|
||||
import {RESOLUTION} from '@/util/constants.js';
|
||||
|
||||
import addKeyListener from './add-key-listener.js';
|
||||
import ClientEcs from './client-ecs.js';
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import {useEffect, useRef, useState} from 'react';
|
||||
|
||||
import Dom from '@/react/components/dom.jsx';
|
||||
import {RESOLUTION} from '@/constants.js';
|
||||
import {RESOLUTION} from '@/util/constants.js';
|
||||
|
||||
function Decorator({children, style}) {
|
||||
const ref = useRef();
|
||||
|
|
Loading…
Reference in New Issue
Block a user