Skip to content

Commit 2ca9be6

Browse files
authored
Clarify createVector usage in deprecation warning
1 parent 9aa2677 commit 2ca9be6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/math/math.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ function math(p5, fn) {
102102
fn.createVector = function (x, y, z) {
103103
if (arguments.length === 0) {
104104
p5._friendlyError(
105-
'Calling createVector() with no arguments is deprecated and will be removed in a future release. Pass zeros for the desired dimensionality.'
105+
'In 1.x, createVector() was a shortcut for createVector(0, 0, 0). In 2.x, p5.js has vectors of any dimension, so you must provide your desired number of zeros. Use createVector(0, 0) for a 2D vector and createVector(0, 0, 0) for a 3D vector.'
106106
);
107107
}
108108
if (this instanceof p5) {

0 commit comments

Comments
 (0)