Skip to content

Commit

Permalink
chore: migrate models to typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
emre-aki committed Aug 24, 2023
1 parent f1d2fa4 commit e335ee0
Show file tree
Hide file tree
Showing 16 changed files with 104 additions and 104 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* d_artisans-hub.js
* d_artisans-hub.ts
* tmp3d
*
* Created by Emre Akı on 2022-09-12.
Expand All @@ -8,9 +8,9 @@
* The initial 3-D geometry data and their respective UV mappings.
*/

(function ()
(function (): void
{
function D_Vertices ()
function D_Vertices (): pvec3_t[]
{
return [
[-39.394119, 14.65709, -177.590027],
Expand Down Expand Up @@ -5165,7 +5165,7 @@
];
}

function D_UV ()
function D_UV (): pvec2_t[]
{
return [
[0.74998, 0.24995999999999996],
Expand Down Expand Up @@ -23179,7 +23179,7 @@
];
}

function D_Triangles ()
function D_Triangles (): pvec3_t[]
{
return [
[1, 3, 0],
Expand Down Expand Up @@ -32922,7 +32922,7 @@
];
}

function D_UVMap ()
function D_UVMap (): uvface_t[]
{
return [
[0, 1, 2, "Material.001"],
Expand Down Expand Up @@ -42665,7 +42665,7 @@
];
}

function D_TextureAtlas ()
function D_TextureAtlas (): { [textureId: string]: string }
{
return {
"Material.001": "models/spyro/High.png"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* d_crashbandicoot.js
* d_crashbandicoot.ts
* tmp3d
*
* Created by Emre Akı on 2022-07-09.
Expand All @@ -10,7 +10,7 @@

(function ()
{
function D_Vertices ()
function D_Vertices (): pvec3_t[]
{
return [
[-1.8, -2.1, -2.1],
Expand Down Expand Up @@ -395,7 +395,7 @@
];
}

function D_UV ()
function D_UV (): pvec2_t[]
{
return [
[0.5935, 0.4317],
Expand Down Expand Up @@ -1211,7 +1211,7 @@
];
}

function D_Triangles ()
function D_Triangles (): pvec3_t[]
{
return [
[0, 1, 2],
Expand Down Expand Up @@ -1949,7 +1949,7 @@
];
}

function D_UVMap ()
function D_UVMap (): uvface_t[]
{
return [
[0, 1, 2, "shoes"],
Expand Down Expand Up @@ -2687,7 +2687,7 @@
];
}

function D_TextureAtlas ()
function D_TextureAtlas (): { [textureId: string]: string }
{
return {
"shoes": "models/crash/shoes.png",
Expand Down
12 changes: 6 additions & 6 deletions src/data/mesh/d_cube.js → src/data/mesh/d_cube.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* d_cube.js
* d_cube.ts
* tmp3d
*
* Created by Emre Akı on 2022-07-08.
Expand All @@ -10,7 +10,7 @@

(function ()
{
function D_Vertices ()
function D_Vertices (): pvec3_t[]
{
return [
[-10, -10, -10],
Expand All @@ -24,7 +24,7 @@
];
}

function D_UV ()
function D_UV (): pvec2_t[]
{
return [
[0, 0],
Expand All @@ -34,7 +34,7 @@
];
}

function D_Triangles ()
function D_Triangles (): pvec3_t[]
{
return [
[0, 3, 1],
Expand All @@ -52,7 +52,7 @@
];
}

function D_UVMap ()
function D_UVMap (): uvface_t[]
{
return [
[0, 1, 2, "wood"],
Expand All @@ -70,7 +70,7 @@
];
}

function D_TextureAtlas ()
function D_TextureAtlas (): { [textureId: string]: string }
{
return {
"wood": "models/tmp3dcube/wood.png"
Expand Down
12 changes: 6 additions & 6 deletions src/data/mesh/d_daxter.js → src/data/mesh/d_daxter.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* d_daxter.js
* d_daxter.ts
* tmp3d
*
* Created by Emre Akı on 2022-07-08.
Expand All @@ -10,7 +10,7 @@

(function ()
{
function D_Vertices ()
function D_Vertices (): pvec3_t[]
{
return [
[-1.5115999999999998, -0.0965, -0.44580000000000003],
Expand Down Expand Up @@ -966,7 +966,7 @@
];
}

function D_UV ()
function D_UV (): pvec2_t[]
{
return [
[0.523438, 0.5],
Expand Down Expand Up @@ -1617,7 +1617,7 @@
];
}

function D_Triangles ()
function D_Triangles (): pvec3_t[]
{
return [
[0, 1, 2],
Expand Down Expand Up @@ -2997,7 +2997,7 @@
];
}

function D_UVMap ()
function D_UVMap (): uvface_t[]
{
return [
[0, 1, 2, "material3489_Imag.017_Fur2.png"],
Expand Down Expand Up @@ -4377,7 +4377,7 @@
];
}

function D_TextureAtlas ()
function D_TextureAtlas (): { [textureId: string]: string }
{
return {
"material3489_Imag.016_Cloth.png": "models/daxter/Textures/Cloth.png",
Expand Down
12 changes: 6 additions & 6 deletions src/data/mesh/d_doom-e1m1.js → src/data/mesh/d_doom-e1m1.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* d_doom-e1m1.js
* d_doom-e1m1.ts
* tmp3d
*
* Created by Emre Akı on 2022-09-14.
Expand All @@ -10,7 +10,7 @@

(function ()
{
function D_Vertices ()
function D_Vertices (): pvec3_t[]
{
return [
[-198.4, -2.4000595000000002, 364.8],
Expand Down Expand Up @@ -1120,7 +1120,7 @@
];
}

function D_UV ()
function D_UV (): pvec2_t[]
{
return [
[2, 1],
Expand Down Expand Up @@ -4079,7 +4079,7 @@
];
}

function D_Triangles ()
function D_Triangles (): pvec3_t[]
{
return [
[1, 3, 0],
Expand Down Expand Up @@ -5877,7 +5877,7 @@
];
}

function D_UVMap ()
function D_UVMap (): uvface_t[]
{
return [
[0, 1, 2, "BROWN144"],
Expand Down Expand Up @@ -7675,7 +7675,7 @@
];
}

function D_TextureAtlas ()
function D_TextureAtlas (): { [textureId: string]: string }
{
return {
"BIGDOOR2": "models/doom/BIGDOOR2.PNG",
Expand Down
12 changes: 6 additions & 6 deletions src/data/mesh/d_jak.js → src/data/mesh/d_jak.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* d_jak.js
* d_jak.ts
* tmp3d
*
* Created by Emre Akı on 2022-07-31.
Expand All @@ -10,7 +10,7 @@

(function ()
{
function D_Vertices ()
function D_Vertices (): pvec3_t[]
{
return [
[0.6819, -22.79345, -0.3985],
Expand Down Expand Up @@ -10488,7 +10488,7 @@
];
}

function D_UV ()
function D_UV (): pvec2_t[]
{
return [
[-0.2797, 0.6162000000000001],
Expand Down Expand Up @@ -16390,7 +16390,7 @@
];
}

function D_Triangles ()
function D_Triangles (): pvec3_t[]
{
return [
[1, 2, 0],
Expand Down Expand Up @@ -30650,7 +30650,7 @@
];
}

function D_UVMap ()
function D_UVMap (): uvface_t[]
{
return [
[0, 1, 2, "Material__156"],
Expand Down Expand Up @@ -44910,7 +44910,7 @@
];
}

function D_TextureAtlas ()
function D_TextureAtlas (): { [textureId: string]: string }
{
return {
"Material__156": "models/jak3/scarf.png",
Expand Down
12 changes: 6 additions & 6 deletions src/data/mesh/d_lara.js → src/data/mesh/d_lara.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* d_lara.js
* d_lara.ts
* tmp3d
*
* Created by Emre Akı on 2022-07-08.
Expand All @@ -10,7 +10,7 @@

(function ()
{
function D_Vertices ()
function D_Vertices (): pvec3_t[]
{
return [
[-4.3, -5.6000000000000005, 1.59999],
Expand Down Expand Up @@ -2188,7 +2188,7 @@
];
}

function D_UV ()
function D_UV (): pvec2_t[]
{
return [
[0.882353, 0.492147],
Expand Down Expand Up @@ -4366,7 +4366,7 @@
];
}

function D_Triangles ()
function D_Triangles (): pvec3_t[]
{
return [
[0, 1, 2],
Expand Down Expand Up @@ -5096,7 +5096,7 @@
];
}

function D_UVMap ()
function D_UVMap (): uvface_t[]
{
return [
[0, 1, 2, "tile0"],
Expand Down Expand Up @@ -5826,7 +5826,7 @@
];
}

function D_TextureAtlas ()
function D_TextureAtlas (): { [textureId: string]: string }
{
return {
"tile0": "models/lara/Lara.png",
Expand Down
Loading

0 comments on commit e335ee0

Please sign in to comment.