mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-16 06:06:11 +01:00
ranges
This commit is contained in:
9 files changed
+98
-8
No files matched your search
@@ -1,3 +1,4 @@
|
||||
import type { Vector2Tuple } from "three";
|
||||
import { characteristics as characteristicDefinitions } from "../config/characteristics";
|
||||
import { characteristicsGroups } from "../config/characteristicsGroups";
|
||||
import {
|
||||
@@ -40,6 +41,10 @@ function rankingValue(
|
||||
case CharacteristicType.Number:
|
||||
return value as number;
|
||||
|
||||
case CharacteristicType.Interval:
|
||||
const [a, b] = value as Vector2Tuple;
|
||||
return (a + b) / 2;
|
||||
|
||||
case CharacteristicType.NumberList: {
|
||||
const values = value as number[];
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ import {
|
||||
const sortableCharacteristicTypes = new Set<CharacteristicType>([
|
||||
CharacteristicType.Number,
|
||||
CharacteristicType.NumberList,
|
||||
CharacteristicType.Interval,
|
||||
]);
|
||||
|
||||
export const sortableCharacteristics = new Set<CharacteristicName>();
|
||||
|
||||
Reference in new issue
Block a user