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
Increases or decreases the size of a shape by expanding and contracting vertices. Shapes always scale from the relative origin of their bounding box. Scale values are specified as decimal percentages. For example, the method call <b>scale(2.0)</b> increases the dimension of a shape by 200%. Subsequent calls to the method multiply the effect. For example, calling <b>scale(2.0)</b> and then <b>scale(1.5)</b> is the same as <b>scale(3.0)</b>. This transformation is applied directly to the shape; it's not refreshed each time <b>draw()</b> is run.
<br /><br />
Using this method with the <b>z</b> parameter requires using the P3D parameter in combination with size.
]]></description>
<syntax>
<c>sh</c>.scale(<c>s</c>)
<c>sh</c>.scale(<c>x</c>, <c>y</c>)
<c>sh</c>.scale(<c>x</c>, <c>y</c>, <c>z</c>)
</syntax>
<parameter>
<label>sh</label>
<description><![CDATA[PShape: any variable of type PShape]]></description>
</parameter>
<parameter>
<label>s</label>
<description><![CDATA[float: percentate to scale the object]]></description>
</parameter>
<parameter>
<label>x</label>
<description><![CDATA[float: percentage to scale the object in the x-axis]]></description>
</parameter>
<parameter>
<label>y</label>
<description><![CDATA[float: percentage to scale the object in the y-axis]]></description>
</parameter>
<parameter>
<label>z</label>
<description><![CDATA[ifloat: percentage to scale the object in the z-axis]]></description>