@galacean/engine-core 0.0.0-experimental-animator-additive.3 → 0.0.0-experimental-animator-additive.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.js +5071 -771
- package/dist/main.js.map +1 -1
- package/dist/miniprogram.js +55 -19
- package/dist/module.js +4590 -290
- package/dist/module.js.map +1 -1
- package/package.json +3 -3
- package/types/material/PBRMaterial.d.ts +11 -2
- package/types/mesh/MeshRenderer.d.ts +8 -2
- package/types/shadow/CascadedShadowCasterPass.d.ts +1 -0
package/dist/miniprogram.js
CHANGED
|
@@ -7598,9 +7598,9 @@ var noise_simplex_3D_grad = "#define GLSLIFY 1\nfloat simplex(vec3 v,out vec3 gr
|
|
|
7598
7598
|
|
|
7599
7599
|
var noise_simplex_4D = "#define GLSLIFY 1\nvec4 grad4(float j,vec4 ip){const vec4 ones=vec4(1.0,1.0,1.0,-1.0);vec4 p,s;p.xyz=floor(fract(vec3(j)*ip.xyz)*7.0)*ip.z-1.0;p.w=1.5-dot(abs(p.xyz),ones.xyz);s=vec4(lessThan(p,vec4(0.0)));p.xyz=p.xyz+(s.xyz*2.0-1.0)*s.www;return p;}\n#define F4 0.309016994374947451\nfloat simplex(vec4 v){const vec4 C=vec4(0.138196601125011,0.276393202250021,0.414589803375032,-0.447213595499958);vec4 i=floor(v+dot(v,vec4(F4)));vec4 x0=v-i+dot(i,C.xxxx);vec4 i0;vec3 isX=step(x0.yzw,x0.xxx);vec3 isYZ=step(x0.zww,x0.yyz);i0.x=isX.x+isX.y+isX.z;i0.yzw=1.0-isX;i0.y+=isYZ.x+isYZ.y;i0.zw+=1.0-isYZ.xy;i0.z+=isYZ.z;i0.w+=1.0-isYZ.z;vec4 i3=clamp(i0,0.0,1.0);vec4 i2=clamp(i0-1.0,0.0,1.0);vec4 i1=clamp(i0-2.0,0.0,1.0);vec4 x1=x0-i1+C.xxxx;vec4 x2=x0-i2+C.yyyy;vec4 x3=x0-i3+C.zzzz;vec4 x4=x0+C.wwww;i=mod289(i);float j0=permute(permute(permute(permute(i.w)+i.z)+i.y)+i.x);vec4 j1=permute(permute(permute(permute(i.w+vec4(i1.w,i2.w,i3.w,1.0))+i.z+vec4(i1.z,i2.z,i3.z,1.0))+i.y+vec4(i1.y,i2.y,i3.y,1.0))+i.x+vec4(i1.x,i2.x,i3.x,1.0));vec4 ip=vec4(1.0/294.0,1.0/49.0,1.0/7.0,0.0);vec4 p0=grad4(j0,ip);vec4 p1=grad4(j1.x,ip);vec4 p2=grad4(j1.y,ip);vec4 p3=grad4(j1.z,ip);vec4 p4=grad4(j1.w,ip);vec4 norm=taylorInvSqrt(vec4(dot(p0,p0),dot(p1,p1),dot(p2,p2),dot(p3,p3)));p0*=norm.x;p1*=norm.y;p2*=norm.z;p3*=norm.w;p4*=taylorInvSqrt(dot(p4,p4));vec3 m0=max(0.6-vec3(dot(x0,x0),dot(x1,x1),dot(x2,x2)),0.0);vec2 m1=max(0.6-vec2(dot(x3,x3),dot(x4,x4)),0.0);m0=m0*m0;m1=m1*m1;return 49.0*(dot(m0*m0,vec3(dot(p0,x0),dot(p1,x1),dot(p2,x2)))+dot(m1*m1,vec2(dot(p3,x3),dot(p4,x4))));}"; // eslint-disable-line
|
|
7600
7600
|
|
|
7601
|
-
var pbr_frag_define = "#define GLSLIFY 1\nuniform float u_alphaCutoff;uniform vec4 u_baseColor;uniform float u_metal;uniform float u_roughness;uniform vec3 u_PBRSpecularColor;uniform float u_glossiness;uniform vec3 u_emissiveColor;\n#ifdef CLEARCOAT\nuniform float u_clearCoat;uniform float u_clearCoatRoughness;\n#endif\nuniform float u_normalIntensity;uniform float u_occlusionIntensity;uniform float u_occlusionTextureCoord;\n#ifdef BASETEXTURE\nuniform sampler2D u_baseTexture;\n#endif\n#ifdef NORMALTEXTURE\nuniform sampler2D u_normalTexture;\n#endif\n#ifdef EMISSIVETEXTURE\nuniform sampler2D u_emissiveTexture;\n#endif\n#ifdef ROUGHNESSMETALLICTEXTURE\nuniform sampler2D u_roughnessMetallicTexture;\n#endif\n#ifdef SPECULARGLOSSINESSTEXTURE\nuniform sampler2D u_specularGlossinessTexture;\n#endif\n#ifdef OCCLUSIONTEXTURE\nuniform sampler2D u_occlusionTexture;\n#endif\n#ifdef HAS_CLEARCOATTEXTURE\nuniform sampler2D u_clearCoatTexture;\n#endif\n#ifdef HAS_CLEARCOATROUGHNESSTEXTURE\nuniform sampler2D u_clearCoatRoughnessTexture;\n#endif\n#ifdef HAS_CLEARCOATNORMALTEXTURE\nuniform sampler2D u_clearCoatNormalTexture;\n#endif\nstruct ReflectedLight{vec3 directDiffuse;vec3 directSpecular;vec3 indirectDiffuse;vec3 indirectSpecular;};struct Geometry{vec3 position;vec3 normal;vec3 viewDir;float dotNV;\n#ifdef CLEARCOAT\nvec3 clearCoatNormal;float clearCoatDotNV;\n#endif\n};struct Material{vec3 diffuseColor;float roughness;vec3 specularColor;float opacity;\n#ifdef CLEARCOAT\nfloat clearCoat;float clearCoatRoughness;\n#endif\n};"; // eslint-disable-line
|
|
7601
|
+
var pbr_frag_define = "#define GLSLIFY 1\nuniform float u_alphaCutoff;uniform vec4 u_baseColor;uniform float u_metal;uniform float u_roughness;uniform vec3 u_PBRSpecularColor;uniform float u_glossiness;uniform vec3 u_emissiveColor;\n#ifdef CLEARCOAT\nuniform float u_clearCoat;uniform float u_clearCoatRoughness;\n#endif\nuniform float u_normalIntensity;uniform float u_occlusionIntensity;uniform float u_occlusionTextureCoord;\n#ifdef BASETEXTURE\nuniform sampler2D u_baseTexture;\n#endif\n#ifdef NORMALTEXTURE\nuniform sampler2D u_normalTexture;\n#endif\n#ifdef EMISSIVETEXTURE\nuniform sampler2D u_emissiveTexture;\n#endif\n#ifdef ROUGHNESSMETALLICTEXTURE\nuniform sampler2D u_roughnessMetallicTexture;\n#endif\n#ifdef SPECULARGLOSSINESSTEXTURE\nuniform sampler2D u_specularGlossinessTexture;\n#endif\n#ifdef OCCLUSIONTEXTURE\nuniform sampler2D u_occlusionTexture;\n#endif\n#ifdef HAS_CLEARCOATTEXTURE\nuniform sampler2D u_clearCoatTexture;\n#endif\n#ifdef HAS_CLEARCOATROUGHNESSTEXTURE\nuniform sampler2D u_clearCoatRoughnessTexture;\n#endif\n#ifdef HAS_CLEARCOATNORMALTEXTURE\nuniform sampler2D u_clearCoatNormalTexture;\n#endif\nstruct ReflectedLight{vec3 directDiffuse;vec3 directSpecular;vec3 indirectDiffuse;vec3 indirectSpecular;};struct Geometry{vec3 position;vec3 normal;vec3 viewDir;float dotNV;\n#ifdef CLEARCOAT\nvec3 clearCoatNormal;float clearCoatDotNV;\n#endif\n};struct Material{vec3 diffuseColor;float roughness;vec3 specularColor;float opacity;\n#ifdef CLEARCOAT\nfloat clearCoat;float clearCoatRoughness;\n#endif\n};uniform float material_IOR;"; // eslint-disable-line
|
|
7602
7602
|
|
|
7603
|
-
var pbr_helper = "#define GLSLIFY 1\n#include <normal_get>\nfloat computeSpecularOcclusion(float ambientOcclusion,float roughness,float dotNV){return saturate(pow(dotNV+ambientOcclusion,exp2(-16.0*roughness-1.0))-1.0+ambientOcclusion);}float getAARoughnessFactor(vec3 normal){\n#ifdef HAS_DERIVATIVES\nvec3 dxy=max(abs(dFdx(normal)),abs(dFdy(normal)));return 0.04+max(max(dxy.x,dxy.y),dxy.z);\n#else\nreturn 0.04;\n#endif\n}void initGeometry(out Geometry geometry){geometry.position=v_pos;geometry.viewDir=normalize(u_cameraPos-v_pos);\n#if defined(NORMALTEXTURE) || defined(HAS_CLEARCOATNORMALTEXTURE)\nmat3 tbn=getTBN();\n#endif\n#ifdef NORMALTEXTURE\ngeometry.normal=getNormalByNormalTexture(tbn,u_normalTexture,u_normalIntensity,v_uv);\n#else\ngeometry.normal=getNormal();\n#endif\ngeometry.dotNV=saturate(dot(geometry.normal,geometry.viewDir));\n#ifdef CLEARCOAT\n#ifdef HAS_CLEARCOATNORMALTEXTURE\ngeometry.clearCoatNormal=getNormalByNormalTexture(tbn,u_clearCoatNormalTexture,u_normalIntensity,v_uv);\n#else\ngeometry.clearCoatNormal=getNormal();\n#endif\ngeometry.clearCoatDotNV=saturate(dot(geometry.clearCoatNormal,geometry.viewDir));\n#endif\n}void initMaterial(out Material material,const in Geometry geometry){vec4 baseColor=u_baseColor;float metal=u_metal;float roughness=u_roughness;vec3 specularColor=u_PBRSpecularColor;float glossiness=u_glossiness;float alphaCutoff=u_alphaCutoff;\n#ifdef BASETEXTURE\nvec4 baseTextureColor=texture2D(u_baseTexture,v_uv);\n#ifndef OASIS_COLORSPACE_GAMMA\nbaseTextureColor=gammaToLinear(baseTextureColor);\n#endif\nbaseColor*=baseTextureColor;\n#endif\n#ifdef O3_HAS_VERTEXCOLOR\nbaseColor*=v_color;\n#endif\n#ifdef ALPHA_CUTOFF\nif(baseColor.a<alphaCutoff){discard;}\n#endif\n#ifdef ROUGHNESSMETALLICTEXTURE\nvec4 metalRoughMapColor=texture2D(u_roughnessMetallicTexture,v_uv);roughness*=metalRoughMapColor.g;metal*=metalRoughMapColor.b;\n#endif\n#ifdef SPECULARGLOSSINESSTEXTURE\nvec4 specularGlossinessColor=texture2D(u_specularGlossinessTexture,v_uv);\n#ifndef OASIS_COLORSPACE_GAMMA\nspecularGlossinessColor=gammaToLinear(specularGlossinessColor);\n#endif\nspecularColor*=specularGlossinessColor.rgb;glossiness*=specularGlossinessColor.a;\n#endif\n#ifdef IS_METALLIC_WORKFLOW\nmaterial.diffuseColor=baseColor.rgb*(1.0-metal);material.specularColor=mix(vec3(
|
|
7603
|
+
var pbr_helper = "#define GLSLIFY 1\n#include <normal_get>\nfloat computeSpecularOcclusion(float ambientOcclusion,float roughness,float dotNV){return saturate(pow(dotNV+ambientOcclusion,exp2(-16.0*roughness-1.0))-1.0+ambientOcclusion);}float getAARoughnessFactor(vec3 normal){\n#ifdef HAS_DERIVATIVES\nvec3 dxy=max(abs(dFdx(normal)),abs(dFdy(normal)));return 0.04+max(max(dxy.x,dxy.y),dxy.z);\n#else\nreturn 0.04;\n#endif\n}void initGeometry(out Geometry geometry){geometry.position=v_pos;geometry.viewDir=normalize(u_cameraPos-v_pos);\n#if defined(NORMALTEXTURE) || defined(HAS_CLEARCOATNORMALTEXTURE)\nmat3 tbn=getTBN();\n#endif\n#ifdef NORMALTEXTURE\ngeometry.normal=getNormalByNormalTexture(tbn,u_normalTexture,u_normalIntensity,v_uv);\n#else\ngeometry.normal=getNormal();\n#endif\ngeometry.dotNV=saturate(dot(geometry.normal,geometry.viewDir));\n#ifdef CLEARCOAT\n#ifdef HAS_CLEARCOATNORMALTEXTURE\ngeometry.clearCoatNormal=getNormalByNormalTexture(tbn,u_clearCoatNormalTexture,u_normalIntensity,v_uv);\n#else\ngeometry.clearCoatNormal=getNormal();\n#endif\ngeometry.clearCoatDotNV=saturate(dot(geometry.clearCoatNormal,geometry.viewDir));\n#endif\n}void initMaterial(out Material material,const in Geometry geometry){vec4 baseColor=u_baseColor;float metal=u_metal;float roughness=u_roughness;vec3 specularColor=u_PBRSpecularColor;float glossiness=u_glossiness;float alphaCutoff=u_alphaCutoff;float F0=pow2((material_IOR-1.0)/(material_IOR+1.0));\n#ifdef BASETEXTURE\nvec4 baseTextureColor=texture2D(u_baseTexture,v_uv);\n#ifndef OASIS_COLORSPACE_GAMMA\nbaseTextureColor=gammaToLinear(baseTextureColor);\n#endif\nbaseColor*=baseTextureColor;\n#endif\n#ifdef O3_HAS_VERTEXCOLOR\nbaseColor*=v_color;\n#endif\n#ifdef ALPHA_CUTOFF\nif(baseColor.a<alphaCutoff){discard;}\n#endif\n#ifdef ROUGHNESSMETALLICTEXTURE\nvec4 metalRoughMapColor=texture2D(u_roughnessMetallicTexture,v_uv);roughness*=metalRoughMapColor.g;metal*=metalRoughMapColor.b;\n#endif\n#ifdef SPECULARGLOSSINESSTEXTURE\nvec4 specularGlossinessColor=texture2D(u_specularGlossinessTexture,v_uv);\n#ifndef OASIS_COLORSPACE_GAMMA\nspecularGlossinessColor=gammaToLinear(specularGlossinessColor);\n#endif\nspecularColor*=specularGlossinessColor.rgb;glossiness*=specularGlossinessColor.a;\n#endif\n#ifdef IS_METALLIC_WORKFLOW\nmaterial.diffuseColor=baseColor.rgb*(1.0-metal);material.specularColor=mix(vec3(F0),baseColor.rgb,metal);material.roughness=roughness;\n#else\nfloat specularStrength=max(max(specularColor.r,specularColor.g),specularColor.b);material.diffuseColor=baseColor.rgb*(1.0-specularStrength);material.specularColor=specularColor;material.roughness=1.0-glossiness;\n#endif\nmaterial.roughness=max(material.roughness,getAARoughnessFactor(geometry.normal));\n#ifdef CLEARCOAT\nmaterial.clearCoat=u_clearCoat;material.clearCoatRoughness=u_clearCoatRoughness;\n#ifdef HAS_CLEARCOATTEXTURE\nmaterial.clearCoat*=texture2D(u_clearCoatTexture,v_uv).r;\n#endif\n#ifdef HAS_CLEARCOATROUGHNESSTEXTURE\nmaterial.clearCoatRoughness*=texture2D(u_clearCoatRoughnessTexture,v_uv).g;\n#endif\nmaterial.clearCoat=saturate(material.clearCoat);material.clearCoatRoughness=max(material.clearCoatRoughness,getAARoughnessFactor(geometry.clearCoatNormal));\n#endif\n#ifdef OASIS_TRANSPARENT\nmaterial.opacity=baseColor.a;\n#else\nmaterial.opacity=1.0;\n#endif\n}\n#include <brdf>\n#include <direct_irradiance_frag_define>\n#include <ibl_frag_define>\n"; // eslint-disable-line
|
|
7604
7604
|
|
|
7605
7605
|
var brdf = "#define GLSLIFY 1\nfloat F_Schlick(float dotLH){return 0.04+0.96*(pow(1.0-dotLH,5.0));}vec3 F_Schlick(vec3 specularColor,float dotLH){float fresnel=exp2((-5.55473*dotLH-6.98316)*dotLH);return(1.0-specularColor)*fresnel+specularColor;}float G_GGX_SmithCorrelated(float alpha,float dotNL,float dotNV){float a2=pow2(alpha);float gv=dotNL*sqrt(a2+(1.0-a2)*pow2(dotNV));float gl=dotNV*sqrt(a2+(1.0-a2)*pow2(dotNL));return 0.5/max(gv+gl,EPSILON);}float D_GGX(float alpha,float dotNH){float a2=pow2(alpha);float denom=pow2(dotNH)*(a2-1.0)+1.0;return RECIPROCAL_PI*a2/pow2(denom);}vec3 BRDF_Specular_GGX(vec3 incidentDirection,vec3 viewDir,vec3 normal,vec3 specularColor,float roughness){float alpha=pow2(roughness);vec3 halfDir=normalize(incidentDirection+viewDir);float dotNL=saturate(dot(normal,incidentDirection));float dotNV=saturate(dot(normal,viewDir));float dotNH=saturate(dot(normal,halfDir));float dotLH=saturate(dot(incidentDirection,halfDir));vec3 F=F_Schlick(specularColor,dotLH);float G=G_GGX_SmithCorrelated(alpha,dotNL,dotNV);float D=D_GGX(alpha,dotNH);return F*(G*D);}vec3 BRDF_Diffuse_Lambert(vec3 diffuseColor){return RECIPROCAL_PI*diffuseColor;}"; // eslint-disable-line
|
|
7606
7606
|
|
|
@@ -12900,6 +12900,7 @@ var VertexChangedFlags;
|
|
|
12900
12900
|
function MeshRenderer(entity) {
|
|
12901
12901
|
var _this;
|
|
12902
12902
|
_this = Renderer.call(this, entity) || this;
|
|
12903
|
+
_this._enableVertexColor = false;
|
|
12903
12904
|
_this._onMeshChanged = _this._onMeshChanged.bind(_assert_this_initialized(_this));
|
|
12904
12905
|
return _this;
|
|
12905
12906
|
}
|
|
@@ -12961,7 +12962,7 @@ var VertexChangedFlags;
|
|
|
12961
12962
|
shaderData.enableMacro(MeshRenderer._tangentMacro);
|
|
12962
12963
|
break;
|
|
12963
12964
|
case "COLOR_0":
|
|
12964
|
-
shaderData.enableMacro(MeshRenderer._vertexColorMacro);
|
|
12965
|
+
this.enableVertexColor && shaderData.enableMacro(MeshRenderer._vertexColorMacro);
|
|
12965
12966
|
break;
|
|
12966
12967
|
}
|
|
12967
12968
|
}
|
|
@@ -13016,6 +13017,20 @@ var VertexChangedFlags;
|
|
|
13016
13017
|
this._setMesh(value);
|
|
13017
13018
|
}
|
|
13018
13019
|
}
|
|
13020
|
+
},
|
|
13021
|
+
{
|
|
13022
|
+
key: "enableVertexColor",
|
|
13023
|
+
get: /**
|
|
13024
|
+
* Whether enable vertex color.
|
|
13025
|
+
*/ function get() {
|
|
13026
|
+
return this._enableVertexColor;
|
|
13027
|
+
},
|
|
13028
|
+
set: function set(value) {
|
|
13029
|
+
if (value !== this._enableVertexColor) {
|
|
13030
|
+
this._dirtyUpdateFlag |= 0x2;
|
|
13031
|
+
this._enableVertexColor = value;
|
|
13032
|
+
}
|
|
13033
|
+
}
|
|
13019
13034
|
}
|
|
13020
13035
|
]);
|
|
13021
13036
|
return MeshRenderer;
|
|
@@ -14397,7 +14412,7 @@ var Basic2DBatcher = /*#__PURE__*/ function() {
|
|
|
14397
14412
|
// vertices
|
|
14398
14413
|
this._vertexBuffers[index] = new Buffer(engine, exports.BufferBindFlag.VertexBuffer, MAX_VERTEX_COUNT * 4 * vertexStride, exports.BufferUsage.Dynamic);
|
|
14399
14414
|
// indices
|
|
14400
|
-
this._indiceBuffers[index] = new Buffer(engine, exports.BufferBindFlag.IndexBuffer, MAX_VERTEX_COUNT * 3, exports.BufferUsage.Dynamic);
|
|
14415
|
+
this._indiceBuffers[index] = new Buffer(engine, exports.BufferBindFlag.IndexBuffer, MAX_VERTEX_COUNT * 2 * 3, exports.BufferUsage.Dynamic);
|
|
14401
14416
|
mesh.setVertexBufferBinding(this._vertexBuffers[index], vertexStride);
|
|
14402
14417
|
mesh.setIndexBufferBinding(this._indiceBuffers[index], exports.IndexFormat.UInt16);
|
|
14403
14418
|
mesh.setVertexElements(vertexElements);
|
|
@@ -17114,7 +17129,7 @@ var /**
|
|
|
17114
17129
|
// prepare render target
|
|
17115
17130
|
var renderTarget = this._getAvailableRenderTarget();
|
|
17116
17131
|
// @todo: shouldn't set viewport and scissor in activeRenderTarget
|
|
17117
|
-
rhi.activeRenderTarget(renderTarget,
|
|
17132
|
+
rhi.activeRenderTarget(renderTarget, CascadedShadowCasterPass._viewport, 0);
|
|
17118
17133
|
if (this._supportDepthTexture) {
|
|
17119
17134
|
rhi.clearRenderTarget(engine, exports.CameraClearFlags.Depth, null);
|
|
17120
17135
|
} else {
|
|
@@ -17318,6 +17333,9 @@ var /**
|
|
|
17318
17333
|
(function() {
|
|
17319
17334
|
CascadedShadowCasterPass._cascadesSplitDistance = new Array(CascadedShadowCasterPass._maxCascades + 1);
|
|
17320
17335
|
})();
|
|
17336
|
+
(function() {
|
|
17337
|
+
CascadedShadowCasterPass._viewport = new miniprogram.Vector4(0, 0, 1, 1);
|
|
17338
|
+
})();
|
|
17321
17339
|
(function() {
|
|
17322
17340
|
CascadedShadowCasterPass._clearColor = new miniprogram.Color(1, 1, 1, 1);
|
|
17323
17341
|
})();
|
|
@@ -18993,6 +19011,7 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
|
|
|
18993
19011
|
_this = PBRBaseMaterial.call(this, engine, Shader.find("pbr")) || this;
|
|
18994
19012
|
_this.shaderData.setFloat(PBRMaterial._metallicProp, 1);
|
|
18995
19013
|
_this.shaderData.setFloat(PBRMaterial._roughnessProp, 1);
|
|
19014
|
+
_this.shaderData.setFloat(PBRMaterial._iorProp, 1.5);
|
|
18996
19015
|
return _this;
|
|
18997
19016
|
}
|
|
18998
19017
|
var _proto = PBRMaterial.prototype;
|
|
@@ -19004,10 +19023,23 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
|
|
|
19004
19023
|
return dest;
|
|
19005
19024
|
};
|
|
19006
19025
|
_create_class(PBRMaterial, [
|
|
19026
|
+
{
|
|
19027
|
+
key: "ior",
|
|
19028
|
+
get: /**
|
|
19029
|
+
* Index Of Refraction.
|
|
19030
|
+
* @defaultValue `1.5`
|
|
19031
|
+
*/ function get() {
|
|
19032
|
+
return this.shaderData.getFloat(PBRMaterial._iorProp);
|
|
19033
|
+
},
|
|
19034
|
+
set: function set(v) {
|
|
19035
|
+
this.shaderData.setFloat(PBRMaterial._iorProp, Math.max(v, 0));
|
|
19036
|
+
}
|
|
19037
|
+
},
|
|
19007
19038
|
{
|
|
19008
19039
|
key: "metallic",
|
|
19009
19040
|
get: /**
|
|
19010
|
-
* Metallic
|
|
19041
|
+
* Metallic.
|
|
19042
|
+
* @defaultValue `1.0`
|
|
19011
19043
|
*/ function get() {
|
|
19012
19044
|
return this.shaderData.getFloat(PBRMaterial._metallicProp);
|
|
19013
19045
|
},
|
|
@@ -19018,7 +19050,8 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
|
|
|
19018
19050
|
{
|
|
19019
19051
|
key: "roughness",
|
|
19020
19052
|
get: /**
|
|
19021
|
-
* Roughness
|
|
19053
|
+
* Roughness. default 1.0.
|
|
19054
|
+
* @defaultValue `1.0`
|
|
19022
19055
|
*/ function get() {
|
|
19023
19056
|
return this.shaderData.getFloat(PBRMaterial._roughnessProp);
|
|
19024
19057
|
},
|
|
@@ -19055,6 +19088,9 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
|
|
|
19055
19088
|
(function() {
|
|
19056
19089
|
PBRMaterial._roughnessMetallicTextureProp = Shader.getPropertyByName("u_roughnessMetallicTexture");
|
|
19057
19090
|
})();
|
|
19091
|
+
(function() {
|
|
19092
|
+
PBRMaterial._iorProp = Shader.getPropertyByName("material_IOR");
|
|
19093
|
+
})();
|
|
19058
19094
|
|
|
19059
19095
|
/**
|
|
19060
19096
|
* PBR (Specular-Glossiness Workflow) Material.
|
|
@@ -22802,6 +22838,12 @@ exports.AnimatorLayerBlendingMode = void 0;
|
|
|
22802
22838
|
}
|
|
22803
22839
|
var srcClipTime = srcPlayData.clipTime;
|
|
22804
22840
|
var destClipTime = destPlayData.clipTime;
|
|
22841
|
+
for(var i = crossOwnerCollection.length - 1; i >= 0; i--){
|
|
22842
|
+
var crossOwner = crossOwnerCollection[i];
|
|
22843
|
+
var srcCurveIndex = crossOwner.crossSrcCurveIndices[layerIndex];
|
|
22844
|
+
var destCurveIndex = crossOwner.crossDestCurveIndices[layerIndex];
|
|
22845
|
+
crossOwner.crossFadeAndApplyValue(srcCurveIndex >= 0 ? srcCurves[srcCurveIndex].curve : null, destCurveIndex >= 0 ? destCurves[destCurveIndex].curve : null, srcClipTime, destClipTime, crossWeight, weight, additive);
|
|
22846
|
+
}
|
|
22805
22847
|
srcEventHandlers.length && this._fireAnimationEvents(srcPlayData, srcEventHandlers, lastSrcClipTime, srcClipTime);
|
|
22806
22848
|
destEventHandlers.length && this._fireAnimationEvents(destPlayData, destEventHandlers, lastDestClipTime, destClipTime);
|
|
22807
22849
|
if (lastSrcPlayState === AnimatorStatePlayState.UnStarted) {
|
|
@@ -22820,12 +22862,6 @@ exports.AnimatorLayerBlendingMode = void 0;
|
|
|
22820
22862
|
} else {
|
|
22821
22863
|
this._callAnimatorScriptOnUpdate(destState, layerIndex);
|
|
22822
22864
|
}
|
|
22823
|
-
for(var i = crossOwnerCollection.length - 1; i >= 0; i--){
|
|
22824
|
-
var crossOwner = crossOwnerCollection[i];
|
|
22825
|
-
var srcCurveIndex = crossOwner.crossSrcCurveIndices[layerIndex];
|
|
22826
|
-
var destCurveIndex = crossOwner.crossDestCurveIndices[layerIndex];
|
|
22827
|
-
crossOwner.crossFadeAndApplyValue(srcCurveIndex >= 0 ? srcCurves[srcCurveIndex].curve : null, destCurveIndex >= 0 ? destCurves[destCurveIndex].curve : null, srcClipTime, destClipTime, crossWeight, weight, additive);
|
|
22828
|
-
}
|
|
22829
22865
|
};
|
|
22830
22866
|
_proto._updateCrossFadeFromPose = function _updateCrossFadeFromPose(destPlayData, layerData, layerIndex, layerWeight, delta, additive, aniUpdate) {
|
|
22831
22867
|
var crossOwnerCollection = layerData.crossOwnerCollection;
|
|
@@ -22842,6 +22878,12 @@ exports.AnimatorLayerBlendingMode = void 0;
|
|
|
22842
22878
|
return;
|
|
22843
22879
|
}
|
|
22844
22880
|
var destClipTime = destPlayData.clipTime;
|
|
22881
|
+
for(var i = crossOwnerCollection.length - 1; i >= 0; i--){
|
|
22882
|
+
var crossOwner = crossOwnerCollection[i];
|
|
22883
|
+
var crossDestCurveIndices = crossOwner.crossDestCurveIndices;
|
|
22884
|
+
var curveIndex = crossDestCurveIndices[layerIndex];
|
|
22885
|
+
crossOwner.crossFadeFromPoseAndApplyValue(curveIndex >= 0 ? curveBindings[curveIndex].curve : null, destClipTime, crossWeight, layerWeight, additive);
|
|
22886
|
+
}
|
|
22845
22887
|
//TODO: srcState 少了最新一段时间的判断
|
|
22846
22888
|
eventHandlers.length && this._fireAnimationEvents(destPlayData, eventHandlers, lastDestClipTime, destClipTime);
|
|
22847
22889
|
if (lastPlayState === AnimatorStatePlayState.UnStarted) {
|
|
@@ -22852,12 +22894,6 @@ exports.AnimatorLayerBlendingMode = void 0;
|
|
|
22852
22894
|
} else {
|
|
22853
22895
|
this._callAnimatorScriptOnUpdate(state, layerIndex);
|
|
22854
22896
|
}
|
|
22855
|
-
for(var i = crossOwnerCollection.length - 1; i >= 0; i--){
|
|
22856
|
-
var crossOwner = crossOwnerCollection[i];
|
|
22857
|
-
var crossDestCurveIndices = crossOwner.crossDestCurveIndices;
|
|
22858
|
-
var curveIndex = crossDestCurveIndices[layerIndex];
|
|
22859
|
-
crossOwner.crossFadeFromPoseAndApplyValue(curveIndex >= 0 ? curveBindings[curveIndex].curve : null, destClipTime, crossWeight, layerWeight, additive);
|
|
22860
|
-
}
|
|
22861
22897
|
};
|
|
22862
22898
|
_proto._updateCrossFadeData = function _updateCrossFadeData(layerData, crossWeight, delta, fixed) {
|
|
22863
22899
|
var destPlayData = layerData.destPlayData;
|