Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding a highlight tool #482

Draft
wants to merge 134 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
134 commits
Select commit Hold shift + click to select a range
5ee0404
implementation of highlight tool
Tomas1337 Jun 29, 2024
e08c3b7
mobile touch implementation of highlight tool
Tomas1337 Jul 1, 2024
8cd18ea
implementing unghighlight for touch
Tomas1337 Jul 2, 2024
5dc8128
Update navigation.js
Tomas1337 Jul 2, 2024
68ad624
loading default model
Tomas1337 Jul 2, 2024
06ec6c9
limiting overlapped highlighted meshes
Tomas1337 Jul 2, 2024
855378d
remove some tools and panels for use case
Tomas1337 Jul 4, 2024
6c023d8
modifying sharing dialog interface
Tomas1337 Jul 4, 2024
861bfdb
Zooming feature in the dialog box
Tomas1337 Jul 4, 2024
d3483f1
rotate fix before and after dialog box
Tomas1337 Jul 4, 2024
db610c5
bug of offset not working after CaptureSnapshot used
Tomas1337 Jul 4, 2024
20e24c0
rotate and orbit in preview
Tomas1337 Jul 5, 2024
2f46236
Removed zoom slider to replace with mouse wheel. Added panning to sha…
Tomas1337 Jul 5, 2024
3f0d801
refactored
Tomas1337 Jul 5, 2024
b81904e
making the sharing form have 3 snapshot previews
Tomas1337 Jul 6, 2024
c46ba62
refactor
Tomas1337 Jul 7, 2024
6597b37
styling and better bug fix. (Not totally fixed)
Tomas1337 Jul 7, 2024
00d6f9e
Merge pull request #1 from Tomas1337/tmwih_share_02072024
Tomas1337 Jul 8, 2024
ea2b6bf
savepoint for implementing pdf feature
Tomas1337 Jul 9, 2024
4051bd2
adding pdf generation and download button.
Tomas1337 Jul 9, 2024
7d6404b
pdf download format checkpoint
Tomas1337 Jul 15, 2024
b113204
pdf finish feature
Tomas1337 Jul 15, 2024
611cba0
logo
Tomas1337 Jul 15, 2024
f3a9985
Merge branch 'master' into findmypain_02072024
Tomas1337 Jul 15, 2024
0b2ea1e
Merge pull request #2 from Tomas1337/findmypain_02072024
Tomas1337 Jul 15, 2024
c890a5d
slightly modfying the form to be better looking
Tomas1337 Jul 16, 2024
13e16a1
adding download icon and highlight con
Tomas1337 Jul 16, 2024
2018907
font files
Tomas1337 Jul 16, 2024
e6f7f32
typo
Tomas1337 Jul 17, 2024
83700ad
remove comment
Tomas1337 Jul 17, 2024
5e268e4
Merge pull request #3 from Tomas1337/sharingLayout0716
Tomas1337 Jul 17, 2024
55d3931
gh scripts
Tomas1337 Jul 17, 2024
8a7faa4
deploy for github pages
Tomas1337 Jul 17, 2024
3943b6d
Merge pull request #4 from Tomas1337/githubpages_deploy_0717
Tomas1337 Jul 17, 2024
4c5dfca
logging
Tomas1337 Jul 17, 2024
89c73e3
deploy
Tomas1337 Jul 17, 2024
073bab6
deploy changes
Tomas1337 Jul 17, 2024
f24763b
ghpages deploy needed
Tomas1337 Jul 17, 2024
cac4625
dev compatible changes
Tomas1337 Jul 18, 2024
60a7fda
Merge pull request #5 from Tomas1337/brandChanges_0718
Tomas1337 Jul 18, 2024
bc5bc9e
favicons
Tomas1337 Jul 18, 2024
912114d
index
Tomas1337 Jul 18, 2024
12d2281
Merge pull request #6 from Tomas1337/brandChanges_0718
Tomas1337 Jul 18, 2024
be3ac27
assets
Tomas1337 Jul 18, 2024
aa54a13
styling changes for share dialog
Tomas1337 Jul 18, 2024
dc39b7a
better touch events for mobile.
Tomas1337 Jul 18, 2024
70a7ef9
use the viewer.navigation pan zoom and orbit functions
Tomas1337 Jul 18, 2024
60e56ca
modified so that we close the panels if mobile device is detected
Tomas1337 Jul 19, 2024
e952a3f
revamp of previewimage engine
Tomas1337 Jul 19, 2024
ee2f36a
styling
Tomas1337 Jul 19, 2024
ed8cf55
layout to be better
Tomas1337 Jul 21, 2024
d8dd14a
fixed colors
Tomas1337 Jul 21, 2024
b721ebe
fix layout of images on mobile
Tomas1337 Jul 21, 2024
163187e
download report reimplemented
Tomas1337 Jul 21, 2024
9b3187b
mouse and touch events fixing
Tomas1337 Jul 21, 2024
5ca0315
making cameras unique for the snapshot
Tomas1337 Jul 22, 2024
9db6ce1
fix zoom
Tomas1337 Jul 22, 2024
4b6ea45
camera rotation
Tomas1337 Jul 22, 2024
13cb163
fixing zoom issue
Tomas1337 Jul 22, 2024
6e60abd
adding the highlight buttona as modal button on top of everything
Tomas1337 Jul 23, 2024
dde7ecc
attaching functionality from popped button to the toolbar button
Tomas1337 Jul 23, 2024
64708c5
partial navigation enabled on highlight tool
Tomas1337 Jul 23, 2024
12c5cbb
revert
Tomas1337 Jul 23, 2024
89e806f
navigating while highglight tool active
Tomas1337 Jul 23, 2024
574f20e
sharing dialog right click navigation bug fixed
Tomas1337 Jul 23, 2024
d9e608d
minor styling change
Tomas1337 Jul 23, 2024
f2fce64
updating the 3d models
Tomas1337 Jul 23, 2024
1bbac88
adding empahsized share button as sub tool
Tomas1337 Jul 23, 2024
24aca18
fomatting
Tomas1337 Jul 23, 2024
677a24f
resize event fixing
Tomas1337 Jul 23, 2024
b5625da
close button for sharing dialog
Tomas1337 Jul 23, 2024
3fa08e9
adding gender toggle
Tomas1337 Jul 24, 2024
d39c9cd
gender toggle and icon
Tomas1337 Jul 24, 2024
2447156
highlight button adjustments
Tomas1337 Jul 24, 2024
2b794d0
radius and color change for toggle
Tomas1337 Jul 24, 2024
5c7b64e
logo added shadow box on darkmode
Tomas1337 Jul 24, 2024
29c43fa
Solving bug of unintentionally highlighting when navigating
Tomas1337 Jul 25, 2024
53aea7c
implementing eraser tool
Tomas1337 Jul 25, 2024
b858bba
fixed switching bug on eraser tool
Tomas1337 Jul 25, 2024
3ad47f1
additional bug fixes for touchevents on erase and highlight
Tomas1337 Jul 25, 2024
f650358
Merge pull request #7 from Tomas1337/onboarding_guide_2507
Tomas1337 Jul 25, 2024
45f2f78
adding tour and removing weird highlight icon
Tomas1337 Jul 25, 2024
2c127cf
revert
Tomas1337 Jul 25, 2024
49e2fc4
modify message
Tomas1337 Jul 25, 2024
ce3df1f
icon placement
Tomas1337 Jul 25, 2024
892dd4b
remove highlightButton
Tomas1337 Jul 25, 2024
a0b6ee5
added changes for sharing dialog navigation
Tomas1337 Jul 26, 2024
2d61234
fixed pdf generator and handled some form modifications
Tomas1337 Jul 26, 2024
a653a5e
adding on clear (erase all tool)
Tomas1337 Jul 26, 2024
0f5a343
changes on sharing dialog styling for better mobile experience
Tomas1337 Jul 29, 2024
e5e1c08
adding umami tracking
Tomas1337 Jul 30, 2024
d1b635e
linting fixesd
Tomas1337 Jul 30, 2024
724fbe7
quote style change
Tomas1337 Jul 30, 2024
d4285b3
strict linting
Tomas1337 Jul 30, 2024
de18cdd
adding in umami custom event tracking
Tomas1337 Jul 30, 2024
3ae839f
simpler events
Tomas1337 Jul 30, 2024
0933308
remove umami on dev
Tomas1337 Jul 30, 2024
a2f6bf0
tour js gifs
Tomas1337 Jul 30, 2024
bf61563
report image tour
Tomas1337 Jul 30, 2024
2fa6586
better mobile sharing experience
Tomas1337 Aug 6, 2024
9eece55
better close on desktop
Tomas1337 Aug 6, 2024
557501e
styling changes for sharing dialog
Tomas1337 Aug 6, 2024
d47c9d8
padding on content
Tomas1337 Aug 6, 2024
4e0e788
changing max-width
Tomas1337 Aug 6, 2024
cea20c6
tour changes and added field suggestions
Tomas1337 Aug 6, 2024
d34c900
reverting
Tomas1337 Aug 6, 2024
d2d9140
width problems on sharing dialog
Tomas1337 Aug 6, 2024
dcdbe01
strict linting
Tomas1337 Aug 6, 2024
329f806
error
Tomas1337 Aug 6, 2024
cbcee23
adding in bmc
Tomas1337 Aug 7, 2024
331522d
cleaning up
Tomas1337 Aug 7, 2024
b26a8c0
cleaning up
Tomas1337 Aug 7, 2024
58ccf3c
adding in intensity for highlight tool.
Tomas1337 Aug 7, 2024
fec3a12
Merge pull request #8 from Tomas1337/colorHighlight
Tomas1337 Aug 7, 2024
2d125fc
less intense
Tomas1337 Aug 7, 2024
140d44a
Merge pull request #9 from Tomas1337/colorHighlight
Tomas1337 Aug 7, 2024
4f0930c
clearing console logs
Tomas1337 Aug 7, 2024
e042419
linting
Tomas1337 Aug 7, 2024
127957b
removing seperator
Tomas1337 Aug 8, 2024
cfd9534
tiny dissaperring change
Tomas1337 Aug 8, 2024
a84afdb
semi implementation of decreasing intensity
Tomas1337 Aug 8, 2024
71cb6fd
brush size implementation
Tomas1337 Aug 9, 2024
0601c16
update remove highlight tool
Tomas1337 Aug 9, 2024
ca9c7a8
burshsizes and slider
Tomas1337 Aug 9, 2024
6fa5980
bmc position
Tomas1337 Aug 9, 2024
29c9706
decrease intensity
Tomas1337 Aug 9, 2024
bf303c2
highlight turtorial change
Tomas1337 Aug 9, 2024
33cc899
semicolon
Tomas1337 Aug 9, 2024
0eabbbe
adding in a bit of seo and qol change on intensity
Tomas1337 Aug 9, 2024
89a5ec6
bug with pdf generated have zoomed in images
Tomas1337 Aug 10, 2024
49a2f58
readme
Tomas1337 Aug 31, 2024
830f558
removing some things
Tomas1337 Aug 31, 2024
af19c56
Update README.md
Tomas1337 Sep 1, 2024
d0618d2
fix for brush size slider thing
Tomas1337 Sep 6, 2024
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
45 changes: 45 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Deploy to GitHub Pages

on:
push:
branches:
- master # Set this to your default branch

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18' # Set this to the node version you're using

- name: Install dependencies
run: npm ci

- name: Build
run: |
npm run build_engine
npm run build_website
npm run copy_assets
mkdir -p build/website
cp -R website/* build/website/
cp CNAME build/website/
cp build/engine/o3dv.min.js build/website/

- name: List build contents
run: ls -R build/website

- name: Debug
run: |
echo "Contents of build/website:"
ls -R build/website

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build/website
force_orphan: true
1 change: 1 addition & 0 deletions CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tellmewhereithurtsnow.com
59 changes: 45 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,55 @@
# Online 3D Viewer
# TellMeWhereItHurtsNow.com

[![Build status](https://github.com/kovacsv/Online3DViewer/actions/workflows/build.yml/badge.svg)](https://github.com/kovacsv/Online3DViewer/actions/workflows/build.yml)
[![npm version](https://badge.fury.io/js/online-3d-viewer.svg)](https://badge.fury.io/js/online-3d-viewer)
[![DeepScan grade](https://deepscan.io/api/teams/16586/projects/19893/branches/524595/badge/grade.svg)](https://deepscan.io/dashboard#view=project&tid=16586&pid=19893&bid=524595)
## Interactive 3D Pain Mapping Tool

Online 3D Viewer (https://3dviewer.net) is a free and open source web solution to visualize and explore 3D models in your browser. This repository contains the source code of the website and the library behind it.
TellMeWhereItHurtsNow.com is an innovative web application that allows users to visually communicate their pain experiences using a 3D human model. This tool is designed to help individuals accurately pinpoint and describe areas of discomfort, facilitating better communication with healthcare providers and tracking of pain over time.

[Live website](https://3dviewer.net)  -  [Website documentation](https://3dviewer.net/info)  -  [Developer documentation](https://kovacsv.github.io/Online3DViewer)  -  [Discord server](https://discord.gg/C7x9u833yN)
**Note**: This project is a repurposed version of [Online3DViewer](https://github.com/kovacsv/Online3DViewer) by kovacsv. We have adapted and modified the original codebase to create this pain mapping tool.

## Example
## Features

![Start Page](assets/images/3dviewer_net_start_page.png?raw=true)
- **Interactive 3D Human Model**: Users can manipulate a detailed 3D representation of the human body to accurately indicate pain locations.
- **Highlight Tool**: An intuitive highlighting feature enables users to mark specific areas of pain on the 3D model.
- **Pain Intensity Scale**: Users can indicate the severity of their pain using a color-coded intensity scale.
- **Multiple View Angles**: The 3D model can be rotated and viewed from various angles to ensure precise pain location mapping.
- **Save and Share**: Users can save their pain maps and easily share them with healthcare professionals.
- **Responsive Design**: The application is optimized for use on desktop and mobile devices.

[Check the live version!](https://3dviewer.net/#model=https://raw.githubusercontent.com/kovacsv/Online3DViewer/dev/test/testfiles/gltf/DamagedHelmet/glTF-Binary/DamagedHelmet.glb)
## How It Works

## Supported file formats
1. Access TellMeWhereItHurtsNow.com through your web browser.
2. Use the controls to rotate and position the 3D human model.
3. Select the highlight tool and mark the areas where you're experiencing pain.
4. Adjust the color intensity to indicate the severity of pain in each area.
5. Save your pain map and generate a shareable link or report.

* **Import**: 3dm, 3ds, 3mf, amf, bim, brep, dae, fbx, fcstd, gltf, ifc, iges, step, stl, obj, off, ply, wrl.
* **Export**: 3dm, bim, gltf, obj, off, stl, ply.
## Technology Stack

## External Libraries
- Frontend: HTML5, CSS3, JavaScript
- 3D Rendering: WebGL

Online 3D Viewer uses these wonderful libraries: [three.js](https://github.com/mrdoob/three.js), [pickr](https://github.com/Simonwep/pickr), [fflate](https://github.com/101arrowz/fflate), [draco](https://github.com/google/draco), [rhino3dm](https://github.com/mcneel/rhino3dm), [web-ifc](https://github.com/tomvandig/web-ifc), [occt-import-js](https://github.com/kovacsv/occt-import-js).
## Contributing

We welcome contributions to improve TellMeWhereItHurtsNow.com! Please read our contributing guidelines before submitting pull requests.

## License

This project is licensed under the Creative Commons Attribution-NonCommercial 4.0 International License (CC BY-NC 4.0). This means you are free to:

- Share — copy and redistribute the material in any medium or format
- Adapt — remix, transform, and build upon the material

Under the following terms:

- Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made.
- NonCommercial — You may not use the material for commercial purposes.

For more details, please see the [full license text](https://creativecommons.org/licenses/by-nc/4.0/legalcode).

## Acknowledgments

We would like to express our gratitude to kovacsv for creating the original Online3DViewer project, which served as the foundation for TellMeWhereItHurtsNow.com. The original project can be found at https://github.com/kovacsv/Online3DViewer.

## Contact

For support or inquiries, please contact Tomas Lastrilla.
Binary file added assets/favicons/android-chrome-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/favicons/android-chrome-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/favicons/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions assets/favicons/browserconfig.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<browserconfig>
<msapplication>
<tile>
<square150x150logo src="/mstile-150x150.png"/>
<TileColor>#f5f5dc</TileColor>
</tile>
</msapplication>
</browserconfig>
Binary file added assets/favicons/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/favicons/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/favicons/favicon.ico
Binary file not shown.
Binary file added assets/favicons/mstile-150x150.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading