14 lines
1.1 KiB
TypeScript
14 lines
1.1 KiB
TypeScript
import type { ralTypes } from '@/components/ral'
|
|
|
|
export const predefPillarColors = ['3004', '7043', '6028', '5013', '8016', '1020', '3005', '4009']
|
|
export const predefLamelleColors = ['3009', '9003', '6027', '5024', '9001', '1012', '3007', '4007']
|
|
|
|
export const use_lamelles_count = () => useState('lamelles_count', () => 14)
|
|
export const use_fence_section = () => useState<number>('fence_section', () => 1000 * 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_section_count = () => useState('section_count', () => 5)
|
|
export const use_extra_section = () => useState('extra_section', () => 0)
|
|
export const use_total_length = () => useState('total_length', () => (1000 * 5 - 100) * 0.001)
|
|
export const use_min_length = () => useState('min_length', () => 1000) |