-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flow Graph Path Mapping #14481
Flow Graph Path Mapping #14481
Conversation
Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). |
…serialization and set property block
9e8d858
to
78ab0d3
Compare
Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). |
Snapshot stored with reference name: Test environment: To test a playground add it to the URL, for example: https://babylonsnapshots.z22.web.core.windows.net/refs/pull/14481/merge/index.html#WGZLGJ#4600 Links to test babylon tools with this snapshot: https://playground.babylonjs.com/?snapshot=refs/pull/14481/merge To test the snapshot in the playground with a playground ID add it after the snapshot query string: https://playground.babylonjs.com/?snapshot=refs/pull/14481/merge#BCU1XR#0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it can be abstracted a bit more, to support future changes.
There should be a path, and a configurable map of replacement values. it should then take the value from the context, based on the map key, instead of fixing the nodeIndex as a property.
GetTargetFromPath can be a static member of FlowGraph (or the context). This was it can be used on other future blocks as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! just a few nitty comments.
packages/dev/core/test/unit/FlowGraph/flowGraphSerialization.test.ts
Outdated
Show resolved
Hide resolved
f0f343b
to
8d35d0c
Compare
Changes
subString
, which represents a string that will be substituted by a node value if encountered between{}
. For example, if the subString isnodeIndex
, and the path is/node/{nodeIndex}/
, when this node is activated, it will look into the nodeIndex socket, and substitute its value (which could be 0, then the path would be/node/0
). This allows dynamic paths that are resolved based on the current state of the scene./node/{nodeIndex}/property
, and we want these paths to be resolved at runtime.