Header menu logo Nu

WorldModuleGame Module

Game functions for the world (1/2).

Type extensions

Type extension Description

World.assetTagToValueOpt assetTag metadata world

Full Usage: World.assetTagToValueOpt assetTag metadata world

Parameters:
Returns: 'a option

Fetch an asset with the given tag and convert it to a value of type 'a.

Extended Type: World

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

World.assetTagsToValueOpts assetTags metadata world

Full Usage: World.assetTagsToValueOpts assetTags metadata world

Parameters:
Returns: 'a option list

Fetch assets with the given tags and convert it to values of type 'a.

Extended Type: World

assetTags : Symbol AssetTag list
metadata : SymbolLoadMetadata
world : World
Returns: 'a option list

World.boundsInPlay3d bounds world

Full Usage: World.boundsInPlay3d bounds world

Parameters:
Returns: bool

Check that the given bounds is within the 3d eye's play bounds.

Extended Type: World

bounds : Box3
world : World
Returns: bool

World.boundsInView2d absolute bounds world

Full Usage: World.boundsInView2d absolute bounds world

Parameters:
    absolute : bool
    bounds : Box2
    world : World

Returns: bool

Check that the given bounds is within view.

Extended Type: World

absolute : bool
bounds : Box2
world : World
Returns: bool

World.boundsInView2dAbsolute bounds world

Full Usage: World.boundsInView2dAbsolute bounds world

Parameters:
Returns: bool

Check that the given bounds is within the 2d eye's sight irrespective of eye center.

Extended Type: World

bounds : Box2
world : World
Returns: bool

World.boundsInView2dRelative bounds world

Full Usage: World.boundsInView2dRelative bounds world

Parameters:
Returns: bool

Check that the given bounds is within the 2d eye's sight relative to eye center.

Extended Type: World

bounds : Box2
world : World
Returns: bool

World.boundsInView3d lightProbe light presence bounds world

Full Usage: World.boundsInView3d lightProbe light presence bounds world

Parameters:
Returns: bool

Check that the given bounds is within the 3d eye's sight (or a light probe / light in the light box that may be lighting something within it).

Extended Type: World

lightProbe : bool
light : bool
presence : Presence
bounds : Box3
world : World
Returns: bool

World.constrainEye2dBounds bounds world

Full Usage: World.constrainEye2dBounds bounds world

Parameters:

Constrain the eye to the given 2d bounds.

Extended Type: World

bounds : Box2
world : World

World.getDesiredScreen world

Full Usage: World.getDesiredScreen world

Parameters:
Returns: DesiredScreen

Get the desired screen, if applicable.

Extended Type: World

world : World
Returns: DesiredScreen

World.getEntities2d set world

Full Usage: World.getEntities2d set world

Parameters:
Returns: Entity seq

Get all 2d entities in the current selected screen, including all uncullable entities.

Extended Type: World

set : HashSet<Quadelement<Entity>>
world : World
Returns: Entity seq

World.getEntities2dAtPoint point set world

Full Usage: World.getEntities2dAtPoint point set world

Parameters:
Returns: Entity seq

Get all 2d entities at the given point, including all uncullable entities.

Extended Type: World

point : Vector2
set : HashSet<Quadelement<Entity>>
world : World
Returns: Entity seq

World.getEntities2dInBounds bounds set world

Full Usage: World.getEntities2dInBounds bounds set world

Parameters:
Returns: Entity seq

Get all 2d entities in the given bounds, including all uncullable entities.

Extended Type: World

bounds : Box2
set : HashSet<Quadelement<Entity>>
world : World
Returns: Entity seq

World.getEntities2dInPlay set world

Full Usage: World.getEntities2dInPlay set world

Parameters:
Returns: Entity seq

Get all 2d entities needing to update for the current 2d play zone, including all uncullable entities.

Extended Type: World

set : HashSet<Quadelement<Entity>>
world : World
Returns: Entity seq

World.getEntities2dInView set world

Full Usage: World.getEntities2dInView set world

Parameters:
Returns: Entity seq

Get all 2d entities in the current 2d view, including all uncullable entities.

Extended Type: World

set : HashSet<Quadelement<Entity>>
world : World
Returns: Entity seq

World.getEntities3d set world

Full Usage: World.getEntities3d set world

Parameters:
Returns: Entity seq

Get all 3d entities in the current selected screen, including all uncullable entities.

Extended Type: World

set : HashSet<Octelement<Entity>>
world : World
Returns: Entity seq

World.getEntities3dAtPoint point set world

Full Usage: World.getEntities3dAtPoint point set world

Parameters:
Returns: Entity seq

Get all 3d entities at the given point, including all uncullable entities.

Extended Type: World

point : Vector3
set : HashSet<Octelement<Entity>>
world : World
Returns: Entity seq

World.getEntities3dInBounds bounds set world

Full Usage: World.getEntities3dInBounds bounds set world

Parameters:
Returns: Entity seq

Get all 3d entities in the given bounds, including all uncullable entities.

Extended Type: World

bounds : Box3
set : HashSet<Octelement<Entity>>
world : World
Returns: Entity seq

World.getEntities3dInPlay set world

Full Usage: World.getEntities3dInPlay set world

Parameters:
Returns: Entity seq

Get all 3d entities in the current 3d play zone, including all uncullable entities.

Extended Type: World

set : HashSet<Octelement<Entity>>
world : World
Returns: Entity seq

World.getEntities3dInView set world

Full Usage: World.getEntities3dInView set world

Parameters:
Returns: Entity seq

Get all 3d entities in the current 3d view, including all uncullable entities.

Extended Type: World

set : HashSet<Octelement<Entity>>
world : World
Returns: Entity seq

World.getEye2dBounds world

Full Usage: World.getEye2dBounds world

Parameters:
Returns: Box2

Get the current 2d eye bounds.

Extended Type: World

world : World
Returns: Box2

World.getEye2dCenter world

Full Usage: World.getEye2dCenter world

Parameters:
Returns: Vector2

Get the current 2d eye center.

Extended Type: World

world : World
Returns: Vector2

World.getEye2dSize world

Full Usage: World.getEye2dSize world

Parameters:
Returns: Vector2

Get the current 2d eye size.

Extended Type: World

world : World
Returns: Vector2

World.getEye3dCenter world

Full Usage: World.getEye3dCenter world

Parameters:
Returns: Vector3

Get the current 3d eye center.

Extended Type: World

world : World
Returns: Vector3

World.getEye3dFieldOfView world

Full Usage: World.getEye3dFieldOfView world

Parameters:
Returns: single

Get the current 3d eye field of view.

Extended Type: World

world : World
Returns: single

World.getEye3dFrustumExterior world

Full Usage: World.getEye3dFrustumExterior world

Parameters:
Returns: Frustum

Get the current exterior 3d eye frustum.

Extended Type: World

world : World
Returns: Frustum

World.getEye3dFrustumImposter world

Full Usage: World.getEye3dFrustumImposter world

Parameters:
Returns: Frustum

Get the current imposter 3d eye frustum.

Extended Type: World

world : World
Returns: Frustum

World.getEye3dFrustumInterior world

Full Usage: World.getEye3dFrustumInterior world

Parameters:
Returns: Frustum

Get the current interior 3d eye frustum.

Extended Type: World

world : World
Returns: Frustum

World.getEye3dFrustumView world

Full Usage: World.getEye3dFrustumView world

Parameters:
Returns: Frustum

Get the current 3d eye view frustum.

Extended Type: World

world : World
Returns: Frustum

World.getEye3dRotation world

Full Usage: World.getEye3dRotation world

Parameters:
Returns: Quaternion

Get the current 3d eye rotation.

Extended Type: World

world : World
Returns: Quaternion

World.getLight3dViewBox world

Full Usage: World.getLight3dViewBox world

Parameters:
Returns: Box3

Get the current 3d light box.

Extended Type: World

world : World
Returns: Box3

World.getLightProbes3dInView set world

Full Usage: World.getLightProbes3dInView set world

Parameters:
Returns: Entity seq

Get all 3d light probe entities in the current 3d light box, including all uncullable lights.

Extended Type: World

set : HashSet<Octelement<Entity>>
world : World
Returns: Entity seq

World.getLightProbes3dInViewBox box set world

Full Usage: World.getLightProbes3dInViewBox box set world

Parameters:
Returns: Entity seq

Get all 3d light probe entities in the current 3d light box, including all uncullable lights.

Extended Type: World

box : Box3
set : HashSet<Octelement<Entity>>
world : World
Returns: Entity seq

World.getLightProbes3dInViewFrustum frustum set world

Full Usage: World.getLightProbes3dInViewFrustum frustum set world

Parameters:
Returns: Entity seq

Get all 3d light probe entities in the current 3d light box, including all uncullable light probes.

Extended Type: World

frustum : Frustum
set : HashSet<Octelement<Entity>>
world : World
Returns: Entity seq

World.getLights3dInViewBox box set world

Full Usage: World.getLights3dInViewBox box set world

Parameters:
Returns: Entity seq

Get all 3d light entities in the current 3d light box, including all uncullable lights.

Extended Type: World

box : Box3
set : HashSet<Octelement<Entity>>
world : World
Returns: Entity seq

World.getLights3dInViewFrustum frustum set world

Full Usage: World.getLights3dInViewFrustum frustum set world

Parameters:
Returns: Entity seq

Get all 3d light entities in the current 3d light box, including all uncullable lights.

Extended Type: World

frustum : Frustum
set : HashSet<Octelement<Entity>>
world : World
Returns: Entity seq

World.getPlayBounds2dAbsolute world

Full Usage: World.getPlayBounds2dAbsolute world

Parameters:
Returns: Box2

Get the bounds of the 2d play zone irrespective of eye center.

Extended Type: World

world : World
Returns: Box2

World.getPlayBounds2dRelative world

Full Usage: World.getPlayBounds2dRelative world

Parameters:
Returns: Box2

Get the bounds of the 2d play zone relative to eye center.

Extended Type: World

world : World
Returns: Box2

World.getPlayBounds3d world

Full Usage: World.getPlayBounds3d world

Parameters:
Returns: Box3 * Frustum

Get the bounds of the 3d play zone.

Extended Type: World

world : World
Returns: Box3 * Frustum

World.getScreenTransitionDestinationOpt world

Full Usage: World.getScreenTransitionDestinationOpt world

Parameters:
Returns: Screen option

Get the current destination screen if a screen transition is currently underway.

Extended Type: World

world : World
Returns: Screen option

World.getSelectedScreen world

Full Usage: World.getSelectedScreen world

Parameters:
Returns: Screen

Get the currently selected screen.

Extended Type: World

world : World
Returns: Screen

World.getSelectedScreenOpt world

Full Usage: World.getSelectedScreenOpt world

Parameters:
Returns: Screen option

Get the currently selected screen, if any.

Extended Type: World

world : World
Returns: Screen option

World.getViewBounds2dAbsolute world

Full Usage: World.getViewBounds2dAbsolute world

Parameters:
Returns: Box2

Get the bounds of the 2d eye's sight irrespective of its position.

Extended Type: World

world : World
Returns: Box2

World.getViewBounds2dRelative world

Full Usage: World.getViewBounds2dRelative world

Parameters:
Returns: Box2

Get the bounds of the 2d eye's sight relative to its position.

Extended Type: World

world : World
Returns: Box2

World.notifyGameModelChange game world

Full Usage: World.notifyGameModelChange game world

Parameters:

Extended Type: World

game : Game
world : World

World.position2dToRay3d position world

Full Usage: World.position2dToRay3d position world

Parameters:
Returns: Ray3

Convert the given absolute 2d position to the relative 3d ray. TODO: also implement position2dToPosition3d.

Extended Type: World

position : Vector3
world : World
Returns: Ray3

World.position3dToPosition2d position world

Full Usage: World.position3dToPosition2d position world

Parameters:
Returns: Vector3

Convert the given relative 3d position to the absolute 2d position. Useful for gui entities that track 3d entities. Where Z > 1.0f, position is behind view.

Extended Type: World

position : Vector3
world : World
Returns: Vector3

World.setDesiredScreen value world

Full Usage: World.setDesiredScreen value world

Parameters:

Set the desired screen, if applicable.

Extended Type: World

value : DesiredScreen
world : World

World.setEye2dCenter value world

Full Usage: World.setEye2dCenter value world

Parameters:

Set the current 2d eye center.

Extended Type: World

value : Vector2
world : World

World.setEye2dSize value world

Full Usage: World.setEye2dSize value world

Parameters:

Set the current 2d eye size.

Extended Type: World

value : Vector2
world : World

World.setEye3dCenter value world

Full Usage: World.setEye3dCenter value world

Parameters:

Set the current 3d eye center.

Extended Type: World

value : Vector3
world : World

World.setEye3dFieldOfView value world

Full Usage: World.setEye3dFieldOfView value world

Parameters:
    value : single
    world : World

Set the current 3d eye field of view.

Extended Type: World

value : single
world : World

World.setEye3dRotation value world

Full Usage: World.setEye3dRotation value world

Parameters:

Set the current 3d eye rotation.

Extended Type: World

value : Quaternion
world : World

World.setScreenTransitionDestinationOpt value world

Full Usage: World.setScreenTransitionDestinationOpt value world

Parameters:

Set the current destination screen or None.

Extended Type: World

value : Screen option
world : World

World.setSelectedScreen value world

Full Usage: World.setSelectedScreen value world

Parameters:

Set the currently selected screen.

Extended Type: World

value : Screen
world : World

World.setSelectedScreenOpt value world

Full Usage: World.setSelectedScreenOpt value world

Parameters:

Set the currently selected screen or None.

Extended Type: World

value : Screen option
world : World

Type something to start searching.