JavaScript 3D library
该项目的目的是为了打造轻量级的、实用简单的3D CSS库。
Usage使用方法
下载 minified库文件 和 css文件,并将其包含于你的HTML中,就如此简单。
下面这段代码既是对其应用:
var scene, world, editor; init(); function init() { scene = new voxelcss.Scene(); scene.rotate(-Math.PI / 8, Math.PI / 4, 0); scene.attach(document.body); var lightSource = new voxelcss.LightSource(300, 300, 300, 750, 0.3, 1); scene.addLightSource(lightSource); world = new voxelcss.World(scene); editor = new voxelcss.Editor(world); editor.enableAutoSave(); editor.load(); if(world.getVoxels().length === 0) editor.add(new voxelcss.Voxel(0, 0, 0, 100, { mesh: voxelcss.Meshes.grass })); }官方文档 3D CSS 应用 Demo
查看更多关于一个轻量级的3DCSS库_html/css_WEB-ITnose的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://haodehen.cn/did114254