@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.
Files changed (203) hide show
  1. package/.todo.md +13 -0
  2. package/README.md +122 -0
  3. package/dist/.gitkeep +0 -0
  4. package/dist/Adapters/aBB6700PMAdapter.d.ts +10 -0
  5. package/dist/Adapters/aBB6700PMAdapter.d.ts.map +1 -0
  6. package/dist/Controllers/createABB6700.d.ts +12 -0
  7. package/dist/Controllers/createABB6700.d.ts.map +1 -0
  8. package/dist/Controllers/getPose.d.ts +11 -0
  9. package/dist/Controllers/getPose.d.ts.map +1 -0
  10. package/dist/Controllers/setJointAngle.d.ts +12 -0
  11. package/dist/Controllers/setJointAngle.d.ts.map +1 -0
  12. package/dist/Controllers/setPose.d.ts +11 -0
  13. package/dist/Controllers/setPose.d.ts.map +1 -0
  14. package/dist/Entities/ABB6700Entity.d.ts +35 -0
  15. package/dist/Entities/ABB6700Entity.d.ts.map +1 -0
  16. package/dist/Entities/ABB6700Repo.d.ts +32 -0
  17. package/dist/Entities/ABB6700Repo.d.ts.map +1 -0
  18. package/dist/Factory/ABB6700FeatureFactory.d.ts +26 -0
  19. package/dist/Factory/ABB6700FeatureFactory.d.ts.map +1 -0
  20. package/dist/Mocks/MockABB6700PM.d.ts +11 -0
  21. package/dist/Mocks/MockABB6700PM.d.ts.map +1 -0
  22. package/dist/Mocks/MockSetJointAngleUC.d.ts +7 -0
  23. package/dist/Mocks/MockSetJointAngleUC.d.ts.map +1 -0
  24. package/dist/Mocks/MockSetPoseUC.d.ts +7 -0
  25. package/dist/Mocks/MockSetPoseUC.d.ts.map +1 -0
  26. package/dist/PMs/ABB6700PM.d.ts +32 -0
  27. package/dist/PMs/ABB6700PM.d.ts.map +1 -0
  28. package/dist/UCs/CalcStabilizerUC.d.ts +7 -0
  29. package/dist/UCs/CalcStabilizerUC.d.ts.map +1 -0
  30. package/dist/UCs/SetJointAngleUC.d.ts +15 -0
  31. package/dist/UCs/SetJointAngleUC.d.ts.map +1 -0
  32. package/dist/UCs/SetPoseUC.d.ts +22 -0
  33. package/dist/UCs/SetPoseUC.d.ts.map +1 -0
  34. package/dist/Views/ABB6700BabylonView.d.ts +27 -0
  35. package/dist/Views/ABB6700BabylonView.d.ts.map +1 -0
  36. package/dist/abb_6700.glb +0 -0
  37. package/dist/abstractAudioBus-CyBWsmuN.js +14 -0
  38. package/dist/animationGroup-BhNThqQe.js +1454 -0
  39. package/dist/basisTextureLoader-BT391BsV.js +310 -0
  40. package/dist/brdfTextureTools-DUyKBAXf.js +79 -0
  41. package/dist/bumpFragment-Dd-ojPA1.js +134 -0
  42. package/dist/bumpFragment-KE1_PuMl.js +287 -0
  43. package/dist/bumpVertex-BcdvVFVx.js +8 -0
  44. package/dist/bumpVertexDeclaration-B5Uvs-RS.js +8 -0
  45. package/dist/bumpVertexDeclaration-ixSg-yGI.js +8 -0
  46. package/dist/clipPlaneFragment-DJwQynjA.js +136 -0
  47. package/dist/clipPlaneVertex-D4Wk50XG.js +376 -0
  48. package/dist/clipPlaneVertex-eQ147Tn2.js +350 -0
  49. package/dist/component.config.d.ts +17 -0
  50. package/dist/component.config.d.ts.map +1 -0
  51. package/dist/ddsTextureLoader-DeoF3iGO.js +331 -0
  52. package/dist/default.fragment-DKnTR9nY.js +548 -0
  53. package/dist/default.fragment-rIGWrUS5.js +486 -0
  54. package/dist/default.vertex-Bt5y1VyA.js +212 -0
  55. package/dist/default.vertex-Dext1liJ.js +224 -0
  56. package/dist/defaultUboDeclaration-BwslQZX8.js +11 -0
  57. package/dist/defaultUboDeclaration-DSXACgip.js +9 -0
  58. package/dist/easing-BAt0SO-B.js +163 -0
  59. package/dist/envTextureLoader-CBiW_Q-U.js +40 -0
  60. package/dist/exrTextureLoader-5SC6PKIA.js +740 -0
  61. package/dist/flowGraphApplyForceBlock-6e8-wcaw.js +32 -0
  62. package/dist/flowGraphApplyImpulseBlock-B27EZQow.js +32 -0
  63. package/dist/flowGraphArrayIndexBlock-DIUn5e4i.js +31 -0
  64. package/dist/flowGraphBezierCurveEasingBlock-BJmiHk40.js +25 -0
  65. package/dist/flowGraphBinaryOperationBlock-Bj7TANCc.js +25 -0
  66. package/dist/flowGraphBranchBlock-7CRvIKWc.js +19 -0
  67. package/dist/flowGraphCachedOperationBlock-CP1ZiuIB.js +26 -0
  68. package/dist/flowGraphCancelDelayBlock-DqtgzBGm.js +20 -0
  69. package/dist/flowGraphCodeExecutionBlock-CaYXCGqo.js +23 -0
  70. package/dist/flowGraphConditionalDataBlock-DJ7evX8_.js +28 -0
  71. package/dist/flowGraphConsoleLogBlock-cMkpqLzO.js +68 -0
  72. package/dist/flowGraphConstantBlock-JWybwT0A.js +28 -0
  73. package/dist/flowGraphContextBlock-CFDXHcbn.js +19 -0
  74. package/dist/flowGraphCounterBlock-B0uPkgw9.js +24 -0
  75. package/dist/flowGraphDataSwitchBlock-B0GSifvJ.js +27 -0
  76. package/dist/flowGraphDebounceBlock-CSw8zKym.js +24 -0
  77. package/dist/flowGraphDebugBlock-DiSR6Ahn.js +65 -0
  78. package/dist/flowGraphDoNBlock-C-48oQ2H.js +24 -0
  79. package/dist/flowGraphEasingBlock-DKUaE7Rp.js +50 -0
  80. package/dist/flowGraphFlipFlopBlock-DX5BGhMV.js +20 -0
  81. package/dist/flowGraphForLoopBlock-Di-Qwg23.js +27 -0
  82. package/dist/flowGraphFunctionReferenceBlock-D8X5TFsO.js +20 -0
  83. package/dist/flowGraphGLTFDataProvider-C4j7nPQv.js +16 -0
  84. package/dist/flowGraphGetAngularVelocityBlock-Cq-yTQ4D.js +31 -0
  85. package/dist/flowGraphGetAssetBlock-B36eioor.js +21 -0
  86. package/dist/flowGraphGetLinearVelocityBlock-MdrV0eUD.js +31 -0
  87. package/dist/flowGraphGetPhysicsMassPropertiesBlock-wXDZP1wM.js +30 -0
  88. package/dist/flowGraphGetPropertyBlock-eP0badwf.js +46 -0
  89. package/dist/flowGraphGetSoundVolumeBlock-D3gXGHXa.js +29 -0
  90. package/dist/flowGraphGetVariableBlock-C7-qZAec.js +31 -0
  91. package/dist/flowGraphIndexOfBlock-CC5l9n9P.js +31 -0
  92. package/dist/flowGraphInterpolationBlock-B6922jzt.js +50 -0
  93. package/dist/flowGraphIsKeyPressedBlock-X_iuiUOX.js +31 -0
  94. package/dist/flowGraphIsSoundPlayingBlock-DONQX8N8.js +29 -0
  95. package/dist/flowGraphJsonPointerParserBlock-DBH_gN8I.js +95 -0
  96. package/dist/flowGraphKeyDownEventBlock-D5T1Uyfv.js +26 -0
  97. package/dist/flowGraphKeyUpEventBlock-BPY_Kgkm.js +21 -0
  98. package/dist/flowGraphKeyboardEventBlock-C49fx3TC.js +20 -0
  99. package/dist/flowGraphMathBlocks-CkvrN3VJ.js +864 -0
  100. package/dist/flowGraphMathCombineExtractBlocks-QSjGlnoz.js +248 -0
  101. package/dist/flowGraphMatrixMathBlocks-B3D7Cz9p.js +117 -0
  102. package/dist/flowGraphMeshPickEventBlock-BBTz-taa.js +35 -0
  103. package/dist/flowGraphMultiGateBlock-BhY1y5BG.js +50 -0
  104. package/dist/flowGraphPauseAnimationBlock-CHZZXMbg.js +19 -0
  105. package/dist/flowGraphPauseSoundBlock-B7hMmJ0c.js +31 -0
  106. package/dist/flowGraphPhysicsCollisionEventBlock-CxoPpT-q.js +56 -0
  107. package/dist/flowGraphPlayAnimationBlock-DVAvIFux.js +99 -0
  108. package/dist/flowGraphPlaySoundBlock-DjHGrqbC.js +32 -0
  109. package/dist/flowGraphPointerDownEventBlock-qI-H0JST.js +31 -0
  110. package/dist/flowGraphPointerMoveEventBlock-DAi4VUyy.js +31 -0
  111. package/dist/flowGraphPointerOutEventBlock-CFtj68aC.js +21 -0
  112. package/dist/flowGraphPointerOverEventBlock-VxdHhFuu.js +23 -0
  113. package/dist/flowGraphPointerUpEventBlock-DRR1f07q.js +31 -0
  114. package/dist/flowGraphReceiveCustomEventBlock-B3bwdB66.js +52 -0
  115. package/dist/flowGraphSceneReadyEventBlock-Dy6lDT3j.js +23 -0
  116. package/dist/flowGraphSceneTickEventBlock-Bl9BF_Xw.js +32 -0
  117. package/dist/flowGraphSendCustomEventBlock-BAR4PGFq.js +35 -0
  118. package/dist/flowGraphSequenceBlock-veqU32ZZ.js +32 -0
  119. package/dist/flowGraphSetAngularVelocityBlock-Dj9b-zu6.js +31 -0
  120. package/dist/flowGraphSetDelayBlock-CMjudtvk.js +131 -0
  121. package/dist/flowGraphSetLinearVelocityBlock-DVDhhJBd.js +31 -0
  122. package/dist/flowGraphSetPhysicsMotionTypeBlock-CL3cxNCO.js +36 -0
  123. package/dist/flowGraphSetPropertyBlock-D3sWL3Ss.js +47 -0
  124. package/dist/flowGraphSetSoundVolumeBlock-CxVk45yR.js +32 -0
  125. package/dist/flowGraphSetVariableBlock-D1oJiwLj.js +47 -0
  126. package/dist/flowGraphSoundEndedEventBlock-CubEwii0.js +47 -0
  127. package/dist/flowGraphStopAnimationBlock-B9inwIQx.js +48 -0
  128. package/dist/flowGraphStopSoundBlock-BijIX2jC.js +31 -0
  129. package/dist/flowGraphSwitchBlock-BMhPb4OX.js +54 -0
  130. package/dist/flowGraphThrottleBlock-C7vrnkb1.js +37 -0
  131. package/dist/flowGraphTransformCoordinatesSystemBlock-DoISqaUG.js +29 -0
  132. package/dist/flowGraphTypeToTypeBlocks-CSML6QWx.js +57 -0
  133. package/dist/flowGraphUnaryOperationBlock-B0Shf-lJ.js +24 -0
  134. package/dist/flowGraphVectorMathBlocks-DoTRR_E0.js +178 -0
  135. package/dist/flowGraphWaitAllBlock-BvmDMc24.js +54 -0
  136. package/dist/flowGraphWhileLoopBlock-BaIq4-K2.js +27 -0
  137. package/dist/geometry.fragment-Bsis3UG2.js +275 -0
  138. package/dist/geometry.vertex-DskQ5b8j.js +222 -0
  139. package/dist/harmonicsFunctions-CtNrRfir.js +193 -0
  140. package/dist/harmonicsFunctions-PEz6APC7.js +18 -0
  141. package/dist/hdrTextureLoader-D9rYxJ9q.js +112 -0
  142. package/dist/helperFunctions-Bt7Zfkrp.js +89 -0
  143. package/dist/helperFunctions-CPmRxd37.js +121 -0
  144. package/dist/iesTextureLoader-BGUFjVhI.js +93 -0
  145. package/dist/index-CS3Icp_r.js +67657 -0
  146. package/dist/index.d.ts +23 -0
  147. package/dist/index.d.ts.map +1 -0
  148. package/dist/index.js +27 -0
  149. package/dist/ktxTextureLoader-cUaGg9_L.js +459 -0
  150. package/dist/lightFragment-BRDibDKG.js +404 -0
  151. package/dist/lightFragment-DCqtGMp_.js +402 -0
  152. package/dist/logDepthDeclaration-Bwm-3KyB.js +16 -0
  153. package/dist/logDepthDeclaration-gUfeSnXX.js +20 -0
  154. package/dist/logDepthVertex-CKeuJ6ae.js +213 -0
  155. package/dist/logDepthVertex-CXkmZels.js +459 -0
  156. package/dist/mesh.vertexData.functions-Bc9lJlrU.js +74 -0
  157. package/dist/oitFragment-B8zuQigp.js +792 -0
  158. package/dist/oitFragment-DH3h3T6x.js +657 -0
  159. package/dist/openpbr.fragment-BglYS6LA.js +1405 -0
  160. package/dist/openpbr.fragment-DrOTZs4m.js +1553 -0
  161. package/dist/openpbr.vertex-B-PaLFOR.js +384 -0
  162. package/dist/openpbr.vertex-DMdFRTnX.js +268 -0
  163. package/dist/openpbrMaterial-HCU0aOca.js +2880 -0
  164. package/dist/openpbrMaterialLoadingAdapter-CWRAa-7S.js +1122 -0
  165. package/dist/openpbrTransmissionLayerData-CfDVObj5.js +352 -0
  166. package/dist/openpbrUboDeclaration-CA2pvSbt.js +9 -0
  167. package/dist/openpbrUboDeclaration-xU8VOaib.js +10 -0
  168. package/dist/pass.fragment-1mMP54bb.js +10 -0
  169. package/dist/pass.fragment-DzaUp_jk.js +10 -0
  170. package/dist/passCube.fragment-CQaXS7g3.js +29 -0
  171. package/dist/passCube.fragment-QJGPwAXI.js +29 -0
  172. package/dist/pbr.fragment-BnaAAGxb.js +2775 -0
  173. package/dist/pbr.fragment-CYZk_EGU.js +2619 -0
  174. package/dist/pbr.vertex-CyvdCw91.js +372 -0
  175. package/dist/pbr.vertex-DJMAkDxs.js +270 -0
  176. package/dist/pbrBRDFFunctions-EugoWm6O.js +175 -0
  177. package/dist/pbrDebug-Bk3sPoEG.js +719 -0
  178. package/dist/pbrDebug-Cdalzb1I.js +614 -0
  179. package/dist/pbrIBLFunctions-B0bVAXCF.js +47 -0
  180. package/dist/pbrIBLFunctions-C06z-ouZ.js +51 -0
  181. package/dist/pbrMaterial-C4FCKBZQ.js +1660 -0
  182. package/dist/pbrMaterialLoadingAdapter-BGHlS_ZN.js +1032 -0
  183. package/dist/pbrUboDeclaration-1lN5_-Bw.js +9 -0
  184. package/dist/pbrUboDeclaration-BJOUUOZ2.js +10 -0
  185. package/dist/procedural.vertex-CFPKczKj.js +14 -0
  186. package/dist/procedural.vertex-DUW7bYZt.js +13 -0
  187. package/dist/rgbdDecode.fragment-CEGgE4tL.js +8 -0
  188. package/dist/rgbdDecode.fragment-FT0wkgah.js +8 -0
  189. package/dist/rgbdEncode.fragment-CLnJJf6E.js +8 -0
  190. package/dist/rgbdEncode.fragment-CaAcMsY9.js +8 -0
  191. package/dist/sceneUboDeclaration-B6oxsfcj.js +8 -0
  192. package/dist/sceneUboDeclaration-JByfVKik.js +13 -0
  193. package/dist/setupABB6700InstanceFactory.d.ts +7 -0
  194. package/dist/setupABB6700InstanceFactory.d.ts.map +1 -0
  195. package/dist/studio.env +0 -0
  196. package/dist/textureProcessor.fragment-BYPw6SMQ.js +152 -0
  197. package/dist/textureProcessor.fragment-Ciw9-F3w.js +157 -0
  198. package/dist/textureTools-Cct_bGgp.js +40 -0
  199. package/dist/tgaTextureLoader-BJOIdnFr.js +198 -0
  200. package/dist/thinEngine-Bt9FW4dD.js +2425 -0
  201. package/dist/webAudioBus-BUzRHSxr.js +88 -0
  202. package/dist/webAudioMainBus-Dds1TgJG.js +49 -0
  203. package/package.json +49 -0
@@ -0,0 +1,9 @@
1
+ import { b0 as e } from "./index-CS3Icp_r.js";
2
+ import "./sceneUboDeclaration-JByfVKik.js";
3
+ import "./logDepthDeclaration-Bwm-3KyB.js";
4
+ const f = "pbrUboDeclaration", i = `uniform vAlbedoInfos: vec2f;uniform vBaseWeightInfos: vec2f;uniform vBaseDiffuseRoughnessInfos: vec2f;uniform vAmbientInfos: vec4f;uniform vOpacityInfos: vec2f;uniform vEmissiveInfos: vec2f;uniform vLightmapInfos: vec2f;uniform vReflectivityInfos: vec3f;uniform vMicroSurfaceSamplerInfos: vec2f;uniform vBumpInfos: vec3f;uniform albedoMatrix: mat4x4f;uniform baseWeightMatrix: mat4x4f;uniform baseDiffuseRoughnessMatrix: mat4x4f;uniform ambientMatrix: mat4x4f;uniform opacityMatrix: mat4x4f;uniform emissiveMatrix: mat4x4f;uniform lightmapMatrix: mat4x4f;uniform reflectivityMatrix: mat4x4f;uniform microSurfaceSamplerMatrix: mat4x4f;uniform bumpMatrix: mat4x4f;uniform vTangentSpaceParams: vec2f;uniform vAlbedoColor: vec4f;uniform baseWeight: f32;uniform baseDiffuseRoughness: f32;uniform vLightingIntensity: vec4f;uniform pointSize: f32;uniform vReflectivityColor: vec4f;uniform vEmissiveColor: vec3f;uniform vAmbientColor: vec3f;uniform vDebugMode: vec2f;uniform vMetallicReflectanceFactors: vec4f;uniform vMetallicReflectanceInfos: vec2f;uniform metallicReflectanceMatrix: mat4x4f;uniform vReflectanceInfos: vec2f;uniform reflectanceMatrix: mat4x4f;uniform cameraInfo: vec4f;uniform vTextureRepetitionHexTilingParams: vec4f;uniform vReflectionInfos: vec2f;uniform reflectionMatrix: mat4x4f;uniform vReflectionMicrosurfaceInfos: vec3f;uniform vReflectionPosition: vec3f;uniform vReflectionSize: vec3f;uniform vReflectionFilteringInfo: vec2f;uniform vReflectionDominantDirection: vec3f;uniform vReflectionColor: vec3f;uniform vSphericalL00: vec3f;uniform vSphericalL1_1: vec3f;uniform vSphericalL10: vec3f;uniform vSphericalL11: vec3f;uniform vSphericalL2_2: vec3f;uniform vSphericalL2_1: vec3f;uniform vSphericalL20: vec3f;uniform vSphericalL21: vec3f;uniform vSphericalL22: vec3f;uniform vSphericalX: vec3f;uniform vSphericalY: vec3f;uniform vSphericalZ: vec3f;uniform vSphericalXX_ZZ: vec3f;uniform vSphericalYY_ZZ: vec3f;uniform vSphericalZZ: vec3f;uniform vSphericalXY: vec3f;uniform vSphericalYZ: vec3f;uniform vSphericalZX: vec3f;
5
+ #define ADDITIONAL_UBO_DECLARATION
6
+ #include<sceneUboDeclaration>
7
+ #include<meshUboDeclaration>
8
+ `;
9
+ e.IncludesShadersStoreWGSL[f] || (e.IncludesShadersStoreWGSL[f] = i);
@@ -0,0 +1,10 @@
1
+ import { b0 as e } from "./index-CS3Icp_r.js";
2
+ import "./sceneUboDeclaration-B6oxsfcj.js";
3
+ import "./logDepthDeclaration-gUfeSnXX.js";
4
+ const c = "pbrUboDeclaration", i = `layout(std140,column_major) uniform;uniform Material {vec2 vAlbedoInfos;vec2 vBaseWeightInfos;vec2 vBaseDiffuseRoughnessInfos;vec4 vAmbientInfos;vec2 vOpacityInfos;vec2 vEmissiveInfos;vec2 vLightmapInfos;vec3 vReflectivityInfos;vec2 vMicroSurfaceSamplerInfos;vec3 vBumpInfos;mat4 albedoMatrix;mat4 baseWeightMatrix;mat4 baseDiffuseRoughnessMatrix;mat4 ambientMatrix;mat4 opacityMatrix;mat4 emissiveMatrix;mat4 lightmapMatrix;mat4 reflectivityMatrix;mat4 microSurfaceSamplerMatrix;mat4 bumpMatrix;vec2 vTangentSpaceParams;vec4 vAlbedoColor;float baseWeight;float baseDiffuseRoughness;vec4 vLightingIntensity;float pointSize;vec4 vReflectivityColor;vec3 vEmissiveColor;vec3 vAmbientColor;vec2 vDebugMode;vec4 vMetallicReflectanceFactors;vec2 vMetallicReflectanceInfos;mat4 metallicReflectanceMatrix;vec2 vReflectanceInfos;mat4 reflectanceMatrix;vec4 cameraInfo;vec4 vTextureRepetitionHexTilingParams;vec2 vReflectionInfos;mat4 reflectionMatrix;vec3 vReflectionMicrosurfaceInfos;vec3 vReflectionPosition;vec3 vReflectionSize;vec2 vReflectionFilteringInfo;vec3 vReflectionDominantDirection;vec3 vReflectionColor;vec3 vSphericalL00;vec3 vSphericalL1_1;vec3 vSphericalL10;vec3 vSphericalL11;vec3 vSphericalL2_2;vec3 vSphericalL2_1;vec3 vSphericalL20;vec3 vSphericalL21;vec3 vSphericalL22;vec3 vSphericalX;vec3 vSphericalY;vec3 vSphericalZ;vec3 vSphericalXX_ZZ;vec3 vSphericalYY_ZZ;vec3 vSphericalZZ;vec3 vSphericalXY;vec3 vSphericalYZ;vec3 vSphericalZX;
5
+ #define ADDITIONAL_UBO_DECLARATION
6
+ };
7
+ #include<sceneUboDeclaration>
8
+ #include<meshUboDeclaration>
9
+ `;
10
+ e.IncludesShadersStore[c] || (e.IncludesShadersStore[c] = i);
@@ -0,0 +1,14 @@
1
+ import { b0 as t } from "./index-CS3Icp_r.js";
2
+ const e = "proceduralVertexShader", r = `attribute position: vec2f;varying vPosition: vec2f;varying vUV: vec2f;const madd: vec2f= vec2f(0.5,0.5);
3
+ #define CUSTOM_VERTEX_DEFINITIONS
4
+ @vertex
5
+ fn main(input : VertexInputs)->FragmentInputs {
6
+ #define CUSTOM_VERTEX_MAIN_BEGIN
7
+ vertexOutputs.vPosition=vertexInputs.position;vertexOutputs.vUV=vertexInputs.position*madd+madd;vertexOutputs.position= vec4f(vertexInputs.position,0.0,1.0);
8
+ #define CUSTOM_VERTEX_MAIN_END
9
+ }`;
10
+ t.ShadersStoreWGSL[e] || (t.ShadersStoreWGSL[e] = r);
11
+ const o = { name: e, shader: r };
12
+ export {
13
+ o as proceduralVertexShaderWGSL
14
+ };
@@ -0,0 +1,13 @@
1
+ import { b0 as o } from "./index-CS3Icp_r.js";
2
+ const e = "proceduralVertexShader", i = `attribute vec2 position;varying vec2 vPosition;varying vec2 vUV;const vec2 madd=vec2(0.5,0.5);
3
+ #define CUSTOM_VERTEX_DEFINITIONS
4
+ void main(void) {
5
+ #define CUSTOM_VERTEX_MAIN_BEGIN
6
+ vPosition=position;vUV=position*madd+madd;gl_Position=vec4(position,0.0,1.0);
7
+ #define CUSTOM_VERTEX_MAIN_END
8
+ }`;
9
+ o.ShadersStore[e] || (o.ShadersStore[e] = i);
10
+ const t = { name: e, shader: i };
11
+ export {
12
+ t as proceduralVertexShader
13
+ };
@@ -0,0 +1,8 @@
1
+ import { b0 as e } from "./index-CS3Icp_r.js";
2
+ import "./helperFunctions-Bt7Zfkrp.js";
3
+ const r = "rgbdDecodePixelShader", t = `varying vUV: vec2f;var textureSamplerSampler: sampler;var textureSampler: texture_2d<f32>;
4
+ #include<helperFunctions>
5
+ #define CUSTOM_FRAGMENT_DEFINITIONS
6
+ @fragment
7
+ fn main(input: FragmentInputs)->FragmentOutputs {fragmentOutputs.color=vec4f(fromRGBD(textureSample(textureSampler,textureSamplerSampler,input.vUV)),1.0);}`;
8
+ e.ShadersStoreWGSL[r] || (e.ShadersStoreWGSL[r] = t);
@@ -0,0 +1,8 @@
1
+ import { b0 as e } from "./index-CS3Icp_r.js";
2
+ import "./helperFunctions-CPmRxd37.js";
3
+ const r = "rgbdDecodePixelShader", o = `varying vec2 vUV;uniform sampler2D textureSampler;
4
+ #include<helperFunctions>
5
+ #define CUSTOM_FRAGMENT_DEFINITIONS
6
+ void main(void)
7
+ {gl_FragColor=vec4(fromRGBD(texture2D(textureSampler,vUV)),1.0);}`;
8
+ e.ShadersStore[r] || (e.ShadersStore[r] = o);
@@ -0,0 +1,8 @@
1
+ import { b0 as e } from "./index-CS3Icp_r.js";
2
+ import "./helperFunctions-CPmRxd37.js";
3
+ const r = "rgbdEncodePixelShader", o = `varying vec2 vUV;uniform sampler2D textureSampler;
4
+ #include<helperFunctions>
5
+ #define CUSTOM_FRAGMENT_DEFINITIONS
6
+ void main(void)
7
+ {gl_FragColor=toRGBD(texture2D(textureSampler,vUV).rgb);}`;
8
+ e.ShadersStore[r] || (e.ShadersStore[r] = o);
@@ -0,0 +1,8 @@
1
+ import { b0 as e } from "./index-CS3Icp_r.js";
2
+ import "./helperFunctions-Bt7Zfkrp.js";
3
+ const r = "rgbdEncodePixelShader", t = `varying vUV: vec2f;var textureSamplerSampler: sampler;var textureSampler: texture_2d<f32>;
4
+ #include<helperFunctions>
5
+ #define CUSTOM_FRAGMENT_DEFINITIONS
6
+ @fragment
7
+ fn main(input: FragmentInputs)->FragmentOutputs {fragmentOutputs.color=toRGBD(textureSample(textureSampler,textureSamplerSampler,input.vUV).rgb);}`;
8
+ e.ShadersStoreWGSL[r] || (e.ShadersStoreWGSL[r] = t);
@@ -0,0 +1,8 @@
1
+ import { b0 as e } from "./index-CS3Icp_r.js";
2
+ const o = "sceneUboDeclaration", t = `layout(std140,column_major) uniform;uniform Scene {mat4 viewProjection;
3
+ #ifdef MULTIVIEW
4
+ mat4 viewProjectionR;
5
+ #endif
6
+ mat4 view;mat4 projection;vec4 vEyePosition;mat4 inverseProjection;};
7
+ `;
8
+ e.IncludesShadersStore[o] || (e.IncludesShadersStore[o] = t);
@@ -0,0 +1,13 @@
1
+ import { b0 as e } from "./index-CS3Icp_r.js";
2
+ const o = "sceneUboDeclaration", n = `struct Scene {viewProjection : mat4x4<f32>,
3
+ #ifdef MULTIVIEW
4
+ viewProjectionR : mat4x4<f32>,
5
+ #endif
6
+ view : mat4x4<f32>,
7
+ projection : mat4x4<f32>,
8
+ vEyePosition : vec4<f32>,
9
+ inverseProjection : mat4x4<f32>,};
10
+ #define SCENE_UBO
11
+ var<uniform> scene : Scene;
12
+ `;
13
+ e.IncludesShadersStoreWGSL[o] || (e.IncludesShadersStoreWGSL[o] = n);
@@ -0,0 +1,7 @@
1
+ import { AppObjectRepo } from "@vived/core";
2
+ /**
3
+ * Per-instance factory that creates Entity + PM for each component instance
4
+ * and registers itself on the ABB6700Repo.
5
+ */
6
+ export declare function setupABB6700InstanceFactory(appObjects: AppObjectRepo): void;
7
+ //# sourceMappingURL=setupABB6700InstanceFactory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setupABB6700InstanceFactory.d.ts","sourceRoot":"","sources":["../src/setupABB6700InstanceFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAS5C;;;GAGG;AACH,wBAAgB,2BAA2B,CAAC,UAAU,EAAE,aAAa,GAAG,IAAI,CAoB3E"}
Binary file
@@ -0,0 +1,152 @@
1
+ import { b0 as f } from "./index-CS3Icp_r.js";
2
+ const e = "textureProcessorPixelShader", i = `#ifdef OPERAND_A_TEXTURE
3
+ uniform sampler2D textureA;
4
+ #endif
5
+ #ifdef OPERAND_B_TEXTURE
6
+ uniform sampler2D textureB;
7
+ #endif
8
+ #if defined(OP_LERP) && defined(LERP_T_TEXTURE)
9
+ uniform sampler2D textureT;
10
+ #endif
11
+ #ifdef OPERAND_A_MATRIX
12
+ uniform mat4 textureAMatrix;
13
+ #endif
14
+ #ifdef OPERAND_B_MATRIX
15
+ uniform mat4 textureBMatrix;
16
+ #endif
17
+ #if defined(OP_LERP) && defined(LERP_T_MATRIX)
18
+ uniform mat4 textureTMatrix;
19
+ #endif
20
+ #if !defined(OPERAND_A_TEXTURE) || defined(OPERAND_A_FACTOR)
21
+ uniform vec4 factorA;
22
+ #endif
23
+ #if !defined(OPERAND_B_TEXTURE) || defined(OPERAND_B_FACTOR)
24
+ uniform vec4 factorB;
25
+ #endif
26
+ #if defined(OP_LERP) && (!defined(LERP_T_TEXTURE) || defined(LERP_T_FACTOR))
27
+ uniform vec4 factorT;
28
+ #endif
29
+ varying vec2 vUV;void main() {vec2 uv=vUV;
30
+ #ifdef OPERAND_A_TEXTURE
31
+ #ifdef OPERAND_A_MATRIX
32
+ vec4 a=texture2D(textureA,(textureAMatrix*vec4(uv,0.0,1.0)).xy);
33
+ #else
34
+ vec4 a=texture2D(textureA,uv);
35
+ #endif
36
+ #ifdef OPERAND_A_SRGB
37
+ a.rgb=mix(a.rgb/12.92,pow((a.rgb+0.055)/1.055,vec3(2.4)),step(vec3(0.04045),a.rgb));
38
+ #endif
39
+ #ifdef OPERAND_A_CHANNEL_R
40
+ a=vec4(a.rrr,a.a);
41
+ #elif defined(OPERAND_A_CHANNEL_G)
42
+ a=vec4(a.ggg,a.a);
43
+ #elif defined(OPERAND_A_CHANNEL_B)
44
+ a=vec4(a.bbb,a.a);
45
+ #elif defined(OPERAND_A_CHANNEL_A)
46
+ a=a.aaaa;
47
+ #endif
48
+ #ifdef OPERAND_A_FACTOR
49
+ a*=factorA;
50
+ #endif
51
+ #else
52
+ vec4 a=factorA;
53
+ #endif
54
+ #ifdef OPERAND_B_TEXTURE
55
+ #ifdef OPERAND_B_MATRIX
56
+ vec4 b=texture2D(textureB,(textureBMatrix*vec4(uv,0.0,1.0)).xy);
57
+ #else
58
+ vec4 b=texture2D(textureB,uv);
59
+ #endif
60
+ #ifdef OPERAND_B_SRGB
61
+ b.rgb=mix(b.rgb/12.92,pow((b.rgb+0.055)/1.055,vec3(2.4)),step(vec3(0.04045),b.rgb));
62
+ #endif
63
+ #ifdef OPERAND_B_CHANNEL_R
64
+ b=vec4(b.rrr,b.a);
65
+ #elif defined(OPERAND_B_CHANNEL_G)
66
+ b=vec4(b.ggg,b.a);
67
+ #elif defined(OPERAND_B_CHANNEL_B)
68
+ b=vec4(b.bbb,b.a);
69
+ #elif defined(OPERAND_B_CHANNEL_A)
70
+ b=b.aaaa;
71
+ #endif
72
+ #ifdef OPERAND_B_FACTOR
73
+ b*=factorB;
74
+ #endif
75
+ #else
76
+ vec4 b=factorB;
77
+ #endif
78
+ #ifdef OP_CHANNEL_MAX
79
+ float _cmax=max(max(a.r,a.g),a.b);
80
+ #ifdef CHANNEL_MAX_INCLUDE_ALPHA
81
+ _cmax=max(_cmax,a.a);vec4 result=vec4(_cmax,_cmax,_cmax,_cmax);
82
+ #else
83
+ vec4 result=vec4(_cmax,_cmax,_cmax,a.a);
84
+ #endif
85
+ #elif defined(OP_INVERT)
86
+ float _ir=a.r; float _ig=a.g; float _ib=a.b; float _ia=a.a;
87
+ #ifdef INVERT_R
88
+ _ir=1.0-_ir;
89
+ #endif
90
+ #ifdef INVERT_G
91
+ _ig=1.0-_ig;
92
+ #endif
93
+ #ifdef INVERT_B
94
+ _ib=1.0-_ib;
95
+ #endif
96
+ #ifdef INVERT_A
97
+ _ia=1.0-_ia;
98
+ #endif
99
+ vec4 result=vec4(_ir,_ig,_ib,_ia);
100
+ #elif defined(OP_LERP)
101
+ #ifdef LERP_T_TEXTURE
102
+ #ifdef LERP_T_MATRIX
103
+ vec4 t=texture2D(textureT,(textureTMatrix*vec4(uv,0.0,1.0)).xy);
104
+ #else
105
+ vec4 t=texture2D(textureT,uv);
106
+ #endif
107
+ #ifdef LERP_T_SRGB
108
+ t.rgb=mix(t.rgb/12.92,pow((t.rgb+0.055)/1.055,vec3(2.4)),step(vec3(0.04045),t.rgb));
109
+ #endif
110
+ #ifdef LERP_T_CHANNEL_R
111
+ t=vec4(t.rrr,t.a);
112
+ #elif defined(LERP_T_CHANNEL_G)
113
+ t=vec4(t.ggg,t.a);
114
+ #elif defined(LERP_T_CHANNEL_B)
115
+ t=vec4(t.bbb,t.a);
116
+ #elif defined(LERP_T_CHANNEL_A)
117
+ t=t.aaaa;
118
+ #endif
119
+ #ifdef LERP_T_FACTOR
120
+ t*=factorT;
121
+ #endif
122
+ #else
123
+ vec4 t=factorT;
124
+ #endif
125
+ vec4 result=mix(a,b,t);
126
+ #elif defined(OP_MAX)
127
+ vec4 result=max(a,b);
128
+ #else
129
+ vec4 result=a*b;
130
+ #endif
131
+ #ifdef OUTPUT_MASK_R_ZERO
132
+ result.r=0.0;
133
+ #endif
134
+ #ifdef OUTPUT_MASK_G_ZERO
135
+ result.g=0.0;
136
+ #endif
137
+ #ifdef OUTPUT_MASK_B_ZERO
138
+ result.b=0.0;
139
+ #endif
140
+ #ifdef OUTPUT_MASK_A_ONE
141
+ result.a=1.0;
142
+ #endif
143
+ #ifdef OUTPUT_SRGB
144
+ result.rgb=mix(result.rgb*12.92,pow(result.rgb,vec3(1.0/2.4))*1.055-0.055,step(vec3(0.0031308),result.rgb));
145
+ #endif
146
+ gl_FragColor=result;}
147
+ `;
148
+ f.ShadersStore[e] || (f.ShadersStore[e] = i);
149
+ const d = { name: e, shader: i };
150
+ export {
151
+ d as textureProcessorPixelShader
152
+ };
@@ -0,0 +1,157 @@
1
+ import { b0 as f } from "./index-CS3Icp_r.js";
2
+ const e = "textureProcessorPixelShader", r = `#ifdef OPERAND_A_TEXTURE
3
+ var textureASampler: sampler;var textureA: texture_2d<f32>;
4
+ #endif
5
+ #ifdef OPERAND_B_TEXTURE
6
+ var textureBSampler: sampler;var textureB: texture_2d<f32>;
7
+ #endif
8
+ #if defined(OP_LERP) && defined(LERP_T_TEXTURE)
9
+ var textureTSampler: sampler;var textureT: texture_2d<f32>;
10
+ #endif
11
+ #ifdef OPERAND_A_MATRIX
12
+ uniform textureAMatrix: mat4x4f;
13
+ #endif
14
+ #ifdef OPERAND_B_MATRIX
15
+ uniform textureBMatrix: mat4x4f;
16
+ #endif
17
+ #if defined(OP_LERP) && defined(LERP_T_MATRIX)
18
+ uniform textureTMatrix: mat4x4f;
19
+ #endif
20
+ #if !defined(OPERAND_A_TEXTURE) || defined(OPERAND_A_FACTOR)
21
+ uniform factorA: vec4f;
22
+ #endif
23
+ #if !defined(OPERAND_B_TEXTURE) || defined(OPERAND_B_FACTOR)
24
+ uniform factorB: vec4f;
25
+ #endif
26
+ #if defined(OP_LERP) && (!defined(LERP_T_TEXTURE) || defined(LERP_T_FACTOR))
27
+ uniform factorT: vec4f;
28
+ #endif
29
+ varying vUV: vec2f;@fragment
30
+ fn main(input: FragmentInputs)->FragmentOutputs {let uv: vec2f=input.vUV;
31
+ #ifdef OPERAND_A_TEXTURE
32
+ #ifdef OPERAND_A_MATRIX
33
+ var a: vec4f=textureSample(textureA,textureASampler,(uniforms.textureAMatrix*vec4f(uv,0.0,1.0)).xy);
34
+ #else
35
+ var a: vec4f=textureSample(textureA,textureASampler,uv);
36
+ #endif
37
+ #ifdef OPERAND_A_SRGB
38
+ a=vec4f(mix(a.rgb/vec3f(12.92),pow((a.rgb+vec3f(0.055))/vec3f(1.055),vec3f(2.4)),step(vec3f(0.04045),a.rgb)),a.a);
39
+ #endif
40
+ #ifdef OPERAND_A_CHANNEL_R
41
+ a=vec4f(a.rrr,a.a);
42
+ #elif defined(OPERAND_A_CHANNEL_G)
43
+ a=vec4f(a.ggg,a.a);
44
+ #elif defined(OPERAND_A_CHANNEL_B)
45
+ a=vec4f(a.bbb,a.a);
46
+ #elif defined(OPERAND_A_CHANNEL_A)
47
+ a=a.aaaa;
48
+ #endif
49
+ #ifdef OPERAND_A_FACTOR
50
+ a*=uniforms.factorA;
51
+ #endif
52
+ #else
53
+ let a: vec4f=uniforms.factorA;
54
+ #endif
55
+ #ifdef OPERAND_B_TEXTURE
56
+ #ifdef OPERAND_B_MATRIX
57
+ var b: vec4f=textureSample(textureB,textureBSampler,(uniforms.textureBMatrix*vec4f(uv,0.0,1.0)).xy);
58
+ #else
59
+ var b: vec4f=textureSample(textureB,textureBSampler,uv);
60
+ #endif
61
+ #ifdef OPERAND_B_SRGB
62
+ b=vec4f(mix(b.rgb/vec3f(12.92),pow((b.rgb+vec3f(0.055))/vec3f(1.055),vec3f(2.4)),step(vec3f(0.04045),b.rgb)),b.a);
63
+ #endif
64
+ #ifdef OPERAND_B_CHANNEL_R
65
+ b=vec4f(b.rrr,b.a);
66
+ #elif defined(OPERAND_B_CHANNEL_G)
67
+ b=vec4f(b.ggg,b.a);
68
+ #elif defined(OPERAND_B_CHANNEL_B)
69
+ b=vec4f(b.bbb,b.a);
70
+ #elif defined(OPERAND_B_CHANNEL_A)
71
+ b=b.aaaa;
72
+ #endif
73
+ #ifdef OPERAND_B_FACTOR
74
+ b*=uniforms.factorB;
75
+ #endif
76
+ #else
77
+ let b: vec4f=uniforms.factorB;
78
+ #endif
79
+ #ifdef OP_CHANNEL_MAX
80
+ var _cmax: f32=max(max(a.r,a.g),a.b);
81
+ #ifdef CHANNEL_MAX_INCLUDE_ALPHA
82
+ _cmax=max(_cmax,a.a);var result: vec4f=vec4f(_cmax,_cmax,_cmax,_cmax);
83
+ #else
84
+ var result: vec4f=vec4f(_cmax,_cmax,_cmax,a.a);
85
+ #endif
86
+ #elif defined(OP_INVERT)
87
+ var _ir: f32=a.r; var _ig: f32=a.g; var _ib: f32=a.b; var _ia: f32=a.a;
88
+ #ifdef INVERT_R
89
+ _ir=1.0-_ir;
90
+ #endif
91
+ #ifdef INVERT_G
92
+ _ig=1.0-_ig;
93
+ #endif
94
+ #ifdef INVERT_B
95
+ _ib=1.0-_ib;
96
+ #endif
97
+ #ifdef INVERT_A
98
+ _ia=1.0-_ia;
99
+ #endif
100
+ var result: vec4f=vec4f(_ir,_ig,_ib,_ia);
101
+ #elif defined(OP_LERP)
102
+ #ifdef LERP_T_TEXTURE
103
+ #ifdef LERP_T_MATRIX
104
+ var t: vec4f=textureSample(textureT,textureTSampler,(uniforms.textureTMatrix*vec4f(uv,0.0,1.0)).xy);
105
+ #else
106
+ var t: vec4f=textureSample(textureT,textureTSampler,uv);
107
+ #endif
108
+ #ifdef LERP_T_SRGB
109
+ t=vec4f(mix(t.rgb/vec3f(12.92),pow((t.rgb+vec3f(0.055))/vec3f(1.055),vec3f(2.4)),step(vec3f(0.04045),t.rgb)),t.a);
110
+ #endif
111
+ #ifdef LERP_T_CHANNEL_R
112
+ t=vec4f(t.rrr,t.a);
113
+ #elif defined(LERP_T_CHANNEL_G)
114
+ t=vec4f(t.ggg,t.a);
115
+ #elif defined(LERP_T_CHANNEL_B)
116
+ t=vec4f(t.bbb,t.a);
117
+ #elif defined(LERP_T_CHANNEL_A)
118
+ t=t.aaaa;
119
+ #endif
120
+ #ifdef LERP_T_FACTOR
121
+ t*=uniforms.factorT;
122
+ #endif
123
+ #else
124
+ let t: vec4f=uniforms.factorT;
125
+ #endif
126
+ var result: vec4f=mix(a,b,t);
127
+ #elif defined(OP_MAX)
128
+ var result: vec4f=max(a,b);
129
+ #else
130
+ var result: vec4f=a*b;
131
+ #endif
132
+ #if defined(OUTPUT_MASK_R_ZERO) || defined(OUTPUT_MASK_G_ZERO) || defined(OUTPUT_MASK_B_ZERO) || defined(OUTPUT_MASK_A_ONE)
133
+ var _omr: f32=result.r; var _omg: f32=result.g; var _omb: f32=result.b; var _oma: f32=result.a;
134
+ #ifdef OUTPUT_MASK_R_ZERO
135
+ _omr=0.0;
136
+ #endif
137
+ #ifdef OUTPUT_MASK_G_ZERO
138
+ _omg=0.0;
139
+ #endif
140
+ #ifdef OUTPUT_MASK_B_ZERO
141
+ _omb=0.0;
142
+ #endif
143
+ #ifdef OUTPUT_MASK_A_ONE
144
+ _oma=1.0;
145
+ #endif
146
+ result=vec4f(_omr,_omg,_omb,_oma);
147
+ #endif
148
+ #ifdef OUTPUT_SRGB
149
+ result=vec4f(mix(result.rgb*vec3f(12.92),pow(result.rgb,vec3f(1.0/2.4))*vec3f(1.055)-vec3f(0.055),step(vec3f(0.0031308),result.rgb)),result.a);
150
+ #endif
151
+ fragmentOutputs.color=result;}
152
+ `;
153
+ f.ShadersStoreWGSL[e] || (f.ShadersStoreWGSL[e] = r);
154
+ const i = { name: e, shader: r };
155
+ export {
156
+ i as textureProcessorPixelShaderWGSL
157
+ };
@@ -0,0 +1,40 @@
1
+ import { ak as x } from "./index-CS3Icp_r.js";
2
+ function P(t, e, f, s, o, n, l, i) {
3
+ const a = e.getEngine();
4
+ return e.isReady = !1, o = o ?? e.samplingMode, s = s ?? e.type, n = n ?? e.format, l = l ?? e.width, i = i ?? e.height, s === -1 && (s = 0), new Promise((w) => {
5
+ const r = new x("postprocess", t, null, null, 1, null, o, a, !1, void 0, s, void 0, null, !1, n);
6
+ r.externalTextureSamplerBinding = !0;
7
+ const d = a.createRenderTargetTexture({ width: l, height: i }, {
8
+ generateDepthBuffer: !1,
9
+ generateMipMaps: !1,
10
+ generateStencilBuffer: !1,
11
+ samplingMode: o,
12
+ type: s,
13
+ format: n
14
+ });
15
+ r.onEffectCreatedObservable.addOnce((g) => {
16
+ g.executeWhenCompiled(() => {
17
+ r.onApply = (u) => {
18
+ u._bindTexture("textureSampler", e), u.setFloat2("scale", 1, 1);
19
+ }, f.postProcessManager.directRender([r], d, !0), a.restoreDefaultFramebuffer(), a._releaseTexture(e), r && r.dispose(), d._swapAndDie(e), e.type = s, e.format = 5, e.isReady = !0, w(e);
20
+ });
21
+ });
22
+ });
23
+ }
24
+ let c, p;
25
+ function b(t) {
26
+ c || (c = new Float32Array(1), p = new Int32Array(c.buffer)), c[0] = t;
27
+ const e = p[0];
28
+ let f = e >> 16 & 32768, s = e >> 12 & 2047;
29
+ const o = e >> 23 & 255;
30
+ return o < 103 ? f : o > 142 ? (f |= 31744, f |= (o == 255 ? 0 : 1) && e & 8388607, f) : o < 113 ? (s |= 2048, f |= (s >> 114 - o) + (s >> 113 - o & 1), f) : (f |= o - 112 << 10 | s >> 1, f += s & 1, f);
31
+ }
32
+ function h(t) {
33
+ const e = (t & 32768) >> 15, f = (t & 31744) >> 10, s = t & 1023;
34
+ return f === 0 ? (e ? -1 : 1) * Math.pow(2, -14) * (s / Math.pow(2, 10)) : f == 31 ? s ? NaN : (e ? -1 : 1) * (1 / 0) : (e ? -1 : 1) * Math.pow(2, f - 15) * (1 + s / Math.pow(2, 10));
35
+ }
36
+ export {
37
+ P as A,
38
+ h as F,
39
+ b as T
40
+ };
@@ -0,0 +1,198 @@
1
+ import { a7 as A } from "./index-CS3Icp_r.js";
2
+ const U = 1, d = 2, N = 3, L = 9, O = 10, Y = 11, k = 48, z = 4, P = 0, B = 1, C = 2, M = 3;
3
+ function G(o) {
4
+ let n = 0;
5
+ return {
6
+ id_length: o[n++],
7
+ colormap_type: o[n++],
8
+ image_type: o[n++],
9
+ colormap_index: o[n++] | o[n++] << 8,
10
+ colormap_length: o[n++] | o[n++] << 8,
11
+ colormap_size: o[n++],
12
+ origin: [o[n++] | o[n++] << 8, o[n++] | o[n++] << 8],
13
+ width: o[n++] | o[n++] << 8,
14
+ height: o[n++] | o[n++] << 8,
15
+ pixel_size: o[n++],
16
+ flags: o[n]
17
+ };
18
+ }
19
+ function R(o, n) {
20
+ if (n.length < 19) {
21
+ A.Error("Unable to load TGA file - Not enough data to contain header");
22
+ return;
23
+ }
24
+ let c = 18;
25
+ const r = G(n);
26
+ if (r.id_length + c > n.length) {
27
+ A.Error("Unable to load TGA file - Not enough data");
28
+ return;
29
+ }
30
+ c += r.id_length;
31
+ let _ = !1, f = !1, p = !1;
32
+ switch (r.image_type) {
33
+ case L:
34
+ _ = !0;
35
+ // eslint-disable-next-line no-fallthrough
36
+ case U:
37
+ f = !0;
38
+ break;
39
+ case O:
40
+ _ = !0;
41
+ // eslint-disable-next-line no-fallthrough
42
+ case d:
43
+ break;
44
+ case Y:
45
+ _ = !0;
46
+ // eslint-disable-next-line no-fallthrough
47
+ case N:
48
+ p = !0;
49
+ break;
50
+ }
51
+ let m;
52
+ const u = r.pixel_size >> 3, g = r.width * r.height * u;
53
+ let s;
54
+ if (f && (s = n.subarray(c, c += r.colormap_length * (r.colormap_size >> 3))), _) {
55
+ m = new Uint8Array(g);
56
+ let I, y, w, b = 0;
57
+ const T = new Uint8Array(u);
58
+ for (; c < g && b < g; )
59
+ if (I = n[c++], y = (I & 127) + 1, I & 128) {
60
+ for (w = 0; w < u; ++w)
61
+ T[w] = n[c++];
62
+ for (w = 0; w < y; ++w)
63
+ m.set(T, b + w * u);
64
+ b += u * y;
65
+ } else {
66
+ for (y *= u, w = 0; w < y; ++w)
67
+ m[b + w] = n[c++];
68
+ b += y;
69
+ }
70
+ } else
71
+ m = n.subarray(c, c + (f ? r.width * r.height : g));
72
+ let h, a, i, t, e, l;
73
+ switch ((r.flags & k) >> z) {
74
+ default:
75
+ case C:
76
+ h = 0, i = 1, l = r.width, a = 0, t = 1, e = r.height;
77
+ break;
78
+ case P:
79
+ h = 0, i = 1, l = r.width, a = r.height - 1, t = -1, e = -1;
80
+ break;
81
+ case M:
82
+ h = r.width - 1, i = -1, l = -1, a = 0, t = 1, e = r.height;
83
+ break;
84
+ case B:
85
+ h = r.width - 1, i = -1, l = -1, a = r.height - 1, t = -1, e = -1;
86
+ break;
87
+ }
88
+ const x = "_getImageData" + (p ? "Grey" : "") + r.pixel_size + "bits", D = j[x](r, s, m, a, t, e, h, i, l);
89
+ o.getEngine()._uploadDataToTextureDirectly(o, D);
90
+ }
91
+ function H(o, n, c, r, _, f, p, m, u) {
92
+ const g = c, s = n, h = o.width, a = o.height;
93
+ let i, t = 0, e, l;
94
+ const x = new Uint8Array(h * a * 4);
95
+ for (l = r; l !== f; l += _)
96
+ for (e = p; e !== u; e += m, t++)
97
+ i = g[t], x[(e + h * l) * 4 + 3] = 255, x[(e + h * l) * 4 + 2] = s[i * 3 + 0], x[(e + h * l) * 4 + 1] = s[i * 3 + 1], x[(e + h * l) * 4 + 0] = s[i * 3 + 2];
98
+ return x;
99
+ }
100
+ function S(o, n, c, r, _, f, p, m, u) {
101
+ const g = c, s = o.width, h = o.height;
102
+ let a, i = 0, t, e;
103
+ const l = new Uint8Array(s * h * 4);
104
+ for (e = r; e !== f; e += _)
105
+ for (t = p; t !== u; t += m, i += 2) {
106
+ a = g[i + 0] + (g[i + 1] << 8);
107
+ const x = ((a & 31744) >> 10) * 255 / 31 | 0, D = ((a & 992) >> 5) * 255 / 31 | 0, E = (a & 31) * 255 / 31 | 0;
108
+ l[(t + s * e) * 4 + 0] = x, l[(t + s * e) * 4 + 1] = D, l[(t + s * e) * 4 + 2] = E, l[(t + s * e) * 4 + 3] = a & 32768 ? 0 : 255;
109
+ }
110
+ return l;
111
+ }
112
+ function X(o, n, c, r, _, f, p, m, u) {
113
+ const g = c, s = o.width, h = o.height;
114
+ let a = 0, i, t;
115
+ const e = new Uint8Array(s * h * 4);
116
+ for (t = r; t !== f; t += _)
117
+ for (i = p; i !== u; i += m, a += 3)
118
+ e[(i + s * t) * 4 + 3] = 255, e[(i + s * t) * 4 + 2] = g[a + 0], e[(i + s * t) * 4 + 1] = g[a + 1], e[(i + s * t) * 4 + 0] = g[a + 2];
119
+ return e;
120
+ }
121
+ function v(o, n, c, r, _, f, p, m, u) {
122
+ const g = c, s = o.width, h = o.height;
123
+ let a = 0, i, t;
124
+ const e = new Uint8Array(s * h * 4);
125
+ for (t = r; t !== f; t += _)
126
+ for (i = p; i !== u; i += m, a += 4)
127
+ e[(i + s * t) * 4 + 2] = g[a + 0], e[(i + s * t) * 4 + 1] = g[a + 1], e[(i + s * t) * 4 + 0] = g[a + 2], e[(i + s * t) * 4 + 3] = g[a + 3];
128
+ return e;
129
+ }
130
+ function F(o, n, c, r, _, f, p, m, u) {
131
+ const g = c, s = o.width, h = o.height;
132
+ let a, i = 0, t, e;
133
+ const l = new Uint8Array(s * h * 4);
134
+ for (e = r; e !== f; e += _)
135
+ for (t = p; t !== u; t += m, i++)
136
+ a = g[i], l[(t + s * e) * 4 + 0] = a, l[(t + s * e) * 4 + 1] = a, l[(t + s * e) * 4 + 2] = a, l[(t + s * e) * 4 + 3] = 255;
137
+ return l;
138
+ }
139
+ function K(o, n, c, r, _, f, p, m, u) {
140
+ const g = c, s = o.width, h = o.height;
141
+ let a = 0, i, t;
142
+ const e = new Uint8Array(s * h * 4);
143
+ for (t = r; t !== f; t += _)
144
+ for (i = p; i !== u; i += m, a += 2)
145
+ e[(i + s * t) * 4 + 0] = g[a + 0], e[(i + s * t) * 4 + 1] = g[a + 0], e[(i + s * t) * 4 + 2] = g[a + 0], e[(i + s * t) * 4 + 3] = g[a + 1];
146
+ return e;
147
+ }
148
+ const j = {
149
+ /**
150
+ * Gets the header of a TGA file
151
+ * @param data defines the TGA data
152
+ * @returns the header
153
+ */
154
+ GetTGAHeader: G,
155
+ /**
156
+ * Uploads TGA content to a Babylon Texture
157
+ * @internal
158
+ */
159
+ UploadContent: R,
160
+ /** @internal */
161
+ _getImageData8bits: H,
162
+ /** @internal */
163
+ _getImageData16bits: S,
164
+ /** @internal */
165
+ _getImageData24bits: X,
166
+ /** @internal */
167
+ _getImageData32bits: v,
168
+ /** @internal */
169
+ _getImageDataGrey8bits: F,
170
+ /** @internal */
171
+ _getImageDataGrey16bits: K
172
+ };
173
+ class J {
174
+ constructor() {
175
+ this.supportCascades = !1;
176
+ }
177
+ /**
178
+ * Uploads the cube texture data to the WebGL texture. It has already been bound.
179
+ */
180
+ loadCubeData() {
181
+ throw ".env not supported in Cube.";
182
+ }
183
+ /**
184
+ * Uploads the 2D texture data to the WebGL texture. It has already been bound once in the callback.
185
+ * @param data contains the texture data
186
+ * @param texture defines the BabylonJS internal texture
187
+ * @param callback defines the method to call once ready to upload
188
+ */
189
+ loadData(n, c, r) {
190
+ const _ = new Uint8Array(n.buffer, n.byteOffset, n.byteLength), f = G(_);
191
+ r(f.width, f.height, c.generateMipMaps, !1, () => {
192
+ R(c, _);
193
+ });
194
+ }
195
+ }
196
+ export {
197
+ J as _TGATextureLoader
198
+ };