Remove old docs

This commit is contained in:
Alexander Popov 2024-01-09 18:52:36 +03:00
parent 1a3ce1fe97
commit 5bcabc9e73
Signed by: iiiypuk
GPG Key ID: E47FE0AB36CD5ED6
21 changed files with 1 additions and 322 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
dist/
test/

View File

View File

@ -1,5 +0,0 @@
# ⚠️ IN DEVELOPMENT
## 🧻 Documentation
- [API](us/api.md)

View File

@ -1,2 +0,0 @@
- 🇷🇺 [Russian](/ru/)
- 🇺🇸 [English](/)

View File

@ -1 +0,0 @@
../../test/icons/apple-touch-icon.png

View File

@ -1,47 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>ujs</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="description" content="Description">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify@4/lib/themes/vue.css">
</head>
<body>
<div id="app"></div>
<script>
window.$docsify = {
name: 'ujs',
repo: 'https://git.a2s.su/emilecok/ujs',
logo: '/assets/icon.png',
nativeEmoji: true,
loadNavbar: true,
nameLink: {
'/ru/': '#/ru/',
'/': '#/',
},
alias: {
'/ru/(.*)': '/ru/$1',
},
search: {
noData: {
'/ru/': 'Нет результатов!',
'/': 'No results!',
},
paths: 'auto',
placeholder: {
'/ru/': 'Поиск',
'/': 'Search',
},
pathNamespaces: ['/ru'],
},
}
</script>
<!-- Docsify v4 -->
<script src="//cdn.jsdelivr.net/npm/docsify@4"></script>
<script src="//cdn.jsdelivr.net/npm/docsify@4/lib/plugins/search.min.js"></script>
</body>
</html>

View File

@ -1,5 +0,0 @@
# ⚠️ В РАЗРАБОТКЕ
## 🧻 Документация
- [API](/ru/api.md)

View File

@ -1,150 +0,0 @@
# 🔵 App
Основной класс движка.
При инициализации самостоятельно добавляет HTML элемент `<canvas>`
в тег `<body>`.
## 🎛️ Параметры
- `w` — ширина холста в пикселях.
- `h` — высота холста в пикселях.
- `options` — объект опций.
### options
```text
{
backgroundColor: '#ffcc68',
welcome: true,
}
```
- `backgroundColor` — фон холста.
По умолчанию `#ffcc68`.
- `welcome``bool` тип.
Отображает информацию о движке в **Console**.
По умолчанию `true`.
## 🩻 Методы
...
## 🎮 Пример использования
```javascript
// init app
let app = new App(400, 400);
// add app view in document
window.addEventListener('DOMContentLoaded', () => {
document.body.appendChild(app.view);
});
```
# 🔵 Scene
Класс сцены.
## 🎛️ Параметры
...
## 🩻 Методы
...
## 🎮 Пример использования
```text
...
```
# 🔵 SceneLayer
Класс слоя сцены.
## 🎛️ Параметры
...
## 🩻 Методы
...
## 🎮 Пример использования
```text
...
```
# 🔵 Object
Класс объекта.
## 🎛️ Параметры
...
## 🎮 Пример использования
```text
...
```
# 🔵 Rect
...
## 🎛️ Параметры
...
## 🎮 Пример использования
```text
...
```
# 🔵 StrokeRect
...
## 🎛️ Параметры
...
## 🎮 Пример использования
```text
...
```
# 🔵 Sprite
...
## 🎛️ Параметры
...
## 🎮 Пример использования
```text
...
```
# 🔵 TiledSprite
...
## 🎛️ Параметры
...
## 🎮 Пример использования
```text
...
```

View File

@ -1 +0,0 @@
`contribute`

3
test/.gitignore vendored
View File

@ -1,3 +0,0 @@
fonts/monogram*
assets/
js/game.js

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 766 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -1,16 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>ujs</title>
<link rel="stylesheet" type="text/css" href="styles.css">
<link rel="apple-touch-icon" sizes="180x180" href="/icons/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/icons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/icons/favicon-16x16.png">
<link rel="manifest" href="/site.webmanifest">
<script src="./js/game.js" type="module"></script>
</head>
<body>
</body>
</html>

View File

@ -1 +0,0 @@
../../dist/engine-beeeeeeta.js

View File

@ -1,60 +0,0 @@
import { App, Scene, SceneLayer, Rect, StrokeRect, Sprite } from './engine.js';
// init player
let Player = {
x: 400 / 2 - 5,
y: 400 / 2 - 5,
rect: null,
};
Player.rect = new Rect(Player.x, Player.y, 10, 10, 'black');
Player.rect.ticker = () => {
Player.rect.y = Player.y;
Player.rect.x = Player.x;
};
// init scene layers
let layerBg = new SceneLayer('background', [
new Rect(50, 50, 100, 100, 'red'),
new StrokeRect(150, 150, 40, 40, 'green', 'blue', 1),
]);
let layerHud = new SceneLayer('hud', [
new Sprite('/assets/compass.png', 15, 15),
new Sprite('/assets/compass-arrow.png', 27, 21),
]);
let layerInstances = new SceneLayer('Instances', [Player.rect], { debug: true });
// init app
let app = new App(400, 400);
// init scene
let firstScene = new Scene(app.canvas, app.context, 400, 400);
firstScene.addLayer(layerBg);
firstScene.addLayer(layerInstances);
firstScene.addLayer(layerHud);
app.scene = firstScene;
// add app view in document
window.addEventListener('DOMContentLoaded', () => {
document.body.appendChild(app.view);
});
// player key press listener
document.addEventListener('keydown', (e) => {
switch (e.code) {
case 'ArrowUp':
Player.y -= 1;
break;
case 'ArrowDown':
Player.y += 1;
break;
case 'ArrowLeft':
Player.x -= 1;
break;
case 'ArrowRight':
Player.x += 1;
break;
}
});

View File

@ -1,11 +0,0 @@
{
"name": "",
"short_name": "",
"icons": [
{ "src": "/icons/android-chrome-192x192.png", "sizes": "192x192", "type": "image/png" },
{ "src": "/icons/android-chrome-512x512.png", "sizes": "512x512", "type": "image/png" }
],
"theme_color": "#ffffff",
"background_color": "#ffffff",
"display": "standalone"
}

View File

@ -1,20 +0,0 @@
@font-face {
font-family: 'Monogram';
src: url('/fonts/monogramextended.woff2') format('woff2'),
url('/fonts/monogramextended.woff') format('woff'),
url('/fonts/monogramextended.ttf') format('truetype');
font-weight: 500;
font-style: normal;
font-display: swap;
}
body {
display: flex;
gap: 8px;
justify-content: center;
}
canvas {
image-rendering: crisp-edges;
image-rendering: pixelated;
}