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.js
CHANGED
|
@@ -1108,7 +1108,11 @@ var _Materials = class _Materials {
|
|
|
1108
1108
|
|
|
1109
1109
|
if (SHADE) {
|
|
1110
1110
|
|
|
1111
|
-
|
|
1111
|
+
#ifdef USE_INSTANCING
|
|
1112
|
+
vec3 N = vec3( modelMatrix * instanceMatrix * vec4(normal, 0.0) );
|
|
1113
|
+
#else
|
|
1114
|
+
vec3 N = vec3( modelMatrix * vec4(normal, 0.0) );
|
|
1115
|
+
#endif
|
|
1112
1116
|
|
|
1113
1117
|
float yLight = (1.0+N.y) * 0.5;
|
|
1114
1118
|
light = yLight * (1.0-AMBIENT) + N.x*N.x * XFAC + N.z*N.z * ZFAC + AMBIENT;
|
|
@@ -4565,9 +4569,6 @@ var _BlockObject = class _BlockObject extends SceneObject {
|
|
|
4565
4569
|
}
|
|
4566
4570
|
}
|
|
4567
4571
|
obj.setRotation(rotation);
|
|
4568
|
-
setTimeout(() => {
|
|
4569
|
-
obj.setRotation(rotation);
|
|
4570
|
-
}, 150);
|
|
4571
4572
|
console.log(obj);
|
|
4572
4573
|
return obj;
|
|
4573
4574
|
}
|
|
@@ -4658,10 +4659,11 @@ var _BlockObject = class _BlockObject extends SceneObject {
|
|
|
4658
4659
|
}
|
|
4659
4660
|
}
|
|
4660
4661
|
setPosition(position) {
|
|
4661
|
-
|
|
4662
|
+
this.position.copy(position);
|
|
4662
4663
|
for (let model of this._models) {
|
|
4663
4664
|
model.setPosition(position);
|
|
4664
4665
|
}
|
|
4666
|
+
this.notifyDirty();
|
|
4665
4667
|
}
|
|
4666
4668
|
//TODO: should override rotation + scale methods
|
|
4667
4669
|
//TODO
|