predef random pair
This commit is contained in:
parent
c6c8b4bd82
commit
a9daee022c
|
@ -5,12 +5,13 @@ export const predefLamelleColors = ['3009', '9003', '6027', '5024', '9001', '101
|
|||
|
||||
const n = 2
|
||||
const min = 1300
|
||||
const random_pair = Math.floor(Math.random() * predefPillarColors.length)
|
||||
export const use_lamelle_height = () => useState<number>('lamelle_height', () => 0.115)
|
||||
export const use_lamelles_count = () => useState('lamelles_count', () => 14)
|
||||
export const use_fence_section = () => useState<number>('fence_section', () => min * 0.001)
|
||||
export const use_remove_pillar = () => useState<boolean>('remove_pillar', () => false)
|
||||
export const use_pillar_color = () => useState<ralTypes>('pillar_color', () => predefPillarColors[Math.floor(Math.random() * predefPillarColors.length)] as ralTypes)
|
||||
export const use_lamelle_color = () => useState<ralTypes>('lamelle_color', () => predefLamelleColors[Math.floor(Math.random() * predefLamelleColors.length)] as ralTypes)
|
||||
export const use_pillar_color = () => useState<ralTypes>('pillar_color', () => predefPillarColors[random_pair] as ralTypes)
|
||||
export const use_lamelle_color = () => useState<ralTypes>('lamelle_color', () => predefLamelleColors[random_pair] as ralTypes)
|
||||
export const use_section_count = () => useState('section_count', () => n)
|
||||
export const use_extra_section = () => useState('extra_section', () => 0)
|
||||
export const use_total_length = () => useState('total_length', () => (((min + 104) * n) + 104) * 0.001)
|
||||
|
|
Loading…
Reference in New Issue