@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,248 @@
|
|
|
1
|
+
import { F } from "./flowGraphCachedOperationBlock-CP1ZiuIB.js";
|
|
2
|
+
import { aR as l, V as n, aQ as h, U as g, aP as o, ad as V, aX as c, bg as _, aW as D, bf as I, aV as w, be as d, O as G, aS as m, aK as i } from "./index-CS3Icp_r.js";
|
|
3
|
+
class p extends F {
|
|
4
|
+
/**
|
|
5
|
+
* Base class for blocks that combine multiple numeric inputs into a single result.
|
|
6
|
+
* Handles registering data inputs and managing cached outputs.
|
|
7
|
+
* @param numberOfInputs The number of input values to combine.
|
|
8
|
+
* @param type The type of the result.
|
|
9
|
+
* @param config The block configuration.
|
|
10
|
+
*/
|
|
11
|
+
constructor(t, a, e) {
|
|
12
|
+
super(a, e);
|
|
13
|
+
for (let s = 0; s < t; s++)
|
|
14
|
+
this.registerDataInput(`input_${s}`, m, 0);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
class r extends G {
|
|
18
|
+
/**
|
|
19
|
+
* Creates an instance of FlowGraphMathExtractBlock.
|
|
20
|
+
*
|
|
21
|
+
* @param numberOfOutputs - The number of outputs to be extracted from the input.
|
|
22
|
+
* @param type - The type of the input data.
|
|
23
|
+
* @param config - Optional configuration for the flow graph block.
|
|
24
|
+
*/
|
|
25
|
+
constructor(t, a, e) {
|
|
26
|
+
super(e), this.registerDataInput("input", a);
|
|
27
|
+
for (let s = 0; s < t; s++)
|
|
28
|
+
this.registerDataOutput(`output_${s}`, m, 0);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
class b extends p {
|
|
32
|
+
constructor(t) {
|
|
33
|
+
super(2, w, t);
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* @internal
|
|
37
|
+
* Combines two floats into a new Vector2
|
|
38
|
+
*/
|
|
39
|
+
_doOperation(t) {
|
|
40
|
+
t._hasExecutionVariable(this, "cachedVector") || t._setExecutionVariable(this, "cachedVector", new d());
|
|
41
|
+
const a = t._getExecutionVariable(this, "cachedVector", null);
|
|
42
|
+
return a.set(this.getDataInput("input_0").getValue(t), this.getDataInput("input_1").getValue(t)), a;
|
|
43
|
+
}
|
|
44
|
+
getClassName() {
|
|
45
|
+
return "FlowGraphCombineVector2Block";
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
i("FlowGraphCombineVector2Block", b);
|
|
49
|
+
class k extends p {
|
|
50
|
+
constructor(t) {
|
|
51
|
+
super(3, D, t);
|
|
52
|
+
}
|
|
53
|
+
_doOperation(t) {
|
|
54
|
+
t._hasExecutionVariable(this, "cachedVector") || t._setExecutionVariable(this, "cachedVector", new I());
|
|
55
|
+
const a = t._getExecutionVariable(this, "cachedVector", null);
|
|
56
|
+
return a.set(this.getDataInput("input_0").getValue(t), this.getDataInput("input_1").getValue(t), this.getDataInput("input_2").getValue(t)), a;
|
|
57
|
+
}
|
|
58
|
+
getClassName() {
|
|
59
|
+
return "FlowGraphCombineVector3Block";
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
i("FlowGraphCombineVector3Block", k);
|
|
63
|
+
class B extends p {
|
|
64
|
+
constructor(t) {
|
|
65
|
+
super(4, c, t);
|
|
66
|
+
}
|
|
67
|
+
_doOperation(t) {
|
|
68
|
+
t._hasExecutionVariable(this, "cachedVector") || t._setExecutionVariable(this, "cachedVector", new _());
|
|
69
|
+
const a = t._getExecutionVariable(this, "cachedVector", null);
|
|
70
|
+
return a.set(this.getDataInput("input_0").getValue(t), this.getDataInput("input_1").getValue(t), this.getDataInput("input_2").getValue(t), this.getDataInput("input_3").getValue(t)), a;
|
|
71
|
+
}
|
|
72
|
+
getClassName() {
|
|
73
|
+
return "FlowGraphCombineVector4Block";
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
i("FlowGraphCombineVector4Block", B);
|
|
77
|
+
class M extends p {
|
|
78
|
+
constructor(t) {
|
|
79
|
+
super(16, o, t);
|
|
80
|
+
}
|
|
81
|
+
_doOperation(t) {
|
|
82
|
+
t._hasExecutionVariable(this, "cachedMatrix") || t._setExecutionVariable(this, "cachedMatrix", new V());
|
|
83
|
+
const a = t._getExecutionVariable(this, "cachedMatrix", null);
|
|
84
|
+
return this.config?.inputIsColumnMajor ? a.set(this.getDataInput("input_0").getValue(t), this.getDataInput("input_4").getValue(t), this.getDataInput("input_8").getValue(t), this.getDataInput("input_12").getValue(t), this.getDataInput("input_1").getValue(t), this.getDataInput("input_5").getValue(t), this.getDataInput("input_9").getValue(t), this.getDataInput("input_13").getValue(t), this.getDataInput("input_2").getValue(t), this.getDataInput("input_6").getValue(t), this.getDataInput("input_10").getValue(t), this.getDataInput("input_14").getValue(t), this.getDataInput("input_3").getValue(t), this.getDataInput("input_7").getValue(t), this.getDataInput("input_11").getValue(t), this.getDataInput("input_15").getValue(t)) : a.set(this.getDataInput("input_0").getValue(t), this.getDataInput("input_1").getValue(t), this.getDataInput("input_2").getValue(t), this.getDataInput("input_3").getValue(t), this.getDataInput("input_4").getValue(t), this.getDataInput("input_5").getValue(t), this.getDataInput("input_6").getValue(t), this.getDataInput("input_7").getValue(t), this.getDataInput("input_8").getValue(t), this.getDataInput("input_9").getValue(t), this.getDataInput("input_10").getValue(t), this.getDataInput("input_11").getValue(t), this.getDataInput("input_12").getValue(t), this.getDataInput("input_13").getValue(t), this.getDataInput("input_14").getValue(t), this.getDataInput("input_15").getValue(t)), a;
|
|
85
|
+
}
|
|
86
|
+
getClassName() {
|
|
87
|
+
return "FlowGraphCombineMatrixBlock";
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
i("FlowGraphCombineMatrixBlock", M);
|
|
91
|
+
class E extends p {
|
|
92
|
+
constructor(t) {
|
|
93
|
+
super(4, h, t);
|
|
94
|
+
}
|
|
95
|
+
_doOperation(t) {
|
|
96
|
+
t._hasExecutionVariable(this, "cachedMatrix") || t._setExecutionVariable(this, "cachedMatrix", new g());
|
|
97
|
+
const a = t._getExecutionVariable(this, "cachedMatrix", null), e = this.config?.inputIsColumnMajor ? [
|
|
98
|
+
// column to row-major
|
|
99
|
+
this.getDataInput("input_0").getValue(t),
|
|
100
|
+
this.getDataInput("input_2").getValue(t),
|
|
101
|
+
this.getDataInput("input_1").getValue(t),
|
|
102
|
+
this.getDataInput("input_3").getValue(t)
|
|
103
|
+
] : [
|
|
104
|
+
this.getDataInput("input_0").getValue(t),
|
|
105
|
+
this.getDataInput("input_1").getValue(t),
|
|
106
|
+
this.getDataInput("input_2").getValue(t),
|
|
107
|
+
this.getDataInput("input_3").getValue(t)
|
|
108
|
+
];
|
|
109
|
+
return a.fromArray(e), a;
|
|
110
|
+
}
|
|
111
|
+
getClassName() {
|
|
112
|
+
return "FlowGraphCombineMatrix2DBlock";
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
i("FlowGraphCombineMatrix2DBlock", E);
|
|
116
|
+
class C extends p {
|
|
117
|
+
constructor(t) {
|
|
118
|
+
super(9, l, t);
|
|
119
|
+
}
|
|
120
|
+
_doOperation(t) {
|
|
121
|
+
t._hasExecutionVariable(this, "cachedMatrix") || t._setExecutionVariable(this, "cachedMatrix", new n());
|
|
122
|
+
const a = t._getExecutionVariable(this, "cachedMatrix", null), e = this.config?.inputIsColumnMajor ? [
|
|
123
|
+
// column to row major
|
|
124
|
+
this.getDataInput("input_0").getValue(t),
|
|
125
|
+
this.getDataInput("input_3").getValue(t),
|
|
126
|
+
this.getDataInput("input_6").getValue(t),
|
|
127
|
+
this.getDataInput("input_1").getValue(t),
|
|
128
|
+
this.getDataInput("input_4").getValue(t),
|
|
129
|
+
this.getDataInput("input_7").getValue(t),
|
|
130
|
+
this.getDataInput("input_2").getValue(t),
|
|
131
|
+
this.getDataInput("input_5").getValue(t),
|
|
132
|
+
this.getDataInput("input_8").getValue(t)
|
|
133
|
+
] : [
|
|
134
|
+
this.getDataInput("input_0").getValue(t),
|
|
135
|
+
this.getDataInput("input_1").getValue(t),
|
|
136
|
+
this.getDataInput("input_2").getValue(t),
|
|
137
|
+
this.getDataInput("input_3").getValue(t),
|
|
138
|
+
this.getDataInput("input_4").getValue(t),
|
|
139
|
+
this.getDataInput("input_5").getValue(t),
|
|
140
|
+
this.getDataInput("input_6").getValue(t),
|
|
141
|
+
this.getDataInput("input_7").getValue(t),
|
|
142
|
+
this.getDataInput("input_8").getValue(t)
|
|
143
|
+
];
|
|
144
|
+
return a.fromArray(e), a;
|
|
145
|
+
}
|
|
146
|
+
getClassName() {
|
|
147
|
+
return "FlowGraphCombineMatrix3DBlock";
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
i("FlowGraphCombineMatrix3DBlock", C);
|
|
151
|
+
class O extends r {
|
|
152
|
+
constructor(t) {
|
|
153
|
+
super(2, w, t);
|
|
154
|
+
}
|
|
155
|
+
_updateOutputs(t) {
|
|
156
|
+
let a = this.getDataInput("input")?.getValue(t);
|
|
157
|
+
a || (a = d.Zero(), this.getDataInput("input").setValue(a, t)), this.getDataOutput("output_0").setValue(a.x, t), this.getDataOutput("output_1").setValue(a.y, t);
|
|
158
|
+
}
|
|
159
|
+
getClassName() {
|
|
160
|
+
return "FlowGraphExtractVector2Block";
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
i("FlowGraphExtractVector2Block", O);
|
|
164
|
+
class f extends r {
|
|
165
|
+
constructor(t) {
|
|
166
|
+
super(3, D, t);
|
|
167
|
+
}
|
|
168
|
+
_updateOutputs(t) {
|
|
169
|
+
let a = this.getDataInput("input")?.getValue(t);
|
|
170
|
+
a || (a = I.Zero(), this.getDataInput("input").setValue(a, t)), this.getDataOutput("output_0").setValue(a.x, t), this.getDataOutput("output_1").setValue(a.y, t), this.getDataOutput("output_2").setValue(a.z, t);
|
|
171
|
+
}
|
|
172
|
+
getClassName() {
|
|
173
|
+
return "FlowGraphExtractVector3Block";
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
i("FlowGraphExtractVector3Block", f);
|
|
177
|
+
class y extends r {
|
|
178
|
+
constructor(t) {
|
|
179
|
+
super(4, c, t);
|
|
180
|
+
}
|
|
181
|
+
_updateOutputs(t) {
|
|
182
|
+
let a = this.getDataInput("input")?.getValue(t);
|
|
183
|
+
a || (a = _.Zero(), this.getDataInput("input").setValue(a, t)), this.getDataOutput("output_0").setValue(a.x, t), this.getDataOutput("output_1").setValue(a.y, t), this.getDataOutput("output_2").setValue(a.z, t), this.getDataOutput("output_3").setValue(a.w, t);
|
|
184
|
+
}
|
|
185
|
+
getClassName() {
|
|
186
|
+
return "FlowGraphExtractVector4Block";
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
i("FlowGraphExtractVector4Block", y);
|
|
190
|
+
class N extends r {
|
|
191
|
+
constructor(t) {
|
|
192
|
+
super(16, o, t);
|
|
193
|
+
}
|
|
194
|
+
_updateOutputs(t) {
|
|
195
|
+
let a = this.getDataInput("input")?.getValue(t);
|
|
196
|
+
a || (a = V.Identity(), this.getDataInput("input").setValue(a, t));
|
|
197
|
+
for (let e = 0; e < 16; e++)
|
|
198
|
+
this.getDataOutput(`output_${e}`).setValue(a.m[e], t);
|
|
199
|
+
}
|
|
200
|
+
getClassName() {
|
|
201
|
+
return "FlowGraphExtractMatrixBlock";
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
i("FlowGraphExtractMatrixBlock", N);
|
|
205
|
+
class R extends r {
|
|
206
|
+
constructor(t) {
|
|
207
|
+
super(4, h, t);
|
|
208
|
+
}
|
|
209
|
+
_updateOutputs(t) {
|
|
210
|
+
let a = this.getDataInput("input")?.getValue(t);
|
|
211
|
+
a || (a = new g(), this.getDataInput("input").setValue(a, t));
|
|
212
|
+
for (let e = 0; e < 4; e++)
|
|
213
|
+
this.getDataOutput(`output_${e}`).setValue(a.m[e], t);
|
|
214
|
+
}
|
|
215
|
+
getClassName() {
|
|
216
|
+
return "FlowGraphExtractMatrix2DBlock";
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
i("FlowGraphExtractMatrix2DBlock", R);
|
|
220
|
+
class T extends r {
|
|
221
|
+
constructor(t) {
|
|
222
|
+
super(9, l, t);
|
|
223
|
+
}
|
|
224
|
+
_updateOutputs(t) {
|
|
225
|
+
let a = this.getDataInput("input")?.getValue(t);
|
|
226
|
+
a || (a = new n(), this.getDataInput("input").setValue(a, t));
|
|
227
|
+
for (let e = 0; e < 9; e++)
|
|
228
|
+
this.getDataOutput(`output_${e}`).setValue(a.m[e], t);
|
|
229
|
+
}
|
|
230
|
+
getClassName() {
|
|
231
|
+
return "FlowGraphExtractMatrix3DBlock";
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
i("FlowGraphExtractMatrix3DBlock", T);
|
|
235
|
+
export {
|
|
236
|
+
E as FlowGraphCombineMatrix2DBlock,
|
|
237
|
+
C as FlowGraphCombineMatrix3DBlock,
|
|
238
|
+
M as FlowGraphCombineMatrixBlock,
|
|
239
|
+
b as FlowGraphCombineVector2Block,
|
|
240
|
+
k as FlowGraphCombineVector3Block,
|
|
241
|
+
B as FlowGraphCombineVector4Block,
|
|
242
|
+
R as FlowGraphExtractMatrix2DBlock,
|
|
243
|
+
T as FlowGraphExtractMatrix3DBlock,
|
|
244
|
+
N as FlowGraphExtractMatrixBlock,
|
|
245
|
+
O as FlowGraphExtractVector2Block,
|
|
246
|
+
f as FlowGraphExtractVector3Block,
|
|
247
|
+
y as FlowGraphExtractVector4Block
|
|
248
|
+
};
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { O as M, aW as u, aT as g, aP as w, ad as m, aN as I, bf as n, aJ as x, bW as e, aS as k, aK as r } from "./index-CS3Icp_r.js";
|
|
2
|
+
import { F as V } from "./flowGraphUnaryOperationBlock-B0Shf-lJ.js";
|
|
3
|
+
import { F as b } from "./flowGraphBinaryOperationBlock-Bj7TANCc.js";
|
|
4
|
+
class D extends V {
|
|
5
|
+
/**
|
|
6
|
+
* Creates a new instance of the block.
|
|
7
|
+
* @param config the configuration of the block
|
|
8
|
+
*/
|
|
9
|
+
constructor(t) {
|
|
10
|
+
super(e(
|
|
11
|
+
t?.matrixType || "Matrix"
|
|
12
|
+
/* FlowGraphTypes.Matrix */
|
|
13
|
+
), e(
|
|
14
|
+
t?.matrixType || "Matrix"
|
|
15
|
+
/* FlowGraphTypes.Matrix */
|
|
16
|
+
), (a) => a.transpose ? a.transpose() : m.Transpose(a), "FlowGraphTransposeBlock", t);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
r("FlowGraphTransposeBlock", D);
|
|
20
|
+
class E extends V {
|
|
21
|
+
/**
|
|
22
|
+
* Creates a new instance of the block.
|
|
23
|
+
* @param config the configuration of the block
|
|
24
|
+
*/
|
|
25
|
+
constructor(t) {
|
|
26
|
+
super(e(
|
|
27
|
+
t?.matrixType || "Matrix"
|
|
28
|
+
/* FlowGraphTypes.Matrix */
|
|
29
|
+
), k, (a) => a.determinant(), "FlowGraphDeterminantBlock", t);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
r("FlowGraphDeterminantBlock", E);
|
|
33
|
+
class _ extends V {
|
|
34
|
+
/**
|
|
35
|
+
* Creates a new instance of the inverse block.
|
|
36
|
+
* @param config the configuration of the block
|
|
37
|
+
*/
|
|
38
|
+
constructor(t) {
|
|
39
|
+
super(e(
|
|
40
|
+
t?.matrixType || "Matrix"
|
|
41
|
+
/* FlowGraphTypes.Matrix */
|
|
42
|
+
), e(
|
|
43
|
+
t?.matrixType || "Matrix"
|
|
44
|
+
/* FlowGraphTypes.Matrix */
|
|
45
|
+
), (a) => a.inverse ? a.inverse() : m.Invert(a), "FlowGraphInvertMatrixBlock", t);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
r("FlowGraphInvertMatrixBlock", _);
|
|
49
|
+
class v extends b {
|
|
50
|
+
/**
|
|
51
|
+
* Creates a new instance of the multiplication block.
|
|
52
|
+
* Note - this is similar to the math multiplication if not using matrix per-component multiplication.
|
|
53
|
+
* @param config the configuration of the block
|
|
54
|
+
*/
|
|
55
|
+
constructor(t) {
|
|
56
|
+
super(e(
|
|
57
|
+
t?.matrixType || "Matrix"
|
|
58
|
+
/* FlowGraphTypes.Matrix */
|
|
59
|
+
), e(
|
|
60
|
+
t?.matrixType || "Matrix"
|
|
61
|
+
/* FlowGraphTypes.Matrix */
|
|
62
|
+
), e(
|
|
63
|
+
t?.matrixType || "Matrix"
|
|
64
|
+
/* FlowGraphTypes.Matrix */
|
|
65
|
+
), (a, i) => i.multiply(a), "FlowGraphMatrixMultiplicationBlock", t);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
r("FlowGraphMatrixMultiplicationBlock", v);
|
|
69
|
+
class O extends M {
|
|
70
|
+
constructor(t) {
|
|
71
|
+
super(t), this.input = this.registerDataInput("input", w), this.position = this.registerDataOutput("position", u), this.rotationQuaternion = this.registerDataOutput("rotationQuaternion", g), this.scaling = this.registerDataOutput("scaling", u), this.isValid = this.registerDataOutput("isValid", I, !1);
|
|
72
|
+
}
|
|
73
|
+
_updateOutputs(t) {
|
|
74
|
+
const a = t._getExecutionVariable(this, "executionId", -1), i = t._getExecutionVariable(this, "cachedPosition", null), s = t._getExecutionVariable(this, "cachedRotation", null), h = t._getExecutionVariable(this, "cachedScaling", null);
|
|
75
|
+
if (a === t.executionId && i && s && h)
|
|
76
|
+
this.position.setValue(i, t), this.rotationQuaternion.setValue(s, t), this.scaling.setValue(h, t);
|
|
77
|
+
else {
|
|
78
|
+
const l = this.input.getValue(t), p = i || new n(), c = s || new x(), d = h || new n(), F = Math.round(l.m[3] * 1e4) / 1e4, G = Math.round(l.m[7] * 1e4) / 1e4, y = Math.round(l.m[11] * 1e4) / 1e4, B = Math.round(l.m[15] * 1e4) / 1e4;
|
|
79
|
+
if (F !== 0 || G !== 0 || y !== 0 || B !== 1) {
|
|
80
|
+
this.isValid.setValue(!1, t), this.position.setValue(n.Zero(), t), this.rotationQuaternion.setValue(x.Identity(), t), this.scaling.setValue(n.One(), t);
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
const T = l.decompose(d, c, p);
|
|
84
|
+
this.isValid.setValue(T, t), this.position.setValue(p, t), this.rotationQuaternion.setValue(c, t), this.scaling.setValue(d, t), t._setExecutionVariable(this, "cachedPosition", p), t._setExecutionVariable(this, "cachedRotation", c), t._setExecutionVariable(this, "cachedScaling", d), t._setExecutionVariable(this, "executionId", t.executionId);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
getClassName() {
|
|
88
|
+
return "FlowGraphMatrixDecompose";
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
r("FlowGraphMatrixDecompose", O);
|
|
92
|
+
class Q extends M {
|
|
93
|
+
constructor(t) {
|
|
94
|
+
super(t), this.position = this.registerDataInput("position", u), this.rotationQuaternion = this.registerDataInput("rotationQuaternion", g), this.scaling = this.registerDataInput("scaling", u), this.value = this.registerDataOutput("value", w);
|
|
95
|
+
}
|
|
96
|
+
_updateOutputs(t) {
|
|
97
|
+
const a = t._getExecutionVariable(this, "executionId", -1), i = t._getExecutionVariable(this, "cachedMatrix", null);
|
|
98
|
+
if (a === t.executionId && i)
|
|
99
|
+
this.value.setValue(i, t);
|
|
100
|
+
else {
|
|
101
|
+
const s = m.Compose(this.scaling.getValue(t), this.rotationQuaternion.getValue(t), this.position.getValue(t));
|
|
102
|
+
this.value.setValue(s, t), t._setExecutionVariable(this, "cachedMatrix", s), t._setExecutionVariable(this, "executionId", t.executionId);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
getClassName() {
|
|
106
|
+
return "FlowGraphMatrixCompose";
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
r("FlowGraphMatrixCompose", Q);
|
|
110
|
+
export {
|
|
111
|
+
E as FlowGraphDeterminantBlock,
|
|
112
|
+
_ as FlowGraphInvertMatrixBlock,
|
|
113
|
+
Q as FlowGraphMatrixComposeBlock,
|
|
114
|
+
O as FlowGraphMatrixDecomposeBlock,
|
|
115
|
+
v as FlowGraphMatrixMultiplicationBlock,
|
|
116
|
+
D as FlowGraphTransposeBlock
|
|
117
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Q as p, aM as r, aW as a, aS as h, aj as n, bp as u, aK as c } from "./index-CS3Icp_r.js";
|
|
2
|
+
class o extends p {
|
|
3
|
+
constructor(e) {
|
|
4
|
+
super(e), this.config = e, this.type = "MeshPick", this.asset = this.registerDataInput("asset", r, e?.targetMesh), this.pickedPoint = this.registerDataOutput("pickedPoint", a), this.pickOrigin = this.registerDataOutput("pickOrigin", a), this.pointerId = this.registerDataOutput("pointerId", h), this.pickedMesh = this.registerDataOutput("pickedMesh", r), this.pointerType = this.registerDataInput("pointerType", r, n.POINTERPICK);
|
|
5
|
+
}
|
|
6
|
+
_getReferencedMesh(e) {
|
|
7
|
+
return this.asset.getValue(e);
|
|
8
|
+
}
|
|
9
|
+
_executeEvent(e, s) {
|
|
10
|
+
if (this.pointerType.getValue(e) !== s.type)
|
|
11
|
+
return !0;
|
|
12
|
+
const i = this._getReferencedMesh(e), t = s.pickInfo?.pickedMesh;
|
|
13
|
+
return (i ? !!(t && (t === i || u(t, i) || t.name === i.name)) : !!t) && t ? (this.pointerId.setValue(s.event.pointerId, e), this.pickOrigin.setValue(s.pickInfo.ray?.origin, e), this.pickedPoint.setValue(s.pickInfo.pickedPoint, e), this.pickedMesh.setValue(t, e), this._execute(e), !this.config?.stopPropagation) : (this.pointerId.resetToDefaultValue(e), this.pickOrigin.resetToDefaultValue(e), this.pickedPoint.resetToDefaultValue(e), this.pickedMesh.resetToDefaultValue(e), !0);
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* @internal
|
|
17
|
+
*/
|
|
18
|
+
_preparePendingTasks(e) {
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* @internal
|
|
22
|
+
*/
|
|
23
|
+
_cancelPendingTasks(e) {
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* @returns class name of the block.
|
|
27
|
+
*/
|
|
28
|
+
getClassName() {
|
|
29
|
+
return "FlowGraphMeshPickEventBlock";
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
c("FlowGraphMeshPickEventBlock", o);
|
|
33
|
+
export {
|
|
34
|
+
o as FlowGraphMeshPickEventBlock
|
|
35
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { R as a, aO as l, T as n, aK as u } from "./index-CS3Icp_r.js";
|
|
2
|
+
class o extends a {
|
|
3
|
+
constructor(t) {
|
|
4
|
+
super(t), this.config = t, this.outputSignals = [], this.reset = this._registerSignalInput("reset"), this.lastIndex = this.registerDataOutput("lastIndex", l, new n(-1)), this.setNumberOfOutputSignals(t?.outputSignalCount);
|
|
5
|
+
}
|
|
6
|
+
_getNextIndex(t) {
|
|
7
|
+
if (t.includes(!1) || this.config.isLoop && t.fill(!1), this.config.isRandom) {
|
|
8
|
+
const e = t.map((s, i) => s ? -1 : i).filter((s) => s !== -1);
|
|
9
|
+
return e.length ? e[Math.floor(Math.random() * e.length)] : -1;
|
|
10
|
+
} else
|
|
11
|
+
return t.indexOf(!1);
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Sets the block's output signals. Would usually be passed from the constructor but can be changed afterwards.
|
|
15
|
+
* @param numberOutputSignals the number of output flows
|
|
16
|
+
*/
|
|
17
|
+
setNumberOfOutputSignals(t = 1) {
|
|
18
|
+
for (; this.outputSignals.length > t; ) {
|
|
19
|
+
const e = this.outputSignals.pop();
|
|
20
|
+
e && (e.disconnectFromAll(), this._unregisterSignalOutput(e.name));
|
|
21
|
+
}
|
|
22
|
+
for (; this.outputSignals.length < t; )
|
|
23
|
+
this.outputSignals.push(this._registerSignalOutput(`out_${this.outputSignals.length}`));
|
|
24
|
+
}
|
|
25
|
+
_execute(t, e) {
|
|
26
|
+
if (t._hasExecutionVariable(this, "indexesUsed") || t._setExecutionVariable(this, "indexesUsed", this.outputSignals.map(() => !1)), e === this.reset) {
|
|
27
|
+
t._deleteExecutionVariable(this, "indexesUsed"), this.lastIndex.setValue(new n(-1), t);
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
const s = t._getExecutionVariable(this, "indexesUsed", []), i = this._getNextIndex(s);
|
|
31
|
+
i > -1 && (this.lastIndex.setValue(new n(i), t), s[i] = !0, t._setExecutionVariable(this, "indexesUsed", s), this.outputSignals[i]._activateSignal(t));
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* @returns class name of the block.
|
|
35
|
+
*/
|
|
36
|
+
getClassName() {
|
|
37
|
+
return "FlowGraphMultiGateBlock";
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Serializes the block.
|
|
41
|
+
* @param serializationObject the object to serialize to.
|
|
42
|
+
*/
|
|
43
|
+
serialize(t) {
|
|
44
|
+
super.serialize(t), t.config.outputSignalCount = this.config.outputSignalCount, t.config.isRandom = this.config.isRandom, t.config.loop = this.config.isLoop, t.config.startIndex = this.config.startIndex;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
u("FlowGraphMultiGateBlock", o);
|
|
48
|
+
export {
|
|
49
|
+
o as FlowGraphMultiGateBlock
|
|
50
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { S as t, aM as e, aK as i } from "./index-CS3Icp_r.js";
|
|
2
|
+
class o extends t {
|
|
3
|
+
constructor(a) {
|
|
4
|
+
super(a), this.animationToPause = this.registerDataInput("animationToPause", e);
|
|
5
|
+
}
|
|
6
|
+
_execute(a) {
|
|
7
|
+
this.animationToPause.getValue(a).pause(), this.out._activateSignal(a);
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* @returns class name of the block.
|
|
11
|
+
*/
|
|
12
|
+
getClassName() {
|
|
13
|
+
return "FlowGraphPauseAnimationBlock";
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
i("FlowGraphPauseAnimationBlock", o);
|
|
17
|
+
export {
|
|
18
|
+
o as FlowGraphPauseAnimationBlock
|
|
19
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { S as e, aM as t, aK as o } from "./index-CS3Icp_r.js";
|
|
2
|
+
class u extends e {
|
|
3
|
+
/**
|
|
4
|
+
* Constructs a new FlowGraphPauseSoundBlock.
|
|
5
|
+
* @param config - optional configuration for the block
|
|
6
|
+
*/
|
|
7
|
+
constructor(s) {
|
|
8
|
+
super(s), this.sound = this.registerDataInput("sound", t);
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
_execute(s, i) {
|
|
14
|
+
const a = this.sound.getValue(s);
|
|
15
|
+
if (!a) {
|
|
16
|
+
this._reportError(s, "No sound provided"), this.out._activateSignal(s);
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
a.state === 5 ? a.resume() : (a.state === 2 || a.state === 3) && a.pause(), this.out._activateSignal(s);
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* @returns class name of the block.
|
|
23
|
+
*/
|
|
24
|
+
getClassName() {
|
|
25
|
+
return "FlowGraphPauseSoundBlock";
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
o("FlowGraphPauseSoundBlock", u);
|
|
29
|
+
export {
|
|
30
|
+
u as FlowGraphPauseSoundBlock
|
|
31
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { Q as a, aM as l, aW as o, aS as r, aK as h } from "./index-CS3Icp_r.js";
|
|
2
|
+
class n extends a {
|
|
3
|
+
/**
|
|
4
|
+
* Constructs a new FlowGraphPhysicsCollisionEventBlock.
|
|
5
|
+
* @param config - optional configuration for the block
|
|
6
|
+
*/
|
|
7
|
+
constructor(s) {
|
|
8
|
+
super(s), this.config = s, this.body = this.registerDataInput("body", l), this.otherBody = this.registerDataOutput("otherBody", l), this.point = this.registerDataOutput("point", o), this.normal = this.registerDataOutput("normal", o), this.impulse = this.registerDataOutput("impulse", r), this.distance = this.registerDataOutput("distance", r);
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
_preparePendingTasks(s) {
|
|
14
|
+
const i = this.body.getValue(s);
|
|
15
|
+
if (!i) {
|
|
16
|
+
this._reportError(s, "No physics body provided for collision event");
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
i.setCollisionCallbackEnabled(!0);
|
|
20
|
+
const e = i.getCollisionObservable().add((t) => {
|
|
21
|
+
this._onCollision(s, t);
|
|
22
|
+
});
|
|
23
|
+
s._setExecutionVariable(this, "_collisionObserver", e), s._setExecutionVariable(this, "_subscribedBody", i);
|
|
24
|
+
}
|
|
25
|
+
_onCollision(s, i) {
|
|
26
|
+
const e = this.body.getValue(s), t = i.collider === e ? i.collidedAgainst : i.collider;
|
|
27
|
+
this.otherBody.setValue(t, s), i.point && this.point.setValue(i.point, s), i.normal && this.normal.setValue(i.normal, s), this.impulse.setValue(i.impulse, s), this.distance.setValue(i.distance, s), this._execute(s);
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* @internal
|
|
31
|
+
*/
|
|
32
|
+
_executeEvent(s, i) {
|
|
33
|
+
return !0;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* @internal
|
|
37
|
+
*/
|
|
38
|
+
_cancelPendingTasks(s) {
|
|
39
|
+
const i = s._getExecutionVariable(this, "_collisionObserver", null), e = s._getExecutionVariable(this, "_subscribedBody", null);
|
|
40
|
+
if (i && e) {
|
|
41
|
+
const t = e.getCollisionObservable();
|
|
42
|
+
t.remove(i), t.hasObservers() || e.setCollisionCallbackEnabled(!1);
|
|
43
|
+
}
|
|
44
|
+
s._setExecutionVariable(this, "_collisionObserver", null), s._setExecutionVariable(this, "_subscribedBody", null);
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* @returns class name of the block.
|
|
48
|
+
*/
|
|
49
|
+
getClassName() {
|
|
50
|
+
return "FlowGraphPhysicsCollisionEventBlock";
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
h("FlowGraphPhysicsCollisionEventBlock", n);
|
|
54
|
+
export {
|
|
55
|
+
n as FlowGraphPhysicsCollisionEventBlock
|
|
56
|
+
};
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { N as f, aS as u, aN as _, aM as l, aK as b } from "./index-CS3Icp_r.js";
|
|
2
|
+
import { AnimationGroup as y } from "./animationGroup-BhNThqQe.js";
|
|
3
|
+
class V extends f {
|
|
4
|
+
constructor(i) {
|
|
5
|
+
super(i, ["animationLoop", "animationEnd", "animationGroupLoop"]), this.config = i, this.speed = this.registerDataInput("speed", u), this.loop = this.registerDataInput("loop", _), this.from = this.registerDataInput("from", u, 0), this.to = this.registerDataInput("to", u), this.currentFrame = this.registerDataOutput("currentFrame", u), this.currentTime = this.registerDataOutput("currentTime", u), this.currentAnimationGroup = this.registerDataOutput("currentAnimationGroup", l), this.animationGroup = this.registerDataInput("animationGroup", l, i?.animationGroup), this.animation = this.registerDataInput("animation", l), this.object = this.registerDataInput("object", l);
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* @internal
|
|
9
|
+
* @param context
|
|
10
|
+
*/
|
|
11
|
+
_preparePendingTasks(i) {
|
|
12
|
+
const t = this.animationGroup.getValue(i), r = this.animation.getValue(i);
|
|
13
|
+
if (!t && !r)
|
|
14
|
+
return this._reportError(i, "No animation or animation group provided");
|
|
15
|
+
{
|
|
16
|
+
const a = this.currentAnimationGroup.getValue(i);
|
|
17
|
+
a && a !== t && a.dispose();
|
|
18
|
+
let n = t;
|
|
19
|
+
if (r && !n) {
|
|
20
|
+
const o = this.object.getValue(i);
|
|
21
|
+
if (!o)
|
|
22
|
+
return this._reportError(i, "No target object provided");
|
|
23
|
+
const h = Array.isArray(r) ? r : [r], G = h[0].name;
|
|
24
|
+
n = new y("flowGraphAnimationGroup-" + G + "-" + o.name, i.configuration.scene);
|
|
25
|
+
let g = !1;
|
|
26
|
+
const A = i._getGlobalContextVariable("interpolationAnimations", []);
|
|
27
|
+
for (const c of h)
|
|
28
|
+
n.addTargetedAnimation(c, o), A.indexOf(c.uniqueId) !== -1 && (g = !0);
|
|
29
|
+
g && this._checkInterpolationDuplications(i, h, o);
|
|
30
|
+
}
|
|
31
|
+
const s = this.speed.getValue(i) || 1, e = this.from.getValue(i) ?? 0, p = this.to.getValue(i) || n.to, d = !isFinite(p) || this.loop.getValue(i);
|
|
32
|
+
this.currentAnimationGroup.setValue(n, i);
|
|
33
|
+
const m = i._getGlobalContextVariable("currentlyRunningAnimationGroups", []);
|
|
34
|
+
m.indexOf(n.uniqueId) !== -1 && n.stop();
|
|
35
|
+
try {
|
|
36
|
+
n.start(d, s, e, p), n.onAnimationGroupEndObservable.add(() => this._onAnimationGroupEnd(i)), n.onAnimationEndObservable.add(() => this._eventsSignalOutputs.animationEnd._activateSignal(i)), n.onAnimationLoopObservable.add(() => this._eventsSignalOutputs.animationLoop._activateSignal(i)), n.onAnimationGroupLoopObservable.add(() => this._eventsSignalOutputs.animationGroupLoop._activateSignal(i)), m.push(n.uniqueId), i._setGlobalContextVariable("currentlyRunningAnimationGroups", m);
|
|
37
|
+
} catch (o) {
|
|
38
|
+
this._reportError(i, o);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
_reportError(i, t) {
|
|
43
|
+
super._reportError(i, t), this.currentFrame.setValue(-1, i), this.currentTime.setValue(-1, i);
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* @internal
|
|
47
|
+
*/
|
|
48
|
+
_executeOnTick(i) {
|
|
49
|
+
const t = this.currentAnimationGroup.getValue(i);
|
|
50
|
+
t && (this.currentFrame.setValue(t.getCurrentFrame(), i), this.currentTime.setValue(t.animatables[0]?.elapsedTime ?? 0, i));
|
|
51
|
+
}
|
|
52
|
+
_execute(i) {
|
|
53
|
+
this._startPendingTasks(i);
|
|
54
|
+
}
|
|
55
|
+
_onAnimationGroupEnd(i) {
|
|
56
|
+
this._removeFromCurrentlyRunning(i, this.currentAnimationGroup.getValue(i)), this._resetAfterCanceled(i), this.done._activateSignal(i);
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* The idea behind this function is to check every running animation group and check if the targeted animations it uses are interpolation animations.
|
|
60
|
+
* If they are, we want to see that they don't collide with the current interpolation animations that are starting to play.
|
|
61
|
+
* If they do, we want to stop the already-running animation group.
|
|
62
|
+
* @internal
|
|
63
|
+
*/
|
|
64
|
+
_checkInterpolationDuplications(i, t, r) {
|
|
65
|
+
const a = i._getGlobalContextVariable("currentlyRunningAnimationGroups", []);
|
|
66
|
+
for (const n of a) {
|
|
67
|
+
const s = i.assetsContext.animationGroups.find((e) => e.uniqueId === n);
|
|
68
|
+
if (s)
|
|
69
|
+
for (const e of s.targetedAnimations)
|
|
70
|
+
for (const p of t)
|
|
71
|
+
e.animation.targetProperty === p.targetProperty && e.target === r && this._stopAnimationGroup(i, s);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
_stopAnimationGroup(i, t) {
|
|
75
|
+
t.stop(!0), t.name.startsWith("flowGraphAnimationGroup-") && t.dispose(), this._removeFromCurrentlyRunning(i, t);
|
|
76
|
+
}
|
|
77
|
+
_removeFromCurrentlyRunning(i, t) {
|
|
78
|
+
const r = i._getGlobalContextVariable("currentlyRunningAnimationGroups", []), a = r.indexOf(t.uniqueId);
|
|
79
|
+
a !== -1 && (r.splice(a, 1), i._setGlobalContextVariable("currentlyRunningAnimationGroups", r));
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* @internal
|
|
83
|
+
* Stop any currently running animations.
|
|
84
|
+
*/
|
|
85
|
+
_cancelPendingTasks(i) {
|
|
86
|
+
const t = this.currentAnimationGroup.getValue(i);
|
|
87
|
+
t && this._stopAnimationGroup(i, t);
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* @returns class name of the block.
|
|
91
|
+
*/
|
|
92
|
+
getClassName() {
|
|
93
|
+
return "FlowGraphPlayAnimationBlock";
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
b("FlowGraphPlayAnimationBlock", V);
|
|
97
|
+
export {
|
|
98
|
+
V as FlowGraphPlayAnimationBlock
|
|
99
|
+
};
|