Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
public static nz.sodium.Cell<Axes3D> watchEntityAxes(
nz.sodium.Cell<Option<EcsReadOnlySceneContext>> cSceneCtxOp,
nz.sodium.Stream<EcsSceneChanges> sSceneChanges,
int entityId
) {
return nz.sodium.Cell.switchC(watchEntityComponentOp(cSceneCtxOp, sSceneChanges, entityId, Axes3DComponent.ecsComponent).lift(
watchEntityComponentOp(cSceneCtxOp, sSceneChanges, entityId, ChildComponent.ecsComponent),
(Option<Axes3DComponent> axesOp, Option<ChildComponent> parentOp) -> {
Option<Integer> parentIdOp =;
Axes3D localAxes =;
if (parentIdOp.isNone()) {
return new sodium.Cell<>(localAxes);
} else {
int parentId = parentIdOp.some();
return watchEntityAxes(cSceneCtxOp, sSceneChanges, parentId).map(
(Axes3D parentAxes) ->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.