|
@@ -118,21 +118,23 @@ export class FooGame {
|
118
|
118
|
if(mesh.material instanceof MeshStandardMaterial){
|
119
|
119
|
let mat:MeshStandardMaterial = mesh.material;
|
120
|
120
|
mat .side = THREE.BackSide;
|
|
121
|
+
|
121
|
122
|
}
|
122
|
123
|
}
|
|
124
|
+
|
123
|
125
|
/**
|
124
|
126
|
* 加载二位图片作为场景背景
|
125
|
127
|
*/
|
126
|
128
|
this.textureLoader.load("./textures/skybox2.jpg", (tex) => {
|
127
|
|
- //this.scene.background = tex; //直接设置二维背景
|
|
129
|
+ // this.scene.background = tex; //直接设置二维背景
|
128
|
130
|
|
129
|
131
|
//设置天空盒子背景
|
130
|
|
- let skybox = this.createSphere();
|
131
|
|
- if (skybox.material instanceof MeshStandardMaterial) {
|
132
|
|
- let mat: MeshStandardMaterial = skybox.material;
|
133
|
|
- mat.emissive = new THREE.Color(0x00ffff);
|
134
|
|
- mat.emissiveMap = tex;
|
135
|
|
- }
|
|
132
|
+ // let skybox = this.createSphere();
|
|
133
|
+ // if (skybox.material instanceof MeshStandardMaterial) {
|
|
134
|
+ // let mat: MeshStandardMaterial = skybox.material;
|
|
135
|
+ // mat.emissive = new THREE.Color(0x00ffff);
|
|
136
|
+ // mat.emissiveMap = tex;
|
|
137
|
+ // }
|
136
|
138
|
|
137
|
139
|
//this.scene.add(skybox);
|
138
|
140
|
});
|