vue-3d-model icon indicating copy to clipboard operation
vue-3d-model copied to clipboard

can't open model-obj (vue-3d-model)

Open dpolkovnikova opened this issue 5 years ago • 5 comments

I'm trying to use model-obj component, but it doesn't work. Import library as instructed. If remove the component where I use it, no such text in console and all works fine. What can it be?

console-error1 console-error2

dpolkovnikova avatar Aug 10 '20 17:08 dpolkovnikova

Ok, problem solved^) I replaced 3d-files to the public folder. It placed at src/assets/... before. Strange, but 3d-model components see files only from public folder, but other components doesn't need such condition.

dpolkovnikova avatar Aug 10 '20 21:08 dpolkovnikova

Hi @dpolkovnikova! Please, can you clarify more? I am currently facing the same problem. I already moved the 3D models file into the public folder and didn't get anything! error

b31zakx96 avatar Aug 12 '20 15:08 b31zakx96

Finally, Its worked. It was a mistake on my part. I did not notice the source prop. I left it as it was before.

b31zakx96 avatar Aug 12 '20 15:08 b31zakx96

Hi I'm glad that you resolved your problem:) By the way did you try get 3d-models dinamically? By axios from mongodb, for example. Trying to do this, but unsuccessful

On Wed, Aug 12, 2020, 6:57 PM Zakaria BEL [email protected] wrote:

Finally, Its worked. It was a mistake on my part. I did not notice the source prop. I left it as it was before.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/hujiulong/vue-3d-model/issues/205#issuecomment-672960972, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOCJ3UJV3CPTNR4WMDDEU7TSAK3WFANCNFSM4P2FWWUA .

dpolkovnikova avatar Aug 12 '20 16:08 dpolkovnikova

Hi I'm glad that you resolved your problem:) By the way did you try get 3d-models dinamically? By axios from mongodb, for example. Trying to do this, but unsuccessful … On Wed, Aug 12, 2020, 6:57 PM Zakaria BEL @.***> wrote: Finally, Its worked. It was a mistake on my part. I did not notice the source prop. I left it as it was before. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#205 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOCJ3UJV3CPTNR4WMDDEU7TSAK3WFANCNFSM4P2FWWUA .

Hi, @dpolkovnikova

Three.js should load model by a certain url with get method, if you want to load from MongoDb/Mysql or another datasource, you can create an api that provide a binary model content (like glb binary format) by backend language;

If you already have an api endpoint url like this: http://api.model.com/:id, replace this to , and pay attention for Access-Origin problem.

At the end, I have some advice about this, 3d model is so large that backend return it real-time maybe is not a good choice, beacause it will cost bandwidth directly on your VPS, and it's uncacheable that you will wasting several times bandwidth for this; You can store the model to perfessional storage bucket such as S3(aws), and use the CDN (cloudfront, etc.) to access faster from user browser.

wangerzi avatar Aug 13 '20 03:08 wangerzi