Add uniform for lights
This commit is contained in:
parent
e6782a9a98
commit
d336bee1ba
1 changed files with 218 additions and 116 deletions
12
frontend/src/scripts/objects/world/create-character.ts
Normal file
12
frontend/src/scripts/objects/world/create-character.ts
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
import { vec3 } from 'gl-matrix';
|
||||
import { ObjectContainer } from '../object-container';
|
||||
import { Camera } from '../types/camera';
|
||||
import { Character } from '../types/character';
|
||||
import { CursorLight } from '../types/cursor-light';
|
||||
|
||||
export const createCharacter = (objects: ObjectContainer) => {
|
||||
const camera = new Camera();
|
||||
objects.addObject(camera);
|
||||
objects.addObject(new Character(camera));
|
||||
objects.addObject(new CursorLight(40, vec3.fromValues(0.67, 0.67, 0.33)));
|
||||
};
|
||||
Loading…
Reference in a new issue