Skip to content

Allow overriding OrbitControls Properties#123

Merged
hujiulong merged 1 commit into
hujiulong:masterfrom
alaarihan:master
Sep 26, 2019
Merged

Allow overriding OrbitControls Properties#123
hujiulong merged 1 commit into
hujiulong:masterfrom
alaarihan:master

Conversation

@alaarihan
Copy link
Copy Markdown
Contributor

@alaarihan alaarihan commented Sep 24, 2019

I needed to disable zoom so I thought it's good to have a prop to override OrbitControls Properties
https://threejs.org/docs/#examples/en/controls/OrbitControls

Please tell me if you need any updates before merge.

This will fix these issues:
#97 #86

@hujiulong hujiulong merged commit 55e29f6 into hujiulong:master Sep 26, 2019
@hujiulong
Copy link
Copy Markdown
Owner

Thanks!

@alaarihan
Copy link
Copy Markdown
Contributor Author

Thank you!

@mhp-borisbojic
Copy link
Copy Markdown

@alaarihan @hujiulong

This doesn't seem to work correctly? From the code and documentation, I understand that the prop "controlsOption" expects an object with parameters from the OrbitControls, for example:

<template>
  <div id="app">
    <model-gltf
      src="/assets/objects/Wing2_optimized.gltf"
      :controlsOptions="controlsOptions"
    />
  </div>
</template>

<script>
import { ModelGltf } from 'vue-3d-model';
export default {
  name: 'App',

  components: {
    ModelGltf
  },

  data: function() {
    return {
      controlsOptions: {
        enablePan: false,
        enableZoom: false
      }
    }
  },

}
</script>

<style lang="scss">
#app {
  margin: 0 auto;
  width: 80%;
  border: 1px solid red;
}
</style>

I want to disable any zoom, but even with these settings, the zoom still works (with mouse and touchpad).

What am I doing wrong?

@alaarihan
Copy link
Copy Markdown
Contributor Author

@mhp-borisbojic This change has merged but it haven't released yet, so you need to use the master brunch of this repository to use this feature or you can wait for @hujiulong to release it.

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.

3 participants