Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions src/core/math/color.js
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,22 @@ class Color {
return s;
}

/**
* @overload
* @param {number[]} [arr] - The array to populate with the color's number
* components. If not specified, a new array is created.
* @param {number} [offset] - The zero-based index at which to start copying elements to the
* array. Default is 0.
* @returns {number[]} The color as an array.
*/
/**
* @overload
* @param {ArrayBufferView} arr - The array to populate with the color's number
* components. If not specified, a new array is created.
* @param {number} [offset] - The zero-based index at which to start copying elements to the
* array. Default is 0.
* @returns {ArrayBufferView} The color as an array.
*/
/**
* Converts the color to an array.
*
Expand Down
16 changes: 16 additions & 0 deletions src/core/math/quat.js
Original file line number Diff line number Diff line change
Expand Up @@ -816,6 +816,22 @@ class Quat {
return `[${this.x}, ${this.y}, ${this.z}, ${this.w}]`;
}

/**
* @overload
* @param {number[]} [arr] - The array to populate with the quaternion's number
* components. If not specified, a new array is created.
* @param {number} [offset] - The zero-based index at which to start copying elements to the
* array. Default is 0.
* @returns {number[]} The quaternion as an array.
*/
/**
* @overload
* @param {ArrayBufferView} arr - The array to populate with the quaternion's number
* components. If not specified, a new array is created.
* @param {number} [offset] - The zero-based index at which to start copying elements to the
* array. Default is 0.
* @returns {ArrayBufferView} The quaternion as an array.
*/
/**
* Converts the quaternion to an array.
*
Expand Down
16 changes: 16 additions & 0 deletions src/core/math/vec2.js
Original file line number Diff line number Diff line change
Expand Up @@ -688,6 +688,22 @@ class Vec2 {
return `[${this.x}, ${this.y}]`;
}

/**
* @overload
* @param {number[]} [arr] - The array to populate with the vector's number
* components. If not specified, a new array is created.
* @param {number} [offset] - The zero-based index at which to start copying elements to the
* array. Default is 0.
* @returns {number[]} The vector as an array.
*/
/**
* @overload
* @param {ArrayBufferView} arr - The array to populate with the vector's number
* components. If not specified, a new array is created.
* @param {number} [offset] - The zero-based index at which to start copying elements to the
* array. Default is 0.
* @returns {ArrayBufferView} The vector as an array.
*/
/**
* Converts the vector to an array.
*
Expand Down
16 changes: 16 additions & 0 deletions src/core/math/vec3.js
Original file line number Diff line number Diff line change
Expand Up @@ -707,6 +707,22 @@ class Vec3 {
return `[${this.x}, ${this.y}, ${this.z}]`;
}

/**
* @overload
* @param {number[]} [arr] - The array to populate with the vector's number
* components. If not specified, a new array is created.
* @param {number} [offset] - The zero-based index at which to start copying elements to the
* array. Default is 0.
* @returns {number[]} The vector as an array.
*/
/**
* @overload
* @param {ArrayBufferView} arr - The array to populate with the vector's number
* components. If not specified, a new array is created.
* @param {number} [offset] - The zero-based index at which to start copying elements to the
* array. Default is 0.
* @returns {ArrayBufferView} The vector as an array.
*/
/**
* Converts the vector to an array.
*
Expand Down
16 changes: 16 additions & 0 deletions src/core/math/vec4.js
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,22 @@ class Vec4 {
return `[${this.x}, ${this.y}, ${this.z}, ${this.w}]`;
}

/**
* @overload
* @param {number[]} [arr] - The array to populate with the vector's number
* components. If not specified, a new array is created.
* @param {number} [offset] - The zero-based index at which to start copying elements to the
* array. Default is 0.
* @returns {number[]} The vector as an array.
*/
/**
* @overload
* @param {ArrayBufferView} arr - The array to populate with the vector's number
* components. If not specified, a new array is created.
* @param {number} [offset] - The zero-based index at which to start copying elements to the
* array. Default is 0.
* @returns {ArrayBufferView} The vector as an array.
*/
/**
* Converts the vector to an array.
*
Expand Down