提交 b60ba868 编写于 作者: M Mr.doob 提交者: GitHub

Merge pull request #11730 from WestLangley/dev-loaders

Loaders: material.shading ==> material.flatShading
......@@ -479,7 +479,7 @@ THREE.ThreeMFLoader.prototype = {
geometry.computeBoundingSphere();
var materialOpts = {
shading: THREE.FlatShading
flatShading: true
};
if ( meshData[ 'colors' ] && 0 < meshData[ 'colors' ].length ) {
......
......@@ -167,7 +167,7 @@ THREE.AMFLoader.prototype = {
}
loadedMaterial = new THREE.MeshPhongMaterial( {
shading: THREE.FlatShading,
flatShading: true,
color: new THREE.Color( color.r, color.g, color.b ),
name: matName
} );
......@@ -412,7 +412,7 @@ THREE.AMFLoader.prototype = {
}
var sceneObject = new THREE.Group();
var defaultMaterial = new THREE.MeshPhongMaterial( { color: 0xaaaaff, shading: THREE.FlatShading } );
var defaultMaterial = new THREE.MeshPhongMaterial( { color: 0xaaaaff, flatShading: true } );
sceneObject.name = amfName;
sceneObject.userData.author = amfAuthor;
......
......@@ -158,9 +158,7 @@ THREE.AssimpJSONLoader.prototype = {
var scope = this;
var i, prop, has_textures = [],
init_props = {
shading : THREE.SmoothShading
};
init_props = {};
function toColor( value_arr ) {
......@@ -261,7 +259,7 @@ THREE.AssimpJSONLoader.prototype = {
// aiShadingMode_Flat
if ( prop.value === 1 ) {
init_props.shading = THREE.FlatShading;
init_props.flatShading = true;
}
......
......@@ -696,7 +696,7 @@ THREE.OBJLoader = ( function () {
}
material.shading = sourceMaterial.smooth ? THREE.SmoothShading : THREE.FlatShading;
material.flatShading = sourceMaterial.smooth ? false : true;
createdMaterials.push(material);
......
......@@ -846,7 +846,7 @@ THREE.OBJLoader2 = (function () {
* @param {string} objectName Name of the mesh
* @param {string} groupName Name of the group
* @param {string} materialName Name of the material
* @param {number} smoothingGroup Normalized smoothingGroup (0: THREE.FlatShading, 1: THREE.SmoothShading)
* @param {number} smoothingGroup Normalized smoothingGroup (0: flat shading, 1: smooth shading)
*/
var RawObjectDescription = (function () {
......@@ -1013,7 +1013,7 @@ THREE.OBJLoader2 = (function () {
materialClone = material.clone();
materialClone.name = materialName;
materialClone.shading = THREE.FlatShading;
materialClone.flatShading = true;
this.materials[ materialName ] = name;
}
......
......@@ -435,7 +435,7 @@ THREE.OBJLoader2.WWOBJLoader2 = (function () {
materialClone = material.clone();
materialClone.name = materialName;
materialClone.shading = THREE.FlatShading;
materialClone.flatShading = true;
this.materials[ materialName ] = name;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册