Objects

copilot

Drag to turn it round.

Render it yourself

The smallest page that draws copilot on your own site: the drawing code of the collection, its recipe as JSON, and a loop that lets it move.

<canvas id="copilot" width="640" height="400"></canvas>
<script src="https://objects.phlo.tech/objects.js"></script>
<script>
fetch('https://objects.phlo.tech/recipe/copilot').then(r => r.json()).then(recipe => {
	const O = PhloObjects, R = O.boxes.make(recipe)
	O.draw.init(document.getElementById('copilot'))
	let last = performance.now()
	const frame = now => {
		const dt = Math.min(.1, (now - last) / 1000)
		last = now
		O.boxes.step(R, dt)
		O.draw.frame({ x: R.mid[0], y: R.mid[1] * .8, z: R.mid[2], yaw: .7 + now / 4000, pitch: .38, dist: R.size * 1.55 + 1.2 })
		O.draw.ground(R.mid[0], R.mid[2])
		O.boxes.draw(R)
		requestAnimationFrame(frame)
	}
	requestAnimationFrame(frame)
})
</script>

This code as a page of its own