processing/p5.js

[p5.js 2.0 Bug Report]: Warnings about omitting strokes on high-detail 3D primitives don't use FES

オープン

#8,387 opened on 2026/01/07

 (16 件のコメント) (0 件のリアクション) (1 人の担当者)JavaScript (3,178 件のフォーク)batch import
Area:WebGLGood First IssueHelp Wantedp5.js 2.0+

Repository metrics

Stars
 (20,784 個のスター)
PR merge metrics
 (PR metrics pending)

説明

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

All

Web browser and version

All

Operating system

All

Steps to reproduce this

Steps:

  1. Turn off FES
  2. Draw a cylinder with a high level of detail
  3. It still logs a warning

That's because these sorts of warnings are raw console.logs in the codebase: https://github.com/processing/p5.js/blob/9799eada451dea7f2b50fe5f52ffd725463b343a/src/webgl/3d_primitives.js#L2582-L2585

Snippet:

p5.disableFriendlyErrors = true
function setup() {
  createCanvas(400, 400, WEBGL);
  cylinder(20, 100, 40, 40)
}

Additionally, this also triggers when you are drawing to a p5.Geometry, i.e.:

function setup() {
  createCanvas(400, 400, WEBGL);
  const myGeom = buildGeometry(() => cylinder(20, 100, 40, 40))
  noStroke()
  model(geom)
}

Arguably we should just silence this error if inside of buildGeometry since we don't know if it will eventually be drawn with strokes or not, to avoid misleading false positives.

コントリビューターガイド