https://github.com/linuxfandudeguy/cubeascii
A API which returns a frame from a 3D animation of a cube in ASCII.
https://github.com/linuxfandudeguy/cubeascii
api ascii ascii-art ascii-art-generator ascii-graphics cube express express-js expressjs js js-api netlify node node-js nodejs nodejs-server
Last synced: 5 months ago
JSON representation
A API which returns a frame from a 3D animation of a cube in ASCII.
- Host: GitHub
- URL: https://github.com/linuxfandudeguy/cubeascii
- Owner: linuxfandudeguy
- Created: 2024-08-14T21:50:40.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-08-16T12:21:09.000Z (over 1 year ago)
- Last Synced: 2025-02-09T14:38:27.546Z (about 1 year ago)
- Topics: api, ascii, ascii-art, ascii-art-generator, ascii-graphics, cube, express, express-js, expressjs, js, js-api, netlify, node, node-js, nodejs, nodejs-server
- Language: JavaScript
- Homepage: https://cubeascii.netlify.app/
- Size: 1.45 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# cubeascii
###### (c) Copyright 2024 linuxfandudeguy
  

# Info
`cubeascii` is a api written in Node.js with Express.js.
`cubeascii` is based off of [cube.c](https://github.com/servetgulnaroglu/cube.c/tree/master) by [@servetgulnaroglu](https://github.com/servetgulnaroglu)
Each time you make a HTTP request, the `cubeascii` api will display a frame from a 3D animation of a cube spinning in ASCII art.
In order to make an animation out of this you would need to make a HTTP GET request with cURL to [`https://cubeascii.netlify.app
`](https://cubeascii.netlify.app/) every 0.02 seconds which is why it's recommended to automate the requests.
# Running Locally
To run `cubeascii` locally, you need to follow these instructions:
1. Clone the repo
```bash
git clone https://github.com/linuxfandudeguy/cubeascii.git
```
2. Enter the directory
```bash
cd cubeascii
```
3. Running
```bash
node api/non_deployment_index.js
```
You have now successfully ran `cubeascii` locally.
# Automation
In order to make an animation out of this, you can simply run this command in your terminal:
```bash
while true; do
curl https://cubeascii.netlify.app/
sleep 0.02 # Adjust the sleep time as needed
done
```
## Locally Ran Automation
```bash
while true; do
curl http://localhost:3000
sleep 0.02 # Adjust the sleep time as needed
done
```