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

ply格式不能显示 #22

Closed
jingxa opened this issue Jan 2, 2018 · 6 comments
Closed

ply格式不能显示 #22

jingxa opened this issue Jan 2, 2018 · 6 comments
Labels

Comments

@jingxa
Copy link

jingxa commented Jan 2, 2018

大哥,你好,我在测试ply文件的时候,使用的html方法,但是在显示中,不能形成cavas标签,还是model-lply,如果我使用一个web服务器打开,提示我model-ply标签没有rotation这个属性;就是不能显示?请问我该如何解决这个问题呢?

hujiulong added a commit that referenced this issue Jan 3, 2018
@hujiulong
Copy link
Owner

谢谢反馈,是我忘记导出model-ply了,现在已经修复了,你可以重新安装一下。

@hujiulong hujiulong added the bug label Jan 4, 2018
@jingxa
Copy link
Author

jingxa commented Jan 5, 2018

哈哈。谢谢大哥了!

@jingxa
Copy link
Author

jingxa commented Jan 5, 2018

大哥。在麻烦一下。我主要使用script来使用,但是你的js好像还是不能用。。

<body>
    <div id="app">
        <model-ply src="bun_zipper.ply" :rotation="rotation"></model-ply>
    </div>
    <script src="https://cdn.jsdelivr.net/npm/vue"></script>
    <script src="vue-3d-model.min.js"></script>
    <script>
        new Vue({
            el: '#app'
        })
    </script>
</body>
vue:6 ReferenceError: rotation is not defined
    at Rt.eval (eval at Tn (vue:6), <anonymous>:2:107)
    at Rt.t._render (vue:6)
    at Rt.r (vue:6)
    at Kr.get (vue:6)
    at new Kr (vue:6)
    at vue:6
    at Rt.$mount (vue:6)
    at Rt.$mount (vue:6)
    at Rt.t._init (vue:6)
    at new Rt (vue:6)

我使用其他的obj.stl都可以显示。。。

@jingxa
Copy link
Author

jingxa commented Jan 5, 2018

还有ply对于格式有要求吗,ascii,或者2进制?还有纯点云数据可以显示么?还是 只能显示网格?谢谢

@hujiulong
Copy link
Owner

hujiulong commented Jan 5, 2018

这个报错是你代码的问题

<model-ply src="bun_zipper.ply" :rotation="rotation"></model-ply>

这里表示你将一个变量rotation传入,但是从你下面的代码来看,实际上没有这个变量。你需要把:rotation="rotation"去掉

ascII和二进制格式都支持

update:
我看了下,是因为我示例代码里多写了这个,我晚点改掉

@jingxa
Copy link
Author

jingxa commented Jan 7, 2018

haha ,谢谢了。我以为这个属性是ply的标签属性,谢谢你的解答啦。谢谢!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants