* Update for another pretty yet not backwards-compatible web rewrite.

This commit is contained in:
Peter Baylies 2022-10-04 00:28:06 -04:00
parent d2db92236a
commit 815addc452
5 changed files with 82 additions and 30 deletions

File diff suppressed because one or more lines are too long

View File

@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>InvokeAI - A Stable Diffusion Toolkit</title>
<link rel="shortcut icon" type="icon" href="/assets/favicon.0d253ced.ico" />
<script type="module" crossorigin src="/assets/index.e1a7d3d5.js"></script>
<script type="module" crossorigin src="/assets/index.045a5291.js"></script>
<link rel="stylesheet" href="/assets/index.853a336f.css">
</head>

View File

@ -0,0 +1,23 @@
import React from 'react';
import { RootState, useAppDispatch, useAppSelector } from '../../../../app/store';
import IAINumberInput from '../../../../common/components/IAINumberInput';
import { setPerlin } from '../../optionsSlice';
export default function Perlin() {
const dispatch = useAppDispatch();
const perlin = useAppSelector((state: RootState) => state.options.perlin);
const handleChangePerlin = (v: number) => dispatch(setPerlin(v));
return (
<IAINumberInput
label='Perlin'
min={0}
max={1}
step={0.05}
onChange={handleChangePerlin}
value={perlin}
isInteger={false}
/>
);
}

View File

@ -2,6 +2,8 @@ import { Flex } from '@chakra-ui/react';
import RandomizeSeed from './RandomizeSeed';
import Seed from './Seed';
import ShuffleSeed from './ShuffleSeed';
import Threshold from './Threshold';
import Perlin from './Perlin';
/**
* Seed & variation options. Includes iteration, seed, seed randomization, variation options.
@ -14,6 +16,10 @@ const SeedOptions = () => {
<Seed />
<ShuffleSeed />
</Flex>
<Flex gap={2}>
<Threshold />
<Perlin />
</Flex>
</Flex>
);
};

View File

@ -0,0 +1,23 @@
import React from 'react';
import { RootState, useAppDispatch, useAppSelector } from '../../../../app/store';
import IAINumberInput from '../../../../common/components/IAINumberInput';
import { setThreshold } from '../../optionsSlice';
export default function Threshold() {
const dispatch = useAppDispatch();
const threshold = useAppSelector((state: RootState) => state.options.threshold);
const handleChangeThreshold = (v: number) => dispatch(setThreshold(v));
return (
<IAINumberInput
label='Threshold'
min={0}
max={1000}
step={0.1}
onChange={handleChangeThreshold}
value={threshold}
isInteger={false}
/>
);
}