-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Open
Description
Most appropriate sub-area of p5.js?
- Accessibility
- Color
- Core/Environment/Rendering
- Data
- DOM
- Events
- Image
- IO
- Math
- Typography
- Utilities
- WebGL
- Build process
- Unit testing
- Internationalization
- Friendly errors
- Other (specify if possible)
p5.js version
2.0.5
Web browser and version
Chrome
Operating system
Windows11
Steps to reproduce this
Steps:
- Create a model of the letter "H" using textToModel().
- No strokes are used, only fills and lighting.
- The appearance of the top and bottom by lighting doesn't look very clean.
Snippet:
let font;
let geom;
async function setup() {
createCanvas(400, 400, WEBGL);
// Using Source Serif for this example:
font = await loadFont('https://inaridarkfox4231.github.io/assets/fonts/SourceSerif4.ttf');
geom = font.textToModel("H", 320, 0, { sampleFactor: 2, extrude: 1 });
geom.clearColors();
geom.normalize();
}
function draw() {
background(0);
noStroke();
orbitControl();
fill("white");
noStroke();
ambientLight(128);
const s = TAU*frameCount/360;
const t = TAU*frameCount/240;
directionalLight(255,255,255,cos(s),sin(s)*cos(t),sin(s)*sin(t));
scale(min(width, height) / 300);
model(geom);
}

This is more of an aesthetic issue than a bug, so it may be inappropriate, but I thought I'd bring it up because it bothered me.
Metadata
Metadata
Assignees
Type
Projects
Status
No status