|
22 | 22 | "textured": { |
23 | 23 | "vs": "assets/shaders/textured.vert", |
24 | 24 | "fs": "assets/shaders/textured.frag" |
| 25 | + }, |
| 26 | + "lit": { |
| 27 | + "vs": "assets/shaders/lit.vert", |
| 28 | + "fs": "assets/shaders/lit.frag" |
25 | 29 | } |
26 | 30 | }, |
27 | 31 | "textures": { |
|
95 | 99 | "sampler": "default" |
96 | 100 | }, |
97 | 101 | "monkey": { |
98 | | - "type": "textured", |
99 | | - "shader": "textured", |
| 102 | + "type": "lit", |
| 103 | + "shader": "lit", |
100 | 104 | "pipelineState": { |
101 | 105 | "faceCulling": { |
102 | 106 | "enabled": false |
|
106 | 110 | } |
107 | 111 | }, |
108 | 112 | "tint": [1, 1, 1, 1], |
109 | | - "texture": "monkey", |
110 | | - "sampler": "default" |
| 113 | + "textureAlbedo": "monkey" |
111 | 114 | }, |
112 | 115 | "moon": { |
113 | 116 | "type": "textured", |
|
128 | 131 | }, |
129 | 132 | "world": [ |
130 | 133 | { |
131 | | - "position": [0, 1.7, 0], |
| 134 | + "position": [2, 1.7, 7], |
132 | 135 | "components": [ |
133 | 136 | { |
134 | 137 | "type": "Camera", |
|
145 | 148 | }, |
146 | 149 | { |
147 | 150 | "type": "Player" |
| 151 | + }, |
| 152 | + { |
| 153 | + "type": "light", |
| 154 | + "lightType": "spot", |
| 155 | + "color": [1, 1, 1], |
| 156 | + "attenuation": [1.0, 0.22, 0.2], |
| 157 | + "spotAngles": [2, 5] |
148 | 158 | } |
149 | 159 | ], |
150 | 160 | "children": [ |
|
175 | 185 | "material": "grass" |
176 | 186 | } |
177 | 187 | ] |
| 188 | + }, |
| 189 | + |
| 190 | + // { |
| 191 | + // "position": [-2, 0.5, -2], |
| 192 | + // "rotation": [-45, 0, 0], |
| 193 | + // "components": [ |
| 194 | + // { |
| 195 | + // "type": "light", |
| 196 | + // "lightType": "spot", |
| 197 | + // "color": [0.5, 0.5, 1], |
| 198 | + // "attenuation": [1, 0.09, 0.032], |
| 199 | + // "spotAngles": [12.5, 17.5] |
| 200 | + // } |
| 201 | + // ] |
| 202 | + // }, |
| 203 | + // { |
| 204 | + // "position": [-2, 2, -2], |
| 205 | + // "scale": [0.5, 0.5, 0.5], |
| 206 | + // "components": [ |
| 207 | + // { |
| 208 | + // "type": "light", |
| 209 | + // "lightType": "point", |
| 210 | + // "color": [1, 0.5, 0.5] |
| 211 | + // }, |
| 212 | + // { |
| 213 | + // "type": "Mesh Renderer", |
| 214 | + // "mesh": "sphere", |
| 215 | + // "material": "moon" |
| 216 | + // } |
| 217 | + // ] |
| 218 | + // }, |
| 219 | + // { |
| 220 | + // "position": [-2, 0.5, -2], |
| 221 | + // "components": [ |
| 222 | + // { |
| 223 | + // "type": "light", |
| 224 | + // "lightType": "directional", |
| 225 | + // "color": [0.2, 1, 0.2] |
| 226 | + // } |
| 227 | + // ] |
| 228 | + // }, |
| 229 | + { |
| 230 | + "position": [2, 1, -2], |
| 231 | + "scale": [5, 5, 5], |
| 232 | + "components": [ |
| 233 | + { |
| 234 | + "type": "Mesh Renderer", |
| 235 | + "mesh": "monkey", |
| 236 | + "material": "monkey" |
| 237 | + } |
| 238 | + ] |
178 | 239 | } |
179 | 240 | ] |
180 | 241 | } |
|
0 commit comments