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

Revert "Removed material.skinning references. See #10754."

This reverts commit 0b3497f9.
上级 5617c05b
......@@ -81,6 +81,7 @@ Object.assign( MaterialLoader.prototype, {
if ( json.wireframeLinewidth !== undefined ) material.wireframeLinewidth = json.wireframeLinewidth;
if ( json.wireframeLinecap !== undefined ) material.wireframeLinecap = json.wireframeLinecap;
if ( json.wireframeLinejoin !== undefined ) material.wireframeLinejoin = json.wireframeLinejoin;
if ( json.skinning !== undefined ) material.skinning = json.skinning;
if ( json.morphTargets !== undefined ) material.morphTargets = json.morphTargets;
// for PointsMaterial
......
......@@ -232,6 +232,7 @@ Object.assign( Material.prototype, EventDispatcher.prototype, {
if ( this.wireframeLinecap !== 'round' ) data.wireframeLinecap = this.wireframeLinecap;
if ( this.wireframeLinejoin !== 'round' ) data.wireframeLinejoin = this.wireframeLinejoin;
data.skinning = this.skinning;
data.morphTargets = this.morphTargets;
// TODO: Copied from Object3D.toJSON
......
......@@ -33,6 +33,7 @@ import { Color } from '../math/Color';
* wireframe: <boolean>,
* wireframeLinewidth: <float>,
*
* skinning: <bool>,
* morphTargets: <bool>
* }
*/
......@@ -67,6 +68,7 @@ function MeshBasicMaterial( parameters ) {
this.wireframeLinecap = 'round';
this.wireframeLinejoin = 'round';
this.skinning = false;
this.morphTargets = false;
this.lights = false;
......@@ -108,6 +110,7 @@ MeshBasicMaterial.prototype.copy = function ( source ) {
this.wireframeLinecap = source.wireframeLinecap;
this.wireframeLinejoin = source.wireframeLinejoin;
this.skinning = source.skinning;
this.morphTargets = source.morphTargets;
return this;
......
......@@ -32,6 +32,7 @@ function MeshDepthMaterial( parameters ) {
this.depthPacking = BasicDepthPacking;
this.skinning = false;
this.morphTargets = false;
this.map = null;
......@@ -63,6 +64,7 @@ MeshDepthMaterial.prototype.copy = function ( source ) {
this.depthPacking = source.depthPacking;
this.skinning = source.skinning;
this.morphTargets = source.morphTargets;
this.map = source.map;
......
......@@ -34,6 +34,7 @@ import { Color } from '../math/Color';
* wireframe: <boolean>,
* wireframeLinewidth: <float>,
*
* skinning: <bool>,
* morphTargets: <bool>,
* morphNormals: <bool>
* }
......@@ -73,6 +74,7 @@ function MeshLambertMaterial( parameters ) {
this.wireframeLinecap = 'round';
this.wireframeLinejoin = 'round';
this.skinning = false;
this.morphTargets = false;
this.morphNormals = false;
......@@ -117,6 +119,7 @@ MeshLambertMaterial.prototype.copy = function ( source ) {
this.wireframeLinecap = source.wireframeLinecap;
this.wireframeLinejoin = source.wireframeLinejoin;
this.skinning = source.skinning;
this.morphTargets = source.morphTargets;
this.morphNormals = source.morphNormals;
......
......@@ -21,6 +21,7 @@ import { Vector2 } from '../math/Vector2';
* wireframe: <boolean>,
* wireframeLinewidth: <float>
*
* skinning: <bool>,
* morphTargets: <bool>,
* morphNormals: <bool>
* }
......@@ -48,6 +49,7 @@ function MeshNormalMaterial( parameters ) {
this.fog = false;
this.lights = false;
this.skinning = false;
this.morphTargets = false;
this.morphNormals = false;
......@@ -77,6 +79,7 @@ MeshNormalMaterial.prototype.copy = function ( source ) {
this.wireframe = source.wireframe;
this.wireframeLinewidth = source.wireframeLinewidth;
this.skinning = source.skinning;
this.morphTargets = source.morphTargets;
this.morphNormals = source.morphNormals;
......
......@@ -47,6 +47,7 @@ import { Color } from '../math/Color';
* wireframe: <boolean>,
* wireframeLinewidth: <float>,
*
* skinning: <bool>,
* morphTargets: <bool>,
* morphNormals: <bool>
* }
......@@ -98,6 +99,7 @@ function MeshPhongMaterial( parameters ) {
this.wireframeLinecap = 'round';
this.wireframeLinejoin = 'round';
this.skinning = false;
this.morphTargets = false;
this.morphNormals = false;
......@@ -154,6 +156,7 @@ MeshPhongMaterial.prototype.copy = function ( source ) {
this.wireframeLinecap = source.wireframeLinecap;
this.wireframeLinejoin = source.wireframeLinejoin;
this.skinning = source.skinning;
this.morphTargets = source.morphTargets;
this.morphNormals = source.morphNormals;
......
......@@ -47,6 +47,7 @@ import { Color } from '../math/Color';
* wireframe: <boolean>,
* wireframeLinewidth: <float>,
*
* skinning: <bool>,
* morphTargets: <bool>,
* morphNormals: <bool>
* }
......@@ -102,6 +103,7 @@ function MeshStandardMaterial( parameters ) {
this.wireframeLinecap = 'round';
this.wireframeLinejoin = 'round';
this.skinning = false;
this.morphTargets = false;
this.morphNormals = false;
......@@ -162,6 +164,7 @@ MeshStandardMaterial.prototype.copy = function ( source ) {
this.wireframeLinecap = source.wireframeLinecap;
this.wireframeLinejoin = source.wireframeLinejoin;
this.skinning = source.skinning;
this.morphTargets = source.morphTargets;
this.morphNormals = source.morphNormals;
......
......@@ -16,6 +16,7 @@ import { UniformsUtils } from '../renderers/shaders/UniformsUtils';
*
* lights: <bool>,
*
* skinning: <bool>,
* morphTargets: <bool>,
* morphNormals: <bool>
* }
......@@ -42,6 +43,7 @@ function ShaderMaterial( parameters ) {
this.lights = false; // set to use scene lights
this.clipping = false; // set to use user-defined clipping planes
this.skinning = false; // set to use skinning attribute streams
this.morphTargets = false; // set to use morph targets
this.morphNormals = false; // set to use morph normals
......@@ -98,6 +100,8 @@ ShaderMaterial.prototype.copy = function ( source ) {
this.lights = source.lights;
this.clipping = source.clipping;
this.skinning = source.skinning;
this.morphTargets = source.morphTargets;
this.morphNormals = source.morphNormals;
......
......@@ -307,7 +307,7 @@ function WebGLShadowMap( _renderer, _lights, _objects, capabilities ) {
}
var useSkinning = object.isSkinnedMesh;
var useSkinning = object.isSkinnedMesh && material.skinning;
var variantIndex = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册