Skip to content

[p5.js 2.0+ Bug Report]: saveObj example code has small typo #8804

@ffd8

Description

@ffd8

Most appropriate sub-area of p5.js?

  • Accessibility
  • Color
  • Core/Environment/Rendering
  • Data
  • DOM
  • Events
  • Image
  • IO
  • Math
  • Typography
  • Utilities
  • WebGL
  • WebGPU
  • p5.strands
  • Build process
  • Unit testing
  • Internationalization
  • Friendly errors
  • Other (specify if possible)

p5.js version

2

Web browser and version

all

Operating system

all

Steps to reproduce this

Steps:

  1. Goto v2 beta saveObj references
  2. Try running example
  3. There's a code typo that keeps it from running.

Snippet:

// within the setup() function, the following example code:
myModel = buildGeometry(function()) {
    for (let i = 0; i < 5; i++) {
      push();
      translate(
        random(-75, 75),
        random(-75, 75),
        random(-75, 75)
      );
      sphere(random(5, 50));
      pop();
    }
  });

// Should be:
myModel = buildGeometry(function() {
    for (let i = 0; i < 5; i++) {
      push();
      translate(
        random(-75, 75),
        random(-75, 75),
        random(-75, 75)
      );
      sphere(random(5, 50));
      pop();
    }
  });

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions