-
Notifications
You must be signed in to change notification settings - Fork 64
Expand file tree
/
Copy pathHome.tsx
More file actions
168 lines (164 loc) ยท 3.36 KB
/
Copy pathHome.tsx
File metadata and controls
168 lines (164 loc) ยท 3.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
import * as React from "react";
import { Platform, ScrollView, StyleSheet, Text, View } from "react-native";
import { useNavigation } from "@react-navigation/native";
import { RectButton } from "react-native-gesture-handler";
import type { StackNavigationProp } from "@react-navigation/stack";
import type { Routes } from "./Route";
export const examples = [
{
screen: "Tests",
title: "๐งช E2E Tests",
},
{
screen: "HelloTriangle",
title: "๐บ Hello Triangle",
},
{
screen: "HelloTriangleMSAA",
title: "๐บ Hello Triangle MSAA",
},
{
screen: "Reanimated",
title: "๐ Reanimated",
},
// {
// screen: "ComputeToys",
// title: "๐งฎ Compute Toys",
// },
{
screen: "ThreeJS",
title: "โ๏ธ Three.js",
},
{
screen: "Tensorflow",
title: "๐ค tensorflow.js",
},
{
screen: "Cube",
title: "๐ง Cube",
},
// {
// screen: "CanvasAPI",
// title: "๐งฉ Canvas API",
// },
{
screen: "Cubemap",
title: "๐ Cubemap",
},
{
screen: "InstancedCube",
title: "๐ฒ Instanced Cube",
},
{
screen: "TexturedCube",
title: "๐ฅท Textured Cube",
},
{
screen: "FractalCube",
title: "โ๏ธ Fractal Cube",
},
{
screen: "Particles",
title: "๐ Particles",
},
{
screen: "RenderBundles",
title: "๐ช Render Bundles",
},
{
screen: "OcclusionQuery",
title: "๐ฉ Occlusion Query",
},
{
screen: "ReversedZ",
title: "๐ฅ Reversed Z",
},
{
screen: "ComputeBoids",
title: "๐ฆโโฌ Compute Boids",
},
{
screen: "MNISTInference",
title: "1๏ธโฃ MNIST Inference",
},
...(Platform.OS !== "ios"
? ([
{
screen: "ShadowMapping",
title: "๐ฒ Shadow Mapping",
},
{
screen: "SamplerParameters",
title: "๐ Sampler Parameters",
},
] as const)
: []),
{
screen: "DeferedRendering",
title: "๐ฆ Deferred Rendeering",
},
{
screen: "ABuffer",
title: "๐ซ A-Buffer",
},
{
screen: "Wireframe",
title: "๐งฌ Wireframe",
},
{
screen: "Resize",
title: "โ๏ธ Resize",
},
{
screen: "GradientTiles",
title: "๐ Gradient Tiles",
},
{
screen: "AsyncStarvation",
title: "โ ๏ธ Async Runner Starvation",
},
{
screen: "DeviceLostHang",
title: "โ ๏ธ Device Lost Hang",
},
{
screen: "StorageBufferVertices",
title: "๐พ Storage Buffer Vertices",
},
{
screen: "HDR",
title: "๐ HDR Canvas",
},
];
const styles = StyleSheet.create({
container: {
flex: 1,
},
content: {
marginBottom: 32,
},
thumbnail: {
backgroundColor: "white",
padding: 32,
borderBottomWidth: StyleSheet.hairlineWidth,
},
title: {},
});
export const Home = () => {
const { navigate } = useNavigation<StackNavigationProp<Routes, "Home">>();
return (
<ScrollView style={styles.container} contentContainerStyle={styles.content}>
{examples.map((thumbnail) => (
<RectButton
key={thumbnail.screen}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
onPress={() => navigate(thumbnail.screen as any)}
>
<View style={styles.thumbnail}>
<Text style={styles.title}>{thumbnail.title}</Text>
</View>
</RectButton>
))}
</ScrollView>
);
};