@galacean/engine-physics-lite 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 +1 -1
- package/dist/main.js.map +1 -1
- package/dist/miniprogram.js +114 -22
- package/dist/module.js +1 -1
- package/dist/module.js.map +1 -1
- package/package.json +4 -4
package/dist/miniprogram.js
CHANGED
|
@@ -7541,8 +7541,8 @@ var noise_simplex_2D = "#define GLSLIFY 1\nfloat simplex(vec2 v){const vec4 C=ve
|
|
|
7541
7541
|
var noise_simplex_3D = "#define GLSLIFY 1\nfloat simplex(vec3 v){const vec2 C=vec2(1.0/6.0,1.0/3.0);const vec4 D=vec4(0.0,0.5,1.0,2.0);vec3 i=floor(v+dot(v,C.yyy));vec3 x0=v-i+dot(i,C.xxx);vec3 g=step(x0.yzx,x0.xyz);vec3 l=1.0-g;vec3 i1=min(g.xyz,l.zxy);vec3 i2=max(g.xyz,l.zxy);vec3 x1=x0-i1+C.xxx;vec3 x2=x0-i2+C.yyy;vec3 x3=x0-D.yyy;i=mod289(i);vec4 p=permute(permute(permute(i.z+vec4(0.0,i1.z,i2.z,1.0))+i.y+vec4(0.0,i1.y,i2.y,1.0))+i.x+vec4(0.0,i1.x,i2.x,1.0));float n_=0.142857142857;vec3 ns=n_*D.wyz-D.xzx;vec4 j=p-49.0*floor(p*ns.z*ns.z);vec4 x_=floor(j*ns.z);vec4 y_=floor(j-7.0*x_);vec4 x=x_*ns.x+ns.yyyy;vec4 y=y_*ns.x+ns.yyyy;vec4 h=1.0-abs(x)-abs(y);vec4 b0=vec4(x.xy,y.xy);vec4 b1=vec4(x.zw,y.zw);vec4 s0=floor(b0)*2.0+1.0;vec4 s1=floor(b1)*2.0+1.0;vec4 sh=-step(h,vec4(0.0));vec4 a0=b0.xzyw+s0.xzyw*sh.xxyy;vec4 a1=b1.xzyw+s1.xzyw*sh.zzww;vec3 p0=vec3(a0.xy,h.x);vec3 p1=vec3(a0.zw,h.y);vec3 p2=vec3(a1.xy,h.z);vec3 p3=vec3(a1.zw,h.w);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;vec4 m=max(0.6-vec4(dot(x0,x0),dot(x1,x1),dot(x2,x2),dot(x3,x3)),0.0);m=m*m;return 42.0*dot(m*m,vec4(dot(p0,x0),dot(p1,x1),dot(p2,x2),dot(p3,x3)));}"; // eslint-disable-line
|
|
7542
7542
|
var noise_simplex_3D_grad = "#define GLSLIFY 1\nfloat simplex(vec3 v,out vec3 gradient){const vec2 C=vec2(1.0/6.0,1.0/3.0);const vec4 D=vec4(0.0,0.5,1.0,2.0);vec3 i=floor(v+dot(v,C.yyy));vec3 x0=v-i+dot(i,C.xxx);vec3 g=step(x0.yzx,x0.xyz);vec3 l=1.0-g;vec3 i1=min(g.xyz,l.zxy);vec3 i2=max(g.xyz,l.zxy);vec3 x1=x0-i1+C.xxx;vec3 x2=x0-i2+C.yyy;vec3 x3=x0-D.yyy;i=mod289(i);vec4 p=permute(permute(permute(i.z+vec4(0.0,i1.z,i2.z,1.0))+i.y+vec4(0.0,i1.y,i2.y,1.0))+i.x+vec4(0.0,i1.x,i2.x,1.0));float n_=0.142857142857;vec3 ns=n_*D.wyz-D.xzx;vec4 j=p-49.0*floor(p*ns.z*ns.z);vec4 x_=floor(j*ns.z);vec4 y_=floor(j-7.0*x_);vec4 x=x_*ns.x+ns.yyyy;vec4 y=y_*ns.x+ns.yyyy;vec4 h=1.0-abs(x)-abs(y);vec4 b0=vec4(x.xy,y.xy);vec4 b1=vec4(x.zw,y.zw);vec4 s0=floor(b0)*2.0+1.0;vec4 s1=floor(b1)*2.0+1.0;vec4 sh=-step(h,vec4(0.0));vec4 a0=b0.xzyw+s0.xzyw*sh.xxyy;vec4 a1=b1.xzyw+s1.xzyw*sh.zzww;vec3 p0=vec3(a0.xy,h.x);vec3 p1=vec3(a0.zw,h.y);vec3 p2=vec3(a1.xy,h.z);vec3 p3=vec3(a1.zw,h.w);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;vec4 m=max(0.6-vec4(dot(x0,x0),dot(x1,x1),dot(x2,x2),dot(x3,x3)),0.0);vec4 m2=m*m;vec4 m4=m2*m2;vec4 pdotx=vec4(dot(p0,x0),dot(p1,x1),dot(p2,x2),dot(p3,x3));vec4 temp=m2*m*pdotx;gradient=-8.0*(temp.x*x0+temp.y*x1+temp.z*x2+temp.w*x3);gradient+=m4.x*p0+m4.y*p1+m4.z*p2+m4.w*p3;gradient*=42.0;return 42.0*dot(m4,pdotx);}"; // eslint-disable-line
|
|
7543
7543
|
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
|
|
7544
|
-
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
|
|
7545
|
-
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(
|
|
7544
|
+
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
|
|
7545
|
+
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
|
|
7546
7546
|
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
|
|
7547
7547
|
var direct_irradiance_frag_define = "#define GLSLIFY 1\n#include <ShadowFragmentDeclaration>\nvoid addDirectRadiance(vec3 incidentDirection,vec3 color,Geometry geometry,Material material,inout ReflectedLight reflectedLight){float attenuation=1.0;\n#ifdef CLEARCOAT\nfloat clearCoatDotNL=saturate(dot(geometry.clearCoatNormal,incidentDirection));vec3 clearCoatIrradiance=clearCoatDotNL*color;reflectedLight.directSpecular+=material.clearCoat*clearCoatIrradiance*BRDF_Specular_GGX(incidentDirection,geometry.viewDir,geometry.clearCoatNormal,vec3(0.04),material.clearCoatRoughness);attenuation-=material.clearCoat*F_Schlick(geometry.clearCoatDotNV);\n#endif\nfloat dotNL=saturate(dot(geometry.normal,incidentDirection));vec3 irradiance=dotNL*color*PI;reflectedLight.directSpecular+=attenuation*irradiance*BRDF_Specular_GGX(incidentDirection,geometry.viewDir,geometry.normal,material.specularColor,material.roughness);reflectedLight.directDiffuse+=attenuation*irradiance*BRDF_Diffuse_Lambert(material.diffuseColor);}\n#ifdef O3_DIRECT_LIGHT_COUNT\nvoid addDirectionalDirectLightRadiance(DirectLight directionalLight,Geometry geometry,Material material,inout ReflectedLight reflectedLight){vec3 color=directionalLight.color;vec3 direction=-directionalLight.direction;addDirectRadiance(direction,color,geometry,material,reflectedLight);}\n#endif\n#ifdef O3_POINT_LIGHT_COUNT\nvoid addPointDirectLightRadiance(PointLight pointLight,Geometry geometry,Material material,inout ReflectedLight reflectedLight){vec3 lVector=pointLight.position-geometry.position;vec3 direction=normalize(lVector);float lightDistance=length(lVector);vec3 color=pointLight.color;color*=clamp(1.0-pow(lightDistance/pointLight.distance,4.0),0.0,1.0);addDirectRadiance(direction,color,geometry,material,reflectedLight);}\n#endif\n#ifdef O3_SPOT_LIGHT_COUNT\nvoid addSpotDirectLightRadiance(SpotLight spotLight,Geometry geometry,Material material,inout ReflectedLight reflectedLight){vec3 lVector=spotLight.position-geometry.position;vec3 direction=normalize(lVector);float lightDistance=length(lVector);float angleCos=dot(direction,-spotLight.direction);float spotEffect=smoothstep(spotLight.penumbraCos,spotLight.angleCos,angleCos);float decayEffect=clamp(1.0-pow(lightDistance/spotLight.distance,4.0),0.0,1.0);vec3 color=spotLight.color;color*=spotEffect*decayEffect;addDirectRadiance(direction,color,geometry,material,reflectedLight);}\n#endif\nvoid addTotalDirectRadiance(Geometry geometry,Material material,inout ReflectedLight reflectedLight){float shadowAttenuation=1.0;\n#ifdef O3_DIRECT_LIGHT_COUNT\nshadowAttenuation=1.0;\n#ifdef OASIS_CALCULATE_SHADOWS\nshadowAttenuation*=sampleShadowMap();int sunIndex=int(u_shadowInfo.z);\n#endif\nDirectLight directionalLight;for(int i=0;i<O3_DIRECT_LIGHT_COUNT;i++){if(isRendererCulledByLight(oasis_RendererLayer.xy,u_directLightCullingMask[i]))continue;directionalLight.color=u_directLightColor[i];\n#ifdef OASIS_CALCULATE_SHADOWS\nif(i==sunIndex){directionalLight.color*=shadowAttenuation;}\n#endif\ndirectionalLight.direction=u_directLightDirection[i];addDirectionalDirectLightRadiance(directionalLight,geometry,material,reflectedLight);}\n#endif\n#ifdef O3_POINT_LIGHT_COUNT\nPointLight pointLight;for(int i=0;i<O3_POINT_LIGHT_COUNT;i++){if(isRendererCulledByLight(oasis_RendererLayer.xy,u_pointLightCullingMask[i]))continue;pointLight.color=u_pointLightColor[i];pointLight.position=u_pointLightPosition[i];pointLight.distance=u_pointLightDistance[i];addPointDirectLightRadiance(pointLight,geometry,material,reflectedLight);}\n#endif\n#ifdef O3_SPOT_LIGHT_COUNT\nSpotLight spotLight;for(int i=0;i<O3_SPOT_LIGHT_COUNT;i++){if(isRendererCulledByLight(oasis_RendererLayer.xy,u_spotLightCullingMask[i]))continue;spotLight.color=u_spotLightColor[i];spotLight.position=u_spotLightPosition[i];spotLight.direction=u_spotLightDirection[i];spotLight.distance=u_spotLightDistance[i];spotLight.angleCos=u_spotLightAngleCos[i];spotLight.penumbraCos=u_spotLightPenumbraCos[i];addSpotDirectLightRadiance(spotLight,geometry,material,reflectedLight);}\n#endif\n}"; // eslint-disable-line
|
|
7548
7548
|
var ibl_frag_define = "#define GLSLIFY 1\nvec3 getLightProbeIrradiance(vec3 sh[9],vec3 normal){normal.x=-normal.x;vec3 result=sh[0]+sh[1]*(normal.y)+sh[2]*(normal.z)+sh[3]*(normal.x)+sh[4]*(normal.y*normal.x)+sh[5]*(normal.y*normal.z)+sh[6]*(3.0*normal.z*normal.z-1.0)+sh[7]*(normal.z*normal.x)+sh[8]*(normal.x*normal.x-normal.y*normal.y);return max(result,vec3(0.0));}vec3 envBRDFApprox(vec3 specularColor,float roughness,float dotNV){const vec4 c0=vec4(-1,-0.0275,-0.572,0.022);const vec4 c1=vec4(1,0.0425,1.04,-0.04);vec4 r=roughness*c0+c1;float a004=min(r.x*r.x,exp2(-9.28*dotNV))*r.x+r.y;vec2 AB=vec2(-1.04,1.04)*a004+r.zw;return specularColor*AB.x+AB.y;}float getSpecularMIPLevel(float roughness,int maxMIPLevel){return roughness*float(maxMIPLevel);}vec3 getLightProbeRadiance(vec3 viewDir,vec3 normal,float roughness,int maxMIPLevel,float specularIntensity){\n#ifndef O3_USE_SPECULAR_ENV\nreturn vec3(0);\n#else\nvec3 reflectVec=reflect(-viewDir,normal);reflectVec.x=-reflectVec.x;float specularMIPLevel=getSpecularMIPLevel(roughness,maxMIPLevel);\n#ifdef HAS_TEX_LOD\nvec4 envMapColor=textureCubeLodEXT(u_env_specularSampler,reflectVec,specularMIPLevel);\n#else\nvec4 envMapColor=textureCube(u_env_specularSampler,reflectVec,specularMIPLevel);\n#endif\n#ifdef O3_DECODE_ENV_RGBM\nenvMapColor.rgb=RGBMToLinear(envMapColor,5.0).rgb;\n#ifdef OASIS_COLORSPACE_GAMMA\nenvMapColor=linearToGamma(envMapColor);\n#endif\n#else\n#ifndef OASIS_COLORSPACE_GAMMA\nenvMapColor=gammaToLinear(envMapColor);\n#endif\n#endif\nreturn envMapColor.rgb*specularIntensity;\n#endif\n}"; // eslint-disable-line
|
|
@@ -12773,6 +12773,7 @@ var VertexChangedFlags;
|
|
|
12773
12773
|
var MeshRenderer = function MeshRenderer(entity) {
|
|
12774
12774
|
var _this;
|
|
12775
12775
|
_this = Renderer.call(this, entity) || this;
|
|
12776
|
+
_this._enableVertexColor = false;
|
|
12776
12777
|
_this._onMeshChanged = _this._onMeshChanged.bind(_assert_this_initialized(_this));
|
|
12777
12778
|
return _this;
|
|
12778
12779
|
};
|
|
@@ -12835,7 +12836,7 @@ var VertexChangedFlags;
|
|
|
12835
12836
|
shaderData.enableMacro(MeshRenderer._tangentMacro);
|
|
12836
12837
|
break;
|
|
12837
12838
|
case "COLOR_0":
|
|
12838
|
-
shaderData.enableMacro(MeshRenderer._vertexColorMacro);
|
|
12839
|
+
this.enableVertexColor && shaderData.enableMacro(MeshRenderer._vertexColorMacro);
|
|
12839
12840
|
break;
|
|
12840
12841
|
}
|
|
12841
12842
|
}
|
|
@@ -12890,6 +12891,20 @@ var VertexChangedFlags;
|
|
|
12890
12891
|
this._setMesh(value);
|
|
12891
12892
|
}
|
|
12892
12893
|
}
|
|
12894
|
+
},
|
|
12895
|
+
{
|
|
12896
|
+
key: "enableVertexColor",
|
|
12897
|
+
get: /**
|
|
12898
|
+
* Whether enable vertex color.
|
|
12899
|
+
*/ function get() {
|
|
12900
|
+
return this._enableVertexColor;
|
|
12901
|
+
},
|
|
12902
|
+
set: function set(value) {
|
|
12903
|
+
if (value !== this._enableVertexColor) {
|
|
12904
|
+
this._dirtyUpdateFlag |= 0x2;
|
|
12905
|
+
this._enableVertexColor = value;
|
|
12906
|
+
}
|
|
12907
|
+
}
|
|
12893
12908
|
}
|
|
12894
12909
|
]);
|
|
12895
12910
|
return MeshRenderer;
|
|
@@ -14258,7 +14273,7 @@ var Basic2DBatcher = /*#__PURE__*/ function() {
|
|
|
14258
14273
|
// vertices
|
|
14259
14274
|
this._vertexBuffers[index] = new Buffer(engine, exports.BufferBindFlag.VertexBuffer, MAX_VERTEX_COUNT * 4 * vertexStride, exports.BufferUsage.Dynamic);
|
|
14260
14275
|
// indices
|
|
14261
|
-
this._indiceBuffers[index] = new Buffer(engine, exports.BufferBindFlag.IndexBuffer, MAX_VERTEX_COUNT * 3, exports.BufferUsage.Dynamic);
|
|
14276
|
+
this._indiceBuffers[index] = new Buffer(engine, exports.BufferBindFlag.IndexBuffer, MAX_VERTEX_COUNT * 2 * 3, exports.BufferUsage.Dynamic);
|
|
14262
14277
|
mesh.setVertexBufferBinding(this._vertexBuffers[index], vertexStride);
|
|
14263
14278
|
mesh.setIndexBufferBinding(this._indiceBuffers[index], exports.IndexFormat.UInt16);
|
|
14264
14279
|
mesh.setVertexElements(vertexElements);
|
|
@@ -16934,7 +16949,7 @@ var /**
|
|
|
16934
16949
|
// prepare render target
|
|
16935
16950
|
var renderTarget = this._getAvailableRenderTarget();
|
|
16936
16951
|
// @todo: shouldn't set viewport and scissor in activeRenderTarget
|
|
16937
|
-
rhi.activeRenderTarget(renderTarget,
|
|
16952
|
+
rhi.activeRenderTarget(renderTarget, CascadedShadowCasterPass._viewport, 0);
|
|
16938
16953
|
if (this._supportDepthTexture) {
|
|
16939
16954
|
rhi.clearRenderTarget(engine, exports.CameraClearFlags.Depth, null);
|
|
16940
16955
|
} else {
|
|
@@ -17138,6 +17153,9 @@ var /**
|
|
|
17138
17153
|
(function() {
|
|
17139
17154
|
CascadedShadowCasterPass._cascadesSplitDistance = new Array(CascadedShadowCasterPass._maxCascades + 1);
|
|
17140
17155
|
})();
|
|
17156
|
+
(function() {
|
|
17157
|
+
CascadedShadowCasterPass._viewport = new miniprogram$7.Vector4(0, 0, 1, 1);
|
|
17158
|
+
})();
|
|
17141
17159
|
(function() {
|
|
17142
17160
|
CascadedShadowCasterPass._clearColor = new miniprogram$7.Color(1, 1, 1, 1);
|
|
17143
17161
|
})();
|
|
@@ -18799,6 +18817,7 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
|
|
|
18799
18817
|
_this = PBRBaseMaterial.call(this, engine, Shader.find("pbr")) || this;
|
|
18800
18818
|
_this.shaderData.setFloat(PBRMaterial._metallicProp, 1);
|
|
18801
18819
|
_this.shaderData.setFloat(PBRMaterial._roughnessProp, 1);
|
|
18820
|
+
_this.shaderData.setFloat(PBRMaterial._iorProp, 1.5);
|
|
18802
18821
|
return _this;
|
|
18803
18822
|
}
|
|
18804
18823
|
var _proto = PBRMaterial.prototype;
|
|
@@ -18810,10 +18829,23 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
|
|
|
18810
18829
|
return dest;
|
|
18811
18830
|
};
|
|
18812
18831
|
_create_class$2(PBRMaterial, [
|
|
18832
|
+
{
|
|
18833
|
+
key: "ior",
|
|
18834
|
+
get: /**
|
|
18835
|
+
* Index Of Refraction.
|
|
18836
|
+
* @defaultValue `1.5`
|
|
18837
|
+
*/ function get() {
|
|
18838
|
+
return this.shaderData.getFloat(PBRMaterial._iorProp);
|
|
18839
|
+
},
|
|
18840
|
+
set: function set(v) {
|
|
18841
|
+
this.shaderData.setFloat(PBRMaterial._iorProp, Math.max(v, 0));
|
|
18842
|
+
}
|
|
18843
|
+
},
|
|
18813
18844
|
{
|
|
18814
18845
|
key: "metallic",
|
|
18815
18846
|
get: /**
|
|
18816
|
-
* Metallic
|
|
18847
|
+
* Metallic.
|
|
18848
|
+
* @defaultValue `1.0`
|
|
18817
18849
|
*/ function get() {
|
|
18818
18850
|
return this.shaderData.getFloat(PBRMaterial._metallicProp);
|
|
18819
18851
|
},
|
|
@@ -18824,7 +18856,8 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
|
|
|
18824
18856
|
{
|
|
18825
18857
|
key: "roughness",
|
|
18826
18858
|
get: /**
|
|
18827
|
-
* Roughness
|
|
18859
|
+
* Roughness. default 1.0.
|
|
18860
|
+
* @defaultValue `1.0`
|
|
18828
18861
|
*/ function get() {
|
|
18829
18862
|
return this.shaderData.getFloat(PBRMaterial._roughnessProp);
|
|
18830
18863
|
},
|
|
@@ -18861,6 +18894,9 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
|
|
|
18861
18894
|
(function() {
|
|
18862
18895
|
PBRMaterial._roughnessMetallicTextureProp = Shader.getPropertyByName("u_roughnessMetallicTexture");
|
|
18863
18896
|
})();
|
|
18897
|
+
(function() {
|
|
18898
|
+
PBRMaterial._iorProp = Shader.getPropertyByName("material_IOR");
|
|
18899
|
+
})();
|
|
18864
18900
|
/**
|
|
18865
18901
|
* PBR (Specular-Glossiness Workflow) Material.
|
|
18866
18902
|
*/ var PBRSpecularMaterial = /*#__PURE__*/ function(PBRBaseMaterial) {
|
|
@@ -22562,6 +22598,12 @@ exports.AnimatorLayerBlendingMode = void 0;
|
|
|
22562
22598
|
}
|
|
22563
22599
|
var srcClipTime = srcPlayData.clipTime;
|
|
22564
22600
|
var destClipTime = destPlayData.clipTime;
|
|
22601
|
+
for(var i = crossOwnerCollection.length - 1; i >= 0; i--){
|
|
22602
|
+
var crossOwner = crossOwnerCollection[i];
|
|
22603
|
+
var srcCurveIndex = crossOwner.crossSrcCurveIndices[layerIndex];
|
|
22604
|
+
var destCurveIndex = crossOwner.crossDestCurveIndices[layerIndex];
|
|
22605
|
+
crossOwner.crossFadeAndApplyValue(srcCurveIndex >= 0 ? srcCurves[srcCurveIndex].curve : null, destCurveIndex >= 0 ? destCurves[destCurveIndex].curve : null, srcClipTime, destClipTime, crossWeight, weight, additive);
|
|
22606
|
+
}
|
|
22565
22607
|
srcEventHandlers.length && this._fireAnimationEvents(srcPlayData, srcEventHandlers, lastSrcClipTime, srcClipTime);
|
|
22566
22608
|
destEventHandlers.length && this._fireAnimationEvents(destPlayData, destEventHandlers, lastDestClipTime, destClipTime);
|
|
22567
22609
|
if (lastSrcPlayState === AnimatorStatePlayState.UnStarted) {
|
|
@@ -22580,12 +22622,6 @@ exports.AnimatorLayerBlendingMode = void 0;
|
|
|
22580
22622
|
} else {
|
|
22581
22623
|
this._callAnimatorScriptOnUpdate(destState, layerIndex);
|
|
22582
22624
|
}
|
|
22583
|
-
for(var i = crossOwnerCollection.length - 1; i >= 0; i--){
|
|
22584
|
-
var crossOwner = crossOwnerCollection[i];
|
|
22585
|
-
var srcCurveIndex = crossOwner.crossSrcCurveIndices[layerIndex];
|
|
22586
|
-
var destCurveIndex = crossOwner.crossDestCurveIndices[layerIndex];
|
|
22587
|
-
crossOwner.crossFadeAndApplyValue(srcCurveIndex >= 0 ? srcCurves[srcCurveIndex].curve : null, destCurveIndex >= 0 ? destCurves[destCurveIndex].curve : null, srcClipTime, destClipTime, crossWeight, weight, additive);
|
|
22588
|
-
}
|
|
22589
22625
|
};
|
|
22590
22626
|
_proto._updateCrossFadeFromPose = function _updateCrossFadeFromPose(destPlayData, layerData, layerIndex, layerWeight, delta, additive, aniUpdate) {
|
|
22591
22627
|
var crossOwnerCollection = layerData.crossOwnerCollection;
|
|
@@ -22602,6 +22638,12 @@ exports.AnimatorLayerBlendingMode = void 0;
|
|
|
22602
22638
|
return;
|
|
22603
22639
|
}
|
|
22604
22640
|
var destClipTime = destPlayData.clipTime;
|
|
22641
|
+
for(var i = crossOwnerCollection.length - 1; i >= 0; i--){
|
|
22642
|
+
var crossOwner = crossOwnerCollection[i];
|
|
22643
|
+
var crossDestCurveIndices = crossOwner.crossDestCurveIndices;
|
|
22644
|
+
var curveIndex = crossDestCurveIndices[layerIndex];
|
|
22645
|
+
crossOwner.crossFadeFromPoseAndApplyValue(curveIndex >= 0 ? curveBindings[curveIndex].curve : null, destClipTime, crossWeight, layerWeight, additive);
|
|
22646
|
+
}
|
|
22605
22647
|
//TODO: srcState 少了最新一段时间的判断
|
|
22606
22648
|
eventHandlers.length && this._fireAnimationEvents(destPlayData, eventHandlers, lastDestClipTime, destClipTime);
|
|
22607
22649
|
if (lastPlayState === AnimatorStatePlayState.UnStarted) {
|
|
@@ -22612,12 +22654,6 @@ exports.AnimatorLayerBlendingMode = void 0;
|
|
|
22612
22654
|
} else {
|
|
22613
22655
|
this._callAnimatorScriptOnUpdate(state, layerIndex);
|
|
22614
22656
|
}
|
|
22615
|
-
for(var i = crossOwnerCollection.length - 1; i >= 0; i--){
|
|
22616
|
-
var crossOwner = crossOwnerCollection[i];
|
|
22617
|
-
var crossDestCurveIndices = crossOwner.crossDestCurveIndices;
|
|
22618
|
-
var curveIndex = crossDestCurveIndices[layerIndex];
|
|
22619
|
-
crossOwner.crossFadeFromPoseAndApplyValue(curveIndex >= 0 ? curveBindings[curveIndex].curve : null, destClipTime, crossWeight, layerWeight, additive);
|
|
22620
|
-
}
|
|
22621
22657
|
};
|
|
22622
22658
|
_proto._updateCrossFadeData = function _updateCrossFadeData(layerData, crossWeight, delta, fixed) {
|
|
22623
22659
|
var destPlayData = layerData.destPlayData;
|
|
@@ -25616,7 +25652,7 @@ var MaterialParser = /*#__PURE__*/ function(Parser1) {
|
|
|
25616
25652
|
var materials = [];
|
|
25617
25653
|
for(var i = 0; i < gltf.materials.length; i++){
|
|
25618
25654
|
var _gltf_materials_i = gltf.materials[i], _gltf_materials_i_extensions = _gltf_materials_i.extensions, extensions = _gltf_materials_i_extensions === void 0 ? {} : _gltf_materials_i_extensions, pbrMetallicRoughness = _gltf_materials_i.pbrMetallicRoughness, normalTexture = _gltf_materials_i.normalTexture, occlusionTexture = _gltf_materials_i.occlusionTexture, emissiveTexture = _gltf_materials_i.emissiveTexture, emissiveFactor = _gltf_materials_i.emissiveFactor, alphaMode = _gltf_materials_i.alphaMode, alphaCutoff = _gltf_materials_i.alphaCutoff, doubleSided = _gltf_materials_i.doubleSided, _gltf_materials_i_name = _gltf_materials_i.name, name = _gltf_materials_i_name === void 0 ? "" : _gltf_materials_i_name;
|
|
25619
|
-
var KHR_materials_unlit = extensions.KHR_materials_unlit, KHR_materials_pbrSpecularGlossiness = extensions.KHR_materials_pbrSpecularGlossiness, KHR_materials_clearcoat = extensions.KHR_materials_clearcoat, OASIS_materials_remap = extensions.OASIS_materials_remap;
|
|
25655
|
+
var KHR_materials_unlit = extensions.KHR_materials_unlit, KHR_materials_pbrSpecularGlossiness = extensions.KHR_materials_pbrSpecularGlossiness, KHR_materials_clearcoat = extensions.KHR_materials_clearcoat, KHR_materials_ior = extensions.KHR_materials_ior, OASIS_materials_remap = extensions.OASIS_materials_remap;
|
|
25620
25656
|
var material = null;
|
|
25621
25657
|
if (KHR_materials_unlit) {
|
|
25622
25658
|
material = Parser.createEngineResource("KHR_materials_unlit", KHR_materials_unlit, context);
|
|
@@ -25629,6 +25665,9 @@ var MaterialParser = /*#__PURE__*/ function(Parser1) {
|
|
|
25629
25665
|
if (KHR_materials_clearcoat) {
|
|
25630
25666
|
Parser.parseEngineResource("KHR_materials_clearcoat", KHR_materials_clearcoat, material, context);
|
|
25631
25667
|
}
|
|
25668
|
+
if (KHR_materials_ior) {
|
|
25669
|
+
Parser.parseEngineResource("KHR_materials_ior", KHR_materials_ior, material, context);
|
|
25670
|
+
}
|
|
25632
25671
|
if (pbrMetallicRoughness) {
|
|
25633
25672
|
var baseColorFactor = pbrMetallicRoughness.baseColorFactor, baseColorTexture = pbrMetallicRoughness.baseColorTexture, metallicFactor = pbrMetallicRoughness.metallicFactor, roughnessFactor = pbrMetallicRoughness.roughnessFactor, metallicRoughnessTexture = pbrMetallicRoughness.metallicRoughnessTexture;
|
|
25634
25673
|
if (baseColorFactor) {
|
|
@@ -25746,6 +25785,21 @@ var KHR_materials_clearcoat = /*#__PURE__*/ function(ExtensionParser) {
|
|
|
25746
25785
|
KHR_materials_clearcoat = __decorate([
|
|
25747
25786
|
registerExtension("KHR_materials_clearcoat")
|
|
25748
25787
|
], KHR_materials_clearcoat);
|
|
25788
|
+
var KHR_materials_ior = /*#__PURE__*/ function(ExtensionParser) {
|
|
25789
|
+
var KHR_materials_ior = function KHR_materials_ior() {
|
|
25790
|
+
return ExtensionParser.apply(this, arguments);
|
|
25791
|
+
};
|
|
25792
|
+
_inherits$1(KHR_materials_ior, ExtensionParser);
|
|
25793
|
+
var _proto = KHR_materials_ior.prototype;
|
|
25794
|
+
_proto.parseEngineResource = function parseEngineResource(schema, material, context) {
|
|
25795
|
+
var _schema_ior = schema.ior, ior = _schema_ior === void 0 ? 1.5 : _schema_ior;
|
|
25796
|
+
material.ior = ior;
|
|
25797
|
+
};
|
|
25798
|
+
return KHR_materials_ior;
|
|
25799
|
+
}(ExtensionParser);
|
|
25800
|
+
KHR_materials_ior = __decorate([
|
|
25801
|
+
registerExtension("KHR_materials_ior")
|
|
25802
|
+
], KHR_materials_ior);
|
|
25749
25803
|
var KHR_materials_pbrSpecularGlossiness = /*#__PURE__*/ function(ExtensionParser) {
|
|
25750
25804
|
var KHR_materials_pbrSpecularGlossiness = function KHR_materials_pbrSpecularGlossiness() {
|
|
25751
25805
|
return ExtensionParser.apply(this, arguments);
|
|
@@ -26611,6 +26665,12 @@ var SceneParser$1 = /*#__PURE__*/ function(Parser1) {
|
|
|
26611
26665
|
} else {
|
|
26612
26666
|
var material = (materials == null ? void 0 : materials[materialIndex]) || SceneParser._getDefaultMaterial(engine);
|
|
26613
26667
|
renderer.setMaterial(material);
|
|
26668
|
+
// Enable vertex color if mesh has COLOR_0 vertex element
|
|
26669
|
+
mesh.vertexElements.forEach(function(element) {
|
|
26670
|
+
if (element.semantic === "COLOR_0") {
|
|
26671
|
+
renderer.enableVertexColor = true;
|
|
26672
|
+
}
|
|
26673
|
+
});
|
|
26614
26674
|
}
|
|
26615
26675
|
var _gltfMeshPrimitives_i = gltfMeshPrimitives[i], _gltfMeshPrimitives_i_extensions = _gltfMeshPrimitives_i.extensions, extensions = _gltfMeshPrimitives_i_extensions === void 0 ? {} : _gltfMeshPrimitives_i_extensions;
|
|
26616
26676
|
var KHR_materials_variants = extensions.KHR_materials_variants;
|
|
@@ -28813,6 +28873,29 @@ TextureCubeLoader = __decorate([
|
|
|
28813
28873
|
""
|
|
28814
28874
|
])
|
|
28815
28875
|
], TextureCubeLoader);
|
|
28876
|
+
var AnimationClipLoader = /*#__PURE__*/ function(Loader) {
|
|
28877
|
+
var AnimationClipLoader = function AnimationClipLoader() {
|
|
28878
|
+
return Loader.apply(this, arguments);
|
|
28879
|
+
};
|
|
28880
|
+
_inherits$1(AnimationClipLoader, Loader);
|
|
28881
|
+
var _proto = AnimationClipLoader.prototype;
|
|
28882
|
+
_proto.load = function load(item, resourceManager) {
|
|
28883
|
+
var _this = this;
|
|
28884
|
+
return new miniprogram$5.AssetPromise(function(resolve, reject) {
|
|
28885
|
+
_this.request(item.url, _extends$1({}, item, {
|
|
28886
|
+
type: "arraybuffer"
|
|
28887
|
+
})).then(function(data) {
|
|
28888
|
+
return decode(data, resourceManager.engine).then(resolve);
|
|
28889
|
+
}).catch(reject);
|
|
28890
|
+
});
|
|
28891
|
+
};
|
|
28892
|
+
return AnimationClipLoader;
|
|
28893
|
+
}(miniprogram$5.Loader);
|
|
28894
|
+
AnimationClipLoader = __decorate([
|
|
28895
|
+
miniprogram$5.resourceLoader(miniprogram$5.AssetType.AnimationClip, [
|
|
28896
|
+
"ani"
|
|
28897
|
+
])
|
|
28898
|
+
], AnimationClipLoader);
|
|
28816
28899
|
var SceneLoader = /*#__PURE__*/ function(Loader) {
|
|
28817
28900
|
var SceneLoader = function SceneLoader() {
|
|
28818
28901
|
return Loader.apply(this, arguments);
|
|
@@ -28881,6 +28964,14 @@ var SceneLoader = /*#__PURE__*/ function(Loader) {
|
|
|
28881
28964
|
if (shadow.shadowDistance != undefined) scene.shadowDistance = shadow.shadowDistance;
|
|
28882
28965
|
if (shadow.shadowCascades != undefined) scene.shadowCascades = shadow.shadowCascades;
|
|
28883
28966
|
}
|
|
28967
|
+
var fog = data.scene.fog;
|
|
28968
|
+
if (fog) {
|
|
28969
|
+
if (fog.fogMode != undefined) scene.fogMode = fog.fogMode;
|
|
28970
|
+
if (fog.fogStart != undefined) scene.fogStart = fog.fogStart;
|
|
28971
|
+
if (fog.fogEnd != undefined) scene.fogEnd = fog.fogEnd;
|
|
28972
|
+
if (fog.fogDensity != undefined) scene.fogDensity = fog.fogDensity;
|
|
28973
|
+
if (fog.fogColor != undefined) scene.fogColor.copyFrom(fog.fogColor);
|
|
28974
|
+
}
|
|
28884
28975
|
return Promise.all([
|
|
28885
28976
|
ambientLightPromise,
|
|
28886
28977
|
backgroundPromise
|
|
@@ -35373,7 +35464,8 @@ exports.WebGLMode = void 0;
|
|
|
35373
35464
|
webGLMode: 0,
|
|
35374
35465
|
alpha: false,
|
|
35375
35466
|
stencil: true,
|
|
35376
|
-
_forceFlush: false
|
|
35467
|
+
_forceFlush: false,
|
|
35468
|
+
_maxAllowSkinUniformVectorCount: 256
|
|
35377
35469
|
}, initializeOptions);
|
|
35378
35470
|
if (miniprogram$1$1.SystemInfo.platform === miniprogram$1$1.Platform.IPhone || miniprogram$1$1.SystemInfo.platform === miniprogram$1$1.Platform.IPad) {
|
|
35379
35471
|
var version = miniprogram$1$1.SystemInfo.operatingSystem.match(/(\d+).?(\d+)?.?(\d+)?/);
|
|
@@ -35678,7 +35770,7 @@ function _interopNamespace(e) {
|
|
|
35678
35770
|
}
|
|
35679
35771
|
var CoreObjects__namespace = /*#__PURE__*/ _interopNamespace(CoreObjects);
|
|
35680
35772
|
//@ts-ignore
|
|
35681
|
-
var version = "0.0.0-experimental-animator-additive.
|
|
35773
|
+
var version = "0.0.0-experimental-animator-additive.4";
|
|
35682
35774
|
console.log("Galacean engine version: " + version);
|
|
35683
35775
|
for(var key in CoreObjects__namespace){
|
|
35684
35776
|
CoreObjects.Loader.registerClass(key, CoreObjects__namespace[key]);
|