You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/** * @class * @name pc.Vec3 * @classdesc A 3-dimensional vector. * @description Creates a new Vec3 object. * @param {number|number[]} [x] - The x value. If x is an array of length 3, the array will be used to populate all components. * @param {number} [y] - The y value. * @param {number} [z] - The z value. * @example * var v = new pc.Vec3(1, 2, 3); */functionVec3(x,y,z){if(x&&x.length===3){this.x=x[0];this.y=x[1];this.z=x[2];}else{this.x=x||0;this.y=y||0;this.z=z||0;}}
This allows TypeScript/VSCode to deduce all types for near-perfect type checking/autocompletion
The text was updated successfully, but these errors were encountered:
Simple example from PlayCanvas:
This allows TypeScript/VSCode to deduce all types for near-perfect type checking/autocompletion
The text was updated successfully, but these errors were encountered: