Prepare for release 0.02
This commit is contained in:
parent
7c410ab7dd
commit
3d0b47b1cc
@ -19,7 +19,7 @@ import (
|
|||||||
|
|
||||||
const (
|
const (
|
||||||
Size = 256
|
Size = 256
|
||||||
Iterations = (1<<16 - 1) / 256
|
Iterations = (1<<16 - 1) / 128
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -44,7 +44,7 @@ type pixel struct {
|
|||||||
out *image.RGBA
|
out *image.RGBA
|
||||||
x, y int
|
x, y int
|
||||||
tileX, tileY int64
|
tileX, tileY int64
|
||||||
tileZoom uint8
|
tileZoom uint16
|
||||||
wg *sync.WaitGroup
|
wg *sync.WaitGroup
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -110,12 +110,13 @@ func renderTile(w http.ResponseWriter, r *http.Request) {
|
|||||||
|
|
||||||
for x := 0; x < Size; x++ {
|
for x := 0; x < Size; x++ {
|
||||||
for y := 0; y < Size; y++ {
|
for y := 0; y < Size; y++ {
|
||||||
queue <- pixel{img, x, y, tileX, tileY, uint8(tileZoom), &wg}
|
queue <- pixel{img, x, y, tileX, tileY, uint16(tileZoom), &wg}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
wg.Wait()
|
wg.Wait()
|
||||||
|
|
||||||
|
//addLabel(img, 20, 30, fmt.Sprintf("%s/%s/%s.png", components[1], components[2], components[3]))
|
||||||
w.Header().Set("Content-Type", "image/png")
|
w.Header().Set("Content-Type", "image/png")
|
||||||
png.Encode(w, img)
|
png.Encode(w, img)
|
||||||
}
|
}
|
||||||
@ -192,3 +193,19 @@ func cosineInterpolation(c1, c2, mu float64) float64 {
|
|||||||
func linearInterpolation(c1, c2, mu uint32) uint32 {
|
func linearInterpolation(c1, c2, mu uint32) uint32 {
|
||||||
return c1*(1-mu) + c2*mu
|
return c1*(1-mu) + c2*mu
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Adds a text label to an image
|
||||||
|
/*
|
||||||
|
func addLabel(img *image.RGBA, x, y int, label string) {
|
||||||
|
col := color.RGBA{255, 255, 255, 255}
|
||||||
|
point := fixed.Point26_6{fixed.Int26_6(x * 64), fixed.Int26_6(y * 64)}
|
||||||
|
|
||||||
|
d := &font.Drawer{
|
||||||
|
Dst: img,
|
||||||
|
Src: image.NewUniform(col),
|
||||||
|
Face: basicfont.Face7x13,
|
||||||
|
Dot: point,
|
||||||
|
}
|
||||||
|
d.DrawString(label)
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
@ -17,7 +17,7 @@ func init() {
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>MandelMapper</title>
|
<title>MandelMapper</title>
|
||||||
<script src="https://maps.googleapis.com/maps/api/js?sensor=false"></script>
|
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAZItO5CjoqDfPLwH_FZ4KcvQFt_L5dQBw"></script>
|
||||||
<script>
|
<script>
|
||||||
var mandelbrotTypeOptions = {
|
var mandelbrotTypeOptions = {
|
||||||
getTileUrl: function(coord, zoom) {
|
getTileUrl: function(coord, zoom) {
|
||||||
|
Loading…
Reference in New Issue
Block a user