@vived/component-abb-6700 1.0.0
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/.todo.md +13 -0
- package/README.md +122 -0
- package/dist/.gitkeep +0 -0
- package/dist/Adapters/aBB6700PMAdapter.d.ts +10 -0
- package/dist/Adapters/aBB6700PMAdapter.d.ts.map +1 -0
- package/dist/Controllers/createABB6700.d.ts +12 -0
- package/dist/Controllers/createABB6700.d.ts.map +1 -0
- package/dist/Controllers/getPose.d.ts +11 -0
- package/dist/Controllers/getPose.d.ts.map +1 -0
- package/dist/Controllers/setJointAngle.d.ts +12 -0
- package/dist/Controllers/setJointAngle.d.ts.map +1 -0
- package/dist/Controllers/setPose.d.ts +11 -0
- package/dist/Controllers/setPose.d.ts.map +1 -0
- package/dist/Entities/ABB6700Entity.d.ts +35 -0
- package/dist/Entities/ABB6700Entity.d.ts.map +1 -0
- package/dist/Entities/ABB6700Repo.d.ts +32 -0
- package/dist/Entities/ABB6700Repo.d.ts.map +1 -0
- package/dist/Factory/ABB6700FeatureFactory.d.ts +26 -0
- package/dist/Factory/ABB6700FeatureFactory.d.ts.map +1 -0
- package/dist/Mocks/MockABB6700PM.d.ts +11 -0
- package/dist/Mocks/MockABB6700PM.d.ts.map +1 -0
- package/dist/Mocks/MockSetJointAngleUC.d.ts +7 -0
- package/dist/Mocks/MockSetJointAngleUC.d.ts.map +1 -0
- package/dist/Mocks/MockSetPoseUC.d.ts +7 -0
- package/dist/Mocks/MockSetPoseUC.d.ts.map +1 -0
- package/dist/PMs/ABB6700PM.d.ts +32 -0
- package/dist/PMs/ABB6700PM.d.ts.map +1 -0
- package/dist/UCs/CalcStabilizerUC.d.ts +7 -0
- package/dist/UCs/CalcStabilizerUC.d.ts.map +1 -0
- package/dist/UCs/SetJointAngleUC.d.ts +15 -0
- package/dist/UCs/SetJointAngleUC.d.ts.map +1 -0
- package/dist/UCs/SetPoseUC.d.ts +22 -0
- package/dist/UCs/SetPoseUC.d.ts.map +1 -0
- package/dist/Views/ABB6700BabylonView.d.ts +27 -0
- package/dist/Views/ABB6700BabylonView.d.ts.map +1 -0
- package/dist/abb_6700.glb +0 -0
- package/dist/abstractAudioBus-CyBWsmuN.js +14 -0
- package/dist/animationGroup-BhNThqQe.js +1454 -0
- package/dist/basisTextureLoader-BT391BsV.js +310 -0
- package/dist/brdfTextureTools-DUyKBAXf.js +79 -0
- package/dist/bumpFragment-Dd-ojPA1.js +134 -0
- package/dist/bumpFragment-KE1_PuMl.js +287 -0
- package/dist/bumpVertex-BcdvVFVx.js +8 -0
- package/dist/bumpVertexDeclaration-B5Uvs-RS.js +8 -0
- package/dist/bumpVertexDeclaration-ixSg-yGI.js +8 -0
- package/dist/clipPlaneFragment-DJwQynjA.js +136 -0
- package/dist/clipPlaneVertex-D4Wk50XG.js +376 -0
- package/dist/clipPlaneVertex-eQ147Tn2.js +350 -0
- package/dist/component.config.d.ts +17 -0
- package/dist/component.config.d.ts.map +1 -0
- package/dist/ddsTextureLoader-DeoF3iGO.js +331 -0
- package/dist/default.fragment-DKnTR9nY.js +548 -0
- package/dist/default.fragment-rIGWrUS5.js +486 -0
- package/dist/default.vertex-Bt5y1VyA.js +212 -0
- package/dist/default.vertex-Dext1liJ.js +224 -0
- package/dist/defaultUboDeclaration-BwslQZX8.js +11 -0
- package/dist/defaultUboDeclaration-DSXACgip.js +9 -0
- package/dist/easing-BAt0SO-B.js +163 -0
- package/dist/envTextureLoader-CBiW_Q-U.js +40 -0
- package/dist/exrTextureLoader-5SC6PKIA.js +740 -0
- package/dist/flowGraphApplyForceBlock-6e8-wcaw.js +32 -0
- package/dist/flowGraphApplyImpulseBlock-B27EZQow.js +32 -0
- package/dist/flowGraphArrayIndexBlock-DIUn5e4i.js +31 -0
- package/dist/flowGraphBezierCurveEasingBlock-BJmiHk40.js +25 -0
- package/dist/flowGraphBinaryOperationBlock-Bj7TANCc.js +25 -0
- package/dist/flowGraphBranchBlock-7CRvIKWc.js +19 -0
- package/dist/flowGraphCachedOperationBlock-CP1ZiuIB.js +26 -0
- package/dist/flowGraphCancelDelayBlock-DqtgzBGm.js +20 -0
- package/dist/flowGraphCodeExecutionBlock-CaYXCGqo.js +23 -0
- package/dist/flowGraphConditionalDataBlock-DJ7evX8_.js +28 -0
- package/dist/flowGraphConsoleLogBlock-cMkpqLzO.js +68 -0
- package/dist/flowGraphConstantBlock-JWybwT0A.js +28 -0
- package/dist/flowGraphContextBlock-CFDXHcbn.js +19 -0
- package/dist/flowGraphCounterBlock-B0uPkgw9.js +24 -0
- package/dist/flowGraphDataSwitchBlock-B0GSifvJ.js +27 -0
- package/dist/flowGraphDebounceBlock-CSw8zKym.js +24 -0
- package/dist/flowGraphDebugBlock-DiSR6Ahn.js +65 -0
- package/dist/flowGraphDoNBlock-C-48oQ2H.js +24 -0
- package/dist/flowGraphEasingBlock-DKUaE7Rp.js +50 -0
- package/dist/flowGraphFlipFlopBlock-DX5BGhMV.js +20 -0
- package/dist/flowGraphForLoopBlock-Di-Qwg23.js +27 -0
- package/dist/flowGraphFunctionReferenceBlock-D8X5TFsO.js +20 -0
- package/dist/flowGraphGLTFDataProvider-C4j7nPQv.js +16 -0
- package/dist/flowGraphGetAngularVelocityBlock-Cq-yTQ4D.js +31 -0
- package/dist/flowGraphGetAssetBlock-B36eioor.js +21 -0
- package/dist/flowGraphGetLinearVelocityBlock-MdrV0eUD.js +31 -0
- package/dist/flowGraphGetPhysicsMassPropertiesBlock-wXDZP1wM.js +30 -0
- package/dist/flowGraphGetPropertyBlock-eP0badwf.js +46 -0
- package/dist/flowGraphGetSoundVolumeBlock-D3gXGHXa.js +29 -0
- package/dist/flowGraphGetVariableBlock-C7-qZAec.js +31 -0
- package/dist/flowGraphIndexOfBlock-CC5l9n9P.js +31 -0
- package/dist/flowGraphInterpolationBlock-B6922jzt.js +50 -0
- package/dist/flowGraphIsKeyPressedBlock-X_iuiUOX.js +31 -0
- package/dist/flowGraphIsSoundPlayingBlock-DONQX8N8.js +29 -0
- package/dist/flowGraphJsonPointerParserBlock-DBH_gN8I.js +95 -0
- package/dist/flowGraphKeyDownEventBlock-D5T1Uyfv.js +26 -0
- package/dist/flowGraphKeyUpEventBlock-BPY_Kgkm.js +21 -0
- package/dist/flowGraphKeyboardEventBlock-C49fx3TC.js +20 -0
- package/dist/flowGraphMathBlocks-CkvrN3VJ.js +864 -0
- package/dist/flowGraphMathCombineExtractBlocks-QSjGlnoz.js +248 -0
- package/dist/flowGraphMatrixMathBlocks-B3D7Cz9p.js +117 -0
- package/dist/flowGraphMeshPickEventBlock-BBTz-taa.js +35 -0
- package/dist/flowGraphMultiGateBlock-BhY1y5BG.js +50 -0
- package/dist/flowGraphPauseAnimationBlock-CHZZXMbg.js +19 -0
- package/dist/flowGraphPauseSoundBlock-B7hMmJ0c.js +31 -0
- package/dist/flowGraphPhysicsCollisionEventBlock-CxoPpT-q.js +56 -0
- package/dist/flowGraphPlayAnimationBlock-DVAvIFux.js +99 -0
- package/dist/flowGraphPlaySoundBlock-DjHGrqbC.js +32 -0
- package/dist/flowGraphPointerDownEventBlock-qI-H0JST.js +31 -0
- package/dist/flowGraphPointerMoveEventBlock-DAi4VUyy.js +31 -0
- package/dist/flowGraphPointerOutEventBlock-CFtj68aC.js +21 -0
- package/dist/flowGraphPointerOverEventBlock-VxdHhFuu.js +23 -0
- package/dist/flowGraphPointerUpEventBlock-DRR1f07q.js +31 -0
- package/dist/flowGraphReceiveCustomEventBlock-B3bwdB66.js +52 -0
- package/dist/flowGraphSceneReadyEventBlock-Dy6lDT3j.js +23 -0
- package/dist/flowGraphSceneTickEventBlock-Bl9BF_Xw.js +32 -0
- package/dist/flowGraphSendCustomEventBlock-BAR4PGFq.js +35 -0
- package/dist/flowGraphSequenceBlock-veqU32ZZ.js +32 -0
- package/dist/flowGraphSetAngularVelocityBlock-Dj9b-zu6.js +31 -0
- package/dist/flowGraphSetDelayBlock-CMjudtvk.js +131 -0
- package/dist/flowGraphSetLinearVelocityBlock-DVDhhJBd.js +31 -0
- package/dist/flowGraphSetPhysicsMotionTypeBlock-CL3cxNCO.js +36 -0
- package/dist/flowGraphSetPropertyBlock-D3sWL3Ss.js +47 -0
- package/dist/flowGraphSetSoundVolumeBlock-CxVk45yR.js +32 -0
- package/dist/flowGraphSetVariableBlock-D1oJiwLj.js +47 -0
- package/dist/flowGraphSoundEndedEventBlock-CubEwii0.js +47 -0
- package/dist/flowGraphStopAnimationBlock-B9inwIQx.js +48 -0
- package/dist/flowGraphStopSoundBlock-BijIX2jC.js +31 -0
- package/dist/flowGraphSwitchBlock-BMhPb4OX.js +54 -0
- package/dist/flowGraphThrottleBlock-C7vrnkb1.js +37 -0
- package/dist/flowGraphTransformCoordinatesSystemBlock-DoISqaUG.js +29 -0
- package/dist/flowGraphTypeToTypeBlocks-CSML6QWx.js +57 -0
- package/dist/flowGraphUnaryOperationBlock-B0Shf-lJ.js +24 -0
- package/dist/flowGraphVectorMathBlocks-DoTRR_E0.js +178 -0
- package/dist/flowGraphWaitAllBlock-BvmDMc24.js +54 -0
- package/dist/flowGraphWhileLoopBlock-BaIq4-K2.js +27 -0
- package/dist/geometry.fragment-Bsis3UG2.js +275 -0
- package/dist/geometry.vertex-DskQ5b8j.js +222 -0
- package/dist/harmonicsFunctions-CtNrRfir.js +193 -0
- package/dist/harmonicsFunctions-PEz6APC7.js +18 -0
- package/dist/hdrTextureLoader-D9rYxJ9q.js +112 -0
- package/dist/helperFunctions-Bt7Zfkrp.js +89 -0
- package/dist/helperFunctions-CPmRxd37.js +121 -0
- package/dist/iesTextureLoader-BGUFjVhI.js +93 -0
- package/dist/index-CS3Icp_r.js +67657 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +27 -0
- package/dist/ktxTextureLoader-cUaGg9_L.js +459 -0
- package/dist/lightFragment-BRDibDKG.js +404 -0
- package/dist/lightFragment-DCqtGMp_.js +402 -0
- package/dist/logDepthDeclaration-Bwm-3KyB.js +16 -0
- package/dist/logDepthDeclaration-gUfeSnXX.js +20 -0
- package/dist/logDepthVertex-CKeuJ6ae.js +213 -0
- package/dist/logDepthVertex-CXkmZels.js +459 -0
- package/dist/mesh.vertexData.functions-Bc9lJlrU.js +74 -0
- package/dist/oitFragment-B8zuQigp.js +792 -0
- package/dist/oitFragment-DH3h3T6x.js +657 -0
- package/dist/openpbr.fragment-BglYS6LA.js +1405 -0
- package/dist/openpbr.fragment-DrOTZs4m.js +1553 -0
- package/dist/openpbr.vertex-B-PaLFOR.js +384 -0
- package/dist/openpbr.vertex-DMdFRTnX.js +268 -0
- package/dist/openpbrMaterial-HCU0aOca.js +2880 -0
- package/dist/openpbrMaterialLoadingAdapter-CWRAa-7S.js +1122 -0
- package/dist/openpbrTransmissionLayerData-CfDVObj5.js +352 -0
- package/dist/openpbrUboDeclaration-CA2pvSbt.js +9 -0
- package/dist/openpbrUboDeclaration-xU8VOaib.js +10 -0
- package/dist/pass.fragment-1mMP54bb.js +10 -0
- package/dist/pass.fragment-DzaUp_jk.js +10 -0
- package/dist/passCube.fragment-CQaXS7g3.js +29 -0
- package/dist/passCube.fragment-QJGPwAXI.js +29 -0
- package/dist/pbr.fragment-BnaAAGxb.js +2775 -0
- package/dist/pbr.fragment-CYZk_EGU.js +2619 -0
- package/dist/pbr.vertex-CyvdCw91.js +372 -0
- package/dist/pbr.vertex-DJMAkDxs.js +270 -0
- package/dist/pbrBRDFFunctions-EugoWm6O.js +175 -0
- package/dist/pbrDebug-Bk3sPoEG.js +719 -0
- package/dist/pbrDebug-Cdalzb1I.js +614 -0
- package/dist/pbrIBLFunctions-B0bVAXCF.js +47 -0
- package/dist/pbrIBLFunctions-C06z-ouZ.js +51 -0
- package/dist/pbrMaterial-C4FCKBZQ.js +1660 -0
- package/dist/pbrMaterialLoadingAdapter-BGHlS_ZN.js +1032 -0
- package/dist/pbrUboDeclaration-1lN5_-Bw.js +9 -0
- package/dist/pbrUboDeclaration-BJOUUOZ2.js +10 -0
- package/dist/procedural.vertex-CFPKczKj.js +14 -0
- package/dist/procedural.vertex-DUW7bYZt.js +13 -0
- package/dist/rgbdDecode.fragment-CEGgE4tL.js +8 -0
- package/dist/rgbdDecode.fragment-FT0wkgah.js +8 -0
- package/dist/rgbdEncode.fragment-CLnJJf6E.js +8 -0
- package/dist/rgbdEncode.fragment-CaAcMsY9.js +8 -0
- package/dist/sceneUboDeclaration-B6oxsfcj.js +8 -0
- package/dist/sceneUboDeclaration-JByfVKik.js +13 -0
- package/dist/setupABB6700InstanceFactory.d.ts +7 -0
- package/dist/setupABB6700InstanceFactory.d.ts.map +1 -0
- package/dist/studio.env +0 -0
- package/dist/textureProcessor.fragment-BYPw6SMQ.js +152 -0
- package/dist/textureProcessor.fragment-Ciw9-F3w.js +157 -0
- package/dist/textureTools-Cct_bGgp.js +40 -0
- package/dist/tgaTextureLoader-BJOIdnFr.js +198 -0
- package/dist/thinEngine-Bt9FW4dD.js +2425 -0
- package/dist/webAudioBus-BUzRHSxr.js +88 -0
- package/dist/webAudioMainBus-Dds1TgJG.js +49 -0
- package/package.json +49 -0
|
@@ -0,0 +1,376 @@
|
|
|
1
|
+
import { b0 as e } from "./index-CS3Icp_r.js";
|
|
2
|
+
const t = "bonesDeclaration", I = `#if NUM_BONE_INFLUENCERS>0
|
|
3
|
+
#ifndef USE_VERTEX_PULLING
|
|
4
|
+
attribute matricesIndices : vec4f;attribute matricesWeights : vec4f;
|
|
5
|
+
#if NUM_BONE_INFLUENCERS>4
|
|
6
|
+
attribute matricesIndicesExtra : vec4f;attribute matricesWeightsExtra : vec4f;
|
|
7
|
+
#endif
|
|
8
|
+
#endif
|
|
9
|
+
#ifndef BAKED_VERTEX_ANIMATION_TEXTURE
|
|
10
|
+
#ifdef BONETEXTURE
|
|
11
|
+
var boneSampler : texture_2d<f32>;uniform boneTextureInfo : vec2f;
|
|
12
|
+
#else
|
|
13
|
+
uniform mBones : array<mat4x4f,BonesPerMesh>;
|
|
14
|
+
#endif
|
|
15
|
+
#ifdef BONES_VELOCITY_ENABLED
|
|
16
|
+
uniform mPreviousBones : array<mat4x4f,BonesPerMesh>;
|
|
17
|
+
#endif
|
|
18
|
+
#ifdef BONETEXTURE
|
|
19
|
+
fn readMatrixFromRawSampler(smp : texture_2d<f32>,index : f32)->mat4x4f
|
|
20
|
+
{let offset=i32(index)*4;
|
|
21
|
+
let textureWidth=i32(uniforms.boneTextureInfo.x);let y=offset/textureWidth;let x=offset % textureWidth;let m0=textureLoad(smp,vec2<i32>(x+0,y),0);let m1=textureLoad(smp,vec2<i32>(x+1,y),0);let m2=textureLoad(smp,vec2<i32>(x+2,y),0);let m3=textureLoad(smp,vec2<i32>(x+3,y),0);return mat4x4f(m0,m1,m2,m3);}
|
|
22
|
+
#endif
|
|
23
|
+
#endif
|
|
24
|
+
#endif
|
|
25
|
+
`;
|
|
26
|
+
e.IncludesShadersStoreWGSL[t] || (e.IncludesShadersStoreWGSL[t] = I);
|
|
27
|
+
const r = "bakedVertexAnimationDeclaration", c = `#ifdef BAKED_VERTEX_ANIMATION_TEXTURE
|
|
28
|
+
uniform bakedVertexAnimationTime: f32;uniform bakedVertexAnimationSettings: vec4<f32>;var bakedVertexAnimationTexture : texture_2d<f32>;
|
|
29
|
+
#ifdef INSTANCES
|
|
30
|
+
attribute bakedVertexAnimationSettingsInstanced : vec4<f32>;
|
|
31
|
+
#endif
|
|
32
|
+
fn readMatrixFromRawSamplerVAT(smp : texture_2d<f32>,index : f32,frame : f32)->mat4x4<f32>
|
|
33
|
+
{let offset=i32(index)*4;let frameUV=i32(frame);let m0=textureLoad(smp,vec2<i32>(offset+0,frameUV),0);let m1=textureLoad(smp,vec2<i32>(offset+1,frameUV),0);let m2=textureLoad(smp,vec2<i32>(offset+2,frameUV),0);let m3=textureLoad(smp,vec2<i32>(offset+3,frameUV),0);return mat4x4<f32>(m0,m1,m2,m3);}
|
|
34
|
+
#endif
|
|
35
|
+
`;
|
|
36
|
+
e.IncludesShadersStoreWGSL[r] || (e.IncludesShadersStoreWGSL[r] = c);
|
|
37
|
+
const n = "instancesDeclaration", p = `#ifdef INSTANCES
|
|
38
|
+
attribute world0 : vec4<f32>;attribute world1 : vec4<f32>;attribute world2 : vec4<f32>;attribute world3 : vec4<f32>;
|
|
39
|
+
#ifdef INSTANCESCOLOR
|
|
40
|
+
attribute instanceColor : vec4<f32>;
|
|
41
|
+
#endif
|
|
42
|
+
#if defined(THIN_INSTANCES) && !defined(WORLD_UBO)
|
|
43
|
+
uniform world : mat4x4<f32>;
|
|
44
|
+
#endif
|
|
45
|
+
#if defined(VELOCITY) || defined(PREPASS_VELOCITY) || defined(PREPASS_VELOCITY_LINEAR) || defined(VELOCITY_LINEAR)
|
|
46
|
+
attribute previousWorld0 : vec4<f32>;attribute previousWorld1 : vec4<f32>;attribute previousWorld2 : vec4<f32>;attribute previousWorld3 : vec4<f32>;
|
|
47
|
+
#ifdef THIN_INSTANCES
|
|
48
|
+
uniform previousWorld : mat4x4<f32>;
|
|
49
|
+
#endif
|
|
50
|
+
#endif
|
|
51
|
+
#else
|
|
52
|
+
#if !defined(WORLD_UBO)
|
|
53
|
+
uniform world : mat4x4<f32>;
|
|
54
|
+
#endif
|
|
55
|
+
#if defined(VELOCITY) || defined(PREPASS_VELOCITY) || defined(PREPASS_VELOCITY_LINEAR) || defined(VELOCITY_LINEAR)
|
|
56
|
+
uniform previousWorld : mat4x4<f32>;
|
|
57
|
+
#endif
|
|
58
|
+
#endif
|
|
59
|
+
`;
|
|
60
|
+
e.IncludesShadersStoreWGSL[n] || (e.IncludesShadersStoreWGSL[n] = p);
|
|
61
|
+
const i = "clipPlaneVertexDeclaration", x = `#ifdef CLIPPLANE
|
|
62
|
+
uniform vClipPlane: vec4<f32>;varying fClipDistance: f32;
|
|
63
|
+
#endif
|
|
64
|
+
#ifdef CLIPPLANE2
|
|
65
|
+
uniform vClipPlane2: vec4<f32>;varying fClipDistance2: f32;
|
|
66
|
+
#endif
|
|
67
|
+
#ifdef CLIPPLANE3
|
|
68
|
+
uniform vClipPlane3: vec4<f32>;varying fClipDistance3: f32;
|
|
69
|
+
#endif
|
|
70
|
+
#ifdef CLIPPLANE4
|
|
71
|
+
uniform vClipPlane4: vec4<f32>;varying fClipDistance4: f32;
|
|
72
|
+
#endif
|
|
73
|
+
#ifdef CLIPPLANE5
|
|
74
|
+
uniform vClipPlane5: vec4<f32>;varying fClipDistance5: f32;
|
|
75
|
+
#endif
|
|
76
|
+
#ifdef CLIPPLANE6
|
|
77
|
+
uniform vClipPlane6: vec4<f32>;varying fClipDistance6: f32;
|
|
78
|
+
#endif
|
|
79
|
+
`;
|
|
80
|
+
e.IncludesShadersStoreWGSL[i] || (e.IncludesShadersStoreWGSL[i] = x);
|
|
81
|
+
const a = "morphTargetsVertexGlobalDeclaration", E = `#ifdef MORPHTARGETS
|
|
82
|
+
uniform morphTargetInfluences : array<f32,NUM_MORPH_INFLUENCERS>;
|
|
83
|
+
#ifdef MORPHTARGETS_TEXTURE
|
|
84
|
+
uniform morphTargetTextureIndices : array<f32,NUM_MORPH_INFLUENCERS>;uniform morphTargetTextureInfo : vec3<f32>;var morphTargets : texture_2d_array<f32>;fn readVector3FromRawSampler(targetIndex : i32,vertexIndex : f32)->vec3<f32>
|
|
85
|
+
{
|
|
86
|
+
let textureWidth: i32=i32(uniforms.morphTargetTextureInfo.y);let y: i32=i32(vertexIndex)/textureWidth;let x: i32=i32(vertexIndex) % textureWidth;return textureLoad(morphTargets,vec2i(x,y),i32(uniforms.morphTargetTextureIndices[targetIndex]),0).xyz;}
|
|
87
|
+
fn readVector4FromRawSampler(targetIndex : i32,vertexIndex : f32)->vec4<f32>
|
|
88
|
+
{
|
|
89
|
+
let textureWidth: i32=i32(uniforms.morphTargetTextureInfo.y);
|
|
90
|
+
let y: i32=i32(vertexIndex)/textureWidth;let x: i32=i32(vertexIndex) % textureWidth;return textureLoad(morphTargets,vec2i(x,y),i32(uniforms.morphTargetTextureIndices[targetIndex]),0);}
|
|
91
|
+
#endif
|
|
92
|
+
#endif
|
|
93
|
+
`;
|
|
94
|
+
e.IncludesShadersStoreWGSL[a] || (e.IncludesShadersStoreWGSL[a] = E);
|
|
95
|
+
const f = "morphTargetsVertexDeclaration", T = `#ifdef MORPHTARGETS
|
|
96
|
+
#ifndef MORPHTARGETS_TEXTURE
|
|
97
|
+
#ifdef MORPHTARGETS_POSITION
|
|
98
|
+
attribute position{X} : vec3<f32>;
|
|
99
|
+
#endif
|
|
100
|
+
#ifdef MORPHTARGETS_NORMAL
|
|
101
|
+
attribute normal{X} : vec3<f32>;
|
|
102
|
+
#endif
|
|
103
|
+
#ifdef MORPHTARGETS_TANGENT
|
|
104
|
+
attribute tangent{X} : vec3<f32>;
|
|
105
|
+
#endif
|
|
106
|
+
#ifdef MORPHTARGETS_UV
|
|
107
|
+
attribute uv_{X} : vec2<f32>;
|
|
108
|
+
#endif
|
|
109
|
+
#ifdef MORPHTARGETS_UV2
|
|
110
|
+
attribute uv2_{X} : vec2<f32>;
|
|
111
|
+
#endif
|
|
112
|
+
#ifdef MORPHTARGETS_COLOR
|
|
113
|
+
attribute color{X} : vec4<f32>;
|
|
114
|
+
#endif
|
|
115
|
+
#elif {X}==0
|
|
116
|
+
uniform morphTargetCount: f32;
|
|
117
|
+
#endif
|
|
118
|
+
#endif
|
|
119
|
+
`;
|
|
120
|
+
e.IncludesShadersStoreWGSL[f] || (e.IncludesShadersStoreWGSL[f] = T);
|
|
121
|
+
const d = "morphTargetsVertexGlobal", v = `#ifdef MORPHTARGETS
|
|
122
|
+
#ifdef MORPHTARGETS_TEXTURE
|
|
123
|
+
var vertexID : f32;
|
|
124
|
+
#endif
|
|
125
|
+
#endif
|
|
126
|
+
`;
|
|
127
|
+
e.IncludesShadersStoreWGSL[d] || (e.IncludesShadersStoreWGSL[d] = v);
|
|
128
|
+
const s = "morphTargetsVertex", S = `#ifdef MORPHTARGETS
|
|
129
|
+
#ifdef MORPHTARGETS_TEXTURE
|
|
130
|
+
#if {X}==0
|
|
131
|
+
for (var i=0; i<NUM_MORPH_INFLUENCERS; i=i+1) {if (f32(i)>=uniforms.morphTargetCount) {break;}
|
|
132
|
+
#ifdef USE_VERTEX_PULLING
|
|
133
|
+
vertexID=f32(vpVertexIndex)*uniforms.morphTargetTextureInfo.x;
|
|
134
|
+
#else
|
|
135
|
+
vertexID=f32(vertexInputs.vertexIndex)*uniforms.morphTargetTextureInfo.x;
|
|
136
|
+
#endif
|
|
137
|
+
#ifdef MORPHTARGETS_POSITION
|
|
138
|
+
#ifdef USE_VERTEX_PULLING
|
|
139
|
+
positionUpdated=positionUpdated+(readVector3FromRawSampler(i,vertexID)-vp_basePosition)*uniforms.morphTargetInfluences[i];
|
|
140
|
+
#else
|
|
141
|
+
positionUpdated=positionUpdated+(readVector3FromRawSampler(i,vertexID)-vertexInputs.position)*uniforms.morphTargetInfluences[i];
|
|
142
|
+
#endif
|
|
143
|
+
#endif
|
|
144
|
+
#ifdef MORPHTARGETTEXTURE_HASPOSITIONS
|
|
145
|
+
vertexID=vertexID+1.0;
|
|
146
|
+
#endif
|
|
147
|
+
#ifdef MORPHTARGETS_NORMAL
|
|
148
|
+
#ifdef USE_VERTEX_PULLING
|
|
149
|
+
normalUpdated=normalUpdated+(readVector3FromRawSampler(i,vertexID) -vp_baseNormal)*uniforms.morphTargetInfluences[i];
|
|
150
|
+
#else
|
|
151
|
+
normalUpdated=normalUpdated+(readVector3FromRawSampler(i,vertexID) -vertexInputs.normal)*uniforms.morphTargetInfluences[i];
|
|
152
|
+
#endif
|
|
153
|
+
#endif
|
|
154
|
+
#ifdef MORPHTARGETTEXTURE_HASNORMALS
|
|
155
|
+
vertexID=vertexID+1.0;
|
|
156
|
+
#endif
|
|
157
|
+
#ifdef MORPHTARGETS_UV
|
|
158
|
+
#ifdef USE_VERTEX_PULLING
|
|
159
|
+
uvUpdated=uvUpdated+(readVector3FromRawSampler(i,vertexID).xy-vp_baseUV)*uniforms.morphTargetInfluences[i];
|
|
160
|
+
#else
|
|
161
|
+
uvUpdated=uvUpdated+(readVector3FromRawSampler(i,vertexID).xy-vertexInputs.uv)*uniforms.morphTargetInfluences[i];
|
|
162
|
+
#endif
|
|
163
|
+
#endif
|
|
164
|
+
#ifdef MORPHTARGETTEXTURE_HASUVS
|
|
165
|
+
vertexID=vertexID+1.0;
|
|
166
|
+
#endif
|
|
167
|
+
#ifdef MORPHTARGETS_TANGENT
|
|
168
|
+
#ifdef USE_VERTEX_PULLING
|
|
169
|
+
tangentUpdated=vec4f(tangentUpdated.xyz+(readVector3FromRawSampler(i,vertexID) -vp_baseTangent.xyz)*uniforms.morphTargetInfluences[i],tangentUpdated.a);
|
|
170
|
+
#else
|
|
171
|
+
tangentUpdated=vec4f(tangentUpdated.xyz+(readVector3FromRawSampler(i,vertexID) -vertexInputs.tangent.xyz)*uniforms.morphTargetInfluences[i],tangentUpdated.a);
|
|
172
|
+
#endif
|
|
173
|
+
#endif
|
|
174
|
+
#ifdef MORPHTARGETTEXTURE_HASTANGENTS
|
|
175
|
+
vertexID=vertexID+1.0;
|
|
176
|
+
#endif
|
|
177
|
+
#ifdef MORPHTARGETS_UV2
|
|
178
|
+
#ifdef USE_VERTEX_PULLING
|
|
179
|
+
uv2Updated=uv2Updated+(readVector3FromRawSampler(i,vertexID).xy-vp_baseUV2)*uniforms.morphTargetInfluences[i];
|
|
180
|
+
#else
|
|
181
|
+
uv2Updated=uv2Updated+(readVector3FromRawSampler(i,vertexID).xy-vertexInputs.uv2)*uniforms.morphTargetInfluences[i];
|
|
182
|
+
#endif
|
|
183
|
+
#endif
|
|
184
|
+
#ifdef MORPHTARGETS_COLOR
|
|
185
|
+
#ifdef USE_VERTEX_PULLING
|
|
186
|
+
colorUpdated=colorUpdated+(readVector4FromRawSampler(i,vertexID)-vp_baseColor)*uniforms.morphTargetInfluences[i];
|
|
187
|
+
#else
|
|
188
|
+
colorUpdated=colorUpdated+(readVector4FromRawSampler(i,vertexID)-vertexInputs.color)*uniforms.morphTargetInfluences[i];
|
|
189
|
+
#endif
|
|
190
|
+
#endif
|
|
191
|
+
}
|
|
192
|
+
#endif
|
|
193
|
+
#else
|
|
194
|
+
#ifdef MORPHTARGETS_POSITION
|
|
195
|
+
#ifdef USE_VERTEX_PULLING
|
|
196
|
+
positionUpdated=positionUpdated+(vertexInputs.position{X}-vp_basePosition)*uniforms.morphTargetInfluences[{X}];
|
|
197
|
+
#else
|
|
198
|
+
positionUpdated=positionUpdated+(vertexInputs.position{X}-vertexInputs.position)*uniforms.morphTargetInfluences[{X}];
|
|
199
|
+
#endif
|
|
200
|
+
#endif
|
|
201
|
+
#ifdef MORPHTARGETS_NORMAL
|
|
202
|
+
#ifdef USE_VERTEX_PULLING
|
|
203
|
+
normalUpdated=normalUpdated+(vertexInputs.normal{X}-vp_baseNormal)*uniforms.morphTargetInfluences[{X}];
|
|
204
|
+
#else
|
|
205
|
+
normalUpdated=normalUpdated+(vertexInputs.normal{X}-vertexInputs.normal)*uniforms.morphTargetInfluences[{X}];
|
|
206
|
+
#endif
|
|
207
|
+
#endif
|
|
208
|
+
#ifdef MORPHTARGETS_TANGENT
|
|
209
|
+
#ifdef USE_VERTEX_PULLING
|
|
210
|
+
tangentUpdated=vec4f(tangentUpdated.xyz+(vertexInputs.tangent{X}-vp_baseTangent.xyz)*uniforms.morphTargetInfluences[{X}],tangentUpdated.a);
|
|
211
|
+
#else
|
|
212
|
+
tangentUpdated=vec4f(tangentUpdated.xyz+(vertexInputs.tangent{X}-vertexInputs.tangent.xyz)*uniforms.morphTargetInfluences[{X}],tangentUpdated.a);
|
|
213
|
+
#endif
|
|
214
|
+
#endif
|
|
215
|
+
#ifdef MORPHTARGETS_UV
|
|
216
|
+
#ifdef USE_VERTEX_PULLING
|
|
217
|
+
uvUpdated=uvUpdated+(vertexInputs.uv_{X}-vp_baseUV)*uniforms.morphTargetInfluences[{X}];
|
|
218
|
+
#else
|
|
219
|
+
uvUpdated=uvUpdated+(vertexInputs.uv_{X}-vertexInputs.uv)*uniforms.morphTargetInfluences[{X}];
|
|
220
|
+
#endif
|
|
221
|
+
#endif
|
|
222
|
+
#ifdef MORPHTARGETS_UV2
|
|
223
|
+
#ifdef USE_VERTEX_PULLING
|
|
224
|
+
uv2Updated=uv2Updated+(vertexInputs.uv2_{X}-vp_baseUV2)*uniforms.morphTargetInfluences[{X}];
|
|
225
|
+
#else
|
|
226
|
+
uv2Updated=uv2Updated+(vertexInputs.uv2_{X}-vertexInputs.uv2)*uniforms.morphTargetInfluences[{X}];
|
|
227
|
+
#endif
|
|
228
|
+
#endif
|
|
229
|
+
#ifdef MORPHTARGETS_COLOR
|
|
230
|
+
#ifdef USE_VERTEX_PULLING
|
|
231
|
+
colorUpdated=colorUpdated+(vertexInputs.color{X}-vp_baseColor)*uniforms.morphTargetInfluences[{X}];
|
|
232
|
+
#else
|
|
233
|
+
colorUpdated=colorUpdated+(vertexInputs.color{X}-vertexInputs.color)*uniforms.morphTargetInfluences[{X}];
|
|
234
|
+
#endif
|
|
235
|
+
#endif
|
|
236
|
+
#endif
|
|
237
|
+
#endif
|
|
238
|
+
`;
|
|
239
|
+
e.IncludesShadersStoreWGSL[s] || (e.IncludesShadersStoreWGSL[s] = S);
|
|
240
|
+
const o = "instancesVertex", N = `#ifdef INSTANCES
|
|
241
|
+
var finalWorld=mat4x4<f32>(vertexInputs.world0,vertexInputs.world1,vertexInputs.world2,vertexInputs.world3);
|
|
242
|
+
#if defined(PREPASS_VELOCITY) || defined(VELOCITY) || defined(PREPASS_VELOCITY_LINEAR) || defined(VELOCITY_LINEAR)
|
|
243
|
+
var finalPreviousWorld=mat4x4<f32>(
|
|
244
|
+
vertexInputs.previousWorld0,vertexInputs.previousWorld1,
|
|
245
|
+
vertexInputs.previousWorld2,vertexInputs.previousWorld3);
|
|
246
|
+
#endif
|
|
247
|
+
#ifdef THIN_INSTANCES
|
|
248
|
+
#if !defined(WORLD_UBO)
|
|
249
|
+
finalWorld=uniforms.world*finalWorld;
|
|
250
|
+
#else
|
|
251
|
+
finalWorld=mesh.world*finalWorld;
|
|
252
|
+
#endif
|
|
253
|
+
#if defined(PREPASS_VELOCITY) || defined(VELOCITY) || defined(PREPASS_VELOCITY_LINEAR) || defined(VELOCITY_LINEAR)
|
|
254
|
+
finalPreviousWorld=uniforms.previousWorld*finalPreviousWorld;
|
|
255
|
+
#endif
|
|
256
|
+
#endif
|
|
257
|
+
#else
|
|
258
|
+
#if !defined(WORLD_UBO)
|
|
259
|
+
var finalWorld=uniforms.world;
|
|
260
|
+
#else
|
|
261
|
+
var finalWorld=mesh.world;
|
|
262
|
+
#endif
|
|
263
|
+
#if defined(PREPASS_VELOCITY) || defined(VELOCITY) || defined(PREPASS_VELOCITY_LINEAR) || defined(VELOCITY_LINEAR)
|
|
264
|
+
var finalPreviousWorld=uniforms.previousWorld;
|
|
265
|
+
#endif
|
|
266
|
+
#endif
|
|
267
|
+
`;
|
|
268
|
+
e.IncludesShadersStoreWGSL[o] || (e.IncludesShadersStoreWGSL[o] = N);
|
|
269
|
+
const m = "bonesVertex", R = `#ifndef BAKED_VERTEX_ANIMATION_TEXTURE
|
|
270
|
+
#if NUM_BONE_INFLUENCERS>0
|
|
271
|
+
var influence : mat4x4<f32>;
|
|
272
|
+
#ifdef BONETEXTURE
|
|
273
|
+
influence=readMatrixFromRawSampler(boneSampler,vertexInputs.matricesIndices[0])*vertexInputs.matricesWeights[0];
|
|
274
|
+
#if NUM_BONE_INFLUENCERS>1
|
|
275
|
+
influence=influence+readMatrixFromRawSampler(boneSampler,vertexInputs.matricesIndices[1])*vertexInputs.matricesWeights[1];
|
|
276
|
+
#endif
|
|
277
|
+
#if NUM_BONE_INFLUENCERS>2
|
|
278
|
+
influence=influence+readMatrixFromRawSampler(boneSampler,vertexInputs.matricesIndices[2])*vertexInputs.matricesWeights[2];
|
|
279
|
+
#endif
|
|
280
|
+
#if NUM_BONE_INFLUENCERS>3
|
|
281
|
+
influence=influence+readMatrixFromRawSampler(boneSampler,vertexInputs.matricesIndices[3])*vertexInputs.matricesWeights[3];
|
|
282
|
+
#endif
|
|
283
|
+
#if NUM_BONE_INFLUENCERS>4
|
|
284
|
+
influence=influence+readMatrixFromRawSampler(boneSampler,vertexInputs.matricesIndicesExtra[0])*vertexInputs.matricesWeightsExtra[0];
|
|
285
|
+
#endif
|
|
286
|
+
#if NUM_BONE_INFLUENCERS>5
|
|
287
|
+
influence=influence+readMatrixFromRawSampler(boneSampler,vertexInputs.matricesIndicesExtra[1])*vertexInputs.matricesWeightsExtra[1];
|
|
288
|
+
#endif
|
|
289
|
+
#if NUM_BONE_INFLUENCERS>6
|
|
290
|
+
influence=influence+readMatrixFromRawSampler(boneSampler,vertexInputs.matricesIndicesExtra[2])*vertexInputs.matricesWeightsExtra[2];
|
|
291
|
+
#endif
|
|
292
|
+
#if NUM_BONE_INFLUENCERS>7
|
|
293
|
+
influence=influence+readMatrixFromRawSampler(boneSampler,vertexInputs.matricesIndicesExtra[3])*vertexInputs.matricesWeightsExtra[3];
|
|
294
|
+
#endif
|
|
295
|
+
#else
|
|
296
|
+
influence=uniforms.mBones[i32(vertexInputs.matricesIndices[0])]*vertexInputs.matricesWeights[0];
|
|
297
|
+
#if NUM_BONE_INFLUENCERS>1
|
|
298
|
+
influence=influence+uniforms.mBones[i32(vertexInputs.matricesIndices[1])]*vertexInputs.matricesWeights[1];
|
|
299
|
+
#endif
|
|
300
|
+
#if NUM_BONE_INFLUENCERS>2
|
|
301
|
+
influence=influence+uniforms.mBones[i32(vertexInputs.matricesIndices[2])]*vertexInputs.matricesWeights[2];
|
|
302
|
+
#endif
|
|
303
|
+
#if NUM_BONE_INFLUENCERS>3
|
|
304
|
+
influence=influence+uniforms.mBones[i32(vertexInputs.matricesIndices[3])]*vertexInputs.matricesWeights[3];
|
|
305
|
+
#endif
|
|
306
|
+
#if NUM_BONE_INFLUENCERS>4
|
|
307
|
+
influence=influence+uniforms.mBones[i32(vertexInputs.matricesIndicesExtra[0])]*vertexInputs.matricesWeightsExtra[0];
|
|
308
|
+
#endif
|
|
309
|
+
#if NUM_BONE_INFLUENCERS>5
|
|
310
|
+
influence=influence+uniforms.mBones[i32(vertexInputs.matricesIndicesExtra[1])]*vertexInputs.matricesWeightsExtra[1];
|
|
311
|
+
#endif
|
|
312
|
+
#if NUM_BONE_INFLUENCERS>6
|
|
313
|
+
influence=influence+uniforms.mBones[i32(vertexInputs.matricesIndicesExtra[2])]*vertexInputs.matricesWeightsExtra[2];
|
|
314
|
+
#endif
|
|
315
|
+
#if NUM_BONE_INFLUENCERS>7
|
|
316
|
+
influence=influence+uniforms.mBones[i32(vertexInputs.matricesIndicesExtra[3])]*vertexInputs.matricesWeightsExtra[3];
|
|
317
|
+
#endif
|
|
318
|
+
#endif
|
|
319
|
+
finalWorld=finalWorld*influence;
|
|
320
|
+
#endif
|
|
321
|
+
#endif
|
|
322
|
+
`;
|
|
323
|
+
e.IncludesShadersStoreWGSL[m] || (e.IncludesShadersStoreWGSL[m] = R);
|
|
324
|
+
const u = "bakedVertexAnimation", _ = `#ifdef BAKED_VERTEX_ANIMATION_TEXTURE
|
|
325
|
+
{
|
|
326
|
+
#ifdef INSTANCES
|
|
327
|
+
let VATStartFrame: f32=vertexInputs.bakedVertexAnimationSettingsInstanced.x;let VATEndFrame: f32=vertexInputs.bakedVertexAnimationSettingsInstanced.y;let VATOffsetFrame: f32=vertexInputs.bakedVertexAnimationSettingsInstanced.z;let VATSpeed: f32=vertexInputs.bakedVertexAnimationSettingsInstanced.w;
|
|
328
|
+
#else
|
|
329
|
+
let VATStartFrame: f32=uniforms.bakedVertexAnimationSettings.x;let VATEndFrame: f32=uniforms.bakedVertexAnimationSettings.y;let VATOffsetFrame: f32=uniforms.bakedVertexAnimationSettings.z;let VATSpeed: f32=uniforms.bakedVertexAnimationSettings.w;
|
|
330
|
+
#endif
|
|
331
|
+
let totalFrames: f32=VATEndFrame-VATStartFrame+1.0;let time: f32=uniforms.bakedVertexAnimationTime*VATSpeed/totalFrames;let frameCorrection: f32=select(1.0,0.0,time<1.0);let numOfFrames: f32=totalFrames-frameCorrection;var VATFrameNum: f32=fract(time)*numOfFrames;VATFrameNum=(VATFrameNum+VATOffsetFrame) % numOfFrames;VATFrameNum=floor(VATFrameNum);VATFrameNum=VATFrameNum+VATStartFrame+frameCorrection;var VATInfluence : mat4x4<f32>;VATInfluence=readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,vertexInputs.matricesIndices[0],VATFrameNum)*vertexInputs.matricesWeights[0];
|
|
332
|
+
#if NUM_BONE_INFLUENCERS>1
|
|
333
|
+
VATInfluence=VATInfluence+readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,vertexInputs.matricesIndices[1],VATFrameNum)*vertexInputs.matricesWeights[1];
|
|
334
|
+
#endif
|
|
335
|
+
#if NUM_BONE_INFLUENCERS>2
|
|
336
|
+
VATInfluence=VATInfluence+readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,vertexInputs.matricesIndices[2],VATFrameNum)*vertexInputs.matricesWeights[2];
|
|
337
|
+
#endif
|
|
338
|
+
#if NUM_BONE_INFLUENCERS>3
|
|
339
|
+
VATInfluence=VATInfluence+readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,vertexInputs.matricesIndices[3],VATFrameNum)*vertexInputs.matricesWeights[3];
|
|
340
|
+
#endif
|
|
341
|
+
#if NUM_BONE_INFLUENCERS>4
|
|
342
|
+
VATInfluence=VATInfluence+readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,vertexInputs.matricesIndicesExtra[0],VATFrameNum)*vertexInputs.matricesWeightsExtra[0];
|
|
343
|
+
#endif
|
|
344
|
+
#if NUM_BONE_INFLUENCERS>5
|
|
345
|
+
VATInfluence=VATInfluence+readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,vertexInputs.matricesIndicesExtra[1],VATFrameNum)*vertexInputs.matricesWeightsExtra[1];
|
|
346
|
+
#endif
|
|
347
|
+
#if NUM_BONE_INFLUENCERS>6
|
|
348
|
+
VATInfluence=VATInfluence+readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,vertexInputs.matricesIndicesExtra[2],VATFrameNum)*vertexInputs.matricesWeightsExtra[2];
|
|
349
|
+
#endif
|
|
350
|
+
#if NUM_BONE_INFLUENCERS>7
|
|
351
|
+
VATInfluence=VATInfluence+readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,vertexInputs.matricesIndicesExtra[3],VATFrameNum)*vertexInputs.matricesWeightsExtra[3];
|
|
352
|
+
#endif
|
|
353
|
+
finalWorld=finalWorld*VATInfluence;}
|
|
354
|
+
#endif
|
|
355
|
+
`;
|
|
356
|
+
e.IncludesShadersStoreWGSL[u] || (e.IncludesShadersStoreWGSL[u] = _);
|
|
357
|
+
const l = "clipPlaneVertex", A = `#ifdef CLIPPLANE
|
|
358
|
+
vertexOutputs.fClipDistance=dot(worldPos,uniforms.vClipPlane);
|
|
359
|
+
#endif
|
|
360
|
+
#ifdef CLIPPLANE2
|
|
361
|
+
vertexOutputs.fClipDistance2=dot(worldPos,uniforms.vClipPlane2);
|
|
362
|
+
#endif
|
|
363
|
+
#ifdef CLIPPLANE3
|
|
364
|
+
vertexOutputs.fClipDistance3=dot(worldPos,uniforms.vClipPlane3);
|
|
365
|
+
#endif
|
|
366
|
+
#ifdef CLIPPLANE4
|
|
367
|
+
vertexOutputs.fClipDistance4=dot(worldPos,uniforms.vClipPlane4);
|
|
368
|
+
#endif
|
|
369
|
+
#ifdef CLIPPLANE5
|
|
370
|
+
vertexOutputs.fClipDistance5=dot(worldPos,uniforms.vClipPlane5);
|
|
371
|
+
#endif
|
|
372
|
+
#ifdef CLIPPLANE6
|
|
373
|
+
vertexOutputs.fClipDistance6=dot(worldPos,uniforms.vClipPlane6);
|
|
374
|
+
#endif
|
|
375
|
+
`;
|
|
376
|
+
e.IncludesShadersStoreWGSL[l] || (e.IncludesShadersStoreWGSL[l] = A);
|