new GlobalState()
A central store of config and settings data used throughout the BIM editor.
IMPORTANT: The properties in this class must be considered read-only.
Mutations should only be done using methods within the PD.GlobalActions class
or, if you absolutely must, by assigning values to the PD.GlobalStateProxy
object instead which mirrors the data in this object.
As this code seeks to be framework-agnostic, it cannot use ready-made stores such as Vuex or Flux. However, it does need to appropriately support whatever framework and/or dynamic UI system that is being used to manage it.
Some of the properties in this store may be accessed thousands of times per frame
during an interactive edit (such as selection thresholds and snap settings), so we
really don't want these values to be reactive as that would add unnecessary and
quantifiable additional overhead. Instead, front-end frameworks should create their
own reactive proxy to this data by reassigning PD.GlobalStateProxy to keep these
properties up-to-date with the UI. Any mutations to the data in this object should
then be made only through either that proxy or by methods in the PD.GlobalActions
class. Even then, any mutations made by PD.GlobalActions will be (and must be)
applied to PD.GlobalStateProxy rather than this object directly.
This allows front-end frameworks such as Vue, React, Preact, Angular, Enyo, Ember, Knockout or any other to create observable or reactive getter/setters for entries in the store so that they can intercept state mutations and update the UI without affecting or inadvertently modifying this object.
Also, in order to prevent unwanted 'leaking' of reactivity or observability into the actual BIM model, this class must remain a POJO (plain old JavaScript object) and contain only primitive values, arrays or simple objects - but never references to instances of BIM or any other framework classes. If it was to contain even a single reference to an instance of any of the model classes, there is a quantifiable risk that reactivity or observability modifications could inadvertently propagate throughout the entire model and make large parts of it reactive.
Members
-
:boolean
adjacencyModeShowAdjacent <static>
-
Whether or not to show all non-apertures when displaying adjacencies.
Type
- boolean
-
:boolean
adjacencyModeShowApertures <static>
-
Whether or not to show apertures when displaying adjacencies.
Type
- boolean
-
:boolean
allowSpatialViews <static>
-
Whether or not to allow
PD.DISPLAY.FLOORPLANandPD.DISPLAY.SPATIALmodel view types.Non-3D views are sometimes not appropriate for certain types of non-building models, such as when generating simple geometric forms or working entirely with
BIM.Element.Engineeredelements.Setting this value to false will disable the use of these two model view types within any
PD.Viewinstances and across the whole application.Type
- boolean
-
:object
animateSunPos <static>
-
Configuration data for solar animation.
Type
- object
-
:boolean
appBusy <static>
-
Provides an application-wide busy state indicator.
Host applications may choose to use this flag as appropriate, in which case they are responsible for setting and clearing it. There is currently one framework class that uses it to store the OpenCascade web worked state, but this is only used by one core application that uses that class.
Type
- boolean
-
:string
appStatusMessage <static>
-
A message displaying the current status of the application.
Most of the time this message should be 'Idle' when the application is waiting for and responding to user input. It should change whenever a significant calculation or animation is undertaken, and then return to 'Idle' when completed.
Type
- string
-
:boolean
autoFocusSegmentLength <static>
-
Set focus to the segment length edit control when the pointer is released whilst adding an element.
Type
- boolean
-
:object
canPaste <static>
-
Stores availability of local clipboard content.
Type
- object
-
:boolean
canRedo <static>
-
Whether or not there are redo actions available.
Type
- boolean
-
:boolean
canUndo <static>
-
Whether or not there are undo actions available.
Type
- boolean
-
:object
cloneData <static>
-
Configuration data for cloning element(s).
Type
- object
-
:string
colorScheme <static>
-
The current BootStrap application display theme.
Type
- string
-
:PD.CSG_OP
csgOperation <static>
-
The current CSG operation to apply.
The options are - 0:union, 1:subtract, 2:intersect.
Type
-
:number
currentFloorLevelOffset <static, readonly>
-
Stores the current level offset within the view.
This is essentially just the the floor height of the current level. It is managed by the
PD.ModelManagerclass ans set whenever a new level is selected, so should never be set directly.Type
- number
-
:number
cursorArrowOffset <static>
-
The offset of arrows from the center, relative to the current view's point size.
Type
- number
-
:number
cursorBaseSize <static>
-
The base size of all 3D cursors relative to the current view's point size.
Type
- number
-
:boolean
cursorDynamicResize <static>
-
Whether or not the cursor should remain a static size with view distance.
When rotating a model in perspective view, the cursor will get closer or further away from the camera, depending on where it is in the model. Basic perspective means that the cursor will appear bigger when it is closer to the camera and smaller when it is further away, becoming quite small the further away it is.
By default, the cursor will dynamically change size every time the perspective view is changed to appear as exactly the same size relative to screen space regardless of how far away it is from the camera. This is done to ensure that the arrow sizes are still suitable for touch-based devices.
When this option is
true, the cursor will remain a static size in model space, which means that it will get bigger and smaller as it move closer and further away, however it will alway line up with dimension lines when they are displayed.Type
- boolean
-
:boolean
cursorFadeOnSelect <static>
-
Fade the cursor out when selecting and dragging.
Type
- boolean
-
:boolean
cursorShowInfo <static>
-
Show/hide a HTML cursor info panel.
Type
- boolean
-
:number
cursorStyle <static>
-
The style and color of the 3D model cursor.
Type
- number
-
:boolean
cursorSupportTouch <static>
-
Show/hide additional touch-based manipulators.
Type
- boolean
-
:boolean
darkLinesInDarkMode <static>
-
Whether or not to use dark lines event with a dark background.
Type
- boolean
-
:boolean
darkMode <static>
-
Whether or not to display everything with a dark background.
Type
- boolean
-
:PD.DateTime
dateTime <static>
-
The current date and time for solar position and shadow analysis.
Type
-
:boolean
debounceLocationChanges <static>
-
Whether or not to limit multiple sequential location changes to several staggered changes rather than updating on each call.
Type
- boolean
-
:number
defaultApertureHeight <static>
-
The default height for new apertures when they are inserted.
Type
- number
-
:number
defaultApertureWidth <static>
-
The default width for new apertures when they are inserted.
Type
- number
-
:number
defaultCanvasColorDark <static>
-
The default color of the model canvas background in dark mode.
Type
- number
-
:number
defaultCanvasColorLight <static>
-
The default color of the model canvas background in light mode.
Type
- number
-
:number
defaultCeilingHeight <static>
-
The ceiling height for spaces within new levels, defaults to 2750mm or 9'".
+---------------+ +---------------+ : - - - - - - - - - <- + - defaultCeilingHeight : : : +---------------+ <- + - floorLevel +---------------+ :This can be overridden by setting a level's
ceilingHeightproperty.Type
- number
-
:number
defaultDoorHeight <static>
-
The default height for new doors when they are inserted.
Type
- number
-
:number
defaultDoorWidth <static>
-
The default width for new doors when they are inserted.
Type
- number
-
:number
defaultFootingDepth <static>
-
The depth of new strip footings when created, defaults to 400mm or 16".
: - - - - - - - - - - - <- + - floorLevel \\\///\\\///\\\///\\\ : ///\\\+-------+\\\/// <- + - defaultSlabDepth \\\///| |///\\\ : ///\\\| |\\\/// : \\\///| |///\\\ : ///\\\| |\\\/// : \\\///+-------+///\\\ <- + - defaultFootingDepth ///\\\///\\\///\\\/// :This can be overridden by setting a level's
floorSlabDepthproperty.Type
- number
-
:number
defaultGridHeight <static>
-
The default height of the ground grid in the Y axis, defaults to 20' or 6000mm.
This value is unused when the project contains no geometry.
Type
- number
-
:number
defaultGridWidth <static>
-
The default width of the ground grid in the X axis, defaults to 20' or 6000mm.
This value is unused when the project contains no geometry.
Type
- number
-
:number
defaultLevelHeight <static>
-
The floor to under-slab height of new levels, defaults to 2950mm or 9'8".
+---------------+ : +---------------+ <- + - defaultLevelHeight - - - - - - - - - : : : : +---------------+ <- + - floorLevel +---------------+ :This can be overridden by setting a level's
heightproperty.Type
- number
-
:number
defaultOcclusionMax <static>
-
The maximum threshold of the screen-space ambient occlusion shader (0 to 1).
This is used when initialising views.
Type
- number
-
:number
defaultOcclusionMin <static>
-
The minimum threshold of the screen-space ambient occlusion shader (0 to 1).
This is used when initialising views.
Type
- number
-
:number
defaultOcclusionRadius <static>
-
The kernel radius of the screen-space ambient occlusion shader (0.1 to 5).
This is used when initialising views.
Type
- number
-
:number
defaultSectionHeight <static>
-
The height at which plan-view sections are cut on new levels, defaults to 1375mm or 4'6".
+---------------+ | +-------------+ | | - - - - - - - +-+ : - - - - - - - - <- + - defaultSectionHeight + + : | +-------------+ <- + - floorLevel +---------------+ :This can be overridden by setting a level's
sectionHeightproperty.Type
- number
-
:number
defaultSillHeight <static>
-
The default sill height for new apertures when they are inserted.
Type
- number
-
:number
defaultSlabDepth <static>
-
The depth of a suspended floor slab beneath new levels, defaults to 200mm or 8".
+---------------+ +---------------+ - - - - - - - - - : +---------------+ <- + - floorLevel +---------------+ <- + - defaultSlabDepth :This can be overridden by setting a level's
floorSlabDepthproperty.Type
- number
-
:number
defaultWallInset <static>
-
The default surface offset for internal walls in mm, defaults to 65mm or 2.5".
This defines the distance between the path line and the inside surface of walls and space boundaries when no material is currently assigned.
Outside -------------------------------+ | - - - - - - - - - + | <- + - refLine -------------------------+ : | <- + - defaultWallInset Inside | : | | : | | : | | : |Defaults to a simple single-leaf masonry wall with 10mm plaster, 110mm masonry and 10mm plaster. The result is a default value of 65mm, being half of the total 135mm wall thickness.
US option is 2x4" stud-work with 1/2" drywall internally and 5/8" OSB/plywood plus siding externally. The result is a default value of 65mm, being half of the total 5 1/8" OR 130mm wall thickness.
Type
- number
-
:number
defaultWallOffset <static>
-
The default surface offset for external walls in mm, defaults to 175mm or 7".
This defines the distance between the path line and the inside surface of walls and space boundaries when no material is currently assigned.
Outside -------------------------------+ <- + - defaultWallOffset | - - - - - - - - - + | <- + - refLine -------------------------+ : | Inside | : | | : | | : | | : |Defaults to a double-leaf masonry wall with 10mm internal plaster, 110mm internal masonry, 70mm air gap with insulation, and then 110mm external masonry. This is a total of 300mm, which results in a default outer wall offset of 235mm (300 - 65).
US cavity wall option is 1/2" internal drywall, 1 1/2" airspace, 4" internal masonry, 2" of insulation, and then 4" external masonry. This is a total of 12" or 300-305mm, which results in a default outer wall offset of 235mm (300 - 65).
Type
- number
-
:boolean
dimensionDynamicResize <static>
-
Update dimensions sizes in real-time whenever the view zoom changes.
Type
- boolean
-
:boolean
dimensionIgnoreRightAngles <static>
-
Don't display an angle dimension when the angle is exactly 90deg.
Type
- boolean
-
:number
dimensionLineOffset <static>
-
The relative offset distance of the dimension line from model points.
Type
- number
-
:number
dimensionOverrun <static>
-
The relative size of extensions to the ends of marker and dimension lines.
Type
- number
-
:number
dimensionTextSize <static>
-
The relative size of dimension line text.
Type
- number
-
:number
dimensionTickLength <static>
-
The relative length of the tick line.
Type
- number
-
:number
dimensionTickOffset <static>
-
The relative offset distance of the closest point on the tick line.
Type
- number
-
:number
dimensionTickType <static>
-
The type of dimension tick to use (0:Marker, 1:Tick, 2:Arrow).
Type
- number
-
:number
dimensionTickWidth <static>
-
The relative width of the tick line at the marker/dimension point.
Type
- number
-
:boolean
dimensionsVisible <static>
-
Whether or not to show dimension lines on selection.
Type
- boolean
-
:object
documentStore <static>
-
Defines how documents in the host application should be stored.
Host applications may dynamically choose to access/store documents via the File System API, local IndexedDB or PouchDB, or even a remote CouchDB server. This object stores the configuration data for the document store to be used by the host application.
Type
- object
-
:number
doubleClickTime <static>
-
The pointer double-click detection threshold.
Type
- number
-
:string
dynamicStateMessage <static>
-
A message for temporarily displaying state information.
This message is typically used to display things such as rotation angle when dragging the cursor rotator or the triggered menu key when awaiting two-step keyboard shortcuts.
Type
- string
-
:boolean
fileSystemAPISupported <static>
-
Whether or not the browser supports the File System API.
Type
- boolean
-
:string
filename <static>
-
The name of the currently loaded project file, if any.
Type
- string
-
:number
fitViewDistanceFactor <static>
-
The factor to apply when fitting the view to the model.
This modifies the camera-target distance and is a multiplier of the overall calculated scene size.
Type
- number
-
:boolean
floorGridAutoFit <static>
-
Whether or not the background grid automatically resizes to fit model.
Type
- boolean
-
:number
floorGridPadding <static>
-
The additional padding around the model extents as a multiple of the current
PD.GlobalState.gridCellMajorvalue.Type
- number
-
:number
gridCellMajor <static>
-
The default ground grid major line increment, defaults to 6' or 2000mm.
Type
- number
-
:number
gridCellMinor <static>
-
The default ground grid minor line increment, defaults to 1' or 250mm.
Type
- number
-
:object
gtaoParams_AO <static>
-
Configuration object for ground truth ambient occlusion (GTAO) material.
Type
- object
-
:object
gtaoParams_PD <static>
-
Configuration object for Poisson de-noise component in the GTAO shader.
Type
- object
-
:boolean
hasSelectedDataGrid <static>
-
Whether or not a data grid element is in the active selection set.
Type
- boolean
-
:boolean
hasSelectedSunPath <static>
-
Whether or not a sun path element is in the active selection set.
Type
- boolean
-
:boolean
hasUnsavedChanges <static>
-
Whether or not the model has changed since last new/open/save event.
Type
- boolean
-
hudIndicatorColor <static>
-
The thickness of HUD indicator line segments.
-
:number
hudIndicatorHeight <static>
-
A vertical offset to add as the last indicator line segment.
When viewing a 3D building model, many of the data points distributed around it will often be obscured by building geometry. Thus drawing a line directly from the HUD item in its canvas position to the data point in its model position will often mean that the end of the line is obscured, making it difficult to see where the end point is.
By adding a vertical offset to the end of the line that is about the height of the building level, the location of the data point within the 3D model is a little more obvious when viewed from lower altitudes. Also, because the line offset is vertical, the line appears to be drawn directly to the data point in plan view, which is typically what you want from that view.
Type
- number
-
hudIndicatorThickness <static>
-
The thickness of HUD indicator line segments.
-
:number
hudLayoutStrategy <static>
-
The strategy type to use for arranging HUD items, defaults to 0 (all edges).
The arrangement strategy only affects items whose preferred alignment is set to
PD.ALIGN.NONE. It is given as a number from 0 to 6 [0:AllEdges, 1:TopBottom, 2:LeftRight, 3:Top, 4:Right, 5:Bottom, 6:Left].Type
- number
-
:number
hudMargin <static>
-
The spacing of items from the outer edges of the HUD.
If you change this value manually, you should call the
update()method to re-arrange the HUD items based on the new margin.Type
- number
-
:number
hudPadding <static>
-
The spacing between adjacent items in the HUD.
If you change this value manually, you should call the
update()method to re-arrange the HUD items based on the new padding.Type
- number
-
:boolean
hudUseRightOffset <static>
-
Whether or not to use the additional offset to allow for right-aligned floating offcanvas or panels in the UI.
Type
- boolean
-
:number
initialModelView <static>
-
The initial view to start the scene manager in (0:PlanView, 1:Perspective), defaults to 0.
Type
- number
-
:Array.<string>
jsonProperties <static>
-
A list of properties to be included in JSON conversions of this object.
If you add any application-specific global state and wish it to be stored as JSON, you must append the property name to this list.
Type
- Array.<string>
-
:PD.Location
location <static>
-
The current terrestrial location for solar position and shadow analysis.
Type
-
:number
longPressTime <static>
-
The pointer long-press detection threshold.
Type
- number
-
:number
maxDimension <static>
-
The full range of interactive dimensions, in model units (typically mm).
This is dynamically updated based on
sceneSize, but snapped to the nearest increment ofsnapGridMajor. It is mainly used in the UI to set the bounds of interactive range and dimension inputs.`Type
- number
-
:number
maxDimensionSmall <static>
-
A smaller range of interactive dimensions, in model units (typically mm).
This is dynamically updated based on
sceneSize, but snapped to the nearest increment ofsnapGridMajor. It is mainly used in the UI for interactive range and dimension inputs related to finer detail, such as the thickness of frames around a doorway or the width of legs on a chair.`Type
- number
-
:number
maxPixelRatio <static>
-
Sets the maximum pixel ratio to ensure that render canvases are not too big.
On HiDPI devices such as laptops, phones and tablets, the actual width and height of a render canvas can be significantly different from the width and height taken from the parent DOMElement and specified in
renderer.setSize(). This is because multiple screen pixels are used to represent a single page pixel - which is governed byrenderer.setPixelRatio(). This is usually desirable as it makes WebGL graphics appear finer and crisper. However, on some very high resolution phone screens, the pixel ratio can be undesirably and unnecessarily large.You can use this value to limit the pixel ratio used to multiply the screen resolution either globally or when a particular device is detected. This defaults to 5, which is high enough for all but the most demanding applications, but can be set to any value greater than or equal to 1.
Type
- number
-
:number
maxThickLineSize <static>
-
The maximum value that ensures reasonable drawing line widths even when the actual building model is enormous.
Type
- number
-
:number
measuredAboutPoint <static>
-
An index defining the point to apply scaling relative to the image.
Type
- number
-
:number
measuredActual <static>
-
Stores the user-supplied distance value when rescaling.
Type
- number
-
:number
measuredDistance <static>
-
Stores the last measured distance value.
Type
- number
-
:PD.PATH
modePath <static>
-
The default shape of a new interactive element paths (0:polygonal, 1:rectangular).
Type
-
:number
modePointer <static>
-
What happens when you click/tap and drag in the canvas (0:select, 1:pan, 2:rotate).
Type
- number
-
:number
nudgeMode <static>
-
Stores the current keyboard nudge mode.
This is used to active keyboard-based nudging of selected elements/components in the model canvas.
It has three modes:
- -1: Nudge pending.
- 0: Nudging inactive.
- 1: Nudge active.
Type
- number
-
:PD.PD.DRAG_ACTION
pointerDragLeft <static>
-
The left or primary pointer button action.
Type
- PD.PD.DRAG_ACTION
-
:PD.PD.DRAG_ACTION
pointerDragMiddle <static>
-
The middle or secondary pointer button action.
Type
- PD.PD.DRAG_ACTION
-
:PD.PD.DRAG_ACTION
pointerDragRight <static>
-
The right or tertiary pointer button action.
Type
- PD.PD.DRAG_ACTION
-
:string
progressBarValue <static>
-
A value that indicates the progress of calculation.
This is typically scoped to a progress bar in the main UI, but can also be displayed as a text value.
Type
- string
-
:Array
projectTree <static>
-
Stores a reactive version of the current project hierarchy.
This array can be used by a front-end framework to display an editable tree-view (or similar) showing the structures, levels, spaces and elements within the current project.
To ensure complete separation between the model and its front-end representation, this is maintained as a simple list containing only primitives (strings, booleans and numbers) to describe each entry, never any references to objects or instances. This allows the list to be made reactive or observable without any of that reactivity or observability leaking into the model itself.
Type
- Array
-
:number
rectMode <static>
-
Stores the current rectangle edit mode.
Type
- number
-
:Array.<string>
redoList <static>
-
Stores the descriptions of items in the redo queue.
Type
- Array.<string>
-
:boolean
scrollDirectionSwap <static>
-
Whether or not to swap scroll wheel direction when zooming in/out in the model canvas.
Type
- boolean
-
:boolean
scrollZoomToPointer <static>
-
Whether or not to center the scroll wheel zoom on the current pointer position in the model canvas.
Type
- boolean
-
:PD.SELECT_ACTION
selectAction <static>
-
What happens when you pick select something in the model canvas.
Type
-
:boolean
selectComponents <static>
-
Whether or not to check for components when selecting the model.
Type
- boolean
-
:boolean
selectElements <static>
-
Whether or not to check for elements when selecting the model.
Type
- boolean
-
:boolean
selectJunctions <static>
-
Whether or not to check for junctions when selecting the model.
Type
- boolean
-
:boolean
selectLevels <static>
-
Whether or not to check for other levels when selecting the model.
Type
- boolean
-
:boolean
selectSegments <static>
-
Whether or not to check for path segments when selecting the model.
Type
- boolean
-
:boolean
selectedApertureValid <static>
-
Whether or not an aperture is selected in the Selection Manager.
Type
- boolean
-
:boolean
selectedElementHasChildren <static>
-
Whether or not child elements are selectable.
Type
- boolean
-
:boolean
selectedElementHasParent <static>
-
Whether or not the selected element belongs to a parent.
Type
- boolean
-
:boolean
selectedElementHasPath <static>
-
Whether or not the current element has a valid path.
Type
- boolean
-
:boolean
selectedElementValid <static>
-
Whether or not an element is selected in the Selection Manager.
Type
- boolean
-
:boolean
selectedJunctionValid <static>
-
Whether or not a path junction is selected in the Selection Manager.
Type
- boolean
-
:PD.SELECTED
selectedType <static>
-
The current type of selection in the Selection Manager.
Type
-
:PD.SELECTED
selectedType <static>
-
The current type of selection in the Selection Manager.
Type
-
:string
sessionName <static>
-
The name of the currently loaded session, if any.
Type
- string
-
:boolean
showAdjacentLevels <static>
-
Whether or not to display similar levels in adjacent structures.
When true, the model manager will also show levels on other structures in the project with the sae or overlapping heights to the current level.
Type
- boolean
-
:boolean
showDateTimeSpinners <static>
-
Whether or not to overlay the date/time spinners on the left-hand side of the model canvas.
Type
- boolean
-
:boolean
showLinkedCursorObject <static>
-
Whether or not to show a 3D message next to the cursor.
Type
- boolean
-
:boolean
showPanelIndicators <static>
-
Whether or not to display an outline to highlight switched panels.
Type
- boolean
-
:boolean
showTabOnSelect <static>
-
Whether or not to automatically show the tab based on the current selection.
Type
- boolean
-
:string
sidePanelActiveId <static>
-
The string identifier of the currently active side panel, defaults to empty string.
Type
- string
-
:boolean
sidePanelsPin <static>
-
Whether or not to pin side panels open and adjust canvas width, defaults to false.
Type
- boolean
-
:number
skyDefaultColor <static>
-
The default sky color, used in Sun-paths with no sky distribution.
Type
- number
-
:number
skySubdivisionAngle <static>
-
The angle to segment the sky into.
Type
- number
-
:boolean
skySubdivisionShow <static>
-
Whether or not to highlight sky subdivision areas.
Type
- boolean
-
:number
skySubdivisionSubSamples <static>
-
The number of grid samples per sky segment (1 to 5).
Type
- number
-
:PD.SKYDOME
skySubdivisionType <static>
-
Stores the current sky subdivision type (0 to 2).
Type
-
:boolean
snapActive <static>
-
Whether or not snapping is currently active.
When not active, all snapping is ignored.
Type
- boolean
-
:number
snapGridMajor <static>
-
The size of the major grid snap increment, in model units (typically mm).
Type
- number
-
:number
snapGridMetres <static>
-
The increment to use for metre-based (decimal feet) measurements.
Type
- number
-
:number
snapGridMinor <static>
-
The size of the minor grid snap increment, in model units (typically mm).
Type
- number
-
:number
snapGridSize <static>
-
The size of the normal grid snap increment, in model units (typically mm).
Type
- number
-
:number
snapGridStep <static>
-
The size of the smallest grid snap increment, in model units (typically mm).
Type
- number
-
:boolean
snapOnHover <static>
-
Whether or not to snap to (mid)points beneath the pointer.
Type
- boolean
-
:boolean
snapOrtho <static>
-
Whether or not to only move orthographically or diagonally.
Type
- boolean
-
:boolean
snapToGrid <static>
-
Whether or not to snap to the current ground grid.
Type
- boolean
-
:boolean
snapToLines <static>
-
Whether or not to snap to the closest element line.
Type
- boolean
-
:boolean
snapToMidPoints <static>
-
Whether or not to snap to the mid-point of element lines.
Type
- boolean
-
:boolean
snapToNormals <static>
-
Whether or not to snap to 45° diagonal lines.
Type
- boolean
-
:boolean
snapToPath <static>
-
Whether or not to align junctions with previous/next path segments.
Type
- boolean
-
:boolean
snapToPoints <static>
-
Whether or not to snap to the corner points in elements.
Type
- boolean
-
:boolean
snapToVisible <static>
-
Only snap to points that are visible in the current view.
Type
- boolean
-
:boolean
sunPathAutoFit <static>
-
Whether or not to automatically fit view to the Sun-path diagram.
Type
- boolean
-
:PD.PROJECTION
sunPathProjection <static>
-
Stores the current 3D-2D sun-path projection type.
Type
-
:number
transitionSpeed <static>
-
The default duration of animated transitions in mx, defaults to 600ms.
Type
- number
-
:Array.<string>
undoList <static>
-
Stores the descriptions of items in the undo queue.
Type
- Array.<string>
-
:boolean
undoLocationChanges <static>
-
Whether or not to store site location changes in undo/redo queue.
Type
- boolean
-
:number
undoMaxSize <static>
-
The maximum number of undo/redo points to store.
Type
- number
-
:PD.DIMENSION
units <static>
-
The preferred format for displaying dimensions and length units.
Type
-
:boolean
useLogDepthBuffer <static>
-
Whether to use a logarithmic depth buffer in stead of a linear one.
This very often improves graphical performance on very large models, but not all GPUs handle it well, especially with lines on planes. Thus, it is provided as a global option so users can experiment with their specific hardware.
Type
- boolean
-
:PD.MODE
userMode <static>
-
The current edit mode.
Type
-
:string
userModeActionMessage <static>
-
A user-action message for stepping the user though complex actions.
This message is used to provide step-by-step instructions to the user as they progress through stages within the currently active
PD.UserModeHandler.Type
- string
-
:boolean
userModeAutoProgress <static>
-
Whether to automatically add new junctions on each drag when adding elements.
Type
- boolean
-
:boolean
userModeCanComplete <static>
-
Whether to enable the 'DONE' button when adding elements.
Type
- boolean
-
:boolean
userModeDeferRebuild <static>
-
Whether to defer rebuilding the model until after the current interactive user mode action is complete.
When true, only affected elements will be updated during interactive editing and the entire model will only be rebuilt once the user mode action is complete. This can significantly improve performance when editing large models.
Type
- boolean
-
:boolean
userModeShowMessage <static>
-
Whether to display a small interactive panel.
Type
- boolean
-
:boolean
videoCaptureInProgress <static>
-
Whether or not a
PD.Videorecording session is in progress.Type
- boolean
-
:boolean
videoCapturePaused <static>
-
Whether or not a
PD.Videorecording session is currently paused.Type
- boolean
-
:number
viewDampingFactor <static>
-
How directly the 3D view responds to being interactively dragged (0 to 1).
Type
- number
-
:number
viewNavigationHeight <static>
-
The default eye height for WASD-based movement through the model, defaults to 1725mm or 5'6".
Type
- number
-
:number
viewNavigationSpeed <static>
-
The speed of WASD-based movement through the model.
Type
- number
-
:number
viewNavigationWalk <static>
-
Whether 3D view navigation mode is set to walking rather than orbit.
Type
- number
Methods
-
checkDynamicParameter(param, group) <static>
-
Provides an opportunity to dynamically limit the value and/or range of each parameter.
Parameters:
Name Type Description paramPD.Parameter The parameter that is being interactively changed.
groupPD.ParamGroup The group that the dynamic parameter belongs to.
-
fromJSON(json) <static>
-
Sets global state using values from a JSON object.
Parameters:
Name Type Description jsonobject A JSON data object.
-
getDynamicHUDParameters() <static>
-
Populates the HUD settings parameters.
Returns:
Returns an array of parameter groups.
- Type
- Array.<PD.ParamGroup>
-
getDynamicSettingsParameters() <static>
-
Provides a set of dynamic parameters for editing system settings.
Returns:
Returns an array of parameter groups.
- Type
- Array.<PD.ParamGroup>
-
getDynamicWASDParameters() <static>
-
Provides a set of dynamic parameters for editing WASD view navigation settings.
Returns:
Returns an array of parameter groups.
- Type
- Array.<PD.ParamGroup>
-
getModelRelatedJSONData() <static>
-
Converts the parts of global state that relate directly to the model to a simple POJO for JSON storage.
Returns:
Returns a JSON object.
- Type
- object
-
toJSON() <static>
-
Converts global state to a simple POJO for JSON storage.
Returns:
Returns a JSON object.
- Type
- object
-
updateDynamicParameters(param, group) <static>
-
Sets the dynamic parameter value and updates the model as required.
See the
PD.Base#updateDynamicParametersmethod for more details.Parameters:
Name Type Description paramPD.Parameter The dynamic parameter that changed.
groupPD.ParamGroup The group that the dynamic parameter belongs to.
Returns:
Returns true if the value actually changed.
- Type
- boolean