|
@@ -177,9 +177,9 @@ AFRAME.registerSystem('ar', Object.assign(ARBaseSystem(), {
|
177
|
177
|
const scene = this.el;
|
178
|
178
|
|
179
|
179
|
// validate
|
180
|
|
- if(!scene.getAttribute('ar-session')) {
|
181
|
|
- scene.setAttribute('ar-session', {}); // use a default ar-session
|
182
|
|
- //throw new Error('Missing ar-session in a-scene'); // other errors will appear
|
|
180
|
+ if(!scene.getAttribute('encantar')) {
|
|
181
|
+ scene.setAttribute('encantar', {}); // use a default encantar
|
|
182
|
+ //throw new Error('Missing encantar in a-scene'); // other errors will appear
|
183
|
183
|
}
|
184
|
184
|
|
185
|
185
|
// initial setup
|
|
@@ -400,10 +400,10 @@ AFRAME.registerSystem('ar', Object.assign(ARBaseSystem(), {
|
400
|
400
|
_loadPreferences()
|
401
|
401
|
{
|
402
|
402
|
const scene = this.el;
|
403
|
|
- const sessionComponent = scene.components['ar-session'];
|
|
403
|
+ const sessionComponent = scene.components['encantar'];
|
404
|
404
|
|
405
|
405
|
if(sessionComponent === undefined)
|
406
|
|
- throw new Error('Missing ar-session in a-scene');
|
|
406
|
+ throw new Error('Missing encantar in a-scene');
|
407
|
407
|
|
408
|
408
|
return sessionComponent.preferences();
|
409
|
409
|
},
|
|
@@ -461,9 +461,10 @@ const ARComponent = obj => Object.assign({}, obj, {
|
461
|
461
|
});
|
462
|
462
|
|
463
|
463
|
/**
|
464
|
|
- * AR Session
|
|
464
|
+ * The encantar component enchants an a-scene with AR
|
|
465
|
+ * Parameters of the AR scene are set in this component
|
465
|
466
|
*/
|
466
|
|
-AFRAME.registerComponent('ar-session', ARComponent({
|
|
467
|
+AFRAME.registerComponent('encantar', ARComponent({
|
467
|
468
|
|
468
|
469
|
schema: {
|
469
|
470
|
|