Skip to content

Commit 8aa5cb9

Browse files
authored
Merge pull request #3 from visual-heuristics/main
1. The main functionalities of Planimation have been covered in this React version. 2. A large portion of the readme are refer to the private confluence page, and content migration is required. 3. The react logo is used for the favicon and needs to be replaced later. 4. The new show goal button is working differently compared to the Unity version. The user couldn't switch between the current step and the goal step.
2 parents 46a356f + d202645 commit 8aa5cb9

File tree

124 files changed

+81320
-568
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

124 files changed

+81320
-568
lines changed

.dockerignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.git
2+
node_modules
3+
build
4+
Dockerfile
5+
.dockerignore
6+
.gitignore
7+
README.md

.gitignore

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# testing
9+
/coverage
10+
11+
# production
12+
/build
13+
/prototypes
14+
/data samples
15+
/planimationLibrary.js
16+
17+
# misc
18+
.DS_Store
19+
.env.local
20+
.env.development.local
21+
.env.production.local
22+
23+
npm-debug.log*
24+
yarn-debug.log*
25+
yarn-error.log*
26+
27+
#documents
28+
/prototypes
29+
/data samples
30+

.travis.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
language: node_js
2+
node_js:
3+
- 14
4+
branchs:
5+
only:
6+
- master
7+
- develop
8+
cache:
9+
directories:
10+
- node_modules
11+
install:
12+
- yarn install
13+
scripts:
14+
- yarn test
15+
- CI=false yarn build

Dockerfile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
FROM node:14.18-alpine AS build
2+
3+
WORKDIR /app
4+
COPY package.json package-lock.json ./
5+
RUN npm install
6+
7+
COPY . ./
8+
RUN npm run build
9+
10+
FROM nginx:stable-alpine
11+
COPY --from=build /app/build /usr/share/nginx/html
12+
COPY --from=build /app/nginx.conf /etc/nginx/conf.d/default.conf
13+
EXPOSE 80
14+
CMD sed -i -e 's/$PORT/'"$PORT"'/g' /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'

ReadMe.md

Lines changed: 267 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,279 @@
1-
# Planimation Javascript Frontend
1+
# COMP900082 - PL-Boxjelly. Project: Planimation
22

3-
The initial work of Planimation JS Library, and the frontend is waiting to be developed.
3+
planimation is a modular and extensible open source framework to visualize sequential solutions of planning problems specified in PDDL. planimation has a preliminary declarative PDDL-like animation profile specification, expressive enough to synthesise animations of arbitrary initial states and goals of a benchmark with just a single profile.(https://planimation.github.io/documentation/).
44

5-
## Features
6-
- Visualise Planimation VFG file
7-
- Visualise the last action of a given plan
85

9-
## Tech
6+
# Table of Contents
7+
[1.0 Project Overview](#1.0)
108

11-
- [PIXIJS] - The HTML5 Creation Engine
12-
- [RequireJS] - RequireJS is a JavaScript file and module loader
9+
[2.0 Deployment](#2.0)
10+
11+
[3.0 Development Environment](#3.0)
1312

14-
## Run the demo
15-
In the root folder:
16-
```sh
17-
npm install http-server -g
18-
http-server
13+
[4.0 Using the system](#4.0)
14+
15+
[5.0 Architecture and Design](#5.0)
16+
17+
[6.0 Change Log](#6.0)
18+
19+
[7.0 Demo](#7.0)
20+
21+
<h1 id="1.0"> 1.0 Project Overview </h1>
22+
23+
## Background
24+
25+
Planimation is an openSource framework to visualise sequential solutions of planning problems specified in PDDL. The framework was built by a team of University of Melbourne students in the context of the course SWEN90013 and under the lead of Professor Nir Lipovetzky and it has been continually supported by students and contributors. The project has important awards and recognitions.
26+
27+
The planimation goals are:
28+
29+
* help to debug PDDL code for Online PDDL Editor users
30+
31+
* increases user understanding of planning problems
32+
33+
* showing planning solutions to non-technical audiences
34+
35+
The system uses a domain PDDL script, a problem PDDL script and a Animation profile script to produce visualisation.
36+
37+
## Goal for This Project
38+
39+
The main goal is:
40+
* Improve project efficiency, maintainability and extendability of Planimation software
41+
42+
The specific goals are:
43+
* replace the current frontend programed in C# with the Unity engine, for a Javascript and PixiJS framework
44+
45+
* decrease the loading times produced by the Unity engine
46+
47+
* maintaining its current features
48+
49+
* integrate with current development tools (Online pddl Editor plugin)
50+
51+
* develop a new plugin for Visual Studio Code
52+
53+
<h1 id="2.0"> 2.0 Deployment </h1>
54+
55+
## Overview
56+
57+
Before building your development environment, you’ll need:
58+
A code editor
59+
VS Code is suggested. Download link
60+
61+
Recommended extensions: Jest; GitLens;tslint;
62+
63+
WebStorm is an alternative JavaScript IDE for frontend development.
64+
65+
Git
66+
Check if you installed Git:
67+
68+
```
69+
git --version
70+
```
71+
Please refer to https://docs.github.com/en/get-started/quickstart/set-up-git to see the installment and basic usage of Git.
72+
73+
### Node
74+
Please follow the instructions and download Node.js to your system. https://nodejs.org/en/
75+
76+
Recommended version: 14.17.5. Npm is the package manager for the Node JavaScript It is already installed along with Node.
77+
78+
Now you can check the versions:
79+
```
80+
node -v
81+
v14.17.5
82+
npm -v
83+
6.14.14
84+
```
85+
86+
### Install yarn:
87+
88+
```
89+
npm install -g yarn
90+
```
91+
92+
### Building development environment:
93+
Clone the repository from GitHub:
94+
```
95+
git clone https://github.com/visual-heuristics/frontend-js
96+
```
97+
### It’s good if you could setup your username and email address for the repository, so the other team members will have a clear idea the contributors of branches and codes on GitHub.
98+
99+
```
100+
git config user.name "Mona Lisa"
101+
102+
git config user.email "[email protected]"
103+
```
104+
## Install frontend development environment:
105+
In the current working directory to the local repository:
106+
107+
Open the working directory with VS code, in the terminal:
108+
```
109+
yarn //or “npm install”
110+
```
111+
This command will automatically install all the packages you need in this project.
112+
113+
### Run the project:
114+
```
115+
npm run start
116+
```
117+
This will open a page on your browser, and you should see a jumping rabbit like this:
118+
119+
120+
121+
Now, the development environment is all set up! Start coding😊
122+
123+
### Test your code:
124+
```
125+
yarn test //or “npm test” or testing in Jest
126+
./node_modules/.bin/cypress open // for testing in Cypress
19127
```
20128
Open the link in your browser, and you should see a visualisation of block world .
21129

22-
## Development Guide
23-
Currently, only the main logic of the visaulisation part has been developed, and there are lots of other features that can be developed.
24130

25-
For examples:
26-
* Subgoal feature
27-
* Step Control
28-
* Linear animation
131+
<h1 id="3.0"> 3.0 Development Environment</h1>
132+
133+
### Technical Environment
134+
135+
https://confluence.cis.unimelb.edu.au:8443/display/VH/Technical+Environment
136+
137+
### Non-technical Environment
138+
139+
https://confluence.cis.unimelb.edu.au:8443/display/VH/Non-technical+Environment
140+
141+
### Development Environment Setup
142+
143+
https://confluence.cis.unimelb.edu.au:8443/display/VH/Development+Environment+Setup
144+
145+
146+
<h1 id="4.0"> 4.0 Using the system </h1>
147+
148+
## 4.1. Project Homepage:
149+
150+
In coordinator homepage: Shows the four sections of the project.
151+
https://confluence.cis.unimelb.edu.au:8443/display/VH/Design+Notebook
152+
153+
### 4.1.1 Go to PDDL file upload page
154+
155+
Go to the first page to generate visualisation using PDDL files.
156+
157+
### 4.1.2 Go to VFG file upload page
158+
159+
Go to the second page to generate visualisation using VFG files.
160+
161+
### 4.1.3 Check document for the project
162+
163+
Check the documentation for Planimation
164+
165+
### 4.1.4 Check demo video for the project
166+
167+
Check the Demo Video for Planimation
168+
169+
170+
## 4.2. PDDL file upload page
171+
172+
On this page, you need to upload 3 PDDL file to the PDDL editor server, and it will lead you to the visualization page with a generated vfg file.
173+
174+
## 4.3. VFG file upload page
175+
176+
On this page, you need to upload a single vfg file for animation generating. It will lead you to the visualization page once your .vfg file is accepted.
177+
178+
## 4.4. Document Page
179+
180+
On document page, you can access the resources for how to use planimation and how to deploy it on your computer.
181+
182+
## 4.5. Demo Page
183+
184+
In the demo page we have a youtube video which would teach you how does planimation works and how we deployed it.
185+
186+
## 4.6. Visualization Page
187+
188+
This is the main functionality page for the project. It will show the animation generated from the VFG file on pages 1 and page 2. On this page, your could de the following operation.
189+
190+
### 4.6.1 Check the stage list on the left side of the page
191+
On the left, you will see a list of all the stages for this problem. And you can check the visualization for this stage by clicking on it.
192+
193+
### 4.6.2 Check the subgoal list on the right side of the page
194+
On the right, you will see a list of all the subgoal conditions for this problem. And you can check the visualization for the condition where this sub goal is satisfied by clicking on that step.
195+
196+
### 4.6.3 Operation on visualization
197+
In the middle of the page, you will see the visualization sections which will look different depends on your problem. By clicking on the control button in this section, you can easily pause, play, reset, speed up, slow down and move to the pre/next step.
198+
199+
200+
<h1 id="5.0"> 5.0 Architecture and Design </h1>
201+
202+
### Architecture Model
203+
204+
https://confluence.cis.unimelb.edu.au:8443/display/VH/Architecture
205+
206+
### Prototype Design and Interactive Diagram
207+
208+
https://confluence.cis.unimelb.edu.au:8443/display/VH/Prototype+Design+and+Interactive+Diagram
209+
210+
### System Architecture Diagram
211+
212+
https://confluence.cis.unimelb.edu.au:8443/display/VH/System+Architecture+Diagram
213+
214+
### Design Notebook
215+
216+
https://confluence.cis.unimelb.edu.au:8443/display/VH/Design+Notebook
217+
218+
### Operational Concept Documents
219+
220+
https://confluence.cis.unimelb.edu.au:8443/display/VH/Operational+Concept+Documents
221+
222+
223+
### Directory structure and key files and components
224+
225+
https://confluence.cis.unimelb.edu.au:8443/display/VH/Developer+Information+Frontend
226+
227+
228+
<h1 id="6.0"> 6.0 Change Log </h1>
229+
230+
231+
### 19/08/2021
232+
* Fork from original repository, initial commits
233+
234+
### 22/08/2021
235+
* Init react framework
236+
237+
### 23/08/2021
238+
* Update Jest
239+
240+
### 25/08/2021
241+
* Update .travis.yml; Add template
242+
243+
### 06/09/2021
244+
* Updated global styles
245+
246+
### 11/09/2021
247+
* Add drag&drop function
248+
* Animation bugs fixed
249+
250+
### 15/09/2021
251+
* Add animation playing/pausing function
252+
253+
### 18/09/2021
254+
* Updated Confluence
255+
256+
### 26/09/2021
257+
* Added speed control for animation
258+
259+
### 01/10/2021
260+
* Added function of reading vfg file
261+
262+
### 03/10/2021
263+
* Interact with backend
264+
265+
### 06/10/2021
266+
* Added export file function
267+
268+
### 13/10/2021
269+
* Updated Animation display
270+
271+
### 20/10/2021
272+
* Modified styles for pages
29273

30-
When you develop the new features for Planimation JS Libary, please try to modularise it. So it will be easier to maintain the front-end in future. Also, the potential user can use the relevant feature to build their application. Visualise the search tree with Planimation is a good example here.
274+
### 21/10/2021
275+
* Updated tests
31276

32-
## Resources
33-
* Pixi JS - https://www.pixijs.com/
34-
* Pixi JS Tutorial - https://github.com/kittykatattack/learningPixi
35-
* Pixi JS Demos - https://pixijs.io/examples/#/demos-basic/container.js
277+
<h1 id="7.0"> 7.0 Demo</h1>
36278

37-
[PIXIJS]: <https://www.pixijs.com/>
38-
[RequireJS]:<https://requirejs.org/>
279+
https://morning-ridge-78538.herokuapp.com/

0 commit comments

Comments
 (0)