From bc7c67368e19df001e3318f3278a3183fdd80e93 Mon Sep 17 00:00:00 2001 From: schmelczerandras Date: Fri, 30 Oct 2020 23:06:19 +0100 Subject: [PATCH] Minor fixes --- src/drawables/empty-drawable.ts | 2 ++ src/drawables/lights/light-drawable.ts | 2 +- src/graphics/rendering/renderer/noise-renderer.ts | 9 ++++----- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/drawables/empty-drawable.ts b/src/drawables/empty-drawable.ts index 45a0170..8b3ba45 100644 --- a/src/drawables/empty-drawable.ts +++ b/src/drawables/empty-drawable.ts @@ -3,6 +3,8 @@ import { Drawable } from './drawable'; import { DrawableDescriptor } from './drawable-descriptor'; /** + * Required for specifying the correct TS types. + * * @internal */ export class EmptyDrawable extends Drawable { diff --git a/src/drawables/lights/light-drawable.ts b/src/drawables/lights/light-drawable.ts index 3fa1254..dfa75aa 100644 --- a/src/drawables/lights/light-drawable.ts +++ b/src/drawables/lights/light-drawable.ts @@ -2,7 +2,7 @@ import { mat2d, vec2, vec3 } from 'gl-matrix'; import { Drawable } from '../../main'; /** @internal */ -export class LightDrawable extends Drawable { +export abstract class LightDrawable extends Drawable { protected lightnessRatio = 1; constructor(public center: vec2, public color: vec3, public intensity: number) { diff --git a/src/graphics/rendering/renderer/noise-renderer.ts b/src/graphics/rendering/renderer/noise-renderer.ts index 54e0332..cc91c6f 100644 --- a/src/graphics/rendering/renderer/noise-renderer.ts +++ b/src/graphics/rendering/renderer/noise-renderer.ts @@ -9,13 +9,13 @@ import randomVertex from '../shaders/random-vs.glsl'; /** * Create a renderer, draw a 2D noise texture with it, - * then destroy the used resources, while returning the generated texture - * in the form of a canvas. + * then destroy the used resources, + * while returning the generated texture in the form of a canvas. * - * @param textureSize The resolution of the end result. + * @param textureSize The resolution of the end result * @param scale A starting value can be 15 * @param amplitude A starting value can be 1 - * @param ignoreWebGL2 Ignore WebGL2, even when its available. + * @param ignoreWebGL2 Ignore WebGL2, even when it's available */ export const renderNoise = async ( textureSize: vec2, @@ -39,7 +39,6 @@ export const renderNoise = async ( await compiler.compilePrograms(); await pogramPromise; - program.bind(); program.draw({ scale, amplitude,