我是学习 3d 建模的初学者,对 xml3d 特别感兴趣。我不在 IT 部门工作。
我想知道如何使用外部资产,唯一能找到的详细资源是 GitHub xml3d-examples。此站点资产示例展示了如何使用 3 个资产。
python -m SimpleHTTPServer
它在网上运行良好,但是当我下载 master.zip 并从 localhost(Windows 10,最新的 Chrome 浏览器;我使用 python 2.7设置本地主机)打开它时,什么也没显示。我在我的电脑中使用了最新版本的 xml3d.js 5.1。我将其替换为上述站点实际使用的文件,并且立方体显示正确,而其他两个资产仍然显示。
我不明白会发生什么,也无处学习使用资产的适当语法。
问题:要从 localhost 重现上述资产示例站点中的结果,我是否需要更新语法以在某处使用资产?我正在使用 xml3d.js v5.1 和python -m SimpleHTTPServer
Windows 10。
更新:Chrome 调试消息。
<page.js:107>
xml3d.js: 5.1.0
<page.js:108>
shade.js: none
<jquery.js:26 >
Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.
<xml3d.js:244>
Uncaught TypeError: Cannot read property '_configured' of null
g @ xml3d.js:244
<xml3d.js:754>
TypeError: No FormatHandler could be found for the document http://127.0.0.1:8000/examples/assets/res/assets.xml(…)
c.exports.doLog @ xml3d.js:754
c.exports.logError @ xml3d.js:755
(anonymous function) @ xml3d.js:668
<xml3d.js:754>
TypeError: Cannot set property '_documentURL' of undefined(…)
c.exports.doLog @ xml3d.js:754
c.exports.logError @ xml3d.js:755
(anonymous function) @ xml3d.js:668
<xml3d.js:754>
TypeError: No FormatHandler could be found for the document http://127.0.0.1:8000/examples/assets/protos.xml(…)
c.exports.doLog @ xml3d.js:754
c.exports.logError @ xml3d.js:755
(anonymous function) @ xml3d.js:668
<xml3d.js:754>
TypeError: Cannot set property '_documentURL' of undefined(…)
c.exports.doLog @ xml3d.js:754
c.exports.logError @ xml3d.js:755
(anonymous function) @ xml3d.js:668