@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,47 @@
|
|
|
1
|
+
import { S as b, aM as o, aK as p } from "./index-CS3Icp_r.js";
|
|
2
|
+
class f extends b {
|
|
3
|
+
constructor(a) {
|
|
4
|
+
if (super(a), a.variables && a.variable)
|
|
5
|
+
throw new Error("FlowGraphSetVariableBlock: variable and variables are both defined");
|
|
6
|
+
if (a.variables)
|
|
7
|
+
for (const i of a.variables)
|
|
8
|
+
this.registerDataInput(i, o);
|
|
9
|
+
else
|
|
10
|
+
this.registerDataInput("value", o);
|
|
11
|
+
}
|
|
12
|
+
_execute(a, i) {
|
|
13
|
+
if (this.config?.variables)
|
|
14
|
+
for (const t of this.config.variables)
|
|
15
|
+
this._saveVariable(a, t);
|
|
16
|
+
else
|
|
17
|
+
this._saveVariable(a, this.config?.variable, "value");
|
|
18
|
+
this.out._activateSignal(a);
|
|
19
|
+
}
|
|
20
|
+
_saveVariable(a, i, t) {
|
|
21
|
+
const e = a._getGlobalContextVariable("currentlyRunningAnimationGroups", []);
|
|
22
|
+
for (const l of e) {
|
|
23
|
+
const s = a.assetsContext.animationGroups.find((r) => r.uniqueId == l);
|
|
24
|
+
if (s) {
|
|
25
|
+
for (const r of s.targetedAnimations)
|
|
26
|
+
if (r.target === a && r.animation.targetProperty === i) {
|
|
27
|
+
s.stop();
|
|
28
|
+
const n = e.indexOf(l);
|
|
29
|
+
n > -1 && e.splice(n, 1), a._setGlobalContextVariable("currentlyRunningAnimationGroups", e);
|
|
30
|
+
break;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
const u = this.getDataInput(t || i)?.getValue(a);
|
|
35
|
+
a.setVariable(i, u);
|
|
36
|
+
}
|
|
37
|
+
getClassName() {
|
|
38
|
+
return "FlowGraphSetVariableBlock";
|
|
39
|
+
}
|
|
40
|
+
serialize(a) {
|
|
41
|
+
super.serialize(a), a.config.variable = this.config?.variable;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
p("FlowGraphSetVariableBlock", f);
|
|
45
|
+
export {
|
|
46
|
+
f as FlowGraphSetVariableBlock
|
|
47
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { Q as r, aM as d, aK as o } from "./index-CS3Icp_r.js";
|
|
2
|
+
class u extends r {
|
|
3
|
+
/**
|
|
4
|
+
* Constructs a new FlowGraphSoundEndedEventBlock.
|
|
5
|
+
* @param config - optional configuration for the block
|
|
6
|
+
*/
|
|
7
|
+
constructor(e) {
|
|
8
|
+
super(e), this.sound = this.registerDataInput("sound", d);
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
_preparePendingTasks(e) {
|
|
14
|
+
const s = this.sound.getValue(e);
|
|
15
|
+
if (!s) {
|
|
16
|
+
this._reportError(e, "No sound provided for sound-ended event");
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
const n = s.onEndedObservable.add(() => {
|
|
20
|
+
this._execute(e);
|
|
21
|
+
});
|
|
22
|
+
e._setExecutionVariable(this, "_soundEndedObserver", n), e._setExecutionVariable(this, "_subscribedSound", s);
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* @internal
|
|
26
|
+
*/
|
|
27
|
+
_executeEvent(e, s) {
|
|
28
|
+
return !0;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* @internal
|
|
32
|
+
*/
|
|
33
|
+
_cancelPendingTasks(e) {
|
|
34
|
+
const s = e._getExecutionVariable(this, "_soundEndedObserver", null), n = e._getExecutionVariable(this, "_subscribedSound", null);
|
|
35
|
+
s && n && n.onEndedObservable.remove(s), e._setExecutionVariable(this, "_soundEndedObserver", null), e._setExecutionVariable(this, "_subscribedSound", null);
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* @returns class name of the block.
|
|
39
|
+
*/
|
|
40
|
+
getClassName() {
|
|
41
|
+
return "FlowGraphSoundEndedEventBlock";
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
o("FlowGraphSoundEndedEventBlock", u);
|
|
45
|
+
export {
|
|
46
|
+
u as FlowGraphSoundEndedEventBlock
|
|
47
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { N as o, aM as e, aS as s, a7 as r, aK as p } from "./index-CS3Icp_r.js";
|
|
2
|
+
class l extends o {
|
|
3
|
+
constructor(i) {
|
|
4
|
+
super(i), this.animationGroup = this.registerDataInput("animationGroup", e), this.stopAtFrame = this.registerDataInput("stopAtFrame", s, -1);
|
|
5
|
+
}
|
|
6
|
+
_preparePendingTasks(i) {
|
|
7
|
+
const a = this.animationGroup.getValue(i), t = this.stopAtFrame.getValue(i) ?? -1, n = i._getGlobalContextVariable("pendingStopAnimations", []);
|
|
8
|
+
n.push({ uniqueId: a.uniqueId, stopAtFrame: t }), i._setGlobalContextVariable("pendingStopAnimations", n);
|
|
9
|
+
}
|
|
10
|
+
_cancelPendingTasks(i) {
|
|
11
|
+
const a = this.animationGroup.getValue(i), t = i._getGlobalContextVariable("pendingStopAnimations", []);
|
|
12
|
+
for (let n = 0; n < t.length; n++)
|
|
13
|
+
if (t[n].uniqueId === a.uniqueId) {
|
|
14
|
+
t.splice(n, 1), i._setGlobalContextVariable("pendingStopAnimations", t);
|
|
15
|
+
break;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
_execute(i) {
|
|
19
|
+
const a = this.animationGroup.getValue(i), t = this.stopAtFrame.getValue(i) ?? -1;
|
|
20
|
+
if (!a)
|
|
21
|
+
return r.Warn("No animation group provided to stop."), this._reportError(i, "No animation group provided to stop.");
|
|
22
|
+
if (isNaN(t))
|
|
23
|
+
return this._reportError(i, "Invalid stop time.");
|
|
24
|
+
t > 0 ? this._startPendingTasks(i) : this._stopAnimation(a, i), this.out._activateSignal(i);
|
|
25
|
+
}
|
|
26
|
+
_executeOnTick(i) {
|
|
27
|
+
const a = this.animationGroup.getValue(i), t = i._getGlobalContextVariable("pendingStopAnimations", []);
|
|
28
|
+
for (let n = 0; n < t.length; n++)
|
|
29
|
+
if (t[n].uniqueId === a.uniqueId && a.getCurrentFrame() >= t[n].stopAtFrame) {
|
|
30
|
+
this._stopAnimation(a, i), t.splice(n, 1), i._setGlobalContextVariable("pendingStopAnimations", t), this.done._activateSignal(i), i._removePendingBlock(this);
|
|
31
|
+
break;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* @returns class name of the block.
|
|
36
|
+
*/
|
|
37
|
+
getClassName() {
|
|
38
|
+
return "FlowGraphStopAnimationBlock";
|
|
39
|
+
}
|
|
40
|
+
_stopAnimation(i, a) {
|
|
41
|
+
const t = a._getGlobalContextVariable("currentlyRunningAnimationGroups", []), n = t.indexOf(i.uniqueId);
|
|
42
|
+
n !== -1 && (i.stop(), t.splice(n, 1), a._setGlobalContextVariable("currentlyRunningAnimationGroups", t));
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
p("FlowGraphStopAnimationBlock", l);
|
|
46
|
+
export {
|
|
47
|
+
l as FlowGraphStopAnimationBlock
|
|
48
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { S as s, aM as a, aK as r } from "./index-CS3Icp_r.js";
|
|
2
|
+
class e extends s {
|
|
3
|
+
/**
|
|
4
|
+
* Constructs a new FlowGraphStopSoundBlock.
|
|
5
|
+
* @param config - optional configuration for the block
|
|
6
|
+
*/
|
|
7
|
+
constructor(o) {
|
|
8
|
+
super(o), this.sound = this.registerDataInput("sound", a);
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
_execute(o, u) {
|
|
14
|
+
const t = this.sound.getValue(o);
|
|
15
|
+
if (!t) {
|
|
16
|
+
this._reportError(o, "No sound provided"), this.out._activateSignal(o);
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
t.stop(), this.out._activateSignal(o);
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* @returns class name of the block.
|
|
23
|
+
*/
|
|
24
|
+
getClassName() {
|
|
25
|
+
return "FlowGraphStopSoundBlock";
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
r("FlowGraphStopSoundBlock", e);
|
|
29
|
+
export {
|
|
30
|
+
e as FlowGraphStopSoundBlock
|
|
31
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { R as a, aM as u, bZ as c, bT as l, aK as o } from "./index-CS3Icp_r.js";
|
|
2
|
+
class r extends a {
|
|
3
|
+
constructor(t) {
|
|
4
|
+
super(t), this.config = t, this.default = this._registerSignalOutput("default"), this._caseToOutputFlow = /* @__PURE__ */ new Map(), this.case = this.registerDataInput("case", u);
|
|
5
|
+
const e = this.config.cases || [];
|
|
6
|
+
for (const s of e)
|
|
7
|
+
this._caseToOutputFlow.set(s, this._registerSignalOutput(`out_${s}`));
|
|
8
|
+
}
|
|
9
|
+
_execute(t, e) {
|
|
10
|
+
const s = this.case.getValue(t);
|
|
11
|
+
let i;
|
|
12
|
+
c(s) ? i = this._getOutputFlowForCase(l(s)) : i = this._getOutputFlowForCase(s), i ? i._activateSignal(t) : this.default._activateSignal(t);
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Adds a new case to the switch block.
|
|
16
|
+
* @param newCase the new case to add.
|
|
17
|
+
*/
|
|
18
|
+
addCase(t) {
|
|
19
|
+
this.config.cases.includes(t) || (this.config.cases.push(t), this._caseToOutputFlow.set(t, this._registerSignalOutput(`out_${t}`)));
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Removes a case from the switch block.
|
|
23
|
+
* @param caseToRemove the case to remove.
|
|
24
|
+
*/
|
|
25
|
+
removeCase(t) {
|
|
26
|
+
if (!this.config.cases.includes(t))
|
|
27
|
+
return;
|
|
28
|
+
const e = this.config.cases.indexOf(t);
|
|
29
|
+
this.config.cases.splice(e, 1), this._caseToOutputFlow.delete(t);
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* @internal
|
|
33
|
+
*/
|
|
34
|
+
_getOutputFlowForCase(t) {
|
|
35
|
+
return this._caseToOutputFlow.get(t);
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* @returns class name of the block.
|
|
39
|
+
*/
|
|
40
|
+
getClassName() {
|
|
41
|
+
return "FlowGraphSwitchBlock";
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Serialize the block to a JSON representation.
|
|
45
|
+
* @param serializationObject the object to serialize to.
|
|
46
|
+
*/
|
|
47
|
+
serialize(t) {
|
|
48
|
+
super.serialize(t), t.cases = this.config.cases;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
o("FlowGraphSwitchBlock", r);
|
|
52
|
+
export {
|
|
53
|
+
r as FlowGraphSwitchBlock
|
|
54
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { S as u, aS as l, aK as h } from "./index-CS3Icp_r.js";
|
|
2
|
+
class o extends u {
|
|
3
|
+
constructor(i) {
|
|
4
|
+
super(i), this.reset = this._registerSignalInput("reset"), this.duration = this.registerDataInput("duration", l), this.lastRemainingTime = this.registerDataOutput("lastRemainingTime", l, NaN);
|
|
5
|
+
}
|
|
6
|
+
_execute(i, n) {
|
|
7
|
+
if (n === this.reset) {
|
|
8
|
+
this.lastRemainingTime.setValue(NaN, i), i._setExecutionVariable(this, "lastRemainingTime", NaN), i._setExecutionVariable(this, "timestamp", 0);
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
const e = this.duration.getValue(i);
|
|
12
|
+
if (e <= 0 || isNaN(e) || !isFinite(e))
|
|
13
|
+
return this._reportError(i, "Invalid duration in Throttle block");
|
|
14
|
+
const m = i._getExecutionVariable(this, "lastRemainingTime", NaN), a = Date.now();
|
|
15
|
+
if (isNaN(m))
|
|
16
|
+
return this.lastRemainingTime.setValue(0, i), i._setExecutionVariable(this, "lastRemainingTime", 0), i._setExecutionVariable(this, "timestamp", a), this.out._activateSignal(i);
|
|
17
|
+
{
|
|
18
|
+
const t = a - i._getExecutionVariable(this, "timestamp", 0), s = e * 1e3;
|
|
19
|
+
if (s <= t)
|
|
20
|
+
return this.lastRemainingTime.setValue(0, i), i._setExecutionVariable(this, "lastRemainingTime", 0), i._setExecutionVariable(this, "timestamp", a), this.out._activateSignal(i);
|
|
21
|
+
{
|
|
22
|
+
const r = s - t;
|
|
23
|
+
this.lastRemainingTime.setValue(r / 1e3, i), i._setExecutionVariable(this, "lastRemainingTime", r);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* @returns class name of the block.
|
|
29
|
+
*/
|
|
30
|
+
getClassName() {
|
|
31
|
+
return "FlowGraphThrottleBlock";
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
h("FlowGraphThrottleBlock", o);
|
|
35
|
+
export {
|
|
36
|
+
o as FlowGraphThrottleBlock
|
|
37
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { O as c, aM as e, aW as r, b8 as a, bf as m, aK as h } from "./index-CS3Icp_r.js";
|
|
2
|
+
class y extends c {
|
|
3
|
+
/**
|
|
4
|
+
* Creates a new FlowGraphCoordinateTransformBlock
|
|
5
|
+
* @param config optional configuration for this block
|
|
6
|
+
*/
|
|
7
|
+
constructor(t) {
|
|
8
|
+
super(t), this.sourceSystem = this.registerDataInput("sourceSystem", e), this.destinationSystem = this.registerDataInput("destinationSystem", e), this.inputCoordinates = this.registerDataInput("inputCoordinates", r), this.outputCoordinates = this.registerDataOutput("outputCoordinates", r);
|
|
9
|
+
}
|
|
10
|
+
_updateOutputs(t) {
|
|
11
|
+
const i = this.sourceSystem.getValue(t), n = this.destinationSystem.getValue(t), u = this.inputCoordinates.getValue(t), l = i.getWorldMatrix(), p = n.getWorldMatrix(), s = a.Matrix[0].copyFrom(p);
|
|
12
|
+
s.invert();
|
|
13
|
+
const o = a.Matrix[1];
|
|
14
|
+
s.multiplyToRef(l, o);
|
|
15
|
+
const d = this.outputCoordinates.getValue(t);
|
|
16
|
+
m.TransformCoordinatesToRef(u, o, d);
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Gets the class name of this block
|
|
20
|
+
* @returns the class name
|
|
21
|
+
*/
|
|
22
|
+
getClassName() {
|
|
23
|
+
return "FlowGraphTransformCoordinatesSystemBlock";
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
h("FlowGraphTransformCoordinatesSystemBlock", y);
|
|
27
|
+
export {
|
|
28
|
+
y as FlowGraphTransformCoordinatesSystemBlock
|
|
29
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { F as r } from "./flowGraphUnaryOperationBlock-B0Shf-lJ.js";
|
|
2
|
+
import { aS as n, aO as s, T as t, aN as F, aK as l } from "./index-CS3Icp_r.js";
|
|
3
|
+
class p extends r {
|
|
4
|
+
constructor(a) {
|
|
5
|
+
super(F, n, (o) => +o, "FlowGraphBooleanToFloat", a);
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
l("FlowGraphBooleanToFloat", p);
|
|
9
|
+
class u extends r {
|
|
10
|
+
constructor(a) {
|
|
11
|
+
super(F, s, (o) => t.FromValue(+o), "FlowGraphBooleanToInt", a);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
l("FlowGraphBooleanToInt", u);
|
|
15
|
+
class c extends r {
|
|
16
|
+
constructor(a) {
|
|
17
|
+
super(n, F, (o) => !!o, "FlowGraphFloatToBoolean", a);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
l("FlowGraphFloatToBoolean", c);
|
|
21
|
+
class h extends r {
|
|
22
|
+
constructor(a) {
|
|
23
|
+
super(s, F, (o) => !!o.value, "FlowGraphIntToBoolean", a);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
l("FlowGraphIntToBoolean", h);
|
|
27
|
+
class w extends r {
|
|
28
|
+
constructor(a) {
|
|
29
|
+
super(s, n, (o) => o.value, "FlowGraphIntToFloat", a);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
l("FlowGraphIntToFloat", w);
|
|
33
|
+
class T extends r {
|
|
34
|
+
constructor(a) {
|
|
35
|
+
super(n, s, (o) => {
|
|
36
|
+
switch (a?.roundingMode) {
|
|
37
|
+
case "floor":
|
|
38
|
+
return t.FromValue(Math.floor(o));
|
|
39
|
+
case "ceil":
|
|
40
|
+
return t.FromValue(Math.ceil(o));
|
|
41
|
+
case "round":
|
|
42
|
+
return t.FromValue(Math.round(o));
|
|
43
|
+
default:
|
|
44
|
+
return t.FromValue(o);
|
|
45
|
+
}
|
|
46
|
+
}, "FlowGraphFloatToInt", a);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
l("FlowGraphFloatToInt", T);
|
|
50
|
+
export {
|
|
51
|
+
p as FlowGraphBooleanToFloat,
|
|
52
|
+
u as FlowGraphBooleanToInt,
|
|
53
|
+
c as FlowGraphFloatToBoolean,
|
|
54
|
+
T as FlowGraphFloatToInt,
|
|
55
|
+
h as FlowGraphIntToBoolean,
|
|
56
|
+
w as FlowGraphIntToFloat
|
|
57
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { F as o } from "./flowGraphCachedOperationBlock-CP1ZiuIB.js";
|
|
2
|
+
class p extends o {
|
|
3
|
+
constructor(a, t, s, e, r) {
|
|
4
|
+
super(t, r), this._operation = s, this._className = e, this.a = this.registerDataInput("a", a);
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* the operation performed by this block
|
|
8
|
+
* @param context the graph context
|
|
9
|
+
* @returns the result of the operation
|
|
10
|
+
*/
|
|
11
|
+
_doOperation(a) {
|
|
12
|
+
return this._operation(this.a.getValue(a));
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Gets the class name of this block
|
|
16
|
+
* @returns the class name
|
|
17
|
+
*/
|
|
18
|
+
getClassName() {
|
|
19
|
+
return this._className;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
export {
|
|
23
|
+
p as F
|
|
24
|
+
};
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import { aJ as w, x as k, bf as F, aW as a, aT as c, O as f, aS as i, aN as y, aP as A, bW as m, aV as d, aM as h, bm as u, bg as C, aK as s } from "./index-CS3Icp_r.js";
|
|
2
|
+
import { F as n } from "./flowGraphBinaryOperationBlock-Bj7TANCc.js";
|
|
3
|
+
import { F as g } from "./flowGraphUnaryOperationBlock-B0Shf-lJ.js";
|
|
4
|
+
function T(o, e) {
|
|
5
|
+
return o.x * e.x + o.y * e.y + o.z * e.z;
|
|
6
|
+
}
|
|
7
|
+
function D(o, e) {
|
|
8
|
+
return o.x * e.x + o.y * e.y + o.z * e.z + o.w * e.w;
|
|
9
|
+
}
|
|
10
|
+
function N(o, e) {
|
|
11
|
+
return Math.acos(k(D(o, e), -1, 1)) * 2;
|
|
12
|
+
}
|
|
13
|
+
function R(o, e) {
|
|
14
|
+
const r = new w();
|
|
15
|
+
return Q(o, e, r), r;
|
|
16
|
+
}
|
|
17
|
+
function Q(o, e, r) {
|
|
18
|
+
const t = F.Cross(o, e), l = Math.acos(k(T(o, e), -1, 1));
|
|
19
|
+
return w.RotationAxisToRef(t, l, r), r;
|
|
20
|
+
}
|
|
21
|
+
const G = "cachedOperationAxis", V = "cachedOperationAngle", x = "cachedExecutionId";
|
|
22
|
+
class z extends g {
|
|
23
|
+
constructor(e) {
|
|
24
|
+
super(h, i, (r) => this._polymorphicLength(r), "FlowGraphLengthBlock", e);
|
|
25
|
+
}
|
|
26
|
+
_polymorphicLength(e) {
|
|
27
|
+
switch (u(e)) {
|
|
28
|
+
case "Vector2":
|
|
29
|
+
case "Vector3":
|
|
30
|
+
case "Vector4":
|
|
31
|
+
case "Quaternion":
|
|
32
|
+
return e.length();
|
|
33
|
+
default:
|
|
34
|
+
throw new Error(`Cannot compute length of value ${e}`);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
s("FlowGraphLengthBlock", z);
|
|
39
|
+
class _ extends g {
|
|
40
|
+
constructor(e) {
|
|
41
|
+
super(h, h, (r) => this._polymorphicNormalize(r), "FlowGraphNormalizeBlock", e);
|
|
42
|
+
}
|
|
43
|
+
_polymorphicNormalize(e) {
|
|
44
|
+
const r = u(e);
|
|
45
|
+
let t;
|
|
46
|
+
switch (r) {
|
|
47
|
+
case "Vector2":
|
|
48
|
+
case "Vector3":
|
|
49
|
+
case "Vector4":
|
|
50
|
+
case "Quaternion":
|
|
51
|
+
return t = e.normalizeToNew(), this.config?.nanOnZeroLength && e.length() === 0 && t.setAll(NaN), t;
|
|
52
|
+
default:
|
|
53
|
+
throw new Error(`Cannot normalize value ${e}`);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
s("FlowGraphNormalizeBlock", _);
|
|
58
|
+
class E extends n {
|
|
59
|
+
constructor(e) {
|
|
60
|
+
super(h, h, i, (r, t) => this._polymorphicDot(r, t), "FlowGraphDotBlock", e);
|
|
61
|
+
}
|
|
62
|
+
_polymorphicDot(e, r) {
|
|
63
|
+
switch (u(e)) {
|
|
64
|
+
case "Vector2":
|
|
65
|
+
case "Vector3":
|
|
66
|
+
case "Vector4":
|
|
67
|
+
case "Quaternion":
|
|
68
|
+
return e.dot(r);
|
|
69
|
+
default:
|
|
70
|
+
throw new Error(`Cannot get dot product of ${e} and ${r}`);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
s("FlowGraphDotBlock", E);
|
|
75
|
+
class O extends n {
|
|
76
|
+
constructor(e) {
|
|
77
|
+
super(a, a, a, (r, t) => F.Cross(r, t), "FlowGraphCrossBlock", e);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
s("FlowGraphCrossBlock", O);
|
|
81
|
+
class M extends n {
|
|
82
|
+
constructor(e) {
|
|
83
|
+
super(d, i, d, (r, t) => r.rotate(t), "FlowGraphRotate2DBlock", e);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
s("FlowGraphRotate2DBlock", M);
|
|
87
|
+
class I extends n {
|
|
88
|
+
constructor(e) {
|
|
89
|
+
super(a, c, a, (r, t) => r.applyRotationQuaternion(t), "FlowGraphRotate3DBlock", e);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
s("FlowGraphRotate3DBlock", I);
|
|
93
|
+
function L(o, e) {
|
|
94
|
+
switch (u(o)) {
|
|
95
|
+
case "Vector2":
|
|
96
|
+
return e.transformVector(o);
|
|
97
|
+
case "Vector3":
|
|
98
|
+
return e.transformVector(o);
|
|
99
|
+
case "Vector4":
|
|
100
|
+
return o = o, new C(o.x * e.m[0] + o.y * e.m[1] + o.z * e.m[2] + o.w * e.m[3], o.x * e.m[4] + o.y * e.m[5] + o.z * e.m[6] + o.w * e.m[7], o.x * e.m[8] + o.y * e.m[9] + o.z * e.m[10] + o.w * e.m[11], o.x * e.m[12] + o.y * e.m[13] + o.z * e.m[14] + o.w * e.m[15]);
|
|
101
|
+
default:
|
|
102
|
+
throw new Error(`Cannot transform value ${o}`);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
class v extends n {
|
|
106
|
+
constructor(e) {
|
|
107
|
+
const r = e?.vectorType || "Vector3", t = r === "Vector2" ? "Matrix2D" : r === "Vector3" ? "Matrix3D" : "Matrix";
|
|
108
|
+
super(m(r), m(t), m(r), L, "FlowGraphTransformVectorBlock", e);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
s("FlowGraphTransformVectorBlock", v);
|
|
112
|
+
class $ extends n {
|
|
113
|
+
constructor(e) {
|
|
114
|
+
super(a, A, a, (r, t) => F.TransformCoordinates(r, t), "FlowGraphTransformCoordinatesBlock", e);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
s("FlowGraphTransformCoordinatesBlock", $);
|
|
118
|
+
class j extends g {
|
|
119
|
+
constructor(e) {
|
|
120
|
+
super(c, c, (r) => r.conjugate(), "FlowGraphConjugateBlock", e);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
s("FlowGraphConjugateBlock", j);
|
|
124
|
+
class W extends n {
|
|
125
|
+
constructor(e) {
|
|
126
|
+
super(c, c, i, (r, t) => N(r, t), "FlowGraphAngleBetweenBlock", e);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
s("FlowGraphAngleBetweenBlock", W);
|
|
130
|
+
class J extends n {
|
|
131
|
+
constructor(e) {
|
|
132
|
+
super(a, i, c, (r, t) => w.RotationAxis(r, t), "FlowGraphQuaternionFromAxisAngleBlock", e);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
s("FlowGraphQuaternionFromAxisAngleBlock", J);
|
|
136
|
+
class K extends f {
|
|
137
|
+
constructor(e) {
|
|
138
|
+
super(e), this.a = this.registerDataInput("a", c), this.axis = this.registerDataOutput("axis", a), this.angle = this.registerDataOutput("angle", i), this.isValid = this.registerDataOutput("isValid", y);
|
|
139
|
+
}
|
|
140
|
+
/** @override */
|
|
141
|
+
_updateOutputs(e) {
|
|
142
|
+
const r = e._getExecutionVariable(this, x, -1), t = e._getExecutionVariable(this, G, null), l = e._getExecutionVariable(this, V, null);
|
|
143
|
+
if (t != null && l !== void 0 && l !== null && r === e.executionId)
|
|
144
|
+
this.axis.setValue(t, e), this.angle.setValue(l, e);
|
|
145
|
+
else
|
|
146
|
+
try {
|
|
147
|
+
const { axis: p, angle: B } = this.a.getValue(e).toAxisAngle();
|
|
148
|
+
e._setExecutionVariable(this, G, p), e._setExecutionVariable(this, V, B), e._setExecutionVariable(this, x, e.executionId), this.axis.setValue(p, e), this.angle.setValue(B, e), this.isValid.setValue(!0, e);
|
|
149
|
+
} catch {
|
|
150
|
+
this.isValid.setValue(!1, e);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
/** @override */
|
|
154
|
+
getClassName() {
|
|
155
|
+
return "FlowGraphAxisAngleFromQuaternionBlock";
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
s("FlowGraphAxisAngleFromQuaternionBlock", K);
|
|
159
|
+
class Z extends n {
|
|
160
|
+
constructor(e) {
|
|
161
|
+
super(a, a, c, (r, t) => R(r, t), "FlowGraphQuaternionFromDirectionsBlock", e);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
export {
|
|
165
|
+
W as FlowGraphAngleBetweenBlock,
|
|
166
|
+
K as FlowGraphAxisAngleFromQuaternionBlock,
|
|
167
|
+
j as FlowGraphConjugateBlock,
|
|
168
|
+
O as FlowGraphCrossBlock,
|
|
169
|
+
E as FlowGraphDotBlock,
|
|
170
|
+
z as FlowGraphLengthBlock,
|
|
171
|
+
_ as FlowGraphNormalizeBlock,
|
|
172
|
+
J as FlowGraphQuaternionFromAxisAngleBlock,
|
|
173
|
+
Z as FlowGraphQuaternionFromDirectionsBlock,
|
|
174
|
+
M as FlowGraphRotate2DBlock,
|
|
175
|
+
I as FlowGraphRotate3DBlock,
|
|
176
|
+
v as FlowGraphTransformBlock,
|
|
177
|
+
$ as FlowGraphTransformCoordinatesBlock
|
|
178
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { S as n, aO as l, T as a, aK as o } from "./index-CS3Icp_r.js";
|
|
2
|
+
class r extends n {
|
|
3
|
+
constructor(i) {
|
|
4
|
+
super(i), this.config = i, this.inFlows = [], this._cachedActivationState = [], this.reset = this._registerSignalInput("reset"), this.completed = this._registerSignalOutput("completed"), this.remainingInputs = this.registerDataOutput("remainingInputs", l, new a(this.config.inputSignalCount || 0));
|
|
5
|
+
for (let e = 0; e < this.config.inputSignalCount; e++)
|
|
6
|
+
this.inFlows.push(this._registerSignalInput(`in_${e}`));
|
|
7
|
+
this._unregisterSignalInput("in");
|
|
8
|
+
}
|
|
9
|
+
_getCurrentActivationState(i) {
|
|
10
|
+
const e = this._cachedActivationState;
|
|
11
|
+
if (e.length = 0, i._hasExecutionVariable(this, "activationState")) {
|
|
12
|
+
const s = i._getExecutionVariable(this, "activationState", []);
|
|
13
|
+
for (let t = 0; t < s.length; t++)
|
|
14
|
+
e.push(s[t]);
|
|
15
|
+
} else
|
|
16
|
+
for (let s = 0; s < this.config.inputSignalCount; s++)
|
|
17
|
+
e.push(!1);
|
|
18
|
+
return e;
|
|
19
|
+
}
|
|
20
|
+
_execute(i, e) {
|
|
21
|
+
const s = this._getCurrentActivationState(i);
|
|
22
|
+
if (e === this.reset)
|
|
23
|
+
for (let t = 0; t < this.config.inputSignalCount; t++)
|
|
24
|
+
s[t] = !1;
|
|
25
|
+
else {
|
|
26
|
+
const t = this.inFlows.indexOf(e);
|
|
27
|
+
t >= 0 && (s[t] = !0);
|
|
28
|
+
}
|
|
29
|
+
if (this.remainingInputs.setValue(new a(s.filter((t) => !t).length), i), i._setExecutionVariable(this, "activationState", s.slice()), s.includes(!1))
|
|
30
|
+
e !== this.reset && this.out._activateSignal(i);
|
|
31
|
+
else {
|
|
32
|
+
this.completed._activateSignal(i);
|
|
33
|
+
for (let t = 0; t < this.config.inputSignalCount; t++)
|
|
34
|
+
s[t] = !1;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* @returns class name of the block.
|
|
39
|
+
*/
|
|
40
|
+
getClassName() {
|
|
41
|
+
return "FlowGraphWaitAllBlock";
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Serializes this block into a object
|
|
45
|
+
* @param serializationObject the object to serialize to
|
|
46
|
+
*/
|
|
47
|
+
serialize(i) {
|
|
48
|
+
super.serialize(i), i.config.inputFlows = this.config.inputSignalCount;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
o("FlowGraphWaitAllBlock", r);
|
|
52
|
+
export {
|
|
53
|
+
r as FlowGraphWaitAllBlock
|
|
54
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { S as a, aN as l, a7 as n, aK as s } from "./index-CS3Icp_r.js";
|
|
2
|
+
class t extends a {
|
|
3
|
+
constructor(i) {
|
|
4
|
+
super(i), this.config = i, this.condition = this.registerDataInput("condition", l), this.executionFlow = this._registerSignalOutput("executionFlow"), this.completed = this._registerSignalOutput("completed"), this._unregisterSignalOutput("out");
|
|
5
|
+
}
|
|
6
|
+
_execute(i, h) {
|
|
7
|
+
let e = this.condition.getValue(i);
|
|
8
|
+
this.config?.doWhile && !e && this.executionFlow._activateSignal(i);
|
|
9
|
+
let o = 0;
|
|
10
|
+
for (; e; ) {
|
|
11
|
+
if (this.executionFlow._activateSignal(i), ++o, o >= t.MaxLoopCount) {
|
|
12
|
+
n.Warn("FlowGraphWhileLoopBlock: Max loop count reached. Breaking.");
|
|
13
|
+
break;
|
|
14
|
+
}
|
|
15
|
+
e = this.condition.getValue(i);
|
|
16
|
+
}
|
|
17
|
+
this.completed._activateSignal(i);
|
|
18
|
+
}
|
|
19
|
+
getClassName() {
|
|
20
|
+
return "FlowGraphWhileLoopBlock";
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
t.MaxLoopCount = 1e3;
|
|
24
|
+
s("FlowGraphWhileLoopBlock", t);
|
|
25
|
+
export {
|
|
26
|
+
t as FlowGraphWhileLoopBlock
|
|
27
|
+
};
|