diff --git a/.gitignore b/.gitignore index 849ddff..47c8315 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ dist/ +test/ diff --git a/docs/.nojekyll b/docs/.nojekyll deleted file mode 100644 index e69de29..0000000 diff --git a/docs/README.md b/docs/README.md deleted file mode 100644 index fd47ec2..0000000 --- a/docs/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# ⚠️ IN DEVELOPMENT - -## 🧻 Documentation - -- [API](us/api.md) diff --git a/docs/_navbar.md b/docs/_navbar.md deleted file mode 100644 index 0475f2f..0000000 --- a/docs/_navbar.md +++ /dev/null @@ -1,2 +0,0 @@ -- 🇷🇺 [Russian](/ru/) -- 🇺🇸 [English](/) diff --git a/docs/assets/icon.png b/docs/assets/icon.png deleted file mode 120000 index 0cf09e4..0000000 --- a/docs/assets/icon.png +++ /dev/null @@ -1 +0,0 @@ -../../test/icons/apple-touch-icon.png \ No newline at end of file diff --git a/docs/index.html b/docs/index.html deleted file mode 100644 index d62b33a..0000000 --- a/docs/index.html +++ /dev/null @@ -1,47 +0,0 @@ - - - - - ujs - - - - - - -
- - - - - - - - diff --git a/docs/ru/README.md b/docs/ru/README.md deleted file mode 100644 index 6d9bc0d..0000000 --- a/docs/ru/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# ⚠️ В РАЗРАБОТКЕ - -## 🧻 Документация - -- [API](/ru/api.md) diff --git a/docs/ru/api.md b/docs/ru/api.md deleted file mode 100644 index 53403e1..0000000 --- a/docs/ru/api.md +++ /dev/null @@ -1,150 +0,0 @@ -# 🔵 App - -Основной класс движка. - -При инициализации самостоятельно добавляет HTML элемент `` -в тег ``. - -## 🎛️ Параметры - -- `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 -... -``` diff --git a/docs/us/api.md b/docs/us/api.md deleted file mode 100644 index 321711c..0000000 --- a/docs/us/api.md +++ /dev/null @@ -1 +0,0 @@ -`contribute` diff --git a/test/.gitignore b/test/.gitignore deleted file mode 100644 index 22a18a8..0000000 --- a/test/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -fonts/monogram* -assets/ -js/game.js diff --git a/test/favicon.ico b/test/favicon.ico deleted file mode 100644 index 045a3c9..0000000 Binary files a/test/favicon.ico and /dev/null differ diff --git a/test/icons/android-chrome-192x192.png b/test/icons/android-chrome-192x192.png deleted file mode 100644 index 3053b95..0000000 Binary files a/test/icons/android-chrome-192x192.png and /dev/null differ diff --git a/test/icons/android-chrome-512x512.png b/test/icons/android-chrome-512x512.png deleted file mode 100644 index d8fe3e8..0000000 Binary files a/test/icons/android-chrome-512x512.png and /dev/null differ diff --git a/test/icons/apple-touch-icon.png b/test/icons/apple-touch-icon.png deleted file mode 100644 index e6ec71c..0000000 Binary files a/test/icons/apple-touch-icon.png and /dev/null differ diff --git a/test/icons/favicon-16x16.png b/test/icons/favicon-16x16.png deleted file mode 100644 index 3ad9768..0000000 Binary files a/test/icons/favicon-16x16.png and /dev/null differ diff --git a/test/icons/favicon-32x32.png b/test/icons/favicon-32x32.png deleted file mode 100644 index 6e950fb..0000000 Binary files a/test/icons/favicon-32x32.png and /dev/null differ diff --git a/test/index.html b/test/index.html deleted file mode 100644 index 9570615..0000000 --- a/test/index.html +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - ujs - - - - - - - - - - diff --git a/test/js/engine.js b/test/js/engine.js deleted file mode 120000 index 87456fd..0000000 --- a/test/js/engine.js +++ /dev/null @@ -1 +0,0 @@ -../../dist/engine-beeeeeeta.js \ No newline at end of file diff --git a/test/js/game.example.js b/test/js/game.example.js deleted file mode 100644 index af2adfc..0000000 --- a/test/js/game.example.js +++ /dev/null @@ -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; - } -}); diff --git a/test/site.webmanifest b/test/site.webmanifest deleted file mode 100644 index d17b996..0000000 --- a/test/site.webmanifest +++ /dev/null @@ -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" -} diff --git a/test/styles.css b/test/styles.css deleted file mode 100644 index 44972d7..0000000 --- a/test/styles.css +++ /dev/null @@ -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; -}