@@ -186,7 +186,7 @@
|
|
186
186
|
this._progressListeners.push(prog);
|
187
187
|
if (this._loading !== undefined) {
|
188
188
|
// console.warn("Wait for other loading thiny");
|
189
|
-
return this._loading;
|
189
|
+
return this._loading.then(_ => this.asset);
|
190
190
|
}
|
191
191
|
const context = Context.Current;
|
192
192
|
// TODO: technically we shouldnt call awake only when the object is added to a scene
|
@@ -94,7 +94,7 @@
|
|
94
94
|
this._overlay_ar = new AROverlayHandler();
|
95
95
|
// TODO: do we want to rename this event?
|
96
96
|
this.addEventListener("ready", this.onReady);
|
97
|
-
|
97
|
+
|
98
98
|
this.attachShadow({ mode: 'open' });
|
99
99
|
const template = document.createElement('template');
|
100
100
|
template.innerHTML = `<style>
|
@@ -105,8 +105,8 @@
|
|
105
105
|
display: block;
|
106
106
|
width: max(600px, 100%);
|
107
107
|
height: max(300px, 100%);
|
108
|
-
font-family: 'Roboto', sans-serif;
|
109
108
|
}
|
109
|
+
|
110
110
|
@media (max-width: 600px) {
|
111
111
|
:host {
|
112
112
|
width: 100%;
|
@@ -204,7 +204,7 @@
|
|
204
204
|
this._cameraObject = cam;
|
205
205
|
// Using the parent if possible to make it possible to disable input on the canvas
|
206
206
|
// for having HTML content behind it and still receive input
|
207
|
-
const element = this.targetElement ?? this.context.domElement;
|
207
|
+
const element = this.targetElement ?? this.context.renderer.domElement;
|
208
208
|
// HACK: workaround for three orbit controls forcing an update when being created....
|
209
209
|
const mat = cam?.quaternion.clone();
|
210
210
|
this._controls = new ThreeOrbitControls(cam!, element);
|