Skip to content

ScaffoldVuer

A vue component of the scaffold viewer.

Props

NameDescriptionTypeRequiredDefault
annotationSidebarThe option to show annotation information in sidebarbooleanfalsefalse
urlURL of the zincjs metadata. This value will be ignored if a valid state prop is also provided. If the url needs to be updated with state present, please use the setURL method.stringfalse""
showColourPickerShow the colour control of set to true.booleanfalsefalse
displayUIFlag to show/hide the UI.booleanfalsetrue
displayAtStartUpDisplay all graphics at start. This setting only works when traditional is set to false.booleanfalsetrue
helpModeUse for toggling the help tooltips.booleanfalsefalse
helpModeActiveItemThe active item index of help mode.numberfalse0
helpModeDialogThe option to use helpModeDialog. On default, false, clicking help will show all tooltips. If true, clicking help will show the help-mode-dialog.booleanfalsefalse
helpModeLastItemThe last item of help mode.booleanfalsefalse
helpModeInitialIndexThe initial index number for help mode tooltips. Set negative (e.g. -1) if there are other tooltips outside of hoverVisibilities.numberfalse0
displayWarningUse for show/display beta warning icon.booleanfalsetrue
warningMessageWarning message for the hovered over text on the warning icon.stringfalse"Beta feature - under active development"
displayLatestChanges-booleanfalsefalse
latestChangesMessage-stringfalse"New feature - Local search is now available"
displayMarkersShow/hide pickable markers for regions.booleanfalsefalse
markerClusterDisplay adjacent markers with a cluster marker.booleanfalsefalse
markerLabelsGroupName to value pair. The value can be a single number or and object in the following form: { number: Number, imgURL: String } When imgURL is specified, scaffoldvuer will attempt to render the image in imgURL as marker instead.objectfalse{}
displayMinimapShow/hide minimap.booleanfalsefalse
formatFormat of the input URLstringfalse"metadata"
minimapSettingsSettings for minimap position, size and alignment.objectfalse{ x_offset: 16, y_offset: 16, width: 128, height: 128, align: "top-right", }
enableOpenMapUIFlag to determine rather the open map UI icon and popup should be shown or not.booleanfalsefalse
openMapOptionsThis array populate the the openMapOptions popup. Each entry contains a pair of display and key.arrayfalse[ { display: "Open AC Map", key: "AC" }, { display: "Open FC Map", key: "FC" }, { display: "Open 3D Human Map", key: "3D" }, ]
stateState containing state of the scaffold.objectfalseundefined
regionOptional prop for the name of the region to focus on, this option is ignored if state or viewURL is also provided.stringfalse""
viewURLOptional prop for an URL of containing information of a viewport. This option is ignored if state is also provided. It will use the provided URL as base if a relative parth is provided.stringfalse""
renderSettings for turning on/off renderingbooleanfalsetrue
flatmapAPISpecify the endpoint of the flatmap server. This is used by annotation service included in third party flatmapvuer library.stringfalse"https://mapcore-demo.org/current/flatmap/v3/"
enableLocalAnnotationsEnable local annotationsbooleanfalsefalse

Events

Event NameDescriptionParameters
open-map--
timeChangedEmit when time in the current scene has changed"Current time in scene"
annotation-open--
annotation-close--
zinc-object-addedEmit when a new object is added to the scene"The object added to the sceene"
userPrimitivesUpdated--
scaffold-selectedEmit when an object is selected"Identifier of selected objects"
scaffold-highlightedEmit when an object is highlighted"Identifier of selected objects"
help-mode-last-itemThis event is emitted when the tooltips in help mode reach the last item.-
shown-tooltipThis event is emitted after a tooltip in Flatmap is shown.-
on-readyEmit when all objects have been loaded-
scaffold-navigatedEmit when the scene has been transformed due to navigation, only triggered during syncControl mode"Information on the navigation"

Methods

MethodDescriptionParameters
addZincObjectCall this to manually add a zinc object into the current scene. This will subsequently trigger a zincObjectAdded"ZincObject object to be added"
captureScreenshotFunction for capturing a screenshot of the current rendering."filename given to the screenshot."
clearSceneFunction to clear current scene, the tree controls and the search index.-
addAndEditAnnotationsAdd and edit local annotationsregion, group, zincObject, comment
primitivesUpdatedCallback for when primitives have been update using primitive controls. This is only called from callback.object
confirmCreateConfirm creation of new primitive. This is only called from callback.payload
fitWindowFunction to reset the view to default. Also called when the associated button is pressed.-
zoomInFunction to zoom in. Also called when the associated button is pressed.-
zoomOutFunction to zoom out. Also called when the associated button is pressed.-
speedChangedFunction to change the current play speed.speed
stopFreeSpinFunction used to stop the free spin-
findObjectsWithGroupNameReturn a list of obejcts with the provided name."Group name to search."
toggleDrawingSwitch active drawing typetype icon
toggleDrawingBoxToggle the drawing box which aid the drawing-
viewRegionFind and and zoom into objects with the provided list of names."List of names"
getRendererInfoReturn renderer information-
freeSpinFunction used to rotate the scene. Also called when the associated button is pressed.-
getCoordinatesOfSelectedGet the coordinates of the current selected region.-
getDynamicSelectedCoordinatesReturn an object containing the window coordinates of the current selected region which will be updated after each render loop.-
playStart the animation."flag to turn the animation on/off"
setHelpModeFunction to toggle on/off overlay help.helpMode
hideRegionTooltipHide the tooltip-
setMarkerModeWithAnnotationsSet the marker modes for objects specified by the list of annotationsannotations mode
searchSearch a object and display the tooltip"text to search across" "toggle the tooltip if this is set"
fetchSuggestionsGet the list of suggested terms based on the provided term. This can be used for autocomplete.term
getStateFunction used for getting the current states of the scene. This exported states can be imported using the importStates method.-
setStateFunction used for importing the states of the scene. This exported states can be imported using the read states method.state
exportGLTFexport current scene in GLTF."Return in binary form when set to true"
getLocalAnnotationsReturn a copy of the local annotations list. This list is used for storing user created annotation when enableLocalAnnotations is set to true.-
importLocalAnnotationsImport local annotations. The annotations will only be imported when enableLocalAnnotations is set to true;annotationsList
setURLAndStateFunction used for reading in new scaffold metadata and a custom viewport. This function will ignore the state prop and read in the new url.newValue state
setURLFunction used for reading in new scaffold metadata. This function will ignore the state prop and read in the new url.newValue
forceResizeForce the renderer to resize-