Compare commits

..

113 commits
api ... master

Author SHA1 Message Date
David Hain
c1a32c1a30
fix: README 2024-01-26 14:41:37 +01:00
David Hain
adc971f587
Update docker-compose.yml 2023-02-07 09:10:31 +01:00
Stefan Prechtl
28a3c48cdb
Update README.md 2023-02-05 22:48:26 +01:00
7e2ac3f488 Merge 2023-02-01 19:00:46 +01:00
6c80829a0b Merge remote-tracking branch 'origin/develop' into develop 2023-01-31 10:12:33 +01:00
41223dd786 README.md updated. 2023-01-31 10:12:22 +01:00
dhain
e06ffa51a3 Merge remote-tracking branch 'origin/develop' into develop 2023-01-31 08:52:37 +01:00
dhain
5dfbc6d39c User Scores at the top of the page are not displayed anymore after logout 2023-01-31 08:52:30 +01:00
ad117b4d2c Dockerized frontend 2023-01-31 08:37:02 +01:00
dhain
f4eeb11c68 Merge remote-tracking branch 'origin/develop' into develop
# Conflicts:
#	frontend/src/components/Login.vue
2023-01-31 08:35:03 +01:00
dhain
c2bb6c104a Fixed game sending player stats when not logged in 2023-01-31 08:31:40 +01:00
6a0e200905 Login input css improved, this.user removed since it was unnecessary 2023-01-24 11:33:13 +01:00
2ce3ed9cd7 Fixed leaderboard next when users dividable by pagesize 2023-01-24 10:54:17 +01:00
438184f759 Fixed leaderboard next when users dividable by pagesize 2023-01-24 10:53:09 +01:00
6a94e967e1 leaderboard better 2023-01-24 10:38:12 +01:00
dhain
3befee6fdd removed p5_loading div
(display: none and no remove)
2023-01-24 09:31:13 +01:00
j-weissen
dc3c2e0982 Merge branch 'logout-button' into develop 2023-01-24 09:23:44 +01:00
j-weissen
ec6d2201eb added logout button 2023-01-24 09:23:12 +01:00
4c7875aa0d woke worke 2023-01-24 08:29:32 +01:00
7c4ccfd12c some leaderboard 2023-01-24 08:14:38 +01:00
cb60e3d1ff tried to fix leaderboard 2023-01-21 11:46:05 +01:00
5298d2a169 score display fixed again 2023-01-21 10:39:21 +01:00
03facecc58 score display fixed again 2023-01-21 10:22:35 +01:00
edead5a412 score display fixed 2023-01-21 09:56:37 +01:00
3e8b9e141d oisgeht 2023-01-21 09:37:21 +01:00
3b034edc52 Do funktionierts scho 2023-01-21 09:23:40 +01:00
da018a5c73 Local storage working 2023-01-21 08:52:32 +01:00
David Hain
4c33b827c3
jojo 2023-01-21 08:10:09 +01:00
e02555234f Merged changes 2023-01-21 08:03:01 +01:00
j-weissen
269faca609 minor changes 2023-01-20 15:52:47 +01:00
c052d08e0e RestURL static const 2023-01-20 15:34:36 +01:00
David Hain
8a538bb85f
Add files via upload 2023-01-20 15:16:25 +01:00
a0ab1b7f56 LocalStorageListener 2023-01-20 15:04:51 +01:00
j-weissen
b6ad404555 Merge remote-tracking branch 'origin/develop' into develop 2023-01-20 14:43:41 +01:00
j-weissen
6fe71383b3 renamed Button.vue 2023-01-20 14:43:05 +01:00
David Hain
fe1375124b
updated game.js with scaling & localstorage
- everything scaling now
- game-score, game-isRunning and game-playTime now saving in localstorage on game start and end
2023-01-20 14:37:05 +01:00
j-weissen
030189aa52 Merge branch 'leaderboard-pagination' into develop
# Conflicts:
#	frontend/package-lock.json
2023-01-20 14:01:41 +01:00
j-weissen
91fd54a97f Merge branch 'frontend' into leaderboard-pagination
# Conflicts:
#	frontend/game/tsconfig.json
#	frontend/package-lock.json
#	frontend/package.json
#	frontend/public/index.html
#	frontend/src/App.vue
#	frontend/src/components/Game.vue
#	frontend/src/components/Leaderboard.vue
2023-01-20 14:01:10 +01:00
j-weissen
1ed1189bec done 2023-01-20 13:57:26 +01:00
David Hain
00b1f6a8e2
Create game.js 2023-01-20 13:31:58 +01:00
j-weissen
fd235b56c6 backend pagination done 2023-01-20 13:20:51 +01:00
j-weissen
e8079f760a frontend pagination done 2023-01-20 08:15:07 +01:00
0135654a1e Fixed small issue 2023-01-18 13:01:00 +01:00
c52f6018a6 User Login finished 2023-01-18 11:35:38 +01:00
j-weissen
4f936aaa42 Merge remote-tracking branch 'origin/develop' into develop 2023-01-17 08:13:19 +01:00
j-weissen
10508ded4b added Vue 2023-01-12 12:24:38 +01:00
j-weissen
2d7ab30ec6 added Vue 2023-01-12 12:14:59 +01:00
c9d06a2248 qol changes to the numbers of game 2023-01-12 11:05:36 +01:00
d93a5fd6a1 qol changes to the numbers of game 2023-01-12 10:25:42 +01:00
f1318e4b11 move docs 2023-01-11 12:32:13 +01:00
57d442bf0e revert comment 2023-01-11 12:30:52 +01:00
e70448cb6a test docs 2023-01-11 12:30:08 +01:00
7f83b5eca9 font working 2023-01-11 08:06:29 +01:00
2a440e09e0 bissl mini refactor 2023-01-11 07:52:41 +01:00
b88b364343 update frontend class diagram 2023-01-11 07:45:02 +01:00
s-prechtl
e4d7935d27 refactor game.ts 2023-01-10 22:50:48 +01:00
s-prechtl
8b86437e06 comments, comments, comments, refactor, refactor, refactor 2023-01-10 22:42:41 +01:00
ff3c31f077 Merge remote-tracking branch 'origin/develop' into develop 2023-01-10 21:57:57 +01:00
52d1e2b5a5 more refactoring even more comments 2023-01-10 21:57:09 +01:00
David Hain
8cfb258f24
Create README.md 2023-01-10 11:33:35 +01:00
David Hain
b963623c58
des is scho geil (JetBrains UML JavaScript and Typescript Plugin) 2023-01-10 11:20:51 +01:00
dhain
5f517c1a47 score resets after first jump 2023-01-10 10:35:52 +01:00
6927ba9e85 Fixed game 2023-01-10 10:34:53 +01:00
dhain
98dd3720ae fixed merge 2023-01-10 09:42:20 +01:00
dhain
171844013c Merge remote-tracking branch 'origin/develop' into develop
# Conflicts:
#	frontend/model/Obstacle.ts
2023-01-10 09:41:03 +01:00
fbe6318cdd Merge remote-tracking branch 'origin/develop' into develop 2023-01-10 09:39:54 +01:00
1bb33d6fb1 More refactor more comments 2023-01-10 09:39:34 +01:00
j-weissen
6cedad79f2 Merge branch 'backend' into develop 2023-01-10 09:39:24 +01:00
j-weissen
53f5a2f820 refactor 2023-01-10 09:38:44 +01:00
dhain
8d4e0ec3f1 Merge remote-tracking branch 'origin/develop' into develop
# Conflicts:
#	frontend/model/Obstacle.ts
2023-01-10 09:38:38 +01:00
dhain
d98cd7b10e Refactor & Bug Fix
`game.ts`
 - fixed score on new game

`Obstacle.ts`
 - made distanceBetweenPipes and startX public
 - moved initialization of distanceBetweenPipes and startX to game.setupGame()

`Pipe.ts`
 - created move() method to move the pipe

 `Raspberry.ts`
  - added constant variables for Raspberry size
2023-01-10 09:37:12 +01:00
a20abff918 refactor + comments 2023-01-10 09:32:19 +01:00
dhain
a16f1203ff added PressStart2P-Regular.ttf font
const rename and obstacle for-loop refactor
2023-01-10 09:09:06 +01:00
637a867c7e Code review 2023-01-10 2023-01-10 08:45:34 +01:00
d748312d66 Merge branch 'models' into develop 2023-01-10 08:11:45 +01:00
j-weissen
b477cad232 Merge branch 'backend' into develop 2023-01-10 08:09:47 +01:00
j-weissen
089030a2d3 added cors package, removed model Time.ts 2023-01-06 14:01:06 +01:00
dhain
6c459c1581 Commented everything except some Methods in Raspberry.ts 2022-12-20 09:40:21 +01:00
dhain
fafbfa1b32 Merge remote-tracking branch 'origin/models' into models 2022-12-20 08:12:43 +01:00
13850368c6 Rotation for raspi working 2022-12-14 12:45:01 +01:00
00cc924a2a pipe gen working 2022-12-14 12:24:45 +01:00
dhain
e3ce189023 added text font
added text color for score
2022-12-13 11:36:12 +01:00
f57f2b0153 escape = toggle 2022-12-13 11:17:09 +01:00
94b9c56f8c remove raspberry hitbox 2022-12-13 10:57:04 +01:00
f1bc1780ef Pause 2022-12-13 10:56:05 +01:00
db9fdf5932 game loop 2022-12-13 10:40:47 +01:00
e0e7f5bb60 push pop 2022-12-13 10:36:52 +01:00
a464da424a collision workey 2022-12-13 10:35:00 +01:00
dhain
a8681c0eb4 Merge remote-tracking branch 'origin/models' into models
# Conflicts:
#	frontend/game.ts
2022-12-13 10:04:44 +01:00
dhain
4219704649 moved obstacle Reset Cheking into a function 2022-12-13 10:04:16 +01:00
cb7d02896c KEy input pt 2 2022-12-13 09:46:18 +01:00
2e1e4c3ce9 Merge remote-tracking branch 'origin/models' into models 2022-12-13 09:41:39 +01:00
ce48419a40 Collision for obstacles 2022-12-13 09:41:30 +01:00
dhain
d0724e668a Merge remote-tracking branch 'origin/models' into models
# Conflicts:
#	frontend/game.ts
2022-12-13 09:30:29 +01:00
dhain
ad50d14f8a improved Obstacle constructor 2022-12-13 09:28:57 +01:00
7dd557f968 raspberry flies 2022-12-13 09:24:33 +01:00
dbff8cfb56 reformatted 2022-12-13 08:39:17 +01:00
eff60389d4 removed "module": "ES2020", 2022-12-13 08:36:05 +01:00
7d84f51d91 code review 2022-12-13 08:33:37 +01:00
dhain
ba2d9f17e1 raspberry now has an image 2022-12-06 13:48:47 +01:00
dhain
d43cfbe9e7 added images
pipes and background now have images
2022-12-06 11:33:45 +01:00
dhain
f272d3a44f Formatted files, added types and updated class diagram 2022-12-06 10:36:14 +01:00
dhain
4d22976621 multiple obstacles spawning 2022-12-06 10:22:19 +01:00
dhain
8e19fb7cfb random pipe position working 2022-12-06 09:45:43 +01:00
s-prechtl
4a40175884 raspberry 2022-11-29 13:18:19 +01:00
dhain
43390fe7ce wosn do los 2022-11-29 11:39:32 +01:00
dhain
04ef8a872d Merge remote-tracking branch 'origin/models' into models 2022-11-29 11:21:51 +01:00
dhain
123f73ff49 added Obstacle.ts
* resetPosition maby done
 * update done ig
2022-11-29 11:21:45 +01:00
s-prechtl
6ca169fef8 Began to implement more models 2022-11-29 11:20:01 +01:00
dhain
59523f4a41 added Position model 2022-11-29 10:53:23 +01:00
s-prechtl
c35a12134e Entity model 2022-11-29 10:52:45 +01:00
s-prechtl
3aa7f2febd Class diagram 2022-11-29 10:41:33 +01:00
s-prechtl
5cc101db40 p5 working 2022-11-29 10:11:11 +01:00
83 changed files with 22453 additions and 368 deletions

View file

@ -1,5 +1,6 @@
POSTGRES_PORT=5432
EXPRESS_PORT=3000
FRONTEND_PORT=8080
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres

View file

@ -4,5 +4,7 @@
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="p5.js" level="application" />
<orderEntry type="library" name="p5.js" level="application" />
</component>
</module>

30
README.md Normal file
View file

@ -0,0 +1,30 @@
# RaspberryRocketeer
## How to run
### Copy .env
First you need to copy the `.env.example`.
```shell
cp .env.example .env
```
<small>Note: It is recommended to change the values for the database user.</small>
### Install node packages
Go into the frontend folder using
```shell
cd frontend
```
and run:
```shell
npm install
```
### Start the container (in the project root)
```shell
docker compose up --build
```
You can then access the website on `localhost:8080`

View file

@ -9,6 +9,7 @@
"version": "1.0.0",
"license": "ISC",
"dependencies": {
"cors": "^2.8.5",
"express": "^4.18.2",
"express-validator": "^6.14.2",
"helmet": "^6.0.1",
@ -308,6 +309,18 @@
"resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
"integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ=="
},
"node_modules/cors": {
"version": "2.8.5",
"resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz",
"integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==",
"dependencies": {
"object-assign": "^4",
"vary": "^1"
},
"engines": {
"node": ">= 0.10"
}
},
"node_modules/create-require": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz",
@ -645,6 +658,14 @@
"node": ">= 0.6"
}
},
"node_modules/object-assign": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
"integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/object-inspect": {
"version": "1.12.2",
"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz",
@ -1347,6 +1368,15 @@
"resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
"integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ=="
},
"cors": {
"version": "2.8.5",
"resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz",
"integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==",
"requires": {
"object-assign": "^4",
"vary": "^1"
}
},
"create-require": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz",
@ -1604,6 +1634,11 @@
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz",
"integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg=="
},
"object-assign": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
"integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg=="
},
"object-inspect": {
"version": "1.12.2",
"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz",

View file

@ -11,6 +11,7 @@
"author": "jweissen",
"license": "ISC",
"dependencies": {
"cors": "^2.8.5",
"express": "^4.18.2",
"express-validator": "^6.14.2",
"helmet": "^6.0.1",

View file

@ -1,15 +1,18 @@
import express from 'express';
import helmet from "helmet";
import morgan from 'morgan';
import cors from 'cors';
import {leaderboardRoute} from "./leaderboardRoute.js";
import {userRoute} from "./userRoute.js";
import {gameRoute} from "./gameRoute.js";
// initialize express
const app = express()
const port = 3000
// use needed middlewares
app.use(helmet())
app.use(cors())
// configure & use logger
let morganFormatted = morgan('[:date[iso]] :method :url - :status')

View file

@ -2,34 +2,37 @@ import express from "express";
import {GameRepository} from "./repositories/GameRepository.js";
import {GamePgPromiseRepository} from "./repositories/pgPromise/GamePgPromiseRepository.js";
import {Game} from "./model/Game.js";
import {body, CustomValidator, validationResult} from "express-validator";
import {UserRepository} from "./repositories/UserRepository.js";
import {UserPgPromiseRepository} from "./repositories/pgPromise/UserPgPromiseRepository.js";
import {body, validationResult} from "express-validator";
import {TIME_VALIDATION_REGEX, userWithIdExists} from "./validators.js";
export const gameRoute = express.Router()
gameRoute.use(express.json())
const userWithIdExists: CustomValidator = userId => {
try {
const userRepo: UserRepository = new UserPgPromiseRepository;
return userRepo.withIdExists(userId).then(exists => {
if (!exists) return Promise.reject("User does not exist");
});
} catch (error) {
console.log(error);
}
}
/**
* Test
*/
gameRoute.post(
'/add',
body('playtime')
.matches("([0-5]\\d:)?[0-5]\\d:[0-5]\\d"),
.matches(TIME_VALIDATION_REGEX),
body('date')
.isDate(),
body('userId')
.isInt({min: 1})
.custom(userWithIdExists),
body('score')
.isInt({min: 0}),
/**
* After processing the errors of express-validator, inserts the game into the DB
* @param req
* body {
* playtime: string,
* date: Date,
* userId: int
* }
* @param res json: Game
*/
async (req, res) => {
try {
//region validate parameters

View file

@ -1,4 +1,5 @@
import express from 'express';
import {query, validationResult} from 'express-validator';
import {TimeLeaderboardRepository} from "./repositories/TimeLeaderboardRepository.js";
import {TimeLeaderboardPgPromiseRepository} from "./repositories/pgPromise/TimeLeaderboardPgPromiseRepository.js";
import {HighscoreLeaderboardPgPromiseRepository} from "./repositories/pgPromise/HighscoreLeaderboardPgPromiseRepository.js";
@ -7,10 +8,32 @@ import {HighscoreLeaderboard, TimeLeaderboard} from "./model/Leaderboard.js";
export const leaderboardRoute = express.Router()
leaderboardRoute.get('/highscore', async (req, res) => {
leaderboardRoute.get('/highscore',
query('pagination').toBoolean(),
query('entriesPerPage').optional().isInt({min: 1}).toInt(),
query('page').optional().isInt({min: 0}).toInt(),
/**
* Returns the highscore leaderboard as JSON response, fetched from DB
* @param req
* @param res json: HighscoreLeaderboard
*/
async (req, res) => {
try {
const highscoreLeaderboardManager: HighscoreLeaderboardRepository = new HighscoreLeaderboardPgPromiseRepository;
const highscoreLeaderboard: HighscoreLeaderboard = await highscoreLeaderboardManager.getAll();
//region validate parameters
const errors = validationResult(req);
if (!errors.isEmpty()) {
return res.status(400).json({ errors: errors.array() });
}
//endregion
const highscoreLeaderboardRepo: HighscoreLeaderboardRepository = new HighscoreLeaderboardPgPromiseRepository;
let highscoreLeaderboard: HighscoreLeaderboard;
if (req.query.pagination == true) {
const entriesPerPage = req.query.entriesPerPage;
const page = req.query.page;
highscoreLeaderboard = await highscoreLeaderboardRepo.getPage(entriesPerPage, page);
} else {
highscoreLeaderboard = await highscoreLeaderboardRepo.getAll();
}
res.send(highscoreLeaderboard);
} catch (error) {
// handle errors
@ -19,10 +42,34 @@ leaderboardRoute.get('/highscore', async (req, res) => {
}
})
leaderboardRoute.get('/totalplaytime', async (req, res) => {
leaderboardRoute.get('/totalplaytime',
query('pagination').toBoolean(),
query('entriesPerPage').optional().isInt({min: 1}).toInt(),
query('page').optional().isInt({min: 0}).toInt(),
/**
* Returns the total playtime leaderboard as JSON response, fetched from DB
* @param req
* @param res json: TimeLeaderboard
*/
async (req, res) => {
try {
const timeLeaderboardManager: TimeLeaderboardRepository = new TimeLeaderboardPgPromiseRepository;
const timeLeaderboard: TimeLeaderboard = await timeLeaderboardManager.getAll();
console.log(req.query)
//region validate parameters
const errors = validationResult(req);
if (!errors.isEmpty()) {
return res.status(400).json({ errors: errors.array() });
}
//endregion
const timeLeaderboardRepo: TimeLeaderboardRepository = new TimeLeaderboardPgPromiseRepository;
let timeLeaderboard: TimeLeaderboard;
console.log(req.query)
if (req.query.pagination == true) {
const entriesPerPage = req.query.entriesPerPage;
const page = req.query.page;
timeLeaderboard = await timeLeaderboardRepo.getPage(entriesPerPage, page);
} else {
timeLeaderboard = await timeLeaderboardRepo.getAll();
}
res.send(timeLeaderboard);
} catch (error) {
// handle errors

View file

@ -1,10 +1,10 @@
import {Time} from "./Time.js";
export interface UserScores {
userId: number,
highscore: number,
totalScore: number,
totalPlaytime: Time,
totalPlaytime: string,
averageScore: number,
gamesPlayed: number,
}

View file

@ -2,4 +2,5 @@ import {HighscoreLeaderboard} from "../model/Leaderboard.js";
export abstract class HighscoreLeaderboardRepository {
abstract getAll(): Promise<HighscoreLeaderboard>;
abstract getPage(entriesPerPage: number, page: number): Promise<HighscoreLeaderboard>
}

View file

@ -2,4 +2,5 @@ import {TimeLeaderboard} from "../model/Leaderboard.js";
export abstract class TimeLeaderboardRepository {
abstract getAll(): Promise<TimeLeaderboard>;
abstract getPage(entriesPerPage: number, page: number);
}

View file

@ -5,7 +5,15 @@ import {Database} from "../../Database.js";
export class HighscoreLeaderboardPgPromiseRepository extends HighscoreLeaderboardRepository {
async getAll(): Promise<HighscoreLeaderboard> {
const raw: any = await Database.db.manyOrNone(
'SELECT * FROM lb_highscore INNER JOIN "user" ON user_id = id ORDER BY RANK;'
'SELECT * FROM lb_highscore INNER JOIN "user" ON user_id = id ORDER BY rank;'
);
return this.serialize(raw);
}
async getPage(entriesPerPage, page): Promise<HighscoreLeaderboard> {
const raw: any = await Database.db.manyOrNone(
'SELECT * FROM lb_highscore INNER JOIN "user" ON user_id = id ORDER BY rank LIMIT $1 OFFSET $2;',
[entriesPerPage, page * entriesPerPage]
);
return this.serialize(raw);
}

View file

@ -5,7 +5,15 @@ import {Database} from "../../Database.js";
export class TimeLeaderboardPgPromiseRepository extends TimeLeaderboardRepository {
async getAll(): Promise<TimeLeaderboard> {
const raw: any = await Database.db.manyOrNone(
'SELECT * FROM lb_total_playtime INNER JOIN "user" ON user_id = id ORDER BY RANK;'
'SELECT * FROM lb_total_playtime INNER JOIN "user" ON user_id = id ORDER BY rank;'
);
return this.serialize(raw);
}
async getPage(entriesPerPage: number, page: number): Promise<TimeLeaderboard> {
const raw: any = await Database.db.manyOrNone(
'SELECT * FROM lb_total_playtime INNER JOIN "user" ON user_id = id ORDER BY rank LIMIT $1 OFFSET $2;',
[entriesPerPage, page * entriesPerPage]
);
return this.serialize(raw);
}

View file

@ -1,20 +1,32 @@
import express from "express";
import { body, param, validationResult } from 'express-validator';
import {body, param, validationResult} from 'express-validator';
import {UserScoresPgPromiseRepository} from "./repositories/pgPromise/UserScoresPgPromiseRepository.js";
import {UserPgPromiseRepository} from "./repositories/pgPromise/UserPgPromiseRepository.js";
import {UserRepository} from "./repositories/UserRepository.js";
import {UserScoresRepository} from "./repositories/UserScoresRepository.js";
import {User} from "./model/User.js";
import {USERNAME_VALIDATION_REGEX, userWithIdExists, userWithNameDoesNotExists} from "./validators.js";
export const userRoute = express.Router()
userRoute.use(express.json())
userRoute.post(
'/register',
body('name')
.isString()
.isLength({min: 3, max: 32})
.matches('[a-zA-Z0-9_.\\- ]*'),
.matches(USERNAME_VALIDATION_REGEX)
.custom(userWithNameDoesNotExists),
/**
* After processing the errors of express-validator, inserts the user into DB
* Returns the inserted user
* @param req
* body {
* name: string
* }
* @param res json: User
*/
async (req, res) => {
try {
//region validate parameters
@ -24,14 +36,10 @@ userRoute.post(
}
//endregion
const username: string = req.body.name;
const userManager: UserRepository = new UserPgPromiseRepository();
const userRepo: UserRepository = new UserPgPromiseRepository();
// check if username already exists
if (await userManager.withNameExists(username)) {
return res.status(400).json({ errors: [{msg: `User with name '${username}' already exists.`}] })
}
// insert & return user
const inserted: User = await userManager.insert({name: username});
const inserted: User = await userRepo.insert({name: username});
res.json(inserted);
} catch (error) {
// handle errors
@ -42,7 +50,18 @@ userRoute.post(
)
userRoute.get('/:userId/scores',
param('userId').isInt({min: 1}),
param('userId')
.isInt({min: 1})
.custom(userWithIdExists),
/**
* After processing the errors of express-validator, fetches the scores from the DB
* Returns user scores
* @param req
* params {
* userId: number
* }
* @param res json: UserScores
*/
async (req, res) => {
//region validate parameters
const errors = validationResult(req);
@ -52,16 +71,11 @@ userRoute.get('/:userId/scores',
//endregion
const userId: number = req.params.userId;
const userManager: UserRepository = new UserPgPromiseRepository;
try {
// check if user with given id exists
if (!await userManager.withIdExists(userId)) {
return res.status(400).json({ errors: [{msg: `User with id ${userId} does not exist.`}] })
}
// get & return data
const userScoresManager: UserScoresRepository = new UserScoresPgPromiseRepository;
const userScores = await userScoresManager.getById(userId);
const userScoresRepo: UserScoresRepository = new UserScoresPgPromiseRepository;
const userScores = await userScoresRepo.getById(userId);
res.json(userScores);
} catch (error) {
// handle errors
@ -70,3 +84,30 @@ userRoute.get('/:userId/scores',
}
}
)
userRoute.get('/:name',
param('name')
.isString()
.isLength({min: 3, max: 32})
.matches(USERNAME_VALIDATION_REGEX),
async (req, res) => {
const errors = validationResult(req);
if (!errors.isEmpty()) {
return res.status(400).json({ errors: errors.array() });
}
const name: string = req.params.name;
console.log(name)
try {
// get & return data
const userRepo: UserPgPromiseRepository = new UserPgPromiseRepository();
const user = await userRepo.getByName(name);
res.json(user);
} catch (error) {
// handle errors
console.log(error)
res.status(500).json({ errors: [{msg: "Internal server error"}]})
}
})

View file

@ -0,0 +1,36 @@
import {CustomValidator} from "express-validator";
import {UserRepository} from "./repositories/UserRepository.js";
import {UserPgPromiseRepository} from "./repositories/pgPromise/UserPgPromiseRepository.js";
export const USERNAME_VALIDATION_REGEX: string = '[a-zA-Z0-9_.\\- ]*';
export const TIME_VALIDATION_REGEX: string = '([0-5]\\d:)?[0-5]\\d:[0-5]\\d';
/**
* Custom express-validator to ensure that the user with given ID exists
* @param userId
*/
export const userWithIdExists: CustomValidator = userId => {
try {
const userRepo: UserRepository = new UserPgPromiseRepository;
return userRepo.withIdExists(userId).then(exists => {
if (!exists) return Promise.reject("User does not exist");
});
} catch (error) {
console.log(error);
}
}
/**
* Custom express-validator to ensure that the user with given name does not exist yet
* @param username
*/
export const userWithNameDoesNotExists: CustomValidator = username => {
try {
const userRepo: UserRepository = new UserPgPromiseRepository;
return userRepo.withNameExists(username).then(exists => {
if (exists) return Promise.reject("User with given name already exists");
});
} catch (error) {
console.log(error);
}
}

View file

@ -1,40 +0,0 @@
insert into "user" (name) values ('dpettus0');
insert into "user" (name) values ('egreetland1');
insert into "user" (name) values ('smontford2');
insert into "user" (name) values ('idagwell3');
insert into "user" (name) values ('lgagan4');
insert into "user" (name) values ('acarmont5');
insert into "user" (name) values ('kjermyn6');
insert into "user" (name) values ('dokieran7');
insert into "user" (name) values ('pdrinkel8');
insert into game (user_id, score, playtime, date) values ('1', 74, '19:59', '2022-07-19');
insert into game (user_id, score, playtime, date) values ('1', 86, '20:32', '2022-11-24');
insert into game (user_id, score, playtime, date) values ('1', 68, '10:41', '2022-03-24');
insert into game (user_id, score, playtime, date) values ('2', 39, '5:55', '2022-06-01');
insert into game (user_id, score, playtime, date) values ('2', 20, '9:23', '2022-03-12');
insert into game (user_id, score, playtime, date) values ('2', 28, '23:45', '2022-04-01');
insert into game (user_id, score, playtime, date) values ('2', 44, '18:43', '2022-06-24');
insert into game (user_id, score, playtime, date) values ('3', 92, '14:54', '2022-11-06');
insert into game (user_id, score, playtime, date) values ('3', 73, '0:45', '2022-07-26');
insert into game (user_id, score, playtime, date) values ('3', 27, '2:49', '2022-02-03');
insert into game (user_id, score, playtime, date) values ('4', 26, '2:32', '2022-07-19');
insert into game (user_id, score, playtime, date) values ('4', 12, '17:03', '2022-04-25');
insert into game (user_id, score, playtime, date) values ('4', 6, '8:49', '2021-12-03');
insert into game (user_id, score, playtime, date) values ('4', 22, '22:27', '2022-03-02');
insert into game (user_id, score, playtime, date) values ('5', 94, '1:04', '2022-10-19');
insert into game (user_id, score, playtime, date) values ('5', 2, '2:14', '2022-04-06');
insert into game (user_id, score, playtime, date) values ('5', 21, '17:18', '2022-06-03');
insert into game (user_id, score, playtime, date) values ('6', 33, '16:01', '2022-02-02');
insert into game (user_id, score, playtime, date) values ('6', 27, '7:03', '2022-02-06');
insert into game (user_id, score, playtime, date) values ('6', 62, '0:45', '2022-11-15');
insert into game (user_id, score, playtime, date) values ('7', 12, '8:54', '2022-06-29');
insert into game (user_id, score, playtime, date) values ('7', 63, '16:01', '2022-11-05');
insert into game (user_id, score, playtime, date) values ('7', 29, '0:46', '2022-10-01');
insert into game (user_id, score, playtime, date) values ('8', 67, '1:27', '2022-09-29');
insert into game (user_id, score, playtime, date) values ('8', 84, '10:37', '2021-12-18');
insert into game (user_id, score, playtime, date) values ('8', 14, '19:14', '2022-01-31');
insert into game (user_id, score, playtime, date) values ('9', 21, '19:04', '2022-03-08');
insert into game (user_id, score, playtime, date) values ('9', 46, '2:34', '2022-04-18');
insert into game (user_id, score, playtime, date) values ('9', 78, '9:33', '2022-09-10');
insert into game (user_id, score, playtime, date) values ('9', 82, '11:19', '2022-11-29');

View file

@ -1,23 +1,32 @@
version: '3.1'
services:
db:
build: backend/db
container_name: postgres-db
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
ports:
- "${POSTGRES_PORT}:5432"
volumes:
- ./backend/pgdata:/var/lib/postgresql/data
api:
build: backend/api
depends_on:
- db
container_name: express-api
ports:
- "${EXPRESS_PORT}:3000"
version: '3.1'
services:
db:
build: backend/db
container_name: postgres-db
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
ports:
- "${POSTGRES_PORT}:5432"
volumes:
- ./backend/pgdata:/var/lib/postgresql/data
api:
build: backend/api
depends_on:
- db
container_name: express-api
ports:
- "${EXPRESS_PORT}:3000"
vue:
build: frontend
container_name: frontend
ports:
- "${FRONTEND_PORT}:8080"
volumes:
- ./frontend:/app

1
docs/.nojekyll Normal file
View file

@ -0,0 +1 @@
TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false.

64
docs/assets/highlight.css Normal file
View file

@ -0,0 +1,64 @@
:root {
--light-hl-0: #AF00DB;
--dark-hl-0: #C586C0;
--light-hl-1: #000000;
--dark-hl-1: #D4D4D4;
--light-hl-2: #267F99;
--dark-hl-2: #4EC9B0;
--light-hl-3: #795E26;
--dark-hl-3: #DCDCAA;
--light-hl-4: #0000FF;
--dark-hl-4: #569CD6;
--light-hl-5: #001080;
--dark-hl-5: #9CDCFE;
--light-code-background: #FFFFFF;
--dark-code-background: #1E1E1E;
}
@media (prefers-color-scheme: light) { :root {
--hl-0: var(--light-hl-0);
--hl-1: var(--light-hl-1);
--hl-2: var(--light-hl-2);
--hl-3: var(--light-hl-3);
--hl-4: var(--light-hl-4);
--hl-5: var(--light-hl-5);
--code-background: var(--light-code-background);
} }
@media (prefers-color-scheme: dark) { :root {
--hl-0: var(--dark-hl-0);
--hl-1: var(--dark-hl-1);
--hl-2: var(--dark-hl-2);
--hl-3: var(--dark-hl-3);
--hl-4: var(--dark-hl-4);
--hl-5: var(--dark-hl-5);
--code-background: var(--dark-code-background);
} }
:root[data-theme='light'] {
--hl-0: var(--light-hl-0);
--hl-1: var(--light-hl-1);
--hl-2: var(--light-hl-2);
--hl-3: var(--light-hl-3);
--hl-4: var(--light-hl-4);
--hl-5: var(--light-hl-5);
--code-background: var(--light-code-background);
}
:root[data-theme='dark'] {
--hl-0: var(--dark-hl-0);
--hl-1: var(--dark-hl-1);
--hl-2: var(--dark-hl-2);
--hl-3: var(--dark-hl-3);
--hl-4: var(--dark-hl-4);
--hl-5: var(--dark-hl-5);
--code-background: var(--dark-code-background);
}
.hl-0 { color: var(--hl-0); }
.hl-1 { color: var(--hl-1); }
.hl-2 { color: var(--hl-2); }
.hl-3 { color: var(--hl-3); }
.hl-4 { color: var(--hl-4); }
.hl-5 { color: var(--hl-5); }
pre, code { background: var(--code-background); }

58
docs/assets/main.js Normal file

File diff suppressed because one or more lines are too long

1
docs/assets/search.js Normal file

File diff suppressed because one or more lines are too long

1280
docs/assets/style.css Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,286 @@
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Entity | Raspberry Rocketeer Docs</title><meta name="description" content="Documentation for Raspberry Rocketeer Docs"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
<div class="tsd-toolbar-contents container">
<div class="table-cell" id="tsd-search" data-base="..">
<div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
<div class="field">
<div id="tsd-toolbar-links"></div></div>
<ul class="results">
<li class="state loading">Preparing search index...</li>
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">Raspberry Rocketeer Docs</a></div>
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
<div class="container container-main">
<div class="col-8 col-content">
<div class="tsd-page-title">
<ul class="tsd-breadcrumb">
<li><a href="../modules.html">Raspberry Rocketeer Docs</a></li>
<li><a href="../modules/Entity.html">Entity</a></li>
<li><a href="Entity.Entity.html">Entity</a></li></ul>
<h1>Class Entity<code class="tsd-tag ts-flagAbstract">Abstract</code> </h1></div>
<section class="tsd-panel tsd-comment">
<div class="tsd-comment tsd-typography"><p>General rectangular entities.</p>
</div></section>
<section class="tsd-panel tsd-hierarchy">
<h4>Hierarchy</h4>
<ul class="tsd-hierarchy">
<li><span class="target">Entity</span>
<ul class="tsd-hierarchy">
<li><a href="Obstacle.Obstacle.html" class="tsd-signature-type" data-tsd-kind="Class">Obstacle</a></li>
<li><a href="Pipe.Pipe.html" class="tsd-signature-type" data-tsd-kind="Class">Pipe</a></li>
<li><a href="Raspberry.Raspberry.html" class="tsd-signature-type" data-tsd-kind="Class">Raspberry</a></li></ul></li></ul></section><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L4">Entity.ts:4</a></li></ul></aside>
<section class="tsd-panel-group tsd-index-group">
<section class="tsd-panel tsd-index-panel">
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
<h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex=0><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M1.5 5.50969L8 11.6609L14.5 5.50969L12.5466 3.66086L8 7.96494L3.45341 3.66086L1.5 5.50969Z" fill="var(--color-text)"></path></svg> Index</h5></summary>
<div class="tsd-accordion-details">
<section class="tsd-index-section">
<h3 class="tsd-index-heading">Constructors</h3>
<div class="tsd-index-list"><a href="Entity.Entity.html#constructor" class="tsd-index-link tsd-kind-constructor tsd-parent-kind-class tsd-is-protected"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#4D7FFF" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-512-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-512-text"></path></svg><span>constructor</span></a>
</div></section>
<section class="tsd-index-section">
<h3 class="tsd-index-heading">Properties</h3>
<div class="tsd-index-list"><a href="Entity.Entity.html#_height" class="tsd-index-link tsd-kind-property tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-1024-path"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)" id="icon-1024-text"></path></svg><span>_height</span></a>
<a href="Entity.Entity.html#_position" class="tsd-index-link tsd-kind-property tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>_position</span></a>
<a href="Entity.Entity.html#_showHitbox" class="tsd-index-link tsd-kind-property tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>_show<wbr/>Hitbox</span></a>
<a href="Entity.Entity.html#_width" class="tsd-index-link tsd-kind-property tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>_width</span></a>
<a href="Entity.Entity.html#fill" class="tsd-index-link tsd-kind-property tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>fill</span></a>
</div></section>
<section class="tsd-index-section">
<h3 class="tsd-index-heading">Accessors</h3>
<div class="tsd-index-list"><a href="Entity.Entity.html#height" class="tsd-index-link tsd-kind-accessor tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF4D4D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-262144-path"></rect><path d="M8.85 16L11.13 7.24H12.582L14.85 16H13.758L13.182 13.672H10.53L9.954 16H8.85ZM10.746 12.76H12.954L12.282 10.06C12.154 9.548 12.054 9.12 11.982 8.776C11.91 8.432 11.866 8.208 11.85 8.104C11.834 8.208 11.79 8.432 11.718 8.776C11.646 9.12 11.546 9.544 11.418 10.048L10.746 12.76Z" fill="var(--color-text)" id="icon-262144-text"></path></svg><span>height</span></a>
<a href="Entity.Entity.html#position" class="tsd-index-link tsd-kind-accessor tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg><span>position</span></a>
<a href="Entity.Entity.html#showHitbox" class="tsd-index-link tsd-kind-accessor tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg><span>show<wbr/>Hitbox</span></a>
<a href="Entity.Entity.html#width" class="tsd-index-link tsd-kind-accessor tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg><span>width</span></a>
</div></section>
<section class="tsd-index-section">
<h3 class="tsd-index-heading">Methods</h3>
<div class="tsd-index-list"><a href="Entity.Entity.html#draw" class="tsd-index-link tsd-kind-method tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF4DB8" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-2048-path"></rect><path d="M9.162 16V7.24H10.578L11.514 10.072C11.602 10.328 11.674 10.584 11.73 10.84C11.794 11.088 11.842 11.28 11.874 11.416C11.906 11.28 11.954 11.088 12.018 10.84C12.082 10.584 12.154 10.324 12.234 10.06L13.122 7.24H14.538V16H13.482V12.82C13.482 12.468 13.49 12.068 13.506 11.62C13.53 11.172 13.558 10.716 13.59 10.252C13.622 9.78 13.654 9.332 13.686 8.908C13.726 8.476 13.762 8.1 13.794 7.78L12.366 12.16H11.334L9.894 7.78C9.934 8.092 9.97 8.456 10.002 8.872C10.042 9.28 10.078 9.716 10.11 10.18C10.142 10.636 10.166 11.092 10.182 11.548C10.206 12.004 10.218 12.428 10.218 12.82V16H9.162Z" fill="var(--color-text)" id="icon-2048-text"></path></svg><span>draw</span></a>
<a href="Entity.Entity.html#update" class="tsd-index-link tsd-kind-method tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>update</span></a>
</div></section></div></details></section></section>
<section class="tsd-panel-group tsd-member-group">
<h2>Constructors</h2>
<section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class tsd-is-protected"><a id="constructor" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none" id="icon-anchor-a"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5" id="icon-anchor-b"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5" id="icon-anchor-c"></path></svg></a></h3>
<ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class tsd-is-protected">
<li class="tsd-signature tsd-anchor-link" id="constructor.new_Entity">new <wbr/>Entity<span class="tsd-signature-symbol">(</span>position<span class="tsd-signature-symbol">: </span><a href="Position.Position.html" class="tsd-signature-type" data-tsd-kind="Class">Position</a>, width<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, height<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, fill<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="Entity.Entity.html" class="tsd-signature-type" data-tsd-kind="Class">Entity</a><a href="#constructor.new_Entity" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Constructs the Entity.</p>
</div>
<div class="tsd-parameters">
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameter-list">
<li>
<h5>position: <a href="Position.Position.html" class="tsd-signature-type" data-tsd-kind="Class">Position</a></h5>
<div class="tsd-comment tsd-typography"><p>starting Position</p>
</div></li>
<li>
<h5>width: <span class="tsd-signature-type">number</span></h5>
<div class="tsd-comment tsd-typography"><p>entity width</p>
</div></li>
<li>
<h5>height: <span class="tsd-signature-type">number</span></h5>
<div class="tsd-comment tsd-typography"><p>entity height</p>
</div></li>
<li>
<h5>fill: <span class="tsd-signature-type">number</span></h5>
<div class="tsd-comment tsd-typography"><p>fill color</p>
</div></li></ul></div>
<h4 class="tsd-returns-title">Returns <a href="Entity.Entity.html" class="tsd-signature-type" data-tsd-kind="Class">Entity</a></h4><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L105">Entity.ts:105</a></li></ul></aside></li></ul></section></section>
<section class="tsd-panel-group tsd-member-group">
<h2>Properties</h2>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private"><a id="_height" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>_height</span><a href="#_height" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<div class="tsd-signature">_height<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
<div class="tsd-comment tsd-typography"><p>Height.</p>
</div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L21">Entity.ts:21</a></li></ul></aside></section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private"><a id="_position" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>_position</span><a href="#_position" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<div class="tsd-signature">_position<span class="tsd-signature-symbol">:</span> <a href="Position.Position.html" class="tsd-signature-type" data-tsd-kind="Class">Position</a></div>
<div class="tsd-comment tsd-typography"><p>Position.</p>
</div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L9">Entity.ts:9</a></li></ul></aside></section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private"><a id="_showHitbox" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>_show<wbr/>Hitbox</span><a href="#_showHitbox" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<div class="tsd-signature">_show<wbr/>Hitbox<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div>
<div class="tsd-comment tsd-typography"><p>Whether the hitbox (rectangular surrounding) is shown, or not.</p>
</div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L33">Entity.ts:33</a></li></ul></aside></section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private"><a id="_width" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>_width</span><a href="#_width" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<div class="tsd-signature">_width<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
<div class="tsd-comment tsd-typography"><p>Width.</p>
</div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L15">Entity.ts:15</a></li></ul></aside></section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private"><a id="fill" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>fill</span><a href="#fill" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<div class="tsd-signature">fill<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
<div class="tsd-comment tsd-typography"><p>Color.</p>
</div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L27">Entity.ts:27</a></li></ul></aside></section></section>
<section class="tsd-panel-group tsd-member-group">
<h2>Accessors</h2>
<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="height" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>height</span><a href="#height" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<ul class="tsd-signatures tsd-kind-accessor tsd-parent-kind-class">
<li class="tsd-signature" id="height.height-1"><span class="tsd-signature-symbol">get</span> height<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Get height.</p>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L70">Entity.ts:70</a></li></ul></aside></li>
<li class="tsd-signature" id="height.height-2"><span class="tsd-signature-symbol">set</span> height<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Set height.</p>
</div>
<div class="tsd-parameters">
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameter-list">
<li>
<h5>value: <span class="tsd-signature-type">number</span></h5></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L78">Entity.ts:78</a></li></ul></aside></li></ul></section>
<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="position" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>position</span><a href="#position" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<ul class="tsd-signatures tsd-kind-accessor tsd-parent-kind-class">
<li class="tsd-signature" id="position.position-1"><span class="tsd-signature-symbol">get</span> position<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="Position.Position.html" class="tsd-signature-type" data-tsd-kind="Class">Position</a></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Get position.</p>
</div>
<h4 class="tsd-returns-title">Returns <a href="Position.Position.html" class="tsd-signature-type" data-tsd-kind="Class">Position</a></h4><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L40">Entity.ts:40</a></li></ul></aside></li>
<li class="tsd-signature" id="position.position-2"><span class="tsd-signature-symbol">set</span> position<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><a href="Position.Position.html" class="tsd-signature-type" data-tsd-kind="Class">Position</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Set position.</p>
</div>
<div class="tsd-parameters">
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameter-list">
<li>
<h5>value: <a href="Position.Position.html" class="tsd-signature-type" data-tsd-kind="Class">Position</a></h5></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L48">Entity.ts:48</a></li></ul></aside></li></ul></section>
<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="showHitbox" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>show<wbr/>Hitbox</span><a href="#showHitbox" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<ul class="tsd-signatures tsd-kind-accessor tsd-parent-kind-class">
<li class="tsd-signature" id="showHitbox.showHitbox-1"><span class="tsd-signature-symbol">get</span> showHitbox<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Get the hitbox&#39;s visibility.</p>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L85">Entity.ts:85</a></li></ul></aside></li>
<li class="tsd-signature" id="showHitbox.showHitbox-2"><span class="tsd-signature-symbol">set</span> showHitbox<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Set the hitbox&#39;s visibility.</p>
</div>
<div class="tsd-parameters">
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameter-list">
<li>
<h5>value: <span class="tsd-signature-type">boolean</span></h5></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L93">Entity.ts:93</a></li></ul></aside></li></ul></section>
<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="width" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>width</span><a href="#width" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<ul class="tsd-signatures tsd-kind-accessor tsd-parent-kind-class">
<li class="tsd-signature" id="width.width-1"><span class="tsd-signature-symbol">get</span> width<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Get width.</p>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L55">Entity.ts:55</a></li></ul></aside></li>
<li class="tsd-signature" id="width.width-2"><span class="tsd-signature-symbol">set</span> width<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Set width.</p>
</div>
<div class="tsd-parameters">
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameter-list">
<li>
<h5>value: <span class="tsd-signature-type">number</span></h5></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L63">Entity.ts:63</a></li></ul></aside></li></ul></section></section>
<section class="tsd-panel-group tsd-member-group">
<h2>Methods</h2>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="draw" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>draw</span><a href="#draw" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-anchor-link" id="draw.draw-1">draw<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#draw.draw-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Draws the entity.</p>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L121">Entity.ts:121</a></li></ul></aside></li></ul></section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="update" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagAbstract">Abstract</code> <span>update</span><a href="#update" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-anchor-link" id="update.update-1">update<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#update.update-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Updates the entity.</p>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L116">Entity.ts:116</a></li></ul></aside></li></ul></section></section></div>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
<div class="tsd-navigation settings">
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Settings</h3></summary>
<div class="tsd-accordion-details">
<div class="tsd-filter-visibility">
<h4 class="uppercase">Member Visibility</h4><form>
<ul id="tsd-filter-options">
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li>
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-private" name="private"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Private</span></label></li>
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li>
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div>
<div class="tsd-theme-toggle">
<h4 class="uppercase">Theme</h4><select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div>
<nav class="tsd-navigation primary">
<details class="tsd-index-accordion" open><summary class="tsd-accordion-summary">
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Modules</h3></summary>
<div class="tsd-accordion-details">
<ul>
<li class="current"><a href="../modules.html">Raspberry <wbr/>Rocketeer <wbr/>Docs</a>
<ul>
<li class="tsd-kind-module"><a href="../modules/Collidable.html">Collidable</a></li>
<li class="current selected tsd-kind-module"><a href="../modules/Entity.html">Entity</a></li>
<li class="tsd-kind-module"><a href="../modules/Obstacle.html">Obstacle</a></li>
<li class="tsd-kind-module"><a href="../modules/Pipe.html">Pipe</a></li>
<li class="tsd-kind-module"><a href="../modules/Position.html">Position</a></li>
<li class="tsd-kind-module"><a href="../modules/Raspberry.html">Raspberry</a></li></ul></li></ul></div></details></nav>
<nav class="tsd-navigation secondary menu-sticky">
<ul>
<li class="current tsd-kind-class tsd-parent-kind-module"><a href="Entity.Entity.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-128-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-128-text"></path></svg><span>Entity</span></a>
<ul>
<li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-protected"><a href="Entity.Entity.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-512-path"></use><use href="#icon-512-text"></use></svg>constructor</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="Entity.Entity.html#_height" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>_height</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="Entity.Entity.html#_position" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>_position</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="Entity.Entity.html#_showHitbox" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>_show<wbr/>Hitbox</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="Entity.Entity.html#_width" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>_width</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="Entity.Entity.html#fill" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>fill</a></li>
<li class="tsd-kind-accessor tsd-parent-kind-class"><a href="Entity.Entity.html#height" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg>height</a></li>
<li class="tsd-kind-accessor tsd-parent-kind-class"><a href="Entity.Entity.html#position" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg>position</a></li>
<li class="tsd-kind-accessor tsd-parent-kind-class"><a href="Entity.Entity.html#showHitbox" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg>show<wbr/>Hitbox</a></li>
<li class="tsd-kind-accessor tsd-parent-kind-class"><a href="Entity.Entity.html#width" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg>width</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="Entity.Entity.html#draw" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg>draw</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="Entity.Entity.html#update" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg>update</a></li></ul></li></ul></nav></div></div>
<div class="container tsd-generator">
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
<div class="overlay"></div><script src="../assets/main.js"></script></body></html>

View file

@ -0,0 +1,417 @@
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Obstacle | Raspberry Rocketeer Docs</title><meta name="description" content="Documentation for Raspberry Rocketeer Docs"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
<div class="tsd-toolbar-contents container">
<div class="table-cell" id="tsd-search" data-base="..">
<div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
<div class="field">
<div id="tsd-toolbar-links"></div></div>
<ul class="results">
<li class="state loading">Preparing search index...</li>
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">Raspberry Rocketeer Docs</a></div>
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
<div class="container container-main">
<div class="col-8 col-content">
<div class="tsd-page-title">
<ul class="tsd-breadcrumb">
<li><a href="../modules.html">Raspberry Rocketeer Docs</a></li>
<li><a href="../modules/Obstacle.html">Obstacle</a></li>
<li><a href="Obstacle.Obstacle.html">Obstacle</a></li></ul>
<h1>Class Obstacle</h1></div>
<section class="tsd-panel tsd-comment">
<div class="tsd-comment tsd-typography"><p>Obstacle of the game. Built from 2 pipes, one at the bottom, one at the top.</p>
</div></section>
<section class="tsd-panel tsd-hierarchy">
<h4>Hierarchy</h4>
<ul class="tsd-hierarchy">
<li><a href="Entity.Entity.html" class="tsd-signature-type" data-tsd-kind="Class">Entity</a>
<ul class="tsd-hierarchy">
<li><span class="target">Obstacle</span></li></ul></li></ul></section>
<section class="tsd-panel">
<h4>Implements</h4>
<ul class="tsd-hierarchy">
<li><a href="../interfaces/Collidable.Collidable.html" class="tsd-signature-type" data-tsd-kind="Interface">Collidable</a></li></ul></section><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Obstacle.ts#L4">Obstacle.ts:4</a></li></ul></aside>
<section class="tsd-panel-group tsd-index-group">
<section class="tsd-panel tsd-index-panel">
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
<h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex=0><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M1.5 5.50969L8 11.6609L14.5 5.50969L12.5466 3.66086L8 7.96494L3.45341 3.66086L1.5 5.50969Z" fill="var(--color-text)"></path></svg> Index</h5></summary>
<div class="tsd-accordion-details">
<section class="tsd-index-section">
<h3 class="tsd-index-heading">Constructors</h3>
<div class="tsd-index-list"><a href="Obstacle.Obstacle.html#constructor" class="tsd-index-link tsd-kind-constructor tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#4D7FFF" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-512-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-512-text"></path></svg><span>constructor</span></a>
</div></section>
<section class="tsd-index-section">
<h3 class="tsd-index-heading">Properties</h3>
<div class="tsd-index-list"><a href="Obstacle.Obstacle.html#padding" class="tsd-index-link tsd-kind-property tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-1024-path"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)" id="icon-1024-text"></path></svg><span>padding</span></a>
<a href="Obstacle.Obstacle.html#pipeBottom" class="tsd-index-link tsd-kind-property tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>pipe<wbr/>Bottom</span></a>
<a href="Obstacle.Obstacle.html#pipeTop" class="tsd-index-link tsd-kind-property tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>pipe<wbr/>Top</span></a>
<a href="Obstacle.Obstacle.html#speed" class="tsd-index-link tsd-kind-property tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>speed</span></a>
<a href="Obstacle.Obstacle.html#_distanceBetweenPipes" class="tsd-index-link tsd-kind-property tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>_distance<wbr/>Between<wbr/>Pipes</span></a>
<a href="Obstacle.Obstacle.html#_startX" class="tsd-index-link tsd-kind-property tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>_startX</span></a>
</div></section>
<section class="tsd-index-section">
<h3 class="tsd-index-heading">Accessors</h3>
<div class="tsd-index-list"><a href="Obstacle.Obstacle.html#height" class="tsd-index-link tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF4D4D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-262144-path"></rect><path d="M8.85 16L11.13 7.24H12.582L14.85 16H13.758L13.182 13.672H10.53L9.954 16H8.85ZM10.746 12.76H12.954L12.282 10.06C12.154 9.548 12.054 9.12 11.982 8.776C11.91 8.432 11.866 8.208 11.85 8.104C11.834 8.208 11.79 8.432 11.718 8.776C11.646 9.12 11.546 9.544 11.418 10.048L10.746 12.76Z" fill="var(--color-text)" id="icon-262144-text"></path></svg><span>height</span></a>
<a href="Obstacle.Obstacle.html#position" class="tsd-index-link tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg><span>position</span></a>
<a href="Obstacle.Obstacle.html#showHitbox" class="tsd-index-link tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg><span>show<wbr/>Hitbox</span></a>
<a href="Obstacle.Obstacle.html#width" class="tsd-index-link tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg><span>width</span></a>
<a href="Obstacle.Obstacle.html#distanceBetweenPipes" class="tsd-index-link tsd-kind-accessor tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg><span>distance<wbr/>Between<wbr/>Pipes</span></a>
<a href="Obstacle.Obstacle.html#startX" class="tsd-index-link tsd-kind-accessor tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg><span>startX</span></a>
</div></section>
<section class="tsd-index-section">
<h3 class="tsd-index-heading">Methods</h3>
<div class="tsd-index-list"><a href="Obstacle.Obstacle.html#collides" class="tsd-index-link tsd-kind-method tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF4DB8" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-2048-path"></rect><path d="M9.162 16V7.24H10.578L11.514 10.072C11.602 10.328 11.674 10.584 11.73 10.84C11.794 11.088 11.842 11.28 11.874 11.416C11.906 11.28 11.954 11.088 12.018 10.84C12.082 10.584 12.154 10.324 12.234 10.06L13.122 7.24H14.538V16H13.482V12.82C13.482 12.468 13.49 12.068 13.506 11.62C13.53 11.172 13.558 10.716 13.59 10.252C13.622 9.78 13.654 9.332 13.686 8.908C13.726 8.476 13.762 8.1 13.794 7.78L12.366 12.16H11.334L9.894 7.78C9.934 8.092 9.97 8.456 10.002 8.872C10.042 9.28 10.078 9.716 10.11 10.18C10.142 10.636 10.166 11.092 10.182 11.548C10.206 12.004 10.218 12.428 10.218 12.82V16H9.162Z" fill="var(--color-text)" id="icon-2048-text"></path></svg><span>collides</span></a>
<a href="Obstacle.Obstacle.html#createPipes" class="tsd-index-link tsd-kind-method tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>create<wbr/>Pipes</span></a>
<a href="Obstacle.Obstacle.html#draw" class="tsd-index-link tsd-kind-method tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>draw</span></a>
<a href="Obstacle.Obstacle.html#randomRange" class="tsd-index-link tsd-kind-method tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>random<wbr/>Range</span></a>
<a href="Obstacle.Obstacle.html#randomizeHeight" class="tsd-index-link tsd-kind-method tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>randomize<wbr/>Height</span></a>
<a href="Obstacle.Obstacle.html#resetPosition" class="tsd-index-link tsd-kind-method tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>reset<wbr/>Position</span></a>
<a href="Obstacle.Obstacle.html#update" class="tsd-index-link tsd-kind-method tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>update</span></a>
</div></section></div></details></section></section>
<section class="tsd-panel-group tsd-member-group">
<h2>Constructors</h2>
<section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class"><a id="constructor" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none" id="icon-anchor-a"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5" id="icon-anchor-b"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5" id="icon-anchor-c"></path></svg></a></h3>
<ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class">
<li class="tsd-signature tsd-anchor-link" id="constructor.new_Obstacle">new <wbr/>Obstacle<span class="tsd-signature-symbol">(</span>position<span class="tsd-signature-symbol">: </span><a href="Position.Position.html" class="tsd-signature-type" data-tsd-kind="Class">Position</a>, obstacleWidth<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, obstacleHeight<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, pipeImagePath<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="Obstacle.Obstacle.html" class="tsd-signature-type" data-tsd-kind="Class">Obstacle</a><a href="#constructor.new_Obstacle" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Constructs the Obstacle with the given image.</p>
</div>
<div class="tsd-parameters">
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameter-list">
<li>
<h5>position: <a href="Position.Position.html" class="tsd-signature-type" data-tsd-kind="Class">Position</a></h5>
<div class="tsd-comment tsd-typography"><p>starting position of the obstacle</p>
</div></li>
<li>
<h5>obstacleWidth: <span class="tsd-signature-type">number</span></h5>
<div class="tsd-comment tsd-typography"><p>width of the obstacle</p>
</div></li>
<li>
<h5>obstacleHeight: <span class="tsd-signature-type">number</span></h5>
<div class="tsd-comment tsd-typography"><p>height of the obstacle</p>
</div></li>
<li>
<h5>pipeImagePath: <span class="tsd-signature-type">string</span></h5>
<div class="tsd-comment tsd-typography"><p>path to the image to be used</p>
</div></li></ul></div>
<h4 class="tsd-returns-title">Returns <a href="Obstacle.Obstacle.html" class="tsd-signature-type" data-tsd-kind="Class">Obstacle</a></h4><aside class="tsd-sources">
<p>Overrides <a href="Entity.Entity.html">Entity</a>.<a href="Entity.Entity.html#constructor">constructor</a></p>
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Obstacle.ts#L28">Obstacle.ts:28</a></li></ul></aside></li></ul></section></section>
<section class="tsd-panel-group tsd-member-group">
<h2>Properties</h2>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private"><a id="padding" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <code class="tsd-tag ts-flagReadonly">Readonly</code> <span>padding</span><a href="#padding" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<div class="tsd-signature">padding<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 150</span></div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Obstacle.ts#L7">Obstacle.ts:7</a></li></ul></aside></section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private"><a id="pipeBottom" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>pipe<wbr/>Bottom</span><a href="#pipeBottom" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<div class="tsd-signature">pipe<wbr/>Bottom<span class="tsd-signature-symbol">:</span> <a href="Pipe.Pipe.html" class="tsd-signature-type" data-tsd-kind="Class">Pipe</a></div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Obstacle.ts#L6">Obstacle.ts:6</a></li></ul></aside></section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private"><a id="pipeTop" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>pipe<wbr/>Top</span><a href="#pipeTop" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<div class="tsd-signature">pipe<wbr/>Top<span class="tsd-signature-symbol">:</span> <a href="Pipe.Pipe.html" class="tsd-signature-type" data-tsd-kind="Class">Pipe</a></div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Obstacle.ts#L5">Obstacle.ts:5</a></li></ul></aside></section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private"><a id="speed" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <code class="tsd-tag ts-flagReadonly">Readonly</code> <span>speed</span><a href="#speed" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<div class="tsd-signature">speed<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 3</span></div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Obstacle.ts#L8">Obstacle.ts:8</a></li></ul></aside></section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private"><a id="_distanceBetweenPipes" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <code class="tsd-tag ts-flagPrivate">Private</code> <span>_distance<wbr/>Between<wbr/>Pipes</span><a href="#_distanceBetweenPipes" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<div class="tsd-signature">_distance<wbr/>Between<wbr/>Pipes<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Obstacle.ts#L10">Obstacle.ts:10</a></li></ul></aside></section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private"><a id="_startX" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <code class="tsd-tag ts-flagPrivate">Private</code> <span>_startX</span><a href="#_startX" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<div class="tsd-signature">_startX<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Obstacle.ts#L11">Obstacle.ts:11</a></li></ul></aside></section></section>
<section class="tsd-panel-group tsd-member-group">
<h2>Accessors</h2>
<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><a id="height" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>height</span><a href="#height" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<ul class="tsd-signatures tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited">
<li class="tsd-signature" id="height.height-1"><span class="tsd-signature-symbol">get</span> height<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Get height.</p>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
<p>Inherited from Entity.height</p>
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L70">Entity.ts:70</a></li></ul></aside></li>
<li class="tsd-signature" id="height.height-2"><span class="tsd-signature-symbol">set</span> height<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Set height.</p>
</div>
<div class="tsd-parameters">
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameter-list">
<li>
<h5>value: <span class="tsd-signature-type">number</span></h5></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
<p>Inherited from Entity.height</p>
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L78">Entity.ts:78</a></li></ul></aside></li></ul></section>
<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><a id="position" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>position</span><a href="#position" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<ul class="tsd-signatures tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited">
<li class="tsd-signature" id="position.position-1"><span class="tsd-signature-symbol">get</span> position<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="Position.Position.html" class="tsd-signature-type" data-tsd-kind="Class">Position</a></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Get position.</p>
</div>
<h4 class="tsd-returns-title">Returns <a href="Position.Position.html" class="tsd-signature-type" data-tsd-kind="Class">Position</a></h4><aside class="tsd-sources">
<p>Inherited from Entity.position</p>
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L40">Entity.ts:40</a></li></ul></aside></li>
<li class="tsd-signature" id="position.position-2"><span class="tsd-signature-symbol">set</span> position<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><a href="Position.Position.html" class="tsd-signature-type" data-tsd-kind="Class">Position</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Set position.</p>
</div>
<div class="tsd-parameters">
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameter-list">
<li>
<h5>value: <a href="Position.Position.html" class="tsd-signature-type" data-tsd-kind="Class">Position</a></h5></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
<p>Inherited from Entity.position</p>
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L48">Entity.ts:48</a></li></ul></aside></li></ul></section>
<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><a id="showHitbox" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>show<wbr/>Hitbox</span><a href="#showHitbox" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<ul class="tsd-signatures tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited">
<li class="tsd-signature" id="showHitbox.showHitbox-1"><span class="tsd-signature-symbol">get</span> showHitbox<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Get the hitbox&#39;s visibility.</p>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources">
<p>Inherited from Entity.showHitbox</p>
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L85">Entity.ts:85</a></li></ul></aside></li>
<li class="tsd-signature" id="showHitbox.showHitbox-2"><span class="tsd-signature-symbol">set</span> showHitbox<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Set the hitbox&#39;s visibility.</p>
</div>
<div class="tsd-parameters">
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameter-list">
<li>
<h5>value: <span class="tsd-signature-type">boolean</span></h5></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
<p>Inherited from Entity.showHitbox</p>
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L93">Entity.ts:93</a></li></ul></aside></li></ul></section>
<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><a id="width" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>width</span><a href="#width" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<ul class="tsd-signatures tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited">
<li class="tsd-signature" id="width.width-1"><span class="tsd-signature-symbol">get</span> width<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Get width.</p>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
<p>Inherited from Entity.width</p>
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L55">Entity.ts:55</a></li></ul></aside></li>
<li class="tsd-signature" id="width.width-2"><span class="tsd-signature-symbol">set</span> width<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Set width.</p>
</div>
<div class="tsd-parameters">
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameter-list">
<li>
<h5>value: <span class="tsd-signature-type">number</span></h5></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
<p>Inherited from Entity.width</p>
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L63">Entity.ts:63</a></li></ul></aside></li></ul></section>
<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="distanceBetweenPipes" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>distance<wbr/>Between<wbr/>Pipes</span><a href="#distanceBetweenPipes" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<ul class="tsd-signatures tsd-kind-accessor tsd-parent-kind-class">
<li class="tsd-signature" id="distanceBetweenPipes.distanceBetweenPipes-1"><span class="tsd-signature-symbol">set</span> distanceBetweenPipes<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
<li class="tsd-description">
<div class="tsd-parameters">
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameter-list">
<li>
<h5>value: <span class="tsd-signature-type">number</span></h5></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Obstacle.ts#L17">Obstacle.ts:17</a></li></ul></aside></li></ul></section>
<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="startX" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>startX</span><a href="#startX" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<ul class="tsd-signatures tsd-kind-accessor tsd-parent-kind-class">
<li class="tsd-signature" id="startX.startX-1"><span class="tsd-signature-symbol">set</span> startX<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
<li class="tsd-description">
<div class="tsd-parameters">
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameter-list">
<li>
<h5>value: <span class="tsd-signature-type">number</span></h5></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Obstacle.ts#L13">Obstacle.ts:13</a></li></ul></aside></li></ul></section></section>
<section class="tsd-panel-group tsd-member-group">
<h2>Methods</h2>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="collides" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>collides</span><a href="#collides" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-anchor-link" id="collides.collides-1">collides<span class="tsd-signature-symbol">(</span>o<span class="tsd-signature-symbol">: </span><a href="Entity.Entity.html" class="tsd-signature-type" data-tsd-kind="Class">Entity</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#collides.collides-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Determines when the obstacle is colliding with another entity</p>
</div>
<div class="tsd-parameters">
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameter-list">
<li>
<h5>o: <a href="Entity.Entity.html" class="tsd-signature-type" data-tsd-kind="Class">Entity</a></h5>
<div class="tsd-comment tsd-typography"><p>other entity</p>
</div></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/Collidable.Collidable.html">Collidable</a>.<a href="../interfaces/Collidable.Collidable.html#collides">collides</a></p>
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Obstacle.ts#L89">Obstacle.ts:89</a></li></ul></aside></li></ul></section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-private"><a id="createPipes" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>create<wbr/>Pipes</span><a href="#createPipes" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-private">
<li class="tsd-signature tsd-anchor-link" id="createPipes.createPipes-1">create<wbr/>Pipes<span class="tsd-signature-symbol">(</span>position<span class="tsd-signature-symbol">: </span><a href="Position.Position.html" class="tsd-signature-type" data-tsd-kind="Class">Position</a>, obstacleHeight<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, obstacleWidth<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, pipeImagePath<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#createPipes.createPipes-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
<li class="tsd-description"><code class="tsd-tag ts-flagPrivate">Private</code>
<div class="tsd-comment tsd-typography"><p>Creates the pipes.</p>
</div>
<div class="tsd-parameters">
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameter-list">
<li>
<h5>position: <a href="Position.Position.html" class="tsd-signature-type" data-tsd-kind="Class">Position</a></h5></li>
<li>
<h5>obstacleHeight: <span class="tsd-signature-type">number</span></h5></li>
<li>
<h5>obstacleWidth: <span class="tsd-signature-type">number</span></h5></li>
<li>
<h5>pipeImagePath: <span class="tsd-signature-type">string</span></h5></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Obstacle.ts#L41">Obstacle.ts:41</a></li></ul></aside></li></ul></section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="draw" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>draw</span><a href="#draw" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-anchor-link" id="draw.draw-1">draw<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#draw.draw-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Draws the entity.</p>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
<p>Overrides <a href="Entity.Entity.html">Entity</a>.<a href="Entity.Entity.html#draw">draw</a></p>
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Obstacle.ts#L80">Obstacle.ts:80</a></li></ul></aside></li></ul></section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-private"><a id="randomRange" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>random<wbr/>Range</span><a href="#randomRange" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-private">
<li class="tsd-signature tsd-anchor-link" id="randomRange.randomRange-1">random<wbr/>Range<span class="tsd-signature-symbol">(</span>min<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, max<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#randomRange.randomRange-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Creates a random number between the min and max parameter</p>
</div>
<div class="tsd-parameters">
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameter-list">
<li>
<h5>min: <span class="tsd-signature-type">number</span></h5>
<div class="tsd-comment tsd-typography"><p>minimum number</p>
</div></li>
<li>
<h5>max: <span class="tsd-signature-type">number</span></h5>
<div class="tsd-comment tsd-typography"><p>maximum number</p>
</div></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Obstacle.ts#L70">Obstacle.ts:70</a></li></ul></aside></li></ul></section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="randomizeHeight" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>randomize<wbr/>Height</span><a href="#randomizeHeight" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-anchor-link" id="randomizeHeight.randomizeHeight-1">randomize<wbr/>Height<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#randomizeHeight.randomizeHeight-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Randomizes the height of the pipes</p>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Obstacle.ts#L59">Obstacle.ts:59</a></li></ul></aside></li></ul></section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="resetPosition" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>reset<wbr/>Position</span><a href="#resetPosition" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-anchor-link" id="resetPosition.resetPosition-1">reset<wbr/>Position<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#resetPosition.resetPosition-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Resets the position of the obstacle to the Obstacle.startX variable
Randomises the height of the pipes using the padding variable</p>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Obstacle.ts#L50">Obstacle.ts:50</a></li></ul></aside></li></ul></section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="update" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>update</span><a href="#update" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-anchor-link" id="update.update-1">update<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#update.update-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Updates the entity.</p>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
<p>Overrides <a href="Entity.Entity.html">Entity</a>.<a href="Entity.Entity.html#update">update</a></p>
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Obstacle.ts#L74">Obstacle.ts:74</a></li></ul></aside></li></ul></section></section></div>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
<div class="tsd-navigation settings">
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Settings</h3></summary>
<div class="tsd-accordion-details">
<div class="tsd-filter-visibility">
<h4 class="uppercase">Member Visibility</h4><form>
<ul id="tsd-filter-options">
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li>
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-private" name="private"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Private</span></label></li>
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li>
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div>
<div class="tsd-theme-toggle">
<h4 class="uppercase">Theme</h4><select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div>
<nav class="tsd-navigation primary">
<details class="tsd-index-accordion" open><summary class="tsd-accordion-summary">
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Modules</h3></summary>
<div class="tsd-accordion-details">
<ul>
<li class="current"><a href="../modules.html">Raspberry <wbr/>Rocketeer <wbr/>Docs</a>
<ul>
<li class="tsd-kind-module"><a href="../modules/Collidable.html">Collidable</a></li>
<li class="tsd-kind-module"><a href="../modules/Entity.html">Entity</a></li>
<li class="current selected tsd-kind-module"><a href="../modules/Obstacle.html">Obstacle</a></li>
<li class="tsd-kind-module"><a href="../modules/Pipe.html">Pipe</a></li>
<li class="tsd-kind-module"><a href="../modules/Position.html">Position</a></li>
<li class="tsd-kind-module"><a href="../modules/Raspberry.html">Raspberry</a></li></ul></li></ul></div></details></nav>
<nav class="tsd-navigation secondary menu-sticky">
<ul>
<li class="current tsd-kind-class tsd-parent-kind-module"><a href="Obstacle.Obstacle.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-128-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-128-text"></path></svg><span>Obstacle</span></a>
<ul>
<li class="tsd-kind-constructor tsd-parent-kind-class"><a href="Obstacle.Obstacle.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-512-path"></use><use href="#icon-512-text"></use></svg>constructor</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="Obstacle.Obstacle.html#padding" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>padding</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="Obstacle.Obstacle.html#pipeBottom" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>pipe<wbr/>Bottom</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="Obstacle.Obstacle.html#pipeTop" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>pipe<wbr/>Top</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="Obstacle.Obstacle.html#speed" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>speed</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="Obstacle.Obstacle.html#_distanceBetweenPipes" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>_distance<wbr/>Between<wbr/>Pipes</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="Obstacle.Obstacle.html#_startX" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>_startX</a></li>
<li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><a href="Obstacle.Obstacle.html#height" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg>height</a></li>
<li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><a href="Obstacle.Obstacle.html#position" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg>position</a></li>
<li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><a href="Obstacle.Obstacle.html#showHitbox" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg>show<wbr/>Hitbox</a></li>
<li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><a href="Obstacle.Obstacle.html#width" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg>width</a></li>
<li class="tsd-kind-accessor tsd-parent-kind-class"><a href="Obstacle.Obstacle.html#distanceBetweenPipes" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg>distance<wbr/>Between<wbr/>Pipes</a></li>
<li class="tsd-kind-accessor tsd-parent-kind-class"><a href="Obstacle.Obstacle.html#startX" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg>startX</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="Obstacle.Obstacle.html#collides" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg>collides</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><a href="Obstacle.Obstacle.html#createPipes" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg>create<wbr/>Pipes</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="Obstacle.Obstacle.html#draw" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg>draw</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><a href="Obstacle.Obstacle.html#randomRange" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg>random<wbr/>Range</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="Obstacle.Obstacle.html#randomizeHeight" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg>randomize<wbr/>Height</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="Obstacle.Obstacle.html#resetPosition" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg>reset<wbr/>Position</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="Obstacle.Obstacle.html#update" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg>update</a></li></ul></li></ul></nav></div></div>
<div class="container tsd-generator">
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
<div class="overlay"></div><script src="../assets/main.js"></script></body></html>

328
docs/classes/Pipe.Pipe.html Normal file
View file

@ -0,0 +1,328 @@
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Pipe | Raspberry Rocketeer Docs</title><meta name="description" content="Documentation for Raspberry Rocketeer Docs"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
<div class="tsd-toolbar-contents container">
<div class="table-cell" id="tsd-search" data-base="..">
<div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
<div class="field">
<div id="tsd-toolbar-links"></div></div>
<ul class="results">
<li class="state loading">Preparing search index...</li>
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">Raspberry Rocketeer Docs</a></div>
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
<div class="container container-main">
<div class="col-8 col-content">
<div class="tsd-page-title">
<ul class="tsd-breadcrumb">
<li><a href="../modules.html">Raspberry Rocketeer Docs</a></li>
<li><a href="../modules/Pipe.html">Pipe</a></li>
<li><a href="Pipe.Pipe.html">Pipe</a></li></ul>
<h1>Class Pipe</h1></div>
<section class="tsd-panel tsd-comment">
<div class="tsd-comment tsd-typography"><p>Rectangular obstacle.</p>
</div></section>
<section class="tsd-panel tsd-hierarchy">
<h4>Hierarchy</h4>
<ul class="tsd-hierarchy">
<li><a href="Entity.Entity.html" class="tsd-signature-type" data-tsd-kind="Class">Entity</a>
<ul class="tsd-hierarchy">
<li><span class="target">Pipe</span></li></ul></li></ul></section>
<section class="tsd-panel">
<h4>Implements</h4>
<ul class="tsd-hierarchy">
<li><a href="../interfaces/Collidable.Collidable.html" class="tsd-signature-type" data-tsd-kind="Interface">Collidable</a></li></ul></section><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Pipe.ts#L4">Pipe.ts:4</a></li></ul></aside>
<section class="tsd-panel-group tsd-index-group">
<section class="tsd-panel tsd-index-panel">
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
<h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex=0><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M1.5 5.50969L8 11.6609L14.5 5.50969L12.5466 3.66086L8 7.96494L3.45341 3.66086L1.5 5.50969Z" fill="var(--color-text)"></path></svg> Index</h5></summary>
<div class="tsd-accordion-details">
<section class="tsd-index-section">
<h3 class="tsd-index-heading">Constructors</h3>
<div class="tsd-index-list"><a href="Pipe.Pipe.html#constructor" class="tsd-index-link tsd-kind-constructor tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#4D7FFF" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-512-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-512-text"></path></svg><span>constructor</span></a>
</div></section>
<section class="tsd-index-section">
<h3 class="tsd-index-heading">Properties</h3>
<div class="tsd-index-list"><a href="Pipe.Pipe.html#_image" class="tsd-index-link tsd-kind-property tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-1024-path"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)" id="icon-1024-text"></path></svg><span>_image</span></a>
</div></section>
<section class="tsd-index-section">
<h3 class="tsd-index-heading">Accessors</h3>
<div class="tsd-index-list"><a href="Pipe.Pipe.html#height" class="tsd-index-link tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF4D4D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-262144-path"></rect><path d="M8.85 16L11.13 7.24H12.582L14.85 16H13.758L13.182 13.672H10.53L9.954 16H8.85ZM10.746 12.76H12.954L12.282 10.06C12.154 9.548 12.054 9.12 11.982 8.776C11.91 8.432 11.866 8.208 11.85 8.104C11.834 8.208 11.79 8.432 11.718 8.776C11.646 9.12 11.546 9.544 11.418 10.048L10.746 12.76Z" fill="var(--color-text)" id="icon-262144-text"></path></svg><span>height</span></a>
<a href="Pipe.Pipe.html#image" class="tsd-index-link tsd-kind-accessor tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg><span>image</span></a>
<a href="Pipe.Pipe.html#position" class="tsd-index-link tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg><span>position</span></a>
<a href="Pipe.Pipe.html#showHitbox" class="tsd-index-link tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg><span>show<wbr/>Hitbox</span></a>
<a href="Pipe.Pipe.html#width" class="tsd-index-link tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg><span>width</span></a>
</div></section>
<section class="tsd-index-section">
<h3 class="tsd-index-heading">Methods</h3>
<div class="tsd-index-list"><a href="Pipe.Pipe.html#collides" class="tsd-index-link tsd-kind-method tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF4DB8" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-2048-path"></rect><path d="M9.162 16V7.24H10.578L11.514 10.072C11.602 10.328 11.674 10.584 11.73 10.84C11.794 11.088 11.842 11.28 11.874 11.416C11.906 11.28 11.954 11.088 12.018 10.84C12.082 10.584 12.154 10.324 12.234 10.06L13.122 7.24H14.538V16H13.482V12.82C13.482 12.468 13.49 12.068 13.506 11.62C13.53 11.172 13.558 10.716 13.59 10.252C13.622 9.78 13.654 9.332 13.686 8.908C13.726 8.476 13.762 8.1 13.794 7.78L12.366 12.16H11.334L9.894 7.78C9.934 8.092 9.97 8.456 10.002 8.872C10.042 9.28 10.078 9.716 10.11 10.18C10.142 10.636 10.166 11.092 10.182 11.548C10.206 12.004 10.218 12.428 10.218 12.82V16H9.162Z" fill="var(--color-text)" id="icon-2048-text"></path></svg><span>collides</span></a>
<a href="Pipe.Pipe.html#draw" class="tsd-index-link tsd-kind-method tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>draw</span></a>
<a href="Pipe.Pipe.html#move" class="tsd-index-link tsd-kind-method tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>move</span></a>
<a href="Pipe.Pipe.html#update" class="tsd-index-link tsd-kind-method tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>update</span></a>
</div></section></div></details></section></section>
<section class="tsd-panel-group tsd-member-group">
<h2>Constructors</h2>
<section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class"><a id="constructor" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none" id="icon-anchor-a"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5" id="icon-anchor-b"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5" id="icon-anchor-c"></path></svg></a></h3>
<ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class">
<li class="tsd-signature tsd-anchor-link" id="constructor.new_Pipe">new <wbr/>Pipe<span class="tsd-signature-symbol">(</span>positionX<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, width<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, height<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, image<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="Pipe.Pipe.html" class="tsd-signature-type" data-tsd-kind="Class">Pipe</a><a href="#constructor.new_Pipe" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Constructs the pipe.</p>
</div>
<div class="tsd-parameters">
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameter-list">
<li>
<h5>positionX: <span class="tsd-signature-type">number</span></h5>
<div class="tsd-comment tsd-typography"><p>starting x-Position</p>
</div></li>
<li>
<h5>width: <span class="tsd-signature-type">number</span></h5>
<div class="tsd-comment tsd-typography"><p>pipe width</p>
</div></li>
<li>
<h5>height: <span class="tsd-signature-type">number</span></h5>
<div class="tsd-comment tsd-typography"><p>pipe height</p>
</div></li>
<li>
<h5>image: <span class="tsd-signature-type">string</span></h5>
<div class="tsd-comment tsd-typography"><p>path to image.</p>
</div></li></ul></div>
<h4 class="tsd-returns-title">Returns <a href="Pipe.Pipe.html" class="tsd-signature-type" data-tsd-kind="Class">Pipe</a></h4><aside class="tsd-sources">
<p>Overrides <a href="Entity.Entity.html">Entity</a>.<a href="Entity.Entity.html#constructor">constructor</a></p>
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Pipe.ts#L35">Pipe.ts:35</a></li></ul></aside></li></ul></section></section>
<section class="tsd-panel-group tsd-member-group">
<h2>Properties</h2>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private"><a id="_image" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>_image</span><a href="#_image" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<div class="tsd-signature">_image<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Image</span></div>
<div class="tsd-comment tsd-typography"><p>Pipe&#39;s image.</p>
</div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Pipe.ts#L9">Pipe.ts:9</a></li></ul></aside></section></section>
<section class="tsd-panel-group tsd-member-group">
<h2>Accessors</h2>
<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><a id="height" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>height</span><a href="#height" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<ul class="tsd-signatures tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited">
<li class="tsd-signature" id="height.height-1"><span class="tsd-signature-symbol">get</span> height<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Get height.</p>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
<p>Inherited from Entity.height</p>
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L70">Entity.ts:70</a></li></ul></aside></li>
<li class="tsd-signature" id="height.height-2"><span class="tsd-signature-symbol">set</span> height<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Set height.</p>
</div>
<div class="tsd-parameters">
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameter-list">
<li>
<h5>value: <span class="tsd-signature-type">number</span></h5></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
<p>Inherited from Entity.height</p>
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L78">Entity.ts:78</a></li></ul></aside></li></ul></section>
<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="image" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>image</span><a href="#image" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<ul class="tsd-signatures tsd-kind-accessor tsd-parent-kind-class">
<li class="tsd-signature" id="image.image-1"><span class="tsd-signature-symbol">get</span> image<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Image</span></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Gets the image.</p>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Image</span></h4><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Pipe.ts#L15">Pipe.ts:15</a></li></ul></aside></li>
<li class="tsd-signature" id="image.image-2"><span class="tsd-signature-symbol">set</span> image<span class="tsd-signature-symbol">(</span>path<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Sets the image.</p>
</div>
<div class="tsd-parameters">
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameter-list">
<li>
<h5>path: <span class="tsd-signature-type">any</span></h5>
<div class="tsd-comment tsd-typography"><p>Path to image</p>
</div></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Pipe.ts#L23">Pipe.ts:23</a></li></ul></aside></li></ul></section>
<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><a id="position" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>position</span><a href="#position" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<ul class="tsd-signatures tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited">
<li class="tsd-signature" id="position.position-1"><span class="tsd-signature-symbol">get</span> position<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="Position.Position.html" class="tsd-signature-type" data-tsd-kind="Class">Position</a></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Get position.</p>
</div>
<h4 class="tsd-returns-title">Returns <a href="Position.Position.html" class="tsd-signature-type" data-tsd-kind="Class">Position</a></h4><aside class="tsd-sources">
<p>Inherited from Entity.position</p>
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L40">Entity.ts:40</a></li></ul></aside></li>
<li class="tsd-signature" id="position.position-2"><span class="tsd-signature-symbol">set</span> position<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><a href="Position.Position.html" class="tsd-signature-type" data-tsd-kind="Class">Position</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Set position.</p>
</div>
<div class="tsd-parameters">
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameter-list">
<li>
<h5>value: <a href="Position.Position.html" class="tsd-signature-type" data-tsd-kind="Class">Position</a></h5></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
<p>Inherited from Entity.position</p>
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L48">Entity.ts:48</a></li></ul></aside></li></ul></section>
<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><a id="showHitbox" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>show<wbr/>Hitbox</span><a href="#showHitbox" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<ul class="tsd-signatures tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited">
<li class="tsd-signature" id="showHitbox.showHitbox-1"><span class="tsd-signature-symbol">get</span> showHitbox<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Get the hitbox&#39;s visibility.</p>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources">
<p>Inherited from Entity.showHitbox</p>
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L85">Entity.ts:85</a></li></ul></aside></li>
<li class="tsd-signature" id="showHitbox.showHitbox-2"><span class="tsd-signature-symbol">set</span> showHitbox<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Set the hitbox&#39;s visibility.</p>
</div>
<div class="tsd-parameters">
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameter-list">
<li>
<h5>value: <span class="tsd-signature-type">boolean</span></h5></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
<p>Inherited from Entity.showHitbox</p>
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L93">Entity.ts:93</a></li></ul></aside></li></ul></section>
<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><a id="width" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>width</span><a href="#width" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<ul class="tsd-signatures tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited">
<li class="tsd-signature" id="width.width-1"><span class="tsd-signature-symbol">get</span> width<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Get width.</p>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
<p>Inherited from Entity.width</p>
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L55">Entity.ts:55</a></li></ul></aside></li>
<li class="tsd-signature" id="width.width-2"><span class="tsd-signature-symbol">set</span> width<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Set width.</p>
</div>
<div class="tsd-parameters">
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameter-list">
<li>
<h5>value: <span class="tsd-signature-type">number</span></h5></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
<p>Inherited from Entity.width</p>
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L63">Entity.ts:63</a></li></ul></aside></li></ul></section></section>
<section class="tsd-panel-group tsd-member-group">
<h2>Methods</h2>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="collides" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>collides</span><a href="#collides" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-anchor-link" id="collides.collides-1">collides<span class="tsd-signature-symbol">(</span>o<span class="tsd-signature-symbol">: </span><a href="Entity.Entity.html" class="tsd-signature-type" data-tsd-kind="Class">Entity</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#collides.collides-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Determines when the pipe is colliding with another entity</p>
</div>
<div class="tsd-parameters">
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameter-list">
<li>
<h5>o: <a href="Entity.Entity.html" class="tsd-signature-type" data-tsd-kind="Class">Entity</a></h5>
<div class="tsd-comment tsd-typography"><p>other entity</p>
</div></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/Collidable.Collidable.html">Collidable</a>.<a href="../interfaces/Collidable.Collidable.html#collides">collides</a></p>
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Pipe.ts#L68">Pipe.ts:68</a></li></ul></aside></li></ul></section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="draw" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>draw</span><a href="#draw" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-anchor-link" id="draw.draw-1">draw<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#draw.draw-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Draws the pipe.</p>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
<p>Overrides <a href="Entity.Entity.html">Entity</a>.<a href="Entity.Entity.html#draw">draw</a></p>
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Pipe.ts#L48">Pipe.ts:48</a></li></ul></aside></li></ul></section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="move" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>move</span><a href="#move" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-anchor-link" id="move.move-1">move<span class="tsd-signature-symbol">(</span>speed<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#move.move-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Moves the pipe to the lift with the given speed</p>
</div>
<div class="tsd-parameters">
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameter-list">
<li>
<h5>speed: <span class="tsd-signature-type">number</span></h5>
<div class="tsd-comment tsd-typography"><p>how fast the pipe moves</p>
</div></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Pipe.ts#L60">Pipe.ts:60</a></li></ul></aside></li></ul></section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="update" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>update</span><a href="#update" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-anchor-link" id="update.update-1">update<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#update.update-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>YAGNI.</p>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
<p>Overrides <a href="Entity.Entity.html">Entity</a>.<a href="Entity.Entity.html#update">update</a></p>
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Pipe.ts#L43">Pipe.ts:43</a></li></ul></aside></li></ul></section></section></div>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
<div class="tsd-navigation settings">
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Settings</h3></summary>
<div class="tsd-accordion-details">
<div class="tsd-filter-visibility">
<h4 class="uppercase">Member Visibility</h4><form>
<ul id="tsd-filter-options">
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li>
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-private" name="private"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Private</span></label></li>
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li>
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div>
<div class="tsd-theme-toggle">
<h4 class="uppercase">Theme</h4><select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div>
<nav class="tsd-navigation primary">
<details class="tsd-index-accordion" open><summary class="tsd-accordion-summary">
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Modules</h3></summary>
<div class="tsd-accordion-details">
<ul>
<li class="current"><a href="../modules.html">Raspberry <wbr/>Rocketeer <wbr/>Docs</a>
<ul>
<li class="tsd-kind-module"><a href="../modules/Collidable.html">Collidable</a></li>
<li class="tsd-kind-module"><a href="../modules/Entity.html">Entity</a></li>
<li class="tsd-kind-module"><a href="../modules/Obstacle.html">Obstacle</a></li>
<li class="current selected tsd-kind-module"><a href="../modules/Pipe.html">Pipe</a></li>
<li class="tsd-kind-module"><a href="../modules/Position.html">Position</a></li>
<li class="tsd-kind-module"><a href="../modules/Raspberry.html">Raspberry</a></li></ul></li></ul></div></details></nav>
<nav class="tsd-navigation secondary menu-sticky">
<ul>
<li class="current tsd-kind-class tsd-parent-kind-module"><a href="Pipe.Pipe.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-128-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-128-text"></path></svg><span>Pipe</span></a>
<ul>
<li class="tsd-kind-constructor tsd-parent-kind-class"><a href="Pipe.Pipe.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-512-path"></use><use href="#icon-512-text"></use></svg>constructor</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="Pipe.Pipe.html#_image" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>_image</a></li>
<li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><a href="Pipe.Pipe.html#height" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg>height</a></li>
<li class="tsd-kind-accessor tsd-parent-kind-class"><a href="Pipe.Pipe.html#image" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg>image</a></li>
<li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><a href="Pipe.Pipe.html#position" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg>position</a></li>
<li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><a href="Pipe.Pipe.html#showHitbox" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg>show<wbr/>Hitbox</a></li>
<li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><a href="Pipe.Pipe.html#width" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg>width</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="Pipe.Pipe.html#collides" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg>collides</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="Pipe.Pipe.html#draw" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg>draw</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="Pipe.Pipe.html#move" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg>move</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="Pipe.Pipe.html#update" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg>update</a></li></ul></li></ul></nav></div></div>
<div class="container tsd-generator">
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
<div class="overlay"></div><script src="../assets/main.js"></script></body></html>

View file

@ -0,0 +1,170 @@
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Position | Raspberry Rocketeer Docs</title><meta name="description" content="Documentation for Raspberry Rocketeer Docs"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
<div class="tsd-toolbar-contents container">
<div class="table-cell" id="tsd-search" data-base="..">
<div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
<div class="field">
<div id="tsd-toolbar-links"></div></div>
<ul class="results">
<li class="state loading">Preparing search index...</li>
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">Raspberry Rocketeer Docs</a></div>
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
<div class="container container-main">
<div class="col-8 col-content">
<div class="tsd-page-title">
<ul class="tsd-breadcrumb">
<li><a href="../modules.html">Raspberry Rocketeer Docs</a></li>
<li><a href="../modules/Position.html">Position</a></li>
<li><a href="Position.Position.html">Position</a></li></ul>
<h1>Class Position</h1></div>
<section class="tsd-panel tsd-comment">
<div class="tsd-comment tsd-typography"><p>2D Point.</p>
</div></section>
<section class="tsd-panel tsd-hierarchy">
<h4>Hierarchy</h4>
<ul class="tsd-hierarchy">
<li><span class="target">Position</span></li></ul></section><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Position.ts#L4">Position.ts:4</a></li></ul></aside>
<section class="tsd-panel-group tsd-index-group">
<section class="tsd-panel tsd-index-panel">
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
<h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex=0><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M1.5 5.50969L8 11.6609L14.5 5.50969L12.5466 3.66086L8 7.96494L3.45341 3.66086L1.5 5.50969Z" fill="var(--color-text)"></path></svg> Index</h5></summary>
<div class="tsd-accordion-details">
<section class="tsd-index-section">
<h3 class="tsd-index-heading">Constructors</h3>
<div class="tsd-index-list"><a href="Position.Position.html#constructor" class="tsd-index-link tsd-kind-constructor tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#4D7FFF" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-512-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-512-text"></path></svg><span>constructor</span></a>
</div></section>
<section class="tsd-index-section">
<h3 class="tsd-index-heading">Properties</h3>
<div class="tsd-index-list"><a href="Position.Position.html#_x" class="tsd-index-link tsd-kind-property tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-1024-path"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)" id="icon-1024-text"></path></svg><span>_x</span></a>
<a href="Position.Position.html#_y" class="tsd-index-link tsd-kind-property tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>_y</span></a>
</div></section>
<section class="tsd-index-section">
<h3 class="tsd-index-heading">Accessors</h3>
<div class="tsd-index-list"><a href="Position.Position.html#x" class="tsd-index-link tsd-kind-accessor tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF4D4D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-262144-path"></rect><path d="M8.85 16L11.13 7.24H12.582L14.85 16H13.758L13.182 13.672H10.53L9.954 16H8.85ZM10.746 12.76H12.954L12.282 10.06C12.154 9.548 12.054 9.12 11.982 8.776C11.91 8.432 11.866 8.208 11.85 8.104C11.834 8.208 11.79 8.432 11.718 8.776C11.646 9.12 11.546 9.544 11.418 10.048L10.746 12.76Z" fill="var(--color-text)" id="icon-262144-text"></path></svg><span>x</span></a>
<a href="Position.Position.html#y" class="tsd-index-link tsd-kind-accessor tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg><span>y</span></a>
</div></section></div></details></section></section>
<section class="tsd-panel-group tsd-member-group">
<h2>Constructors</h2>
<section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class"><a id="constructor" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none" id="icon-anchor-a"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5" id="icon-anchor-b"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5" id="icon-anchor-c"></path></svg></a></h3>
<ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class">
<li class="tsd-signature tsd-anchor-link" id="constructor.new_Position">new <wbr/>Position<span class="tsd-signature-symbol">(</span>x<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, y<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="Position.Position.html" class="tsd-signature-type" data-tsd-kind="Class">Position</a><a href="#constructor.new_Position" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Constructs the position.</p>
</div>
<div class="tsd-parameters">
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameter-list">
<li>
<h5>x: <span class="tsd-signature-type">number</span></h5>
<div class="tsd-comment tsd-typography"><p>x-Position</p>
</div></li>
<li>
<h5>y: <span class="tsd-signature-type">number</span></h5>
<div class="tsd-comment tsd-typography"><p>y-Position</p>
</div></li></ul></div>
<h4 class="tsd-returns-title">Returns <a href="Position.Position.html" class="tsd-signature-type" data-tsd-kind="Class">Position</a></h4><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Position.ts#L55">Position.ts:55</a></li></ul></aside></li></ul></section></section>
<section class="tsd-panel-group tsd-member-group">
<h2>Properties</h2>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private"><a id="_x" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>_x</span><a href="#_x" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<div class="tsd-signature">_x<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
<div class="tsd-comment tsd-typography"><p>X coordinate.</p>
</div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Position.ts#L9">Position.ts:9</a></li></ul></aside></section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private"><a id="_y" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>_y</span><a href="#_y" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<div class="tsd-signature">_y<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
<div class="tsd-comment tsd-typography"><p>Y coordinate.</p>
</div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Position.ts#L15">Position.ts:15</a></li></ul></aside></section></section>
<section class="tsd-panel-group tsd-member-group">
<h2>Accessors</h2>
<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="x" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>x</span><a href="#x" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<ul class="tsd-signatures tsd-kind-accessor tsd-parent-kind-class">
<li class="tsd-signature" id="x.x-1"><span class="tsd-signature-symbol">get</span> x<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Get x.</p>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Position.ts#L22">Position.ts:22</a></li></ul></aside></li>
<li class="tsd-signature" id="x.x-2"><span class="tsd-signature-symbol">set</span> x<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Set x.</p>
</div>
<div class="tsd-parameters">
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameter-list">
<li>
<h5>value: <span class="tsd-signature-type">number</span></h5></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Position.ts#L30">Position.ts:30</a></li></ul></aside></li></ul></section>
<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="y" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>y</span><a href="#y" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<ul class="tsd-signatures tsd-kind-accessor tsd-parent-kind-class">
<li class="tsd-signature" id="y.y-1"><span class="tsd-signature-symbol">get</span> y<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Get y.</p>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Position.ts#L37">Position.ts:37</a></li></ul></aside></li>
<li class="tsd-signature" id="y.y-2"><span class="tsd-signature-symbol">set</span> y<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Set y.</p>
</div>
<div class="tsd-parameters">
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameter-list">
<li>
<h5>value: <span class="tsd-signature-type">number</span></h5></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Position.ts#L45">Position.ts:45</a></li></ul></aside></li></ul></section></section></div>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
<div class="tsd-navigation settings">
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Settings</h3></summary>
<div class="tsd-accordion-details">
<div class="tsd-filter-visibility">
<h4 class="uppercase">Member Visibility</h4><form>
<ul id="tsd-filter-options">
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li>
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-private" name="private"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Private</span></label></li>
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li>
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div>
<div class="tsd-theme-toggle">
<h4 class="uppercase">Theme</h4><select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div>
<nav class="tsd-navigation primary">
<details class="tsd-index-accordion" open><summary class="tsd-accordion-summary">
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Modules</h3></summary>
<div class="tsd-accordion-details">
<ul>
<li class="current"><a href="../modules.html">Raspberry <wbr/>Rocketeer <wbr/>Docs</a>
<ul>
<li class="tsd-kind-module"><a href="../modules/Collidable.html">Collidable</a></li>
<li class="tsd-kind-module"><a href="../modules/Entity.html">Entity</a></li>
<li class="tsd-kind-module"><a href="../modules/Obstacle.html">Obstacle</a></li>
<li class="tsd-kind-module"><a href="../modules/Pipe.html">Pipe</a></li>
<li class="current selected tsd-kind-module"><a href="../modules/Position.html">Position</a></li>
<li class="tsd-kind-module"><a href="../modules/Raspberry.html">Raspberry</a></li></ul></li></ul></div></details></nav>
<nav class="tsd-navigation secondary menu-sticky">
<ul>
<li class="current tsd-kind-class tsd-parent-kind-module"><a href="Position.Position.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-128-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-128-text"></path></svg><span>Position</span></a>
<ul>
<li class="tsd-kind-constructor tsd-parent-kind-class"><a href="Position.Position.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-512-path"></use><use href="#icon-512-text"></use></svg>constructor</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="Position.Position.html#_x" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>_x</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="Position.Position.html#_y" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>_y</a></li>
<li class="tsd-kind-accessor tsd-parent-kind-class"><a href="Position.Position.html#x" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg>x</a></li>
<li class="tsd-kind-accessor tsd-parent-kind-class"><a href="Position.Position.html#y" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg>y</a></li></ul></li></ul></nav></div></div>
<div class="container tsd-generator">
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
<div class="overlay"></div><script src="../assets/main.js"></script></body></html>

View file

@ -0,0 +1,475 @@
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Raspberry | Raspberry Rocketeer Docs</title><meta name="description" content="Documentation for Raspberry Rocketeer Docs"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
<div class="tsd-toolbar-contents container">
<div class="table-cell" id="tsd-search" data-base="..">
<div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
<div class="field">
<div id="tsd-toolbar-links"></div></div>
<ul class="results">
<li class="state loading">Preparing search index...</li>
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">Raspberry Rocketeer Docs</a></div>
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
<div class="container container-main">
<div class="col-8 col-content">
<div class="tsd-page-title">
<ul class="tsd-breadcrumb">
<li><a href="../modules.html">Raspberry Rocketeer Docs</a></li>
<li><a href="../modules/Raspberry.html">Raspberry</a></li>
<li><a href="Raspberry.Raspberry.html">Raspberry</a></li></ul>
<h1>Class Raspberry</h1></div>
<section class="tsd-panel tsd-comment">
<div class="tsd-comment tsd-typography"><p>Raspberry class.</p>
</div></section>
<section class="tsd-panel tsd-hierarchy">
<h4>Hierarchy</h4>
<ul class="tsd-hierarchy">
<li><a href="Entity.Entity.html" class="tsd-signature-type" data-tsd-kind="Class">Entity</a>
<ul class="tsd-hierarchy">
<li><span class="target">Raspberry</span></li></ul></li></ul></section><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Raspberry.ts#L4">Raspberry.ts:4</a></li></ul></aside>
<section class="tsd-panel-group tsd-index-group">
<section class="tsd-panel tsd-index-panel">
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
<h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex=0><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M1.5 5.50969L8 11.6609L14.5 5.50969L12.5466 3.66086L8 7.96494L3.45341 3.66086L1.5 5.50969Z" fill="var(--color-text)"></path></svg> Index</h5></summary>
<div class="tsd-accordion-details">
<section class="tsd-index-section">
<h3 class="tsd-index-heading">Constructors</h3>
<div class="tsd-index-list"><a href="Raspberry.Raspberry.html#constructor" class="tsd-index-link tsd-kind-constructor tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#4D7FFF" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-512-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-512-text"></path></svg><span>constructor</span></a>
</div></section>
<section class="tsd-index-section">
<h3 class="tsd-index-heading">Properties</h3>
<div class="tsd-index-list"><a href="Raspberry.Raspberry.html#_image" class="tsd-index-link tsd-kind-property tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-1024-path"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)" id="icon-1024-text"></path></svg><span>_image</span></a>
<a href="Raspberry.Raspberry.html#_velocity" class="tsd-index-link tsd-kind-property tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>_velocity</span></a>
<a href="Raspberry.Raspberry.html#gravity" class="tsd-index-link tsd-kind-property tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>gravity</span></a>
<a href="Raspberry.Raspberry.html#lift" class="tsd-index-link tsd-kind-property tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>lift</span></a>
<a href="Raspberry.Raspberry.html#FILL" class="tsd-index-link tsd-kind-property tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>FILL</span></a>
<a href="Raspberry.Raspberry.html#HEIGHT" class="tsd-index-link tsd-kind-property tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>HEIGHT</span></a>
<a href="Raspberry.Raspberry.html#WIDTH" class="tsd-index-link tsd-kind-property tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>WIDTH</span></a>
<a href="Raspberry.Raspberry.html#maxVelocity" class="tsd-index-link tsd-kind-property tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>max<wbr/>Velocity</span></a>
<a href="Raspberry.Raspberry.html#position" class="tsd-index-link tsd-kind-property tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>position</span></a>
</div></section>
<section class="tsd-index-section">
<h3 class="tsd-index-heading">Accessors</h3>
<div class="tsd-index-list"><a href="Raspberry.Raspberry.html#height-1" class="tsd-index-link tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF4D4D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-262144-path"></rect><path d="M8.85 16L11.13 7.24H12.582L14.85 16H13.758L13.182 13.672H10.53L9.954 16H8.85ZM10.746 12.76H12.954L12.282 10.06C12.154 9.548 12.054 9.12 11.982 8.776C11.91 8.432 11.866 8.208 11.85 8.104C11.834 8.208 11.79 8.432 11.718 8.776C11.646 9.12 11.546 9.544 11.418 10.048L10.746 12.76Z" fill="var(--color-text)" id="icon-262144-text"></path></svg><span>height</span></a>
<a href="Raspberry.Raspberry.html#image" class="tsd-index-link tsd-kind-accessor tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg><span>image</span></a>
<a href="Raspberry.Raspberry.html#position-1" class="tsd-index-link tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg><span>position</span></a>
<a href="Raspberry.Raspberry.html#showHitbox" class="tsd-index-link tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg><span>show<wbr/>Hitbox</span></a>
<a href="Raspberry.Raspberry.html#velocity" class="tsd-index-link tsd-kind-accessor tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg><span>velocity</span></a>
<a href="Raspberry.Raspberry.html#width-1" class="tsd-index-link tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg><span>width</span></a>
</div></section>
<section class="tsd-index-section">
<h3 class="tsd-index-heading">Methods</h3>
<div class="tsd-index-list"><a href="Raspberry.Raspberry.html#applyGravity" class="tsd-index-link tsd-kind-method tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF4DB8" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-2048-path"></rect><path d="M9.162 16V7.24H10.578L11.514 10.072C11.602 10.328 11.674 10.584 11.73 10.84C11.794 11.088 11.842 11.28 11.874 11.416C11.906 11.28 11.954 11.088 12.018 10.84C12.082 10.584 12.154 10.324 12.234 10.06L13.122 7.24H14.538V16H13.482V12.82C13.482 12.468 13.49 12.068 13.506 11.62C13.53 11.172 13.558 10.716 13.59 10.252C13.622 9.78 13.654 9.332 13.686 8.908C13.726 8.476 13.762 8.1 13.794 7.78L12.366 12.16H11.334L9.894 7.78C9.934 8.092 9.97 8.456 10.002 8.872C10.042 9.28 10.078 9.716 10.11 10.18C10.142 10.636 10.166 11.092 10.182 11.548C10.206 12.004 10.218 12.428 10.218 12.82V16H9.162Z" fill="var(--color-text)" id="icon-2048-text"></path></svg><span>apply<wbr/>Gravity</span></a>
<a href="Raspberry.Raspberry.html#boost" class="tsd-index-link tsd-kind-method tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>boost</span></a>
<a href="Raspberry.Raspberry.html#boundaryBottom" class="tsd-index-link tsd-kind-method tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>boundary<wbr/>Bottom</span></a>
<a href="Raspberry.Raspberry.html#boundaryTop" class="tsd-index-link tsd-kind-method tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>boundary<wbr/>Top</span></a>
<a href="Raspberry.Raspberry.html#draw" class="tsd-index-link tsd-kind-method tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>draw</span></a>
<a href="Raspberry.Raspberry.html#drawHitBox" class="tsd-index-link tsd-kind-method tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>draw<wbr/>Hit<wbr/>Box</span></a>
<a href="Raspberry.Raspberry.html#drawObject" class="tsd-index-link tsd-kind-method tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>draw<wbr/>Object</span></a>
<a href="Raspberry.Raspberry.html#drawRocket" class="tsd-index-link tsd-kind-method tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>draw<wbr/>Rocket</span></a>
<a href="Raspberry.Raspberry.html#forceBoundaries" class="tsd-index-link tsd-kind-method tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>force<wbr/>Boundaries</span></a>
<a href="Raspberry.Raspberry.html#setPose" class="tsd-index-link tsd-kind-method tsd-parent-kind-class tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>set<wbr/>Pose</span></a>
<a href="Raspberry.Raspberry.html#update" class="tsd-index-link tsd-kind-method tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>update</span></a>
</div></section></div></details></section></section>
<section class="tsd-panel-group tsd-member-group">
<h2>Constructors</h2>
<section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class"><a id="constructor" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none" id="icon-anchor-a"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5" id="icon-anchor-b"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5" id="icon-anchor-c"></path></svg></a></h3>
<ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class">
<li class="tsd-signature tsd-anchor-link" id="constructor.new_Raspberry">new <wbr/>Raspberry<span class="tsd-signature-symbol">(</span>image<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="Raspberry.Raspberry.html" class="tsd-signature-type" data-tsd-kind="Class">Raspberry</a><a href="#constructor.new_Raspberry" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Constructs the Raspberry with fixed sizes.</p>
</div>
<div class="tsd-parameters">
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameter-list">
<li>
<h5>image: <span class="tsd-signature-type">string</span></h5>
<div class="tsd-comment tsd-typography"><p>Path to image</p>
</div></li></ul></div>
<h4 class="tsd-returns-title">Returns <a href="Raspberry.Raspberry.html" class="tsd-signature-type" data-tsd-kind="Class">Raspberry</a></h4><aside class="tsd-sources">
<p>Overrides <a href="Entity.Entity.html">Entity</a>.<a href="Entity.Entity.html#constructor">constructor</a></p>
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Raspberry.ts#L97">Raspberry.ts:97</a></li></ul></aside></li></ul></section></section>
<section class="tsd-panel-group tsd-member-group">
<h2>Properties</h2>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private"><a id="_image" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>_image</span><a href="#_image" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<div class="tsd-signature">_image<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Image</span></div>
<div class="tsd-comment tsd-typography"><p>Image for the raspberry.</p>
</div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Raspberry.ts#L27">Raspberry.ts:27</a></li></ul></aside></section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private"><a id="_velocity" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>_velocity</span><a href="#_velocity" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<div class="tsd-signature">_velocity<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></div>
<div class="tsd-comment tsd-typography"><p>Current speed.</p>
</div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Raspberry.ts#L21">Raspberry.ts:21</a></li></ul></aside></section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private"><a id="gravity" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <code class="tsd-tag ts-flagReadonly">Readonly</code> <span>gravity</span><a href="#gravity" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<div class="tsd-signature">gravity<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 1.314159265358979323846264338</span></div>
<div class="tsd-comment tsd-typography"><p>Gravity applied.</p>
</div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Raspberry.ts#L15">Raspberry.ts:15</a></li></ul></aside></section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private"><a id="lift" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <code class="tsd-tag ts-flagReadonly">Readonly</code> <span>lift</span><a href="#lift" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<div class="tsd-signature">lift<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = -20</span></div>
<div class="tsd-comment tsd-typography"><p>Amount of lift applied when boosting.</p>
</div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Raspberry.ts#L9">Raspberry.ts:9</a></li></ul></aside></section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private"><a id="FILL" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <code class="tsd-tag ts-flagPrivate">Private</code> <code class="tsd-tag ts-flagReadonly">Readonly</code> <span>FILL</span><a href="#FILL" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<div class="tsd-signature">FILL<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></div>
<div class="tsd-comment tsd-typography"><p>Color.</p>
</div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Raspberry.ts#L57">Raspberry.ts:57</a></li></ul></aside></section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private"><a id="HEIGHT" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <code class="tsd-tag ts-flagPrivate">Private</code> <code class="tsd-tag ts-flagReadonly">Readonly</code> <span>HEIGHT</span><a href="#HEIGHT" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<div class="tsd-signature">HEIGHT<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 70</span></div>
<div class="tsd-comment tsd-typography"><p>Height.</p>
</div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Raspberry.ts#L51">Raspberry.ts:51</a></li></ul></aside></section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private"><a id="WIDTH" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <code class="tsd-tag ts-flagPrivate">Private</code> <code class="tsd-tag ts-flagReadonly">Readonly</code> <span>WIDTH</span><a href="#WIDTH" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<div class="tsd-signature">WIDTH<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 180</span></div>
<div class="tsd-comment tsd-typography"><p>Width.</p>
</div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Raspberry.ts#L45">Raspberry.ts:45</a></li></ul></aside></section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private"><a id="maxVelocity" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <code class="tsd-tag ts-flagPrivate">Private</code> <code class="tsd-tag ts-flagReadonly">Readonly</code> <span>max<wbr/>Velocity</span><a href="#maxVelocity" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<div class="tsd-signature">max<wbr/>Velocity<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 100</span></div>
<div class="tsd-comment tsd-typography"><p>Maximum velocity, so the raspberry doesn&#39;t get to infinite speed when boosting.</p>
</div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Raspberry.ts#L39">Raspberry.ts:39</a></li></ul></aside></section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private"><a id="position" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <code class="tsd-tag ts-flagPrivate">Private</code> <span>position</span><a href="#position" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<div class="tsd-signature">position<span class="tsd-signature-symbol">:</span> <a href="Position.Position.html" class="tsd-signature-type" data-tsd-kind="Class">Position</a></div>
<div class="tsd-comment tsd-typography"><p>Position.</p>
</div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Raspberry.ts#L33">Raspberry.ts:33</a></li></ul></aside></section></section>
<section class="tsd-panel-group tsd-member-group">
<h2>Accessors</h2>
<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><a id="height-1" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>height</span><a href="#height-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<ul class="tsd-signatures tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited">
<li class="tsd-signature" id="height-1.height-2"><span class="tsd-signature-symbol">get</span> height<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Get height.</p>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
<p>Inherited from Entity.height</p>
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L70">Entity.ts:70</a></li></ul></aside></li>
<li class="tsd-signature" id="height-1.height-3"><span class="tsd-signature-symbol">set</span> height<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Set height.</p>
</div>
<div class="tsd-parameters">
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameter-list">
<li>
<h5>value: <span class="tsd-signature-type">number</span></h5></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
<p>Inherited from Entity.height</p>
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L78">Entity.ts:78</a></li></ul></aside></li></ul></section>
<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="image" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>image</span><a href="#image" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<ul class="tsd-signatures tsd-kind-accessor tsd-parent-kind-class">
<li class="tsd-signature" id="image.image-1"><span class="tsd-signature-symbol">get</span> image<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Image</span></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Gets the image.</p>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Image</span></h4><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Raspberry.ts#L79">Raspberry.ts:79</a></li></ul></aside></li>
<li class="tsd-signature" id="image.image-2"><span class="tsd-signature-symbol">set</span> image<span class="tsd-signature-symbol">(</span>path<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Sets the image by path.</p>
</div>
<div class="tsd-parameters">
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameter-list">
<li>
<h5>path: <span class="tsd-signature-type">any</span></h5></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Raspberry.ts#L87">Raspberry.ts:87</a></li></ul></aside></li></ul></section>
<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><a id="position-1" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>position</span><a href="#position-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<ul class="tsd-signatures tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited">
<li class="tsd-signature" id="position-1.position-2"><span class="tsd-signature-symbol">get</span> position<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="Position.Position.html" class="tsd-signature-type" data-tsd-kind="Class">Position</a></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Get position.</p>
</div>
<h4 class="tsd-returns-title">Returns <a href="Position.Position.html" class="tsd-signature-type" data-tsd-kind="Class">Position</a></h4><aside class="tsd-sources">
<p>Inherited from Entity.position</p>
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L40">Entity.ts:40</a></li></ul></aside></li>
<li class="tsd-signature" id="position-1.position-3"><span class="tsd-signature-symbol">set</span> position<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><a href="Position.Position.html" class="tsd-signature-type" data-tsd-kind="Class">Position</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Set position.</p>
</div>
<div class="tsd-parameters">
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameter-list">
<li>
<h5>value: <a href="Position.Position.html" class="tsd-signature-type" data-tsd-kind="Class">Position</a></h5></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
<p>Inherited from Entity.position</p>
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L48">Entity.ts:48</a></li></ul></aside></li></ul></section>
<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><a id="showHitbox" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>show<wbr/>Hitbox</span><a href="#showHitbox" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<ul class="tsd-signatures tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited">
<li class="tsd-signature" id="showHitbox.showHitbox-1"><span class="tsd-signature-symbol">get</span> showHitbox<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Get the hitbox&#39;s visibility.</p>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources">
<p>Inherited from Entity.showHitbox</p>
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L85">Entity.ts:85</a></li></ul></aside></li>
<li class="tsd-signature" id="showHitbox.showHitbox-2"><span class="tsd-signature-symbol">set</span> showHitbox<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Set the hitbox&#39;s visibility.</p>
</div>
<div class="tsd-parameters">
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameter-list">
<li>
<h5>value: <span class="tsd-signature-type">boolean</span></h5></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
<p>Inherited from Entity.showHitbox</p>
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L93">Entity.ts:93</a></li></ul></aside></li></ul></section>
<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="velocity" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>velocity</span><a href="#velocity" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<ul class="tsd-signatures tsd-kind-accessor tsd-parent-kind-class">
<li class="tsd-signature" id="velocity.velocity-1"><span class="tsd-signature-symbol">get</span> velocity<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Gets the velocity.</p>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Raspberry.ts#L64">Raspberry.ts:64</a></li></ul></aside></li>
<li class="tsd-signature" id="velocity.velocity-2"><span class="tsd-signature-symbol">set</span> velocity<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Sets the velocity.</p>
</div>
<div class="tsd-parameters">
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameter-list">
<li>
<h5>value: <span class="tsd-signature-type">number</span></h5></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Raspberry.ts#L72">Raspberry.ts:72</a></li></ul></aside></li></ul></section>
<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><a id="width-1" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>width</span><a href="#width-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<ul class="tsd-signatures tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited">
<li class="tsd-signature" id="width-1.width-2"><span class="tsd-signature-symbol">get</span> width<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Get width.</p>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
<p>Inherited from Entity.width</p>
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L55">Entity.ts:55</a></li></ul></aside></li>
<li class="tsd-signature" id="width-1.width-3"><span class="tsd-signature-symbol">set</span> width<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Set width.</p>
</div>
<div class="tsd-parameters">
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameter-list">
<li>
<h5>value: <span class="tsd-signature-type">number</span></h5></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
<p>Inherited from Entity.width</p>
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Entity.ts#L63">Entity.ts:63</a></li></ul></aside></li></ul></section></section>
<section class="tsd-panel-group tsd-member-group">
<h2>Methods</h2>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-private"><a id="applyGravity" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>apply<wbr/>Gravity</span><a href="#applyGravity" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-private">
<li class="tsd-signature tsd-anchor-link" id="applyGravity.applyGravity-1">apply<wbr/>Gravity<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#applyGravity.applyGravity-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Lets the Raspberry fall to the ground</p>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Raspberry.ts#L114">Raspberry.ts:114</a></li></ul></aside></li></ul></section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="boost" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>boost</span><a href="#boost" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-anchor-link" id="boost.boost-1">boost<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#boost.boost-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Lets the raspberry jump.</p>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Raspberry.ts#L153">Raspberry.ts:153</a></li></ul></aside></li></ul></section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-private"><a id="boundaryBottom" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>boundary<wbr/>Bottom</span><a href="#boundaryBottom" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-private">
<li class="tsd-signature tsd-anchor-link" id="boundaryBottom.boundaryBottom-1">boundary<wbr/>Bottom<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#boundaryBottom.boundaryBottom-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
<li class="tsd-description"><code class="tsd-tag ts-flagPrivate">Private</code>
<div class="tsd-comment tsd-typography"><p>Forces the boundaries at the canvas&#39; bottom.</p>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Raspberry.ts#L143">Raspberry.ts:143</a></li></ul></aside></li></ul></section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-private"><a id="boundaryTop" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>boundary<wbr/>Top</span><a href="#boundaryTop" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-private">
<li class="tsd-signature tsd-anchor-link" id="boundaryTop.boundaryTop-1">boundary<wbr/>Top<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#boundaryTop.boundaryTop-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
<li class="tsd-description"><code class="tsd-tag ts-flagPrivate">Private</code>
<div class="tsd-comment tsd-typography"><p>Forces the boundaries at the canvas&#39; top.</p>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Raspberry.ts#L132">Raspberry.ts:132</a></li></ul></aside></li></ul></section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="draw" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>draw</span><a href="#draw" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-anchor-link" id="draw.draw-1">draw<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#draw.draw-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Draws raspberry.</p>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
<p>Overrides <a href="Entity.Entity.html">Entity</a>.<a href="Entity.Entity.html#draw">draw</a></p>
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Raspberry.ts#L160">Raspberry.ts:160</a></li></ul></aside></li></ul></section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-private"><a id="drawHitBox" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>draw<wbr/>Hit<wbr/>Box</span><a href="#drawHitBox" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-private">
<li class="tsd-signature tsd-anchor-link" id="drawHitBox.drawHitBox-1">draw<wbr/>Hit<wbr/>Box<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#drawHitBox.drawHitBox-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>If enabled, draws the hitbox.</p>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Raspberry.ts#L188">Raspberry.ts:188</a></li></ul></aside></li></ul></section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-private"><a id="drawObject" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>draw<wbr/>Object</span><a href="#drawObject" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-private">
<li class="tsd-signature tsd-anchor-link" id="drawObject.drawObject-1">draw<wbr/>Object<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#drawObject.drawObject-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
<li class="tsd-description"><code class="tsd-tag ts-flagPrivate">Private</code>
<div class="tsd-comment tsd-typography"><p>Draws the rocket.</p>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Raspberry.ts#L172">Raspberry.ts:172</a></li></ul></aside></li></ul></section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-private"><a id="drawRocket" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>draw<wbr/>Rocket</span><a href="#drawRocket" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-private">
<li class="tsd-signature tsd-anchor-link" id="drawRocket.drawRocket-1">draw<wbr/>Rocket<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#drawRocket.drawRocket-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Handles the drawing of the object.</p>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Raspberry.ts#L180">Raspberry.ts:180</a></li></ul></aside></li></ul></section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-private"><a id="forceBoundaries" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>force<wbr/>Boundaries</span><a href="#forceBoundaries" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-private">
<li class="tsd-signature tsd-anchor-link" id="forceBoundaries.forceBoundaries-1">force<wbr/>Boundaries<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#forceBoundaries.forceBoundaries-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
<li class="tsd-description"><code class="tsd-tag ts-flagPrivate">Private</code>
<div class="tsd-comment tsd-typography"><p>Limits the raspberry&#39;s movement to the shown canvas.</p>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Raspberry.ts#L123">Raspberry.ts:123</a></li></ul></aside></li></ul></section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-private"><a id="setPose" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>set<wbr/>Pose</span><a href="#setPose" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-private">
<li class="tsd-signature tsd-anchor-link" id="setPose.setPose-1">set<wbr/>Pose<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#setPose.setPose-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
<li class="tsd-description"><code class="tsd-tag ts-flagPrivate">Private</code>
<div class="tsd-comment tsd-typography"><p>Rotation and position of the rocket.</p>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Raspberry.ts#L198">Raspberry.ts:198</a></li></ul></aside></li></ul></section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="update" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>update</span><a href="#update" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-anchor-link" id="update.update-1">update<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#update.update-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Applies gravity and keeps the raspberry within the canvas.</p>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
<p>Overrides <a href="Entity.Entity.html">Entity</a>.<a href="Entity.Entity.html#update">update</a></p>
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Raspberry.ts#L106">Raspberry.ts:106</a></li></ul></aside></li></ul></section></section></div>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
<div class="tsd-navigation settings">
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Settings</h3></summary>
<div class="tsd-accordion-details">
<div class="tsd-filter-visibility">
<h4 class="uppercase">Member Visibility</h4><form>
<ul id="tsd-filter-options">
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li>
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-private" name="private"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Private</span></label></li>
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li>
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div>
<div class="tsd-theme-toggle">
<h4 class="uppercase">Theme</h4><select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div>
<nav class="tsd-navigation primary">
<details class="tsd-index-accordion" open><summary class="tsd-accordion-summary">
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Modules</h3></summary>
<div class="tsd-accordion-details">
<ul>
<li class="current"><a href="../modules.html">Raspberry <wbr/>Rocketeer <wbr/>Docs</a>
<ul>
<li class="tsd-kind-module"><a href="../modules/Collidable.html">Collidable</a></li>
<li class="tsd-kind-module"><a href="../modules/Entity.html">Entity</a></li>
<li class="tsd-kind-module"><a href="../modules/Obstacle.html">Obstacle</a></li>
<li class="tsd-kind-module"><a href="../modules/Pipe.html">Pipe</a></li>
<li class="tsd-kind-module"><a href="../modules/Position.html">Position</a></li>
<li class="current selected tsd-kind-module"><a href="../modules/Raspberry.html">Raspberry</a></li></ul></li></ul></div></details></nav>
<nav class="tsd-navigation secondary menu-sticky">
<ul>
<li class="current tsd-kind-class tsd-parent-kind-module"><a href="Raspberry.Raspberry.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-128-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-128-text"></path></svg><span>Raspberry</span></a>
<ul>
<li class="tsd-kind-constructor tsd-parent-kind-class"><a href="Raspberry.Raspberry.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-512-path"></use><use href="#icon-512-text"></use></svg>constructor</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="Raspberry.Raspberry.html#_image" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>_image</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="Raspberry.Raspberry.html#_velocity" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>_velocity</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="Raspberry.Raspberry.html#gravity" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>gravity</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="Raspberry.Raspberry.html#lift" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>lift</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="Raspberry.Raspberry.html#FILL" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>FILL</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="Raspberry.Raspberry.html#HEIGHT" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>HEIGHT</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="Raspberry.Raspberry.html#WIDTH" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>WIDTH</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="Raspberry.Raspberry.html#maxVelocity" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>max<wbr/>Velocity</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="Raspberry.Raspberry.html#position" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>position</a></li>
<li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><a href="Raspberry.Raspberry.html#height-1" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg>height</a></li>
<li class="tsd-kind-accessor tsd-parent-kind-class"><a href="Raspberry.Raspberry.html#image" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg>image</a></li>
<li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><a href="Raspberry.Raspberry.html#position-1" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg>position</a></li>
<li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><a href="Raspberry.Raspberry.html#showHitbox" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg>show<wbr/>Hitbox</a></li>
<li class="tsd-kind-accessor tsd-parent-kind-class"><a href="Raspberry.Raspberry.html#velocity" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg>velocity</a></li>
<li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><a href="Raspberry.Raspberry.html#width-1" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg>width</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><a href="Raspberry.Raspberry.html#applyGravity" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg>apply<wbr/>Gravity</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="Raspberry.Raspberry.html#boost" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg>boost</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><a href="Raspberry.Raspberry.html#boundaryBottom" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg>boundary<wbr/>Bottom</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><a href="Raspberry.Raspberry.html#boundaryTop" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg>boundary<wbr/>Top</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="Raspberry.Raspberry.html#draw" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg>draw</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><a href="Raspberry.Raspberry.html#drawHitBox" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg>draw<wbr/>Hit<wbr/>Box</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><a href="Raspberry.Raspberry.html#drawObject" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg>draw<wbr/>Object</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><a href="Raspberry.Raspberry.html#drawRocket" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg>draw<wbr/>Rocket</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><a href="Raspberry.Raspberry.html#forceBoundaries" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg>force<wbr/>Boundaries</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><a href="Raspberry.Raspberry.html#setPose" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg>set<wbr/>Pose</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="Raspberry.Raspberry.html#update" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg>update</a></li></ul></li></ul></nav></div></div>
<div class="container tsd-generator">
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
<div class="overlay"></div><script src="../assets/main.js"></script></body></html>

47
docs/index.html Normal file

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,95 @@
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Collidable | Raspberry Rocketeer Docs</title><meta name="description" content="Documentation for Raspberry Rocketeer Docs"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
<div class="tsd-toolbar-contents container">
<div class="table-cell" id="tsd-search" data-base="..">
<div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
<div class="field">
<div id="tsd-toolbar-links"></div></div>
<ul class="results">
<li class="state loading">Preparing search index...</li>
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">Raspberry Rocketeer Docs</a></div>
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
<div class="container container-main">
<div class="col-8 col-content">
<div class="tsd-page-title">
<ul class="tsd-breadcrumb">
<li><a href="../modules.html">Raspberry Rocketeer Docs</a></li>
<li><a href="../modules/Collidable.html">Collidable</a></li>
<li><a href="Collidable.Collidable.html">Collidable</a></li></ul>
<h1>Interface Collidable</h1></div>
<section class="tsd-panel tsd-comment">
<div class="tsd-comment tsd-typography"><p>Collide-able objects.</p>
</div></section>
<section class="tsd-panel tsd-hierarchy">
<h4>Hierarchy</h4>
<ul class="tsd-hierarchy">
<li><span class="target">Collidable</span></li></ul></section>
<section class="tsd-panel">
<h4>Implemented by</h4>
<ul class="tsd-hierarchy">
<li><a href="../classes/Obstacle.Obstacle.html" class="tsd-signature-type" data-tsd-kind="Class">Obstacle</a></li>
<li><a href="../classes/Pipe.Pipe.html" class="tsd-signature-type" data-tsd-kind="Class">Pipe</a></li></ul></section><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Collidable.ts#L4">Collidable.ts:4</a></li></ul></aside>
<section class="tsd-panel-group tsd-index-group">
<section class="tsd-panel tsd-index-panel">
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
<h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex=0><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M1.5 5.50969L8 11.6609L14.5 5.50969L12.5466 3.66086L8 7.96494L3.45341 3.66086L1.5 5.50969Z" fill="var(--color-text)"></path></svg> Index</h5></summary>
<div class="tsd-accordion-details">
<section class="tsd-index-section">
<h3 class="tsd-index-heading">Methods</h3>
<div class="tsd-index-list"><a href="Collidable.Collidable.html#collides" class="tsd-index-link tsd-kind-method tsd-parent-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF4DB8" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-2048-path"></rect><path d="M9.162 16V7.24H10.578L11.514 10.072C11.602 10.328 11.674 10.584 11.73 10.84C11.794 11.088 11.842 11.28 11.874 11.416C11.906 11.28 11.954 11.088 12.018 10.84C12.082 10.584 12.154 10.324 12.234 10.06L13.122 7.24H14.538V16H13.482V12.82C13.482 12.468 13.49 12.068 13.506 11.62C13.53 11.172 13.558 10.716 13.59 10.252C13.622 9.78 13.654 9.332 13.686 8.908C13.726 8.476 13.762 8.1 13.794 7.78L12.366 12.16H11.334L9.894 7.78C9.934 8.092 9.97 8.456 10.002 8.872C10.042 9.28 10.078 9.716 10.11 10.18C10.142 10.636 10.166 11.092 10.182 11.548C10.206 12.004 10.218 12.428 10.218 12.82V16H9.162Z" fill="var(--color-text)" id="icon-2048-text"></path></svg><span>collides</span></a>
</div></section></div></details></section></section>
<section class="tsd-panel-group tsd-member-group">
<h2>Methods</h2>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="collides" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>collides</span><a href="#collides" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none" id="icon-anchor-a"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5" id="icon-anchor-b"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5" id="icon-anchor-c"></path></svg></a></h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface">
<li class="tsd-signature tsd-anchor-link" id="collides.collides-1">collides<span class="tsd-signature-symbol">(</span>o<span class="tsd-signature-symbol">: </span><a href="../classes/Entity.Entity.html" class="tsd-signature-type" data-tsd-kind="Class">Entity</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#collides.collides-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Determines when two entities collide</p>
</div>
<div class="tsd-parameters">
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameter-list">
<li>
<h5>o: <a href="../classes/Entity.Entity.html" class="tsd-signature-type" data-tsd-kind="Class">Entity</a></h5>
<div class="tsd-comment tsd-typography"><p>other entity</p>
</div></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/s-prechtl/RaspberryRocketeer/blob/f1318e4/frontend/model/Collidable.ts#L9">Collidable.ts:9</a></li></ul></aside></li></ul></section></section></div>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
<div class="tsd-navigation settings">
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Settings</h3></summary>
<div class="tsd-accordion-details">
<div class="tsd-filter-visibility">
<h4 class="uppercase">Member Visibility</h4><form>
<ul id="tsd-filter-options">
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li>
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-private" name="private"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Private</span></label></li>
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li>
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div>
<div class="tsd-theme-toggle">
<h4 class="uppercase">Theme</h4><select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div>
<nav class="tsd-navigation primary">
<details class="tsd-index-accordion" open><summary class="tsd-accordion-summary">
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Modules</h3></summary>
<div class="tsd-accordion-details">
<ul>
<li class="current"><a href="../modules.html">Raspberry <wbr/>Rocketeer <wbr/>Docs</a>
<ul>
<li class="current selected tsd-kind-module"><a href="../modules/Collidable.html">Collidable</a></li>
<li class="tsd-kind-module"><a href="../modules/Entity.html">Entity</a></li>
<li class="tsd-kind-module"><a href="../modules/Obstacle.html">Obstacle</a></li>
<li class="tsd-kind-module"><a href="../modules/Pipe.html">Pipe</a></li>
<li class="tsd-kind-module"><a href="../modules/Position.html">Position</a></li>
<li class="tsd-kind-module"><a href="../modules/Raspberry.html">Raspberry</a></li></ul></li></ul></div></details></nav>
<nav class="tsd-navigation secondary menu-sticky">
<ul>
<li class="current tsd-kind-interface tsd-parent-kind-module"><a href="Collidable.Collidable.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-interface)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-256-path"></rect><path d="M9.51 16V15.016H11.298V8.224H9.51V7.24H14.19V8.224H12.402V15.016H14.19V16H9.51Z" fill="var(--color-text)" id="icon-256-text"></path></svg><span>Collidable</span></a>
<ul>
<li class="tsd-kind-method tsd-parent-kind-interface"><a href="Collidable.Collidable.html#collides" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg>collides</a></li></ul></li></ul></nav></div></div>
<div class="container tsd-generator">
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
<div class="overlay"></div><script src="../assets/main.js"></script></body></html>

56
docs/modules.html Normal file
View file

@ -0,0 +1,56 @@
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Raspberry Rocketeer Docs</title><meta name="description" content="Documentation for Raspberry Rocketeer Docs"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="assets/style.css"/><link rel="stylesheet" href="assets/highlight.css"/><script async src="assets/search.js" id="search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
<div class="tsd-toolbar-contents container">
<div class="table-cell" id="tsd-search" data-base=".">
<div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
<div class="field">
<div id="tsd-toolbar-links"></div></div>
<ul class="results">
<li class="state loading">Preparing search index...</li>
<li class="state failure">The search index is not available</li></ul><a href="index.html" class="title">Raspberry Rocketeer Docs</a></div>
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
<div class="container container-main">
<div class="col-8 col-content">
<div class="tsd-page-title">
<h2>Raspberry Rocketeer Docs</h2></div>
<section class="tsd-panel-group tsd-index-group">
<section class="tsd-panel tsd-index-panel">
<h3 class="tsd-index-heading uppercase">Index</h3>
<section class="tsd-index-section">
<h3 class="tsd-index-heading">Modules</h3>
<div class="tsd-index-list"><a href="modules/Collidable.html" class="tsd-index-link tsd-kind-module"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-namespace)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-4-path"></rect><path d="M9.33 16V7.24H10.77L13.446 14.74C13.43 14.54 13.41 14.296 13.386 14.008C13.37 13.712 13.354 13.404 13.338 13.084C13.33 12.756 13.326 12.448 13.326 12.16V7.24H14.37V16H12.93L10.266 8.5C10.282 8.692 10.298 8.936 10.314 9.232C10.33 9.52 10.342 9.828 10.35 10.156C10.366 10.476 10.374 10.784 10.374 11.08V16H9.33Z" fill="var(--color-text)" id="icon-4-text"></path></svg><span>Collidable</span></a>
<a href="modules/Entity.html" class="tsd-index-link tsd-kind-module"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4-path"></use><use href="#icon-4-text"></use></svg><span>Entity</span></a>
<a href="modules/Obstacle.html" class="tsd-index-link tsd-kind-module"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4-path"></use><use href="#icon-4-text"></use></svg><span>Obstacle</span></a>
<a href="modules/Pipe.html" class="tsd-index-link tsd-kind-module"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4-path"></use><use href="#icon-4-text"></use></svg><span>Pipe</span></a>
<a href="modules/Position.html" class="tsd-index-link tsd-kind-module"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4-path"></use><use href="#icon-4-text"></use></svg><span>Position</span></a>
<a href="modules/Raspberry.html" class="tsd-index-link tsd-kind-module"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4-path"></use><use href="#icon-4-text"></use></svg><span>Raspberry</span></a>
</div></section></section></section></div>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
<div class="tsd-navigation settings">
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Settings</h3></summary>
<div class="tsd-accordion-details">
<div class="tsd-filter-visibility">
<h4 class="uppercase">Member Visibility</h4><form>
<ul id="tsd-filter-options">
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li>
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-private" name="private"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Private</span></label></li>
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li>
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div>
<div class="tsd-theme-toggle">
<h4 class="uppercase">Theme</h4><select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div>
<nav class="tsd-navigation primary">
<details class="tsd-index-accordion" open><summary class="tsd-accordion-summary">
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Modules</h3></summary>
<div class="tsd-accordion-details">
<ul>
<li class="current selected"><a href="modules.html">Raspberry <wbr/>Rocketeer <wbr/>Docs</a>
<ul>
<li class="tsd-kind-module"><a href="modules/Collidable.html">Collidable</a></li>
<li class="tsd-kind-module"><a href="modules/Entity.html">Entity</a></li>
<li class="tsd-kind-module"><a href="modules/Obstacle.html">Obstacle</a></li>
<li class="tsd-kind-module"><a href="modules/Pipe.html">Pipe</a></li>
<li class="tsd-kind-module"><a href="modules/Position.html">Position</a></li>
<li class="tsd-kind-module"><a href="modules/Raspberry.html">Raspberry</a></li></ul></li></ul></div></details></nav></div></div>
<div class="container tsd-generator">
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
<div class="overlay"></div><script src="assets/main.js"></script></body></html>

View file

@ -0,0 +1,59 @@
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Collidable | Raspberry Rocketeer Docs</title><meta name="description" content="Documentation for Raspberry Rocketeer Docs"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
<div class="tsd-toolbar-contents container">
<div class="table-cell" id="tsd-search" data-base="..">
<div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
<div class="field">
<div id="tsd-toolbar-links"></div></div>
<ul class="results">
<li class="state loading">Preparing search index...</li>
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">Raspberry Rocketeer Docs</a></div>
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
<div class="container container-main">
<div class="col-8 col-content">
<div class="tsd-page-title">
<ul class="tsd-breadcrumb">
<li><a href="../modules.html">Raspberry Rocketeer Docs</a></li>
<li><a href="Collidable.html">Collidable</a></li></ul>
<h1>Module Collidable</h1></div>
<section class="tsd-panel-group">
<section class="tsd-panel tsd-typography"></section></section>
<section class="tsd-panel-group tsd-index-group">
<section class="tsd-panel tsd-index-panel">
<h3 class="tsd-index-heading uppercase">Index</h3>
<section class="tsd-index-section">
<h3 class="tsd-index-heading">Interfaces</h3>
<div class="tsd-index-list"><a href="../interfaces/Collidable.Collidable.html" class="tsd-index-link tsd-kind-interface tsd-parent-kind-module"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-interface)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-256-path"></rect><path d="M9.51 16V15.016H11.298V8.224H9.51V7.24H14.19V8.224H12.402V15.016H14.19V16H9.51Z" fill="var(--color-text)" id="icon-256-text"></path></svg><span>Collidable</span></a>
</div></section></section></section></div>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
<div class="tsd-navigation settings">
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Settings</h3></summary>
<div class="tsd-accordion-details">
<div class="tsd-filter-visibility">
<h4 class="uppercase">Member Visibility</h4><form>
<ul id="tsd-filter-options">
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li>
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-private" name="private"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Private</span></label></li>
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li>
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div>
<div class="tsd-theme-toggle">
<h4 class="uppercase">Theme</h4><select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div>
<nav class="tsd-navigation primary">
<details class="tsd-index-accordion" open><summary class="tsd-accordion-summary">
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Modules</h3></summary>
<div class="tsd-accordion-details">
<ul>
<li class="current"><a href="../modules.html">Raspberry <wbr/>Rocketeer <wbr/>Docs</a>
<ul>
<li class="current selected tsd-kind-module"><a href="Collidable.html">Collidable</a></li>
<li class="tsd-kind-module"><a href="Entity.html">Entity</a></li>
<li class="tsd-kind-module"><a href="Obstacle.html">Obstacle</a></li>
<li class="tsd-kind-module"><a href="Pipe.html">Pipe</a></li>
<li class="tsd-kind-module"><a href="Position.html">Position</a></li>
<li class="tsd-kind-module"><a href="Raspberry.html">Raspberry</a></li></ul></li></ul></div></details></nav>
<nav class="tsd-navigation secondary menu-sticky">
<ul>
<li class="tsd-kind-interface tsd-parent-kind-module"><a href="../interfaces/Collidable.Collidable.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg>Collidable</a></li></ul></nav></div></div>
<div class="container tsd-generator">
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
<div class="overlay"></div><script src="../assets/main.js"></script></body></html>

59
docs/modules/Entity.html Normal file
View file

@ -0,0 +1,59 @@
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Entity | Raspberry Rocketeer Docs</title><meta name="description" content="Documentation for Raspberry Rocketeer Docs"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
<div class="tsd-toolbar-contents container">
<div class="table-cell" id="tsd-search" data-base="..">
<div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
<div class="field">
<div id="tsd-toolbar-links"></div></div>
<ul class="results">
<li class="state loading">Preparing search index...</li>
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">Raspberry Rocketeer Docs</a></div>
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
<div class="container container-main">
<div class="col-8 col-content">
<div class="tsd-page-title">
<ul class="tsd-breadcrumb">
<li><a href="../modules.html">Raspberry Rocketeer Docs</a></li>
<li><a href="Entity.html">Entity</a></li></ul>
<h1>Module Entity</h1></div>
<section class="tsd-panel-group">
<section class="tsd-panel tsd-typography"></section></section>
<section class="tsd-panel-group tsd-index-group">
<section class="tsd-panel tsd-index-panel">
<h3 class="tsd-index-heading uppercase">Index</h3>
<section class="tsd-index-section">
<h3 class="tsd-index-heading">Classes</h3>
<div class="tsd-index-list"><a href="../classes/Entity.Entity.html" class="tsd-index-link tsd-kind-class tsd-parent-kind-module"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-128-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-128-text"></path></svg><span>Entity</span></a>
</div></section></section></section></div>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
<div class="tsd-navigation settings">
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Settings</h3></summary>
<div class="tsd-accordion-details">
<div class="tsd-filter-visibility">
<h4 class="uppercase">Member Visibility</h4><form>
<ul id="tsd-filter-options">
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li>
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-private" name="private"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Private</span></label></li>
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li>
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div>
<div class="tsd-theme-toggle">
<h4 class="uppercase">Theme</h4><select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div>
<nav class="tsd-navigation primary">
<details class="tsd-index-accordion" open><summary class="tsd-accordion-summary">
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Modules</h3></summary>
<div class="tsd-accordion-details">
<ul>
<li class="current"><a href="../modules.html">Raspberry <wbr/>Rocketeer <wbr/>Docs</a>
<ul>
<li class="tsd-kind-module"><a href="Collidable.html">Collidable</a></li>
<li class="current selected tsd-kind-module"><a href="Entity.html">Entity</a></li>
<li class="tsd-kind-module"><a href="Obstacle.html">Obstacle</a></li>
<li class="tsd-kind-module"><a href="Pipe.html">Pipe</a></li>
<li class="tsd-kind-module"><a href="Position.html">Position</a></li>
<li class="tsd-kind-module"><a href="Raspberry.html">Raspberry</a></li></ul></li></ul></div></details></nav>
<nav class="tsd-navigation secondary menu-sticky">
<ul>
<li class="tsd-kind-class tsd-parent-kind-module"><a href="../classes/Entity.Entity.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg>Entity</a></li></ul></nav></div></div>
<div class="container tsd-generator">
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
<div class="overlay"></div><script src="../assets/main.js"></script></body></html>

View file

@ -0,0 +1,59 @@
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Obstacle | Raspberry Rocketeer Docs</title><meta name="description" content="Documentation for Raspberry Rocketeer Docs"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
<div class="tsd-toolbar-contents container">
<div class="table-cell" id="tsd-search" data-base="..">
<div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
<div class="field">
<div id="tsd-toolbar-links"></div></div>
<ul class="results">
<li class="state loading">Preparing search index...</li>
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">Raspberry Rocketeer Docs</a></div>
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
<div class="container container-main">
<div class="col-8 col-content">
<div class="tsd-page-title">
<ul class="tsd-breadcrumb">
<li><a href="../modules.html">Raspberry Rocketeer Docs</a></li>
<li><a href="Obstacle.html">Obstacle</a></li></ul>
<h1>Module Obstacle</h1></div>
<section class="tsd-panel-group">
<section class="tsd-panel tsd-typography"></section></section>
<section class="tsd-panel-group tsd-index-group">
<section class="tsd-panel tsd-index-panel">
<h3 class="tsd-index-heading uppercase">Index</h3>
<section class="tsd-index-section">
<h3 class="tsd-index-heading">Classes</h3>
<div class="tsd-index-list"><a href="../classes/Obstacle.Obstacle.html" class="tsd-index-link tsd-kind-class tsd-parent-kind-module"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-128-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-128-text"></path></svg><span>Obstacle</span></a>
</div></section></section></section></div>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
<div class="tsd-navigation settings">
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Settings</h3></summary>
<div class="tsd-accordion-details">
<div class="tsd-filter-visibility">
<h4 class="uppercase">Member Visibility</h4><form>
<ul id="tsd-filter-options">
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li>
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-private" name="private"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Private</span></label></li>
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li>
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div>
<div class="tsd-theme-toggle">
<h4 class="uppercase">Theme</h4><select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div>
<nav class="tsd-navigation primary">
<details class="tsd-index-accordion" open><summary class="tsd-accordion-summary">
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Modules</h3></summary>
<div class="tsd-accordion-details">
<ul>
<li class="current"><a href="../modules.html">Raspberry <wbr/>Rocketeer <wbr/>Docs</a>
<ul>
<li class="tsd-kind-module"><a href="Collidable.html">Collidable</a></li>
<li class="tsd-kind-module"><a href="Entity.html">Entity</a></li>
<li class="current selected tsd-kind-module"><a href="Obstacle.html">Obstacle</a></li>
<li class="tsd-kind-module"><a href="Pipe.html">Pipe</a></li>
<li class="tsd-kind-module"><a href="Position.html">Position</a></li>
<li class="tsd-kind-module"><a href="Raspberry.html">Raspberry</a></li></ul></li></ul></div></details></nav>
<nav class="tsd-navigation secondary menu-sticky">
<ul>
<li class="tsd-kind-class tsd-parent-kind-module"><a href="../classes/Obstacle.Obstacle.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg>Obstacle</a></li></ul></nav></div></div>
<div class="container tsd-generator">
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
<div class="overlay"></div><script src="../assets/main.js"></script></body></html>

59
docs/modules/Pipe.html Normal file
View file

@ -0,0 +1,59 @@
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Pipe | Raspberry Rocketeer Docs</title><meta name="description" content="Documentation for Raspberry Rocketeer Docs"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
<div class="tsd-toolbar-contents container">
<div class="table-cell" id="tsd-search" data-base="..">
<div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
<div class="field">
<div id="tsd-toolbar-links"></div></div>
<ul class="results">
<li class="state loading">Preparing search index...</li>
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">Raspberry Rocketeer Docs</a></div>
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
<div class="container container-main">
<div class="col-8 col-content">
<div class="tsd-page-title">
<ul class="tsd-breadcrumb">
<li><a href="../modules.html">Raspberry Rocketeer Docs</a></li>
<li><a href="Pipe.html">Pipe</a></li></ul>
<h1>Module Pipe</h1></div>
<section class="tsd-panel-group">
<section class="tsd-panel tsd-typography"></section></section>
<section class="tsd-panel-group tsd-index-group">
<section class="tsd-panel tsd-index-panel">
<h3 class="tsd-index-heading uppercase">Index</h3>
<section class="tsd-index-section">
<h3 class="tsd-index-heading">Classes</h3>
<div class="tsd-index-list"><a href="../classes/Pipe.Pipe.html" class="tsd-index-link tsd-kind-class tsd-parent-kind-module"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-128-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-128-text"></path></svg><span>Pipe</span></a>
</div></section></section></section></div>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
<div class="tsd-navigation settings">
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Settings</h3></summary>
<div class="tsd-accordion-details">
<div class="tsd-filter-visibility">
<h4 class="uppercase">Member Visibility</h4><form>
<ul id="tsd-filter-options">
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li>
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-private" name="private"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Private</span></label></li>
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li>
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div>
<div class="tsd-theme-toggle">
<h4 class="uppercase">Theme</h4><select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div>
<nav class="tsd-navigation primary">
<details class="tsd-index-accordion" open><summary class="tsd-accordion-summary">
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Modules</h3></summary>
<div class="tsd-accordion-details">
<ul>
<li class="current"><a href="../modules.html">Raspberry <wbr/>Rocketeer <wbr/>Docs</a>
<ul>
<li class="tsd-kind-module"><a href="Collidable.html">Collidable</a></li>
<li class="tsd-kind-module"><a href="Entity.html">Entity</a></li>
<li class="tsd-kind-module"><a href="Obstacle.html">Obstacle</a></li>
<li class="current selected tsd-kind-module"><a href="Pipe.html">Pipe</a></li>
<li class="tsd-kind-module"><a href="Position.html">Position</a></li>
<li class="tsd-kind-module"><a href="Raspberry.html">Raspberry</a></li></ul></li></ul></div></details></nav>
<nav class="tsd-navigation secondary menu-sticky">
<ul>
<li class="tsd-kind-class tsd-parent-kind-module"><a href="../classes/Pipe.Pipe.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg>Pipe</a></li></ul></nav></div></div>
<div class="container tsd-generator">
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
<div class="overlay"></div><script src="../assets/main.js"></script></body></html>

View file

@ -0,0 +1,59 @@
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Position | Raspberry Rocketeer Docs</title><meta name="description" content="Documentation for Raspberry Rocketeer Docs"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
<div class="tsd-toolbar-contents container">
<div class="table-cell" id="tsd-search" data-base="..">
<div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
<div class="field">
<div id="tsd-toolbar-links"></div></div>
<ul class="results">
<li class="state loading">Preparing search index...</li>
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">Raspberry Rocketeer Docs</a></div>
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
<div class="container container-main">
<div class="col-8 col-content">
<div class="tsd-page-title">
<ul class="tsd-breadcrumb">
<li><a href="../modules.html">Raspberry Rocketeer Docs</a></li>
<li><a href="Position.html">Position</a></li></ul>
<h1>Module Position</h1></div>
<section class="tsd-panel-group">
<section class="tsd-panel tsd-typography"></section></section>
<section class="tsd-panel-group tsd-index-group">
<section class="tsd-panel tsd-index-panel">
<h3 class="tsd-index-heading uppercase">Index</h3>
<section class="tsd-index-section">
<h3 class="tsd-index-heading">Classes</h3>
<div class="tsd-index-list"><a href="../classes/Position.Position.html" class="tsd-index-link tsd-kind-class tsd-parent-kind-module"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-128-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-128-text"></path></svg><span>Position</span></a>
</div></section></section></section></div>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
<div class="tsd-navigation settings">
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Settings</h3></summary>
<div class="tsd-accordion-details">
<div class="tsd-filter-visibility">
<h4 class="uppercase">Member Visibility</h4><form>
<ul id="tsd-filter-options">
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li>
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-private" name="private"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Private</span></label></li>
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li>
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div>
<div class="tsd-theme-toggle">
<h4 class="uppercase">Theme</h4><select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div>
<nav class="tsd-navigation primary">
<details class="tsd-index-accordion" open><summary class="tsd-accordion-summary">
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Modules</h3></summary>
<div class="tsd-accordion-details">
<ul>
<li class="current"><a href="../modules.html">Raspberry <wbr/>Rocketeer <wbr/>Docs</a>
<ul>
<li class="tsd-kind-module"><a href="Collidable.html">Collidable</a></li>
<li class="tsd-kind-module"><a href="Entity.html">Entity</a></li>
<li class="tsd-kind-module"><a href="Obstacle.html">Obstacle</a></li>
<li class="tsd-kind-module"><a href="Pipe.html">Pipe</a></li>
<li class="current selected tsd-kind-module"><a href="Position.html">Position</a></li>
<li class="tsd-kind-module"><a href="Raspberry.html">Raspberry</a></li></ul></li></ul></div></details></nav>
<nav class="tsd-navigation secondary menu-sticky">
<ul>
<li class="tsd-kind-class tsd-parent-kind-module"><a href="../classes/Position.Position.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg>Position</a></li></ul></nav></div></div>
<div class="container tsd-generator">
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
<div class="overlay"></div><script src="../assets/main.js"></script></body></html>

View file

@ -0,0 +1,59 @@
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Raspberry | Raspberry Rocketeer Docs</title><meta name="description" content="Documentation for Raspberry Rocketeer Docs"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
<div class="tsd-toolbar-contents container">
<div class="table-cell" id="tsd-search" data-base="..">
<div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
<div class="field">
<div id="tsd-toolbar-links"></div></div>
<ul class="results">
<li class="state loading">Preparing search index...</li>
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">Raspberry Rocketeer Docs</a></div>
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
<div class="container container-main">
<div class="col-8 col-content">
<div class="tsd-page-title">
<ul class="tsd-breadcrumb">
<li><a href="../modules.html">Raspberry Rocketeer Docs</a></li>
<li><a href="Raspberry.html">Raspberry</a></li></ul>
<h1>Module Raspberry</h1></div>
<section class="tsd-panel-group">
<section class="tsd-panel tsd-typography"></section></section>
<section class="tsd-panel-group tsd-index-group">
<section class="tsd-panel tsd-index-panel">
<h3 class="tsd-index-heading uppercase">Index</h3>
<section class="tsd-index-section">
<h3 class="tsd-index-heading">Classes</h3>
<div class="tsd-index-list"><a href="../classes/Raspberry.Raspberry.html" class="tsd-index-link tsd-kind-class tsd-parent-kind-module"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-128-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-128-text"></path></svg><span>Raspberry</span></a>
</div></section></section></section></div>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
<div class="tsd-navigation settings">
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Settings</h3></summary>
<div class="tsd-accordion-details">
<div class="tsd-filter-visibility">
<h4 class="uppercase">Member Visibility</h4><form>
<ul id="tsd-filter-options">
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li>
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-private" name="private"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Private</span></label></li>
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li>
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div>
<div class="tsd-theme-toggle">
<h4 class="uppercase">Theme</h4><select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div>
<nav class="tsd-navigation primary">
<details class="tsd-index-accordion" open><summary class="tsd-accordion-summary">
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Modules</h3></summary>
<div class="tsd-accordion-details">
<ul>
<li class="current"><a href="../modules.html">Raspberry <wbr/>Rocketeer <wbr/>Docs</a>
<ul>
<li class="tsd-kind-module"><a href="Collidable.html">Collidable</a></li>
<li class="tsd-kind-module"><a href="Entity.html">Entity</a></li>
<li class="tsd-kind-module"><a href="Obstacle.html">Obstacle</a></li>
<li class="tsd-kind-module"><a href="Pipe.html">Pipe</a></li>
<li class="tsd-kind-module"><a href="Position.html">Position</a></li>
<li class="current selected tsd-kind-module"><a href="Raspberry.html">Raspberry</a></li></ul></li></ul></div></details></nav>
<nav class="tsd-navigation secondary menu-sticky">
<ul>
<li class="tsd-kind-class tsd-parent-kind-module"><a href="../classes/Raspberry.Raspberry.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg>Raspberry</a></li></ul></nav></div></div>
<div class="container tsd-generator">
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
<div class="overlay"></div><script src="../assets/main.js"></script></body></html>

4
frontend/.browserslistrc Normal file
View file

@ -0,0 +1,4 @@
> 1%
last 2 versions
not dead
not ie 11

3
frontend/.dockerignore Normal file
View file

@ -0,0 +1,3 @@
node_modules
.gitignore
README.md

19
frontend/.eslintrc.js Normal file
View file

@ -0,0 +1,19 @@
module.exports = {
root: true,
env: {
node: true
},
'extends': [
'plugin:vue/vue3-essential',
'eslint:recommended',
'@vue/typescript/recommended'
],
parserOptions: {
ecmaVersion: 2020
},
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'vue/multi-word-component-names': 'off',
}
}

247
frontend/.gitignore vendored
View file

@ -1,235 +1,24 @@
# Project exclude paths
/frontend/node_modules/
.DS_Store
node_modules
/dist
# Created by https://www.toptal.com/developers/gitignore/api/node,phpstorm+all
# Edit at https://www.toptal.com/developers/gitignore?templates=node,phpstorm+all
### Node ###
# Logs
logs
*.log
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*
pnpm-debug.log*
# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
*.lcov
# nyc test coverage
.nyc_output
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# Snowpack dependency directory (https://snowpack.dev/)
web_modules/
# TypeScript cache
*.tsbuildinfo
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional stylelint cache
.stylelintcache
# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local
# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache
# Next.js build output
.next
out
# Nuxt.js build / generate output
.nuxt
dist
# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public
# vuepress build output
.vuepress/dist
# vuepress v2.x temp and cache directory
.temp
# Docusaurus cache and generated files
.docusaurus
# Serverless directories
.serverless/
# FuseBox cache
.fusebox/
# DynamoDB Local files
.dynamodb/
# TernJS port file
.tern-port
# Stores VSCode versions used for testing VSCode extensions
.vscode-test
# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*
### Node Patch ###
# Serverless Webpack directories
.webpack/
# Optional stylelint cache
# SvelteKit build / generate output
.svelte-kit
### PhpStorm+all ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf
# AWS User-specific
.idea/**/aws.xml
# Generated files
.idea/**/contentModel.xml
# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml
# Gradle
.idea/**/gradle.xml
.idea/**/libraries
# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr
# CMake
cmake-build-*/
# Mongo Explorer plugin
.idea/**/mongoSettings.xml
# File-based project format
*.iws
# IntelliJ
out/
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Cursive Clojure plugin
.idea/replstate.xml
# SonarLint plugin
.idea/sonarlint/
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
# Editor-based Rest Client
.idea/httpRequests
# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser
### PhpStorm+all Patch ###
# Ignore everything but code style settings and run configurations
# that are supposed to be shared within teams.
.idea/*
!.idea/codeStyles
!.idea/runConfigurations
# End of https://www.toptal.com/developers/gitignore/api/node,phpstorm+all
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
/public/game/

11
frontend/Dockerfile Normal file
View file

@ -0,0 +1,11 @@
FROM node:18
COPY . /app
WORKDIR /app
RUN npm install
EXPOSE 8080
ENTRYPOINT ["npm", "run", "serve"]

24
frontend/README.md Normal file
View file

@ -0,0 +1,24 @@
# raspberryrocketeer
## Project setup
```
npm install
```
### Compiles and hot-reloads for development
```
npm run serve
```
### Compiles and minifies for production
```
npm run build
```
### Lints and fixes files
```
npm run lint
```
### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).

View file

@ -1,3 +0,0 @@
function setup() {
createCanvas(400, 400)
}

239
frontend/game/game.ts Normal file
View file

@ -0,0 +1,239 @@
const PIPE_IMAGE_PATH: string = "resources/raspberry-low-res.png";
const BACKGROUND_IMAGE_PATH: string = "resources/raspberry-low-res.png";
const RASPBERRY_IMAGE_PATH: string = "resources/raspberry-rocket.png";
const OBSTACLE_WIDTH: number = 88;
const OBSTACLE_COUNT: number = 3;
const BOOST_KEYS = ["k", " "];
let obstacleOffset: number;
let backgroundImage: any;
let obstacles: Obstacle[] = [];
let raspberry: Raspberry;
let paused: boolean;
let score: number = 0;
let hasAlreadyScored: boolean = false;
let hasDied: boolean = false;
let ready: boolean = true;
/**
* p5 setup function.
*/
function setup() {
backgroundImage = loadImage(BACKGROUND_IMAGE_PATH);
createCanvas(1200, 750);
setupObstacleConsts();
setupFont();
setupGame();
}
/**
* Sets up the constants needed for the game.
*/
function setupObstacleConsts() {
obstacleOffset = width / OBSTACLE_COUNT;
Obstacle.distanceBetweenPipes = height / 2.5
Obstacle.startX = width;
}
/**
* Set up the font.
*/
function setupFont() {
textSize(150);
textFont(loadFont("resources/PressStart2P-Regular.ttf"));
}
/**
* Sets up everything needed for the game.
*/
function setupGame() {
paused = true;
raspberry = new Raspberry(RASPBERRY_IMAGE_PATH);
setupObstacles();
}
/**
* Clears the obstacles and reinitializes them.
*/
function setupObstacles() {
obstacles = [];
instantiateObstacles(OBSTACLE_COUNT);
obstacles.forEach((obstacle) => obstacle.randomizeHeight());
}
/**
* Instantiates a certain amount of obstacles.
* @param number
*/
function instantiateObstacles(number: number) {
for (let i = 0; i < number; i++) {
obstacles.push(
new Obstacle(new Position(width + obstacleOffset * i, 0), OBSTACLE_WIDTH, height, PIPE_IMAGE_PATH));
}
}
/**
* Draws and updates the game.
*/
function draw() {
update();
gameLoop();
drawGame();
}
/**
* Draws the game's elements.
*/
function drawGame() {
background(backgroundImage);
drawEntities();
displayScore();
}
/**
* Draws the game's enities.
*/
function drawEntities() {
raspberry.draw();
drawObstacles();
}
/**
* Operations for the game's functionality.
*/
function gameLoop() {
if (!paused) {
collisionCheck(obstacles[0]);
checkRaspberryScore();
}
}
/**
* Checks the collision between an obstacle and the raspberry.
* @param o
*/
function collisionCheck(o: Obstacle) {
if (o.collides(raspberry)) {
die();
setupGame();
}
}
/**
* Timeouts key events.
*/
function die() {
ready = false;
hasDied = true;
setTimeout(() => ready = true, 1000);
}
/**
* Displays the game score.
*/
function displayScore() {
push();
fill(200, 100, 60);
text(score, width / 2, height / 10, width, height);
pop();
}
/**
* Updates all objects.
*/
function update() {
if (!paused) {
raspberry.update();
}
obstacles.forEach((obstacle: Obstacle) => {
if (!paused) {
obstacle.update();
// Reset Obstacles Position
checkObstacleReset(obstacle);
}
})
}
/**
* Draws the obstacles.
*/
function drawObstacles() {
obstacles.forEach((obstacle) => {
obstacle.draw();
});
}
/**
* Check if obstacle positions should be reset and reset if so
* @param obstacle obstacle to check
*/
function checkObstacleReset(obstacle: Obstacle) {
if (obstacle.position.x < -OBSTACLE_WIDTH) {
obstacle.resetPosition();
obstacles.shift();
obstacles.push(obstacle);
hasAlreadyScored = false;
}
}
/**
* Check if the raspberry should score and set score
*/
function checkRaspberryScore() {
if ((obstacles[0].position.x + obstacles[0].width / 2) < (raspberry.position.x + raspberry.width / 2)
&& !hasAlreadyScored) {
score += 1;
hasAlreadyScored = true;
}
}
/**
* Resets the score if game is started
*/
function resetScore(): void {
if (hasDied) {
hasDied = false;
score = 0;
hasAlreadyScored = false;
}
}
/**
* Handler for key events.
*/
function keyPressed() {
if (!ready) return;
// Jump
if (BOOST_KEYS.includes(key.toLowerCase())) {
playerInput();
}
// Pause the Game
if (key == "Escape") {
paused = !paused;
} else if (paused) {
paused = false;
}
}
/**
* Mouse clicked event.
*/
function mouseClicked() {
if (!ready) return;
if (paused) {
paused = false;
}
playerInput();
}
/**
* Handles input for the player, when a key is pressed, or the mouse is clicked.
*/
function playerInput() {
resetScore();
raspberry.boost();
}

4
frontend/game/global.d.ts vendored Normal file
View file

@ -0,0 +1,4 @@
// This file will add both p5 instanced and global intellisense
import module = require('p5');
export = module;
export as namespace p5;

View file

@ -0,0 +1,10 @@
/**
* Collide-able objects.
*/
interface Collidable {
/**
* Determines when two entities collide
* @param o other entity
*/
collides(o: Entity): boolean;
}

View file

@ -0,0 +1,127 @@
/**
* General rectangular entities.
*/
abstract class Entity {
/**
* Position.
* @private
*/
private _position: Position;
/**
* Width.
* @private
*/
private _width: number;
/**
* Height.
* @private
*/
private _height: number;
/**
* Color.
* @private
*/
private fill: number;
/**
* Whether the hitbox (rectangular surrounding) is shown, or not.
* @private
*/
private _showHitbox: boolean;
//region Getter & Setter
/**
* Get position.
*/
get position(): Position {
return this._position;
}
/**
* Set position.
* @param value
*/
set position(value: Position) {
this._position = value;
}
/**
* Get width.
*/
get width(): number {
return this._width;
}
/**
* Set width.
* @param value
*/
set width(value: number) {
this._width = value;
}
/**
* Get height.
*/
get height(): number {
return this._height;
}
/**
* Set height.
* @param value
*/
set height(value: number) {
this._height = value;
}
/**
* Get the hitbox's visibility.
*/
get showHitbox(): boolean {
return this._showHitbox;
}
/**
* Set the hitbox's visibility.
* @param value
*/
set showHitbox(value: boolean) {
this._showHitbox = value;
}
//endregion
/**
* Constructs the Entity.
* @param position starting Position
* @param width entity width
* @param height entity height
* @param fill fill color
*/
protected constructor(position: Position, width: number, height: number, fill: number) {
this.position = position;
this.width = width;
this.height = height;
this.fill = fill;
this._showHitbox = false;
}
/**
* Updates the entity.
*/
public abstract update(): void;
/**
* Draws the entity.
*/
public draw(): void {
push();
fill(this.fill);
rect(this.position.x, this.position.y, this.width, this.height);
pop();
}
}

View file

@ -0,0 +1,92 @@
/**
* Obstacle of the game. Built from 2 pipes, one at the bottom, one at the top.
*/
class Obstacle extends Entity implements Collidable {
private pipeTop: Pipe;
private pipeBottom: Pipe;
private readonly padding: number = 150;
private readonly speed: number = 3;
private static _distanceBetweenPipes: number;
private static _startX: number;
static set startX(value: number) {
this._startX = value;
}
static set distanceBetweenPipes(value: number) {
this._distanceBetweenPipes = value;
}
/**
* Constructs the Obstacle with the given image.
* @param position starting position of the obstacle
* @param obstacleWidth width of the obstacle
* @param obstacleHeight height of the obstacle
* @param pipeImagePath path to the image to be used
*/
constructor(position: Position, obstacleWidth: number, obstacleHeight: number, pipeImagePath: string) {
super(position, obstacleWidth, obstacleHeight, 0);
this.createPipes(position, obstacleHeight, obstacleWidth, pipeImagePath);
}
/**
* Creates the pipes.
* @param position
* @param obstacleHeight
* @param obstacleWidth
* @param pipeImagePath
* @private
*/
private createPipes(position: Position, obstacleHeight: number, obstacleWidth: number, pipeImagePath: string) {
this.pipeTop = new Pipe(position.x, obstacleWidth, obstacleHeight, pipeImagePath);
this.pipeBottom = new Pipe(position.x, obstacleWidth, obstacleHeight, pipeImagePath);
}
/**
* Resets the position of the obstacle to the Obstacle.startX variable
* Randomises the height of the pipes using the padding variable
*/
public resetPosition(): void {
this.randomizeHeight();
this.pipeBottom.position.x = Obstacle._startX;
this.pipeTop.position.x = Obstacle._startX;
}
/**
* Randomizes the height of the pipes
*/
public randomizeHeight(): void {
this.pipeTop.height = this.randomRange(this.padding, height - this.padding - Obstacle._distanceBetweenPipes);
this.pipeBottom.position.y = this.pipeTop.height + Obstacle._distanceBetweenPipes;
this.pipeBottom.height = height - this.pipeTop.height - this.padding;
}
/**
* Creates a random number between the min and max parameter
* @param min minimum number
* @param max maximum number
*/
private randomRange(min: number, max: number): number {
return Math.random() * (max - min) + min;
}
public update(): void {
this.pipeTop.move(this.speed);
this.pipeBottom.move(this.speed);
this.position.x = this.pipeTop.position.x;
}
public draw(): void {
this.pipeTop.draw();
this.pipeBottom.draw();
}
/**
* Determines when the obstacle is colliding with another entity
* @param o other entity
*/
public collides(o: Entity): boolean {
return this.pipeTop.collides(o) || this.pipeBottom.collides(o);
}
}

View file

@ -0,0 +1,74 @@
/**
* Rectangular obstacle.
*/
class Pipe extends Entity implements Collidable {
/**
* Pipe's image.
* @private
*/
private _image: p5.Image;
//region Getter & Setter
/**
* Gets the image.
*/
get image(): p5.Image {
return this._image;
}
/**
* Sets the image.
* @param path Path to image
*/
set image(path: any) {
this._image = loadImage(path);
}
//endregion
/**
* Constructs the pipe.
* @param positionX starting x-Position
* @param width pipe width
* @param height pipe height
* @param image path to image.
*/
constructor(positionX: number, width: number, height: number, image: string) {
super(new Position(positionX, 0), width, height, 0);
this.image = image;
}
/**
* YAGNI.
*/
public update(): void {}
/**
* Draws the pipe.
*/
public draw(): void {
push();
noFill();
image(this.image, this.position.x, this.position.y, this.width, this.height);
rect(this.position.x, this.position.y, this.width, this.height);
pop();
}
/**
* Moves the pipe to the lift with the given speed
* @param speed how fast the pipe moves
*/
public move(speed: number): void {
this.position.x -= speed;
}
/**
* Determines when the pipe is colliding with another entity
* @param o other entity
*/
collides(o: Entity): boolean {
return this.position.x < (o.position.x + o.width) && //inside left border
(this.position.x + this.width) > o.position.x && //but not outside right border
this.position.y < (o.position.y + o.height) && //inside top border
(this.position.y + this.height) > o.position.y; //but not outside bottom border
}
}

View file

@ -0,0 +1,59 @@
/**
* 2D Point.
*/
class Position {
/**
* X coordinate.
* @private
*/
private _x: number;
/**
* Y coordinate.
* @private
*/
private _y: number;
//region Getter & Setter
/**
* Get x.
*/
get x(): number {
return this._x;
}
/**
* Set x.
* @param value
*/
set x(value: number) {
this._x = value;
}
/**
* Get y.
*/
get y(): number {
return this._y;
}
/**
* Set y.
* @param value
*/
set y(value: number) {
this._y = value;
}
//endregion
/**
* Constructs the position.
* @param x x-Position
* @param y y-Position
*/
constructor(x: number, y: number) {
this._x = x;
this._y = y;
}
}

View file

@ -0,0 +1,202 @@
/**
* Raspberry class.
*/
class Raspberry extends Entity {
/**
* Amount of lift applied when boosting.
* @private
*/
private readonly lift: number = -15;
/**
* Gravity applied.
* @private
*/
private readonly gravity: number = 0.45;
/**
* Current speed.
* @private
*/
private _velocity: number = 0;
/**
* Image for the raspberry.
* @private
*/
private _image: p5.Image;
/**
* Position.
* @private
*/
private static position: Position;
/**
* Maximum velocity, so the raspberry doesn't get to infinite speed when boosting.
* @private
*/
private static readonly maxVelocity: number = 75;
/**
* Width.
* @private
*/
private static readonly WIDTH: number = 180;
/**
* Height.
* @private
*/
private static readonly HEIGHT: number = 70;
/**
* Color.
* @private
*/
private static readonly FILL: number = 0;
//region Getter & Setter
/**
* Gets the velocity.
*/
get velocity(): number {
return this._velocity;
}
/**
* Sets the velocity.
* @param value
*/
set velocity(value: number) {
this._velocity = (Math.abs(this.velocity) > Raspberry.maxVelocity) ? -Raspberry.maxVelocity : value;
}
/**
* Gets the image.
*/
get image(): p5.Image {
return this._image;
}
/**
* Sets the image by path.
* @param {string} path
*/
set image(path: any) {
this._image = loadImage(path);
}
//endregion
/**
* Constructs the Raspberry with fixed sizes.
* @param image Path to image
*/
constructor(image: string) {
Raspberry.position = new Position(width / 6, height / 2);
super(Raspberry.position, Raspberry.WIDTH, Raspberry.HEIGHT, Raspberry.FILL);
this.image = image;
}
/**
* Applies gravity and keeps the raspberry within the canvas.
*/
public update(): void {
this.applyGravity();
this.forceBoundaries();
}
/**
* Lets the Raspberry fall to the ground
*/
private applyGravity(): void {
this.velocity += this.gravity;
this.position.y += this.velocity;
}
/**
* Limits the raspberry's movement to the shown canvas.
* @private
*/
private forceBoundaries(): void {
this.boundaryTop();
this.boundaryBottom();
}
/**
* Forces the boundaries at the canvas' top.
* @private
*/
private boundaryTop(): void {
if (this.position.y < 0) {
this.position.y = 0;
this.velocity = 0;
}
}
/**
* Forces the boundaries at the canvas' bottom.
* @private
*/
private boundaryBottom(): void {
if (this.position.y + this.height > height) {
this.position.y = height - this.height;
this.velocity = 0;
}
}
/**
* Lets the raspberry jump.
*/
public boost(): void {
this.velocity += this.lift;
}
/**
* Draws raspberry.
*/
public draw(): void {
push();
noFill();
this.setPose();
this.drawObject();
pop();
}
/**
* Draws the rocket.
* @private
*/
private drawObject() {
this.drawHitBox();
this.drawRocket();
}
/**
* Handles the drawing of the object.
*/
private drawRocket() {
image(this.image, 0, 0, this.width, this.height);
rect(0, 0, this.width, this.height);
}
/**
* If enabled, draws the hitbox.
*/
private drawHitBox() {
if (!this.showHitbox) {
noStroke();
}
}
/**
* Rotation and position of the rocket.
* @private
*/
private setPose() {
translate(this.position.x, this.position.y);
rotate((PI / 2) * (this.velocity / Raspberry.maxVelocity));
}
}

View file

@ -0,0 +1,17 @@
{
"compilerOptions": {
"noImplicitAny": true,
"outFile": "../public/game.js",
"preserveConstEnums": true,
"removeComments": true,
"rootDir": ".",
"sourceMap": true,
"target": "es5",
"moduleResolution": "node",
"lib": [
"dom",
"es5",
"scripthost"
]
}
}

View file

@ -1,11 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Raspberyy Rocketeer</title>
<script lang="ts" src="game.ts"></script>
</head>
<body>
<main></main>
</body>
</html>

16520
frontend/package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,20 @@
{
"name": "raspberryrocketeer",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "npm run build-game && vue-cli-service build",
"build-game": "tsc -p ./game",
"lint": "vue-cli-service lint"
},
"dependencies": {
"@types/p5": "^1.4.3",
"p5": "^1.5.0"
"bootstrap": "^5.2.3",
"vue": "^3.2.13",
"@vue/cli-service": "~5.0.0"
},
"devDependencies": {
"@vue/cli-plugin-typescript": "~5.0.0",
"typescript": "~4.5.5"
}
}

BIN
frontend/public/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

519
frontend/public/game.js Normal file
View file

@ -0,0 +1,519 @@
var __extends = (this && this.__extends) || (function(){
var extendStatics = function(d, b){
extendStatics = Object.setPrototypeOf ||
({__proto__: []} instanceof Array && function(d, b){
d.__proto__ = b;
}) ||
function(d, b){
for(var p in b) if(Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
};
return extendStatics(d, b);
};
return function(d, b){
if(typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __(){
this.constructor = d;
}
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var PIPE_IMAGE_PATH = "resources/dell-pc-min-min-small.png";
var BACKGROUND_IMAGE_PATH = "resources/htl-steyr-front.jpg";
var RASPBERRY_IMAGE_PATH = "resources/raspberry-rocket.png";
var FLOOR_IMAGE_PATH = "resources/table-min-min.png";
var FONT_PATH = "resources/PressStart2P-Regular.ttf";
var OBSTACLE_COUNT = 3;
var BOOST_KEYS = ["k", " "];
var floorHeight;
var obstacleWidth;
var obstacleOffset;
var backgroundImage;
var pipeImage;
var floorImage;
var font;
var obstacles = [];
var raspberry;
var startTime;
var playTime;
var score = 0;
var paused;
var hasAlreadyScored = false;
var hasDied = true;
var ready = true;
function preload(){
font = loadFont(FONT_PATH);
backgroundImage = loadImage(BACKGROUND_IMAGE_PATH);
pipeImage = loadImage(PIPE_IMAGE_PATH);
floorImage = loadImage(FLOOR_IMAGE_PATH);
}
function setup(){
createCanvas(1085, 600);
floorHeight = height / 5;
setupObstacleConsts();
setupFont();
setupGame();
var originalSetItem = localStorage.setItem;
localStorage.setItem = function(key, value){
var event = new Event('itemInserted');
event.value = value; // Optional..
event.key = key; // Optional..
window.dispatchEvent(event);
originalSetItem.apply(this, arguments);
};
}
function setupObstacleConsts(){
obstacleOffset = width / OBSTACLE_COUNT;
obstacleWidth = width / 22.727272727272727272;
Obstacle.distanceBetweenPipes = height / 2.5;
Obstacle.startX = width;
}
function setupFont(){
textSize(75);
textAlign(CENTER);
textFont(font);
}
function setupGame(){
paused = true;
raspberry = new Raspberry(RASPBERRY_IMAGE_PATH);
setupObstacles();
}
function setupObstacles(){
obstacles = [];
instantiateObstacles(OBSTACLE_COUNT);
obstacles.forEach(function(obstacle){
return obstacle.randomizeHeight();
});
}
function instantiateObstacles(number){
for(var i = 0; i < number; i++){
obstacles.push(new Obstacle(new Position(width + obstacleOffset * i, 0), obstacleWidth, height, pipeImage));
}
}
function draw(){
update();
gameLoop();
drawGame();
}
function drawGame(){
drawScenery();
drawEntities();
displayScore();
}
function drawScenery(){
background(backgroundImage);
drawFloor();
}
function drawFloor(){
push();
noFill();
image(floorImage, 0, height - floorHeight, width, floorHeight);
rect(0, height - floorHeight, width, floorHeight);
pop();
}
function drawEntities(){
raspberry.draw();
drawObstacles();
}
function drawObstacles(){
obstacles.forEach(function(obstacle){
obstacle.draw();
});
}
function gameLoop(){
if(!paused){
collisionCheck(obstacles[0]);
checkRaspberryScore();
}
}
function collisionCheck(o){
if(o.collides(raspberry)){
die();
setupGame();
}
}
function die(){
if(localStorage.getItem("frontend-ready") == "false")
return;
ready = false;
hasDied = true;
playTime = Date.now() - startTime;
exportToLocalStorage();
setTimeout(function(){
return ready = true;
}, 1000);
}
function exportToLocalStorage(){
localStorage.setItem("game-playTime", String(playTime));
localStorage.setItem("game-score", String(score));
localStorage.setItem("game-isRunning", String(!hasDied));
}
function displayScore(){
push();
fill(195, 33, 34);
text(score, 0, height / 8, width, height);
pop();
}
function update(){
if(!paused){
raspberry.update();
}
obstacles.forEach(function(obstacle){
if(!paused){
obstacle.update();
checkObstacleReset(obstacle);
}
});
}
function checkObstacleReset(obstacle){
if(obstacle.position.x < -obstacleWidth){
obstacle.resetPosition();
obstacles.shift();
obstacles.push(obstacle);
hasAlreadyScored = false;
}
}
function checkRaspberryScore(){
if((obstacles[0].position.x + obstacles[0].width / 2) < (raspberry.position.x + raspberry.width / 2)
&& !hasAlreadyScored){
score += 1;
hasAlreadyScored = true;
}
}
function resetScore(){
if(!hasDied || localStorage.getItem("frontend-ready") == "false")
return;
hasDied = false;
score = 0;
hasAlreadyScored = false;
startTime = Date.now();
exportToLocalStorage();
}
function keyPressed(){
if(!ready)
return;
if(BOOST_KEYS.includes(key.toLowerCase())){
resetScore();
raspberry.boost();
}
if(key == "Escape"){
paused = !paused;
} else if(paused){
paused = false;
}
}
var Entity = (function(){
function Entity(position, width, height, fill){
this.position = position;
this.width = width;
this.height = height;
this.fill = fill;
this._showHitbox = false;
}
Object.defineProperty(Entity.prototype, "position", {
get: function(){
return this._position;
},
set: function(value){
this._position = value;
},
enumerable: false,
configurable: true
});
Object.defineProperty(Entity.prototype, "width", {
get: function(){
return this._width;
},
set: function(value){
this._width = value;
},
enumerable: false,
configurable: true
});
Object.defineProperty(Entity.prototype, "height", {
get: function(){
return this._height;
},
set: function(value){
this._height = value;
},
enumerable: false,
configurable: true
});
Object.defineProperty(Entity.prototype, "showHitbox", {
get: function(){
return this._showHitbox;
},
set: function(value){
this._showHitbox = value;
},
enumerable: false,
configurable: true
});
Entity.prototype.draw = function(){
push();
fill(this.fill);
rect(this.position.x, this.position.y, this.width, this.height);
pop();
};
return Entity;
}());
var Obstacle = (function(_super){
__extends(Obstacle, _super);
function Obstacle(position, obstacleWidth, obstacleHeight, image){
var _this = _super.call(this, position, obstacleWidth, obstacleHeight, 0) || this;
_this.speed = 3;
_this.padding = height / 6.6666666666666666;
_this.createPipes(position, obstacleHeight, obstacleWidth, image);
return _this;
}
Object.defineProperty(Obstacle, "startX", {
set: function(value){
this._startX = value;
},
enumerable: false,
configurable: true
});
Object.defineProperty(Obstacle, "distanceBetweenPipes", {
set: function(value){
this._distanceBetweenPipes = value;
},
enumerable: false,
configurable: true
});
Obstacle.prototype.createPipes = function(position, obstacleHeight, obstacleWidth, pipeImage){
this.pipeTop = new Pipe(position.x, obstacleWidth, obstacleHeight, pipeImage);
this.pipeBottom = new Pipe(position.x, obstacleWidth, obstacleHeight, pipeImage);
};
Obstacle.prototype.resetPosition = function(){
this.randomizeHeight();
this.pipeBottom.position.x = Obstacle._startX;
this.pipeTop.position.x = Obstacle._startX;
};
Obstacle.prototype.randomizeHeight = function(){
this.pipeTop.height = this.randomRange(this.padding, height - this.padding - Obstacle._distanceBetweenPipes);
this.pipeBottom.position.y = this.pipeTop.height + Obstacle._distanceBetweenPipes;
this.pipeBottom.height = height - this.pipeTop.height - this.padding;
};
Obstacle.prototype.randomRange = function(min, max){
return Math.random() * (max - min) + min;
};
Obstacle.prototype.update = function(){
this.pipeTop.move(this.speed);
this.pipeBottom.move(this.speed);
this.position.x = this.pipeTop.position.x;
};
Obstacle.prototype.draw = function(){
this.pipeTop.draw();
this.pipeBottom.draw();
};
Obstacle.prototype.collides = function(o){
return this.pipeTop.collides(o) || this.pipeBottom.collides(o);
};
return Obstacle;
}(Entity));
var Pipe = (function(_super){
__extends(Pipe, _super);
function Pipe(positionX, width, height, image){
var _this = _super.call(this, new Position(positionX, 0), width, height, 0) || this;
_this.image = image;
return _this;
}
Pipe.prototype.update = function(){
};
Pipe.prototype.draw = function(){
push();
noFill();
var imageAspectRatio = this.image.height / this.image.width;
var computedImageHeight = imageAspectRatio * this.width;
this.drawImage(computedImageHeight, imageAspectRatio);
rect(this.position.x, this.position.y, this.width, this.height);
pop();
};
Pipe.prototype.drawImage = function(computedImageHeight, imageAspectRatio){
if(this.height > computedImageHeight){
var maxImageYPos = Math.ceil(this.height / computedImageHeight) * computedImageHeight;
for(var imageYPosition = 0; imageYPosition < maxImageYPos; imageYPosition += computedImageHeight){
if(imageYPosition + computedImageHeight >= maxImageYPos){
this.cropLastImage(imageYPosition, computedImageHeight, imageAspectRatio);
break;
}
image(this.image, this.position.x, this.position.y + imageYPosition, this.width, computedImageHeight);
}
} else{
image(this.image, this.position.x, this.position.y, this.width, this.height);
}
};
Pipe.prototype.cropLastImage = function(imageYPosition, computedImageHeight, imageAspectRatio){
var amountOfImages = Math.floor(imageYPosition / computedImageHeight);
var heightToEdge = this.height - (amountOfImages * computedImageHeight);
var croppedImage = this.image.get(0, 0, this.image.width, this.image.height - (heightToEdge * imageAspectRatio));
image(croppedImage, this.position.x, this.position.y + imageYPosition, this.width, heightToEdge);
};
Pipe.prototype.move = function(speed){
this.position.x -= speed;
};
Pipe.prototype.collides = function(o){
return this.position.x < (o.position.x + o.width) &&
(this.position.x + this.width) > o.position.x &&
this.position.y < (o.position.y + o.height) &&
(this.position.y + this.height) > o.position.y;
};
return Pipe;
}(Entity));
var Position = (function(){
function Position(x, y){
this._x = x;
this._y = y;
}
Object.defineProperty(Position.prototype, "x", {
get: function(){
return this._x;
},
set: function(value){
this._x = value;
},
enumerable: false,
configurable: true
});
Object.defineProperty(Position.prototype, "y", {
get: function(){
return this._y;
},
set: function(value){
this._y = value;
},
enumerable: false,
configurable: true
});
return Position;
}());
var Raspberry = (function(_super){
__extends(Raspberry, _super);
function Raspberry(image){
var _this = this;
Raspberry.position = new Position(width / 6, height / 2);
Raspberry.height = height / 14.2857142857142857;
Raspberry.width = width / 11.1111111111111111;
_this = _super.call(this, Raspberry.position, Raspberry.width, Raspberry.height, Raspberry.FILL) || this;
_this.lift = -15;
_this.gravity = 0.45;
_this._velocity = 0;
Raspberry.bottomFloorOffset = (height / 5) - (height / 15 / 2);
_this.image = image;
return _this;
}
Object.defineProperty(Raspberry.prototype, "velocity", {
get: function(){
return this._velocity;
},
set: function(value){
this._velocity = (Math.abs(this.velocity) > Raspberry.maxVelocity) ? Raspberry.maxVelocity : value;
},
enumerable: false,
configurable: true
});
Object.defineProperty(Raspberry.prototype, "image", {
get: function(){
return this._image;
},
set: function(path){
this._image = loadImage(path);
},
enumerable: false,
configurable: true
});
Raspberry.prototype.update = function(){
this.applyGravity();
this.forceBoundaries();
};
Raspberry.prototype.applyGravity = function(){
this.velocity += this.gravity;
this.position.y += this.velocity;
};
Raspberry.prototype.forceBoundaries = function(){
this.boundaryTop();
this.boundaryBottom();
};
Raspberry.prototype.boundaryTop = function(){
if(this.position.y < 0){
this.position.y = 0;
this.velocity = 0;
}
};
Raspberry.prototype.boundaryBottom = function(){
if(this.position.y + this.height + Raspberry.bottomFloorOffset > height){
this.position.y = height - this.height - Raspberry.bottomFloorOffset;
this.velocity = 0;
}
};
Raspberry.prototype.boost = function(){
this.velocity += this.lift;
};
Raspberry.prototype.draw = function(){
push();
noFill();
this.setPose();
this.drawObject();
pop();
};
Raspberry.prototype.drawObject = function(){
this.drawHitBox();
this.drawRocket();
};
Raspberry.prototype.drawRocket = function(){
image(this.image, 0, 0, this.width, this.height);
rect(0, 0, this.width, this.height);
};
Raspberry.prototype.drawHitBox = function(){
if(!this.showHitbox){
noStroke();
}
};
Raspberry.prototype.setPose = function(){
translate(this.position.x, this.position.y);
rotate((PI / 2) * (this.velocity / Raspberry.maxVelocity));
};
Raspberry.maxVelocity = 75;
Raspberry.FILL = 0;
return Raspberry;
}(Entity));
//# sourceMappingURL=build.js.map

View file

@ -0,0 +1,34 @@
<!DOCTYPE html>
<html lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
<title><%= htmlWebpackPlugin.options.title %></title>
<script src="https://cdn.jsdelivr.net/npm/p5@1.5.0/lib/p5.js"></script>
<script src="./game.js"></script>
</head>
<body style="background-color: beige;">
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div class="container">
<div class="row">
<div id="app" class="offset-1 col-10"></div>
</div>
</div>
</body>
<script>
window.addEventListener('keydown', function(e) {
if(e.keyCode === 32 && e.target === document.body) {
e.preventDefault();
}
});
</script>
</html>

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 618 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 586 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

119
frontend/src/App.vue Normal file
View file

@ -0,0 +1,119 @@
<template>
<div class="container everything">
<div class="row">
<Header></Header>
</div>
<div class="row">
<UserScores :userScores="userScores"></UserScores>
</div>
<div class="row">
<Game :class="user ? '' : 'hidden'" :user-id="this.user?.id"
@gameFinished="this.updateUserScores()" ref="game">
</Game>
<Login v-if="!user" @userChange="(event) => {this.updateUser(event);}">
</Login>
<div v-if="user" class="logout-wrapper offset-10 col-2">
<RRButton @click="logOut()" text="Logout"></RRButton>
</div>
</div>
<div class="row">
<div class="col-4">
<Leaderboard type="highscore"></Leaderboard>
</div>
<div class="offset-4 col-4">
<Leaderboard type="totalplaytime"></Leaderboard>
</div>
</div>
</div>
</template>
<script lang="ts">
import {defineComponent} from 'vue';
import Leaderboard from './components/Leaderboard.vue';
import UserScores from './components/UserScores.vue';
import Game from './components/Game.vue';
import Header from './components/Header.vue';
import "bootstrap/dist/css/bootstrap.min.css";
import "bootstrap/dist/js/bootstrap.min.js";
import Login from "@/components/Login.vue";
import {Rest} from "@/model/Rest";
import {User} from "@/model/User";
import RRButton from "@/components/RRButton.vue";
export default defineComponent({
name: 'App',
components: {
RRButton,
Login,
UserScores,
Leaderboard,
Game,
Header,
},
data() {
return {
userScores: {},
userId: -1,
user: null as User | null,
leaderboardEvent: new Event('reloadLeaderboard')
}
},
created() {
localStorage.setItem("frontend-ready", "false");
},
methods: {
async fetchFromApi(path: string, method: "GET" | "POST") {
let res: Response = await fetch(Rest.URL + path, {method: method,});
return await res.json();
},
async fetchUserScores() {
if (this.userId == -1) return;
return await this.fetchFromApi(`/user/${this.userId}/scores`, "GET");
},
async updateUserScores() {
this.userScores = await this.fetchUserScores();
},
async updateUser(user: User) {
if (user) {
this.user = user;
this.userId = user.id ?? -1;
await this.updateUserScores();
}
window.dispatchEvent(this.leaderboardEvent);
},
logOut(){
this.user = null;
this.userId = -1;
this.userScores = {};
localStorage.setItem('frontend-ready', 'false');
}
},
});
</script>
<style>
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');
* {
font-family: 'Press Start 2P', serif;
}
.row {
margin-top: 2em;
}
.everything {
margin-bottom: 4em;
}
.hidden {
visibility: hidden;
}
.logout-wrapper {
display: flex;
justify-content: right;
}
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

View file

@ -0,0 +1,66 @@
<template>
<div class="wrapper">
<main></main>
</div>
</template>
<script>
import App from "@/App.vue";
import {Rest} from "@/model/Rest";
export default {
name: "Game",
props: {
userId: null
},
emits: ['gameFinished'],
created() {
window.addEventListener('itemInserted', event => this.localStorageHandler(event), false);
},
methods: {
localStorageHandler(event) {
if (event.key !== 'game-isRunning') return;
if (event.value === 'false') { //means game is over
let playTime = this.msToHMS(Number(localStorage.getItem('game-playTime')));
let score = Number(localStorage.getItem('game-score'));
this.submitGame(score, playTime);
}
},
msToHMS(ms) {
// 1- Convert to seconds:
let seconds = ms / 1000;
// 2- Extract hours:
const hours = parseInt(String(seconds / 3600)); // 3,600 seconds in 1 hour
seconds = seconds % 3600; // seconds remaining after extracting hours
// 3- Extract minutes:
const minutes = parseInt(String(seconds / 60)); // 60 seconds in 1 minute
// 4- Keep only seconds not extracted to minutes:
seconds = seconds % 60;
return ((hours < 10) ? "0" : "") + hours + ":" + ((minutes < 10) ? "0" : "") + minutes + ":" + ((seconds < 10) ? "0" : "") + Math.floor(seconds);
},
async submitGame(score, playTime) {
let body = {
score: score,
playtime: playTime,
date: new Date().toISOString().substring(0, 10),
userId: this.userId,
}
let header = {
Accept: "application/json",
"Content-Type": "application/json",
};
await fetch(Rest.URL + '/game/add', {method: 'POST', body: JSON.stringify(body), headers: header});
this.$emit('gameFinished');
}
},
}
</script>
<style>
#p5_loading {
display: none;
}
</style>

View file

@ -0,0 +1,18 @@
<template>
<h1>Raspberry Rocketeer</h1>
</template>
<script lang="ts">
export default {
name: "Header",
}
</script>
<style scoped>
h1 {
text-align: center;
font-size: 5em;
}
</style>

View file

@ -0,0 +1,86 @@
<template>
<div class="container">
<div class="row">
<h3 class="col-10"><strong>{{ this.title() }}</strong></h3>
<div class="col-1">
<RRButton @click="prevPage" text="<"></RRButton>
</div>
<div class="col-1">
<RRButton @click="nextPage" text=">"></RRButton>
</div>
</div>
<div class="row" v-if="this.page.length > 0" v-for="entry in this.page" :key="entry.rank">
<LeaderboardEntry :entry="entry"></LeaderboardEntry>
</div>
<div class="row" v-else>
Loading...
</div>
</div>
</template>
<script>
import LeaderboardEntry from "@/components/LeaderboardEntry.vue";
import RRButton from "@/components/RRButton.vue";
import {Rest} from "@/model/Rest";
export default {
name: "Leaderboard",
components: {
LeaderboardEntry,
RRButton,
},
data() {
return {
pageNumber: 0,
entriesPerPage: 5,
page: []
}
},
props: {
type: "totalplaytime" | "highscore",
},
created() {
this.updatePage();
window.addEventListener('itemInserted', event => this.onItemInserted(event), false);
},
methods: {
async fetchPage() {
let res = await fetch(`${Rest.URL}/leaderboard/${this.type}?pagination=true&entriesPerPage=${this.entriesPerPage}&page=${this.pageNumber}`, {method: "GET"});
return await res.json();
},
title() {
return this.type === "totalplaytime" ? "Total Playtime" : "Highscore";
},
async nextPage() {
if (this.page.length !== this.entriesPerPage) return;
this.pageNumber++;
await this.updatePage();
if (this.page.length === 0) {
this.prevPage();
}
},
prevPage() {
if (this.pageNumber <= 0) return;
this.pageNumber--;
this.updatePage();
},
async updatePage() {
let tempPage = await this.fetchPage();
for (let i = 0; i < this.entriesPerPage; i++) {
this.page.pop();
}
for (const entry of tempPage) {
this.page.push(entry);
}
},
onItemInserted(event) {
if (event.key === 'game-isRunning' && event.value === 'false') {
this.updatePage();
}
}
}
}
</script>

View file

@ -0,0 +1,31 @@
<template>
<div class="col-1 text-right">{{this.entry.rank}}</div>
<span class="col offset-1 text-left username">{{this.entry.username}}</span>
<div class="col-2 text-right">{{this.entry.score}}</div>
</template>
<script lang="ts">
import {defineComponent, PropType} from 'vue';
import {Leaderboard, LeaderboardEntry} from "@/model/Leaderboard";
export default defineComponent({
name: "LeaderboardEntry",
props: {
entry: {
type: Object as PropType<LeaderboardEntry<string>>,
default: () => ({}),
},
},
})
</script>
<style scoped>
* {
font-size: 1.5em;
}
.username {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
</style>

View file

@ -0,0 +1,65 @@
<template>
<h2>Enter a username</h2>
<div class="form-floating mb-3">
<input class="form-control" id="floatingInput" placeholder="example name" v-model="username">
<label for="floatingInput">Username</label>
<RRButton @click="setUser()" text="Confirm"></RRButton>
</div>
</template>
<script>
import {User} from "@/model/User";
import RRButton from "@/components/RRButton.vue";
export default {
name: "Login",
components: {
RRButton
},
data() {
return {
username: '',
}
},
emits: ['userChange'],
methods: {
async setUser() {
if (this.username === '') return;
let user;
user = await User.getByName(this.username);
if(user.errors){
user = await User.create(this.username);
}
if(user.errors){
console.error("Something when wrong when logging in, please contact admin!")
return;
}
if (user) {
this.$emit('userChange', user);
}
},
}
}
</script>
<style scoped>
input {
border: 3px solid black;
border-radius: 0;
background-color: beige;
margin-bottom: 5px;
}
input:focus {
background: beige;
border-color: rgba(184,134,11, 0.8);
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset, 0 0 8px rgba(184,134,11, 0.6);
}
label {
margin-left: 10px;
}
</style>

View file

@ -0,0 +1,22 @@
<template>
<button>{{ text }}</button>
</template>
<script lang="ts">
export default {
name: "RRButton",
props: {
text: {
type: String
},
}
}
</script>
<style scoped>
button {
border: 3px solid black;
background-color: beige;
width: auto;
}
</style>

View file

@ -0,0 +1,34 @@
<template>
<div class="container">
<div class="row">
<div class="col text-center" >Highscore</div>
<div class="col text-center" >Total Score</div>
<div class="col text-center" >Total Playtime</div>
<div class="col text-center" >Average Score</div>
<div class="col text-center" >Games Played</div>
</div>
<div class="row">
<div class="col text-center" >{{ this.userScores.highscore }}</div>
<div class="col text-center" >{{ this.userScores.totalScore }}</div>
<div class="col text-center" >{{ this.userScores.totalPlaytime }}</div>
<div class="col text-center" >{{ this.userScores.averageScore }}</div>
<div class="col text-center" >{{ this.userScores.gamesPlayed }}</div>
</div>
</div>
</template>
<script>
export default {
props: {
userScores: {
type: Object
}
},
}
</script>
<style scoped>
* {
font-size: 1.2em;
}
</style>

4
frontend/src/main.ts Normal file
View file

@ -0,0 +1,4 @@
import { createApp } from 'vue'
import App from './App.vue'
createApp(App).mount('#app')

View file

@ -0,0 +1,7 @@
export interface Game {
id?: number,
score: number,
playtime: string,
date: Date,
userId: number,
}

View file

@ -0,0 +1,10 @@
export type Leaderboard<T> = LeaderboardEntry<T>[];
export type HighscoreLeaderboard = Leaderboard<number>;
export type TimeLeaderboard = Leaderboard<string>;
export interface LeaderboardEntry<T> {
username: number,
rank: number,
score: T,
}

View file

@ -0,0 +1,3 @@
export class Rest {
static readonly URL = 'http://localhost:3000';
}

View file

@ -0,0 +1,34 @@
import {Rest} from "@/model/Rest";
export class User {
id?: number;
name?: string;
constructor(id: number, name: string) {
this.name = name;
}
static async getByName(name: string): Promise<User> {
let res: Response = await fetch(Rest.URL + '/user/' + name, {method: 'GET'});
return await res.json();
}
static async create(name: string): Promise<User> {
let body = {
name: name
};
let header = {
Accept: "application/json",
"Content-Type": "application/json",
};
let res: Response = await fetch( Rest.URL + '/user/register', {
method: 'POST',
body: JSON.stringify(body),
headers: header,
});
return await res.json();
}
}

View file

@ -0,0 +1,10 @@
import {Time} from "./Time.js";
export interface UserScores {
userId: number,
highscore: number,
totalScore: number,
totalPlaytime: Time,
averageScore: number,
gamesPlayed: number,
}

6
frontend/src/shims-vue.d.ts vendored Normal file
View file

@ -0,0 +1,6 @@
/* eslint-disable */
declare module '*.vue' {
import type { DefineComponent } from 'vue'
const component: DefineComponent<{}, {}, any>
export default component
}

41
frontend/tsconfig.json Normal file
View file

@ -0,0 +1,41 @@
{
"compilerOptions": {
"target": "es5",
"module": "esnext",
"strict": true,
"jsx": "preserve",
"importHelpers": true,
"moduleResolution": "node",
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"forceConsistentCasingInFileNames": true,
"useDefineForClassFields": true,
"sourceMap": true,
"baseUrl": ".",
"types": [
"webpack-env"
],
"paths": {
"@/*": [
"src/*",
]
},
"lib": [
"esnext",
"dom",
"dom.iterable",
"scripthost"
]
},
"include": [
"src/**/*.ts",
"src/**/*.tsx",
"src/**/*.vue",
"tests/**/*.ts",
"tests/**/*.tsx"
],
"exclude": [
"node_modules"
]
}