Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Amanda Ghassaei
FluidSimulation
Commits
900122ea
Commit
900122ea
authored
Apr 02, 2017
by
amandaghassaei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
eod
parent
7394777e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
+4
-6
main.js
main.js
+4
-6
No files found.
main.js
View file @
900122ea
...
...
@@ -20,7 +20,7 @@ var textureSizeLocationRender;
var
mouseCoordLocation
;
var
mouseCoordinates
=
[
null
,
null
];
var
mouseEnableLocation
;
var
mouseEnable
=
tru
e
;
var
mouseEnable
=
fals
e
;
var
paused
=
false
;
//while window is resizing
...
...
@@ -40,11 +40,8 @@ function initGL() {
canvas
.
onmousemove
=
onMouseMove
;
canvas
.
onmousedown
=
onMouseDown
;
//
canvas.onmouseup = onMouseUp;
canvas
.
onmouseup
=
onMouseUp
;
canvas
.
onmouseout
=
onMouseUp
;
canvas
.
onmouseenter
=
function
(){
mouseEnable
=
1
;
};
window
.
onresize
=
onResize
;
...
...
@@ -214,9 +211,10 @@ function onMouseMove(e){
function
onMouseDown
(
e
){
// gl.useProgram(stepProgram);
mouseEnable
=
true
;
mouseCoordinates
=
[
e
.
clientX
,
height
-
e
.
clientY
];
}
function
onMouseUp
(){
mouseEnable
=
0
;
mouseEnable
=
false
;
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment