Skip to main content

@novorender/web_app

A library for building Novorender web apps.

Camera Controller

Interface, Type aliasDescription
CameraControllerOptionsCamera controller switch options.
BuiltinCameraControllerKindKind strings of built-in camera controller.
BuiltinCameraControllerTypeTypes of built-in camera controller.

Camera Controllers

Enumeration, Class, Interface, Type alias, FunctionDescription
MouseButtonsFlags for various mouse buttons.
BaseControllerBase class for all camera controllers.
CadMiddlePanControllerVariant of flight controller that uses middle mouse button for panning.
CadRightPanControllerVariant of flight controller that uses right mouse button for panning.
ControllerInputThe input source of camera controllers.
FlightControllerThe flight controller mimics the behaviour of an etheral, hovering drone, allowing unconstrained movements through walls and obstacles.
NullControllerNull type camera motion controller.
OrbitControllerA camera controller for orbiting around a point of interest.
OrthoControllerThe ortho controller is for navigating a orthographic camera.
PanoramaControllerPanorama type camera motion controller
PitchRollYawOrientationA 3D rotation expressed as pitch, roll and yaw angles.
SpecialFlightControllerVassbakk's super special flight controller.
ContollerInputContextInput event callbacks.
ControllerInitParamsCommon controller initialization parameters.
FlightControllerParamsFlight controller initialization parameters
FlyToParamsCamera fly-to transition/animation parameter
OrbitControllerParamsOrbit type camera motion controller
OrientationCamera controller 3D orientation in world space.
OrthoControllerParamsOrtho controller initialization parameters.
PanoramaControllerParamsPanorama camera controller parameters
PickContextA context interface for pick operations.
TouchContactPointA single touch input contact point.
ControllerAxesThe input gesture axes values.
ControllerParamsCommon controller input parameters.
computeRotationCompute rotation quaternion from roll, pitch and yaw angles.
rotationFromDirectionRetuns a quaternion computed for the given direction. Will compute rotation with Y as the up vector unless direction is Y or snapToAxis is given

Device Profile

Class, Interface, Type alias, FunctionDescription
BenchmarkA basic GPU benchmark helper class.
FillrateProfilerA basic GPU fill rate profiler.
PointrateProfilerA basic GPU point rate profiler.
DeviceFeaturesFeature flags for current device. True = enable.
DeviceLimitsDevice hardware limitations.
DeviceProfileInformation about current device performance and limitations.
DeviceQuirksKnown device specific quirks and bugs that we can work around.
GPUTierGPU performance tier.
getDeviceProfileCreate a device profile.

Geometry

FunctionDescription
createCubeObjectCreate a simple cube mesh object.
createSphereObjectCreate a simple sphere mesh object.
downloadGLTFLoad a gltf file from url.

Other

Enumeration, Class, Interface, Type alias, Variable, FunctionDescription
OfflineErrorCodeOffline error code
CollisionModuleModule for all collision calculations
CoreModuleStandard measure module for standard measure functions
DrawModuleModule for converting measure data to drawable objects. functions will generally use Camera to object to project the objects to view space
FollowModule-
ManholeModuleModules specialized for measuring manholes
MeasureErrorBase class for spesific errors from the measure API.
MeasureViewMaster class for all measure functionality The functionality is split into seperate modules
OfflineSceneAn offline scene.
OfflineViewStateViewstate for offline support UI.
ProfileModuleModule for converting parametric data to profiles. which can easily be used for charts and graphs
RoadModuleModule for handling road spesific parametric data.
ScreenSpaceConversions-
ArcValuesArcValues is a collection of values for measuring a single arc
AsyncProgramParamsParameters for asynchronous shader compilation and linking.
CameraCamera values needed when drawing measure data. The camera state from RenderState can be used here RenderStateCamera
CameraControllerInitialValuesOptional values to initialize camera controller.
CameraValuesGives values to create a camera based on selected object
CollisionValuesCollision values
Core3DImportMapA map describing inlined resources, or urls where to fetch them.
CylinderValuesCylinderValues is a collection of values for measuring a single cylinder
DeviationLabelDeviation lable with pixel position and deviation value as string.
DeviationSampleDeviation sampled from screen
DrawableEntityAn entity that can be used in measureView.draw.getDrawMeasureEntity, Objects returned from the api with draw kind parameter can be used
DrawContextDraw context for keeping updated canvas widht height and camera properties
DrawObjectAn object for 2d drawings, can contain multiple parts
DrawPartInformation about object to draw for measurement
DrawProductA hierarcical structure to draw 2d objects
DrawVoidHole in a filled polygon
DuoMeasurementValuesDuoMeasurementValues is a collection of values for measuring two objects
FollowParametricObjectUsed to get camera values along a curve segment or cylinder center
LaserIntersectionsLaser interseciton values collected from a single brep face
LinesDrawSettingSetting for drawing lines
LineStripMeasureValuesGives values based on selected linestrip
LineStripValuesLineStripValues is a collection of values for measuring a line strip
LineValuesLineValues is a collection of values for measuring a single line
LoggerAn interface for reporting status updates, progress and errors to UI.
ManholeMeasureValuesGives values based on selected manhole, must contain a top plane, bottom plane an a cylinder running for atleast 50% of the distance between top and bottom Tesselated manholes will not work
MeasureImportMapA map describing inlined resources, or urls where to fetch them.
MeasureObjectInfo-
MeasureSettingsAdditional options for measurement
OfflineContext-
OfflineErrorMessageOffline error message
OfflineImportMapA map describing inlined resources, or urls where to fetch them.
OutlineSampleDeviation sampled from screen
ParameterBoundsParameter bounds
ParametricEntityThis is the identification of a spesific edge, face or curve segment in the object. It is often required by measure functions
PickOptionsExtra pick options.
PickSamplePick Sample information
PlaneValuesPlaneValues is a collection of values for measuring a single Plane
PointEntity-
PointVisualizationClassificationClassification visualization, will use the classification values and the color gradient described in RenderStatePointCloud
PointVisualizationDeviationDeviation visualization, will use the classification values and the color gradient described in RenderStatePointCloud The gradients will follow the deviation index
PointVisualizationElevationElevation visualization, will use the global elevation and the color gradient described in RenderStateTerrain
PointVisualizationIntensityIntensity visualization, will use grayscale
PointVisualizationRGBColor visualization, will use the RGBA values in each vertex
PolymeshValuesPolymeshValues is a collection of values for measuring a face with no identifiable surface. These are generated surfaces typically from tesselated data.
Profile2d profile with slope information
RenderStatisticsRender frame performance and resource usage statistics.
RoadCrossSectionCross section of a road
SceneIndex-
SnapToleranceTolerance for picking and snapping to parametric objects, numbers are distance in meters 0 can be used to ignore certain types when picking or snapping
TextureSlotTexture slot assignment return value.
WasmInstance-
ActiveTextureIndexActive texture index.
ActiveTexturesArrayFixed sized array of active texture names.
AtLeastOneHelper type, like typescript's Partial<T>, but where at least one property must be defined.
CameraControllersFactoryCamera controller factory function signature type.
CylinerMeasureTypePossible options when measuring and drawing cylinders
DeviationInspectionsDeviation values taken from screen
DeviationInspectionSettingsSettings for deviation inspection
DeviationProjectionProjection, currently only cirular from the center line position, typically used for tunnels
EdgeValuesEdgeValues is a collection of values for measurment on a single edge
ElevationInfo-
FaceValuesFaceValues is a collection of values for measurment on a single face
FixedSizeArrayHelper type for arrays of fixed size
Line2d-
LoadStatusLoad status of the parametric object, uknown means that it have never been fetched and missing means that the object does not have parametric data
MaxActiveTexturesMaximum number of simultaneous textures allowed.
MeasureEntityInterface often used in the measure api to describe a selected parametric object, It can either be an object or a simple 3d point Any measure entity can be drawn using the draw module DrawModule
MeasurementValuesMeasurementValues is a collection of values for any measurment
ObjectIdObject Id from the core 3d api. this is the way objects are linked between the general 3d api and the measure api
PointVisualization-
RecursivePartialHelper type, like typescript's Partial<T>, only recursive.
RGBColor, expressed as a tuple of red, green and blue with values between 0.0 and 1.0.
RGBAColor with alpha opacity, expressed as a tuple of red, green, blue and alpha with values between 0.0 and 1.0.
ViewImportmap-
ViewImports-
packageVersionNPM package version, if applicable.
builtinControllersReturn the built-in camera controllers.
createMeasureViewCreates a measure view based on the scene url.
createOfflineViewStateCreate and initialize an offline view state object.
defaultRenderStateCreate a default render state.
easeInOutFunction that can be used for flyto will speed up and down
easeOutFunction that can be used for flyto will speed down
mergeRecursiveUtility function for merging the properties of two objects recursively
segmentPlaneIntersectionCalculate the intersection point between ray and plane

Render Module

Class, InterfaceDescription
RenderContextThe view specific context for rendering and picking.
RenderModuleA render module factory object.
RenderModuleContextA render module's context for a specific render context.

Render State

Enumeration, Interface, Type alias, FunctionDescription
ClippingIdObject id/indices for picking of rendered clipping planes.
ClippingModeHow to combine the half-spaces of multiple clipping planes into a clipping volume.
CoordSpaceTransformation coordinate space.
TonemappingModeUsed to visualize internal render buffers.
AABBAxis-aligned bounding box
BoundingSphereBounding sphere
DerivedRenderStateAn extended variant of RenderState with additional derived properties.
HSLAOptionsOptions for HSL + alpha color transformation.
LinearTransformLinear transform options.
MaterialPropertiesScene materials property arrays, encoded as base 64 strings.
MatricesA helper object for computing transformation matrices between spaces on demand.
RenderStateAn object describing the what to be rendered and how by RenderContext.render.
RenderStateBackgroundBackground/environment related render state.
RenderStateCameraCamera related render state.
RenderStateClippingClipping related render state.
RenderStateClippingPlaneRender state for a single clipping plane.
RenderStateColorGradientA color gradient curve.
RenderStateColorGradientKnotGradient curve knot node.
RenderStateDebugDebug related state.
RenderStateDynamicGeometryDynamic mesh geometry state.
RenderStateDynamicImageTexture image related state.
RenderStateDynamicInstanceDynamic object instance render state.
RenderStateDynamicMaterialGGXGGX type of PBR material.
RenderStateDynamicMaterialUnlitUnlit material properties.
RenderStateDynamicMeshDynamic mesh render state.
RenderStateDynamicMeshPrimitiveDynamic mesh primitive.
RenderStateDynamicNormalTextureReferenceNormal map texture reference state.
RenderStateDynamicObjectDynamic object related render state.
RenderStateDynamicObjectsDynamic object related render state
RenderStateDynamicOcclusionTextureReferenceOcclusion map texture reference state.
RenderStateDynamicSamplerTexture sampled related state
RenderStateDynamicTextureTexture related state.
RenderStateDynamicTextureReferenceTexture reference state.
RenderStateDynamicVertexAttributesDynamic mesh vertex attributes state.
RenderStateGridGrid related render state.
RenderStateHighlightGroupRender state for a specific highlight group.
RenderStateHighlightGroupsHighlight related render state.
RenderStateHighlightGroupTextureRender state for a highlight group texture.
RenderStateOutlinesOutline related render state.
RenderStateOutputOutput image related state.
RenderStatePickPick related render state.
RenderStatePointCloudPoint cloud related render state.
RenderStateQualityQuality related render state.
RenderStateSceneStatic, streamable geometry render state.
RenderStateStaticGeometryKindsFlags for what types of geometry to render or not.
RenderStateTerrainTerrain render state.
RenderStateTonemappingTone mapping related render state.
RenderStateToonOutlineToon shader related outline.
RGBAOptionsOptions for RGBA + alpha color transformation.
SceneConfigScene Configuration
ViewFrustumThe 6 planes of a view frustum, defined in world space.
RenderStateChangesA partial view of render state used for modifications.
RenderStateDynamicMaterialMaterial related render state.
RenderStateDynamicVertexAttributeVertex attribute type for dynamic objects.
RenderStateGroupActionHow to render the geometry of a highlight group.
RGBATransform5x4 row-major matrix for color/opacity transform.
createColorSetHighlightCreate a highlight color transform that replaces material colors.
createHSLATransformHighlightCreate a highlight color transform that modifies material colors using hue, saturation and lightness.
createNeutralHighlightCreate a highlight color transform that doesn't change colors.
createRGBATransformHighlightCreate a highlight color transform that modifies material colors.
createTransparentHighlightCreate a highlight color transform that replaces material opacity.
downloadSceneDownload scene from url.
modifyRenderStateCreate a new copy of render state with specified modifications.
validateRenderStateValidate render state changes.

Render View

Class, Interface, Type alias, FunctionDescription
ViewA view base class for Novorender content.
CameraControllerOptionsCamera controller switch options.
Core3DImportsCore3D bundler/build resource imports.
EnvironmentDescriptionBackground/IBL environment description
MeasureImportsCore3D bundler/build resource imports.
OfflineImportsCore3D bundler/build resource imports.
PickSampleExtExtended pick sample information.
RenderStateTextureReferencePBR Material texture reference
TextureDescriptionPBR Material texture description
ViewStatisticsView related render statistics.
BuiltinCameraControllerKindKind strings of built-in camera controller.
BuiltinCameraControllerTypeTypes of built-in camera controller.
downloadCore3dImportsDownload any missing imports.
downloadMeasureImportsDownload any missing imports.
downloadOfflineImportsDownload any missing imports.
initCore3DCreate and initialize the core 3D render context.