Skip to content

Commit

Permalink
added faq (#4633)
Browse files Browse the repository at this point in the history
  • Loading branch information
elalish authored Jan 12, 2024
1 parent c20627f commit c9d3cb0
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions packages/modelviewer.dev/data/faq.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@
{
"name": "Can I have X feature from three.js?",
"htmlName": "three",
"description": "Probably not. We intentionally keep our API at a higher level than three.js, which is a full game engine. You're welcome to file a feature request if you have an idea that can be explained easily to lay users. You are also welcome to hack/fork us. You can use <code>mvElement[Object.getOwnPropertySymbols(mvElement).find(e => e.description === 'scene')];</code> to get access to our internal three.js scene and do whatever you want. However, this is outside the scope of our public API, so we make no effort to avoid breaking changes or to provide support.",
"links": []
"description": "Probably not. We intentionally keep our API at a higher level than three.js, which is a full game engine. You're welcome to file a feature request if you have an idea that can be explained easily to lay users. You are also welcome to hack/fork us. You can use <code>mvElement[Object.getOwnPropertySymbols(mvElement).find(e => e.description === 'scene')];</code> to get access to our internal three.js scene and do whatever you want. You can use our unbundled build and hook up Three.js with an import map as demonstrated in the link below to e.g. hook up other file loaders. However, this is all outside the scope of our public API, so we make no effort to avoid breaking changes or to provide support.",
"links": [
"<a href='../examples/postprocessing/#setup'>Import map example</a>"
]
},
{
"name": "Can I embed a 3D model in Twitter?",
Expand Down Expand Up @@ -103,6 +105,15 @@
"links": [
"<a href='https://docs.npmjs.com/cli/v7/using-npm/config#legacy-peer-deps'>NPM legacy-peer-deps documentation</a>"
]
},
{
"name": "How do I ensure &lt;model-viewer&gt; is self-contained?",
"htmlName": "remote",
"description": "When packaging an app or extension using &lt;model-viewer&gt;, it is important that everything you need is included in your package, but not more. We have several lazy-loaded modules for decoders that only some users need: DRACO, KTX2, Meshopt, and Lottie. These are loaded by URL and the defaults point to stable, external CDNs to make sure they \"just work\". If you don't use these features, those links will never be accessed, but a static checker can't know that and may flag these external resources. For any feature you need, you should change the Location to a relative URL within your project and copy the files there. If you don't need the feature, do the same thing, but make the file empty - since you'll never access its contents anyway, this will minimize your bundle size.",
"links": [
"<a href='../docs/#entrydocs-loading-staticproperties-dracoDecoderLocation'>Decoder location static properties</a>",
"<a href='../examples/loading/#dracoSupport'>Details on setting static properties</a>"
]
}
]
},
Expand Down

0 comments on commit c9d3cb0

Please sign in to comment.