Header menu logo Nu

WorldModule Module

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

Type extensions

Type extension Description

this.Launcher

Full Usage: this.Launcher

Parameters:
    () : unit

Returns: World Coroutine -> unit

A coroutine launcher.

Extended Type: World

() : unit
Returns: World Coroutine -> unit

this.Launcher

Full Usage: this.Launcher

Returns: World Coroutine -> unit

A coroutine launcher.

Extended Type: World

Returns: World Coroutine -> unit

this.LauncherWhile

Full Usage: this.LauncherWhile

Parameters:
Returns: World Coroutine -> unit

A cancellable coroutine launcher.

Extended Type: World

pred : World -> bool
Returns: World Coroutine -> unit

World.addKeyedValue key value world

Full Usage: World.addKeyedValue key value world

Parameters:
    key : string
    value : 'a
    world : World

Add a value to the world's key value store.

Extended Type: World

key : string
value : 'a
world : World

World.addTasklet simulant tasklet world

Full Usage: World.addTasklet simulant tasklet world

Parameters:

Add a tasklet to be executed by the engine at the scheduled time.

Extended Type: World

simulant : Simulant
tasklet : World Tasklet
world : World

World.defer operation simulant world

Full Usage: World.defer operation simulant world

Parameters:

Schedule an operation to be executed by the engine at the end of the current frame or the next frame if we've already started processing tasklets. When called in an ImSim Process context, will provide the ImSim simulant context and declared values from World that were active in that Process context as well as time and advancement state.

Extended Type: World

operation : World -> unit
simulant : Simulant
world : World

World.enqueueJob priority job world

Full Usage: World.enqueueJob priority job world

Parameters:
    priority : single
    job : Job
    world : World

Enqueue a job for threaded execution.

Extended Type: World

priority : single
job : Job
world : World

World.exit world

Full Usage: World.exit world

Parameters:

Place the engine into a state such that the app will exit at the end of the current frame.

Extended Type: World

world : World

World.getAccompanied world

Full Usage: World.getAccompanied world

Parameters:
Returns: bool

Get whether the engine is running accompanied, such as in an editor.

Extended Type: World

world : World
Returns: bool

World.getAdvancing world

Full Usage: World.getAdvancing world

Parameters:
Returns: bool

Check that the update rate is non-zero.

Extended Type: World

world : World
Returns: bool

World.getAlive world

Full Usage: World.getAlive world

Parameters:
Returns: bool

Get the the aliveness state of the engine.

Extended Type: World

world : World
Returns: bool

World.getAllowCodeReload world

Full Usage: World.getAllowCodeReload world

Parameters:
Returns: bool

Whether the current plugin allow code reloading.

Extended Type: World

world : World
Returns: bool

World.getClockDelta world

Full Usage: World.getClockDelta world

Parameters:
Returns: single

Get the world's clock delta time.

Extended Type: World

world : WorldState
Returns: single

World.getClockTime world

Full Usage: World.getClockTime world

Parameters:
Returns: single

Get the world's clock time.

Extended Type: World

world : WorldState
Returns: single

World.getCollectionConfig world

Full Usage: World.getCollectionConfig world

Parameters:
Returns: TConfig

Get collection config value.

Extended Type: World

world : World
Returns: TConfig

World.getContextEntity world

Full Usage: World.getContextEntity world

Parameters:
Returns: Entity

Get the current ImSim context translated to a Entity handle (throwing upon failure).

Extended Type: World

world : World
Returns: Entity

World.getContextGame world

Full Usage: World.getContextGame world

Parameters:
Returns: Game

Get the current ImSim context translated to a Game handle (throwing upon failure).

Extended Type: World

world : World
Returns: Game

World.getContextGroup world

Full Usage: World.getContextGroup world

Parameters:
Returns: Group

Get the current ImSim context translated to a Group handle (throwing upon failure).

Extended Type: World

world : World
Returns: Group

World.getContextImSim world

Full Usage: World.getContextImSim world

Parameters:
Returns: Address

Get the current ImSim context.

Extended Type: World

world : World
Returns: Address

World.getContextInitializing world

Full Usage: World.getContextInitializing world

Parameters:
Returns: bool

Check that the current ImSim context is initializing this frame.

Extended Type: World

world : World
Returns: bool

World.getContextScreen world

Full Usage: World.getContextScreen world

Parameters:
Returns: Screen

Get the current ImSim context translated to a Screen handle (throwing upon failure).

Extended Type: World

world : World
Returns: Screen

World.getDeclaredEntity world

Full Usage: World.getDeclaredEntity world

Parameters:
Returns: Entity

Get the recent ImSim declaration translated to a Entity handle (throwing upon failure).

Extended Type: World

world : World
Returns: Entity

World.getDeclaredGame world

Full Usage: World.getDeclaredGame world

Parameters:
Returns: Game

Get the recent ImSim declaration translated to a Game handle (throwing upon failure).

Extended Type: World

world : World
Returns: Game

World.getDeclaredGroup world

Full Usage: World.getDeclaredGroup world

Parameters:
Returns: Group

Get the recent ImSim declaration translated to a Group handle (throwing upon failure).

Extended Type: World

world : World
Returns: Group

World.getDeclaredImSim world

Full Usage: World.getDeclaredImSim world

Parameters:
Returns: Address

Get the recent ImSim declaration.

Extended Type: World

world : World
Returns: Address

World.getDeclaredInitializing world

Full Usage: World.getDeclaredInitializing world

Parameters:
Returns: bool

Check that the recent ImSim declaration is initializing this frame.

Extended Type: World

world : World
Returns: bool

World.getDeclaredScreen world

Full Usage: World.getDeclaredScreen world

Parameters:
Returns: Screen

Get the recent ImSim declaration translated to a Screen handle (throwing upon failure).

Extended Type: World

world : World
Returns: Screen

World.getEditModes world

Full Usage: World.getEditModes world

Parameters:
Returns: Map<string, (World -> unit)>

Get the user-defined edit modes.

Extended Type: World

world : World
Returns: Map<string, (World -> unit)>

World.getEntityDispatchers world

Full Usage: World.getEntityDispatchers world

Parameters:
Returns: Map<string, EntityDispatcher>

Get the entity dispatchers of the world.

Extended Type: World

world : World
Returns: Map<string, EntityDispatcher>

World.getEventFilter world

Full Usage: World.getEventFilter world

Parameters:
Returns: EventFilter

Get the state of the event filter.

Extended Type: World

world : World
Returns: EventFilter

World.getEventTracerOpt world

Full Usage: World.getEventTracerOpt world

Parameters:
Returns: (string -> unit) option

Get how events are being traced.

Extended Type: World

world : World
Returns: (string -> unit) option

World.getFacets world

Full Usage: World.getFacets world

Parameters:
Returns: Map<string, Facet>

Get the facets of the world.

Extended Type: World

world : World
Returns: Map<string, Facet>

World.getFunctional world

Full Usage: World.getFunctional world

Parameters:
Returns: bool

Check that the world is executing with functional semantics.

Extended Type: World

world : World
Returns: bool

World.getGameDelta world

Full Usage: World.getGameDelta world

Parameters:
Returns: GameTime

Get the world's game delta time.

Extended Type: World

world : WorldState
Returns: GameTime

World.getGameDispatchers world

Full Usage: World.getGameDispatchers world

Parameters:
Returns: Map<string, GameDispatcher>

Get the game dispatchers of the world.

Extended Type: World

world : World
Returns: Map<string, GameDispatcher>

World.getGameTime world

Full Usage: World.getGameTime world

Parameters:
Returns: GameTime

Get the world's game time.

Extended Type: World

world : WorldState
Returns: GameTime

World.getGeometryViewport world

Full Usage: World.getGeometryViewport world

Parameters:
Returns: Viewport

Get the geometry viewport.

Extended Type: World

world : World
Returns: Viewport

World.getGroupDispatchers world

Full Usage: World.getGroupDispatchers world

Parameters:
Returns: Map<string, GroupDispatcher>

Get the group dispatchers of the world.

Extended Type: World

world : World
Returns: Map<string, GroupDispatcher>

World.getHalted world

Full Usage: World.getHalted world

Parameters:
Returns: bool

Check that the update rate is zero.

Extended Type: World

world : World
Returns: bool

World.getImperative world

Full Usage: World.getImperative world

Parameters:
Returns: bool

Check that the world is executing with imperative semantics where applicable.

Extended Type: World

world : World
Returns: bool

World.getKeyedValue key world

Full Usage: World.getKeyedValue key world

Parameters:
    key : string
    world : World

Returns: 'a

Look up a value from the world's key value store, throwing an exception if it is not found.

Extended Type: World

key : string
world : World
Returns: 'a

World.getLightMapRenderRequested world

Full Usage: World.getLightMapRenderRequested world

Parameters:
Returns: bool

Get whether a light map render was requested.

Extended Type: World

world : World
Returns: bool

World.getOuterViewport world

Full Usage: World.getOuterViewport world

Parameters:
Returns: Viewport

Get the outer viewport.

Extended Type: World

world : World
Returns: Viewport

World.getOverlayNames world

Full Usage: World.getOverlayNames world

Parameters:
Returns: ICollection<string>

Get overlay names.

Extended Type: World

world : World
Returns: ICollection<string>

World.getRasterViewport world

Full Usage: World.getRasterViewport world

Parameters:
Returns: Viewport

Get the inner viewport.

Extended Type: World

world : World
Returns: Viewport

World.getScreenDispatchers world

Full Usage: World.getScreenDispatchers world

Parameters:
Returns: Map<string, ScreenDispatcher>

Get the screen dispatchers of the world.

Extended Type: World

world : World
Returns: Map<string, ScreenDispatcher>

World.getUnaccompanied world

Full Usage: World.getUnaccompanied world

Parameters:
Returns: bool

Get whether the engine is running unaccompanied, such as outside of an editor.

Extended Type: World

world : World
Returns: bool

World.getUpdateDelta world

Full Usage: World.getUpdateDelta world

Parameters:
Returns: int64

Get the world's update delta time.

Extended Type: World

world : WorldState
Returns: int64

World.getUpdateTime world

Full Usage: World.getUpdateTime world

Parameters:
Returns: int64

Get the world's update time.

Extended Type: World

world : WorldState
Returns: int64

World.getWindowSize world

Full Usage: World.getWindowSize world

Parameters:
Returns: Vector2i

Get the window size, using resolution as default in case there is no window.

Extended Type: World

world : World
Returns: Vector2i

World.handleAsExit arg1 world

Full Usage: World.handleAsExit arg1 world

Parameters:
Returns: Handling

Handle an event by exiting the application.

Extended Type: World

arg0 : Event<'a, 's>
world : World
Returns: Handling

World.handleAsPass arg1 arg2

Full Usage: World.handleAsPass arg1 arg2

Parameters:
Returns: Handling

Handle an event by doing nothing.

Extended Type: World

arg0 : Event<'a, 's>
arg1 : World
Returns: Handling

World.handleAsSwallow arg1 arg2

Full Usage: World.handleAsSwallow arg1 arg2

Parameters:
Returns: Handling

Handle an event by swallowing.

Extended Type: World

arg0 : Event<'a, 's>
arg1 : World
Returns: Handling

World.invoke name args world

Full Usage: World.invoke name args world

Parameters:
    name : string
    args : obj list
    world : World

Invoke a user-defined callback.

Extended Type: World

name : string
args : obj list
world : World

World.launchCoroutine pred coroutine world

Full Usage: World.launchCoroutine pred coroutine world

Parameters:

Launch a coroutine to be processed by the engine.

Extended Type: World

pred : World -> bool
coroutine : World Coroutine
world : World

World.mapKeyedValue mapper key world

Full Usage: World.mapKeyedValue mapper key world

Parameters:
    mapper : 'a -> 'a
    key : string
    world : World

Transform a value in the world's key value store if it exists.

Extended Type: World

mapper : 'a -> 'a
key : string
world : World

World.monitor callback eventAddress subscriber world

Full Usage: World.monitor callback eventAddress subscriber world

Parameters:

Keep active a subscription for the life span of a simulant.

Extended Type: World

callback : Event<'a, 's> -> World -> Handling
eventAddress : 'a Address
subscriber : 's
world : World

World.monitorPlus callback eventAddress subscriber world

Full Usage: World.monitorPlus callback eventAddress subscriber world

Parameters:
Returns: World -> unit

Keep active a subscription for the life span of a simulant.

Extended Type: World

callback : Event<'a, 's> -> World -> Handling
eventAddress : 'a Address
subscriber : 's
world : World
Returns: World -> unit

World.publish eventData eventAddress publisher world

Full Usage: World.publish eventData eventAddress publisher world

Parameters:
    eventData : 'a
    eventAddress : 'a Address
    publisher : 'p
    world : World

Modifiers: inline
Type parameters: 'a, 'p

Publish an event with subscription sorting and wildcard utilization.

Extended Type: World

eventData : 'a
eventAddress : 'a Address
publisher : 'p
world : World

World.publishPlus eventData eventAddress eventTrace publisher hierarchical selectedOnly world

Full Usage: World.publishPlus eventData eventAddress eventTrace publisher hierarchical selectedOnly world

Parameters:
    eventData : 'a
    eventAddress : 'a Address
    eventTrace : EventTrace
    publisher : 'p
    hierarchical : bool
    selectedOnly : bool
    world : World

Publish an event.

Extended Type: World

eventData : 'a
eventAddress : 'a Address
eventTrace : EventTrace
publisher : 'p
hierarchical : bool
selectedOnly : bool
world : World

World.publishUnsorted eventData eventAddress publisher world

Full Usage: World.publishUnsorted eventData eventAddress publisher world

Parameters:
    eventData : 'a
    eventAddress : 'a Address
    publisher : 'p
    world : World

Modifiers: inline
Type parameters: 'a, 'p

Publish an event with no subscription sorting or wildcard utilization.

Extended Type: World

eventData : 'a
eventAddress : 'a Address
publisher : 'p
world : World

World.reloadSymbols world

Full Usage: World.reloadSymbols world

Parameters:

Reload all the symbols in symbolics.

Extended Type: World

world : World

World.removeKeyedValue key world

Full Usage: World.removeKeyedValue key world

Parameters:
    key : string
    world : World

Remove a value from the world's key value store.

Extended Type: World

key : string
world : World

World.requestLightMapRender world

Full Usage: World.requestLightMapRender world

Parameters:

Request a light map render for the current frame, such as when a light probe needs to be rendered.

Extended Type: World

world : World

World.schedule delay operation simulant world

Full Usage: World.schedule delay operation simulant world

Parameters:

Schedule an operation to be executed by the engine with the given delay. When called in an ImSim Process context, will provide the ImSim simulant context and declared values from World that were active in that Process context as well as time and advancement state.

Extended Type: World

delay : GameTime
operation : World -> unit
simulant : Simulant
world : World

World.sense callback eventAddress subscriber facetName world

Full Usage: World.sense callback eventAddress subscriber facetName world

Parameters:

Keep active a subscription for the life span of an entity and a given facet.

Extended Type: World

callback : Event<'a, Entity> -> World -> Handling
eventAddress : 'a Address
subscriber : Entity
facetName : string
world : World

World.sensePlus callback eventAddress entity facetName world

Full Usage: World.sensePlus callback eventAddress entity facetName world

Parameters:
Returns: World -> unit

Keep active a subscription for the life span of an entity and a given facet.

Extended Type: World

callback : Event<'a, Entity> -> World -> Handling
eventAddress : 'a Address
entity : Entity
facetName : string
world : World
Returns: World -> unit

World.setAdvancing advancing world

Full Usage: World.setAdvancing advancing world

Parameters:
    advancing : bool
    world : World

Set whether the world state is advancing.

Extended Type: World

advancing : bool
world : World

World.setEventFilter filter world

Full Usage: World.setEventFilter filter world

Parameters:

Set the state of the event filter.

Extended Type: World

filter : EventFilter
world : World

World.setEventTracerOpt tracerOpt world

Full Usage: World.setEventTracerOpt tracerOpt world

Parameters:
    tracerOpt : (string -> unit) option
    world : World

Set how events are being traced, if at all.

Extended Type: World

tracerOpt : (string -> unit) option
world : World

World.setFramePacing clockPacing world

Full Usage: World.setFramePacing clockPacing world

Parameters:
    clockPacing : bool
    world : World

Set whether the world's frame rate is being explicitly paced based on clock progression.

Extended Type: World

clockPacing : bool
world : World

World.setGeometryViewport viewport world

Full Usage: World.setGeometryViewport viewport world

Parameters:

Set the geometry viewport.

Extended Type: World

viewport : Viewport
world : World

World.setOuterViewport viewport world

Full Usage: World.setOuterViewport viewport world

Parameters:

Set the outer viewport.

Extended Type: World

viewport : Viewport
world : World

World.setRasterViewport viewport world

Full Usage: World.setRasterViewport viewport world

Parameters:

Set the inner viewport.

Extended Type: World

viewport : Viewport
world : World

World.subscribe callback eventAddress subscriber world

Full Usage: World.subscribe callback eventAddress subscriber world

Parameters:

Subscribe to an event.

Extended Type: World

callback : Event<'a, 's> -> World -> Handling
eventAddress : 'a Address
subscriber : 's
world : World

World.subscribePlus subscriptionId callback eventAddress subscriber world

Full Usage: World.subscribePlus subscriptionId callback eventAddress subscriber world

Parameters:
Returns: World -> unit

Subscribe to an event using the given subscriptionId and be provided with an unsubscription callback.

Extended Type: World

subscriptionId : uint64
callback : Event<'a, 's> -> World -> Handling
eventAddress : 'a Address
subscriber : 's
world : World
Returns: World -> unit

World.tryAwaitJob deadline jobId world

Full Usage: World.tryAwaitJob deadline jobId world

Parameters:
Returns: JobResult option

Await a job from threaded execution. Order of jobs with the same key is not guaranteed.

Extended Type: World

deadline : DateTimeOffset
jobId : obj
world : World
Returns: JobResult option

World.tryGetKeyedValue key world

Full Usage: World.tryGetKeyedValue key world

Parameters:
    key : string
    world : World

Returns: 'a option

Attempt to look up a value from the world's key value store.

Extended Type: World

key : string
world : World
Returns: 'a option

World.tryGetRoutedOverlayNameOpt dispatcherName world

Full Usage: World.tryGetRoutedOverlayNameOpt dispatcherName world

Parameters:
    dispatcherName : string
    world : World

Returns: string option

Attempt to get the given dispatcher's optional routed overlay name.

Extended Type: World

dispatcherName : string
world : World
Returns: string option

World.tryGetSymbol assetTag metadata world

Full Usage: World.tryGetSymbol assetTag metadata world

Parameters:
Returns: Symbol option

Try to find a symbol with the given asset tag.

Extended Type: World

assetTag : Symbol AssetTag
metadata : SymbolLoadMetadata
world : World
Returns: Symbol option

World.tryGetSymbols implicitDelimiters assetTags world

Full Usage: World.tryGetSymbols implicitDelimiters assetTags world

Parameters:
Returns: Symbol list

Try to find symbols with the given asset tags.

Extended Type: World

implicitDelimiters : Symbol AssetTag
assetTags : SymbolLoadMetadata list
world : World
Returns: Symbol list

World.tryGetWindowFlags world

Full Usage: World.tryGetWindowFlags world

Parameters:
Returns: uint32 option

Attempt to get the window flags.

Extended Type: World

world : World
Returns: uint32 option

World.tryGetWindowFullScreen world

Full Usage: World.tryGetWindowFullScreen world

Parameters:
Returns: bool option

Attempt to check that the window is in a full screen state.

Extended Type: World

world : World
Returns: bool option

World.tryGetWindowMaximized world

Full Usage: World.tryGetWindowMaximized world

Parameters:
Returns: bool option

Attempt to check that the window is maximized.

Extended Type: World

world : World
Returns: bool option

World.tryGetWindowMinimized world

Full Usage: World.tryGetWindowMinimized world

Parameters:
Returns: bool option

Attempt to check that the window is minimized.

Extended Type: World

world : World
Returns: bool option

World.tryGetWindowPosition world

Full Usage: World.tryGetWindowPosition world

Parameters:
Returns: Vector2i option

Attempt to get the window position.

Extended Type: World

world : World
Returns: Vector2i option

World.tryGetWindowSize world

Full Usage: World.tryGetWindowSize world

Parameters:
Returns: Vector2i option

Attempt to get the window size.

Extended Type: World

world : World
Returns: Vector2i option

World.tryLoadSymbolPackage implicitDelimiters packageName world

Full Usage: World.tryLoadSymbolPackage implicitDelimiters packageName world

Parameters:

Try to load a symbol package with the given name.

Extended Type: World

implicitDelimiters : string
packageName : SymbolLoadMetadata
world : World

World.tryMakeEmitter time lifeTimeOpt particleLifeTimeMaxOpt particleRate particleMax emitterStyle world

Full Usage: World.tryMakeEmitter time lifeTimeOpt particleLifeTimeMaxOpt particleRate particleMax emitterStyle world

Parameters:
    time : GameTime
    lifeTimeOpt : GameTime
    particleLifeTimeMaxOpt : GameTime
    particleRate : single
    particleMax : int
    emitterStyle : string
    world : World

Returns: Emitter option

Attempt to make an emitter with the given parameters.

Extended Type: World

time : GameTime
lifeTimeOpt : GameTime
particleLifeTimeMaxOpt : GameTime
particleRate : single
particleMax : int
emitterStyle : string
world : World
Returns: Emitter option

World.trySetEditMode editMode world

Full Usage: World.trySetEditMode editMode world

Parameters:
    editMode : string
    world : World

Attempt to set the edit mode.

Extended Type: World

editMode : string
world : World

World.trySetWindowFullScreen fullScreen world

Full Usage: World.trySetWindowFullScreen fullScreen world

Parameters:
    fullScreen : bool
    world : World

Attempt to set the window's full screen state.

Extended Type: World

fullScreen : bool
world : World

World.trySetWindowPosition position world

Full Usage: World.trySetWindowPosition position world

Parameters:

Attempt to set the window position.

Extended Type: World

position : Vector2i
world : World

World.trySetWindowSize size world

Full Usage: World.trySetWindowSize size world

Parameters:

Attempt to set the window size.

Extended Type: World

size : Vector2i
world : World

World.tryToggleWindowFullScreen world

Full Usage: World.tryToggleWindowFullScreen world

Parameters:

Attempt to toggle the window's full screen state.

Extended Type: World

world : World

World.unloadSymbolPackage packageName world

Full Usage: World.unloadSymbolPackage packageName world

Parameters:
    packageName : string
    world : World

Unload a symbol package with the given name.

Extended Type: World

packageName : string
world : World

World.unsubscribe subscriptionId world

Full Usage: World.unsubscribe subscriptionId world

Parameters:
    subscriptionId : uint64
    world : World

Unsubscribe from an event.

Extended Type: World

subscriptionId : uint64
world : World

Type something to start searching.