Monday, February 27, 2012

Quantum Squiggle 2 - QSquiggle Constructor

It's all "back end" stuff, but I made a constructor for KineticJS to create a general bezier regular shape. I should really include an epilepsy warning. Link to Quantum Squiggle Demo #2

Shape can be created with:

var squiggle = new Kinetic.QSquiggle({
x: stage.width / 2,
y: stage.height / 2,
points: 10,
innerRadius: 150,
outerRadius: 250,
fill: "yellow",
stroke: "black",
strokeWidth: 3
});
//Access this shape like a typical object!
squiggle.fill = "blue";
Here's a Demo using QSquiggle.

No comments:

Post a Comment