@woosh/meep-engine 2.39.43 → 2.39.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -234,6 +234,13 @@ export class BlenderCameraOrientationGizmo extends CanvasView {
|
|
|
234
234
|
* @type {Signal<string,Vector3>}
|
|
235
235
|
*/
|
|
236
236
|
this.on.axisSelected = new Signal();
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
*
|
|
240
|
+
* @type {boolean}
|
|
241
|
+
* @private
|
|
242
|
+
*/
|
|
243
|
+
this.__needs_update = true;
|
|
237
244
|
}
|
|
238
245
|
|
|
239
246
|
link() {
|
|
@@ -262,6 +269,7 @@ export class BlenderCameraOrientationGizmo extends CanvasView {
|
|
|
262
269
|
*/
|
|
263
270
|
onMouseMove(evt) {
|
|
264
271
|
this._setPointerPositionFromEvent(evt);
|
|
272
|
+
this.__try_update();
|
|
265
273
|
}
|
|
266
274
|
|
|
267
275
|
/**
|
|
@@ -278,6 +286,11 @@ export class BlenderCameraOrientationGizmo extends CanvasView {
|
|
|
278
286
|
|
|
279
287
|
this.input_pointer_position = new Vector3(v2.x, v2.y, 0);
|
|
280
288
|
|
|
289
|
+
|
|
290
|
+
if (position_changed) {
|
|
291
|
+
this.__needs_update = true;
|
|
292
|
+
}
|
|
293
|
+
|
|
281
294
|
return position_changed;
|
|
282
295
|
}
|
|
283
296
|
|
|
@@ -287,6 +300,8 @@ export class BlenderCameraOrientationGizmo extends CanvasView {
|
|
|
287
300
|
*/
|
|
288
301
|
onMouseOut(evt) {
|
|
289
302
|
this.input_pointer_position = null;
|
|
303
|
+
this.__needs_update = true;
|
|
304
|
+
this.__try_update();
|
|
290
305
|
}
|
|
291
306
|
|
|
292
307
|
/**
|
|
@@ -295,10 +310,9 @@ export class BlenderCameraOrientationGizmo extends CanvasView {
|
|
|
295
310
|
*/
|
|
296
311
|
onMouseClick(evt) {
|
|
297
312
|
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
}
|
|
313
|
+
this._setPointerPositionFromEvent(evt);
|
|
314
|
+
|
|
315
|
+
this.__try_update();
|
|
302
316
|
|
|
303
317
|
if (this.selectedAxis !== null) {
|
|
304
318
|
this.on.axisSelected.send2(
|
|
@@ -337,7 +351,17 @@ export class BlenderCameraOrientationGizmo extends CanvasView {
|
|
|
337
351
|
ctx.closePath();
|
|
338
352
|
}
|
|
339
353
|
|
|
354
|
+
__try_update() {
|
|
355
|
+
if (!this.__needs_update) {
|
|
356
|
+
return;
|
|
357
|
+
}
|
|
358
|
+
this.update();
|
|
359
|
+
}
|
|
360
|
+
|
|
340
361
|
update() {
|
|
362
|
+
// reset flag
|
|
363
|
+
this.__needs_update = false;
|
|
364
|
+
|
|
341
365
|
this.clear();
|
|
342
366
|
|
|
343
367
|
// Calculate the rotation matrix from the camera
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"productName": "Meep",
|
|
6
6
|
"description": "production-ready JavaScript game engine based on Entity Component System Architecture",
|
|
7
7
|
"author": "Alexander Goldring",
|
|
8
|
-
"version": "2.39.
|
|
8
|
+
"version": "2.39.44",
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"gl-matrix": "3.4.3",
|
|
11
11
|
"fast-levenshtein": "2.0.6",
|