Add dynamic shader generation
This commit is contained in:
parent
edd7d4836e
commit
4369cf1770
22 changed files with 300 additions and 124 deletions
|
|
@ -23,7 +23,7 @@ export class CircleLight extends GameObject {
|
|||
}
|
||||
|
||||
private draw(c: DrawCommand) {
|
||||
if (c.drawer.isOnScreen(this.boundingCircle)) {
|
||||
if (c.drawer.isPositionOnScreen(this.center)) {
|
||||
c.drawer.appendToUniformList('lights', {
|
||||
center: this.center,
|
||||
radius: this.radius,
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ export const createDungeon = (objects: ObjectContainer) => {
|
|||
new Tunnel(previousEnd, currentEnd, previousRadius, currentToRadius)
|
||||
);
|
||||
|
||||
if (deltaHeight > 0 && Math.random() > 0.5) {
|
||||
if (deltaHeight > 0 && Math.random() > 0.8) {
|
||||
objects.addObject(
|
||||
new CircleLight(
|
||||
currentEnd,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue