OSDN Git Service
(root)
/
meshio
/
pymeshio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix shift FACTOR
[meshio/pymeshio.git]
/
examples
/
opengl
/
rokuro.py
diff --git
a/examples/opengl/rokuro.py
b/examples/opengl/rokuro.py
index
fd9eaff
..
4871292
100644
(file)
--- a/
examples/opengl/rokuro.py
+++ b/
examples/opengl/rokuro.py
@@
-31,8
+31,9
@@
class RokuroView(baseview.BaseView):
self.distance*=0.9
\r
\r
def shift(self, dx, dy):
\r
self.distance*=0.9
\r
\r
def shift(self, dx, dy):
\r
- self.shiftX+=dx
\r
- self.shiftY+=dy
\r
+ FACTOR=0.001
\r
+ self.shiftX+=dx * self.distance * FACTOR
\r
+ self.shiftY+=dy * self.distance * FACTOR
\r
\r
def rotate(self, head, pitch):
\r
self.head+=head
\r
\r
def rotate(self, head, pitch):
\r
self.head+=head
\r