-
-
Notifications
You must be signed in to change notification settings - Fork 88
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
Global: Clean up. #47
Conversation
@@ -165,7 +165,7 @@ | |||
player.position.set( - 13, - 0.75, - 9 ); | |||
|
|||
controls = new FirstPersonControls( player ); | |||
controls.lookSpeed = 2; | |||
controls.lookingSpeed = 2; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mind deleting the lines which were controls.lookSpeed = 2;
? I'd like to keep the current behavior and with setting lookingSpeed
to 2
the controls are too sensitive.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You misunderstand, the value was from you.
Either we remove this line (as lookSpeed
is no where used), or we have to rename the variable in the controls (as it is named lookingSpeed
there).
The problem is, you are writing to a property that is never read.
See the code in controls.js
:
this.lookingSpeed = 1; |
yuka/examples/navigation/firstperson/src/FirstPersonControls.js
Lines 152 to 153 in 73c0581
this.movementX -= event.movementX * 0.001 * this.lookingSpeed; | |
this.movementY -= event.movementY * 0.001 * this.lookingSpeed; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for not being clear 😅 . I've meant this:
Either we remove this line (as lookSpeed is no where used),
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Never mind! I clean things up 👍 .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, ok, sorry. That got lost in translation. 😸
All good then.
Some further nitpicks that came up while writing the typescript typings.
Several examples were missing
return
statements and some wrote to non existing or unused properties.