Skip to content

Instantly share code, notes, and snippets.

@omzeton
Last active August 19, 2020 11:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save omzeton/67a54e472f390c4ca3bd89707e451936 to your computer and use it in GitHub Desktop.
Save omzeton/67a54e472f390c4ca3bd89707e451936 to your computer and use it in GitHub Desktop.
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, };
@omzeton
Copy link
Author

omzeton commented Aug 18, 2020

  • dodać klucz default jako fallback
  • pododawać brakujące klucze nawet jeżeli nie różnią się od defaultowych
  • 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'.

@omzeton
Copy link
Author

omzeton commented Aug 19, 2020

  • dodać klucz default jako fallback
  • pododawać brakujące klucze nawet jeżeli nie różnią się od defaultowych
  • 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