Static
TypeOne of CtrlProperties
Waits until the viewer was fully loaded & bootstrapped before returning the viewer instance.
A Viewer instance or throws if an unexpected error occurs during bootstrapping.
When setting the viewer controls version property
to Injected
, this function is used to provide the viewer which should be used by the control.
Example usage:
import { Viewer } from '@combeenation/3d-viewer';
// ...
CfgrUtils.onCfgrReady(() => {
// ...
CtrlUtils.getViewerCtrl('viewer3d').injectViewer(Viewer);
// ...
});
See Combeenation docs for more details on how to use this.
Optional
eventCallbacks: { Defintion of viewer control callbacks
import { Viewer, ViewerSettings, ModelVisibilityEntry, ParameterValues } from '@combeenation/3d-viewer';
// ...
viewerCtrl.injectViewer(Viewer, {
onBeforeCreateViewer: (viewerSettings: ViewerSettings) => {
// overwrite settings which are used for the viewer creation
viewerSettings.limitTextureSize = { devices: 'iPhone', size: 512 };
},
onAfterViewerCreated: async (viewer: Viewer) => {
// viewer is available at this time but the initial parameters have not been applied yet
// => good chance to add custom parameters
setCustomParameterObservers(viewer);
// also create some material clones that are targeted by the initial parameter update
await createMaterialClones();
// also setup scene (add lights, ground, etc...)
initSetupScene(viewer);
},
onAfterParametersApplied: (modelVisibility: ModelVisibilityEntry[], parameterValues: ParameterValues) => {
// e.g. center camera if model has been changed
if (modelVisibility.length) {
await centerCamera();
}
},
});
Optional
onOptional
onOptional
onThis function is actually inherited from ExtJS: https://docs.sencha.com/extjs/6.2.0/modern/Ext.mixin.Observable.html#method-on
Optional
scope: anyOptional
options: objectShow or hide the control
True:
"Show"
False:
"PluggedOut"
Optional
updateCtrlProperty: booleanStarts augmented reality session for the current scene content of the viewer control.
This includes:
See Combeenation docs for more details on how to use this.
This function is actually inherited from ExtJS: https://docs.sencha.com/extjs/6.2.0/modern/Ext.mixin.Observable.html#method-un
Optional
scope: anyGenerated using TypeDoc
This is the actual name of the component