Last active
August 19, 2020 11:44
-
-
Save omzeton/67a54e472f390c4ca3bd89707e451936 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const defaultSettings = { | |
range: { min: 1, max: 50000 }, | |
fov: 20, | |
snapping: [ | |
{ theta: 0.52, phi: 1.4, x: 0, }, | |
{ theta: -0.52, phi: 1.4, x: 0, }, | |
{ theta: 0, phi: 1.4, x: 0, }, | |
], | |
geometryMargins: { left: 50, right: 0, top: 0, bottom: 50, front: 0, back: 0, }, | |
screenMargins: { left: 0, right: 0, top: 0, bottom: 0, }, | |
component: { | |
geometryMargins: { left: 60, right: 60, top: 60, bottom: 160, front: 0, back: 0 }, | |
} | |
}; | |
const customSettings = { | |
'grid': { | |
...defaultSettings, | |
fov: 30, | |
snapping: [ | |
{ theta: -0.4, phi: 1.5, }, | |
], | |
geometryMargins: { left: 200, right: 200, top: 750, bottom: 0, front: 0, back: 0, }, | |
backgroundColor: '#edf0f0', // TODO: Move background to different settings.js file | |
}, | |
'cplus': { | |
...defaultSettings, | |
geometryMargins: { left: 450, right: 450, top: 200, bottom: 200, front: 0, back: 0, }, | |
}, | |
'row': { | |
...defaultSettings, | |
fov: 30, | |
snapping: [ | |
{ theta: -0.52, phi: 1.53, }, | |
{ theta: 0, phi: 1.53, }, | |
{ theta: 0.52, phi: 1.53, }, | |
], | |
geometryMargins: { left: 200, right: 200, top: 300, bottom: 300, front: 0, back: 0, }, | |
} | |
}; | |
export { defaultSettings, customSettings, }; |
- dodać klucz
default
jako fallback- pododawać brakujące klucze nawet jeżeli nie różnią się od
default
owych- niech wszystko co związane z podawaniem wstępnych wartości kamery siedzi w tym pliku tak żeby przy tworzeniu klasy podać np tylko
cameraSettings: 'cplus'
.
Dodane!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
default
jako fallbackdefault
owychcameraSettings: 'cplus'
.