Header menu logo Nu

WorldModule2 Module

Universal function definitions for the world (2/4).

Type extensions

Type extension Description

World.beginScreen name select behavior args world

Full Usage: World.beginScreen name select behavior args world

Parameters:
Returns: FQueue<SelectionEventData>

Begin the ImSim declaration of a screen with the given arguments. Note that changing the screen behavior over time has no effect as only the first moment is used.

Extended Type: World

name : string
select : bool
behavior : ScreenBehavior
args : ArgImSim<Screen> seq
world : World
Returns: FQueue<SelectionEventData>

World.beginScreenPlus zero init name select behavior args world

Full Usage: World.beginScreenPlus zero init name select behavior args world

Parameters:
Returns: FQueue<SelectionEventData> * 'r

Begin the ImSim declaration of a screen with the given arguments. Note that changing the screen behavior over time has no effect as only the first moment is used.

Extended Type: World

zero : 'r
init : (('r -> 'r) -> World -> unit) -> Screen -> World -> unit
name : string
select : bool
behavior : ScreenBehavior
args : ArgImSim<Screen> seq
world : World
Returns: FQueue<SelectionEventData> * 'r

World.beginScreenWithGroupFromFile name select behavior groupFilePath args world

Full Usage: World.beginScreenWithGroupFromFile name select behavior groupFilePath args world

Parameters:
Returns: FQueue<SelectionEventData>

Begin the ImSim declaration of a screen with the given arguments using a child group read from the given file path. Note that changing the screen behavior and file path over time has no effect as only the first moment is used.

Extended Type: World

name : string
select : bool
behavior : ScreenBehavior
groupFilePath : string
args : ArgImSim<Screen> seq
world : World
Returns: FQueue<SelectionEventData>

World.beginScreenWithGroupFromFilePlus zero init name select behavior groupFilePath args world

Full Usage: World.beginScreenWithGroupFromFilePlus zero init name select behavior groupFilePath args world

Parameters:
Returns: FQueue<SelectionEventData> * 'r

Begin the ImSim declaration of a screen with the given arguments using a child group read from the given file path. Note that changing the screen behavior and file path over time has no effect as only the first moment is used.

Extended Type: World

zero : 'r
init : (('r -> 'r) -> World -> unit) -> Screen -> World -> unit
name : string
select : bool
behavior : ScreenBehavior
groupFilePath : string
args : ArgImSim<Screen> seq
world : World
Returns: FQueue<SelectionEventData> * 'r

World.cleanUp world

Full Usage: World.cleanUp world

Parameters:

Clean-up the resources held by the world.

Extended Type: World

world : World

World.clearPropagationTargets entity world

Full Usage: World.clearPropagationTargets entity world

Parameters:

Clear all propagation targets pointing back to the given entity.

Extended Type: World

entity : Entity
world : World

World.createDissolveScreenFromGroupFile nameOpt dissolveDescriptor songOpt groupFilePath world

Full Usage: World.createDissolveScreenFromGroupFile nameOpt dissolveDescriptor songOpt groupFilePath world

Parameters:
Returns: Screen

Create a dissolve screen whose content is loaded from the given group file.

Extended Type: World

nameOpt : string option
dissolveDescriptor : DissolveDescriptor
songOpt : string
groupFilePath : SongDescriptor option
world : World
Returns: Screen

World.createDissolveScreenFromGroupFile6 dispatcherName nameOpt dissolveDescriptor songOpt groupFilePath world

Full Usage: World.createDissolveScreenFromGroupFile6 dispatcherName nameOpt dissolveDescriptor songOpt groupFilePath world

Parameters:
Returns: Screen

Create a dissolve screen whose content is loaded from the given group file.

Extended Type: World

dispatcherName : string
nameOpt : string option
dissolveDescriptor : DissolveDescriptor
songOpt : SongDescriptor option
groupFilePath : string
world : World
Returns: Screen

World.createSlideScreen nameOpt slideDescriptor destination world

Full Usage: World.createSlideScreen nameOpt slideDescriptor destination world

Parameters:
Returns: Screen

Create a slide screen that transitions to the given destination upon completion.

Extended Type: World

nameOpt : string option
slideDescriptor : SlideDescriptor
destination : Screen
world : World
Returns: Screen

World.createSlideScreen6 dispatcherName nameOpt slideDescriptor destination world

Full Usage: World.createSlideScreen6 dispatcherName nameOpt slideDescriptor destination world

Parameters:
Returns: Screen

Create a slide screen that transitions to the given destination upon completion.

Extended Type: World

dispatcherName : string
nameOpt : string option
slideDescriptor : SlideDescriptor
destination : Screen
world : World
Returns: Screen

World.endScreen world

Full Usage: World.endScreen world

Parameters:

End the ImSim declaration of a screen.

Extended Type: World

world : World

World.getSelectedScreenIdling world

Full Usage: World.getSelectedScreenIdling world

Parameters:
Returns: bool

Check that the selected screen is idling; that is, neither transitioning in or out via another screen (failing with an exception if no screen is selected).

Extended Type: World

world : World
Returns: bool

World.getSelectedScreenTransitioning world

Full Usage: World.getSelectedScreenTransitioning world

Parameters:
Returns: bool

Check that the selected screen is transitioning (failing with an exception if no screen is selected).

Extended Type: World

world : World
Returns: bool

World.propagateEntityStructure entity world

Full Usage: World.propagateEntityStructure entity world

Parameters:

Propagate the structure of an entity to all other entities with it as their propagation source. TODO: expose this through Entity API.

Extended Type: World

entity : Entity
world : World

World.reloadExistingAssets world

Full Usage: World.reloadExistingAssets world

Parameters:

Send a message to the subsystems to reload their existing assets.

Extended Type: World

world : World

World.runWithCleanUp runWhile preProcess perProcess postProcess imGuiProcess imGuiPostProcess firstFrame world

Full Usage: World.runWithCleanUp runWhile preProcess perProcess postProcess imGuiProcess imGuiPostProcess firstFrame world

Parameters:
    runWhile : World -> bool
    preProcess : World -> unit
    perProcess : World -> unit
    postProcess : World -> unit
    imGuiProcess : World -> unit
    imGuiPostProcess : World -> unit
    firstFrame : bool
    world : World

Returns: int

Run the game engine using the given world and returning exit code upon termination.

Extended Type: World

runWhile : World -> bool
preProcess : World -> unit
perProcess : World -> unit
postProcess : World -> unit
imGuiProcess : World -> unit
imGuiPostProcess : World -> unit
firstFrame : bool
world : World
Returns: int

World.runWithoutCleanUp runWhile preProcess perProcess postProcess imGuiProcess imGuiPostProcess firstFrame world

Full Usage: World.runWithoutCleanUp runWhile preProcess perProcess postProcess imGuiProcess imGuiPostProcess firstFrame world

Parameters:
    runWhile : World -> bool
    preProcess : World -> unit
    perProcess : World -> unit
    postProcess : World -> unit
    imGuiProcess : World -> unit
    imGuiPostProcess : World -> unit
    firstFrame : bool
    world : World

Run the game engine with the given handlers, but don't clean up at the end.

Extended Type: World

runWhile : World -> bool
preProcess : World -> unit
perProcess : World -> unit
postProcess : World -> unit
imGuiProcess : World -> unit
imGuiPostProcess : World -> unit
firstFrame : bool
world : World

World.selectScreen transitionState screen world

Full Usage: World.selectScreen transitionState screen world

Parameters:

Select the given screen without transitioning, even if another transition is taking place.

Extended Type: World

transitionState : TransitionState
screen : Screen
world : World

World.setScreenSlide slideDescriptor destination screen world

Full Usage: World.setScreenSlide slideDescriptor destination screen world

Parameters:

Set the slide aspects of a screen.

Extended Type: World

slideDescriptor : SlideDescriptor
destination : Screen
screen : Screen
world : World

World.sweepOctree world

Full Usage: World.sweepOctree world

Parameters:

Sweep the octree clean of all empty nodes. It can make sense to call this after loading a new level.

Extended Type: World

world : World

World.sweepQuadtree world

Full Usage: World.sweepQuadtree world

Parameters:

Sweep the quadtree clean of all empty nodes. It can make sense to call this after loading a new level.

Extended Type: World

world : World

World.switch worldStateOld world

Full Usage: World.switch worldStateOld world

Parameters:

Switch simulation to this world, resynchronizing the imperative subsystems with its current state. Needed when abandoning execution of the current world in favor of a previous world, such as in the case of an exception where the try expression resulted in a transformed world that is to be discarded.

Extended Type: World

worldStateOld : WorldState
world : World

World.transitionScreen destination world

Full Usage: World.transitionScreen destination world

Parameters:

Transition to the given screen.

Extended Type: World

destination : Screen
world : World

World.tryGetSelectedScreenIdling world

Full Usage: World.tryGetSelectedScreenIdling world

Parameters:
Returns: bool option

Try to check that the selected screen is idling; that is, neither transitioning in or out via another screen.

Extended Type: World

world : World
Returns: bool option

World.tryGetSelectedScreenTransitioning world

Full Usage: World.tryGetSelectedScreenTransitioning world

Parameters:
Returns: bool option

Try to check that the selected screen is transitioning.

Extended Type: World

world : World
Returns: bool option

World.tryProcessSimulants zeroDelta world

Full Usage: World.tryProcessSimulants zeroDelta world

Parameters:
    zeroDelta : bool
    world : World

Process ImSim for a single frame. HACK: needed only as a hack for Gaia and other accompanying programs to ensure ImGui simulants are created at a meaningful time. Do NOT call this in the course of normal operations!

Extended Type: World

zeroDelta : bool
world : World

World.tryReloadAssetGraph inputDirectory outputDirectory refinementDirectory world

Full Usage: World.tryReloadAssetGraph inputDirectory outputDirectory refinementDirectory world

Parameters:
    inputDirectory : string
    outputDirectory : string
    refinementDirectory : string
    world : World

Returns: Either<string, AssetGraph>

Attempt to reload asset graph, build assets, then reload built assets. Currently does not support reloading of song assets, and possibly others that are locked by the engine's subsystems.

Extended Type: World

inputDirectory : string
outputDirectory : string
refinementDirectory : string
world : World
Returns: Either<string, AssetGraph>

World.tryReloadAssets world

Full Usage: World.tryReloadAssets world

Parameters:
Returns: bool

Attempt to reload asset graph, build assets, then reload built assets. Currently does not support reloading of song assets, and possibly others that are locked by the engine's subsystems.

Extended Type: World

world : World
Returns: bool

World.tryReloadOverlayer inputDirectory outputDirectory world

Full Usage: World.tryReloadOverlayer inputDirectory outputDirectory world

Parameters:
    inputDirectory : string
    outputDirectory : string
    world : World

Returns: Either<string, Overlayer>

Try to reload the overlayer currently in use by the world.

Extended Type: World

inputDirectory : string
outputDirectory : string
world : World
Returns: Either<string, Overlayer>

World.tryTransitionScreen destination world

Full Usage: World.tryTransitionScreen destination world

Parameters:
Returns: bool

Try to transition to the given screen if no other transition is in progress.

Extended Type: World

destination : Screen
world : World
Returns: bool

Type something to start searching.