jQueryライクに3D空間を作れるライブラリtQuery

jQueryライクに3D空間を作れるライブラリtQuery

tQuery API - extensions for three.jsで簡単に3D空間を作ってみました。
f:id:haru-komugi:20140923194739j:plain

<!doctype html>
<title>Minimal tQuery Page</title>
<script src="tquery-bundle.js"></script>
<script src='tquery.checkerboard.js'></script>
<script src="tquery.shape.js"></script>
<script src="tquery.shape.create.js"></script>
<body>
<script>
	var world	= tQuery.createWorld().boilerplate().start();

	tQuery.createCheckerboard({
		segmentsW	: 100,	// number of segment in width
		segmentsH	: 100	// number of segment in Height
	}).addTo(world).scaleBy(100);

	shape	= tQuery.createHeartShape();
	shape.extrude().toMesh().id('obj').addTo(world);

	tQuery('#obj')
		.geometry().computeAll().normalize().center().rotateZ(Math.PI).back();
	
	tQuery.world.hook(function(delta){
		tQuery('#obj').rotateY(90 * delta * Math.PI / 180);
	});
</script>
</body>

ライト関係もあるらしい・・・