|
@@ -65,13 +65,18 @@
|
|
|
sphere.position.z = - squareSize / 4 + j / 2;
|
|
|
sphere.position.x = - squareSize / 4 + i / 2;
|
|
|
sphere.position.y = - squareSize / 4 + k / 2;
|
|
|
- sphere.material = new BABYLON.StandardMaterial("test");
|
|
|
- sphere.material.diffuseTexture = new BABYLON.Texture("test.jpeg", scene);
|
|
|
- sphere.material.bumpTexture = new BABYLON.Texture("test.jpeg", scene);
|
|
|
- sphere.material.diffuseColor = new BABYLON.Color3(Math.random(), Math.random(), Math.random());
|
|
|
- sphere.material.specularColor = new BABYLON.Color3(Math.random() < 0.8 ? 0 : 1, Math.random() < 0.8 ? 0 : 1, Math.random() < 0.8 ? 0 : 1);
|
|
|
- sphere.material.emissiveColor = new BABYLON.Color3(0, 0, 0);
|
|
|
- sphere.material.freeze();
|
|
|
+ if (j === 0) {
|
|
|
+ sphere.material = new BABYLON.StandardMaterial("test");
|
|
|
+ sphere.material.diffuseTexture = new BABYLON.Texture("test.jpeg", scene);
|
|
|
+ sphere.material.bumpTexture = new BABYLON.Texture("test.jpeg", scene);
|
|
|
+ sphere.material.diffuseColor = new BABYLON.Color3(Math.random(), Math.random(), Math.random());
|
|
|
+ sphere.material.specularColor = new BABYLON.Color3(Math.random() < 0.8 ? 0 : 1, Math.random() < 0.8 ? 0 : 1, Math.random() < 0.8 ? 0 : 1);
|
|
|
+ sphere.material.emissiveColor = new BABYLON.Color3(0, 0, 0);
|
|
|
+ sphere.material.freeze();
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ sphere.material = spheres[0].material;
|
|
|
+ }
|
|
|
sphere.freezeWorldMatrix();
|
|
|
spheres.push(sphere);
|
|
|
}
|