Skip to content

Commit b495434

Browse files
committed
Convert p5.Texture to use new module syntax
1 parent 3b75c5d commit b495434

File tree

4 files changed

+452
-459
lines changed

4 files changed

+452
-459
lines changed

package-lock.json

Lines changed: 2 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/webgl/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import framebuffer from './p5.Framebuffer';
1212
import dataArray from './p5.DataArray';
1313
import shader from './p5.Shader';
1414
import camera from './p5.Camera';
15+
import texture from './p5.Texture';
1516

1617
export default function(p5){
1718
primitives3D(p5, p5.prototype);
@@ -28,4 +29,5 @@ export default function(p5){
2829
framebuffer(p5, p5.prototype);
2930
dataArray(p5, p5.prototype);
3031
shader(p5, p5.prototype);
32+
texture(p5, p5.prototype);
3133
}

src/webgl/p5.RendererGL.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import * as constants from '../core/constants';
33
import GeometryBuilder from './GeometryBuilder';
44
import libtess from 'libtess'; // Fixed with exporting module from libtess
55
import Renderer from '../core/p5.Renderer';
6-
import { MipmapTexture } from './p5.Texture';
76

87
const STROKE_CAP_ENUM = {};
98
const STROKE_JOIN_ENUM = {};
@@ -2104,7 +2103,7 @@ p5.RendererGL = class RendererGL extends Renderer {
21042103
}
21052104
// Free the Framebuffer
21062105
framebuffer.remove();
2107-
tex = new MipmapTexture(this, levels, {});
2106+
tex = new p5.MipmapTexture(this, levels, {});
21082107
this.specularTextures.set(input, tex);
21092108
return tex;
21102109
}

0 commit comments

Comments
 (0)