verbose star types
This commit is contained in:
parent
748a2839c1
commit
38f9c76c9d
3 changed files with 3738 additions and 3677 deletions
File diff suppressed because one or more lines are too long
16
src/stars.ts
16
src/stars.ts
|
@ -12,6 +12,7 @@ import {
|
||||||
} from 'three'
|
} from 'three'
|
||||||
|
|
||||||
export interface StarData {
|
export interface StarData {
|
||||||
|
id: number
|
||||||
name: string
|
name: string
|
||||||
type: string
|
type: string
|
||||||
spectral: string
|
spectral: string
|
||||||
|
@ -135,6 +136,21 @@ export async function renderStars(maxRadius: number) {
|
||||||
const group = new Group()
|
const group = new Group()
|
||||||
const data: StarData[] = (await import('./stars.json')).default
|
const data: StarData[] = (await import('./stars.json')).default
|
||||||
|
|
||||||
|
const sol = new Star(
|
||||||
|
{
|
||||||
|
id: 0,
|
||||||
|
name: 'Sol',
|
||||||
|
type: 'White Dwarf',
|
||||||
|
spectral: 'G2V',
|
||||||
|
radius: 0.0,
|
||||||
|
phi: 0.0,
|
||||||
|
theta: 0.0,
|
||||||
|
},
|
||||||
|
maxRadius
|
||||||
|
)
|
||||||
|
|
||||||
|
group.add(sol) // lets not forget our beloved sun
|
||||||
|
|
||||||
data.forEach((starData) => {
|
data.forEach((starData) => {
|
||||||
if (starData.radius > maxRadius) return
|
if (starData.radius > maxRadius) return
|
||||||
const star = new Star(starData, maxRadius)
|
const star = new Star(starData, maxRadius)
|
||||||
|
|
Loading…
Add table
Reference in a new issue