提交 ba8cc681 编写于 作者: M Mugen87

CubemapGenerator: Ensure options is never undefined

上级 7d75fe61
......@@ -86,6 +86,8 @@ THREE.CubemapGenerator.prototype.fromEquirectangular = function ( texture, optio
scene.add( mesh );
options = options || {};
var resolution = options.resolution || 512;
var params = {
......@@ -120,6 +122,8 @@ THREE.EquirectangularToCubeGenerator = ( function () {
var EquirectangularToCubeGenerator = function ( sourceTexture, options ) {
options = options || {};
this.sourceTexture = sourceTexture;
this.resolution = options.resolution || 512;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册