Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OrigamiSimulator
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Amanda Ghassaei
OrigamiSimulator
Commits
821eb848
Commit
821eb848
authored
Aug 29, 2017
by
amandaghassaei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
small fix
parent
ca972d08
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
index.html
index.html
+3
-2
js/dynamic/dynamicSolver.js
js/dynamic/dynamicSolver.js
+1
-1
No files found.
index.html
View file @
821eb848
...
...
@@ -412,13 +412,14 @@
vec2
fragCoord
=
gl_FragCoord
.
xy
;
vec2
scaledFragCoord
=
fragCoord
/
u_textureDim
;
vec3
lastPosition
=
texture2D
(
u_lastPosition
,
scaledFragCoord
).
xyz
;
vec2
mass
=
texture2D
(
u_mass
,
scaledFragCoord
).
xy
;
if
(
mass
[
1
]
==
1.0
){
//fixed
gl_FragColor
=
vec4
(
0.0
);
gl_FragColor
=
vec4
(
lastPosition
,
0.0
);
return
;
}
vec3
force
=
texture2D
(
u_externalForces
,
scaledFragCoord
).
xyz
;
vec3
lastPosition
=
texture2D
(
u_lastPosition
,
scaledFragCoord
).
xyz
;
vec3
lastLastPosition
=
texture2D
(
u_lastLastPosition
,
scaledFragCoord
).
xyz
;
vec3
lastVelocity
=
texture2D
(
u_lastVelocity
,
scaledFragCoord
).
xyz
;
vec3
originalPosition
=
texture2D
(
u_originalPosition
,
scaledFragCoord
).
xyz
;
...
...
js/dynamic/dynamicSolver.js
View file @
821eb848
...
...
@@ -514,7 +514,7 @@ function initDynamicSolver(globals){
}
globals
.
gpuMath
.
initTextureFromData
(
"
u_lastPosition
"
,
textureDim
,
textureDim
,
"
FLOAT
"
,
lastPosition
,
true
);
globals
.
gpuMath
.
initFrameBufferForTexture
(
"
u_lastPosition
"
,
true
);
if
(
globals
.
integrationType
==
"
verlet
"
)
globals
.
gpuMath
.
step
(
"
copyTexture
"
,
[
"
u_lastPosition
"
],
"
u_lastLastPosition
"
);
}
function
setCreasePercent
(
percent
){
...
...
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