Voxel.css with updated architecture, robust tests, and npm availability
npm install voxelcss
Note: The associated styles are bundled with the JavaScript and added into the head section at runtime.
AMD (Require.js)
Add to paths attrbute of requirejs config file and require in code
// config.js
requirejs.config({
paths: {
voxelcss: 'path/to/node_modules/voxelcss/dist/voxelcss'
}
});
// main.js
define(function(require) {
'use strict';
const Voxelcss = require('voxelcss');
});
Browser global
Add script tag to your html (code will be available via
window.voxelcss
)
<!DOCTYPE html>
<html lang="en">
<head>...</head>
<body>
<script src="https://github.com/jhwohlgemuth/voxelcss/raw/master/path/to/node_modules/voxelcss/dist/voxelcss.js"></script>
</body>
</html>
Tap | Add voxel | |
Long touch | Remove voxel | |
1-finger drag | Rotate scene | |
2-finger pinch | Zoom scene | |
3-finger drag | Pan scene |
Please read the contributing guide