Copyright © 2021 by K4.org
  (v.0.48.124)

A Viewport is a rectangular region on a DrawingSheet into which a view is placed.

Viewports can only be children of a DrawingSheet.

NOTE: Some important methods are on ViewportRenderMixin, such as worldToPaper() to convert world coordinates to paper space.

Index

Rules

annotationStyle

annotationStyle: Model

The AnnotationStyle object being used in this viewport.

Flags : Cached (Note this is uncached)

Expression : R.nextHigherInstance(this, "DrawingSheet").annotationStyle

border

border: Child

The viewport border.

Design: [[this.showBorder ? 'Rectangle' : 'NullDesign']]

camera

camera: Model

The Camera to use for rendering this view. NOTE: Cameras must be defined in world space, not sheet space. Do not make cameras children of a Viewport!

Flags : Cached, Parameter (Note this is uncached)

Expression : R.world.RenderLibrary.views[this.viewName]

edgeStyle

edgeStyle: Any

Defines the styling of the edge geometry. See LineMaterial for more information. All possible options:

{ edgeWeight: 1, // lineWeight of the visible edges. Default is 1. edgeColor: 'black', // color of the visible edges. Default is 'black'. hiddenEdgeWeight: 1, // lineWeight of the hidden edges. Default is 1. hiddenEdgeColor: 'gray', // color of the hidden edges. Default is 'gray'. hiddenEdgeDashPattern: [10,5] // dash pattern of the hidden edges. Default is [10,5]. }

Flags : Cached, Parameter (Note this is uncached)

Expression : { edgeWeight: 0.2, edgeColor: 'black', hiddenEdgeWeight: 0.2, hiddenEdgeColor: 'gray', hiddenEdgeDashPattern: [3,3] }

maxBitmapResolution

maxBitmapResolution: Number

The maximum size in pixels of width and height of the viewport image. If greater than 0 then the viewport will be rendered in output as an image. Default is 0 - rendered as not an image.

Flags : Cached, Parameter (Note this is uncached)

Expression : 0

renderStyle

renderStyle: String

One of 'default', 'wireframe', 'shaded', 'shadedEdges', 'hiddenLine', or 'hiddenLineDashed'. Default is equivalent to shadedEdges.

Flags : Cached, Parameter (Note this is uncached)

Expression : "hiddenLineDashed"

showBackground

showBackground: Boolean

Whether to show the scene background. Default is false.

Flags : Cached, Parameter (Note this is uncached)

Expression : false

showBorder

showBorder: Boolean

Whether to show a rectangular box showing the extent of the Viewport.

Flags : Cached, Parameter (Note this is uncached)

Expression : true

showLabel

showLabel: Boolean

Whether to show the viewName as text. (Not yet supported.)

Flags : Cached, Parameter (Note this is uncached)

Expression : true

spec

spec: Any

Internal Use Only.

Flags : Cached (Note this is uncached)

Expression : {length: this.length, width: this.width, viewScale: this.viewScale, viewedScene: this.viewedScene, renderStyle: this.renderStyle, edgeStyle: this.edgeStyle, maxBitmapResolution: this.maxBitmapResolution, showBorder: this.showBorder, showLabel: this.showLabel, showBackground: this.showBackground, cameraSpec: this.camera.spec}

viewName

viewName: String

The name of the view to use. This is ignored if camera is supplied. The following set of pre-defined views are available: 'Back', 'Bottom', 'Front', 'Iso', 'Iso2', 'Left', 'Right', 'Top', 'default'. Default is currently 'Iso2'. To use your own custom camera, use the camera parameter.

Flags : Cached, Parameter (Note this is uncached)

Expression : "Front"

viewScale

viewScale: Number

The scale of content in the drawing relative to the model space. This defaults to the DrawingSheet scale.

Flags : Cached, Parameter, Lookup (Note this is uncached)

Expression : 1.0

viewedScene

viewedScene: String

The name of the Scene to view.

Flags : Cached, Parameter (Note this is uncached)

Expression : "model"