enableCameraSync: newSetting(false,'boolean','Enable / disable synchronisation of the camera with AR tracking information. Enabling this will disable the orbit controls.',false),
enableCameraSyncInitial: newSetting(false,'boolean','Enable / disable the inital synchronisation of the camera with AR tracking information. Enabling this will disable the orbit controls.'),
enableLightingEstimation: newSetting(true,'boolean','Enable / disable automatic lighting estimation. Enabling this stores the current state of the lights which will get restored once automatic lighting estimation gets disabled again.'),
enableTouchControls: newSetting(true,'boolean','Enable / disable touch controls for placement of objects in the AR scene while AR camera synchronisation is enabled.'),
enableTouchControlRotation: newSetting(true,'boolean','Enable / disable rotation of objects in the AR scene by means of touch controls. Typically this should be enabled for objects to be placed horizontally.'),
enableAutomaticPlacement: newSetting(true,'boolean','Enable / disable initial automatic placement of objects in the AR scene as soon as plane anchors get detected. Automatic placement stops once the user starts to interact.'),
defaultHitTestType: newSetting('existingPlaneUsingGeometry',function(value){return['featurePoint','estimatedHorizontalPlane','estimatedVerticalPlane','existingPlane','existingPlaneUsingExtent','existingPlaneUsingGeometry'].includes(value);},'Default type of feature to use for hit tests, used by touch controls. '),
},
// constructor: {
// useQueryStringParameters: new Setting(false, 'boolean', 'if true, the constructor tries to read settings from the query string, existing settings will not be overridden'),
// forceQueryStringParameters: new Setting(false, 'boolean', 'if true, the constructor tries to read settings from the query string existing settings will be overridden'),
// apiversion: new Setting('2', 'string', 'major version of the API to return by default'),
// runtimeId: new Setting('', 'string', 'runtimeId to set for returned API object, a random one will be chosen by default'),
// arkitbridge: new Setting(false, 'boolean', 'enable bridge to ShapeDiver iOS app using ARKit'),
// modelViewUrl: new Setting('us-east-1', 'string', 'optional model view url to pass to the default CommPlugin, a leading \'https://\' will be prefixed if not in place, \'us-east-1\' and \'eu-central-1\' may be used as abbreviations for ShapeDiver\'s default systems'),
// ticket: new Setting('' , 'string', 'optional model view ticket to be used for immediately instantiating a CommPlugin instance. No CommPlugin instance will be registered by the constructor if this is empty. Further CommPlugin instances can be initialized after the constructor has finished, using the API v2 function {@link module:ApiInterfaceV2~ApiPluginInterface#registerCommPluginAsync registerCommPluginAsync}.'),
// authorization: new Setting('', 'string', 'optional authorization token to include with requests to the model view interface (prepend \'Bearer \' yourself if necessary)'),
// iframeId: new Setting('sdv-iframe', 'string'),
// iframeDebugging: new Setting(false, 'boolean')
// },
// browserUI: {
// anchorElements: new Setting(true, 'boolean', 'choose whether the default handler for creating DOM elements representing anchors shall be instantiated'),
// brandedMode: new Setting(true, 'boolean', 'choose whether ShapeDiver branding shall be shown during initial loading'),
// brandedModeConsole: new Setting(null, 'any'),
// busyGraphic: new Setting('', 'string', 'optional URL to an image which shall be shown instead of the busy spinner'),
// containerControls: new Setting(undefined, 'any', 'optional container to use for creating parameter controls, may be undefined in which case a DOM element whose id is domElementIdPrefix+\'-controls\' will be looked for. Set this to a falsy value different from `undefined` to prevent the settings widget from being created. Not creating the settings and controls widgets saves some resources on loading of the viewer.'),
// containerSettings: new Setting(undefined, 'any', 'optional container to use for creating settings controls, may be `undefined` in which case a DOM element whose id is domElementIdPrefix+\'-settings\' will be looked for. Set this to a falsy value different from `undefined` to prevent the settings widget from being created. Not creating the settings and controls widgets saves some resources on loading of the viewer.'),
// createButtons: new Setting(true, 'boolean', 'choose whether standard buttons will be created for the viewport'),
// domElementIdPrefix: new Setting('sdv-container', 'string', 'prefix to use for lookup of dom elements'),
// editMode: new Setting(false, 'boolean', 'choose whether the parameter controls should be initialized in edit mode'),
// exportModal: new Setting(true, 'boolean', 'choose whether a modal dialog for export handling shall be instantiated'),
// showControlsButton: new Setting(true, 'boolean', 'choose whether a button for showing/hiding the parameter controls shall be shown'),
// showControlsInitial: new Setting(false, 'boolean', 'choose whether the parameter controls shall be shown initially'),
// showSettingsButton: new Setting(true, 'boolean', 'choose whether a button for showing/hiding the settings controls shall be shown'),
// showSettingsInitial: new Setting(false, 'boolean', 'choose whether the settings controls shall be shown initially'),
// showZoomButton: new Setting(true, 'boolean', 'choose whether a button for zooming shall be shown'),
// zoomButtonResetsCamera: new Setting(false, 'boolean', 'choose whether the zoom button shall reset the camera to its default position'),
// showFullscreenButton: new Setting(true, 'boolean', 'choose whether a button for to/from fullscreen mode shall be shown'),
// showInitialSpinner: new Setting(true, 'boolean', 'choose whether an initial loading spinner shall be shown'),
// showBusySpinner: new Setting(true, 'boolean', 'choose whether a busy mode spinner or the optional custom busyGraphic shall be shown'),
// viewportOverlays: new Setting(true, 'boolean', 'choose whether viewport overlays will be created at all (buttons, spinners, progress bar)'),
// },
defaultMaterial: {
// name: new Setting('Default material', 'string', '', false),
// version: new Setting('2.0', 'string', '', false),
bumpAmplitude: newSetting(1,'notnegative','Bump amplitude of the default material'),
color: newSetting('#d3d3d3','string','Color of the default material'),
metalness: newSetting(0.0,'factor','Metalness of the default material'),
roughness: newSetting(1.0,'factor','Roughness of the default material'),
blurSceneWhenBusy: newSetting(true,'boolean','Blur or don\'t blur the scene while a process is busy'),
// container: new Setting(undefined, 'any', 'Container to use for creating the viewport, may be undefined in which case a DOM element whose id is domElementIdPrefix+\'-viewport\' will be looked for. An array of containers may be passed to create multiple viewports. Pass an empty array to avoid creating a viewport.'),
// deferGeometryLoading: new Setting(false, 'boolean', 'true: tell the CommPlugin instance created by the constructor to not load any geometry until first parameter update or refresh, false: load default geometry'),
ignoreSuperseded: newSetting(true,'boolean','Ignore intermediate solutions which at the time of their arrival have already been superseded by another customization request',false),
loggingLevel: newSetting(-1,function(value){returnvalue>=-1&&value<=3;},'Level of log messages shown on the console, allowed values: -1 (none), 0 (error), 1 (warn), 2 (info), 3 (debug)',false),
// commPluginRuntimeId: new Setting('CommPlugin_1', 'string', 'runtime id to use for the CommPlugin instance created by the constructor'),
messageLoggingLevel: newSetting(-1,function(value){returnvalue>=-1&&value<=3;},'Log level to be used for logging internal messages, allowed values: -1 (none), 0 (error), 1 (warn), 2 (info), 3 (debug)',false),
// strictMode: new Setting(false, 'boolean', '', false),
showMessages: newSetting(true,'boolean','Show or don\'t show user messages in the viewport',false),
hasRestoredSettings: newSetting(false,'boolean','True if settings have been restored from a settings object delivered by a CommPlugin',false),
// exposeViewer: new Setting(false, 'boolean'),
commitParameters: newSetting(false,'boolean','Use or don\'t commit mode for parameters'),
commitSettings: newSetting(false,'boolean','Use or don\'t commit mode for settings'),
viewerRuntimeId: newSetting('','string','The runtime id of this viewer',false),
scene: {
show: newSetting(false,'boolean','Show / hide the scene',false),
// showSceneMode: new Setting(2, (value: number) => value >= 0 && value <= 3, 'when to fade in the scene: ON_SHOW(1), ON_FIRST_PLUGIN(2), ON_ALL_PLUGINS(3)'),
keyPanSpeed: newSetting(0.5,'factor','Speed of panning when using the keyboard'),
movementSmoothness: newSetting(0.5,'factor','How much to the current movement is affected by the previous one'),
restrictions: {
position: {
cube: newSetting({
min: newSetting({x: -Infinity,y: -Infinity,z: -Infinity},'vector3any','Restriction of the camera position inside a cube, minimum corner of the cube'),
max: newSetting({x: Infinity,y: Infinity,z: Infinity},'vector3any','Restriction of the camera position inside a cube, maximum corner of the cube'),
},function(value){returntrue;},'Restriction of the camera position inside a cube, minimum and maximum corner of the cube'),
sphere: newSetting({
center: newSetting({x: 0,y: 0,z: 0},'vector3any','Restriction of the camera position inside a sphere, center of the sphere'),
radius: newSetting(Infinity,'notnegative','Restriction of the camera position inside a sphere, radius of the sphere'),
},function(value){returntrue;},'Restriction of the camera position inside a sphere, center and radius of the sphere'),
},
target: {
cube: newSetting({
min: newSetting({x: -Infinity,y: -Infinity,z: -Infinity},'vector3any','Restriction of the camera target inside a cube, minimum corner of the cube'),
max: newSetting({x: Infinity,y: Infinity,z: Infinity},'vector3any','Restriction of the camera target inside a cube, maximum corner of the cube'),
},function(value){returntrue;},'Restriction of the camera target inside a cube, minimum and maximum corner of the cube'),
sphere: newSetting({
center: newSetting({x: 0,y: 0,z: 0},'vector3any','Restriction of the camera target inside a sphere, center of the sphere'),
radius: newSetting(Infinity,'notnegative','Restriction of the camera target inside a sphere, radius of the sphere'),
},function(value){returntrue;},'Restriction of the camera target inside a sphere, center and radius of the sphere'),
},
rotation: newSetting({
minPolarAngle: newSetting(0,function(value){returntrue;},'Minimum polar angle of the camera position with respect to the camera target, unit degree, interval [0,180]'),
maxPolarAngle: newSetting(180,function(value){returntrue;},'Maximum polar angle of the camera position with respect to the camera target, unit degree, interval [0,180]'),
minAzimuthAngle: newSetting(-Infinity,'number','Minimum azimuth angle of the camera position with respect to the camera target, unit degree, interval [-180,180]'),
maxAzimuthAngle: newSetting(Infinity,'number','Maximum azimuth angle of the camera position with respect to the camera target, unit degree, interval [-180,180]'),
},function(value){returntrue;},'Minimum and maximum polar and azimuth angle of the camera position with respect to the camera target, unit degree'),
zoom: newSetting({
minDistance: newSetting(0,'notnegative','Minimum distance between camera position and target'),
maxDistance: newSetting(Infinity,'notnegative','Maximum distance between camera position and target'),
},function(value){returntrue;},'Minimum and maximum distance between camera position and target'),
},
rotationSpeed: newSetting(0.5,'factor','Speed of camera rotation'),
panSpeed: newSetting(0.5,'factor','Speed of panning'),
zoomSpeed: newSetting(0.5,'factor','Speed of zooming'),
},
fps: {},
orthographic: {
damping: newSetting(0.1,'notnegative','How much to damp camera movements by the user'),
enableKeyPan: newSetting(false,'boolean','Enable / disable panning using the keyboard, also refer to enablePan'),
enablePan: newSetting(true,'boolean','Enable / disable panning in general, also refer to enableKeyPan'),
gridVisibility: newSetting(true,'boolean','Show / hide the grid'),
groundPlaneReflectionThreshold: newSetting(0.01,'notnegative','Allows to control the distance to objects that are still reflected by the groundplane'),
groundPlaneReflectionVisibility: newSetting(false,'boolean','Enable / disable the reflectivity of the groundplane'),
groundPlaneVisibility: newSetting(true,'boolean','Show / hide the ground plane'),
lights: {
helper: newSetting(false,'boolean','Show / hide the light helpers'),
lightScene: newSetting('default','string'),
lightScenes: newSetting({},'any'),
},
material: {
environmentMap: newSetting('none',function(value){returntrue;},'Name of the environment map to use, or an array of 6 image URLs making up the cube mapped environment map (px, nx, pz, nz, py, ny)'),
environmentMapAsBackground: newSetting(false,'boolean','Show / hide the environment map in the background'),
environmentMapResolution: newSetting('1024',function(value){return(['256','512','1024','2048'].includes(value));},'Image resolution to be used for the named environment maps (available resolutions: 256, 512, 1024)'),
},
render: {
ambientOcclusion: newSetting(true,'boolean','Enable / disable ambient occlusion for rendering'),
beautyRenderDelay: newSetting(50,'notnegative','Amount of which the beauty rendering is delayed'),