未验证 提交 9afaec09 编写于 作者: M Mr.doob 提交者: GitHub

Editor: Store equirectangular environment (#22187)

上级 9c964a00
......@@ -158,6 +158,7 @@
signals.objectRemoved.add( saveState );
signals.materialChanged.add( saveState );
signals.sceneBackgroundChanged.add( saveState );
signals.sceneEnvironmentChanged.add( saveState );
signals.sceneFogChanged.add( saveState );
signals.sceneGraphChanged.add( saveState );
signals.scriptChanged.add( saveState );
......
......@@ -132,6 +132,7 @@ Editor.prototype = {
this.scene.name = scene.name;
this.scene.background = scene.background;
this.scene.environment = scene.environment;
this.scene.fog = scene.fog;
this.scene.userData = JSON.parse( JSON.stringify( scene.userData ) );
......
......@@ -402,7 +402,12 @@ function SidebarScene( editor ) {
if ( scene.environment ) {
// TODO
if ( scene.environment.mapping === THREE.EquirectangularReflectionMapping ) {
environmentType.setValue( 'Equirectangular' );
environmentEquirectangularTexture.setValue( scene.environment );
}
} else {
......@@ -434,6 +439,7 @@ function SidebarScene( editor ) {
}
refreshBackgroundUI();
refreshEnvironmentUI();
refreshFogUI();
}
......
......@@ -56,7 +56,7 @@ class UITexture extends UISpan {
// assuming RGBE/Radiance HDR iamge format
const loader = new RGBELoader().setDataType( THREE.UnsignedByteType );
const loader = new RGBELoader().setDataType( THREE.FloatType );
loader.load( event.target.result, function ( hdrTexture ) {
hdrTexture.sourceFile = file.name;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册