Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
Nekoma Tech
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Chevalier Paul
Nekoma Tech
Commits
5f018b86
Commit
5f018b86
authored
2 weeks ago
by
Rioux Jeremy
Browse files
Options
Downloads
Patches
Plain Diff
mouvement souris fluide
parent
1a20f306
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Objet/__pycache__/ui.cpython-311.pyc
+0
-0
0 additions, 0 deletions
Objet/__pycache__/ui.cpython-311.pyc
Objet/main.py
+3
-3
3 additions, 3 deletions
Objet/main.py
Objet/ui.py
+3
-5
3 additions, 5 deletions
Objet/ui.py
with
6 additions
and
8 deletions
Objet/__pycache__/ui.cpython-311.pyc
+
0
−
0
View file @
5f018b86
No preview for this file type
This diff is collapsed.
Click to expand it.
Objet/main.py
+
3
−
3
View file @
5f018b86
...
...
@@ -60,9 +60,9 @@ class Main:
darken_factor
=
0.5
self
.
display
.
frame
=
(
self
.
display
.
frame
*
darken_factor
).
astype
(
np
.
uint8
)
if
self
.
ui
.
is_mouse_moving
():
self
.
display
.
draw_shape
(
self
.
ui
.
brightness
)
self
.
display
.
draw_all_points
(
self
.
ui
.
brightness
)
self
.
display
.
draw_shape
(
self
.
ui
.
brightness
)
self
.
display
.
draw_all_points
(
self
.
ui
.
brightness
)
self
.
display
.
draw_traj
()
self
.
display
.
display
()
...
...
This diff is collapsed.
Click to expand it.
Objet/ui.py
+
3
−
5
View file @
5f018b86
...
...
@@ -78,7 +78,7 @@ class UI:
elif
self
.
phase
==
'
mov
'
:
if
self
.
point_near
:
self
.
last_mouse_move
=
time
.
time
()
if
time
.
time
()
-
self
.
last_mouse_move
>=
0.4
:
if
time
.
time
()
-
self
.
last_mouse_move
>=
1
:
self
.
phase
=
'
down
'
self
.
time_phase
=
time
.
time
()
self
.
brightness
=
1
...
...
@@ -86,12 +86,10 @@ class UI:
if
time
.
time
()
-
self
.
last_mouse_move
<=
0.1
:
self
.
phase
=
'
mov
'
self
.
time_phase
=
time
.
time
()
elif
time
.
time
()
-
self
.
time_phase
<=
0.2
:
self
.
brightness
=
1
-
(
time
.
time
()
-
self
.
time_phase
)
*
5
else
:
self
.
brightness
=
1
-
(
time
.
time
()
-
self
.
time_phase
)
*
5
if
time
.
time
()
-
self
.
time_phase
>=
0.2
:
self
.
phase
=
'
imm
'
self
.
brightness
=
0
print
(
self
.
phase
,
round
(
self
.
brightness
,
3
))
def
get_brightness
(
self
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment