GUI3DView

From Virtual World Web Wiki
Jump to: navigation, search

A surface to display a MiniDOM camera

  • Inherits class: GUIComponent
  • This is a JavaScript visible object

Remarks [edit]

Properties

bool AllowMove {get; set;}
Allows the camera to pan when the user holds the right mouse button and drags
bool AllowPitch {get; set;}
Allows the camera to pitch up and down when the user holds the left mouse button and drags up/down
bool AllowRotate {get; set;}
Allows the camera to rotate around the Y axis when the user holds the left mouse button and drags left/right
bool AllowZoom {get; set;}
Allows the camera to zoom in and out when the user scrolls their mousewheel
bool AntiAliasing {get; set;}
Should we use an anti-aliasing postprocessing behaviour
Color32 BackgroundColor {get; set;}
Sets a solid color image as the background of the view
ResourceValue BackgroundImage {get; set;}
Sets an image to use as the background of the view
string CameraName {get; set;}
Sets an internal name for the camera this view uses
JSVector3 CameraOffset {get; set;}
Sets a positional offset to use for the camera for finer script control when the camera is also set to auto adjust.
JSVector3 CameraRotation {get; set;}
Gets and sets the camera's current rotation
float DefaultCameraZoom {get; set;}
Gets or sets the current camera offset on the camera path
JSVector3 DefaultRotation {get; set;}
When focusing on an object, what orientation should it take on by default
bool Enabled {get; set;}
float FieldOfView {get; set;}
Sets the Camera's field of view (in degrees)
bool FixedCamera {get; set;}
Disables all attempts to zoom/pan/move/reorient the camera by the user or code.
bool FlyCamera {get; set;}
Detaches the camera from orbiting the focused object
JSVector3 FocusOffset {get; set;}
Offset to use when focusing on the target object
Color32 GridColor {get; set;}
Sets the color to use for the projected grid
JSVector3 GridSize {get; set;}
Controls how far the grid should stretch along each axis
float GridSpacing {get; set;}
Changes the spacing between grid lines
Color32 GridSubColor {get; set;}
Sets the color to use for the sub grid
float GridSubSpacing {get; set;}
Changes the spacing between sub grid lines
bool IsLoading {get; set;}
Shows or hides the progress spinner
string Layer {get; set;}
Sets which MiniDOM view the camera should be looking at.
bool LineOfSight {get; set;}
Keeps the focused object inside the camera's field of view
bool LookAtFocused {get; set;}
Should we always orient to look at the focused object
float MinDistance {get; set;}
Minimum allowed distance between the camera and the focused object
float MoveSpeed {get; set;}
Controls rate of movement when panning.
ResourceValue OverlayImage {get; set;}
JSVector2 PrefTextureSize {get; set;}
Adjusts the size of the underlying display texture
bool PreserveBackgroundAspect {get; set;}
Should we preserve the aspect ratio of the background and center it (as opposed to stretching it to fill the 3DView)
float RotationSpeed {get; set;}
Controls rate of pitch / rotation
JSVisibleObjectTemplate SelectionManager {get;}
Gets the SelectionManager for this MiniDOM for object editting
bool ShowGrid {get; set;}
Shows or hides the projected grid
bool ShowMainLines {get; set;}
Shows or hides the primary grid lines (if ShowGrid is on)
bool ShowSubLines {get; set;}
Shows or hides the subgrid lines (if ShowGrid is on)
Color32 SpinnerColor {get; set;}
Tints the loading spinner
float SpinnerHeight {get; set;}
Controls the size of the spinner
float SpinnerWidth {get; set;}
Controls the size of the spinner
int SuperSampling {get; set;}
How much to oversample the image (to reduce aliasing)
float ZoomSpeed {get; set;}
Controls rate of zoom using the mousewheel

Methods

void CleanUpLastThumbnail()
Cleans up the temporary file left over from the last time TakeScreenshot() was called
bool FocusOnObject(string objectID, string viewID)
Sets a given object to focus on
bool LookAtObject(string objectID, string viewID)
Rotates the camera to face a given object
void MoveCameraTo(JSVector3 position, JSVector3 rotation = NULL, float speed = 1.0, string easeType = NULL, float rotSpeed = 0.0)
bool ResetCamera()
Resets the camera to its default orientation/position
void SetCameraLookAt(float x, float y, float z)
Sets a point that the camera should be looking at
void SetCameraPosition(float x, float y, float z)
Sets the camera's offset position from wherever it might settle.
void SetSharedView(GUI3DView sharedView)
Sets this 3DView to mimic that of another view.
string TakeScreenshot(int width, int height)
Takes an image of whatever the MiniDOM is currently looking at, with a given set of dimensions
void Translate(float x, float y, float z)
Moves the camera's position by an given amount