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.
- package/dist/browser/index.js +7 -5
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/index.mjs +7 -5
- package/dist/browser/index.mjs.map +1 -1
- package/dist/bundle.js +7 -5
- package/dist/bundle.js.map +1 -1
- package/dist/node/index.js +7 -5
- package/dist/node/index.js.map +1 -1
- package/dist/node/index.mjs +7 -5
- package/dist/node/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/browser/index.mjs
CHANGED
|
@@ -952,7 +952,11 @@ var _Materials = class _Materials {
|
|
|
952
952
|
|
|
953
953
|
if (SHADE) {
|
|
954
954
|
|
|
955
|
-
|
|
955
|
+
#ifdef USE_INSTANCING
|
|
956
|
+
vec3 N = vec3( modelMatrix * instanceMatrix * vec4(normal, 0.0) );
|
|
957
|
+
#else
|
|
958
|
+
vec3 N = vec3( modelMatrix * vec4(normal, 0.0) );
|
|
959
|
+
#endif
|
|
956
960
|
|
|
957
961
|
float yLight = (1.0+N.y) * 0.5;
|
|
958
962
|
light = yLight * (1.0-AMBIENT) + N.x*N.x * XFAC + N.z*N.z * ZFAC + AMBIENT;
|
|
@@ -4419,9 +4423,6 @@ var _BlockObject = class _BlockObject extends SceneObject {
|
|
|
4419
4423
|
}
|
|
4420
4424
|
}
|
|
4421
4425
|
obj.setRotation(rotation);
|
|
4422
|
-
setTimeout(() => {
|
|
4423
|
-
obj.setRotation(rotation);
|
|
4424
|
-
}, 150);
|
|
4425
4426
|
console.log(obj);
|
|
4426
4427
|
return obj;
|
|
4427
4428
|
}
|
|
@@ -4512,10 +4513,11 @@ var _BlockObject = class _BlockObject extends SceneObject {
|
|
|
4512
4513
|
}
|
|
4513
4514
|
}
|
|
4514
4515
|
setPosition(position) {
|
|
4515
|
-
|
|
4516
|
+
this.position.copy(position);
|
|
4516
4517
|
for (let model of this._models) {
|
|
4517
4518
|
model.setPosition(position);
|
|
4518
4519
|
}
|
|
4520
|
+
this.notifyDirty();
|
|
4519
4521
|
}
|
|
4520
4522
|
//TODO: should override rotation + scale methods
|
|
4521
4523
|
//TODO
|