Alternative RENDER Input Formats

From ZCubes Wiki
Revision as of 09:46, 2 January 2021 by Joseph (talk | contribs) (Created page with "=RENDER - ALTERNATIVE DATA INPUT FORMATS= Consider this example of RENDER to draw two circles. <pre> RENDER( [ ["type","size"], ["circle",100], ["circle"...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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]
   ]
)