@twinfinity/core
Index
Classes
- ArbitraryShapePoint
- BimApi
- BimApiLoadOptionsFactory
- BimCamera
- BimCoreApi
- BimIfcBuildingStorey
- BimIfcClass
- BimIfcDoor
- BimIfcLoader
- BimIfcLoaderElement
- BimIfcMesh
- BimIfcObject
- BimIfcSpace
- BimIfcStyle
- BimPropertySets
- BimTransformsRepository
- BimTwinfinityApiClient
- BoundingClientRectCache
- ChangeRecorder
- ClipPlane
- CoordinateTracker
- Discipline
- DynamicPolygon
- DynamicPolygonPoint
- DynamicPolygonWithArbitraryPoints
- FastTransform
- Geometry3dHandle
- GeometryBuilderBuildEventData
- GeometryTools
- Html2CanvasPlane
- Html2CanvasPoint
- Http
- HttpResponseType
- Icon
- IconHandler
- IfcGeometryBuilder
- IfcPictureSettings
- IfcTransparencySettings
- Layer
- LayerApi
- LayerDefinition
- LayerDefinitions
- LineShading
- LineUtil
- MarkupArea
- MarkupArrow
- MarkupCircle
- MarkupEntity
- MarkupEntityBase
- MarkupLine
- MarkupSheet2D
- MarkupSheet2DCollection
- MarkupSheets2DApi
- MarkupText
- Materials
- MeasureHandler
- MergableObjectWithState
- Permissions
- PickResultEmpty
- PickResultIcon
- PickResultIfcProductMesh
- PickResultMesh
- PictureSettings
- PlaneUtil
- PolyLine
- PostProcessEffects
- PredefinedBimChangeMetadataQuery
- Shapes
- StopWatch
- TelemetryEvent
- TwinfinityDefaultCameraStateSnapshot
- TwinfinityIfcMeshExtension
- TwinfinityMapBoxApiClient
- TwinfinityPostProcess
- TwinfinityTargetCameraStateSnapshot
- TwinfinityViewer
- ViewerCamera
Enumerations
- Access
- BimChangeStatus
- BimChangeType
- BimPropertiesType
- DynamicPolygonPointDeleteResult
- DynamicPolygonPointMoveResult
- DynamicPolygonPointValidationResult
- HttpMethod
- HttpStatusCode
- IfcMaterialHighlightIndex
- IfcMaterialRenderProperty
- Lcid
- MarkupEntityTypes
- MarkupEventTypes
- MergableObjectConflict
- MergableObjectEventSource
- MergableObjectState
- PickOptionType
- PickResultType
- PivotMode
- PointMoveResult
- PredefinedCanvasPosition
- PredefinedPointerButtonId
- Projection
- TrackCoordinate2DState
- TransformType
- TransparencyMode
- VisibleSelectableType
Functions
- DefaultBimIfcObjectForEachPredicate
- Fail
- IsLayer
- Ok
- clone
- convertToCanvasCoordinatesToRef
- copyVertex3ToRef
- createMockTypedResponse
- createNullFrustum
- equalsWithEpsilonVertex3
- getCanvasCenterCoordinatesToRef
- getMouseEventPressedButtons
- getTexture
- intersectsPlaneAtToRef
- isBlob
- isDwg
- isFailure
- isFolder
- isIfc
- isPointInFrustum
- makePropertyChangeObservable
- measureAsync
- setMax
- setMin
- setValue
- timeoutAsync
- yieldThreadFor
Interfaces
- AddOrUpdateEnvironmentOptions
- ArbitraryShapePointFactoryHandler
- AreaDto
- ArrowDto
- AuthorizationHeaderProvider
- AvailableLayerDefinitions
- BimApiIfcObjectsLoadOptions
- BimApiLoadOptionsWithExplicitIfcChanges
- BimApiLoadOptionsWithIfcChangePredicate
- BimApiSetContainerLoadOptions
- BimChangeBase
- BimChangeBlob
- BimChangeDiscipline
- BimChangeDwg
- BimChangeIdQuery
- BimChangeIfc
- BimChangeIfcMetadata
- BimChangeLayer
- BimChangeLayerData
- BimChangeLayerMetadata
- BimChangeMetadataQuery
- BimContainer
- BimContainerInfo
- BimCoreApiClient
- BimFolder
- BimIfcIndex
- BimIfcLoaderElementParent
- BimIfcMeshIntersectionCameraOptions
- BimIfcMeshIntersectionRayOptions
- BimIfcObjectForEachAction
- BimIfcObjectForEachActionAsync
- BimIfcObjectForEachPredicate
- BimIfcObjectRecursionOptions
- BimIfcPropertiesResponse
- BimIfcStyleDTO
- BimObjectAttributeDTO
- BimProduct
- BimProductAndMesh
- BimProductMesh
- BimProductMeshDTO
- BimProductMeshDescriptor
- BimProductQueryPredicate
- BimPropertySet
- BimPropertyUnit
- BimRegion
- BimTransform
- BimTypeObjectDTO
- BimUserInfo
- BimVertexData
- BuildInfo
- CameraLookAt
- CameraOptions
- CircleDto
- ClickEventHandler
- ContentUrl
- DOMRectCached
- DefaultChangeUploadableMetadata
- DwgMetadata
- DwgMetadata2D
- DwgMetadata3D
- DwgMetadataBase
- DynamicPolygonPointFactoryHandler
- DynamicPolygonPointParent
- EntityBaseDto
- Geometry3d
- GeometryBuilderOptions
- GetVisibleInSightOptions
- GridOptions
- Html2CanvasPointFactoryHandler
- HtmlPointParent
- HttpIfcResource
- HttpIfcResourceUrls
- IBimIfcLoaderElement
- IFCLightingEnvironment
- IfcFloor
- IfcGeometryBuilderCreateOptions
- IfcGeometryBuilderOptions
- IfcMetadata
- IfcSiteInformation
- IfcWithOptions
- Intersection
- LabelUpdateEventData
- LabelUpdateHandler
- LayerApiClient
- LayerInterface
- LightingEnvironment
- LineDto
- Lookup
- MailMessage
- MapBoxAccessToken
- MapBoxAccessTokenUpstreamProblem
- MapBoxAccessTokenValidationFailure
- MapBoxApiClient
- MarkupAreaStyle
- MarkupArrowStyle
- MarkupCircleStyle
- MarkupDto
- MarkupEntityConstructorArgs
- MarkupLineStyle
- MarkupStyle
- MarkupTextStyle
- MessageApiClient
- PickOptionCamera
- PickOptionCanvas
- PickOptionFlags
- PickOptionIntersection
- PickOptionRay
- PointerInfoWithTimings
- PropertyChangeEventDataBase
- RgbaDTO
- RunRenderLoopHandler
- Selectables
- SelectablesRenderOperation
- Serialize
- SettingsApiClient
- SheetDto
- StopWatchDeadlineOptions
- Stream
- TextDto
- TrackCoordinate2D
- TrackCoordinate2DData
- TrackCoordinate3D
- TwinfinityApiClient
- TwinfinityCameraExtensions
- TwinfinityCameraPivot
- TwinfinityCameraStateSnapshot
- TwinfinityInfo
- TwinfinityMeshExtensions
- TwinfinityParserMetadata
- TwinfinitySceneExtensions
- TwinfinityTargetCameraExtensions
- TwinfinityThinEngineExtensions
- TypedArrayLike
- TypedResponse
- UploadApiClient
- UploadApiClientContentOptions
- UploadApiTask
- UploadClientOperationAppendFileVersion
- UploadClientOperationCreate
- UploadClientOperationCreateFile
- VersionInfo
- Vertex2
- Vertex3
- VisibleIcon
- VisibleIfcProductAndMesh
- VisibleMesh
- Wgs84Position
Type Aliases
- AABB
- AttachOption
- BimApiClient
- BimApiLoadOptions
- BimApiOptions
- BimBackendApi
- BimChange
- BimChangeUploadable
- BimIfcChangeLoader
- BimIfcLoaderElementCreateFailure
- BimIfcMeshIntersectionCameraCommonOptions
- BimIfcMeshIntersectionOptions
- BimObjectAttributeValue
- BimProductAndMeshAndHitInfo
- BimPropertySetScalarValueType
- BimPropertySetValueType
- BimPropertySetWritable
- BimPropertyUnitType
- BlobData
- BuildType
- CameraDirection
- CameraMode
- CameraProjection
- CanvasPosition
- ClipPlaneName
- ClipPlaneOptions
- ClipPlanes
- Container
- CoordinateTrackerId
- DragPointPositioningFunction
- DragPointPositioningFunctionOrIndex
- Failure
- FrustumPlanes
- HttpRequestInit
- IfcClassType
- ImmutableMergableObjectWithState
- LayerCompatibleChange
- LayerFailure
- MailMessageId
- MapBoxAccessTokenResponse
- MarkupEntityDto
- MarkupLayerEvent2D
- MarkupProperty
- MergableObject
- MergableObjectEventArgs
- Mutable
- MutableShallow
- PackedIndices
- PackedNormals
- PackedPositions
- Permission
- PermissionIndex
- PermissionJson
- PickOption
- PickResult
- PointerButtonInfo
- PolyLinePoint
- PredefinedIfcClassId
- PredefinedIfcClassIdWithoutPrefix
- PropertyChangeEventData
- PropertyChangeObservable
- SimpleBoundingBox
- SimpleBoundingInfo
- TypedArray
- UploadApiClientContentOperation
- UploadApiClientFailure
- Viewer
- VisibleSelectable
Variables
Type Aliases
AABB
AttachOption
BimApiClient
Alias for TwinfinityApiClient
BimApiLoadOptions
Options which can be used when loading IFC’s. For example when calling setContainer.
BimApiOptions
Creation options for BimApi
BimBackendApi
Alias for backwards compatibility
BimChange
Discriminant union type (look at type
property) representing a Twinfinity change.
A change can be a file (IFC, DWG etc), layer or folder. Further types will be added in the future.
Common for all changes are that they have a unique id and a version.
BimChangeUploadable
Defines change types that it is possible to upload files/content for using the UploadApiClient api. Currenty it is only supported to upload files that aren’t IFC or DWG’s.
BimIfcChangeLoader
BimIfcLoaderElementCreateFailure
Represents the failure result when craeting a BimIfcLoaderElement fails.
BimIfcMeshIntersectionCameraCommonOptions
Common BimIfcMesh intersection options
BimIfcMeshIntersectionOptions
BimIfcMesh intersection options
BimObjectAttributeValue
BimProductAndMeshAndHitInfo
Alias for PickResult for backwards compatibility.
BimPropertySetScalarValueType
BimPropertySetValueType
BimPropertySetWritable
BimPropertyUnitType
BlobData
Represents generic data type. Intended use is to handle data which can be in a file, blob, arraybuffer or js object, js primitive form etc. For example, to pass data into a method that shall store the data but does not care about how the data is represented. This is useful for storing binary data, primitive types and js objects.
BuildType
Represents either production or development build type
CameraDirection
Consists of different strings explaining a viewing direction for the camera.
CameraMode
CameraMode can have one of three values
- ‘fps’ = first person camera, mouse control the rotation of the camera pivoting around itself. Move around with keyboard keys W, A, S and D.
- ‘pivot’ = Left mouse button intersects BIM model for finding a pivot point. This point is then used for rotation calculation camera about pivot.
- ‘all’ = ‘pivot’ by default, ‘fps’ when holding the right mouse button.
Middle mouse button pans the camera view and scroll wheel controls zoom.
CameraProjection
CameraProjection can have one of two strings.
- ‘perspective’ = normal geometry scale by distance.
- ‘orthographic’ = isometric view projection where distance to camera does not affect object scale.
CanvasPosition
Options to use when referencing a coordinate on the canvas.
ClipPlaneName
ClipPlaneOptions
ClipPlanes
Type parameters
Container
Alias for backwards compatibility
CoordinateTrackerId
Id of a tracked 3D coordinate.
DragPointPositioningFunction
Type declaration
Parameters
points: DynamicPolygonPoint[]
Returns Vertex3
DragPointPositioningFunctionOrIndex
Failure
Represents a failure or error if you will. Use function Fail to create a failure instance.
Type parameters
- T
FrustumPlanes
Represents a frustum.
HttpRequestInit
Same as RequestInit but without the method. Used with methods on Http
IfcClassType
All possible types an IFC class can be assigned. The type is used to group IFC classes into categories.
ImmutableMergableObjectWithState
Type parameters
- P
LayerCompatibleChange
Discriminant union type (look at type
property) representing a Twinfinity change.
for those change types (BimChange) where layers can be attached.
Use LayerCompatibleChange.availableLayerDefinitions in order to determine
if it is possible to attach a layer to a change of type LayerCompatibleChange.
LayerFailure
Represents a layer failure.
MailMessageId
Id of the sent message.
MapBoxAccessTokenResponse
Represents a MapBox access token response.
MarkupEntityDto
MarkupLayerEvent2D
Type which represents an event on a 2d MarkupLayer.
MarkupProperty
MergableObject
Makes it possible to work with local objects to which there are (possibly) remote counterparts. Will automatically resolve most conflicts except those that occur when both the local and remote object have been modified in some way that will result in a conflict. Example: Local object is modified (which means it must have existed remotely) but the remote no longer exists.
Type parameters
- T: MergableObjectProps
MergableObjectEventArgs
Represents event for change in local or remote object. Use the eventSource property to determine if the event is local or remote.
Type parameters
- T
Mutable
Type parameters
- T
MutableShallow
Strip readonly from all properties
Type parameters
- T
PackedIndices
PackedNormals
PackedPositions
Permission
Represents a permission. Use together with Permissions. If using the string representation (‘view’, ‘add’ etc) then it represents a single permission. If using the bigint representation then it is assumed to be a bitmask and can represent all permissions.
PermissionIndex
string definitions for the predefined permission masks.
PermissionJson
Defines how Permissions is represented in JSON.
PickOption
Options for pick operation.
PickResult
The result of a “pick” operation. For example if user clicks something on screen a pick
operation can be issued to determine what the click, if anything, hit.
It is a discriminant union. Use the type
property or instanceof
to determine what
kind of result the pick operation gives. It can be
PointerButtonInfo
Represents pointer button events and timings.
PolyLinePoint
A polyline point type
PredefinedIfcClassId
The known predefined IFC class IDs. Can be used with is to determine if a class is a predefined IFC class.
PredefinedIfcClassIdWithoutPrefix
Represents a predefined IFC class ID without the ‘Ifc’ prefix.
PropertyChangeEventData
Represents the event data for a property change.
Type parameters
- T
The type of the property value.
PropertyChangeObservable
Represents an object that can observe property changes.
Type parameters
- T
The type of the object being observed.
SimpleBoundingBox
SimpleBoundingInfo
Type declaration
center: [number, number, number]
corners: [[number, number, number], [number, number, number], [number, number, number], [number, number, number], [number, number, number], [number, number, number], [number, number, number], [number, number, number]]
max: [number, number, number]
min: [number, number, number]
radius: number
sizeXYZ: [number, number, number]
TypedArray
UploadApiClientContentOperation
Defines available operations for the createFileSession method.
Type parameters
- Change: BimChangeUploadable
UploadApiClientFailure
Represents the failure type.
Viewer
VisibleSelectable
Represents something that is visible. Such as a BabylonJS mesh, a Icon or a BimProductAndMesh.
Variables
constDEPTH_DIMENSIONS
constEXPENSIVE_NORMALS
constINVERTED_PROJECTION_MATRIX
constNEAR_FAR
constNORMALS_FROM_DEPTH
constVIEWSPACE_POSITION_FROM_LINEAR_DEPTH
constVIEWSPACE_POSITION_FROM_LOGARITHMIC_DEPTH
constboundingClientRectCache
Predefined cache for bounding client rectangles. This is useful when cost of HTMLElement.getBoundingClientRect()
becomes a problem (it causes browser reflow which in some situations can be very costly.). By caching
the information we get from the DOMRect
we can avoid this cost.
constbuildInfo
constendianess
Stores the platform endianess.
consttelemetry
Use for telemetry logging. Use this instead of console.log and similiar. It is used internally by
the Twinfinity Client API.
By default logs are output to console. If application insights is detected in the page,
when telemetry
is first accessed, then it will also automatically log to application insights.
Simplest way to forward logs to application insights is to use the “Snippet based setup” from https://docs.microsoft.com/en-us/azure/azure-monitor/app/javascript. Ensure that the snippet comes before all other scripts in the page.
Options for attach operation.