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

Issue/15 implement 3 d model page route #27

Open
wants to merge 184 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
184 commits
Select commit Hold shift + click to select a range
9de2789
Decaffeniate files to javascript
emanuelGitCodes Mar 3, 2021
1de35ed
Decaffeniate files to javascript
emanuelGitCodes Mar 3, 2021
f91f9b3
Decaffeniate files to javascript
emanuelGitCodes Mar 3, 2021
4afaba4
Decaffeniate files to javascript
emanuelGitCodes Mar 3, 2021
5b28b47
Working on rendering a 3D object
emanuelGitCodes Mar 3, 2021
584e6c3
Working on rendering a 3D object
emanuelGitCodes Mar 3, 2021
528a440
Add THREE JS files, and mod webpack
emanuelGitCodes Mar 8, 2021
4c02d6e
Add THREE JS files, and mod webpack
emanuelGitCodes Mar 8, 2021
2ea8088
Add 3D object and confined's sceen to the board
emanuelGitCodes Mar 10, 2021
d25679e
Add 3D object and confined's sceen to the board
emanuelGitCodes Mar 10, 2021
cb6f16f
Add arrow in 3D space, also using canvas draw one in 2D space.
emanuelGitCodes Mar 12, 2021
a45d8e9
Add arrow in 3D space, also using canvas draw one in 2D space.
emanuelGitCodes Mar 12, 2021
001623e
Add 3D view in a 2D canvas
emanuelGitCodes Mar 15, 2021
17e376b
Add 3D view in a 2D canvas
emanuelGitCodes Mar 15, 2021
c47b584
Mostly reformat and Group obj
emanuelGitCodes Mar 15, 2021
277769d
Mostly reformat and Group obj
emanuelGitCodes Mar 15, 2021
40f2e81
Brain is burned
emanuelGitCodes Mar 19, 2021
0b18ad9
Brain is burned
emanuelGitCodes Mar 19, 2021
5a04826
Rename of files and update
emanuelGitCodes Mar 22, 2021
a725ff4
Rename of files and update
emanuelGitCodes Mar 22, 2021
8ae0e1c
3D canvas limit same as id=board
emanuelGitCodes Mar 22, 2021
f7df1cd
3D canvas limit same as id=board
emanuelGitCodes Mar 22, 2021
99889fa
Update draw3D.js so code is readable
emanuelGitCodes Mar 22, 2021
6ea792a
Update draw3D.js so code is readable
emanuelGitCodes Mar 22, 2021
b3bbb20
Working on dynamically changing height.
emanuelGitCodes Mar 24, 2021
9ca06c9
Working on dynamically changing height.
emanuelGitCodes Mar 24, 2021
e94f5d9
Render Multiple Objects at the same time.
emanuelGitCodes Mar 26, 2021
aaac4c0
Render Multiple Objects at the same time.
emanuelGitCodes Mar 26, 2021
f0ed9fa
Show a basic idea of finished product
emanuelGitCodes Mar 29, 2021
78ffb9e
Show a basic idea of finished product
emanuelGitCodes Mar 29, 2021
83f794f
Working on Server Error not finding file
emanuelGitCodes Apr 9, 2021
ba0df2e
Working on Server Error not finding file
emanuelGitCodes Apr 9, 2021
d699c3e
Render .obj files. Files downloaded from different webpages.
emanuelGitCodes Apr 12, 2021
cc9abb2
Render .obj files. Files downloaded from different webpages.
emanuelGitCodes Apr 12, 2021
9298717
Able to render OBJ using getMTLandOBJRender func
emanuelGitCodes Apr 12, 2021
4508e82
Able to render OBJ using getMTLandOBJRender func
emanuelGitCodes Apr 12, 2021
7c0b28e
Working on render obj being center and completly visible
emanuelGitCodes Apr 14, 2021
37258a7
Working on render obj being center and completly visible
emanuelGitCodes Apr 14, 2021
717fd14
Now render obj appear centralize in window.
emanuelGitCodes Apr 16, 2021
6e6c558
Now render obj appear centralize in window.
emanuelGitCodes Apr 16, 2021
6f1f9da
Obtain dimensions from model.
emanuelGitCodes Apr 23, 2021
b7eb4d8
Obtain dimensions from model.
emanuelGitCodes Apr 23, 2021
3f26997
Working on mouse traking.
emanuelGitCodes Apr 23, 2021
521721d
Working on mouse traking.
emanuelGitCodes Apr 23, 2021
9563a31
Hard code raycasting on model parts.
emanuelGitCodes Apr 23, 2021
d0e2936
Hard code raycasting on model parts.
emanuelGitCodes Apr 23, 2021
fb85e78
Create a temp file containing objRender code, while learning Raycaster
emanuelGitCodes Apr 29, 2021
f448649
Create a temp file containing objRender code, while learning Raycaster
emanuelGitCodes Apr 29, 2021
104d050
Rewrote objRender to use Raycaster. Not working due to parsing data s…
emanuelGitCodes Apr 30, 2021
02650c5
Rewrote objRender to use Raycaster. Not working due to parsing data s…
emanuelGitCodes Apr 30, 2021
9523991
Raycaster working with model
emanuelGitCodes May 3, 2021
e55a99e
Raycaster working with model
emanuelGitCodes May 3, 2021
d9f2fa3
Re-working Raycaster to detect vertices
emanuelGitCodes May 7, 2021
06538e1
Re-working Raycaster to detect vertices
emanuelGitCodes May 7, 2021
0d05ae7
Change appearence of detecting a mesh
emanuelGitCodes May 10, 2021
daad3d9
Change appearence of detecting a mesh
emanuelGitCodes May 10, 2021
e2c7d18
Detect specific vertices and id on model
emanuelGitCodes May 12, 2021
33538ac
Detect specific vertices and id on model
emanuelGitCodes May 12, 2021
110bf7a
Properly ID vertex
emanuelGitCodes May 14, 2021
4bd2fbe
Properly ID vertex
emanuelGitCodes May 14, 2021
f77abe3
Change something in webpack
emanuelGitCodes May 14, 2021
6023630
Change something in webpack
emanuelGitCodes May 14, 2021
17b8d9b
Core code of objRender.js is almost complete, need to be optimize
emanuelGitCodes May 14, 2021
985e48c
Core code of objRender.js is almost complete, need to be optimize
emanuelGitCodes May 14, 2021
8ffa1c1
Add style for option menu.
emanuelGitCodes May 18, 2021
65ec234
Add style for option menu.
emanuelGitCodes May 18, 2021
c1afeb3
New branch, for Page Routing between 2D and 3D content.
emanuelGitCodes May 19, 2021
c944df7
New branch, for Page Routing between 2D and 3D content.
emanuelGitCodes May 19, 2021
03212bf
Started the conversion of jQwery to vanilla Js
emanuelGitCodes May 21, 2021
752759d
Started the conversion of jQwery to vanilla Js
emanuelGitCodes May 21, 2021
1170e92
Rewrote must of the jQuery to Js
emanuelGitCodes May 25, 2021
e21b021
Rewrote must of the jQuery to Js
emanuelGitCodes May 25, 2021
15f7f11
Remap movements to WASD and load 3D model
emanuelGitCodes May 28, 2021
32bd2cf
Remap movements to WASD and load 3D model
emanuelGitCodes May 28, 2021
68d2d3e
Add a graph that shows FPS and other data when click
emanuelGitCodes Jun 1, 2021
4e4e0fb
Add a graph that shows FPS and other data when click
emanuelGitCodes Jun 1, 2021
d26ff40
Load dinamicly 3D script, working on adding async
emanuelGitCodes Jun 4, 2021
f158d0b
Load dinamicly 3D script, working on adding async
emanuelGitCodes Jun 4, 2021
0dc649e
Able to switch between model and label controls. Also UI changes
emanuelGitCodes Jun 7, 2021
ac742b6
Able to switch between model and label controls. Also UI changes
emanuelGitCodes Jun 7, 2021
fc8cfbd
Module Three works, work on other modules
emanuelGitCodes Jun 14, 2021
7d82ce0
Module Three works, work on other modules
emanuelGitCodes Jun 14, 2021
bda8afe
Modules are working.
emanuelGitCodes Jun 15, 2021
005e5db
Modules are working.
emanuelGitCodes Jun 15, 2021
8a2495d
Import form 3D to creator.
emanuelGitCodes Jun 21, 2021
6a9f740
Import form 3D to creator.
emanuelGitCodes Jun 21, 2021
34a471c
Place sphere where user cliks, cleand/document code
emanuelGitCodes Jun 25, 2021
d6d3fa7
Place sphere where user cliks, cleand/document code
emanuelGitCodes Jun 25, 2021
797c864
Adds spheres on click, working on removing them
emanuelGitCodes Jun 25, 2021
6d46c8c
Adds spheres on click, working on removing them
emanuelGitCodes Jun 25, 2021
e712018
Remove spheres partialy working
emanuelGitCodes Jun 28, 2021
e44454a
Remove spheres partialy working
emanuelGitCodes Jun 28, 2021
1caa3fb
Add/Remove for spheres work.
emanuelGitCodes Jul 2, 2021
12fc0cd
Add/Remove for spheres work.
emanuelGitCodes Jul 2, 2021
5ce3fe8
Center Camera btn working as intended
emanuelGitCodes Jul 8, 2021
09b50d5
Center Camera btn working as intended
emanuelGitCodes Jul 8, 2021
de0f405
only add vertex click on model to list and group
emanuelGitCodes Jul 9, 2021
a3a229c
only add vertex click on model to list and group
emanuelGitCodes Jul 9, 2021
da3964d
Clean up of core3D.js code
emanuelGitCodes Jul 9, 2021
c735578
Clean up of core3D.js code
emanuelGitCodes Jul 9, 2021
9caee41
On 3D labels can only be place on model
emanuelGitCodes Jul 9, 2021
68fed33
On 3D labels can only be place on model
emanuelGitCodes Jul 9, 2021
96b46ff
Try importing uvMaptoMousePoint
emanuelGitCodes Jul 16, 2021
251dc13
Try importing uvMaptoMousePoint
emanuelGitCodes Jul 16, 2021
57613f1
Add hide/show lines btn & render lines on mouse movement
emanuelGitCodes Jul 19, 2021
fe5b7f8
Add hide/show lines btn & render lines on mouse movement
emanuelGitCodes Jul 19, 2021
5408cf8
Parse data to the qset
emanuelGitCodes Aug 2, 2021
6e9c53d
Parse data to the qset
emanuelGitCodes Aug 2, 2021
3f3c6bb
Player UI Completed, working on reRenderLines
emanuelGitCodes Aug 9, 2021
ff3bb74
Player UI Completed, working on reRenderLines
emanuelGitCodes Aug 9, 2021
eff9b2b
Believe Player.js is Completed.
emanuelGitCodes Aug 11, 2021
1dab7a5
Believe Player.js is Completed.
emanuelGitCodes Aug 11, 2021
23e72c1
Believe Creator completed
emanuelGitCodes Aug 13, 2021
42803ec
Believe Creator completed
emanuelGitCodes Aug 13, 2021
6b646ad
Clean up code
emanuelGitCodes Aug 13, 2021
da10779
Clean up code
emanuelGitCodes Aug 13, 2021
429f27d
core3D can dinamically alter model scale for proper model to pointer …
emanuelGitCodes Aug 17, 2021
a3c534f
core3D can dinamically alter model scale for proper model to pointer …
emanuelGitCodes Aug 17, 2021
7f7827f
TEST! Draw func change due to Webpack shenanigans.
emanuelGitCodes Aug 18, 2021
bf09115
TEST! Draw func change due to Webpack shenanigans.
emanuelGitCodes Aug 18, 2021
3a5c501
WebPack Test
emanuelGitCodes Aug 19, 2021
d647d11
WebPack Test
emanuelGitCodes Aug 19, 2021
6ed9759
bed model
emanuelGitCodes Aug 19, 2021
047644b
bed model
emanuelGitCodes Aug 19, 2021
4f07ff7
Reversing changes to Labeling.Draw, adding comment blocks to core3D a…
FrenjaminBanklin Aug 19, 2021
cf64295
Reversing changes to Labeling.Draw, adding comment blocks to core3D a…
FrenjaminBanklin Aug 19, 2021
ef4b4f6
Merge branch 'issue/15-Implement-3D-model-PageRoute' of github.com:em…
FrenjaminBanklin Aug 19, 2021
a69ff21
Merge branch 'issue/15-Implement-3D-model-PageRoute' of github.com:em…
FrenjaminBanklin Aug 19, 2021
15aa63d
Test -> solving require
emanuelGitCodes Aug 24, 2021
3fc1985
Test -> solving require
emanuelGitCodes Aug 24, 2021
2917c47
Models are loading again, but dynamic imports are broken.
emanuelGitCodes Sep 7, 2021
3cd9f9c
Models are loading again, but dynamic imports are broken.
emanuelGitCodes Sep 7, 2021
3a13515
Builds and loads in docker
emanuelGitCodes Sep 7, 2021
7f25d45
Builds and loads in docker
emanuelGitCodes Sep 7, 2021
baf0acc
Fix Error running demo player
emanuelGitCodes Sep 8, 2021
dbd076e
Fix Error running demo player
emanuelGitCodes Sep 8, 2021
26cb483
Fixing ERROR: CORS
emanuelGitCodes Sep 17, 2021
b95167a
Fixing ERROR: CORS
emanuelGitCodes Sep 17, 2021
2ad4bba
Creator can swap current model for a new one
emanuelGitCodes Oct 6, 2021
447a794
Creator can swap current model for a new one
emanuelGitCodes Oct 6, 2021
8afd8b3
Creator can swap models when onMediaImportComplete exec.
emanuelGitCodes Oct 6, 2021
ffabf7d
Creator can swap models when onMediaImportComplete exec.
emanuelGitCodes Oct 6, 2021
ae26d2a
Creator & Player working.
emanuelGitCodes Oct 8, 2021
d229965
Creator & Player working.
emanuelGitCodes Oct 8, 2021
15f3f8f
Cleand up code and fix small bug
emanuelGitCodes Oct 11, 2021
7b4aeb6
Cleand up code and fix small bug
emanuelGitCodes Oct 11, 2021
996dd9a
add demo3D file
emanuelGitCodes Oct 22, 2021
08e1b1d
add demo3D file
emanuelGitCodes Oct 22, 2021
c42e616
Add keyboard supportAdd keyboard support for the creator and some tem…
emanuelGitCodes Nov 1, 2021
cd21f0a
Add keyboard supportAdd keyboard support for the creator and some tem…
emanuelGitCodes Nov 1, 2021
18aa465
Update mouse and keyboard support for creator.
emanuelGitCodes Nov 2, 2021
d471861
Update mouse and keyboard support for creator.
emanuelGitCodes Nov 2, 2021
f550fbe
Editing scaling func to take into account spheres.
emanuelGitCodes Nov 5, 2021
fe0e6bf
Editing scaling func to take into account spheres.
emanuelGitCodes Nov 5, 2021
c95c193
Add func and btn for increasing spheres scale
emanuelGitCodes Nov 10, 2021
38659ad
Add func and btn for increasing spheres scale
emanuelGitCodes Nov 10, 2021
8a83422
All Spheres scale evenly
emanuelGitCodes Nov 15, 2021
3fc3b04
All Spheres scale evenly
emanuelGitCodes Nov 15, 2021
d80323d
Scalling is done evently on all spheres
emanuelGitCodes Nov 15, 2021
d106cb7
Scalling is done evently on all spheres
emanuelGitCodes Nov 15, 2021
317fae5
In the player the line move with the model.
emanuelGitCodes Nov 16, 2021
7f0b878
In the player the line move with the model.
emanuelGitCodes Nov 16, 2021
6f18a81
Player recieves radius from creator.
emanuelGitCodes Nov 16, 2021
b0078f0
Player recieves radius from creator.
emanuelGitCodes Nov 16, 2021
7e863fe
Player sphere scale to the same scale as Creator.
emanuelGitCodes Nov 16, 2021
285a1d1
Player sphere scale to the same scale as Creator.
emanuelGitCodes Nov 16, 2021
eaa1009
Update based on feedback
emanuelGitCodes Nov 17, 2021
0ebeb09
Update based on feedback
emanuelGitCodes Nov 17, 2021
2f724df
In creator the alt key changes game state.
emanuelGitCodes Nov 18, 2021
0a43b21
In creator the alt key changes game state.
emanuelGitCodes Nov 18, 2021
a7e650f
Updating player line animation
emanuelGitCodes Nov 18, 2021
1a521c5
Updating player line animation
emanuelGitCodes Nov 18, 2021
a78dea0
Completed player animation
emanuelGitCodes Nov 23, 2021
ec6b135
Completed player animation
emanuelGitCodes Nov 23, 2021
1d5e46e
Add keyboard controls to the player
emanuelGitCodes Nov 23, 2021
81767bd
Add keyboard controls to the player
emanuelGitCodes Nov 23, 2021
71b7c66
Re-enable the media importer.
emanuelGitCodes Nov 23, 2021
bedfa87
Re-enable the media importer.
emanuelGitCodes Nov 23, 2021
54558ce
Quick improvement to the keyboard support for both sides.
emanuelGitCodes Nov 23, 2021
1735e02
Quick improvement to the keyboard support for both sides.
emanuelGitCodes Nov 23, 2021
9c878f3
Instructions menu functionality
emanuelGitCodes Nov 29, 2021
d32089a
Instructions menu functionality
emanuelGitCodes Nov 29, 2021
3ef6df4
Merge branch 'issue/15-Implement-3D-model-PageRoute' of github.com:em…
emanuelGitCodes Dec 15, 2021
ecfc97f
Updated files based on review feedback.
emanuelGitCodes Jan 13, 2022
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
10 changes: 7 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,23 @@
"cleanName": "labeling"
},
"version": "1.0.4",
"type": "module",
"scripts": {
"start": "webpack-dev-server",
"build": "webpack -p",
"build": "webpack",
"build-dev": "webpack",
"test": "echo 'tests not implemented'",
"test-ci": "echo 'tests not implemented'"
},
"dependencies": {
"html-webpack-plugin": "^3.2.0",
"materia-widget-development-kit": "2.4.2",
"materia-widget-development-kit": "2.5.2",
"meta-marked": "^0.4.2"
},
"license": "AGPL-3.0",
"description": "Students select items from a bank and use them to label associated parts of an image. Designed for use in Materia.",
"author": "University of Central Florida, Center for Distributed Learning"
"author": "University of Central Florida, Center for Distributed Learning",
"devDependencies": {
"@babel/preset-env": "^7.15.4"
}
}
6 changes: 4 additions & 2 deletions src/creator.coffee → src/coffeeBag/creator.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ Namespace('Labeling').Creator = do ->

_defaultLabel = '[label title]'

_curvature = 50;

initNewWidget = (widget, baseUrl) ->
$('#image').hide()
$('#chooseimage').show()
Expand Down Expand Up @@ -255,8 +257,8 @@ Namespace('Labeling').Creator = do ->

# drawLine handles the curves and such; run it for inner
# and outer stroke
Labeling.Draw.drawLine(_context, dotx + _offsetX, doty + _offsetY, labelx + _offsetX, labely + _offsetY, 6, '#fff')
Labeling.Draw.drawLine(_context, dotx + _offsetX, doty + _offsetY, labelx + _offsetX, labely + _offsetY, 2, '#000')
Labeling.Draw.drawLine(_context, dotx + _offsetX, doty + _offsetY, labelx + _offsetX, labely + _offsetY, 6, '#fff', _curvature)
Labeling.Draw.drawLine(_context, dotx + _offsetX, doty + _offsetY, labelx + _offsetX, labely + _offsetY, 2, '#000', _curvature)

# Add term to the list, called by the click event
_addTerm = (e) ->
Expand Down
15 changes: 11 additions & 4 deletions src/draw.coffee → src/coffeeBag/draw.coffee
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@

Namespace('Labeling').Draw = do ->
# draw a stylized line connecting to a term, with curvature
# shared between player and creator, since it MUST be consistent
# between the two
drawLine: (ctx,x1,y1,x2,y2,width,color) ->
drawLine: (ctx,x1,y1,x2,y2,width,color, curvature) ->
ctx.beginPath()

# move lines
Expand Down Expand Up @@ -33,10 +34,16 @@ Namespace('Labeling').Draw = do ->
lineResultX = -10
lineCurveOffsetX = -60

ctx.lineTo(x2 + labelOffsetX + lineCurveOffsetX, y2 + lineCurveOffsetY)
ctx.lineTo(x2 + labelOffsetX + lineResultX, y2 + labelOffsetY)
# Creates a curve Line
ctx.quadraticCurveTo(
x2 + labelOffsetX + lineCurveOffsetX + curvature,
y2 + lineCurveOffsetY + curvature,
x2 + labelOffsetX + lineResultX,
y2 + labelOffsetY
)


ctx.lineWidth = width
ctx.strokeStyle = color
ctx.lineCap = 'round'
ctx.stroke()

4 changes: 2 additions & 2 deletions src/player.coffee → src/coffeeBag/player.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -441,8 +441,8 @@ Namespace('Labeling').Engine = do ->

# draw a stroked line (one big line, one smaller on top)
_drawStrokedLine = (x1,y1,x2,y2,color1,color2,context = _context) ->
Labeling.Draw.drawLine(context, x1 + _offsetX, y1 + _offsetY, x2 + _offsetX, y2 + _offsetY, 6, color1)
Labeling.Draw.drawLine(context, x1 + _offsetX, y1 + _offsetY, x2 + _offsetX, y2 + _offsetY, 2, color2)
Labeling.Draw.drawLine(context, x1 + _offsetX, y1 + _offsetY, x2 + _offsetX, y2 + _offsetY, 6, color1, 50)
Labeling.Draw.drawLine(context, x1 + _offsetX, y1 + _offsetY, x2 + _offsetX, y2 + _offsetY, 2, color2, 50)

# render the canvas frame
_drawBoard = (mouseX=0,mouseY=0) ->
Expand Down
Loading