Skip to content

Commit

Permalink
Convert p5.Texture to use new module syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
limzykenneth committed Oct 8, 2024
1 parent 3b75c5d commit b495434
Show file tree
Hide file tree
Showing 4 changed files with 452 additions and 459 deletions.
15 changes: 2 additions & 13 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions src/webgl/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import framebuffer from './p5.Framebuffer';
import dataArray from './p5.DataArray';
import shader from './p5.Shader';
import camera from './p5.Camera';
import texture from './p5.Texture';

export default function(p5){
primitives3D(p5, p5.prototype);
Expand All @@ -28,4 +29,5 @@ export default function(p5){
framebuffer(p5, p5.prototype);
dataArray(p5, p5.prototype);
shader(p5, p5.prototype);
texture(p5, p5.prototype);
}
3 changes: 1 addition & 2 deletions src/webgl/p5.RendererGL.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import * as constants from '../core/constants';
import GeometryBuilder from './GeometryBuilder';
import libtess from 'libtess'; // Fixed with exporting module from libtess
import Renderer from '../core/p5.Renderer';
import { MipmapTexture } from './p5.Texture';

const STROKE_CAP_ENUM = {};
const STROKE_JOIN_ENUM = {};
Expand Down Expand Up @@ -2104,7 +2103,7 @@ p5.RendererGL = class RendererGL extends Renderer {
}
// Free the Framebuffer
framebuffer.remove();
tex = new MipmapTexture(this, levels, {});
tex = new p5.MipmapTexture(this, levels, {});
this.specularTextures.set(input, tex);
return tex;
}
Expand Down
Loading

0 comments on commit b495434

Please sign in to comment.