<h5 dir="auto">Description of the problem</h5>
<p dir="auto">Currently, ObjectLoader doesn't load the specified background texture or environment of a scene's JSON object.</p>
<p dir="auto">I've outlined a solution below that would import a CubeTexture or Texture for the scene background, and a CubeTexture for environment (since that's the only type of texture environment supports). This involved passing textures into <code class="notranslate">parseObject()</code> and then added them to the scene object.</p>
<p dir="auto">I could make a PR if looks good, but I'm also not sure if this conflicts with some of the plans outlined in existing issue <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="488790819" data-permission-text="Title is private" data-url="https://github.com/mrdoob/three.js/issues/17420" data-hovercard-type="issue" data-hovercard-url="/mrdoob/three.js/issues/17420/hovercard" href="https://github.com/mrdoob/three.js/issues/17420">#17420</a>. Either way this seems like a desirable feature of ObjectLoader.</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="parseObject: function ( data, geometries, materials, textures ) {

	var object;

	...

	function getTexture( name ) {

		if ( textures[ name ] === undefined ) {

			console.warn( 'THREE.ObjectLoader: Undefined texture', name );

		}

		return textures[ name ];

	}

	switch ( data.type ) {

		case 'Scene':

			object = new Scene();

			if ( data.background !== undefined ) {

				if ( Number.isInteger( data.background ) ) {

					object.background = new Color( data.background );

				} else {

					object.background = getTexture( data.background );

				}

			}

			if ( data.environment !== undefined ) {

				var texture = getTexture ( data.environment );

				if ( texture instanceof CubeTexture ) {

					object.environment  = texture;

				}

			}

			if ( data.fog !== undefined ) {

				if ( data.fog.type === 'Fog' ) {

					object.fog = new Fog( data.fog.color, data.fog.near, data.fog.far );

				} else if ( data.fog.type === 'FogExp2' ) {

					object.fog = new FogExp2( data.fog.color, data.fog.density );

				}

			}

			break;
	..."><pre class="notranslate"><span class="pl-s1">parseObject</span>: <span class="pl-k">function</span> <span class="pl-kos">(</span> <span class="pl-s1">data</span><span class="pl-kos">,</span> <span class="pl-s1">geometries</span><span class="pl-kos">,</span> <span class="pl-s1">materials</span><span class="pl-kos">,</span> <span class="pl-s1">textures</span> <span class="pl-kos">)</span> <span class="pl-kos">{</span>

	<span class="pl-k">var</span> <span class="pl-s1">object</span><span class="pl-kos">;</span>

	...

	<span class="pl-k">function</span> <span class="pl-en">getTexture</span><span class="pl-kos">(</span> <span class="pl-s1">name</span> <span class="pl-kos">)</span> <span class="pl-kos">{</span>

		<span class="pl-k">if</span> <span class="pl-kos">(</span> <span class="pl-s1">textures</span><span class="pl-kos">[</span> <span class="pl-s1">name</span> <span class="pl-kos">]</span> <span class="pl-c1">===</span> <span class="pl-c1">undefined</span> <span class="pl-kos">)</span> <span class="pl-kos">{</span>

			<span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">warn</span><span class="pl-kos">(</span> <span class="pl-s">'THREE.ObjectLoader: Undefined texture'</span><span class="pl-kos">,</span> <span class="pl-s1">name</span> <span class="pl-kos">)</span><span class="pl-kos">;</span>

		<span class="pl-kos">}</span>

		<span class="pl-k">return</span> <span class="pl-s1">textures</span><span class="pl-kos">[</span> <span class="pl-s1">name</span> <span class="pl-kos">]</span><span class="pl-kos">;</span>

	<span class="pl-kos">}</span>

	<span class="pl-k">switch</span> <span class="pl-kos">(</span> <span class="pl-s1">data</span><span class="pl-kos">.</span><span class="pl-c1">type</span> <span class="pl-kos">)</span> <span class="pl-kos">{</span>

		<span class="pl-k">case</span> <span class="pl-s">'Scene'</span>:

			<span class="pl-s1">object</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-v">Scene</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>

			<span class="pl-k">if</span> <span class="pl-kos">(</span> <span class="pl-s1">data</span><span class="pl-kos">.</span><span class="pl-c1">background</span> <span class="pl-c1">!==</span> <span class="pl-c1">undefined</span> <span class="pl-kos">)</span> <span class="pl-kos">{</span>

				<span class="pl-k">if</span> <span class="pl-kos">(</span> <span class="pl-v">Number</span><span class="pl-kos">.</span><span class="pl-en">isInteger</span><span class="pl-kos">(</span> <span class="pl-s1">data</span><span class="pl-kos">.</span><span class="pl-c1">background</span> <span class="pl-kos">)</span> <span class="pl-kos">)</span> <span class="pl-kos">{</span>

					<span class="pl-s1">object</span><span class="pl-kos">.</span><span class="pl-c1">background</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-v">Color</span><span class="pl-kos">(</span> <span class="pl-s1">data</span><span class="pl-kos">.</span><span class="pl-c1">background</span> <span class="pl-kos">)</span><span class="pl-kos">;</span>

				<span class="pl-kos">}</span> <span class="pl-k">else</span> <span class="pl-kos">{</span>

					<span class="pl-s1">object</span><span class="pl-kos">.</span><span class="pl-c1">background</span> <span class="pl-c1">=</span> <span class="pl-en">getTexture</span><span class="pl-kos">(</span> <span class="pl-s1">data</span><span class="pl-kos">.</span><span class="pl-c1">background</span> <span class="pl-kos">)</span><span class="pl-kos">;</span>

				<span class="pl-kos">}</span>

			<span class="pl-kos">}</span>

			<span class="pl-k">if</span> <span class="pl-kos">(</span> <span class="pl-s1">data</span><span class="pl-kos">.</span><span class="pl-c1">environment</span> <span class="pl-c1">!==</span> <span class="pl-c1">undefined</span> <span class="pl-kos">)</span> <span class="pl-kos">{</span>

				<span class="pl-k">var</span> <span class="pl-s1">texture</span> <span class="pl-c1">=</span> <span class="pl-en">getTexture</span> <span class="pl-kos">(</span> <span class="pl-s1">data</span><span class="pl-kos">.</span><span class="pl-c1">environment</span> <span class="pl-kos">)</span><span class="pl-kos">;</span>

				<span class="pl-k">if</span> <span class="pl-kos">(</span> <span class="pl-s1">texture</span> <span class="pl-k">instanceof</span> <span class="pl-v">CubeTexture</span> <span class="pl-kos">)</span> <span class="pl-kos">{</span>

					<span class="pl-s1">object</span><span class="pl-kos">.</span><span class="pl-c1">environment</span>  <span class="pl-c1">=</span> <span class="pl-s1">texture</span><span class="pl-kos">;</span>

				<span class="pl-kos">}</span>

			<span class="pl-kos">}</span>

			<span class="pl-k">if</span> <span class="pl-kos">(</span> <span class="pl-s1">data</span><span class="pl-kos">.</span><span class="pl-c1">fog</span> <span class="pl-c1">!==</span> <span class="pl-c1">undefined</span> <span class="pl-kos">)</span> <span class="pl-kos">{</span>

				<span class="pl-k">if</span> <span class="pl-kos">(</span> <span class="pl-s1">data</span><span class="pl-kos">.</span><span class="pl-c1">fog</span><span class="pl-kos">.</span><span class="pl-c1">type</span> <span class="pl-c1">===</span> <span class="pl-s">'Fog'</span> <span class="pl-kos">)</span> <span class="pl-kos">{</span>

					<span class="pl-s1">object</span><span class="pl-kos">.</span><span class="pl-c1">fog</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-v">Fog</span><span class="pl-kos">(</span> <span class="pl-s1">data</span><span class="pl-kos">.</span><span class="pl-c1">fog</span><span class="pl-kos">.</span><span class="pl-c1">color</span><span class="pl-kos">,</span> <span class="pl-s1">data</span><span class="pl-kos">.</span><span class="pl-c1">fog</span><span class="pl-kos">.</span><span class="pl-c1">near</span><span class="pl-kos">,</span> <span class="pl-s1">data</span><span class="pl-kos">.</span><span class="pl-c1">fog</span><span class="pl-kos">.</span><span class="pl-c1">far</span> <span class="pl-kos">)</span><span class="pl-kos">;</span>

				<span class="pl-kos">}</span> <span class="pl-k">else</span> <span class="pl-k">if</span> <span class="pl-kos">(</span> <span class="pl-s1">data</span><span class="pl-kos">.</span><span class="pl-c1">fog</span><span class="pl-kos">.</span><span class="pl-c1">type</span> <span class="pl-c1">===</span> <span class="pl-s">'FogExp2'</span> <span class="pl-kos">)</span> <span class="pl-kos">{</span>

					<span class="pl-s1">object</span><span class="pl-kos">.</span><span class="pl-c1">fog</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-v">FogExp2</span><span class="pl-kos">(</span> <span class="pl-s1">data</span><span class="pl-kos">.</span><span class="pl-c1">fog</span><span class="pl-kos">.</span><span class="pl-c1">color</span><span class="pl-kos">,</span> <span class="pl-s1">data</span><span class="pl-kos">.</span><span class="pl-c1">fog</span><span class="pl-kos">.</span><span class="pl-c1">density</span> <span class="pl-kos">)</span><span class="pl-kos">;</span>

				<span class="pl-kos">}</span>

			<span class="pl-kos">}</span>

			<span class="pl-k">break</span><span class="pl-kos">;</span>
	...</pre></div>
<h5 dir="auto">Three.js version</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Dev</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> r113</li>
</ul>
<h5 dir="auto">Browser</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> All of them</li>
</ul>
<h5 dir="auto">OS</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> All of them</li>
</ul>
<h5 dir="auto">Description of the problem</h5>
<p dir="auto">When loading a scene, the background of the editor is not set to the background of the scene. This causes an issue when exporting because the scene's background will be overwritten to the Editor's default gray.</p>
<h5 dir="auto">Three.js version</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Dev</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> r103</li>
</ul>
<h5 dir="auto">Browser</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> All of them</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Chrome</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Firefox</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Internet Explorer</li>
</ul>
<h5 dir="auto">OS</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> All of them</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Windows</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> macOS</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Linux</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Android</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> iOS</li>
</ul>