From 331386c6aa4db85a3b50c47a6cc9710a80a91978 Mon Sep 17 00:00:00 2001
From: Manuel Herrmann <it@icetruck.de>
Date: Thu, 20 Aug 2015 16:22:50 +0200
Subject: [PATCH] bernd instead of rectangle

---
 .gitignore                                    |   1 +
 .../view/signups/game1/chars/bernd.svg        | Bin 0 -> 8505 bytes
 .../view/signups/game1/js/character.js        |  22 +++++++++++-------
 3 files changed, 14 insertions(+), 9 deletions(-)
 create mode 100644 registration-system/view/signups/game1/chars/bernd.svg

diff --git a/.gitignore b/.gitignore
index 1e3a900..2a02d23 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
 *.idea/*
 */.idea*
 */view/signups/game1/tiles
+*.swp
diff --git a/registration-system/view/signups/game1/chars/bernd.svg b/registration-system/view/signups/game1/chars/bernd.svg
new file mode 100644
index 0000000000000000000000000000000000000000..27ddaae090dbcfbae14a7f5f7da8ea00d5cca43f
GIT binary patch
literal 8505
zcma)i*OsKnlHhxMMQzQ??qRCXs<*4>1S${#1R@CF4XpyL`T8YGb<e%?u$+^b;3nMN
zl$)97pZ~Sh?@voIj78gg`wV}DK7UG@sEvyz`}X;13ty<upT;R@;^5sj$+yo<`}x2A
zy8QXSzI^$_4oNU2@u#(z@=sDzjZx4gpZ<3~P2C?LxUTEh;^*MkcF4g0^Xbc%zb=<Q
z$0fUb`t<3Xw;BJ4qi>&o5_I$M{*D+&VDe7tq?tw#{tAPi|3;7gMvp#bFP0=~>$+{m
z@088>AOAoe;`BH3kJYT`cO;mmX%Ip{1o?7ed>Qv<3brr*o%CGe|3r#F5CopEzbE<s
z!}?=;pQ8AmaKA6+JM?d!e~hR2yYuHa!LNa@V>=H~lAhvBzBb7OayAG40)BzM##8(c
zHov6*o6WzeqzUR|?1Cs6!C%PV>DMBj@^7C>4EqYv7)DVr{e3)7iY%W_Gl6jAD@q^;
zgpuC?Mf~maDHr7X$3LtI{sH}I27mm9KwmNHEB<MKAqa!M<NVsiA8{LfEbH56Em=RE
zAM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F-cbi`!YNVBFa<-21?@p!6G;O^e>FUPM
zr+&Mf{jVGNaR+o|Wb=vhLnUWf_U+r{_a)S?drAuXJ@oT#6GeaBErQwkuMZ#Bet%v5
EAHOuQf&c&j

literal 0
HcmV?d00001

diff --git a/registration-system/view/signups/game1/js/character.js b/registration-system/view/signups/game1/js/character.js
index 93a2297..fca0afb 100644
--- a/registration-system/view/signups/game1/js/character.js
+++ b/registration-system/view/signups/game1/js/character.js
@@ -7,12 +7,17 @@ function Char(svg, options) {
 	this.moveTarget = [];
 	this.maxSpeed = 2;
 
-	this.rect = this.svg.append("rect");
-	this.rect.attr("backgroundColor", "#f0f")
-		.attr("width", "20")
-		.attr("height", "20");
-	
-	this.updatePosition();
+	var self = this;
+	d3.xml('chars/bernd.svg', 'image/svg+xml', function(xml) {
+		self.image = self.svg.append('g').attr('id', 'player');
+		var layers = d3.select(xml.documentElement).selectAll('g').filter(function() {
+			return this.getAttribute('inkscape:groupmode') == 'layer';
+		}).each(function() {
+			self.image[0][0].appendChild(this);
+		});
+
+		self.updatePosition();
+	});
 }
 Char.prototype.findSpawn = function() {
 	// [1320, svgFlipY(svg[0][0], 500)]
@@ -47,14 +52,13 @@ Char.prototype.physics = function() {
 	this.updatePosition();
 }
 Char.prototype.updatePosition = function() {
+	if (!this.image) return;
 	var self = this;
-	this.rect.attr("transform", function() {
+	this.image.attr("transform", function() {
 		return translate.apply(null, self.translation);
 	});
 }
 Char.prototype.setMoveTarget = function(newX, newY) {
-	if (!this.rect) return;
-
 	var matrix = this.svg[0][0].getScreenCTM();
 	var x = newX-matrix.e;
 	var y = newY-matrix.f;
-- 
GitLab