This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Voxel Tetris by @tatarize | |
// Click the board side to make the piece go that way. | |
// Click something on the board (eg, the falling piece) to make it turn. | |
// Turns are currently logged counter clockwise/counter-clockwise depending on the height you clicked at. | |
var createGame = require('voxel-engine') | |
var chunkSize = 32 | |
var chunkDistance = 3 | |
var game = createGame({ |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
MIT LICENSE. | |
(feel free to drop this entire comments section, and use for any commercial or open projects). | |
Written by Tatarize. | |
Iterable fast csv stream parser. | |
You would typically process this quite helpfully like: | |
for (String[] csv : parseCSV(stream)) { | |
<deal with parsed csv data> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import math | |
value = math.pi * 2 | |
best = 1e-5 | |
for i in range(1, 1000000): | |
fraction = float(i) / 12 | |
numer = round(value * fraction) | |
v = numer / float(fraction) | |
err = v - value |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.t_oster.liblasercut.BlackWhiteRaster; | |
import com.t_oster.liblasercut.utils.BufferedImageAdapter; | |
import java.awt.image.BufferedImage; | |
import java.io.File; | |
import java.io.FilenameFilter; | |
import java.io.IOException; | |
import javax.imageio.ImageIO; | |
public class TimeBWRaster { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This file is part of LibLaserCut. | |
* Copyright (C) 2011 - 2014 Thomas Oster <[email protected]> | |
* | |
* LibLaserCut is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU Lesser General Public License as published by | |
* the Free Software Foundation, either version 3 of the License, or | |
* (at your option) any later version. | |
* | |
* LibLaserCut is distributed in the hope that it will be useful, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.t_oster.liblasercut.BlackWhiteRaster; | |
import com.t_oster.liblasercut.ByteArrayList; | |
import com.t_oster.liblasercut.FloatPowerSpeedFocusFrequencyProperty; | |
import com.t_oster.liblasercut.RasterPart; | |
import com.t_oster.liblasercut.platform.Point; | |
import com.t_oster.liblasercut.utils.BufferedImageAdapter; | |
import java.awt.image.BufferedImage; | |
import java.io.File; | |
import java.io.FilenameFilter; |
OlderNewer