@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,350 @@
|
|
|
1
|
+
import { b0 as e } from "./index-CS3Icp_r.js";
|
|
2
|
+
const t = "bonesDeclaration", E = `#if NUM_BONE_INFLUENCERS>0
|
|
3
|
+
attribute vec4 matricesIndices;attribute vec4 matricesWeights;
|
|
4
|
+
#if NUM_BONE_INFLUENCERS>4
|
|
5
|
+
attribute vec4 matricesIndicesExtra;attribute vec4 matricesWeightsExtra;
|
|
6
|
+
#endif
|
|
7
|
+
#ifndef BAKED_VERTEX_ANIMATION_TEXTURE
|
|
8
|
+
#ifdef BONETEXTURE
|
|
9
|
+
uniform highp sampler2D boneSampler;uniform vec2 boneTextureInfo;
|
|
10
|
+
#else
|
|
11
|
+
uniform mat4 mBones[BonesPerMesh];
|
|
12
|
+
#endif
|
|
13
|
+
#ifdef BONES_VELOCITY_ENABLED
|
|
14
|
+
uniform mat4 mPreviousBones[BonesPerMesh];
|
|
15
|
+
#endif
|
|
16
|
+
#ifdef BONETEXTURE
|
|
17
|
+
#define inline
|
|
18
|
+
mat4 readMatrixFromRawSampler(sampler2D smp,float index)
|
|
19
|
+
{
|
|
20
|
+
#if defined(WEBGL2) || defined(WEBGPU)
|
|
21
|
+
int offset=int(index)*4;
|
|
22
|
+
int textureWidth=int(boneTextureInfo.x);int y=int(offset)/textureWidth;int x=int(offset) % textureWidth;vec4 m0=texelFetch(smp,ivec2(x+0,y),0);vec4 m1=texelFetch(smp,ivec2(x+1,y),0);vec4 m2=texelFetch(smp,ivec2(x+2,y),0);vec4 m3=texelFetch(smp,ivec2(x+3,y),0);return mat4(m0,m1,m2,m3);
|
|
23
|
+
#else
|
|
24
|
+
float offset=index*4.0;float y=floor(offset/boneTextureInfo.x);float x=offset-y*boneTextureInfo.x;float dy=1.0/boneTextureInfo.y;float dx=1.0/boneTextureInfo.x;vec4 m0=texture2D(smp,vec2(dx*(x+0.5),dy*(y+0.5)));vec4 m1=texture2D(smp,vec2(dx*(x+1.5),dy*(y+0.5)));vec4 m2=texture2D(smp,vec2(dx*(x+2.5),dy*(y+0.5)));vec4 m3=texture2D(smp,vec2(dx*(x+3.5),dy*(y+0.5)));
|
|
25
|
+
return mat4(m0,m1,m2,m3);
|
|
26
|
+
#endif
|
|
27
|
+
}
|
|
28
|
+
#endif
|
|
29
|
+
#endif
|
|
30
|
+
#endif
|
|
31
|
+
`;
|
|
32
|
+
e.IncludesShadersStore[t] || (e.IncludesShadersStore[t] = E);
|
|
33
|
+
const r = "bakedVertexAnimationDeclaration", I = `#ifdef BAKED_VERTEX_ANIMATION_TEXTURE
|
|
34
|
+
uniform float bakedVertexAnimationTime;
|
|
35
|
+
#if !defined(WEBGL2) && !defined(WEBGPU)
|
|
36
|
+
uniform vec2 bakedVertexAnimationTextureSizeInverted;
|
|
37
|
+
#endif
|
|
38
|
+
uniform vec4 bakedVertexAnimationSettings;uniform sampler2D bakedVertexAnimationTexture;
|
|
39
|
+
#ifdef INSTANCES
|
|
40
|
+
attribute vec4 bakedVertexAnimationSettingsInstanced;
|
|
41
|
+
#endif
|
|
42
|
+
#define inline
|
|
43
|
+
mat4 readMatrixFromRawSamplerVAT(sampler2D smp,float index,float frame)
|
|
44
|
+
{
|
|
45
|
+
#if defined(WEBGL2) || defined(WEBGPU)
|
|
46
|
+
int offset=int(index)*4;int frameUV=int(frame);vec4 m0=texelFetch(smp,ivec2(offset+0,frameUV),0);vec4 m1=texelFetch(smp,ivec2(offset+1,frameUV),0);vec4 m2=texelFetch(smp,ivec2(offset+2,frameUV),0);vec4 m3=texelFetch(smp,ivec2(offset+3,frameUV),0);return mat4(m0,m1,m2,m3);
|
|
47
|
+
#else
|
|
48
|
+
float offset=index*4.0;float frameUV=(frame+0.5)*bakedVertexAnimationTextureSizeInverted.y;float dx=bakedVertexAnimationTextureSizeInverted.x;vec4 m0=texture2D(smp,vec2(dx*(offset+0.5),frameUV));vec4 m1=texture2D(smp,vec2(dx*(offset+1.5),frameUV));vec4 m2=texture2D(smp,vec2(dx*(offset+2.5),frameUV));vec4 m3=texture2D(smp,vec2(dx*(offset+3.5),frameUV));return mat4(m0,m1,m2,m3);
|
|
49
|
+
#endif
|
|
50
|
+
}
|
|
51
|
+
#endif
|
|
52
|
+
`;
|
|
53
|
+
e.IncludesShadersStore[r] || (e.IncludesShadersStore[r] = I);
|
|
54
|
+
const i = "instancesDeclaration", x = `#ifdef INSTANCES
|
|
55
|
+
attribute vec4 world0;attribute vec4 world1;attribute vec4 world2;attribute vec4 world3;
|
|
56
|
+
#ifdef INSTANCESCOLOR
|
|
57
|
+
attribute vec4 instanceColor;
|
|
58
|
+
#endif
|
|
59
|
+
#if defined(THIN_INSTANCES) && !defined(WORLD_UBO)
|
|
60
|
+
uniform mat4 world;
|
|
61
|
+
#endif
|
|
62
|
+
#if defined(VELOCITY) || defined(PREPASS_VELOCITY) || defined(PREPASS_VELOCITY_LINEAR) || defined(VELOCITY_LINEAR)
|
|
63
|
+
attribute vec4 previousWorld0;attribute vec4 previousWorld1;attribute vec4 previousWorld2;attribute vec4 previousWorld3;
|
|
64
|
+
#ifdef THIN_INSTANCES
|
|
65
|
+
uniform mat4 previousWorld;
|
|
66
|
+
#endif
|
|
67
|
+
#endif
|
|
68
|
+
#else
|
|
69
|
+
#if !defined(WORLD_UBO)
|
|
70
|
+
uniform mat4 world;
|
|
71
|
+
#endif
|
|
72
|
+
#if defined(VELOCITY) || defined(PREPASS_VELOCITY) || defined(PREPASS_VELOCITY_LINEAR) || defined(VELOCITY_LINEAR)
|
|
73
|
+
uniform mat4 previousWorld;
|
|
74
|
+
#endif
|
|
75
|
+
#endif
|
|
76
|
+
`;
|
|
77
|
+
e.IncludesShadersStore[i] || (e.IncludesShadersStore[i] = x);
|
|
78
|
+
const n = "clipPlaneVertexDeclaration", u = `#ifdef CLIPPLANE
|
|
79
|
+
uniform vec4 vClipPlane;varying float fClipDistance;
|
|
80
|
+
#endif
|
|
81
|
+
#ifdef CLIPPLANE2
|
|
82
|
+
uniform vec4 vClipPlane2;varying float fClipDistance2;
|
|
83
|
+
#endif
|
|
84
|
+
#ifdef CLIPPLANE3
|
|
85
|
+
uniform vec4 vClipPlane3;varying float fClipDistance3;
|
|
86
|
+
#endif
|
|
87
|
+
#ifdef CLIPPLANE4
|
|
88
|
+
uniform vec4 vClipPlane4;varying float fClipDistance4;
|
|
89
|
+
#endif
|
|
90
|
+
#ifdef CLIPPLANE5
|
|
91
|
+
uniform vec4 vClipPlane5;varying float fClipDistance5;
|
|
92
|
+
#endif
|
|
93
|
+
#ifdef CLIPPLANE6
|
|
94
|
+
uniform vec4 vClipPlane6;varying float fClipDistance6;
|
|
95
|
+
#endif
|
|
96
|
+
`;
|
|
97
|
+
e.IncludesShadersStore[n] || (e.IncludesShadersStore[n] = u);
|
|
98
|
+
const a = "morphTargetsVertexGlobalDeclaration", S = `#ifdef MORPHTARGETS
|
|
99
|
+
uniform float morphTargetInfluences[NUM_MORPH_INFLUENCERS];
|
|
100
|
+
#ifdef MORPHTARGETS_TEXTURE
|
|
101
|
+
uniform float morphTargetTextureIndices[NUM_MORPH_INFLUENCERS];uniform vec3 morphTargetTextureInfo;uniform highp sampler2DArray morphTargets;vec3 readVector3FromRawSampler(int targetIndex,float vertexIndex)
|
|
102
|
+
{
|
|
103
|
+
#if defined(WEBGL2) || defined(WEBGPU)
|
|
104
|
+
int textureWidth=int(morphTargetTextureInfo.y);int y=int(vertexIndex)/textureWidth;int x=int(vertexIndex) % textureWidth;return texelFetch(morphTargets,ivec3(x,y,int(morphTargetTextureIndices[targetIndex])),0).xyz;
|
|
105
|
+
#else
|
|
106
|
+
float y=floor(vertexIndex/morphTargetTextureInfo.y);float x=vertexIndex-y*morphTargetTextureInfo.y;vec3 textureUV=vec3((x+0.5)/morphTargetTextureInfo.y,(y+0.5)/morphTargetTextureInfo.z,morphTargetTextureIndices[targetIndex]);return texture(morphTargets,textureUV).xyz;
|
|
107
|
+
#endif
|
|
108
|
+
}
|
|
109
|
+
vec4 readVector4FromRawSampler(int targetIndex,float vertexIndex)
|
|
110
|
+
{
|
|
111
|
+
#if defined(WEBGL2) || defined(WEBGPU)
|
|
112
|
+
int textureWidth=int(morphTargetTextureInfo.y);int y=int(vertexIndex)/textureWidth;int x=int(vertexIndex) % textureWidth;return texelFetch(morphTargets,ivec3(x,y,int(morphTargetTextureIndices[targetIndex])),0);
|
|
113
|
+
#else
|
|
114
|
+
float y=floor(vertexIndex/morphTargetTextureInfo.y);float x=vertexIndex-y*morphTargetTextureInfo.y;vec3 textureUV=vec3((x+0.5)/morphTargetTextureInfo.y,(y+0.5)/morphTargetTextureInfo.z,morphTargetTextureIndices[targetIndex]);return texture(morphTargets,textureUV);
|
|
115
|
+
#endif
|
|
116
|
+
}
|
|
117
|
+
#endif
|
|
118
|
+
#endif
|
|
119
|
+
`;
|
|
120
|
+
e.IncludesShadersStore[a] || (e.IncludesShadersStore[a] = S);
|
|
121
|
+
const f = "morphTargetsVertexDeclaration", N = `#ifdef MORPHTARGETS
|
|
122
|
+
#ifndef MORPHTARGETS_TEXTURE
|
|
123
|
+
#ifdef MORPHTARGETS_POSITION
|
|
124
|
+
attribute vec3 position{X};
|
|
125
|
+
#endif
|
|
126
|
+
#ifdef MORPHTARGETS_NORMAL
|
|
127
|
+
attribute vec3 normal{X};
|
|
128
|
+
#endif
|
|
129
|
+
#ifdef MORPHTARGETS_TANGENT
|
|
130
|
+
attribute vec3 tangent{X};
|
|
131
|
+
#endif
|
|
132
|
+
#ifdef MORPHTARGETS_UV
|
|
133
|
+
attribute vec2 uv_{X};
|
|
134
|
+
#endif
|
|
135
|
+
#ifdef MORPHTARGETS_UV2
|
|
136
|
+
attribute vec2 uv2_{X};
|
|
137
|
+
#endif
|
|
138
|
+
#ifdef MORPHTARGETS_COLOR
|
|
139
|
+
attribute vec4 color{X};
|
|
140
|
+
#endif
|
|
141
|
+
#elif {X}==0
|
|
142
|
+
uniform float morphTargetCount;
|
|
143
|
+
#endif
|
|
144
|
+
#endif
|
|
145
|
+
`;
|
|
146
|
+
e.IncludesShadersStore[f] || (e.IncludesShadersStore[f] = N);
|
|
147
|
+
const d = "morphTargetsVertexGlobal", A = `#ifdef MORPHTARGETS
|
|
148
|
+
#ifdef MORPHTARGETS_TEXTURE
|
|
149
|
+
float vertexID;
|
|
150
|
+
#endif
|
|
151
|
+
#endif
|
|
152
|
+
`;
|
|
153
|
+
e.IncludesShadersStore[d] || (e.IncludesShadersStore[d] = A);
|
|
154
|
+
const o = "morphTargetsVertex", R = `#ifdef MORPHTARGETS
|
|
155
|
+
#ifdef MORPHTARGETS_TEXTURE
|
|
156
|
+
#if {X}==0
|
|
157
|
+
for (int i=0; i<NUM_MORPH_INFLUENCERS; i++) {if (float(i)>=morphTargetCount) break;vertexID=float(gl_VertexID)*morphTargetTextureInfo.x;
|
|
158
|
+
#ifdef MORPHTARGETS_POSITION
|
|
159
|
+
positionUpdated+=(readVector3FromRawSampler(i,vertexID)-position)*morphTargetInfluences[i];
|
|
160
|
+
#endif
|
|
161
|
+
#ifdef MORPHTARGETTEXTURE_HASPOSITIONS
|
|
162
|
+
vertexID+=1.0;
|
|
163
|
+
#endif
|
|
164
|
+
#ifdef MORPHTARGETS_NORMAL
|
|
165
|
+
normalUpdated+=(readVector3FromRawSampler(i,vertexID) -normal)*morphTargetInfluences[i];
|
|
166
|
+
#endif
|
|
167
|
+
#ifdef MORPHTARGETTEXTURE_HASNORMALS
|
|
168
|
+
vertexID+=1.0;
|
|
169
|
+
#endif
|
|
170
|
+
#ifdef MORPHTARGETS_UV
|
|
171
|
+
uvUpdated+=(readVector3FromRawSampler(i,vertexID).xy-uv)*morphTargetInfluences[i];
|
|
172
|
+
#endif
|
|
173
|
+
#ifdef MORPHTARGETTEXTURE_HASUVS
|
|
174
|
+
vertexID+=1.0;
|
|
175
|
+
#endif
|
|
176
|
+
#ifdef MORPHTARGETS_TANGENT
|
|
177
|
+
tangentUpdated.xyz+=(readVector3FromRawSampler(i,vertexID) -tangent.xyz)*morphTargetInfluences[i];
|
|
178
|
+
#endif
|
|
179
|
+
#ifdef MORPHTARGETTEXTURE_HASTANGENTS
|
|
180
|
+
vertexID+=1.0;
|
|
181
|
+
#endif
|
|
182
|
+
#ifdef MORPHTARGETS_UV2
|
|
183
|
+
uv2Updated+=(readVector3FromRawSampler(i,vertexID).xy-uv2)*morphTargetInfluences[i];
|
|
184
|
+
#endif
|
|
185
|
+
#ifdef MORPHTARGETTEXTURE_HASUV2S
|
|
186
|
+
vertexID+=1.0;
|
|
187
|
+
#endif
|
|
188
|
+
#ifdef MORPHTARGETS_COLOR
|
|
189
|
+
colorUpdated+=(readVector4FromRawSampler(i,vertexID)-color)*morphTargetInfluences[i];
|
|
190
|
+
#endif
|
|
191
|
+
}
|
|
192
|
+
#endif
|
|
193
|
+
#else
|
|
194
|
+
#ifdef MORPHTARGETS_POSITION
|
|
195
|
+
positionUpdated+=(position{X}-position)*morphTargetInfluences[{X}];
|
|
196
|
+
#endif
|
|
197
|
+
#ifdef MORPHTARGETS_NORMAL
|
|
198
|
+
normalUpdated+=(normal{X}-normal)*morphTargetInfluences[{X}];
|
|
199
|
+
#endif
|
|
200
|
+
#ifdef MORPHTARGETS_TANGENT
|
|
201
|
+
tangentUpdated.xyz+=(tangent{X}-tangent.xyz)*morphTargetInfluences[{X}];
|
|
202
|
+
#endif
|
|
203
|
+
#ifdef MORPHTARGETS_UV
|
|
204
|
+
uvUpdated+=(uv_{X}-uv)*morphTargetInfluences[{X}];
|
|
205
|
+
#endif
|
|
206
|
+
#ifdef MORPHTARGETS_UV2
|
|
207
|
+
uv2Updated+=(uv2_{X}-uv2)*morphTargetInfluences[{X}];
|
|
208
|
+
#endif
|
|
209
|
+
#ifdef MORPHTARGETS_COLOR
|
|
210
|
+
colorUpdated+=(color{X}-color)*morphTargetInfluences[{X}];
|
|
211
|
+
#endif
|
|
212
|
+
#endif
|
|
213
|
+
#endif
|
|
214
|
+
`;
|
|
215
|
+
e.IncludesShadersStore[o] || (e.IncludesShadersStore[o] = R);
|
|
216
|
+
const m = "instancesVertex", p = `#ifdef INSTANCES
|
|
217
|
+
mat4 finalWorld=mat4(world0,world1,world2,world3);
|
|
218
|
+
#if defined(PREPASS_VELOCITY) || defined(VELOCITY) || defined(PREPASS_VELOCITY_LINEAR) || defined(VELOCITY_LINEAR)
|
|
219
|
+
mat4 finalPreviousWorld=mat4(previousWorld0,previousWorld1,
|
|
220
|
+
previousWorld2,previousWorld3);
|
|
221
|
+
#endif
|
|
222
|
+
#ifdef THIN_INSTANCES
|
|
223
|
+
finalWorld=world*finalWorld;
|
|
224
|
+
#if defined(PREPASS_VELOCITY) || defined(VELOCITY) || defined(PREPASS_VELOCITY_LINEAR) || defined(VELOCITY_LINEAR)
|
|
225
|
+
finalPreviousWorld=previousWorld*finalPreviousWorld;
|
|
226
|
+
#endif
|
|
227
|
+
#endif
|
|
228
|
+
#else
|
|
229
|
+
mat4 finalWorld=world;
|
|
230
|
+
#if defined(PREPASS_VELOCITY) || defined(VELOCITY) || defined(PREPASS_VELOCITY_LINEAR) || defined(VELOCITY_LINEAR)
|
|
231
|
+
mat4 finalPreviousWorld=previousWorld;
|
|
232
|
+
#endif
|
|
233
|
+
#endif
|
|
234
|
+
`;
|
|
235
|
+
e.IncludesShadersStore[m] || (e.IncludesShadersStore[m] = p);
|
|
236
|
+
const s = "bonesVertex", v = `#ifndef BAKED_VERTEX_ANIMATION_TEXTURE
|
|
237
|
+
#if NUM_BONE_INFLUENCERS>0
|
|
238
|
+
mat4 influence;
|
|
239
|
+
#ifdef BONETEXTURE
|
|
240
|
+
influence=readMatrixFromRawSampler(boneSampler,matricesIndices[0])*matricesWeights[0];
|
|
241
|
+
#if NUM_BONE_INFLUENCERS>1
|
|
242
|
+
influence+=readMatrixFromRawSampler(boneSampler,matricesIndices[1])*matricesWeights[1];
|
|
243
|
+
#endif
|
|
244
|
+
#if NUM_BONE_INFLUENCERS>2
|
|
245
|
+
influence+=readMatrixFromRawSampler(boneSampler,matricesIndices[2])*matricesWeights[2];
|
|
246
|
+
#endif
|
|
247
|
+
#if NUM_BONE_INFLUENCERS>3
|
|
248
|
+
influence+=readMatrixFromRawSampler(boneSampler,matricesIndices[3])*matricesWeights[3];
|
|
249
|
+
#endif
|
|
250
|
+
#if NUM_BONE_INFLUENCERS>4
|
|
251
|
+
influence+=readMatrixFromRawSampler(boneSampler,matricesIndicesExtra[0])*matricesWeightsExtra[0];
|
|
252
|
+
#endif
|
|
253
|
+
#if NUM_BONE_INFLUENCERS>5
|
|
254
|
+
influence+=readMatrixFromRawSampler(boneSampler,matricesIndicesExtra[1])*matricesWeightsExtra[1];
|
|
255
|
+
#endif
|
|
256
|
+
#if NUM_BONE_INFLUENCERS>6
|
|
257
|
+
influence+=readMatrixFromRawSampler(boneSampler,matricesIndicesExtra[2])*matricesWeightsExtra[2];
|
|
258
|
+
#endif
|
|
259
|
+
#if NUM_BONE_INFLUENCERS>7
|
|
260
|
+
influence+=readMatrixFromRawSampler(boneSampler,matricesIndicesExtra[3])*matricesWeightsExtra[3];
|
|
261
|
+
#endif
|
|
262
|
+
#else
|
|
263
|
+
influence=mBones[int(matricesIndices[0])]*matricesWeights[0];
|
|
264
|
+
#if NUM_BONE_INFLUENCERS>1
|
|
265
|
+
influence+=mBones[int(matricesIndices[1])]*matricesWeights[1];
|
|
266
|
+
#endif
|
|
267
|
+
#if NUM_BONE_INFLUENCERS>2
|
|
268
|
+
influence+=mBones[int(matricesIndices[2])]*matricesWeights[2];
|
|
269
|
+
#endif
|
|
270
|
+
#if NUM_BONE_INFLUENCERS>3
|
|
271
|
+
influence+=mBones[int(matricesIndices[3])]*matricesWeights[3];
|
|
272
|
+
#endif
|
|
273
|
+
#if NUM_BONE_INFLUENCERS>4
|
|
274
|
+
influence+=mBones[int(matricesIndicesExtra[0])]*matricesWeightsExtra[0];
|
|
275
|
+
#endif
|
|
276
|
+
#if NUM_BONE_INFLUENCERS>5
|
|
277
|
+
influence+=mBones[int(matricesIndicesExtra[1])]*matricesWeightsExtra[1];
|
|
278
|
+
#endif
|
|
279
|
+
#if NUM_BONE_INFLUENCERS>6
|
|
280
|
+
influence+=mBones[int(matricesIndicesExtra[2])]*matricesWeightsExtra[2];
|
|
281
|
+
#endif
|
|
282
|
+
#if NUM_BONE_INFLUENCERS>7
|
|
283
|
+
influence+=mBones[int(matricesIndicesExtra[3])]*matricesWeightsExtra[3];
|
|
284
|
+
#endif
|
|
285
|
+
#endif
|
|
286
|
+
finalWorld=finalWorld*influence;
|
|
287
|
+
#endif
|
|
288
|
+
#endif
|
|
289
|
+
`;
|
|
290
|
+
e.IncludesShadersStore[s] || (e.IncludesShadersStore[s] = v);
|
|
291
|
+
const c = "bakedVertexAnimation", V = `#ifdef BAKED_VERTEX_ANIMATION_TEXTURE
|
|
292
|
+
{
|
|
293
|
+
#ifdef INSTANCES
|
|
294
|
+
#define BVASNAME bakedVertexAnimationSettingsInstanced
|
|
295
|
+
#else
|
|
296
|
+
#define BVASNAME bakedVertexAnimationSettings
|
|
297
|
+
#endif
|
|
298
|
+
float VATStartFrame=BVASNAME.x;float VATEndFrame=BVASNAME.y;float VATOffsetFrame=BVASNAME.z;float VATSpeed=BVASNAME.w;float totalFrames=VATEndFrame-VATStartFrame+1.0;float time=bakedVertexAnimationTime*VATSpeed/totalFrames;float frameCorrection=time<1.0 ? 0.0 : 1.0;float numOfFrames=totalFrames-frameCorrection;float VATFrameNum=fract(time)*numOfFrames;VATFrameNum=mod(VATFrameNum+VATOffsetFrame,numOfFrames);VATFrameNum=floor(VATFrameNum);VATFrameNum+=VATStartFrame+frameCorrection;mat4 VATInfluence;VATInfluence=readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,matricesIndices[0],VATFrameNum)*matricesWeights[0];
|
|
299
|
+
#if NUM_BONE_INFLUENCERS>1
|
|
300
|
+
VATInfluence+=readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,matricesIndices[1],VATFrameNum)*matricesWeights[1];
|
|
301
|
+
#endif
|
|
302
|
+
#if NUM_BONE_INFLUENCERS>2
|
|
303
|
+
VATInfluence+=readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,matricesIndices[2],VATFrameNum)*matricesWeights[2];
|
|
304
|
+
#endif
|
|
305
|
+
#if NUM_BONE_INFLUENCERS>3
|
|
306
|
+
VATInfluence+=readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,matricesIndices[3],VATFrameNum)*matricesWeights[3];
|
|
307
|
+
#endif
|
|
308
|
+
#if NUM_BONE_INFLUENCERS>4
|
|
309
|
+
VATInfluence+=readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,matricesIndicesExtra[0],VATFrameNum)*matricesWeightsExtra[0];
|
|
310
|
+
#endif
|
|
311
|
+
#if NUM_BONE_INFLUENCERS>5
|
|
312
|
+
VATInfluence+=readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,matricesIndicesExtra[1],VATFrameNum)*matricesWeightsExtra[1];
|
|
313
|
+
#endif
|
|
314
|
+
#if NUM_BONE_INFLUENCERS>6
|
|
315
|
+
VATInfluence+=readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,matricesIndicesExtra[2],VATFrameNum)*matricesWeightsExtra[2];
|
|
316
|
+
#endif
|
|
317
|
+
#if NUM_BONE_INFLUENCERS>7
|
|
318
|
+
VATInfluence+=readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,matricesIndicesExtra[3],VATFrameNum)*matricesWeightsExtra[3];
|
|
319
|
+
#endif
|
|
320
|
+
finalWorld=finalWorld*VATInfluence;}
|
|
321
|
+
#endif
|
|
322
|
+
`;
|
|
323
|
+
e.IncludesShadersStore[c] || (e.IncludesShadersStore[c] = V);
|
|
324
|
+
const l = "bumpVertex", h = `#if defined(BUMP) || defined(PARALLAX) || defined(CLEARCOAT_BUMP) || defined(ANISOTROPIC)
|
|
325
|
+
#if defined(TANGENT) && defined(NORMAL)
|
|
326
|
+
vec3 tbnNormal=normalize(normalUpdated);vec3 tbnTangent=normalize(tangentUpdated.xyz);vec3 tbnBitangent=cross(tbnNormal,tbnTangent)*tangentUpdated.w;vTBN=mat3(finalWorld)*mat3(tbnTangent,tbnBitangent,tbnNormal);
|
|
327
|
+
#endif
|
|
328
|
+
#endif
|
|
329
|
+
`;
|
|
330
|
+
e.IncludesShadersStore[l] || (e.IncludesShadersStore[l] = h);
|
|
331
|
+
const T = "clipPlaneVertex", _ = `#ifdef CLIPPLANE
|
|
332
|
+
fClipDistance=dot(worldPos,vClipPlane);
|
|
333
|
+
#endif
|
|
334
|
+
#ifdef CLIPPLANE2
|
|
335
|
+
fClipDistance2=dot(worldPos,vClipPlane2);
|
|
336
|
+
#endif
|
|
337
|
+
#ifdef CLIPPLANE3
|
|
338
|
+
fClipDistance3=dot(worldPos,vClipPlane3);
|
|
339
|
+
#endif
|
|
340
|
+
#ifdef CLIPPLANE4
|
|
341
|
+
fClipDistance4=dot(worldPos,vClipPlane4);
|
|
342
|
+
#endif
|
|
343
|
+
#ifdef CLIPPLANE5
|
|
344
|
+
fClipDistance5=dot(worldPos,vClipPlane5);
|
|
345
|
+
#endif
|
|
346
|
+
#ifdef CLIPPLANE6
|
|
347
|
+
fClipDistance6=dot(worldPos,vClipPlane6);
|
|
348
|
+
#endif
|
|
349
|
+
`;
|
|
350
|
+
e.IncludesShadersStore[T] || (e.IncludesShadersStore[T] = _);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
/** Machine-friendly name (used in package name, imports) */
|
|
3
|
+
name: string;
|
|
4
|
+
/** Human-friendly display name */
|
|
5
|
+
displayName: string;
|
|
6
|
+
/** Semantic version */
|
|
7
|
+
version: string;
|
|
8
|
+
/** Whether multiple instances can exist in a scene */
|
|
9
|
+
multiInstance: boolean;
|
|
10
|
+
/** 3D asset files to include in the build */
|
|
11
|
+
assets: {
|
|
12
|
+
id: string;
|
|
13
|
+
file: string;
|
|
14
|
+
}[];
|
|
15
|
+
};
|
|
16
|
+
export default _default;
|
|
17
|
+
//# sourceMappingURL=component.config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component.config.d.ts","sourceRoot":"","sources":["../src/component.config.ts"],"names":[],"mappings":";IACE,4DAA4D;;IAG5D,kCAAkC;;IAGlC,uBAAuB;;IAGvB,sDAAsD;;IAGtD,6CAA6C;;;;;;AAb/C,wBAiBE"}
|