如何在页面加载时以编程方式打开 A-Frame 检查器
How to open A-Frame inspector programmatically when the page loads
我需要在页面加载时自动打开检查器。
您可以在 a-scene 加载后手动调用 openInspector
函数:
var sceneEl = document.querySelector('a-scene');
sceneEl.addEventListener('loaded', function () {
sceneEl.components.inspector.openInspector();
});
工作示例:
https://glitch.com/edit/#!/brawny-candle-shrine?path=index.html%3A17%3A50
我需要在页面加载时自动打开检查器。
您可以在 a-scene 加载后手动调用 openInspector
函数:
var sceneEl = document.querySelector('a-scene');
sceneEl.addEventListener('loaded', function () {
sceneEl.components.inspector.openInspector();
});
工作示例:
https://glitch.com/edit/#!/brawny-candle-shrine?path=index.html%3A17%3A50