Fabric.js Text objectCaching Property
In this article, we are going to see how to change the objectCaching of the text canvas using Fabric.js. The canvas means the text written is movable, rotatable, resizable, and can be stretched. Further, the text itself cannot be edited like a textbox.
fabric.Text(text, objectCaching :Boolean );
Parameters: This property accepts one parameter as mentioned above and described below:
- objectCaching : When it is set to true, the object is cached on an additional canvas. When set to false, then the object is not cached unless necessary (clipPath). The default value is true.
Below is the example that illustrates the use of objectCaching property in Fabric.js: