提交 fec2de80 编写于 作者: J James Kiefer

Merge branch 'dev' of github.com:mrdoob/three.js into unify_loaders

Conflicts:
	examples/js/loaders/ColladaLoader.js
	examples/js/loaders/UTF8Loader.js
......@@ -26,7 +26,7 @@
height -- The height of the biggest mipmap <br />
format -- The format used in the mipmaps <br />
type -- The type used in the mipmaps <br />
mapping -- How the image is applied to the object. An object type of THREE.UVMapping() is the default, where the U,V coordinates are used to apply the map, and a single texture is expected. The other types are THREE.CubeReflectionMapping, for cube maps used as a reflection map; THREE.CubeRefractionMapping, refraction mapping; and THREE.SphericalReflectionMapping, a spherical reflection map projection.<br />
mapping -- How the image is applied to the object. An object type of THREE.UVMapping is the default, where the U,V coordinates are used to apply the map, and a single texture is expected. The other types are THREE.CubeReflectionMapping, for cube maps used as a reflection map; THREE.CubeRefractionMapping, refraction mapping; and THREE.SphericalReflectionMapping, a spherical reflection map projection.<br />
wrapS -- The default is THREE.ClampToEdgeWrapping, where the edge is clamped to the outer edge texels. The other two choices are THREE.RepeatWrapping and THREE.MirroredRepeatWrapping.<br />
wrapT -- The default is THREE.ClampToEdgeWrapping, where the edge is clamped to the outer edge texels. The other two choices are THREE.RepeatWrapping and THREE.MirroredRepeatWrapping.<br />
magFilter -- How the texture is sampled when a texel covers more than one pixel. The default is THREE.LinearFilter, which takes the four closest texels and bilinearly interpolates among them. The other option is THREE.NearestFilter, which uses the value of the closest texels.<br />
......
......@@ -26,7 +26,7 @@
height -- The height of the image. <br />
format -- The default is THREE.RGBAFormat for the texture. Other formats are: THREE.AlphaFormat, THREE.RGBFormat, THREE.LuminanceFormat, and THREE.LuminanceAlphaFormat. There are also compressed texture formats, if the S3TC extension is supported: THREE.RGB_S3TC_DXT1_Format, THREE.RGBA_S3TC_DXT1_Format, THREE.RGBA_S3TC_DXT3_Format, and THREE.RGBA_S3TC_DXT5_Format.<br />
type -- The default is THREE.UnsignedByteType. Other valid types (as WebGL allows) are THREE.ByteType, THREE.ShortType, THREE.UnsignedShortType, THREE.IntType, THREE.UnsignedIntType, THREE.FloatType, THREE.UnsignedShort4444Type, THREE.UnsignedShort5551Type, and THREE.UnsignedShort565Type.<br />
mapping -- How the image is applied to the object. An object type of THREE.UVMapping() is the default, where the U,V coordinates are used to apply the map, and a single texture is expected. The other types are THREE.CubeReflectionMapping, for cube maps used as a reflection map; THREE.CubeRefractionMapping, refraction mapping; and THREE.SphericalReflectionMapping, a spherical reflection map projection.<br />
mapping -- How the image is applied to the object. An object type of THREE.UVMapping is the default, where the U,V coordinates are used to apply the map, and a single texture is expected. The other types are THREE.CubeReflectionMapping, for cube maps used as a reflection map; THREE.CubeRefractionMapping, refraction mapping; and THREE.SphericalReflectionMapping, a spherical reflection map projection.<br />
wrapS -- The default is THREE.ClampToEdgeWrapping, where the edge is clamped to the outer edge texels. The other two choices are THREE.RepeatWrapping and THREE.MirroredRepeatWrapping.<br />
wrapT -- The default is THREE.ClampToEdgeWrapping, where the edge is clamped to the outer edge texels. The other two choices are THREE.RepeatWrapping and THREE.MirroredRepeatWrapping.<br />
magFilter -- How the texture is sampled when a texel covers more than one pixel. The default is THREE.LinearFilter, which takes the four closest texels and bilinearly interpolates among them. The other option is THREE.NearestFilter, which uses the value of the closest texel.<br />
......
......@@ -40,7 +40,7 @@
<h3>[property:object mapping]</h3>
<div>
How the image is applied to the object. An object type of THREE.UVMapping() is the default, where the U,V coordinates are used to apply the map, and a single texture is expected. The other types are THREE.CubeReflectionMapping, for cube maps used as a reflection map; THREE.CubeRefractionMapping, refraction mapping; and THREE.SphericalReflectionMapping, a spherical reflection map projection.
How the image is applied to the object. An object type of THREE.UVMapping is the default, where the U,V coordinates are used to apply the map, and a single texture is expected. The other types are THREE.CubeReflectionMapping, for cube maps used as a reflection map; THREE.CubeRefractionMapping, refraction mapping; and THREE.SphericalReflectionMapping, a spherical reflection map projection.
</div>
<h3>[property:number wrapS]</h3>
......
......@@ -1147,7 +1147,7 @@
this.id = "";
this.name = "";
this.nodes = [];
this.scene = new THREE.Scene();
this.scene = new THREE.Group();
};
......
......@@ -187,25 +187,6 @@ THREE.SceneLoader.prototype = {
if ( objJSON.loading === undefined ) {
var reservedTypes = {
"type": 1, "url": 1, "material": 1,
"position": 1, "rotation": 1, "scale" : 1,
"visible": 1, "children": 1, "userData": 1,
"skin": 1, "morph": 1, "mirroredLoop": 1, "duration": 1
};
var loaderParameters = {};
for ( var parType in objJSON ) {
if ( ! ( parType in reservedTypes ) ) {
loaderParameters[ parType ] = objJSON[ parType ];
}
}
material = result.materials[ objJSON.material ];
objJSON.loading = true;
......@@ -223,7 +204,7 @@ THREE.SceneLoader.prototype = {
} else {
loader.load( get_url( objJSON.url, data.urlBaseType ), create_callback_hierachy( objID, parent, material, objJSON ), loaderParameters );
loader.load( get_url( objJSON.url, data.urlBaseType ), create_callback_hierachy( objID, parent, material, objJSON ) );
}
......@@ -872,20 +853,8 @@ THREE.SceneLoader.prototype = {
} else if ( geoJSON.type in this.geometryHandlers ) {
var loaderParameters = {};
for ( var parType in geoJSON ) {
if ( parType !== "type" && parType !== "url" ) {
loaderParameters[ parType ] = geoJSON[ parType ];
}
}
var loader = this.geometryHandlers[ geoJSON.type ][ "loaderObject" ];
loader.load( get_url( geoJSON.url, data.urlBaseType ), create_callback_geometry( geoID ), loaderParameters );
loader.load( get_url( geoJSON.url, data.urlBaseType ), create_callback_geometry( geoID ) );
} else if ( geoJSON.type === "embedded" ) {
......
......@@ -19,7 +19,7 @@ THREE.UTF8Loader = function () {};
THREE.UTF8Loader.prototype.load = function ( jsonUrl, callback, options ) {
this.downloadModelJson( jsonUrl, options, callback );
this.downloadModelJson( jsonUrl, callback, options );
};
......@@ -690,7 +690,7 @@ THREE.UTF8Loader.prototype.downloadModel = function ( geometryBase, materialBase
};
THREE.UTF8Loader.prototype.downloadModelJson = function ( jsonUrl, options, callback ) {
THREE.UTF8Loader.prototype.downloadModelJson = function ( jsonUrl, callback, options ) {
getJsonRequest( jsonUrl, function( loaded ) {
......
......@@ -104,6 +104,11 @@ THREE.WebGLProgram = ( function () {
envMapTypeDefine = "ENVMAP_TYPE_SPHERE";
break;
case THREE.UVMapping:
console.warn( 'THREE.WebGLProgram: envMap.mapping shouldn\'t be THREE.UVMapping. Using THREE.CubeReflectionMapping instead.')
envMapTypeDefine = "ENVMAP_TYPE_CUBE";
break;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册