我正在尝试在Android应用而非网络浏览器中实现aframe场景。 我已经成功构建了离子/角度代码,可以在其中将aframe场景插入到app.component.html中,如下所示:
<script src="https://aframe.io/releases/0.6.1/aframe.min.js"></script>
<script src="https://jeromeetienne.github.io/AR.js/aframe/build/aframe-ar.js"></script>
<ion-content >
<a-scene embedded arjs='sourceType: webcam; trackingMethod: best; debugUIEnabled: false;'>
<a-marker preset='hiro'>
<a-box position="-1 0.5 -3" rotation="0 45 0" color="#4CC3D9"></a-box>
</a-marker>
<a-entity camera></a-entity>
</a-scene>
</ion-content>
并将其部署到我的Android设备上。当我检查应用程序时,我遇到了以下问题:
No DPDB device match.
Dpdb.calcDeviceParams_ @ polyfills.js:61510
Dpdb.recalculateDeviceParams_ @ polyfills.js:61455
Dpdb @ polyfills.js:61433
CardboardVRDisplay @ polyfills.js:62703
WebVRPolyfill.getPolyfillDisplays @ polyfills.js:62943
WebVRPolyfill.getVRDisplays @ polyfills.js:62989
WebVRPolyfill @ polyfills.js:62931
149.../package @ polyfills.js:76989
s @ polyfills.js:33
e @ polyfills.js:33
(anonymous) @ polyfills.js:33
(anonymous) @ polyfills.js:33
./node_modules/aframe/dist/aframe-master.js @ polyfills.js:33
__webpack_require__ @ runtime.js:84
./src/polyfills.ts @ polyfills.js:87026
__webpack_require__ @ runtime.js:84
2 @ polyfills.js:87100
__webpack_require__ @ runtime.js:84
checkDeferredModules @ runtime.js:46
webpackJsonpCallback @ runtime.js:33
(anonymous) @ polyfills.js:1
polyfills.js:61462 Failed to recalculate device parameters.
Dpdb.recalculateDeviceParams_ @ polyfills.js:61462
Dpdb @ polyfills.js:61433
CardboardVRDisplay @ polyfills.js:62703
WebVRPolyfill.getPolyfillDisplays @ polyfills.js:62943
WebVRPolyfill.getVRDisplays @ polyfills.js:62989
WebVRPolyfill @ polyfills.js:62931
149.../package @ polyfills.js:76989
s @ polyfills.js:33
e @ polyfills.js:33
(anonymous) @ polyfills.js:33
(anonymous) @ polyfills.js:33
./node_modules/aframe/dist/aframe-master.js @ polyfills.js:33
__webpack_require__ @ runtime.js:84
./src/polyfills.ts @ polyfills.js:87026
__webpack_require__ @ runtime.js:84
2 @ polyfills.js:87100
__webpack_require__ @ runtime.js:84
checkDeferredModules @ runtime.js:46
webpackJsonpCallback @ runtime.js:33
(anonymous) @ polyfills.js:1
polyfills.js:61246 Using fallback Android device measurements.
DeviceInfo.determineDevice_ @ polyfills.js:61246
DeviceInfo.updateDeviceParams @ polyfills.js:61231
DeviceInfo @ polyfills.js:61223
CardboardVRDisplay @ polyfills.js:62704
WebVRPolyfill.getPolyfillDisplays @ polyfills.js:62943
WebVRPolyfill.getVRDisplays @ polyfills.js:62989
WebVRPolyfill @ polyfills.js:62931
149.../package @ polyfills.js:76989
s @ polyfills.js:33
e @ polyfills.js:33
(anonymous) @ polyfills.js:33
(anonymous) @ polyfills.js:33
./node_modules/aframe/dist/aframe-master.js @ polyfills.js:33
__webpack_require__ @ runtime.js:84
./src/polyfills.ts @ polyfills.js:87026
__webpack_require__ @ runtime.js:84
2 @ polyfills.js:87100
__webpack_require__ @ runtime.js:84
checkDeferredModules @ runtime.js:46
webpackJsonpCallback @ runtime.js:33
(anonymous) @ polyfills.js:1
polyfills.js:2200 A-Frame:warn Put the A-Frame 'script' tag in the 'head' of the HTML *before* the scene to ensure everything for A-Frame is properly registered before they are used from HTML.
polyfills.js:73164 [Deprecation] document.registerElement is deprecated and will be removed in M73, around March 2019. Please use window.customElements.define instead. See https://www.chromestatus.com/features/4642138092470272 for more details.
module.exports.registerElement @ polyfills.js:73164
101.../utils/ @ polyfills.js:72839
s @ polyfills.js:33
(anonymous) @ polyfills.js:33
102../a-entity @ polyfills.js:73279
s @ polyfills.js:33
(anonymous) @ polyfills.js:33
106.../../lib/three @ polyfills.js:74389
s @ polyfills.js:33
(anonymous) @ polyfills.js:33
149.../package @ polyfills.js:77030
s @ polyfills.js:33
e @ polyfills.js:33
(anonymous) @ polyfills.js:33
(anonymous) @ polyfills.js:33
./node_modules/aframe/dist/aframe-master.js @ polyfills.js:33
__webpack_require__ @ runtime.js:84
./src/polyfills.ts @ polyfills.js:87026
__webpack_require__ @ runtime.js:84
2 @ polyfills.js:87100
__webpack_require__ @ runtime.js:84
checkDeferredModules @ runtime.js:46
webpackJsonpCallback @ runtime.js:33
(anonymous) @ polyfills.js:1
polyfills.js:77059 A-Frame Version: 0.9.2 (Date 2019-05-06, Commit #f57a1fa)
polyfills.js:77060 three Version (https://github.com/supermedium/three.js): ^0.102.2
polyfills.js:77062 WebVR Polyfill Version: ^0.10.10
polyfills.js:61510 No DPDB device match.
Dpdb.calcDeviceParams_ @ polyfills.js:61510
Dpdb.recalculateDeviceParams_ @ polyfills.js:61455
(anonymous) @ polyfills.js:61443
load (async)
Dpdb @ polyfills.js:61439
CardboardVRDisplay @ polyfills.js:62703
WebVRPolyfill.getPolyfillDisplays @ polyfills.js:62943
WebVRPolyfill.getVRDisplays @ polyfills.js:62989
WebVRPolyfill @ polyfills.js:62931
149.../package @ polyfills.js:76989
s @ polyfills.js:33
e @ polyfills.js:33
(anonymous) @ polyfills.js:33
(anonymous) @ polyfills.js:33
./node_modules/aframe/dist/aframe-master.js @ polyfills.js:33
__webpack_require__ @ runtime.js:84
./src/polyfills.ts @ polyfills.js:87026
__webpack_require__ @ runtime.js:84
2 @ polyfills.js:87100
__webpack_require__ @ runtime.js:84
checkDeferredModules @ runtime.js:46
webpackJsonpCallback @ runtime.js:33
(anonymous) @ polyfills.js:1
polyfills.js:61462 Failed to recalculate device parameters.
Dpdb.recalculateDeviceParams_ @ polyfills.js:61462
(anonymous) @ polyfills.js:61443
load (async)
Dpdb @ polyfills.js:61439
CardboardVRDisplay @ polyfills.js:62703
WebVRPolyfill.getPolyfillDisplays @ polyfills.js:62943
WebVRPolyfill.getVRDisplays @ polyfills.js:62989
WebVRPolyfill @ polyfills.js:62931
149.../package @ polyfills.js:76989
s @ polyfills.js:33
e @ polyfills.js:33
(anonymous) @ polyfills.js:33
(anonymous) @ polyfills.js:33
./node_modules/aframe/dist/aframe-master.js @ polyfills.js:33
__webpack_require__ @ runtime.js:84
./src/polyfills.ts @ polyfills.js:87026
__webpack_require__ @ runtime.js:84
2 @ polyfills.js:87100
__webpack_require__ @ runtime.js:84
checkDeferredModules @ runtime.js:46
webpackJsonpCallback @ runtime.js:33
(anonymous) @ polyfills.js:1
polyfills.js:28172 THREE.WebGLRenderer 103dev
polyfills.js:20942 THREE.WebGLRenderer: OES_texture_float extension not supported.
get @ polyfills.js:20942
WebGLCapabilities @ polyfills.js:20703
initGLContext @ polyfills.js:28366
WebGLRenderer @ polyfills.js:28416
setupRenderer @ polyfills.js:74984
value @ polyfills.js:74471
attachedCallback @ polyfills.js:73255
push../node_modules/@angular/platform-browser/fesm5/platform-browser.js.DefaultDomRenderer2.appendChild @ vendor.js:66975
push../node_modules/@angular/core/fesm5/core.js.DebugRenderer2.appendChild @ vendor.js:58315
execRenderNodeAction @ vendor.js:54794
visitRenderNode @ vendor.js:54777
visitProjectedRenderNodes @ vendor.js:54744
appendNgContent @ vendor.js:56686
createViewNodes @ vendor.js:57317
callViewAction @ vendor.js:57614
execComponentViewsAction @ vendor.js:57533
createViewNodes @ vendor.js:57326
callViewAction @ vendor.js:57614
execComponentViewsAction @ vendor.js:57533
createViewNodes @ vendor.js:57326
createRootView @ vendor.js:57212
callWithDebugContext @ vendor.js:58220
debugCreateRootView @ vendor.js:57730
push../node_modules/@angular/core/fesm5/core.js.ComponentFactory_.create @ vendor.js:55551
push../node_modules/@angular/core/fesm5/core.js.ComponentFactoryBoundToModule.create @ vendor.js:43978
push../node_modules/@angular/core/fesm5/core.js.ApplicationRef.bootstrap @ vendor.js:52131
(anonymous) @ vendor.js:51851
push../node_modules/@angular/core/fesm5/core.js.PlatformRef._moduleDoBootstrap @ vendor.js:51851
(anonymous) @ vendor.js:51819
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke @ polyfills.js:84057
onInvoke @ vendor.js:51342
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke @ polyfills.js:84056
push../node_modules/zone.js/dist/zone.js.Zone.run @ polyfills.js:83816
(anonymous) @ polyfills.js:84555
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask @ polyfills.js:84089
onInvokeTask @ vendor.js:51333
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask @ polyfills.js:84088
push../node_modules/zone.js/dist/zone.js.Zone.runTask @ polyfills.js:83861
drainMicroTaskQueue @ polyfills.js:84267
Promise.then (async)
scheduleMicroTask @ polyfills.js:84250
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.scheduleTask @ polyfills.js:84079
push../node_modules/zone.js/dist/zone.js.Zone.scheduleTask @ polyfills.js:83904
push../node_modules/zone.js/dist/zone.js.Zone.scheduleMicroTask @ polyfills.js:83924
scheduleResolveOrReject @ polyfills.js:84545
ZoneAwarePromise.then @ polyfills.js:84678
push../node_modules/@angular/core/fesm5/core.js.PlatformRef.bootstrapModule @ vendor.js:51846
./src/main.ts @ main.js:1062
__webpack_require__ @ runtime.js:84
0 @ main.js:1075
__webpack_require__ @ runtime.js:84
checkDeferredModules @ runtime.js:46
webpackJsonpCallback @ runtime.js:33
(anonymous) @ main.js:1
Show 9 more frames
polyfills.js:20942 THREE.WebGLRenderer: OES_texture_half_float extension not supported.
get @ polyfills.js:20942
initGLContext @ polyfills.js:28372
WebGLRenderer @ polyfills.js:28416
setupRenderer @ polyfills.js:74984
value @ polyfills.js:74471
attachedCallback @ polyfills.js:73255
push../node_modules/@angular/platform-browser/fesm5/platform-browser.js.DefaultDomRenderer2.appendChild @ vendor.js:66975
push../node_modules/@angular/core/fesm5/core.js.DebugRenderer2.appendChild @ vendor.js:58315
execRenderNodeAction @ vendor.js:54794
visitRenderNode @ vendor.js:54777
visitProjectedRenderNodes @ vendor.js:54744
appendNgContent @ vendor.js:56686
createViewNodes @ vendor.js:57317
callViewAction @ vendor.js:57614
execComponentViewsAction @ vendor.js:57533
createViewNodes @ vendor.js:57326
callViewAction @ vendor.js:57614
execComponentViewsAction @ vendor.js:57533
createViewNodes @ vendor.js:57326
createRootView @ vendor.js:57212
callWithDebugContext @ vendor.js:58220
debugCreateRootView @ vendor.js:57730
push../node_modules/@angular/core/fesm5/core.js.ComponentFactory_.create @ vendor.js:55551
push../node_modules/@angular/core/fesm5/core.js.ComponentFactoryBoundToModule.create @ vendor.js:43978
push../node_modules/@angular/core/fesm5/core.js.ApplicationRef.bootstrap @ vendor.js:52131
(anonymous) @ vendor.js:51851
push../node_modules/@angular/core/fesm5/core.js.PlatformRef._moduleDoBootstrap @ vendor.js:51851
(anonymous) @ vendor.js:51819
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke @ polyfills.js:84057
onInvoke @ vendor.js:51342
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke @ polyfills.js:84056
push../node_modules/zone.js/dist/zone.js.Zone.run @ polyfills.js:83816
(anonymous) @ polyfills.js:84555
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask @ polyfills.js:84089
onInvokeTask @ vendor.js:51333
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask @ polyfills.js:84088
push../node_modules/zone.js/dist/zone.js.Zone.runTask @ polyfills.js:83861
drainMicroTaskQueue @ polyfills.js:84267
Promise.then (async)
scheduleMicroTask @ polyfills.js:84250
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.scheduleTask @ polyfills.js:84079
push../node_modules/zone.js/dist/zone.js.Zone.scheduleTask @ polyfills.js:83904
push../node_modules/zone.js/dist/zone.js.Zone.scheduleMicroTask @ polyfills.js:83924
scheduleResolveOrReject @ polyfills.js:84545
ZoneAwarePromise.then @ polyfills.js:84678
push../node_modules/@angular/core/fesm5/core.js.PlatformRef.bootstrapModule @ vendor.js:51846
./src/main.ts @ main.js:1062
__webpack_require__ @ runtime.js:84
0 @ main.js:1075
__webpack_require__ @ runtime.js:84
checkDeferredModules @ runtime.js:46
webpackJsonpCallback @ runtime.js:33
(anonymous) @ main.js:1
Show 8 more frames
polyfills.js:20942 THREE.WebGLRenderer: OES_texture_half_float_linear extension not supported.
get @ polyfills.js:20942
initGLContext @ polyfills.js:28373
WebGLRenderer @ polyfills.js:28416
setupRenderer @ polyfills.js:74984
value @ polyfills.js:74471
attachedCallback @ polyfills.js:73255
push../node_modules/@angular/platform-browser/fesm5/platform-browser.js.DefaultDomRenderer2.appendChild @ vendor.js:66975
push../node_modules/@angular/core/fesm5/core.js.DebugRenderer2.appendChild @ vendor.js:58315
execRenderNodeAction @ vendor.js:54794
visitRenderNode @ vendor.js:54777
visitProjectedRenderNodes @ vendor.js:54744
appendNgContent @ vendor.js:56686
createViewNodes @ vendor.js:57317
callViewAction @ vendor.js:57614
execComponentViewsAction @ vendor.js:57533
createViewNodes @ vendor.js:57326
callViewAction @ vendor.js:57614
execComponentViewsAction @ vendor.js:57533
createViewNodes @ vendor.js:57326
createRootView @ vendor.js:57212
callWithDebugContext @ vendor.js:58220
debugCreateRootView @ vendor.js:57730
push../node_modules/@angular/core/fesm5/core.js.ComponentFactory_.create @ vendor.js:55551
push../node_modules/@angular/core/fesm5/core.js.ComponentFactoryBoundToModule.create @ vendor.js:43978
push../node_modules/@angular/core/fesm5/core.js.ApplicationRef.bootstrap @ vendor.js:52131
(anonymous) @ vendor.js:51851
push../node_modules/@angular/core/fesm5/core.js.PlatformRef._moduleDoBootstrap @ vendor.js:51851
(anonymous) @ vendor.js:51819
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke @ polyfills.js:84057
onInvoke @ vendor.js:51342
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke @ polyfills.js:84056
push../node_modules/zone.js/dist/zone.js.Zone.run @ polyfills.js:83816
(anonymous) @ polyfills.js:84555
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask @ polyfills.js:84089
onInvokeTask @ vendor.js:51333
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask @ polyfills.js:84088
push../node_modules/zone.js/dist/zone.js.Zone.runTask @ polyfills.js:83861
drainMicroTaskQueue @ polyfills.js:84267
Promise.then (async)
scheduleMicroTask @ polyfills.js:84250
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.scheduleTask @ polyfills.js:84079
push../node_modules/zone.js/dist/zone.js.Zone.scheduleTask @ polyfills.js:83904
push../node_modules/zone.js/dist/zone.js.Zone.scheduleMicroTask @ polyfills.js:83924
scheduleResolveOrReject @ polyfills.js:84545
ZoneAwarePromise.then @ polyfills.js:84678
push../node_modules/@angular/core/fesm5/core.js.PlatformRef.bootstrapModule @ vendor.js:51846
./src/main.ts @ main.js:1062
__webpack_require__ @ runtime.js:84
0 @ main.js:1075
__webpack_require__ @ runtime.js:84
checkDeferredModules @ runtime.js:46
webpackJsonpCallback @ runtime.js:33
(anonymous) @ main.js:1
Show 8 more frames
polyfills.js:20942 THREE.WebGLRenderer: OES_texture_float_linear extension not supported.
get @ polyfills.js:20942
initGLContext @ polyfills.js:28380
WebGLRenderer @ polyfills.js:28416
setupRenderer @ polyfills.js:74984
value @ polyfills.js:74471
attachedCallback @ polyfills.js:73255
push../node_modules/@angular/platform-browser/fesm5/platform-browser.js.DefaultDomRenderer2.appendChild @ vendor.js:66975
push../node_modules/@angular/core/fesm5/core.js.DebugRenderer2.appendChild @ vendor.js:58315
execRenderNodeAction @ vendor.js:54794
visitRenderNode @ vendor.js:54777
visitProjectedRenderNodes @ vendor.js:54744
appendNgContent @ vendor.js:56686
createViewNodes @ vendor.js:57317
callViewAction @ vendor.js:57614
execComponentViewsAction @ vendor.js:57533
createViewNodes @ vendor.js:57326
callViewAction @ vendor.js:57614
execComponentViewsAction @ vendor.js:57533
createViewNodes @ vendor.js:57326
createRootView @ vendor.js:57212
callWithDebugContext @ vendor.js:58220
debugCreateRootView @ vendor.js:57730
push../node_modules/@angular/core/fesm5/core.js.ComponentFactory_.create @ vendor.js:55551
push../node_modules/@angular/core/fesm5/core.js.ComponentFactoryBoundToModule.create @ vendor.js:43978
push../node_modules/@angular/core/fesm5/core.js.ApplicationRef.bootstrap @ vendor.js:52131
(anonymous) @ vendor.js:51851
push../node_modules/@angular/core/fesm5/core.js.PlatformRef._moduleDoBootstrap @ vendor.js:51851
(anonymous) @ vendor.js:51819
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke @ polyfills.js:84057
onInvoke @ vendor.js:51342
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke @ polyfills.js:84056
push../node_modules/zone.js/dist/zone.js.Zone.run @ polyfills.js:83816
(anonymous) @ polyfills.js:84555
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask @ polyfills.js:84089
onInvokeTask @ vendor.js:51333
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask @ polyfills.js:84088
push../node_modules/zone.js/dist/zone.js.Zone.runTask @ polyfills.js:83861
drainMicroTaskQueue @ polyfills.js:84267
Promise.then (async)
scheduleMicroTask @ polyfills.js:84250
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.scheduleTask @ polyfills.js:84079
push../node_modules/zone.js/dist/zone.js.Zone.scheduleTask @ polyfills.js:83904
push../node_modules/zone.js/dist/zone.js.Zone.scheduleMicroTask @ polyfills.js:83924
scheduleResolveOrReject @ polyfills.js:84545
ZoneAwarePromise.then @ polyfills.js:84678
push../node_modules/@angular/core/fesm5/core.js.PlatformRef.bootstrapModule @ vendor.js:51846
./src/main.ts @ main.js:1062
__webpack_require__ @ runtime.js:84
0 @ main.js:1075
__webpack_require__ @ runtime.js:84
checkDeferredModules @ runtime.js:46
webpackJsonpCallback @ runtime.js:33
(anonymous) @ main.js:1
Show 8 more frames
vendor.js:50872 Angular is running in the development mode. Call enableProdMode() to enable the production mode.
vendor.js:74316 Ionic Native: deviceready event fired after 814 ms
polyfills.js:20942 THREE.WebGLRenderer: EXT_texture_filter_anisotropic extension not supported.
我的离子信息是:
Ionic:
ionic (Ionic CLI) : 4.12.0 (C:\Users\moham\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : @ionic/angular 4.3.1
@angular-devkit/build-angular : 0.13.9
@angular-devkit/schematics : 7.3.8
@angular/cli : 7.3.8
@ionic/angular-toolkit : 1.5.1
Cordova:
cordova (Cordova CLI) : 9.0.0 (cordova-lib@9.0.1)
Cordova Platforms : android 8.0.0
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 4.0.1, (and 4 other plugins)
System:
NodeJS : v10.15.3 (C:\Program Files\nodejs\node.exe)
npm : 6.4.1
OS : Windows 10
我真的需要帮助
答案 0 :(得分:0)
polyfill使用设备数据库来确定分辨率。如果您的设备不在该数据库中,则会收到错误消息。尝试将您的模拟器更改为其他东西,看看是否可行