Skip to content
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

fix: initial camera position in keyboard controls #119

Merged
merged 2 commits into from
Jul 8, 2023

Conversation

JaimeTorrealba
Copy link
Member

close #117

@JaimeTorrealba JaimeTorrealba self-assigned this Jul 3, 2023
@netlify
Copy link

netlify bot commented Jul 3, 2023

Deploy Preview for cientos-tresjs ready!

Name Link
🔨 Latest commit 7c3e4d2
🔍 Latest deploy log https://app.netlify.com/sites/cientos-tresjs/deploys/64a591ced91eb6000833009d
😎 Deploy Preview https://deploy-preview-119--cientos-tresjs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@@ -105,6 +105,12 @@ const HBAmplitude = 0.3
const initJumpTime = ref(0)
const wrapperRef = shallowRef()
const _forward = is2D ? 'y' : 'z'
let initCameraPos = 0

watch(state.container, () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't be better to watch the state.camera ?

If your intention is to do it once the DOM is loaded, just use onMounted hook

@alvarosabu alvarosabu merged commit e4a03a6 into main Jul 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pointerlock + Keyboard doesn't respect initial Camera position
2 participants