new SceneManager(options)
Parameters:
Name | Type | Description |
---|---|---|
options |
bu.street.threejs.SceneManagerOptions | Object with options as properties. |
- Source:
- bu-street/scenemanager.js
Fires:
Extends
- ol.Object
Members
-
facesOrder :string
-
The list of chars for cube face order.
Type:
- string
- Source:
- bu-street/scenemanager.js
-
fovLimitEpsilon :number
-
A fov of exactly 0 or π breaks some computations, so we constrain it to the [fovLimitEpsilon, π - fovLimitEpsilon] interval. We use 9 decimal places for the epsilon value since this is the maximum number of significant digits for a 32-bit floating-point number. Note that after a certain zoom level, rendering quality will be affected by the loss of precision in floating-point computations.
Type:
- number
- Source:
- bu-street/scenemanager.js
-
viewer :bu.street.Viewer
-
The viewer.
Type:
- Source:
- bu-street/scenemanager.js
Methods
-
addAxisCollection(distance)
-
Adds the
bu.street.threejs.AxisCollection
if no one is added.Parameters:
Name Type Description distance
number The length of axes or planes. Defaults to 100.
- Source:
- bu-street/scenemanager.js
-
addHotspotCollection()
-
Adds a
bu.street.threejs.HotspotCollection
using the current street image. Removes any previous HotspotCollection if any.- Source:
- bu-street/scenemanager.js
-
changeBrightness(brightness)
-
Change brightness.
Parameters:
Name Type Description brightness
number Brightness.
- Source:
- bu-street/scenemanager.js
-
changeContrast(contrast)
-
Change contrast.
Parameters:
Name Type Description contrast
number Contrast.
- Source:
- bu-street/scenemanager.js
-
getCoordinateAtGroundFromPixel(pixel)
-
Returns the coordinates at ground in local projection of a NDC pixel in screen.
Parameters:
Name Type Description pixel
Array.<number> Two values with NDC x and y.
- Source:
- bu-street/scenemanager.js
Returns:
A three values x, y, z with coordinates at the ground level in local current projection. Local current projection is included in current image metadata as a srid property.
- Type
- bu.Coordinate
-
highlightHotspotAtPixel(pixel)
-
Highlights the first hotspot found at the given pixel, if any.
Parameters:
Name Type Description pixel
bu.Coordinate The pixel as a NDC event pixel.
- Source:
- bu-street/scenemanager.js
-
logVisibleTiles()
-
Logs current visible tiles.
- Source:
- bu-street/scenemanager.js
-
openImage(rotation, done)
-
Open the current image of the viewer in the scene. This function does all the needed steps for opening a new image. If an opened image exists it transitions from one the next and finally calls to the done function at the end.
Parameters:
Name Type Description rotation
number Rotation in decimal degrees to use to initialize the camera once the cubic panorama is initialize.
done
function Function to call once image is opened.
- Source:
- bu-street/scenemanager.js
-
removeAxisCollection()
-
Removes the
bu.street.threejs.AxisCollection
.- Source:
- bu-street/scenemanager.js
-
removeHotspotCollection()
-
Removes the
bu.street.threejs.HotspotCollection
.- Source:
- bu-street/scenemanager.js
-
render()
-
Requests a new render of the scene using the current status of objects. The object in charge of managing the renders is the RenderLoop.
- Source:
- bu-street/scenemanager.js
-
setDebugMode(debugMode)
-
Shows or hides debug grid to the existing CubicPanorama.
Parameters:
Name Type Description debugMode
boolean True to show and false to hide.
- Source:
- bu-street/scenemanager.js
-
updateCamera(params)
-
Updates camera pointing to current yaw, pitch, roll and fov.
Parameters:
Name Type Description params
bu.street.CameraParameters Camera parameters.
- Source:
- bu-street/scenemanager.js
-
updateSize()
-
Updates the scene manager size to fill the containing element.
This function is automatically called when the browser window is resized. Most clients won't need to explicitly call it to keep the size up to date.
- Source:
- bu-street/scenemanager.js