<model-viewer> projectThis is the main GitHub repository for the <model-viewer> web component and
all of its related projects.
Getting started? Check out the <model-viewer> project!
The repository is organized into sub-directories containing the various projects. Check out the README.md files for specific projects to get more details:
👩🚀 <model-viewer> • The <model-viewer> web component (probably what you are looking for)
✨ <model-viewer-effects> • The PostProcessing plugin for <model-viewer>
🌐 modelviewer.dev • The source for the <model-viewer> documentation website
🖼 render-fidelity-tools • Tools for testing how well <model-viewer> renders models
🎨 shared-assets • 3D models, environment maps and other assets shared across many sub-projects
🚀 space-opera • The source of the <model-viewer> editor
When developing across all the projects in this repository, first install git, Node.js and npm.
Then, perform the following steps to get set up for development:
git clone --depth=1 git@github.com:google/model-viewer.git cd model-viewer npm install
Note: depth=1 keeps you from downloading our ~3Gb of history, which is dominated by all the versions of our golden render fidelity images.
The following global commands are available:
| Command | Description |
|---|---|
npm ci | Install dependencies and cross-links sub-projects |
npm run build | Runs the build step for all sub-projects |
npm run serve | Runs a web server and opens a new browser tab pointed to the local copy of modelviewer.dev (don't forget to build!) |
npm run test | Runs tests in all sub-projects that have them |
npm run clean | Removes built artifacts from all sub-projects |
You should now be ready to work on any of the <model-viewer> projects!
Due to dependency issues on Windows 10 we recommend running <model-viewer> setup from a WSL2 environment.
And installing Node.js & npm via NVM
You should clone model-viewer from inside WSL, not from inside Windows. Otherwise, you might run into line endings and symlink issues.
To clone via HTTPS in WSL (there are known file permissions issues with SSH keys inside WSL):
git clone --depth=1 https://github.com/google/model-viewer.git
cd model-viewer
npm install
To run tests in WSL, you need to bind CHROME_BIN:
export CHROME_BIN="/mnt/c/Program Files/Google/Chrome/Application/chrome.exe"
npm run test
Note that you should be able to run the packages/model-viewer and packages/model-viewer-effects tests with that setup, but running fidelity tests requires GUI support which is only available in WSL on Windows 11.
These issues should not happen when you have followed the above WSL setup steps (clone via HTTPS, clone from inside WSL, bind CHROME_BIN). The notes here might be helpful if you're trying to develop model-viewer from inside Windows (not WSL) instead (not recommended).
Running npm run test requires an environment variable on WSL that points to CHROME_BIN.
You can set that via this command (this is the default Chrome install directory, might be somewhere else on your machine)
export CHROME_BIN="/mnt/c/Program Files/Google/Chrome/Application/chrome.exe"
npm run test
Tests in packages/model-viewer and packages/model-viewer-effects should now run properly; fidelity tests might still fail (see errors and potential workarounds below).
/bin/bash^M: bad interpreter: No such file or directorySymptom
Running a .sh script, for example fetch-khronos-gltf-samples.sh, throws an error message /bin/bash^M: bad interpreter: No such file or directory
Alternative error:
! was unexpected at this time.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @google/model-viewer@1.10.1 prepare: `if [ ! -L './shared-assets' ]; then ln -s ../shared-assets ./shared-assets; fi && ../shared-assets/scripts/fetch-khronos-gltf-samples.sh`
Solution This is caused by incorrect line endings in some of the .sh files due to git changing these on checkout on Windows (not inside WSL). It's recommended to clone the model-viewer repository from a WSL session.
As a workaround, you can re-write line endings using the following command:
sed -i -e 's/\r$//' ../shared-assets/scripts/fetch-khronos-gltf-samples.sh
ERROR:browser_main_loop.cc(1409)] Unable to open X display.Symptom
When trying to npm run test, errors are logged similar to:
❌Fail to analyze scenario :khronos-IridescentDishWithOlives! Error message: ❌ Failed to capture model-viewer's screenshot
[836:836:0301/095227.204808:ERROR:browser_main_loop.cc(1409)] Unable to open X display.
Pupeteer tests need a display output; this means GUI support for WSL is required which seems to only be (easily) available on Windows 11, not Windows 10.
https://docs.microsoft.com/de-de/windows/wsl/tutorials/gui-apps#install-support-for-linux-gui-apps
So, the workaround seems to be running Windows 11 (but not tested yet).
ERROR: Task not found: "'watch:tsc"Symptom
Running npm run dev in packages/model-viewer on Windows throws error ERROR: Task not found: "'watch:tsc".
Solution (if you have one please make a PR!)
</details>

免费创建高清无水印Sora视频
Vora是一个免费创建高清无水印Sora视频的AI工具


最适合小白的AI自动化工作流平台
无需编码,轻松生成可复用、可变现的AI自动化工作流

大模型驱动的Excel数据处理工具
基于大模型交互的表格处理系统,允许用户通过对话方式完成数据整理和可视化分析。系统采用机器学习算法解析用户指令,自动执行排序、公式计算和数据透视等操作,支持多种文件格式导入导出。数据处理响应速度保持在0.8秒以内,支持超过100万行数据的即时分析。


AI辅助编程,代码自动修复
Trae是一种自适应的集成开发环境(IDE),通过自动化和多元协作改变开发流程。利用Trae,团队能够更快速、精确地编写和部署代码,从而提高编程效率和项目交付速度。Trae具备上下文感知和代码自动完成功能,是提升开发效率的理想工具。


AI论文写作指导平台
AIWritePaper论文写作是一站式AI论文写作辅助工具,简化了选题、文献检索至论文撰写的整个过程。通过简单设定,平台可快速生成高质量论文大纲和全文,配合图表、参考文献等一应俱全,同时提供开题报告和答辩PPT等增值服务,保障数据安全,有效提升写作效率和论文质量。


AI一键生成PPT,就用博思AIPPT!
博思AIPPT,新一代的AI生成PPT平台,支持智能生成PPT、AI美化PPT、文本&链接生成PPT、导入Word/PDF/Markdown文档生成PPT等,内置海量精美PPT模板,涵盖商务、教育、科技等不同风格,同时针对每个页面提供多种版式,一键自适应切换,完美适配各种办公场景。


AI赋能电商视觉革命,一站式智能商拍平台
潮际好麦深耕服装行业,是国内AI试衣效果最好的软件。使用先进AIGC能力为电商卖家批量提供优质的、低成本的商拍图。合作品牌有Shein、Lazada、安踏、百丽等65个国内外头部品牌,以及国内10万+淘宝、天猫、京东等主流平台的品牌商家,为卖家节省将近85%的出图成本,提升约3倍出图效率,让品牌能够快速上架。


企业专属的AI法律顾问
iTerms是法大大集团旗下法律子品牌,基于最先进的大语言模型(LLM)、专业的法律知识库和强大的智能体架构,帮助企业扫清合规障碍,筑牢风控防线,成为您企业专属的AI法律顾问。


稳定高效的流量提升解决方案,助力品牌曝光
稳定高效的流量提升解决方案,助力品牌曝光


最新版Sora2模型免费使用,一键生成无水印视频
最新版Sora2模型免费使用,一键生成无水印视频
最新AI工具、AI资讯