new BackgroundPyramidRenderer(viewer, target, config)
FORGE.BackgroundPyramidRenderer
BackgroundPyramidRenderer class.
Parameters:
Name | Type | Description |
---|---|---|
viewer |
FORGE.Viewer | viewer reference |
target |
THREE.WebGLRenderTarget | render target |
config |
SceneMediaConfig | media config |
Extends
Members
(static) MAX_ALLOWED_TIME_SINCE_CREATION_MS :number
Max allowed time since a tile has been created before discarding it
Type:
- number
(static) MAX_ALLOWED_TIME_SINCE_DISPLAY_MS :number
Max allowed time since a tile has been displayed before discarding it
Type:
- number
(readonly) alive :boolean
Get the alive flag value of the object.
Type:
- boolean
- Inherited From:
- Source:
(readonly) className :string
Get the class name of the object.
Type:
- string
- Inherited From:
- Source:
cubeSize :number
Get cube size in world units.
Type:
- number
data :*
Get and set any custom data you want to associate to this object.
Type:
- *
- Inherited From:
- Source:
debug :boolean
Get and set the debug flag.
Type:
- boolean
- Inherited From:
- Source:
displayObject :string
Get/Set background renderer displayObject.
Type:
- string
- Inherited From:
- Source:
fovMin :number
Get fov min.
Type:
- number
frustum :THREE.Frustum
Get camera frustum.
Type:
- THREE.Frustum
- Inherited From:
- Source:
level :string
Get pyramid current level.
Type:
- string
levelMax :string
Get pyramid max level.
Type:
- string
(readonly) onDestroy :FORGE.EventDispatcher
Get the onDestroy FORGE.EventDispatcher, this event is emitted at the end of the destroy sequence.
Type:
- Inherited From:
- Source:
pixelsAtCurrentLevel :number
Get number of pixels at current level.
Type:
- number
pixelsAtCurrentLevelHumanReadable :string
Get number of pixels at current level presented as human readable string.
Type:
- string
renderTarget :THREE.WebGLRenderTarget
Get background render target.
Type:
- THREE.WebGLRenderTarget
- Inherited From:
- Source:
scene :THREE.Scene
Get background scene.
Type:
- THREE.Scene
- Inherited From:
- Source:
(readonly) tags :Array
Get the tags associated to this object.
Type:
- Array
- Inherited From:
- Source:
tilesOnAxisX :number
Get number of tiles on axis X for current level.
Type:
- number
tilesOnAxisY :number
Get number of tiles on axis Y for current level.
Type:
- number
(readonly) uid :string
Get the uid of the object.
Type:
- string
- Inherited From:
- Source:
warning :boolean
Get and set the warning flag.
Type:
- boolean
- Inherited From:
- Source:
Methods
addToRenderList(tile)
Add tile to render list
Parameters:
Name | Type | Description |
---|---|---|
tile |
FORGE.Tile | tile |
destroy()
Destroy sequence.
- Overrides:
- Source:
getParentTile(tile) → {FORGE.Tile}
Get parent tile reference and create it if does not exist
Parameters:
Name | Type | Description |
---|---|---|
tile |
FORGE.Tile | tile |
Returns:
parent tile or null if it has no parent (level 0)
- Type
- FORGE.Tile
getTile()
Get tile
Lookup in cache first or create it if not already in cache
isObjectInFrustum(object)
Check if some 3D object is interesecting the rendering frustum.
Parameters:
Name | Type | Description |
---|---|---|
object |
THREE.Object3D | 3D object |
- Inherited From:
- Source:
isObjectInScene(object)
Check if some 3D object is in the scene
Parameters:
Name | Type | Description |
---|---|---|
object |
THREE.Object3D | 3D object |
- Inherited From:
- Source:
log(value)
Basic log method, log a string in the console if debug is enabled.
Parameters:
Name | Type | Description |
---|---|---|
value |
* | The value you want to log in the console. |
- Inherited From:
- Source:
nbTiles()
Get number of tiles for a given level
nbTilesPerAxis(level, axis)
Get number of tiles per axis for a given level
Parameters:
Name | Type | Description |
---|---|---|
level |
number | pyramid level |
axis |
string | axis ("x" or "y") |
render(camera)
Render routine.
Do preliminary job of specific background renderer, then summon superclass method
Parameters:
Name | Type | Description |
---|---|---|
camera |
THREE.PerspectiveCamera | perspective camera |
- Overrides:
- Source:
selectLevel(level)
Select current level for the pyramid
Parameters:
Name | Type | Description |
---|---|---|
level |
number | pyramid level |
setSize(size)
Update size (resolution)
Parameters:
Name | Type | Description |
---|---|---|
size |
FORGE.Size | size [px] |
- Inherited From:
- Source:
tileSize() → {FORGE.Size}
Get tile size at a given level (world units)
Returns:
size of a tile in world units
- Type
- FORGE.Size
update()
Update routine.
- Inherited From:
- Source:
updateAfterViewChange()
Update after view change
- Overrides:
- Source:
warn(valuenullable)
Basic warn method, log a warn string in the console if warning is enabled.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
value |
string | Object |
<nullable> |
The value you want to warn in the console. |
- Inherited From:
- Source: