Skip to content

Sprint 2 #51

Merged
merged 113 commits into from
Oct 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
113 commits
Select commit Hold shift + click to select a range
03002b2
fix(#24): :bug: THe pipeline syntax was for gitlab, not github
gautegf Oct 8, 2025
579090c
Update main.yml
gautegf Oct 8, 2025
abf6136
chore(#26): add PR template
adriahso Oct 8, 2025
f2e086b
Merge pull request #28 from TDT4290-group-4/26-make-pr-template
adriahso Oct 8, 2025
26249ee
Created cypress e2e test environment
Oct 8, 2025
d5e32b1
fix(#24): :bug: Pipeline only needs to run on pull requests
gautegf Oct 8, 2025
a1a7feb
Merge branch 'dev' into 24-fix-pipeline
gautegf Oct 8, 2025
3511dc1
ran prettier
gautegf Oct 8, 2025
4c24cbd
Revert "Created cypress e2e test environment"
tobiaobr Oct 8, 2025
82b2ac7
fix(#24): :bug: CHange node version to 22
gautegf Oct 8, 2025
6cf61d1
Merge pull request #31 from TDT4290-group-4/24-fix-pipeline
gautegf Oct 8, 2025
ce13809
Revert "Created cypress e2e test environment"
tobiaobr Oct 8, 2025
1767dd1
setup cypress test environment
tobiaobr Oct 8, 2025
3f858c0
ran prettier
tobiaobr Oct 8, 2025
f72731c
feat: :adhesive_bandage: Prevent multiple clicks on cloud icon for sm…
mariewah Oct 8, 2025
2bacc89
Update src/ElevationControl/elevationControl.js
mariewah Oct 9, 2025
ecd26f6
style: :bulb: Update prettier style and comment
mariewah Oct 9, 2025
3ac9046
Merge pull request #30 from TDT4290-group-4/29-setup-cypress-e2e-test…
tobiaobr Oct 9, 2025
6d4b6d9
Merge pull request #33 from TDT4290-group-4/32-prevent-multiple-point…
mariewah Oct 10, 2025
16b17a1
feat: :sparkles: Add menu section and basic logic for annotationPanel
franmagn Oct 10, 2025
24bb177
refactor(#25): :recycle: Changed from canvas to text element, lat/lon…
kleinc Oct 11, 2025
1cef529
feat: add logic behind jump and delete buttons, and add coordinates v…
franmagn Oct 12, 2025
25e4d72
refactor(#25): :truck: Rename coordinateShowing to CoordinateShowing
kleinc Oct 13, 2025
31b4e03
refactor(#25): :recycle: Change target point to only when double-clic…
kleinc Oct 13, 2025
8e985df
fix(#25): :bug: Fix issue with copying target point text
kleinc Oct 13, 2025
1b5543f
style(#4): ran prettier
franmagn Oct 13, 2025
4af9107
Merge pull request #34 from TDT4290-group-4/25-only-show-coordinates-…
kleinc Oct 13, 2025
f92fb4c
style(#4): make the old annotation button invisible
franmagn Oct 13, 2025
052e946
refactor(#4): changed texts from "annotations" to "saved locations"
franmagn Oct 13, 2025
e2b778c
feat(#8): :sparkles: Made functionaliry for Accepted filtering
mariewah Oct 13, 2025
eae6463
perf(#8): :zap: Optimize elevation control and accepted filtering
mariewah Oct 13, 2025
cec8774
refactor(#4): add "Saved Point coordinates" to the list of annotations
franmagn Oct 13, 2025
3b79c44
style(#8): :bulb: Update the comments and clean the code
mariewah Oct 14, 2025
76a18d8
test(#8): :test_tube: Made tests for elevation control and accepted f…
mariewah Oct 14, 2025
7fcbf1e
fix(#8): :bug: Elevation needs to be activated upon initiation
mariewah Oct 14, 2025
53343ed
refactor(#4): add monotonic numbering (in sidebar) to created annotat…
franmagn Oct 14, 2025
1634ea8
refactor(#4): add monotonic numbering (in live scene) to created anno…
franmagn Oct 14, 2025
94a7959
feat(#4): :memo: add possibility to rename the title of a saved posit…
franmagn Oct 14, 2025
939af8d
fix(#4): :bug: address NotFoundError
franmagn Oct 14, 2025
b3acc9d
fix(#4): :bug: there was a conflict with "Data for point X" table
franmagn Oct 14, 2025
71614e8
fix(#4): :bug: initially hide "Saved Point Coordinates" value and wai…
franmagn Oct 14, 2025
8b701d3
feat(#4): :pencil2: add description in the sidebar and make it editab…
franmagn Oct 15, 2025
7d804b7
refactor(#4): remove camera pivot coordinates
franmagn Oct 15, 2025
4dad112
style(#4): :art: add stylings for annotationPanel in the sidebar
franmagn Oct 15, 2025
205544e
feat(#35): :sparkles: Change to offline rendering
kleinc Oct 20, 2025
8a03cc9
refactor(#35): :recycle: run prettier
kleinc Oct 20, 2025
3e928f4
refactor(#35): :recycle: change inital starting position for camera
kleinc Oct 20, 2025
db67e3a
docs(#35): :memo: Add docs for function loadCountryBorders
kleinc Oct 20, 2025
fe5b4ab
refactor(#35): :goal_net: Add error handling
kleinc Oct 20, 2025
23944bf
refactor(#35): :recycle: Run prettier
kleinc Oct 20, 2025
89d65f4
feat(#4): :sparkles: Made a small express server for saving annotations
gautegf Oct 20, 2025
77b328c
feat(#4): :sparkles: Made a function for storing annotations
gautegf Oct 20, 2025
527a9af
build(#4): :building_construction: Added some dependencies
gautegf Oct 20, 2025
ecb7ff5
Merge branch 'dev' into save-annotations-to-file
gautegf Oct 20, 2025
c98a21a
reinstalled package lock
gautegf Oct 20, 2025
d46c7fe
test(#35): :test_tube: Make test to check rendering
kleinc Oct 20, 2025
a3d2d03
test(#37): :test_tube: Write test for sprint 1 code
kleinc Oct 20, 2025
74389ce
test(#35): :test_tube: Change tests to actually look for the globe
kleinc Oct 20, 2025
3f46613
Merge pull request #36 from TDT4290-group-4/35-change-to-offline-rend…
kleinc Oct 20, 2025
67de0a1
fix(#4): small fix to merge with other branch
franmagn Oct 20, 2025
b626233
feat(#4): :sparkles: update annotation persitence to work with the UI
gautegf Oct 20, 2025
5fbdeda
Merge branch '4-save-camera-positions-us5' into save-annotations-to-file
gautegf Oct 20, 2025
1350936
fix(#4): :bug: fixed import
gautegf Oct 20, 2025
138d58b
style(#4): :art: some small UI changes
franmagn Oct 22, 2025
f0bbe5c
style(#4): :art: ran prettier
franmagn Oct 22, 2025
294bc97
docs(#4): :memo: improved inline documentation in the code
franmagn Oct 22, 2025
9ef64a3
feat(#8): :sparkles: Filter based on acceted/not accepted
mariewah Oct 22, 2025
681caeb
docs(#4): :memo: Update readme
gautegf Oct 23, 2025
7fe4c10
Merge branch '4-save-camera-positions-us5' of git.ntnu.no:TDT4290-gro…
gautegf Oct 23, 2025
db4dc9a
ran prettier
gautegf Oct 23, 2025
0b98a45
style(#4): :lipstick: Update the UI for editing title and description…
gautegf Oct 23, 2025
70256be
ran prettier
gautegf Oct 23, 2025
82aed3a
chore:
mariewah Oct 23, 2025
2ea2c33
revert(#8): :fire: Remove elevation control and accepted filtering fi…
mariewah Oct 23, 2025
30a89bc
docs(#4): :memo: fixed and moved inline documentation
franmagn Oct 23, 2025
fa8725e
style(#4): fix annotation description edit box behaviour
franmagn Oct 23, 2025
6f45475
docs(#4): :memo: change name of two functions
franmagn Oct 23, 2025
4795405
refactor(#4): guard jQuery according to the scary rabbit
franmagn Oct 23, 2025
b084e93
style(#4): :art: ran format
franmagn Oct 23, 2025
8b54df5
refactor(#8): :adhesive_bandage: Adjusted to PR comments
mariewah Oct 24, 2025
e537d11
Merge pull request #38 from TDT4290-group-4/4-save-camera-positions-us5
mariewah Oct 24, 2025
c7c56a4
refactor: :twisted_rightwards_arrows: Resolve mergeconflict with dev …
mariewah Oct 24, 2025
c8e0895
refactor: :bug: One missing import fixed from the merge in the prev c…
mariewah Oct 24, 2025
9284341
Merge pull request #39 from TDT4290-group-4/8-point-filtering
mariewah Oct 24, 2025
e6a5081
feat(#40): load multiple point clouds simultaneously
Oct 25, 2025
a986ba5
fix(#40): make accepted filtering work with multiple clouds
Oct 25, 2025
86ed2ca
fix(#40): fix elevation control for multiple clouds
Oct 25, 2025
ee4f63a
fix(#40): make globe background option work again
Oct 25, 2025
6b7b721
fix(#40): remember previous elevation gradient
Oct 25, 2025
d83e23d
fix(#40): make it possible to close accordions
Oct 25, 2025
843b1c8
docs(#40): mention point cloud paths in readme
Oct 25, 2025
d1580ad
style(#40): run prettier formatting
Oct 25, 2025
f19fd56
fix(#40): minor coderabbit improvements
Oct 26, 2025
8a0bd38
refactor(#40): move point cloud loading before loadGUI
Oct 26, 2025
a7ab9cd
feat(#13): set up minimap
Oct 26, 2025
c4f9d26
docs(#13): add function documentation
Oct 26, 2025
63ee004
refactor(#13): remove unused tools
Oct 26, 2025
722c15d
docs(#43): :memo: Add JSdocs describing what the functions in this fi…
gautegf Oct 26, 2025
4a7af35
feat(#13): :lipstick: Made a background for the minimap
mariewah Oct 27, 2025
0a567a2
Merge pull request #44 from TDT4290-group-4/43-add-jsdocs-to-the-pers…
gautegf Oct 27, 2025
51c0185
Merge branch 'dev' of git.ntnu.no:TDT4290-group-4/MolloyExplorer into…
kleinc Oct 27, 2025
5f93b94
Merge pull request #41 from TDT4290-group-4/40-visualise-multiple-poi…
adriahso Oct 27, 2025
df56307
Merge branch 'dev' into 13-minimap
Oct 27, 2025
dc9f0a6
test(#37): :test_tube: Make test for sprint 1 code
kleinc Oct 27, 2025
b5a3798
docs(#37): :memo: Update readme to explain how to run cypress tests
kleinc Oct 27, 2025
9186fa3
Merge pull request #42 from TDT4290-group-4/13-minimap
adriahso Oct 27, 2025
fb1333e
refactor(#37): :recycle: run prettier
kleinc Oct 27, 2025
38c08d3
refactor(#37): :recycle: add verifications for tests
kleinc Oct 27, 2025
1bb2606
refactor(#37): add git ignore for cypress screenshots and add test sp…
kleinc Oct 27, 2025
7a197e4
refactor(#37): :recycle: move test specification from package-lock.sj…
kleinc Oct 27, 2025
8a16a71
refactor(#37): change file name from viewAttribute to measurementTool
kleinc Oct 27, 2025
9311ba8
refactor(#37): :recycle: Add specification to remove warning about tr…
kleinc Oct 27, 2025
1315491
Merge pull request #45 from TDT4290-group-4/37-test-sprint-1-code
kleinc Oct 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
### Issue number

Closes #

### Description

<!-- What does this PR do? Briefly describe the changes and their purpose. -->

### Testing steps

<!-- Describe how reviewers can test your changes (commands, steps, or setup instructions). -->

### Screenshots (optional)
20 changes: 12 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
stages:
- lint
name: Prettier

prettier:
stage: lint
image: node:20
script:
- npm ci
- npx prettier --check .
on: [pull_request]
jobs:
prettier:
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
- run: npm ci
- run: npx prettier --check .
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,7 @@ dist-ssr
*.sw?

# Point cloud data
/public/pointclouds/
/public/pointclouds/

# Cypress screenshots
/cypress/screenshots/
34 changes: 33 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Molloy Explorer is a 3D seabed visualization tool built with **Potree**. It allo

### Add point cloud data

Place the point cloud data (in Potree format with EPSG:4978 coordinates) in `public/pointclouds/data_converted`.
Place the point cloud data (in Potree format with EPSG:4978 coordinates) in `public/pointclouds`. Ensure the point cloud folder names match the paths specified in `src/config.js`, either by renaming the point cloud folders or by updating the paths.

**Note:** Point cloud files should not be committed to Git.

Expand All @@ -22,6 +22,12 @@ npm install
npm run dev
```

Then in a new terminal run the server:

```bash
npm run server
```

Open your browser at <http://localhost:5173> to view the app.

### Build for Production
Expand All @@ -31,3 +37,29 @@ npm run build
```

The built files will be in the `dist/` folder.

## Structure

### The Potree Build

This application is built using Potree as a package, meaning that the potree build is used as a base layer for UI and functionality and built onto by our own code. The add-ons may use, move or manipulate objects from the potree build, referencing the objects by classname or id.

### Updating Potree version

To update the version of Potree that this application uses you must make a build from the official potree app and replace the build folder here with the new one. There is no guarantee that Molloy Explorer is compatible with other versions of potree. Make sure that everything works on the development server before applying this to the production server.

## Cypress Testing

### Run Development Server

```bash
npm run dev
```

### Run Cypress tests

Then in a new terminal run the tests:

```bash
npm run test
```
10 changes: 10 additions & 0 deletions cypress.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { defineConfig } from 'cypress'

export default defineConfig({
e2e: {
setupNodeEvents(on, config) {
// implement node event listeners here
}
},
trashAssetsBeforeRuns: false
})
17 changes: 17 additions & 0 deletions cypress/e2e/demo.cy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// This is demo test
describe('demo test', () => {
it('passes', () => {
cy.visit('http://localhost:5173/#')
cy.contains('Molloy Explorer')
cy.contains('Repeat').click()
})
})

describe('demo test 2', () => {
it('passes', () => {
cy.visit('http://localhost:5173/#')
cy.get(
'#elevation_gradient_scheme_selection span:nth-child(1) rect'
).click()
})
})
24 changes: 24 additions & 0 deletions cypress/e2e/filtering.cy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/**Testing whether the Accepted components excists or not */
describe('Accepted filtering', () => {
it('test accepted filter button', function () {
cy.visit('http://localhost:5173/#')
cy.get('#doAcceptedFiltering').click()
})
})

/**Testing whether the Elevation components excists or not */
describe('Elevation Control', () => {
it('test elevation control', function () {
cy.visit('http://localhost:5173/#')
cy.get('#btnDoElevationControl').click()

cy.get(
'#elevation_gradient_scheme_selection span:nth-child(8) rect'
).click()
cy.get(
'#elevation_gradient_scheme_selection span:nth-child(3) rect'
).click()

cy.get('#sldHeightRange').click()
})
})
22 changes: 22 additions & 0 deletions cypress/e2e/globeRendering.cy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
describe('Globe Rendering and Interaction Test', () => {
it('Check that the viewer is rendered correctly', () => {
cy.visit('http://localhost:5173/#')
cy.wait(6000)

cy.window().then((win) => {
const cv = win.cesiumViewer
expect(cv).to.exist
expect(cv.scene.globe.show).to.equal(true)

expect(cv.scene.imageryLayers.length).to.be.at.least(0)
})
})

it('Render the globe and test interactions with the globe', () => {
cy.visit('http://localhost:5173/#')
cy.wait(6000)

cy.window({ timeout: 20000 }).its('cesiumViewer').should('exist')
cy.get('#cesiumContainer').should('exist')
})
})
56 changes: 56 additions & 0 deletions cypress/e2e/measurementTool.cy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
describe('Measurement tool', () => {
it('Places the measurement point', () => {
cy.visit('http://localhost:5173/#')

cy.get('#tools img[data-i18n="[title]tt.point_measurement"]').click()
cy.get('#potree_render_area canvas[tabindex="2222"]').click()

// Verify measurement was created
cy.get('#scene_object_properties').should('be.visible')
cy.get('#g_point_body').children().should('have.length.at.least', 1)
})

it('Delete measurement point', function () {
cy.visit('http://localhost:5173/#')

cy.get('#tools img[data-i18n="[title]tt.point_measurement"]').click()
cy.get('#potree_render_area canvas[tabindex="2222"]').click()
cy.get('#scene_object_properties [name="remove"]').click()
cy.get('#tools img[data-i18n="[title]tt.point_measurement"]').click()
cy.get('#potree_render_area canvas[tabindex="2222"]').click()
cy.get('#g_point_body button.m-row-delete').click()
})

it('Copy measurement point positions', function () {
cy.visit('http://localhost:5173/#')
cy.get('#tools img[data-i18n="[title]tt.point_measurement"]').click()
cy.get('#potree_render_area canvas[tabindex="2222"]').click()
cy.get('#scene_object_properties [name="copy"]').click()
})

it('Switch between measurement points', function () {
cy.visit('http://localhost:5173/#')
// Create three point measurements
cy.get('#tools img[data-i18n="[title]tt.point_measurement"]').click()
cy.get('#potree_render_area canvas[tabindex="2222"]').click()
cy.get('#tools img[data-i18n="[title]tt.point_measurement"]').click()
cy.get('#potree_render_area canvas[tabindex="2222"]').click()
cy.get('#tools img[data-i18n="[title]tt.point_measurement"]').click()
cy.get('#potree_render_area canvas[tabindex="2222"]').click()
// Switch between the created points
cy.get('#g_point_body span[title="Point #2"]').click()
cy.get('#g_point_body div:nth-child(1)').click()
cy.get('#g_point_body span[title="Point #3"]').click()
})

it('Open and close List of Measurements ', function () {
cy.visit('http://localhost:5173/#')

cy.get('#tools img[data-i18n="[title]tt.point_measurement"]').click()
cy.get('#potree_render_area canvas[tabindex="2222"]').click()
cy.get('#tools img[data-i18n="[title]tt.point_measurement"]').click()
cy.get('#potree_render_area canvas[tabindex="2222"]').click()
cy.get('#measurement_items span.m-group-title').click()
cy.get('#measurement_items span.m-group-title').click()
})
})
25 changes: 25 additions & 0 deletions cypress/e2e/shadedLighting.cy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
describe('Shaded Lighting', () => {
it('Toggle the EDL checkbox on and off', () => {
cy.visit('http://localhost:5173/#')
cy.get('#chkEDLEnabled').uncheck().should('not.be.checked')
cy.get('#chkEDLEnabled').check().should('be.checked')
})

it('Change radius', function () {
cy.visit('http://localhost:5173/#')
cy.get('div.potree_container').click()
cy.get('#sldEDLRadius span.ui-corner-all').click()
})

it('Change strength', function () {
cy.visit('http://localhost:5173/#')
cy.get('#sldEDLStrength span.ui-corner-all').click()
cy.get('#sldEDLStrength span.ui-corner-all').click()
})

it('Change opacity', function () {
cy.visit('http://localhost:5173/#')
cy.get('#sldEDLOpacity span.ui-corner-all').click()
cy.get('#sldEDLOpacity span.ui-corner-all').click()
})
})
5 changes: 5 additions & 0 deletions cypress/fixtures/example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name": "Using fixtures to represent data",
"email": "hello@cypress.io",
"body": "Fixtures are a great way to mock data for responses to routes"
}
25 changes: 25 additions & 0 deletions cypress/support/commands.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// ***********************************************
// This example commands.js shows you how to
// create various custom commands and overwrite
// existing commands.
//
// For more comprehensive examples of custom
// commands please read more here:
// https://on.cypress.io/custom-commands
// ***********************************************
//
//
// -- This is a parent command --
// Cypress.Commands.add('login', (email, password) => { ... })
//
//
// -- This is a child command --
// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... })
//
//
// -- This is a dual command --
// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... })
//
//
// -- This will overwrite an existing command --
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
17 changes: 17 additions & 0 deletions cypress/support/e2e.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// ***********************************************************
// This example support/e2e.js is processed and
// loaded automatically before your test files.
//
// This is a great place to put global configuration and
// behavior that modifies Cypress.
//
// You can change the location of this file or turn off
// automatically serving support files with the
// 'supportFile' configuration option.
//
// You can read more here:
// https://on.cypress.io/configuration
// ***********************************************************

// Import commands.js using ES2015 syntax:
import './commands'
13 changes: 8 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<link
rel="stylesheet"
type="text/css"
href="src/coordinateShowing/coordinateShowing.css"
href="src/CoordinateShowing/coordinateShowing.css"
/>
<link
rel="stylesheet"
Expand All @@ -38,6 +38,8 @@
rel="stylesheet"
href="/src/MeasurementControl/measurementsPanel.css"
/>
<link rel="stylesheet" href="/src/AnnotationControl/annotationPanel.css" />
<link rel="stylesheet" href="src/AcceptedFiltering/threePanels.css" />
</head>

<body>
Expand All @@ -54,7 +56,6 @@
<script src="/build/potree/potree.js"></script>
<script src="/libs/plasio/js/laslaz.js"></script>
<script src="/libs/three.js/build/three.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/proj4js/2.7.6/proj4.js"></script>
<script src="/libs/Cesium/Cesium.js"></script>

<div
Expand All @@ -70,9 +71,11 @@
>
<div id="potree_render_area">
<div id="cesiumContainer"></div>
<div id="canvasContainer">
<canvas id="elevationCanvas" width="200" height="30"></canvas>
<canvas id="posCanvas" width="200" height="30"></canvas>
<div id="coordinatesContainer">
<p id="coordinatesHeader">Target point:</p>
<p id="latitude">Latitude:</p>
<p id="longitude">Longitude:</p>
<p id="elevation">Elevation:</p>
</div>
</div>
<div id="potree_sidebar_container"></div>
Expand Down
Loading