File tree Expand file tree Collapse file tree 4 files changed +9
-7
lines changed
Expand file tree Collapse file tree 4 files changed +9
-7
lines changed Original file line number Diff line number Diff line change 11import { Select } from "@mantine/core" ;
2- import { useParametersContext } from "../../stores/parameters" ;
2+ import { getParametersStore , useParametersContext } from "../../stores/parameters" ;
33import { SkylineBaseShape } from "../../three/types" ;
44import { capitalize } from "../../utils" ;
55
66export function BaseShapeInput ( ) {
7+ const DEFAULT_VALUE = getParametersStore ( ) . getInitialState ( ) . inputs . shape ;
78 const setInputs = useParametersContext ( ( state ) => state . setInputs ) ;
89 return (
910 < Select
@@ -18,7 +19,7 @@ export function BaseShapeInput() {
1819 label : capitalize ( SkylineBaseShape . Frustum ) ,
1920 } ,
2021 ] }
21- defaultValue = { SkylineBaseShape . Prism }
22+ defaultValue = { DEFAULT_VALUE }
2223 allowDeselect = { false }
2324 onChange = { ( value ) => {
2425 if ( value === null ) {
Original file line number Diff line number Diff line change 11import { Select } from "@mantine/core" ;
2- import { useParametersContext } from "../../stores/parameters" ;
2+ import { getParametersStore , useParametersContext } from "../../stores/parameters" ;
33import { ExportFormat } from "../../three/export" ;
44
55export function ExportFormatInput ( ) {
6+ const DEFAULT_VALUE = getParametersStore ( ) . getInitialState ( ) . inputs . exportFormat ;
67 const setInputs = useParametersContext ( ( state ) => state . setInputs ) ;
78 return (
89 < Select
@@ -17,7 +18,7 @@ export function ExportFormatInput() {
1718 label : ExportFormat . Stl . toUpperCase ( ) ,
1819 } ,
1920 ] }
20- defaultValue = { ExportFormat . ThreeMF }
21+ defaultValue = { DEFAULT_VALUE }
2122 allowDeselect = { false }
2223 onChange = { ( value ) => {
2324 if ( value === null ) {
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ export const getComputedParameters = (
6161) : SkylineModelComputedParameters => {
6262 const modelLength = WEEKS_IN_YEAR * inputs . towerSize ;
6363 const modelWidth = DAYS_IN_WEEK * inputs . towerSize ;
64- const platformHeight = inputs . towerSize * 3 ;
64+ const platformHeight = inputs . towerSize * 3.2 ;
6565 const halfPlatformHeight = platformHeight / 2 ;
6666 const textSize = platformHeight / 2.2 ;
6767 const towerSizeOffset = inputs . towerSize / 2 ;
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ export function SkylineBase({ years }: SkylineBaseProps) {
7171 points : toPolygons (
7272 ttfFont ,
7373 computed . resolvedName ,
74- computed . platformHeight / 1.75 ,
74+ computed . platformHeight / 1.65 ,
7575 ) ,
7676 offset : inputs . nameOffset ,
7777 } ) ,
@@ -83,7 +83,7 @@ export function SkylineBase({ years }: SkylineBaseProps) {
8383 points : toPolygons (
8484 ttfFont ,
8585 computed . formattedYear ,
86- computed . platformHeight / 1.75 ,
86+ computed . platformHeight / 1.65 ,
8787 ) ,
8888 offset : inputs . yearOffset ,
8989 } ) ,
You can’t perform that action at this time.
0 commit comments