Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix: allow single-arg atan() outside strands; add visual test#8095

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed

Conversation

@Abhayaj247
Copy link

Resolves#8092

  • The single-argumentatan(x) was incorrectly treated as GLSL-only in strands, causing a friendly error and returning undefined when called outside a shader. This mirrors thenoise() override issue fixed inFix noise() getting overridden; add tests #8036.
  • The fix marks the 1-arg overload as a normal p5 function while keeping the 2-arg GLSL overloadatan(y, x) strands-only.

Changes :

  • src/webgl/ShaderGenerator.js

    • InbuiltInGLSLFunctions, set:
      • atan single-arg overload:isp5Function: true
      • atan two-arg overload: remainsisp5Function: false
  • test/unit/visual/cases/math.js

    • Addatan_outside_strands visual integration test that draws the value ofatan(0.5) to ensure it evaluates and no friendly error is triggered.
  • test/unit/spec.js

    • Include the new visual test suite entryvisual/cases/math.

Screenshots of the change :

  • Visual test creates baseline showing text like “atan(0.5) ≈ 0.464”; subsequent runs match the baseline.
000

PR Checklist

  • npm run lint passes
  • Inline reference is included / updated (function behavior unchanged; no reference edits needed)
  • Unit tests are included / updated (added visual/integration test)

@Abhayaj247Abhayaj247 deleted the fix/atan-strands branchSeptember 17, 2025 08:20
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

@Abhayaj247

[8]ページ先頭

©2009-2025 Movatter.jp