We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In other languages, if I wanted to draw a star, say, I'd have something like this:
startShape(); for (i = 0; i < numPoints; i++) { angleR = TAU/numPoints * i; angler = TAU/numPoints * (i + 0.5); vertex(bigRadius * cos(angleR), bigRadius * sin(angleR)); vertex(smallRadius * cos(angler), smallRadius * sin(angler)); } endShape();
Can I do something similar in zdog? If so, I can't work out how, nor can I work out how to pass a variable to the path command.
var x1 = Math.random(-50, 50); var y1 = Math.random(-50, 50); var z1 = Math.random(-50, 50); var x2 = Math.random(-50, 50); var y2 = Math.random(-50, 50); var z2 = Math.random(-50, 50); new Zdog.Shape({ ... path: [ { x: x1, y: y1, z: z1 }, { x: x2, y: y2, z: z2 }, ], ...
Have I got the syntax wrong or am I hoping for too much? Thanks!
The text was updated successfully, but these errors were encountered:
I think you can have random paths, I've seen it in this demo.. study it to see how it's done..
https://codepen.io/jh3y/pen/JQJbaM
Sorry, something went wrong.
No branches or pull requests
In other languages, if I wanted to draw a star, say, I'd have something like this:
Can I do something similar in zdog? If so, I can't work out how, nor can I work out how to pass a variable to the path command.
Have I got the syntax wrong or am I hoping for too much?
Thanks!
The text was updated successfully, but these errors were encountered: