Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
textHorizontalAlignment={Control.HORIZONTAL_ALIGNMENT_LEFT}
textVerticalAlignment={Control.VERTICAL_ALIGNMENT_CENTER}
/>
{
this.state.allowedMeshes.map(allowedMesh => (
))
}
<button height="60px" width="290px" background="#6c757d" name="cancel-button"></button>
params.forEach(function (param) {
var header = new TextBlock()
header.text = param.name + ':' + pipeline.depthOfField[param.name].toFixed(2)
header.height = '40px'
header.color = 'black'
header.textHorizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT
header.paddingTop = '10px'
UiPanel.addControl(header)
var slider = new Slider()
slider.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT
slider.minimum = param.min
slider.maximum = param.max
slider.color = '#636e72'
slider.value = pipeline.depthOfField[param.name]
slider.height = '20px'
slider.width = '205px'
UiPanel.addControl(slider)
slider.onValueChangedObservable.add(function (v) {
pipeline.depthOfField[param.name] = v
header.text = param.name + ':' + pipeline.depthOfField[param.name].toFixed(2)
moveFocusDistance = false
})
})
scene.activeCameras = [scene.activeCamera, bgCamera]
params.forEach(function (param) {
var header = new TextBlock()
header.text = param.name + ':' + pipeline.depthOfField[param.name].toFixed(2)
header.height = '40px'
header.color = 'black'
header.textHorizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT
header.paddingTop = '10px'
UiPanel.addControl(header)
var slider = new Slider()
slider.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT
slider.minimum = param.min
slider.maximum = param.max
slider.color = '#636e72'
slider.value = pipeline.depthOfField[param.name]
slider.height = '20px'
slider.width = '205px'
UiPanel.addControl(slider)
slider.onValueChangedObservable.add(function (v) {
pipeline.depthOfField[param.name] = v
header.text = param.name + ':' + pipeline.depthOfField[param.name].toFixed(2)
moveFocusDistance = false
})