@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,32 @@
|
|
|
1
|
+
import { S as i, aM as r, aS as a, aN as u, aK as h } from "./index-CS3Icp_r.js";
|
|
2
|
+
class n extends i {
|
|
3
|
+
/**
|
|
4
|
+
* Constructs a new FlowGraphPlaySoundBlock.
|
|
5
|
+
* @param config - optional configuration for the block
|
|
6
|
+
*/
|
|
7
|
+
constructor(t) {
|
|
8
|
+
super(t), this.sound = this.registerDataInput("sound", r), this.volume = this.registerDataInput("volume", a, 1), this.startOffset = this.registerDataInput("startOffset", a, 0), this.loop = this.registerDataInput("loop", u, !1);
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
_execute(t, g) {
|
|
14
|
+
const s = this.sound.getValue(t);
|
|
15
|
+
if (!s) {
|
|
16
|
+
this._reportError(t, "No sound provided"), this.out._activateSignal(t);
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
const e = this.volume.getValue(t), o = this.startOffset.getValue(t), l = this.loop.getValue(t);
|
|
20
|
+
s.play({ volume: e, startOffset: o, loop: l }), this.out._activateSignal(t);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* @returns class name of the block.
|
|
24
|
+
*/
|
|
25
|
+
getClassName() {
|
|
26
|
+
return "FlowGraphPlaySoundBlock";
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
h("FlowGraphPlaySoundBlock", n);
|
|
30
|
+
export {
|
|
31
|
+
n as FlowGraphPlaySoundBlock
|
|
32
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Q as a, aM as r, aS as n, bp as p, aK as h } from "./index-CS3Icp_r.js";
|
|
2
|
+
class o extends a {
|
|
3
|
+
/**
|
|
4
|
+
* Creates a new FlowGraphPointerDownEventBlock.
|
|
5
|
+
* @param config optional configuration
|
|
6
|
+
*/
|
|
7
|
+
constructor(e) {
|
|
8
|
+
super(e), this.type = "PointerDown", this.targetMesh = this.registerDataInput("targetMesh", r, e?.targetMesh), this.pointerId = this.registerDataOutput("pointerId", n), this.pickedMesh = this.registerDataOutput("pickedMesh", r), this.pickedPoint = this.registerDataOutput("pickedPoint", r);
|
|
9
|
+
}
|
|
10
|
+
/** @internal */
|
|
11
|
+
_executeEvent(e, s) {
|
|
12
|
+
const i = this.targetMesh.getValue(e), t = s.pickInfo?.pickedMesh;
|
|
13
|
+
return i && !(t === i || t && p(t, i)) ? !0 : (this.pointerId.setValue(s.event.pointerId, e), this.pickedMesh.setValue(t ?? null, e), this.pickedPoint.setValue(s.pickInfo?.pickedPoint ?? null, e), this._execute(e), !this.config?.stopPropagation);
|
|
14
|
+
}
|
|
15
|
+
/** @internal */
|
|
16
|
+
_preparePendingTasks(e) {
|
|
17
|
+
}
|
|
18
|
+
/** @internal */
|
|
19
|
+
_cancelPendingTasks(e) {
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* @returns the class name of the block.
|
|
23
|
+
*/
|
|
24
|
+
getClassName() {
|
|
25
|
+
return "FlowGraphPointerDownEventBlock";
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
h("FlowGraphPointerDownEventBlock", o);
|
|
29
|
+
export {
|
|
30
|
+
o as FlowGraphPointerDownEventBlock
|
|
31
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Q as a, aM as r, aS as n, bp as o, aK as h } from "./index-CS3Icp_r.js";
|
|
2
|
+
class p extends a {
|
|
3
|
+
/**
|
|
4
|
+
* Creates a new FlowGraphPointerMoveEventBlock.
|
|
5
|
+
* @param config optional configuration
|
|
6
|
+
*/
|
|
7
|
+
constructor(e) {
|
|
8
|
+
super(e), this.type = "PointerMove", this.targetMesh = this.registerDataInput("targetMesh", r, e?.targetMesh), this.pointerId = this.registerDataOutput("pointerId", n), this.meshUnderPointer = this.registerDataOutput("meshUnderPointer", r), this.pickedPoint = this.registerDataOutput("pickedPoint", r);
|
|
9
|
+
}
|
|
10
|
+
/** @internal */
|
|
11
|
+
_executeEvent(e, s) {
|
|
12
|
+
const i = this.targetMesh.getValue(e), t = s.pickInfo?.pickedMesh;
|
|
13
|
+
return i && !(t === i || t && o(t, i)) ? !0 : (this.pointerId.setValue(s.event.pointerId, e), this.meshUnderPointer.setValue(t ?? null, e), this.pickedPoint.setValue(s.pickInfo?.pickedPoint ?? null, e), this._execute(e), !this.config?.stopPropagation);
|
|
14
|
+
}
|
|
15
|
+
/** @internal */
|
|
16
|
+
_preparePendingTasks(e) {
|
|
17
|
+
}
|
|
18
|
+
/** @internal */
|
|
19
|
+
_cancelPendingTasks(e) {
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* @returns the class name of the block.
|
|
23
|
+
*/
|
|
24
|
+
getClassName() {
|
|
25
|
+
return "FlowGraphPointerMoveEventBlock";
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
h("FlowGraphPointerMoveEventBlock", p);
|
|
29
|
+
export {
|
|
30
|
+
p as FlowGraphPointerMoveEventBlock
|
|
31
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Q as n, aS as h, aM as r, bp as i, aK as a } from "./index-CS3Icp_r.js";
|
|
2
|
+
class o extends n {
|
|
3
|
+
constructor(t) {
|
|
4
|
+
super(t), this.type = "PointerOut", this.pointerId = this.registerDataOutput("pointerId", h), this.targetMesh = this.registerDataInput("targetMesh", r, t?.targetMesh), this.meshOutOfPointer = this.registerDataOutput("meshOutOfPointer", r);
|
|
5
|
+
}
|
|
6
|
+
_executeEvent(t, e) {
|
|
7
|
+
const s = this.targetMesh.getValue(t);
|
|
8
|
+
return this.meshOutOfPointer.setValue(e.mesh, t), this.pointerId.setValue(e.pointerId, t), !(e.over && i(e.mesh, s)) && (e.mesh === s || i(e.mesh, s)) ? (this._execute(t), !this.config?.stopPropagation) : !0;
|
|
9
|
+
}
|
|
10
|
+
_preparePendingTasks(t) {
|
|
11
|
+
}
|
|
12
|
+
_cancelPendingTasks(t) {
|
|
13
|
+
}
|
|
14
|
+
getClassName() {
|
|
15
|
+
return "FlowGraphPointerOutEventBlock";
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
a("FlowGraphPointerOutEventBlock", o);
|
|
19
|
+
export {
|
|
20
|
+
o as FlowGraphPointerOutEventBlock
|
|
21
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Q as h, aS as a, aM as r, bp as n, aK as o } from "./index-CS3Icp_r.js";
|
|
2
|
+
class u extends h {
|
|
3
|
+
constructor(e) {
|
|
4
|
+
super(e), this.type = "PointerOver", this.pointerId = this.registerDataOutput("pointerId", a), this.targetMesh = this.registerDataInput("targetMesh", r, e?.targetMesh), this.meshUnderPointer = this.registerDataOutput("meshUnderPointer", r);
|
|
5
|
+
}
|
|
6
|
+
_executeEvent(e, t) {
|
|
7
|
+
const s = this.targetMesh.getValue(e);
|
|
8
|
+
this.meshUnderPointer.setValue(t.mesh, e);
|
|
9
|
+
const i = t.out && n(t.out, s);
|
|
10
|
+
return this.pointerId.setValue(t.pointerId, e), !i && (t.mesh === s || n(t.mesh, s)) ? (this._execute(e), !this.config?.stopPropagation) : !0;
|
|
11
|
+
}
|
|
12
|
+
_preparePendingTasks(e) {
|
|
13
|
+
}
|
|
14
|
+
_cancelPendingTasks(e) {
|
|
15
|
+
}
|
|
16
|
+
getClassName() {
|
|
17
|
+
return "FlowGraphPointerOverEventBlock";
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
o("FlowGraphPointerOverEventBlock", u);
|
|
21
|
+
export {
|
|
22
|
+
u as FlowGraphPointerOverEventBlock
|
|
23
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Q as a, aM as r, aS as p, bp as n, aK as h } from "./index-CS3Icp_r.js";
|
|
2
|
+
class o extends a {
|
|
3
|
+
/**
|
|
4
|
+
* Creates a new FlowGraphPointerUpEventBlock.
|
|
5
|
+
* @param config optional configuration
|
|
6
|
+
*/
|
|
7
|
+
constructor(e) {
|
|
8
|
+
super(e), this.type = "PointerUp", this.targetMesh = this.registerDataInput("targetMesh", r, e?.targetMesh), this.pointerId = this.registerDataOutput("pointerId", p), this.pickedMesh = this.registerDataOutput("pickedMesh", r), this.pickedPoint = this.registerDataOutput("pickedPoint", r);
|
|
9
|
+
}
|
|
10
|
+
/** @internal */
|
|
11
|
+
_executeEvent(e, s) {
|
|
12
|
+
const i = this.targetMesh.getValue(e), t = s.pickInfo?.pickedMesh;
|
|
13
|
+
return i && !(t === i || t && n(t, i)) ? !0 : (this.pointerId.setValue(s.event.pointerId, e), this.pickedMesh.setValue(t ?? null, e), this.pickedPoint.setValue(s.pickInfo?.pickedPoint ?? null, e), this._execute(e), !this.config?.stopPropagation);
|
|
14
|
+
}
|
|
15
|
+
/** @internal */
|
|
16
|
+
_preparePendingTasks(e) {
|
|
17
|
+
}
|
|
18
|
+
/** @internal */
|
|
19
|
+
_cancelPendingTasks(e) {
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* @returns the class name of the block.
|
|
23
|
+
*/
|
|
24
|
+
getClassName() {
|
|
25
|
+
return "FlowGraphPointerUpEventBlock";
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
h("FlowGraphPointerUpEventBlock", o);
|
|
29
|
+
export {
|
|
30
|
+
o as FlowGraphPointerUpEventBlock
|
|
31
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { Q as a, bW as c, P as i, b9 as v, aK as p } from "./index-CS3Icp_r.js";
|
|
2
|
+
class l extends a {
|
|
3
|
+
constructor(e) {
|
|
4
|
+
super(e), this.config = e, this.initPriority = 1;
|
|
5
|
+
for (const t in this.config.eventData) {
|
|
6
|
+
const s = this.config.eventData[t], o = typeof s.type == "string" ? s.type : s.type?.typeName, r = typeof s.type?.serialize == "function" ? s.type : c(o);
|
|
7
|
+
s.type = r, this.registerDataOutput(t, r);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
_preparePendingTasks(e) {
|
|
11
|
+
const t = e.configuration.coordinator.getCustomEventObservable(this.config.eventId);
|
|
12
|
+
if (t && t.hasObservers() && t.observers.length > i.MaxEventsPerType) {
|
|
13
|
+
this._reportError(e, `FlowGraphReceiveCustomEventBlock: Too many observers for event ${this.config.eventId}. Max is ${i.MaxEventsPerType}.`);
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
const s = t.add((o) => {
|
|
17
|
+
const r = Object.keys(o);
|
|
18
|
+
for (const n of r)
|
|
19
|
+
this.getDataOutput(n)?.setValue(o[n], e);
|
|
20
|
+
this._execute(e);
|
|
21
|
+
});
|
|
22
|
+
e._setExecutionVariable(this, "_eventObserver", s);
|
|
23
|
+
}
|
|
24
|
+
_cancelPendingTasks(e) {
|
|
25
|
+
const t = e.configuration.coordinator.getCustomEventObservable(this.config.eventId);
|
|
26
|
+
if (t) {
|
|
27
|
+
const s = e._getExecutionVariable(this, "_eventObserver", null);
|
|
28
|
+
t.remove(s);
|
|
29
|
+
} else
|
|
30
|
+
v.Warn(`FlowGraphReceiveCustomEventBlock: Missing observable for event ${this.config.eventId}`);
|
|
31
|
+
}
|
|
32
|
+
_executeEvent(e, t) {
|
|
33
|
+
return !0;
|
|
34
|
+
}
|
|
35
|
+
serialize(e = {}) {
|
|
36
|
+
super.serialize(e);
|
|
37
|
+
const t = {};
|
|
38
|
+
for (const s in this.config.eventData)
|
|
39
|
+
t[s] = { type: this.config.eventData[s].type.typeName };
|
|
40
|
+
e.config.eventData = t;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* @returns class name of the block.
|
|
44
|
+
*/
|
|
45
|
+
getClassName() {
|
|
46
|
+
return "FlowGraphReceiveCustomEventBlock";
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
p("FlowGraphReceiveCustomEventBlock", l);
|
|
50
|
+
export {
|
|
51
|
+
l as FlowGraphReceiveCustomEventBlock
|
|
52
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Q as t, aK as a } from "./index-CS3Icp_r.js";
|
|
2
|
+
class n extends t {
|
|
3
|
+
constructor() {
|
|
4
|
+
super(...arguments), this.initPriority = -1, this.type = "SceneReady";
|
|
5
|
+
}
|
|
6
|
+
_executeEvent(e, s) {
|
|
7
|
+
return this._execute(e), !0;
|
|
8
|
+
}
|
|
9
|
+
_preparePendingTasks(e) {
|
|
10
|
+
}
|
|
11
|
+
_cancelPendingTasks(e) {
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* @returns class name of the block.
|
|
15
|
+
*/
|
|
16
|
+
getClassName() {
|
|
17
|
+
return "FlowGraphSceneReadyEventBlock";
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
a("FlowGraphSceneReadyEventBlock", n);
|
|
21
|
+
export {
|
|
22
|
+
n as FlowGraphSceneReadyEventBlock
|
|
23
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Q as a, aS as i, aK as r } from "./index-CS3Icp_r.js";
|
|
2
|
+
class s extends a {
|
|
3
|
+
constructor() {
|
|
4
|
+
super(), this.type = "SceneBeforeRender", this.timeSinceStart = this.registerDataOutput("timeSinceStart", i), this.deltaTime = this.registerDataOutput("deltaTime", i);
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
_preparePendingTasks(e) {
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* @internal
|
|
13
|
+
*/
|
|
14
|
+
_executeEvent(e, t) {
|
|
15
|
+
return this.timeSinceStart.setValue(t.timeSinceStart, e), this.deltaTime.setValue(t.deltaTime, e), this._execute(e), !0;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @internal
|
|
19
|
+
*/
|
|
20
|
+
_cancelPendingTasks(e) {
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* @returns class name of the block.
|
|
24
|
+
*/
|
|
25
|
+
getClassName() {
|
|
26
|
+
return "FlowGraphSceneTickEventBlock";
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
r("FlowGraphSceneTickEventBlock", s);
|
|
30
|
+
export {
|
|
31
|
+
s as FlowGraphSceneTickEventBlock
|
|
32
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { S as s, bW as i, aK as r } from "./index-CS3Icp_r.js";
|
|
2
|
+
class c extends s {
|
|
3
|
+
constructor(e) {
|
|
4
|
+
super(e), this.config = e;
|
|
5
|
+
for (const n in this.config.eventData) {
|
|
6
|
+
const t = this.config.eventData[n], a = typeof t.type == "string" ? t.type : t.type?.typeName, o = typeof t.type?.serialize == "function" ? t.type : i(a);
|
|
7
|
+
t.type = o, this.registerDataInput(n, o, t.value);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
_execute(e) {
|
|
11
|
+
const n = this.config.eventId, t = {};
|
|
12
|
+
for (const a of this.dataInputs)
|
|
13
|
+
t[a.name] = a.getValue(e);
|
|
14
|
+
e.configuration.coordinator.notifyCustomEvent(n, t), this.out._activateSignal(e);
|
|
15
|
+
}
|
|
16
|
+
serialize(e = {}) {
|
|
17
|
+
super.serialize(e);
|
|
18
|
+
const n = {};
|
|
19
|
+
for (const t in this.config.eventData) {
|
|
20
|
+
const a = this.config.eventData[t];
|
|
21
|
+
n[t] = { type: a.type.typeName }, a.value !== void 0 && (n[t].value = a.value);
|
|
22
|
+
}
|
|
23
|
+
e.config.eventData = n;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* @returns class name of the block.
|
|
27
|
+
*/
|
|
28
|
+
getClassName() {
|
|
29
|
+
return "FlowGraphSendCustomEventBlock";
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
r("FlowGraphSendCustomEventBlock", c);
|
|
33
|
+
export {
|
|
34
|
+
c as FlowGraphSendCustomEventBlock
|
|
35
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { R as i, aK as s } from "./index-CS3Icp_r.js";
|
|
2
|
+
class n extends i {
|
|
3
|
+
constructor(e) {
|
|
4
|
+
super(e), this.config = e, this.executionSignals = [], this.setNumberOfOutputSignals(this.config.outputSignalCount);
|
|
5
|
+
}
|
|
6
|
+
_execute(e) {
|
|
7
|
+
for (let t = 0; t < this.executionSignals.length; t++)
|
|
8
|
+
this.executionSignals[t]._activateSignal(e);
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Sets the block's output flows. Would usually be passed from the constructor but can be changed afterwards.
|
|
12
|
+
* @param outputSignalCount the number of output flows
|
|
13
|
+
*/
|
|
14
|
+
setNumberOfOutputSignals(e = 1) {
|
|
15
|
+
for (; this.executionSignals.length > e; ) {
|
|
16
|
+
const t = this.executionSignals.pop();
|
|
17
|
+
t && (t.disconnectFromAll(), this._unregisterSignalOutput(t.name));
|
|
18
|
+
}
|
|
19
|
+
for (; this.executionSignals.length < e; )
|
|
20
|
+
this.executionSignals.push(this._registerSignalOutput(`out_${this.executionSignals.length}`));
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* @returns class name of the block.
|
|
24
|
+
*/
|
|
25
|
+
getClassName() {
|
|
26
|
+
return "FlowGraphSequenceBlock";
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
s("FlowGraphSequenceBlock", n);
|
|
30
|
+
export {
|
|
31
|
+
n as FlowGraphSequenceBlock
|
|
32
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { S as i, aM as a, aW as s, aK as l } from "./index-CS3Icp_r.js";
|
|
2
|
+
class o extends i {
|
|
3
|
+
/**
|
|
4
|
+
* Constructs a new FlowGraphSetAngularVelocityBlock.
|
|
5
|
+
* @param config - optional configuration for the block
|
|
6
|
+
*/
|
|
7
|
+
constructor(t) {
|
|
8
|
+
super(t), this.body = this.registerDataInput("body", a), this.velocity = this.registerDataInput("velocity", s);
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
_execute(t, c) {
|
|
14
|
+
const e = this.body.getValue(t);
|
|
15
|
+
if (!e) {
|
|
16
|
+
this._reportError(t, "No physics body provided"), this.out._activateSignal(t);
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
e.setAngularVelocity(this.velocity.getValue(t)), this.out._activateSignal(t);
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* @returns class name of the block.
|
|
23
|
+
*/
|
|
24
|
+
getClassName() {
|
|
25
|
+
return "FlowGraphSetAngularVelocityBlock";
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
l("FlowGraphSetAngularVelocityBlock", o);
|
|
29
|
+
export {
|
|
30
|
+
o as FlowGraphSetAngularVelocityBlock
|
|
31
|
+
};
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { ai as n, N as m, aS as u, aO as v, T as h, a7 as d, aK as T } from "./index-CS3Icp_r.js";
|
|
2
|
+
var _;
|
|
3
|
+
(function(r) {
|
|
4
|
+
r[r.INIT = 0] = "INIT", r[r.STARTED = 1] = "STARTED", r[r.ENDED = 2] = "ENDED";
|
|
5
|
+
})(_ || (_ = {}));
|
|
6
|
+
class g {
|
|
7
|
+
/**
|
|
8
|
+
* Will construct a new advanced timer based on the options provided. Timer will not start until start() is called.
|
|
9
|
+
* @param options construction options for this advanced timer
|
|
10
|
+
*/
|
|
11
|
+
constructor(e) {
|
|
12
|
+
this.onEachCountObservable = new n(), this.onTimerAbortedObservable = new n(), this.onTimerEndedObservable = new n(), this.onStateChangedObservable = new n(), this._observer = null, this._breakOnNextTick = !1, this._tick = (t) => {
|
|
13
|
+
const a = Date.now();
|
|
14
|
+
this._timer = a - this._startTime;
|
|
15
|
+
const s = {
|
|
16
|
+
startTime: this._startTime,
|
|
17
|
+
currentTime: a,
|
|
18
|
+
deltaTime: this._timer,
|
|
19
|
+
completeRate: this._timer / this._timeToEnd,
|
|
20
|
+
payload: t
|
|
21
|
+
}, i = this._breakOnNextTick || this._breakCondition(s);
|
|
22
|
+
i || this._timer >= this._timeToEnd ? this._stop(s, i) : this.onEachCountObservable.notifyObservers(s);
|
|
23
|
+
}, this._setState(
|
|
24
|
+
0
|
|
25
|
+
/* TimerState.INIT */
|
|
26
|
+
), this._contextObservable = e.contextObservable, this._observableParameters = e.observableParameters ?? {}, this._breakCondition = e.breakCondition ?? (() => !1), this._timeToEnd = e.timeout, e.onEnded && this.onTimerEndedObservable.add(e.onEnded), e.onTick && this.onEachCountObservable.add(e.onTick), e.onAborted && this.onTimerAbortedObservable.add(e.onAborted);
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* set a breaking condition for this timer. Default is to never break during count
|
|
30
|
+
* @param predicate the new break condition. Returns true to break, false otherwise
|
|
31
|
+
*/
|
|
32
|
+
set breakCondition(e) {
|
|
33
|
+
this._breakCondition = e;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Reset ALL associated observables in this advanced timer
|
|
37
|
+
*/
|
|
38
|
+
clearObservables() {
|
|
39
|
+
this.onEachCountObservable.clear(), this.onTimerAbortedObservable.clear(), this.onTimerEndedObservable.clear(), this.onStateChangedObservable.clear();
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Will start a new iteration of this timer. Only one instance of this timer can run at a time.
|
|
43
|
+
*
|
|
44
|
+
* @param timeToEnd how much time to measure until timer ended
|
|
45
|
+
*/
|
|
46
|
+
start(e = this._timeToEnd) {
|
|
47
|
+
if (this._state === 1)
|
|
48
|
+
throw new Error("Timer already started. Please stop it before starting again");
|
|
49
|
+
this._timeToEnd = e, this._startTime = Date.now(), this._timer = 0, this._observer = this._contextObservable.add(this._tick, this._observableParameters.mask, this._observableParameters.insertFirst, this._observableParameters.scope), this._setState(
|
|
50
|
+
1
|
|
51
|
+
/* TimerState.STARTED */
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Will force a stop on the next tick.
|
|
56
|
+
*/
|
|
57
|
+
stop() {
|
|
58
|
+
this._state === 1 && (this._breakOnNextTick = !0);
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Dispose this timer, clearing all resources
|
|
62
|
+
*/
|
|
63
|
+
dispose() {
|
|
64
|
+
this._observer && this._contextObservable.remove(this._observer), this.clearObservables();
|
|
65
|
+
}
|
|
66
|
+
_setState(e) {
|
|
67
|
+
this._state = e, this.onStateChangedObservable.notifyObservers(this._state);
|
|
68
|
+
}
|
|
69
|
+
_stop(e, t = !1) {
|
|
70
|
+
this._contextObservable.remove(this._observer), this._setState(
|
|
71
|
+
2
|
|
72
|
+
/* TimerState.ENDED */
|
|
73
|
+
), t ? this.onTimerAbortedObservable.notifyObservers(e) : this.onTimerEndedObservable.notifyObservers(e);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
class l extends m {
|
|
77
|
+
constructor(e) {
|
|
78
|
+
super(e), this.cancel = this._registerSignalInput("cancel"), this.duration = this.registerDataInput("duration", u), this.lastDelayIndex = this.registerDataOutput("lastDelayIndex", v, new h(-1));
|
|
79
|
+
}
|
|
80
|
+
_preparePendingTasks(e) {
|
|
81
|
+
const t = this.duration.getValue(e);
|
|
82
|
+
if (t < 0 || isNaN(t) || !isFinite(t))
|
|
83
|
+
return this._reportError(e, "Invalid duration in SetDelay block");
|
|
84
|
+
if (e._getGlobalContextVariable("activeDelays", 0) >= l.MaxParallelDelayCount)
|
|
85
|
+
return this._reportError(e, "Max parallel delays reached");
|
|
86
|
+
const s = e._getGlobalContextVariable("lastDelayIndex", -1), i = e._getExecutionVariable(this, "pendingDelays", []), c = e.configuration.scene, o = new g({
|
|
87
|
+
timeout: t * 1e3,
|
|
88
|
+
// duration is in seconds
|
|
89
|
+
contextObservable: c.onBeforeRenderObservable,
|
|
90
|
+
onEnded: () => this._onEnded(o, e)
|
|
91
|
+
});
|
|
92
|
+
o.start();
|
|
93
|
+
const b = s + 1;
|
|
94
|
+
this.lastDelayIndex.setValue(new h(b), e), e._setGlobalContextVariable("lastDelayIndex", b), i[b] = o, e._setExecutionVariable(this, "pendingDelays", i), this._updateGlobalTimers(e);
|
|
95
|
+
}
|
|
96
|
+
_cancelPendingTasks(e) {
|
|
97
|
+
const t = e._getExecutionVariable(this, "pendingDelays", []);
|
|
98
|
+
for (const a of t)
|
|
99
|
+
a?.dispose();
|
|
100
|
+
e._deleteExecutionVariable(this, "pendingDelays"), this.lastDelayIndex.setValue(new h(-1), e), this._updateGlobalTimers(e);
|
|
101
|
+
}
|
|
102
|
+
_execute(e, t) {
|
|
103
|
+
if (t === this.cancel) {
|
|
104
|
+
this._cancelPendingTasks(e);
|
|
105
|
+
return;
|
|
106
|
+
} else
|
|
107
|
+
this._preparePendingTasks(e), this.out._activateSignal(e);
|
|
108
|
+
}
|
|
109
|
+
getClassName() {
|
|
110
|
+
return "FlowGraphSetDelayBlock";
|
|
111
|
+
}
|
|
112
|
+
_onEnded(e, t) {
|
|
113
|
+
const a = t._getExecutionVariable(this, "pendingDelays", []), s = a.indexOf(e);
|
|
114
|
+
s !== -1 ? a.splice(s, 1) : d.Warn("FlowGraphTimerBlock: Timer ended but was not found in the running timers list"), t._removePendingBlock(this), this.done._activateSignal(t), this._updateGlobalTimers(t);
|
|
115
|
+
}
|
|
116
|
+
_updateGlobalTimers(e) {
|
|
117
|
+
const t = e._getExecutionVariable(this, "pendingDelays", []), a = e._getGlobalContextVariable("pendingDelays", []);
|
|
118
|
+
for (let s = 0; s < t.length; s++) {
|
|
119
|
+
if (!t[s])
|
|
120
|
+
continue;
|
|
121
|
+
const i = t[s];
|
|
122
|
+
a[s] && a[s] !== i ? d.Warn("FlowGraphTimerBlock: Timer ended but was not found in the running timers list") : a[s] = i;
|
|
123
|
+
}
|
|
124
|
+
e._setGlobalContextVariable("pendingDelays", a);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
l.MaxParallelDelayCount = 100;
|
|
128
|
+
T("FlowGraphSetDelayBlock", l);
|
|
129
|
+
export {
|
|
130
|
+
l as FlowGraphSetDelayBlock
|
|
131
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { S as i, aM as a, aW as s, aK as o } from "./index-CS3Icp_r.js";
|
|
2
|
+
class r extends i {
|
|
3
|
+
/**
|
|
4
|
+
* Constructs a new FlowGraphSetLinearVelocityBlock.
|
|
5
|
+
* @param config - optional configuration for the block
|
|
6
|
+
*/
|
|
7
|
+
constructor(t) {
|
|
8
|
+
super(t), this.body = this.registerDataInput("body", a), this.velocity = this.registerDataInput("velocity", s);
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
_execute(t, c) {
|
|
14
|
+
const e = this.body.getValue(t);
|
|
15
|
+
if (!e) {
|
|
16
|
+
this._reportError(t, "No physics body provided"), this.out._activateSignal(t);
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
e.setLinearVelocity(this.velocity.getValue(t)), this.out._activateSignal(t);
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* @returns class name of the block.
|
|
23
|
+
*/
|
|
24
|
+
getClassName() {
|
|
25
|
+
return "FlowGraphSetLinearVelocityBlock";
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
o("FlowGraphSetLinearVelocityBlock", r);
|
|
29
|
+
export {
|
|
30
|
+
r as FlowGraphSetLinearVelocityBlock
|
|
31
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { S as s, aM as e, aS as o, aK as a } from "./index-CS3Icp_r.js";
|
|
2
|
+
class r extends s {
|
|
3
|
+
/**
|
|
4
|
+
* Constructs a new FlowGraphSetPhysicsMotionTypeBlock.
|
|
5
|
+
* @param config - optional configuration for the block
|
|
6
|
+
*/
|
|
7
|
+
constructor(t) {
|
|
8
|
+
super(t), this.body = this.registerDataInput("body", e), this.motionType = this.registerDataInput(
|
|
9
|
+
"motionType",
|
|
10
|
+
o,
|
|
11
|
+
2
|
|
12
|
+
/* PhysicsMotionType.DYNAMIC */
|
|
13
|
+
);
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* @internal
|
|
17
|
+
*/
|
|
18
|
+
_execute(t, h) {
|
|
19
|
+
const i = this.body.getValue(t);
|
|
20
|
+
if (!i) {
|
|
21
|
+
this._reportError(t, "No physics body provided"), this.out._activateSignal(t);
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
i.setMotionType(this.motionType.getValue(t)), this.out._activateSignal(t);
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* @returns class name of the block.
|
|
28
|
+
*/
|
|
29
|
+
getClassName() {
|
|
30
|
+
return "FlowGraphSetPhysicsMotionTypeBlock";
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
a("FlowGraphSetPhysicsMotionTypeBlock", r);
|
|
34
|
+
export {
|
|
35
|
+
r as FlowGraphSetPhysicsMotionTypeBlock
|
|
36
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { S as p, aM as o, aU as l, aK as c } from "./index-CS3Icp_r.js";
|
|
2
|
+
class h extends p {
|
|
3
|
+
constructor(t) {
|
|
4
|
+
super(t), this.config = t, this.object = this.registerDataInput("object", o, t.target), this.value = this.registerDataInput("value", o), this.propertyName = this.registerDataInput("propertyName", l, t.propertyName), this.customSetFunction = this.registerDataInput("customSetFunction", o);
|
|
5
|
+
}
|
|
6
|
+
_execute(t, s) {
|
|
7
|
+
try {
|
|
8
|
+
const a = this.object.getValue(t), e = this.value.getValue(t), i = this.propertyName.getValue(t);
|
|
9
|
+
this._stopRunningAnimations(t, a, i);
|
|
10
|
+
const r = this.customSetFunction.getValue(t);
|
|
11
|
+
r ? r(a, i, e, t) : this._setPropertyValue(a, i, e);
|
|
12
|
+
} catch (a) {
|
|
13
|
+
this._reportError(t, a);
|
|
14
|
+
}
|
|
15
|
+
this.out._activateSignal(t);
|
|
16
|
+
}
|
|
17
|
+
_stopRunningAnimations(t, s, a) {
|
|
18
|
+
const e = t._getGlobalContextVariable("currentlyRunningAnimationGroups", []);
|
|
19
|
+
for (const i of e) {
|
|
20
|
+
const r = t.assetsContext.animationGroups.find((n) => n.uniqueId === i);
|
|
21
|
+
if (r) {
|
|
22
|
+
for (const n of r.targetedAnimations)
|
|
23
|
+
if (n.target === s && n.animation.targetProperty === a) {
|
|
24
|
+
r.stop(!0), r.dispose();
|
|
25
|
+
const u = e.indexOf(i);
|
|
26
|
+
u !== -1 && (e.splice(u, 1), t._setGlobalContextVariable("currentlyRunningAnimationGroups", e));
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
_setPropertyValue(t, s, a) {
|
|
32
|
+
const e = s.split(".");
|
|
33
|
+
let i = t;
|
|
34
|
+
for (let r = 0; r < e.length - 1; r++) {
|
|
35
|
+
const n = e[r];
|
|
36
|
+
i[n] === void 0 && (i[n] = {}), i = i[n];
|
|
37
|
+
}
|
|
38
|
+
i[e[e.length - 1]] = a;
|
|
39
|
+
}
|
|
40
|
+
getClassName() {
|
|
41
|
+
return "FlowGraphSetPropertyBlock";
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
c("FlowGraphSetPropertyBlock", h);
|
|
45
|
+
export {
|
|
46
|
+
h as FlowGraphSetPropertyBlock
|
|
47
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { S as s, aM as a, aS as u, aK as l } from "./index-CS3Icp_r.js";
|
|
2
|
+
class i extends s {
|
|
3
|
+
/**
|
|
4
|
+
* Constructs a new FlowGraphSetSoundVolumeBlock.
|
|
5
|
+
* @param config - optional configuration for the block
|
|
6
|
+
*/
|
|
7
|
+
constructor(e) {
|
|
8
|
+
super(e), this.sound = this.registerDataInput("sound", a), this.volume = this.registerDataInput("volume", u, 1);
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
_execute(e, n) {
|
|
14
|
+
const o = this.sound.getValue(e);
|
|
15
|
+
if (!o) {
|
|
16
|
+
this._reportError(e, "No sound provided"), this.out._activateSignal(e);
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
const t = this.volume.getValue(e);
|
|
20
|
+
o.volume = t, this.out._activateSignal(e);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* @returns class name of the block.
|
|
24
|
+
*/
|
|
25
|
+
getClassName() {
|
|
26
|
+
return "FlowGraphSetSoundVolumeBlock";
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
l("FlowGraphSetSoundVolumeBlock", i);
|
|
30
|
+
export {
|
|
31
|
+
i as FlowGraphSetSoundVolumeBlock
|
|
32
|
+
};
|