Alternative RENDER Input Formats

From ZCubes Wiki
Jump to navigation Jump to search

RENDER - ALTERNATIVE DATA INPUT FORMATS

Consider this example of RENDER to draw two circles.

RENDER(
   [
      ["type","size"],
      ["circle",100],
      ["circle",200]
   ]
)

This can be provided in object representations or as vertical arrays as given below.

RENDER(
	[
	   {
		   type:"circle",
		   size:100		   
	   },
	   {
		   type:"circle",
		   size:200		   
	   }
	]
);
""

If attributes are given as array, please ensure count is given so that both circles are drawn correctly.


RENDER(
	   {
		   type:"circle",
		   size:[100,200],
		   count:2			   
	   }
);
""

and this will also work

RENDER(
	   {
		   type:["circle","circle"],
		   size:[100,200],
		   count:2				   
	   }
);
""


Arrays can be provided in vertical format also.

RENDER(
   [
      ["type","circle","circle"],
      ["size",100, 200]
   ]
)