mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-11-27 00:04:42 +00:00
Drop old class names from studio comments
This commit is contained in:
1 parent
2cfb3d8dcc
commit
4079e0a708
18 files changed
+21
-21
No files matched your search
@@ -1,4 +1,4 @@
|
||||
/** The height scale of the map, from deep water to snowy peaks, measured from sea level (v3e HeightColors). */
|
||||
/** The height scale of the map, from deep water to snowy peaks, measured from sea level. */
|
||||
|
||||
export const DEEPEST_BELOW_SEA_BLOCKS = 90
|
||||
export const HIGHEST_ABOVE_SEA_BLOCKS = 300
|
||||
|
||||
@@ -55,7 +55,7 @@ const NOISE_HIGH = 0xffffff
|
||||
// Picks drawn by their noise keep some colour where the noise is low, so they still read as the pick.
|
||||
const DARKEST_PICK_SHADE = 0.3
|
||||
|
||||
/** The tile's pixels as RGBA, as {@code style} draws them (v3e MapTile.styledPixels). */
|
||||
/** The tile's pixels as RGBA, as {@code style} draws them. */
|
||||
export function stylePixels(tile: MapTile, style: TileStyle): Uint8ClampedArray<ArrayBuffer> {
|
||||
const { size } = tile
|
||||
const pixels = new Uint8ClampedArray(size * size * 4)
|
||||
|
||||
@@ -12,7 +12,7 @@ interface NoisePalette {
|
||||
stops: number[] | null
|
||||
}
|
||||
|
||||
/** v3e's noise palettes, each with the values it spans when the noise is not measured in blocks. */
|
||||
/** The noise palettes, each with the values it spans when the noise is not measured in blocks. */
|
||||
export const NOISE_PALETTES: readonly NoisePalette[] = [
|
||||
{ id: 'terrain', label: 'Terrain', minimum: 0, maximum: 1, stops: [0x071a2f, 0x155e75, 0x2a9d8f, 0xe9c46a, 0xf4f1de] },
|
||||
{ id: 'signed', label: 'Signed', minimum: -1, maximum: 1, stops: [0x173b66, 0x4f86c6, 0xe7edf3, 0xe89555, 0x9d3b35] },
|
||||
|
||||
@@ -7,7 +7,7 @@ import type { NoiseScale } from './noiseScale'
|
||||
const FLUID_BLOCKS = 0
|
||||
|
||||
/**
|
||||
* One tile of noise as terrain (v3e's 3D noise): noise measured in blocks stands at its own height with water at the
|
||||
* One tile of noise as terrain: noise measured in blocks stands at its own height with water at the
|
||||
* fluid; other noise rises from its scale's minimum to {@code reliefBlocks} at its maximum, with no water.
|
||||
*/
|
||||
export class NoiseTerrain implements TerrainSurface {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* The colour each tinted face of a block is multiplied with, as Minecraft's BlockColors give it (v3e
|
||||
* MinecraftBlockTints). Scenes stand in no biome, so the biome tints are the plains' colours.
|
||||
* The colour each tinted face of a block is multiplied with, as Minecraft's BlockColors give it.
|
||||
* Scenes stand in no biome, so the biome tints are the plains' colours.
|
||||
*/
|
||||
|
||||
const NO_TINT = 0xffffff
|
||||
|
||||
@@ -40,7 +40,7 @@ interface EntryBrowserProps {
|
||||
|
||||
type MenuTarget = { entry: string } | { folder: string } | null
|
||||
|
||||
/** A view's entries in a tree of their folders, with a search over keys, names and folders that opens every folder holding a match (v3e ObjectBrowser). */
|
||||
/** A view's entries in a tree of their folders, with a search over keys, names and folders that opens every folder holding a match. */
|
||||
export function EntryBrowser({ title, entries, current, onSelect, fileActions, className }: EntryBrowserProps): React.JSX.Element {
|
||||
const [search, setSearch] = useState('')
|
||||
const [menuTarget, setMenuTarget] = useState<MenuTarget>(null)
|
||||
|
||||
@@ -16,7 +16,7 @@ interface NoiseChartProps {
|
||||
|
||||
/**
|
||||
* One noise that picks regions or biomes: how its values in view spread over the bands that pick each option, and a
|
||||
* table of each option's share of the noise against its share of the ground in view (v3e NoisePickChart).
|
||||
* table of each option's share of the noise against its share of the ground in view.
|
||||
*/
|
||||
export function NoiseChart({ spread, optionNoun }: NoiseChartProps): React.JSX.Element {
|
||||
if (spread.rows.length === 1) {
|
||||
|
||||
@@ -41,7 +41,7 @@ interface NoiseStudioProps {
|
||||
tell(message: string): void
|
||||
}
|
||||
|
||||
/** The pack's noise and the built-in styles, from above or as terrain (v3e's noise explorer). */
|
||||
/** The pack's noise and the built-in styles, from above or as terrain. */
|
||||
export function NoiseStudio({ title, client, packRevision, onSummary, tell }: NoiseStudioProps): React.JSX.Element {
|
||||
const sources = useNoiseSources(client, packRevision, tell)
|
||||
const [chosenId, setChosenId] = useState<string | null>(null)
|
||||
|
||||
@@ -36,7 +36,7 @@ interface PatternStudioProps {
|
||||
tell(message: string): void
|
||||
}
|
||||
|
||||
/** A pattern view: its entries on the right, what the chosen one places from above in the middle (v3e palette explorer). */
|
||||
/** A pattern view: its entries on the right, what the chosen one places from above in the middle. */
|
||||
export function PatternStudio({ client, view, packRevision, onSummary, tell }: PatternStudioProps): React.JSX.Element {
|
||||
const entries = usePatternEntries(client, view.id, packRevision, tell)
|
||||
const [chosen, setChosen] = useState<{ key: string; depth: number } | null>(null)
|
||||
|
||||
@@ -28,7 +28,7 @@ interface PickInspectorProps {
|
||||
|
||||
/**
|
||||
* How noise picks the regions or biomes in view, measured against what is in view, with a switch for how the map
|
||||
* draws the picks (v3e PickInspectorPanel).
|
||||
* draws the picks.
|
||||
*/
|
||||
export function PickInspector({ title, inspection, display }: PickInspectorProps): React.JSX.Element {
|
||||
return (
|
||||
|
||||
@@ -14,7 +14,7 @@ interface RegionPreviewListProps {
|
||||
onSelect(regionKey: string | null): void
|
||||
}
|
||||
|
||||
/** The region view's regions, any of which can fill the map with its biomes, or all of them as they are (v3e RegionNavigator). */
|
||||
/** The region view's regions, any of which can fill the map with its biomes, or all of them as they are. */
|
||||
export function RegionPreviewList({ regions, current, onSelect }: RegionPreviewListProps): React.JSX.Element {
|
||||
const [search, setSearch] = useState('')
|
||||
const wanted = search.trim().toLowerCase()
|
||||
|
||||
@@ -37,7 +37,7 @@ interface SavedWorldStudioProps {
|
||||
tell(message: string): void
|
||||
}
|
||||
|
||||
/** A world as its region files hold it, in 3D, around the region nearest its origin (v3e's saved world explorer). */
|
||||
/** A world as its region files hold it, in 3D, around the region nearest its origin. */
|
||||
export function SavedWorldStudio({ title, client, world, onSummary, onProgress, tell }: SavedWorldStudioProps): React.JSX.Element {
|
||||
const worlds = useSavedWorlds(client, tell)
|
||||
const [chosenId, setChosenId] = useState<string | null>(null)
|
||||
|
||||
@@ -397,7 +397,7 @@ interface BlockListProps {
|
||||
onFarLeavesOnly(only: boolean): void
|
||||
}
|
||||
|
||||
/** The blocks of the scene, most used first, each with its count (v3e ObjectOverviewPanel), and how many leaves are too far from wood. */
|
||||
/** The blocks of the scene, most used first, each with its count, and how many leaves are too far from wood. */
|
||||
function BlockList({ scene, blocks, farLeavesOnly, onFarLeavesOnly }: BlockListProps): React.JSX.Element {
|
||||
const counts = useMemo(() => (scene === null ? [] : blockCounts(scene)), [scene])
|
||||
const farLeaves = useMemo(() => (scene === null ? 0 : countFarLeaves(scene)), [scene])
|
||||
|
||||
@@ -5,13 +5,13 @@ import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js'
|
||||
import type { SightView } from '../scene/cameraSight'
|
||||
import { surfaceAlong } from '../scene/surfacePick'
|
||||
|
||||
// Colours are worked out as Minecraft and v3e do, on the values a screen shows: a texture times its tint times the light
|
||||
// Colours are worked out as Minecraft does, on the values a screen shows: a texture times its tint times the light
|
||||
// on its face. Left to manage colours, three.js would take those values for linear light and encode them again, which
|
||||
// pales every colour and flattens the shading.
|
||||
ColorManagement.enabled = false
|
||||
|
||||
const FIELD_OF_VIEW_DEGREES = 45
|
||||
// Looking down at the scene from the south east, as v3e's object view opens.
|
||||
// Looking down at the scene from the south east.
|
||||
const VIEW_DIRECTION = new Vector3(1, 0.8, 1.2).normalize()
|
||||
const FRAMING_MARGIN = 1.15
|
||||
const NEAREST_CLIP = 0.05
|
||||
|
||||
@@ -5,7 +5,7 @@ import { Button } from '@/components/ui/button'
|
||||
import { ToggleGroup, ToggleGroupItem } from '@/components/ui/toggle-group'
|
||||
import { cn } from '@/lib/utils'
|
||||
|
||||
/** Where a view puts its own lists: under the views in the left island, as in v3e. */
|
||||
/** Where a view puts its own lists: under the views in the left island. */
|
||||
export const SidebarSlot = createContext<HTMLElement | null>(null)
|
||||
|
||||
/** A section of the left island under the views, filled by the view that is shown. */
|
||||
|
||||
@@ -16,7 +16,7 @@ interface StatusBarProps {
|
||||
|
||||
const NUMBER = new Intl.NumberFormat('en-US')
|
||||
|
||||
/** What the map shows, what it is busy with, and where the cursor is (v3e StudioStatusBar). */
|
||||
/** What the map shows, what it is busy with, and where the cursor is. */
|
||||
export function StatusBar({ viewLabel, status, notice, usage, progress }: StatusBarProps): React.JSX.Element {
|
||||
const drawing = status !== null && status.tilesReady < status.tilesTotal
|
||||
return (
|
||||
|
||||
@@ -52,7 +52,7 @@ interface WorldStudio3DProps {
|
||||
|
||||
/**
|
||||
* The terrain around where the map looked, in 3D and without an edge, coloured by biome, region or height, beside how
|
||||
* the noise picks the biomes or regions the camera sees, or how much of that ground lies at each height (v3e's 3D world view).
|
||||
* the noise picks the biomes or regions the camera sees, or how much of that ground lies at each height.
|
||||
*/
|
||||
export function WorldStudio3D({ title, client, world, mapArea, packRevision, onSummary, tell }: WorldStudio3DProps): React.JSX.Element {
|
||||
const [coloring, setColoring] = useState<MapTerrainColoring>('biomes')
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/** The studio's keys, as v3e's studio had them (StudioShortcut). */
|
||||
/** The studio's keys. */
|
||||
export type ShortcutAction =
|
||||
| 'nextView'
|
||||
| 'refresh'
|
||||
@@ -66,7 +66,7 @@ export const SHORTCUTS: ShortcutDefinition[] = [
|
||||
{ id: 'showAllNodes', label: 'Show every node', group: 'Node editor', chords: ['f', 'Home'] }
|
||||
]
|
||||
|
||||
/** The key of each view, as in v3e. */
|
||||
/** The key of each view. */
|
||||
const VIEW_KEYS: Record<string, Chord> = {
|
||||
biomes: '1',
|
||||
regions: '2',
|
||||
|
||||
Reference in new issue
Block a user