minerender 2.1.0-alpha.14 → 2.1.0-alpha.16

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.
@@ -957,7 +957,11 @@ var Materials = class _Materials {
957
957
 
958
958
  if (SHADE) {
959
959
 
960
- vec3 N = vec3( modelMatrix * instanceMatrix * vec4(normal, 0.0) );
960
+ #ifdef USE_INSTANCING
961
+ vec3 N = vec3( modelMatrix * instanceMatrix * vec4(normal, 0.0) );
962
+ #else
963
+ vec3 N = vec3( modelMatrix * vec4(normal, 0.0) );
964
+ #endif
961
965
 
962
966
  float yLight = (1.0+N.y) * 0.5;
963
967
  light = yLight * (1.0-AMBIENT) + N.x*N.x * XFAC + N.z*N.z * ZFAC + AMBIENT;
@@ -4466,9 +4470,6 @@ var BlockObject = class _BlockObject extends SceneObject {
4466
4470
  }
4467
4471
  }
4468
4472
  obj.setRotation(rotation);
4469
- setTimeout(() => {
4470
- obj.setRotation(rotation);
4471
- }, 150);
4472
4473
  console.log(obj);
4473
4474
  return obj;
4474
4475
  }
@@ -4559,10 +4560,11 @@ var BlockObject = class _BlockObject extends SceneObject {
4559
4560
  }
4560
4561
  }
4561
4562
  setPosition(position) {
4562
- super.setPosition(position);
4563
+ this.position.copy(position);
4563
4564
  for (let model of this._models) {
4564
4565
  model.setPosition(position);
4565
4566
  }
4567
+ this.notifyDirty();
4566
4568
  }
4567
4569
  //TODO: should override rotation + scale methods
4568
4570
  //TODO