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

实时rotation #54

Closed
Steven520xiaowei opened this issue Aug 8, 2018 · 3 comments
Closed

实时rotation #54

Steven520xiaowei opened this issue Aug 8, 2018 · 3 comments

Comments

@Steven520xiaowei
Copy link

我绑定了了mouseup事件,想在每次拖动结束后获取当前的rotation,这个怎么去获取

@hujiulong
Copy link
Owner

你可以监听mouseup事件,然后获取模型的rotation属性,像这样:

<model-obj ref="model" />

export default {
    data() {
        return {}
    },
    onMouseUp() {
        console.log(this.$refs.model.rotation);
    }
}

@Steven520xiaowei
Copy link
Author

thx

@Steven520xiaowei
Copy link
Author

我加载.obj模型的时候好像每次获取的rotation xyz都是0,这是什么原因?

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

No branches or pull requests

2 participants