upd:: delete once

This commit is contained in:
moxitech 2024-10-20 05:42:00 +07:00
parent f2cedef6ae
commit 4871f9e5b9
18 changed files with 474456 additions and 31 deletions

3
.gitignore vendored
View File

@ -1,2 +1,3 @@
*.env
*/*/node_modules
*/*/node_modules
*/*/.next/

View File

@ -1,4 +1,13 @@
```
____________________________ _____________________________________ ___
___ __ \__ __ \_ __ \__ | / /__ ____/__ __/_ ___/___ _/__ |/ /
__ / / /_ /_/ / / / /_ |/ /__ __/ __ / _____ \ __ / __ /|_/ /
_ /_/ /_ _, _// /_/ /_ /| / _ /___ _ / ____/ /__/ / _ / / /
/_____/ /_/ |_| \____/ /_/ |_/ /_____/ /_/ /____/ /___/ /_/ /_/
```
SOCKET MESSAGING:
// PORT CHANGE IN .env

View File

@ -1,10 +0,0 @@
NCOLS 10801
NROWS 5401
XLLCENTER -180.00000
YLLCENTER -90.00000
CELLSIZE 0.03333333333
NODATA_VALUE 999999
BYTEORDER LSBFIRST
NUMBERTYPE 4_BYTE_FLOAT
MIN_VALUE -10722.0
MAX_VALUE 8046.0

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,2 @@
# Blender 4.2.3 LTS MTL File: 'None'
# www.blender.org

474394
src/frontend/public/map/map.obj Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,8 +0,0 @@
import { render, screen } from '@testing-library/react';
import App from './App';
test('renders learn react link', () => {
render(<App />);
const linkElement = screen.getByText(/learn react/i);
expect(linkElement).toBeInTheDocument();
});

View File

@ -163,7 +163,16 @@ const Dashboard = () => {
const light = new THREE.DirectionalLight(0xffffff, 1);
light.position.set(0, 50, 50).normalize();
scene.add(light);
// Функция для обновления размеров при изменении размеров окна
const handleResize = () => {
const newWidth = mountRef.current.clientWidth;
const newHeight = mountRef.current.clientHeight;
camera.aspect = newWidth / newHeight;
camera.updateProjectionMatrix();
renderer.setSize(newWidth, newHeight);
};
// Добавляем обработчик события resize
const handleMouseMove = (event) => {
let x = event.x;
let y = event.y;
@ -174,7 +183,7 @@ const Dashboard = () => {
controls.update();
renderer.render(scene, camera);
};
window.addEventListener('resize', handleResize);
renderer.domElement.addEventListener('click', handleClick);
renderer.domElement.addEventListener('mousemove', handleMouseMove);
@ -197,6 +206,8 @@ const Dashboard = () => {
});
return () => {
if (mountRef.current) {
window.removeEventListener('resize', handleResize)
mountRef.current.removeChild(renderer.domElement);
}
};

View File

@ -2,7 +2,18 @@
export const ProgramInterface = ({mouseState, mountRef, openModal, sendMessage, RunSimulatorSignal, getCustomCookie}) => {
return (
const handleFullScreen = () => {
if (mountRef.current) {
if (mountRef.current.requestFullscreen) {
mountRef.current.requestFullscreen();
} else if (mountRef.current.webkitRequestFullscreen) { // для Safari
mountRef.current.webkitRequestFullscreen();
} else if (mountRef.current.msRequestFullscreen) { // для IE/Edge
mountRef.current.msRequestFullscreen();
}
}
};
return (
<div className='coler-border'>
<div>
<p> X: {mouseState.x} Y: {mouseState.y} Z: {mouseState.z}</p>
@ -14,7 +25,9 @@ export const ProgramInterface = ({mouseState, mountRef, openModal, sendMessage,
}} />
<div class="btn-toolbar" role="toolbar" aria-label="Toolbar with button groups">
<div class="btn-group me-2" role="group" aria-label="First group">
<button type="button" onClick={handleFullScreen}>
<i class="bi-fullscreen"/>Развернуть на весь экран
</button>
<button type="button" onClick={() => openModal('isModalAddOpen')} class="btn btn-success">
<i class="bi-plus"/>Добавить
</button>

View File

@ -35,7 +35,7 @@ export const SimulatorInterface = ({ mouseState, sendMessage, RunSimulatorSignal
sendMessage(RunSimulatorSignal(getCustomCookie("userToken")));
}
};
const getSimulationState = (timeValue) => {
// Здесь должна быть логика получения состояния симуляции на основе времени
// Например, используйте временную шкалу и объекты, чтобы получить правильное состояние
@ -47,12 +47,17 @@ export const SimulatorInterface = ({ mouseState, sendMessage, RunSimulatorSignal
<div>
<p> X: {mouseState.x} Y: {mouseState.y} Z: {mouseState.z}</p>
</div>
<div ref={mountRef} style={{
minWidth: '100%',
minHeight: '60vh',
position: 'relative'
}} />
<div
ref={mountRef}
style={{
minWidth: '100%',
minHeight: '60vh',
position: 'relative',
}}
/>
<div style={{ display: 'flex', alignItems: 'center', margin: '20px 0' }}>
<button onClick={handlePlayPause} style={{
backgroundColor: '#007bff',
color: 'white',

View File

@ -1,6 +1,7 @@
package main
import (
"fmt"
"moxitech/dns/internal/database"
"moxitech/dns/internal/server"
@ -80,7 +81,7 @@ func main() {
// RANDOM_STRING_TEST
// fmt.Println(randomizer.GenerateRandomString())
FlushLogo()
D_EXPORT_VARS()
err := database.NewDBConnection()
if err != nil {
@ -96,3 +97,12 @@ func main() {
func D_EXPORT_VARS() {
os.Setenv("SERVER_BASE_ADDRESS", "0.0.0.0:8080")
}
func FlushLogo() {
fmt.Println("_____________________________ _____________________________________ ___")
fmt.Println("____ __ \\__ __ \\_ __ \\__ | / /__ ____/__ __/_ ___/___ _/__ |/ /")
fmt.Println("___ / / /_ /_/ / / / /_ |/ /__ __/ __ / _____ \\ __ / __ /|_/ /")
fmt.Println("__ /_/ /_ _, _// /_/ /_ /| / _ /___ _ / ____/ /__/ / _ / / /")
fmt.Println("./_____/ /_/ |_| \\____/ /_/ |_/ /_____/ /_/ /____/ /___/ /_/ /_/")
}

View File

@ -1 +0,0 @@
package dto

View File

@ -1 +0,0 @@
package dto