Arrow

Arrow #

A simple arrow using pipes. Useful for pointing at stuff. Can be used to show if something is moving or rotating.

Params #

NamePropTypedescription
detailnumberArrow’s detail. The bigger it is, the smoother the arrow looks.
radiusnumberArrow’s body radius.
heightnumberArrow’s height.

Showcase #

Click and drag to move the camera arround!

code #

sketch.js
// gui params
var detail = 16;
var radius = 20;
var height = 20;

var gui;

function setup() {
	createCanvas(450, 450, WEBGL);
	setAttributes('antialias', true);

	easycam = createEasyCam();
	easycam.setZoomScale(false);

	gui = createGui('Double click to close');
	gui.addGlobals('detail', 'radius', 'height');
}

function draw() {
	rotateX(-0.5);
	rotateY(-0.5);

	background(255);
	stroke(0);
	strokeWeight(1);
	fill(0, 0, 255);

	push();
	arrow({detail, radius, height});
	pop();
}