Skip to content

Commit

Permalink
Merge branch 'dev-2.0' into Vector-nd
Browse files Browse the repository at this point in the history
  • Loading branch information
holomorfo committed Nov 7, 2024
2 parents 1501e20 + b66247f commit c427317
Show file tree
Hide file tree
Showing 16 changed files with 2,200 additions and 2,204 deletions.
8 changes: 8 additions & 0 deletions preview/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,12 @@
import p5 from '../src/app.js';

const sketch = function (p) {
let g, f;

p.setup = function () {
p.createCanvas(200, 200);
g = p.createGraphics(200, 200);
f = p.createGraphics(200, 200, p.WEBGL);
};

p.draw = function () {
Expand All @@ -31,6 +35,10 @@
p.fill('white');
p.textSize(30);
p.text('hello', 10, 30);

// f.fill('red');
f.sphere();
p.image(f, 0, 0);
};
};

Expand Down
3 changes: 0 additions & 3 deletions src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ import './core/friendly_errors/validate_params';
import './core/friendly_errors/file_errors';
import './core/friendly_errors/fes_core';
import './core/friendly_errors/sketch_reader';
import './core/p5.Element';
// import './core/p5.Graphics';
// import './core/rendering';
import shape from './shape';
shape(p5);

Expand Down
4 changes: 2 additions & 2 deletions src/core/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ import rendering from './rendering';
import renderer from './p5.Renderer';
import renderer2D from './p5.Renderer2D';
import graphics from './p5.Graphics';
import element from './p5.Element';
// import element from './p5.Element';

p5.registerAddon(transform);
p5.registerAddon(structure);
Expand All @@ -675,6 +675,6 @@ p5.registerAddon(rendering);
p5.registerAddon(renderer);
p5.registerAddon(renderer2D);
p5.registerAddon(graphics);
p5.registerAddon(element);
// p5.registerAddon(element);

export default p5;
Loading

0 comments on commit c427317

Please sign in to comment.