Skip to content

Commit

Permalink
V1.7.5
Browse files Browse the repository at this point in the history
  • Loading branch information
RedYetiDev committed Mar 11, 2021
1 parent 9f06db6 commit fd6ac1c
Show file tree
Hide file tree
Showing 10 changed files with 246 additions and 402 deletions.
46 changes: 44 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ Welcome to the terminal tools package. This package allows you to do some specia

![pinwheel](https://user-images.githubusercontent.com/38299977/110550579-ef9e2000-8101-11eb-9e4f-ff1cae9bce96.gif)

![loader-dots](https://user-images.githubusercontent.com/38299977/110808153-baa0e300-8251-11eb-9c55-75120be2880a.gif)


4. Connect to a server (Including Telnet)

![Connect to a server](https://user-images.githubusercontent.com/38299977/110807660-449c7c00-8251-11eb-8501-275960d8b9f3.png)

## Installation
First, install the `terminaltools` package, using the following command
Expand Down Expand Up @@ -43,7 +49,7 @@ console.log(image)
```

### Playing Videos
Video playing contains 4 different functions. The first 2 or `framify` and `render`. They are split into 2 different functions for speed reasons. Becuase, you can already have frames ready, and have no need to run `framify`. The third function is called `runall`, and it runs `framify`, then `render`. Now, the 4th function is a special version of `render` called `advrender`.
Video playing contains 4 different functions. The first 2 or `framify` and `render`. They are split into 2 different functions for speed reasons. Becuase, you can already have frames ready, and have no need to run `framify`. The third function is called `runall`, and it runs `framify`, then `render`. Now, the 4th function is a special version of `render` called `advrender`. (Setting an FPS on the `render` and `advrender` functions are optional.)

#### 1. framify
The `framify` function takes a video input and converts it to a folder full of frames. The folder is located in the current working directory. ***NOTE***: Please create a `frames` folder in the current working directory before running.
Expand All @@ -59,7 +65,7 @@ The `render` function takes no parameter and ***MUST*** be run from the same dir

##### Example
```js
await tools.video.render()
await tools.video.render(/* FPS Optional */)
```

#### 3. runall
Expand All @@ -73,6 +79,11 @@ await tools.video.runall("sample.mp4")
#### 4. advrender
The `advrender` function renders the frames in 2 parts, first it pre-renders ***ALL*** the frames, then it renders them. The reason for this is it increases the speed of the video, by processing the frames before playback, instead of during

##### Examples
```js
await tools.video.advrender(/* FPS Optional */)
```

### Loader
There are currently 2 loaders available.
#### 1. line
Expand All @@ -89,6 +100,13 @@ var line = new tools.loader.pinwheel()
```
Then, you can start and end the loader using `start()` and `stop()`

#### 3. Dots
First, create a new instance of `loader.dots`
```js
var line = new tools.loader.dots()
```
Then, you can start and end the loader using `start()` and `stop()`

#### Examples
```js
var line = new tools.loader.line()
Expand All @@ -102,3 +120,27 @@ pinwheel.start()
"FUNCTION FUNCTION FUNCTION FUNCTION"
pinwheel.end()
```

```js
var dots = new tools.loader.dots()
dots.start()
"FUNCTION FUNCTION FUNCTION FUNCTION"
dots.end()
```


### Connect to a server
To connect a server, first make a new instance of the `server` class
```js
var Client = new tools.server()
```
Next, connect to the server using
```js
Client.connect(host, ip)
```
If the host is not specified, it will default to `towel.blinkenlights.nl`, and if the port is not specifed, it will default to `23`

Now, you can write messages using the `write` function
```js
Client.write("Hello!")
```
Loading

0 comments on commit fd6ac1c

Please sign in to comment.