This commit is contained in:
@ -11,6 +11,7 @@ export const AppConfig = {
|
||||
env: {
|
||||
envPath: '/hdr/sanGiuseppeBridge.env',
|
||||
intensity: 1.5,
|
||||
rotationY: 0
|
||||
rotationY: 0,
|
||||
background: true,
|
||||
}
|
||||
};
|
||||
|
||||
@ -37,6 +37,24 @@ export class AppEnv extends Monobehiver {
|
||||
scene.environmentIntensity = intensity;
|
||||
scene.environmentTexture = reflectionTexture;
|
||||
this.object = reflectionTexture;
|
||||
scene.backgroundTexture = reflectionTexture;
|
||||
|
||||
const box = scene.createDefaultSkybox(
|
||||
reflectionTexture,
|
||||
true,
|
||||
512,
|
||||
0,
|
||||
true
|
||||
);
|
||||
console.log('box', AppConfig.env.background);
|
||||
if (AppConfig.env.background) {
|
||||
if (box) box.visibility = 1;
|
||||
} else {
|
||||
if (box) box.visibility = 0;
|
||||
}
|
||||
// 保存环境纹理的引用
|
||||
this.object = reflectionTexture;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user