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/node/index.js
CHANGED
|
@@ -1112,7 +1112,11 @@ var Materials = class _Materials {
|
|
|
1112
1112
|
|
|
1113
1113
|
if (SHADE) {
|
|
1114
1114
|
|
|
1115
|
-
|
|
1115
|
+
#ifdef USE_INSTANCING
|
|
1116
|
+
vec3 N = vec3( modelMatrix * instanceMatrix * vec4(normal, 0.0) );
|
|
1117
|
+
#else
|
|
1118
|
+
vec3 N = vec3( modelMatrix * vec4(normal, 0.0) );
|
|
1119
|
+
#endif
|
|
1116
1120
|
|
|
1117
1121
|
float yLight = (1.0+N.y) * 0.5;
|
|
1118
1122
|
light = yLight * (1.0-AMBIENT) + N.x*N.x * XFAC + N.z*N.z * ZFAC + AMBIENT;
|
|
@@ -4611,9 +4615,6 @@ var BlockObject = class _BlockObject extends SceneObject {
|
|
|
4611
4615
|
}
|
|
4612
4616
|
}
|
|
4613
4617
|
obj.setRotation(rotation);
|
|
4614
|
-
setTimeout(() => {
|
|
4615
|
-
obj.setRotation(rotation);
|
|
4616
|
-
}, 150);
|
|
4617
4618
|
console.log(obj);
|
|
4618
4619
|
return obj;
|
|
4619
4620
|
}
|
|
@@ -4704,10 +4705,11 @@ var BlockObject = class _BlockObject extends SceneObject {
|
|
|
4704
4705
|
}
|
|
4705
4706
|
}
|
|
4706
4707
|
setPosition(position) {
|
|
4707
|
-
|
|
4708
|
+
this.position.copy(position);
|
|
4708
4709
|
for (let model of this._models) {
|
|
4709
4710
|
model.setPosition(position);
|
|
4710
4711
|
}
|
|
4712
|
+
this.notifyDirty();
|
|
4711
4713
|
}
|
|
4712
4714
|
//TODO: should override rotation + scale methods
|
|
4713
4715
|
//TODO
|