Needle Engine

Changes between version 3.27.1-beta and 3.27.2-beta
Files changed (3) hide show
  1. src/engine/engine_addressables.ts +1 -1
  2. src/engine/engine_element.ts +2 -2
  3. src/engine-components/OrbitControls.ts +1 -1
src/engine/engine_addressables.ts CHANGED
@@ -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
src/engine/engine_element.ts CHANGED
@@ -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%;
src/engine-components/OrbitControls.ts CHANGED
@@ -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);