Update colors
This commit is contained in:
parent
4ef6922da8
commit
9aef368324
2 changed files with 36 additions and 45 deletions
|
|
@ -1,12 +1,18 @@
|
|||
import { vec3 } from 'gl-matrix';
|
||||
import { vec2, 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';
|
||||
import { CircleLight } from '../types/circle-light';
|
||||
|
||||
export const createCharacter = (objects: ObjectContainer) => {
|
||||
const camera = new Camera();
|
||||
const light = new CircleLight(
|
||||
vec2.create(),
|
||||
40,
|
||||
vec3.fromValues(0.67, 0.0, 0.33)
|
||||
);
|
||||
|
||||
const camera = new Camera(light);
|
||||
objects.addObject(light);
|
||||
objects.addObject(camera);
|
||||
objects.addObject(new Character(camera));
|
||||
objects.addObject(new CursorLight(40, vec3.fromValues(0.67, 0.67, 0.33)));
|
||||
};
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ export const createDungeon = (objects: ObjectContainer) => {
|
|||
Math.random() * 20 + 30,
|
||||
vec3.scale(
|
||||
vec3.create(),
|
||||
vec3.normalize(vec3.create(), vec3.random(vec3.create())),
|
||||
vec3.normalize(vec3.create(), vec3.fromValues(0.5, 0.1, 0.8)),
|
||||
Math.random() * 0.5 + 0.5
|
||||
)
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue