magicworld
1
testing/magicworld/.gitignore
vendido
Archivo normal
@@ -0,0 +1 @@
|
||||
server/node_modules/
|
||||
25
testing/magicworld/docker-compose.yml
Archivo normal
@@ -0,0 +1,25 @@
|
||||
version: '2'
|
||||
|
||||
services:
|
||||
magicworld:
|
||||
build: ./server
|
||||
restart: always
|
||||
container_name: magicworld
|
||||
hostname: magicworld
|
||||
volumes:
|
||||
- ./server:/src
|
||||
- ./web:/src/public
|
||||
expose:
|
||||
- 80
|
||||
networks:
|
||||
mynet:
|
||||
ipv4_address: 172.100.0.101
|
||||
|
||||
|
||||
networks:
|
||||
mynet:
|
||||
driver: bridge
|
||||
ipam:
|
||||
config:
|
||||
- subnet: 172.100.0.0/24
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
-----BEGIN RSA PRIVATE KEY-----
|
||||
MIIJKAIBAAKCAgEA3QCcm2m15oRYc0YVsSk/e1H5n2JOIC/6WOsE+V9F5RvBcfbm
|
||||
cCBl7/qSnE4v2a5M51h+T3awOfFCOtdzMnQzanVA8NS1CM0auoDzaEbGLfhHNQKJ
|
||||
ekBC/C8oRemN88WGAQTURCjyWki9K5z2RFjcncU6niXSl750+9uP8ch2QGS2WeSX
|
||||
chV9/Sz2v40nHjTYgiASmuymwM9dFZ7ztJkCQl2Tv/g70LUrhdE9Tc/rZQwQbZZw
|
||||
KnM3etBxo1pmhuQTc9geA3l2JDQbCyNAcE0kW56m/KfFB4SK4+Rv+ikoMTHXQUAe
|
||||
75orzmVHZARd8Hd/4AE0xcNTZF2K5u+r83/yDAJAi9Oh+n3//MXWS+c0wT/7tKA9
|
||||
JGTRCAYvVNAoKkRI1HR7qs0yXhxfPlUp6HNNvUwFKePhhzwYnIQblTMk8K6GS8t2
|
||||
UDwfWGEhvGClEDAD+TmmybsqbRzgOYNLOEbuISayQpHi3dhChuGysXbgBkkfWZL5
|
||||
Kbc1nxsAsG1JC6IqEGlx7JKAs3eG2QJwx8VgL1CRNyteLKL9D/4xMKyZXyRSaNzV
|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-r83_yDAJAi9Oh-n3__MXWS-c0wT_7tKA9JGTRCAYvVNAoKkRI1HR7qs0yXhxfPlUp6HNNvUwFKePhhzwYnIQblTMk8K6GS8t2UDwfWGEhvGClEDAD-TmmybsqbRzgOYNLOEbuISayQpHi3dhChuGysXbgBkkfWZL5Kbc1nxsAsG1JC6IqEGlx7JKAs3eG2QJwx8VgL1CRNyteLKL9D_4xMKyZXyRSaNzVd1q9sWFCYb8AEuu3729eX8t_WQGZ0loLsgS7423C4Mcnmd9rlCYAsbUUe0FSzD4RHqPLqkMyYY25OkknyqYTg7SgaFkJ2jXckXcwf5FTdfi-8D3JN-jhneLH2Fk",
|
||||
"e": "AQAB"
|
||||
},
|
||||
"contact": [
|
||||
"mailto:gs.gore@gmail.com"
|
||||
],
|
||||
"agreement": "https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf",
|
||||
"initialIp": "217.125.184.173",
|
||||
"createdAt": "2018-08-25T18:13:17.69042415Z",
|
||||
"status": "valid"
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
-----BEGIN CERTIFICATE REQUEST-----
|
||||
MIIEvjCCAqYCAQAwJjEkMCIGA1UEAwwbbWFnaWN3b3JsZC5tYW5hbGVqYW5kcm8u
|
||||
Y29tMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA0mW33LJOnA3BOSeb
|
||||
5V4KcoE9ZFlOfq9Rv4JeWSwXDmhzbysSXTZPnkQYC+XAo98BAKjVPblDv+dbrat0
|
||||
lqQMJYaYAifOBUDqqEymaYpkJIMoGFZzN3prKfHIAkeaS3DKPdvW8PHerkZ2v7PB
|
||||
7Ic1eAz9mJSNtj8zAg7PF+5w2nXe4U6VzxXMwgxiRQhPSyseIG0mARr2rsW7d8bi
|
||||
+fBoPQpkjRlkseegHB4z2Pqhvg1hud/tA2jBQnECl2E6DUIEPtk/eFWrET+PUZKg
|
||||
OgEIdCcAUMpTFpn5FUXbAuiXUI3wkxo2Wlsk4zf3Ru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
||||
aPmBcwIQn7TW3kcTJJwe11QgOCVn2h5OepPDH5Zz7jwl2XaXfBuMCYU+/XyZjT/H
|
||||
HbY0AaE0RhcNvwyK8cx7NX1RHNrBGaPSdxjIOVFCgZ/r0zei0L5WvQNU2P7BLqOW
|
||||
GJWT8knoERnZISF8qgd5oIXFodGUsXDylx3FF4GwlEMOAcKTcFVpD+yiN7uqs1bh
|
||||
cKbHwDHoec3IDFXZReAR+iUo
|
||||
-----END CERTIFICATE REQUEST-----
|
||||
@@ -0,0 +1,41 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIHPDCCBiSgAwIBAgISA7nQAJt7UIpzssBfKB5mOU5qMA0GCSqGSIb3DQEBCwUA
|
||||
MEoxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1MZXQncyBFbmNyeXB0MSMwIQYDVQQD
|
||||
ExpMZXQncyBFbmNyeXB0IEF1dGhvcml0eSBYMzAeFw0xODA4MjUxNzEzNDNaFw0x
|
||||
ODExMjMxNzEzNDNaMCYxJDAiBgNVBAMTG21hZ2ljd29ybGQubWFuYWxlamFuZHJv
|
||||
LmNvbTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANJlt9yyTpwNwTkn
|
||||
m+VeCnKBPWRZTn6vUb+CXlksFw5oc28rEl02T55EGAvlwKPfAQCo1T25Q7/nW62r
|
||||
dJakDCWGmAInzgVA6qhMpmmKZCSDKBhWczd6aynxyAJHmktwyj3b1vDx3q5Gdr+z
|
||||
weyHNXgM/ZiUjbY/MwIOzxfucNp13uFOlc8VzMIMYkUIT0srHiBtJgEa9q7Fu3fG
|
||||
4vnwaD0KZI0ZZLHnoBweM9j6ob4NYbnf7QNowUJxApdhOg1CBD7ZP3hVqxE/j1GS
|
||||
oDoBCHQnAFDKUxaZ+RVF2wLol1CN8JMaNlpbJOM390blW3MlFCWgLNuUpU6AgbCr
|
||||
FFzHlF4GUQsew8bf7KcdMFmsD7dipvEIvcUvn+vspUDQzyKazjax1vy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cnRpZmljYXRlIFBvbGljeSBmb3VuZCBhdCBodHRwczovL2xldHNlbmNy
|
||||
eXB0Lm9yZy9yZXBvc2l0b3J5LzCCAQUGCisGAQQB1nkCBAIEgfYEgfMA8QB3ANt0
|
||||
r+7LKeyx/so+cW0s5bmquzb3hHGDx12dTze2H79kAAABZXJKtGIAAAQDAEgwRgIh
|
||||
APT/4HrD4z2q0uP2vgdjyeh6RIqqd+db8AmrixlA/L2FAiEAzuk+47BemAtyDKJg
|
||||
/KV2sue7gTft4ucVk2tl2UKI6ZQAdgApPFGWVMg5ZbqqUPxYB9S3b79Yeily3KTD
|
||||
DPTlRUf0eAAAAWVySrZpAAAEAwBHMEUCIAEBgXtNfNiUt5RQZJv2o+a3KE8/6vp/
|
||||
k0Q72DqjY7svAiEAskaEfaeyX/uTQbZGmMgR7zUCb0iwPwT3ew+FIX2x3qswDQYJ
|
||||
KoZIhvcNAQELBQADggEBAGNHlqZXsL8BpCe2eeH5fYxoNjXU+O8qPahnxxujO7/9
|
||||
34CbJSZwrYY98G/6ggjsvxfCpab2j4blfBdsvZnaIDbPGQrM4z3q1DOfKh/YBcnC
|
||||
CM2BrSMcrq0UuBDxkoi+8Bs9WFfjiRbxKn42xK4sy3KoL5VPcioJn9yoYL1tcKTX
|
||||
2k0qlpWUCuI35kxonU3LGELnRaJf1IiOCsQDJC4f559n6CH/HBoQL9YoIpGJfMP/
|
||||
hMTvnW9egvoD0ecaNXe8ff4Wy5ekGcznYoTXevqhFClSlMhRc6YX+uES5ksa8ykH
|
||||
tCJBMJL26DjQH2U0UZdsOU0OYwBX4KEsSQ6AxzuJCsc=
|
||||
-----END CERTIFICATE-----
|
||||
1
testing/magicworld/letsencrypt/certs/magicworld.manalejandro.com/cert.csr
Enlace simbólico
@@ -0,0 +1 @@
|
||||
cert-1535220797.csr
|
||||
1
testing/magicworld/letsencrypt/certs/magicworld.manalejandro.com/cert.pem
Enlace simbólico
@@ -0,0 +1 @@
|
||||
cert-1535220797.pem
|
||||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rb4UuQdf/EFWCFiRAw
|
||||
VAYDVR0gBE0wSzAIBgZngQwBAgEwPwYLKwYBBAGC3xMBAQEwMDAuBggrBgEFBQcC
|
||||
ARYiaHR0cDovL2Nwcy5yb290LXgxLmxldHNlbmNyeXB0Lm9yZzA8BgNVHR8ENTAz
|
||||
MDGgL6AthitodHRwOi8vY3JsLmlkZW50cnVzdC5jb20vRFNUUk9PVENBWDNDUkwu
|
||||
Y3JsMB0GA1UdDgQWBBSoSmpjBH3duubRObemRWXv86jsoTANBgkqhkiG9w0BAQsF
|
||||
AAOCAQEA3TPXEfNjWDjdGBX7CVW+dla5cEilaUcne8IkCJLxWh9KEik3JHRRHGJo
|
||||
uM2VcGfl96S8TihRzZvoroed6ti6WqEBmtzw3Wodatg+VyOeph4EYpr/1wXKtx8/
|
||||
wApIvJSwtmVi4MFU5aMqrSDE6ea73Mj2tcMyo5jMd6jmeWUHK8so/joWUoHOUgwu
|
||||
X4Po1QYz+3dszkDqMp4fklxBwXRsW10KXzPMTZ+sOPAveyxindmjkW8lGy+QsRlG
|
||||
PfZ+G6Z6h7mjem0Y+iWlkYcV4PIWL1iwBi8saCbGS5jN2p8M+X+Q7UNKEkROb3N6
|
||||
KOqkqm57TH2H3eDJAkSnh6/DNFu0Qg==
|
||||
-----END CERTIFICATE-----
|
||||
1
testing/magicworld/letsencrypt/certs/magicworld.manalejandro.com/chain.pem
Enlace simbólico
@@ -0,0 +1 @@
|
||||
chain-1535220797.pem
|
||||
@@ -0,0 +1,68 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIHPDCCBiSgAwIBAgISA7nQAJt7UIpzssBfKB5mOU5qMA0GCSqGSIb3DQEBCwUA
|
||||
MEoxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1MZXQncyBFbmNyeXB0MSMwIQYDVQQD
|
||||
ExpMZXQncyBFbmNyeXB0IEF1dGhvcml0eSBYMzAeFw0xODA4MjUxNzEzNDNaFw0x
|
||||
ODExMjMxNzEzNDNa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
|
||||
/PIzark5McWvxI0NHWQWM6r6hCm21AvA2H3DkwIDAQABo4IBfTCCAXkwEgYDVR0T
|
||||
AQH/BAgwBgEB/wIBADAOBgNVHQ8BAf8EBAMCAYYwfwYIKwYBBQUHAQEEczBxMDIG
|
||||
CCsGAQUFBzABhiZodHRwOi8vaXNyZy50cnVzdGlkLm9jc3AuaWRlbnRydXN0LmNv
|
||||
bTA7BggrBgEFBQcwAoYvaHR0cDovL2FwcHMuaWRlbnRydXN0LmNvbS9yb290cy9k
|
||||
c3Ryb290Y2F4My5wN2MwHwYDVR0jBBgwFoAUxKexpHsscfrb4UuQdf/EFWCFiRAw
|
||||
VAYDVR0gBE0wSzAIBgZngQwBAgEwPwYLKwYBBAGC3xMBAQEwMDAuBggrBgEFBQcC
|
||||
ARYiaHR0cDovL2Nwcy5yb290LXgxLmxldHNlbmNyeXB0Lm9yZzA8BgNVHR8ENTAz
|
||||
MDGgL6AthitodHRwOi8vY3JsLmlkZW50cnVzdC5jb20vRFNUUk9PVENBWDNDUkwu
|
||||
Y3JsMB0GA1UdDgQWBBSoSmpjBH3duubRObemRWXv86jsoTANBgkqhkiG9w0BAQsF
|
||||
AAOCAQEA3TPXEfNjWDjdGBX7CVW+dla5cEilaUcne8IkCJLxWh9KEik3JHRRHGJo
|
||||
uM2VcGfl96S8TihRzZvoroed6ti6WqEBmtzw3Wodatg+VyOeph4EYpr/1wXKtx8/
|
||||
wApIvJSwtmVi4MFU5aMqrSDE6ea73Mj2tcMyo5jMd6jmeWUHK8so/joWUoHOUgwu
|
||||
X4Po1QYz+3dszkDqMp4fklxBwXRsW10KXzPMTZ+sOPAveyxindmjkW8lGy+QsRlG
|
||||
PfZ+G6Z6h7mjem0Y+iWlkYcV4PIWL1iwBi8saCbGS5jN2p8M+X+Q7UNKEkROb3N6
|
||||
KOqkqm57TH2H3eDJAkSnh6/DNFu0Qg==
|
||||
-----END CERTIFICATE-----
|
||||
@@ -0,0 +1 @@
|
||||
fullchain-1535220797.pem
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
||||
tHUs6XI6Dn27d/bed1GVm7boVXAhSogNBa9ZPHKz148kgKS/UJ6dh77mrBXotgsx
|
||||
F26F0f441mCrzG1YFkIXRKqPBPGC4Ckb8KmDI01hUCt0LHulxb/4uuu/DzTnMNPu
|
||||
A6PDV+0Z2ue2hIU0U9VdTut6Zj3f7baxEctO0zOSAteI5S2cN/CwpJVd2Cp4pis4
|
||||
1SL+BG9krNpe1nvtwzlsCpn/jrVwc2IazprnCUhnMGfCH83cBjCuovsEUSw=
|
||||
-----END RSA PRIVATE KEY-----
|
||||
1
testing/magicworld/letsencrypt/certs/magicworld.manalejandro.com/privkey.pem
Enlace simbólico
@@ -0,0 +1 @@
|
||||
privkey-1535220797.pem
|
||||
16
testing/magicworld/package.json
Archivo normal
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"name": "magicworldcliente",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"install": "cp node_modules/bootstrap/dist/css/bootstrap.min.css node_modules/bootstrap/dist/js/bootstrap.min.js node_modules/jquery/dist/jquery.min.js node_modules/pixi.js/dist/pixi.min.js node_modules/pixi.js/dist/pixi.min.js web/libs/"
|
||||
},
|
||||
"dependencies": {
|
||||
"bootstrap": "^4.1.2",
|
||||
"express": "^4.16.3",
|
||||
"ice": "^3.7.1",
|
||||
"jquery": "^3.3.1",
|
||||
"pixi.js": "^4.8.1",
|
||||
"socket.io": "^2.1.1"
|
||||
}
|
||||
}
|
||||
17
testing/magicworld/server/Dockerfile
Archivo normal
@@ -0,0 +1,17 @@
|
||||
FROM node:slim
|
||||
#ss
|
||||
# ADD ./ /sever
|
||||
# server.js /server/server.js
|
||||
# ADD ./package.json /server/package.json
|
||||
# RUN mkdir /server/public
|
||||
# RUN mkdir /server/ssl
|
||||
# RUN mkdir /server/lib
|
||||
# COPY ./ssl/*.pem /server/ssl/
|
||||
# COPY ./lib/*.js /server/lib/
|
||||
WORKDIR /src
|
||||
|
||||
ADD ./package.json /src/package.json
|
||||
RUN /usr/local/bin/npm install
|
||||
RUN npm install
|
||||
ENTRYPOINT ["/usr/local/bin/node", "server.js"]
|
||||
|
||||
45
testing/magicworld/server/lib/colorized.js
Archivo normal
@@ -0,0 +1,45 @@
|
||||
var colorsConsoleList = {
|
||||
Reset: "\x1b[0m",
|
||||
Bright: "\x1b[1m",
|
||||
Dim: "\x1b[2m",
|
||||
Underscore: "\x1b[4m",
|
||||
Blink: "\x1b[5m",
|
||||
Reverse: "\x1b[7m",
|
||||
Hidden: "\x1b[8m",
|
||||
|
||||
FgBlack: "\x1b[30m",
|
||||
FgRed: "\x1b[31m",
|
||||
FgGreen: "\x1b[32m",
|
||||
FgYellow: "\x1b[33m",
|
||||
FgBlue: "\x1b[34m",
|
||||
FgMagenta: "\x1b[35m",
|
||||
FgCyan: "\x1b[36m",
|
||||
FgWhite: "\x1b[37m",
|
||||
|
||||
BgBlack: "\x1b[40m",
|
||||
BgRed: "\x1b[41m",
|
||||
BgGreen: "\x1b[42m",
|
||||
BgYellow: "\x1b[43m",
|
||||
BgBlue: "\x1b[44m",
|
||||
BgMagenta: "\x1b[45m",
|
||||
BgCyan: "\x1b[46m",
|
||||
BgWhite: "\x1b[47m",
|
||||
};
|
||||
|
||||
var getColors = function(color){
|
||||
return color.reduce((resul, x) => resul + colorsConsoleList[x], "");
|
||||
}
|
||||
|
||||
var setColors = function(smg, color){
|
||||
return getColors(color) + smg + colorsConsoleList["Reset"];
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
log: function (smg, color = []) {
|
||||
console.log(setColors(smg, color));
|
||||
},
|
||||
colorized: function (smg, color){
|
||||
return setColors(smg, color);
|
||||
}
|
||||
};
|
||||
|
||||
55
testing/magicworld/server/lib/logo.js
Archivo normal
@@ -0,0 +1,55 @@
|
||||
var log = require('./colorized').log,
|
||||
c = require('./colorized').colorized,
|
||||
s = {
|
||||
n: ["FgRed", "BgBlack", "Bright"], // Normality
|
||||
bkr: ["FgRed", "BgBlack", "Bright", "Blink"], // Blink red
|
||||
bky: ["FgYellow", "BgBlack", "Bright", "Blink"], // Blink yellow
|
||||
b: ["FgWhite", "BgBlack"], // Border
|
||||
l: ["FgWhite", "BgBlack", "Bright"], // logo
|
||||
lr: ["FgRed", "BgBlack", "Bright"], // logo red
|
||||
ly: ["FgYellow", "BgBlack", "Bright"], // logo yellow
|
||||
lm: ["FgMagenta", "BgBlack", "Bright"], // logo magenta
|
||||
lg: ["FgGreen", "BgBlack", "Bright"] // logo green
|
||||
},
|
||||
b = () => c("---", s.b),
|
||||
bkr = (x) => c(x, s.bkr),
|
||||
bky = (x) => c(x, s.bky),
|
||||
l = (x) => c(x, s.l),
|
||||
ly = (x) => c(x, s.ly),
|
||||
lr = (x) => c(x, s.lr),
|
||||
lm = (x) => c(x, s.lm),
|
||||
lg = (x) => c(x, s.lg);
|
||||
|
||||
module.exports = {
|
||||
logo: function () {
|
||||
log("--------------------------------------------", s.b);
|
||||
log(b() + c(" MW-NodeJS Server 0.3 ", s.lr) + b());
|
||||
log("--------------------------------------------", s.b);
|
||||
|
||||
log(b() + l(" .-. ") + b());
|
||||
log(b() + l(" {{") + lm("#") + l("}} ") + b());
|
||||
log(b() + l(" 888 ") + b());
|
||||
log(b() + l(" 888 ") + b());
|
||||
log(b() + l(" 8@8 ") + b());
|
||||
log(b() + l(" _ )8( _ ") + b());
|
||||
log(b() + l(" ____________________(") + lr("@") + l(")__/8@8\\__(") + lr("@") + l(") ") + b());
|
||||
log(b() + l(' | | | |`~"-=):(=-"~` ') + b());
|
||||
log(b() + l(" | ") + lg("<>") + l(" | | ") + lg("<>") + l(" | |.| ") + b());
|
||||
log(b() + l(" | ") + lg("<><>") + l(" | | ") + lg("<><>") + l(" | |") + bky("A") + l("| ") + b());
|
||||
log(b() + l(" | ") + lg("<> <>") + l("| |") + lg("<> <>") + l(" | |'| ") + b());
|
||||
log(b() + l(" | ") + lg("<>") + l(" .--------. ") + lg("<>") + l(" | |.| ") + b());
|
||||
log(b() + l(" |_____| ") + ly("()") + l(" |_____| |") + bky("C") + l("| ") + b());
|
||||
log(b() + l(" | | ") + ly("(O\\/O)") + l(" | | |'| ") + b());
|
||||
log(b() + l(" | \\ ") + ly("/\\") + l(" / | |.| ") + b());
|
||||
log(b() + l(" |______\\ ") + ly("\\/") + l(" /______| |") + bky("A") + l("| ") + b());
|
||||
log(b() + l(" | '.__.' | |'| ") + b());
|
||||
log(b() + l(" | ") + lg("<>") + l(" | | ") + lg("<>") + l(" | |.| ") + b());
|
||||
log(b() + l(" | ") + lg("<> <>") + l("| |") + lg("<> <>") + l(" | |") + bky("B") + l("| ") + b());
|
||||
log(b() + l(" | ") + lg("<><>") + l(" | | ") + lg("<><>") + l(" | |'| ") + b());
|
||||
log(b() + l(" | ") + lg("<>") + l(" | | ") + lg("<>") + l(" | |.| ") + b());
|
||||
log(b() + l(" |________|__|________| \\ / ") + b());
|
||||
log(b() + l(" v ") + b());
|
||||
|
||||
log("--------------------------------------------", s.b);
|
||||
}
|
||||
}
|
||||
40
testing/magicworld/server/lib/maper.js
Archivo normal
@@ -0,0 +1,40 @@
|
||||
module.exports = {
|
||||
create: channel => {
|
||||
map = require("../public/maps/" + channel + "/index").map;
|
||||
map.players = {};
|
||||
return map;
|
||||
},
|
||||
collision: (a,b) => {
|
||||
return a && b ? parseInt(a.position.x) + parseInt(a.width) > parseInt(b.position.x) && parseInt(a.position.x) < parseInt(b.position.x) + parseInt(b.width) && parseInt(a.position.y) + parseInt(a.height) > parseInt(b.position.y) && parseInt(a.position.y) < parseInt(b.position.y) + parseInt(b.height) : false;
|
||||
},
|
||||
collisionX: (m, a,b) => {
|
||||
return parseInt(a.position.x + m) + parseInt(a.width) > parseInt(b.position.x) && parseInt(a.position.x + m) < parseInt(b.position.x) + parseInt(b.width) && parseInt(a.position.y) + parseInt(a.height) > parseInt(b.position.y) && parseInt(a.position.y) < parseInt(b.position.y) + parseInt(b.height);
|
||||
},
|
||||
collisionY: (m, a,b) => {
|
||||
return parseInt(a.position.y + m) + parseInt(a.height) > parseInt(b.position.y) && parseInt(a.position.y + m) < parseInt(b.position.y) + parseInt(b.height) && parseInt(a.position.x) + parseInt(a.width) > parseInt(b.position.x) && parseInt(a.position.x) < parseInt(b.position.x) + parseInt(b.width);
|
||||
},
|
||||
insideX: (m, item, limits) => {
|
||||
return (item.position.x + m) > limits.x.max && (item.position.x + m) < limits.x.min;
|
||||
},
|
||||
insideY: (m, item, limits) => {
|
||||
return (item.position.y + m) > limits.y.max && (item.position.y + m) < limits.y.min;
|
||||
},
|
||||
moveX: (m, player, channel) => {
|
||||
let maper = module.exports;
|
||||
return maper.insideX(m, player, channel.limits) && !Object.values(channel.players).reduce((acc, x) => acc ? acc : player != x ? maper.collisionX(m, player, x) : false, false) && !Object.values(channel.colliders).reduce((acc, x) => acc ? acc : player != x ? maper.collisionX(m, player, x) : false, false);
|
||||
},
|
||||
moveY: (m, player, channel) => {
|
||||
let maper = module.exports;
|
||||
return maper.insideY(m, player, channel.limits) && !Object.values(channel.players).reduce((acc, x) => acc ? acc : player != x ? maper.collisionY(m, player, x) : false, false) && !Object.values(channel.colliders).reduce((acc, x) => acc ? acc : player != x ? maper.collisionY(m, player, x) : false, false);
|
||||
},
|
||||
getRandom: (min, max) => {
|
||||
return Math.floor(Math.random() * (max - min) ) + min;
|
||||
},
|
||||
getRandomPosition:(limits) =>{
|
||||
let maper = module.exports;
|
||||
return {
|
||||
"x": maper.getRandom(limits.x.min, limits.x.max),
|
||||
"y": maper.getRandom(limits.y.min, limits.y.max)
|
||||
}
|
||||
}
|
||||
}
|
||||
13
testing/magicworld/server/package.json
Archivo normal
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"name": "magicworldserver",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"express": "^4.16.3",
|
||||
"express-force-ssl": "^0.3.2",
|
||||
"pixi": "^0.3.1",
|
||||
"serve-static": "^1.13.2",
|
||||
"socket.io": "^2.1.1",
|
||||
"ws": "^6.0.0"
|
||||
}
|
||||
}
|
||||
209
testing/magicworld/server/server.js
Archivo normal
@@ -0,0 +1,209 @@
|
||||
'use strict'
|
||||
|
||||
const express = require('express'),
|
||||
app = express(),
|
||||
fs = require('fs'),
|
||||
http = require('http'),
|
||||
// https = require('https'),
|
||||
map = require('./lib/maper'),
|
||||
// secure = require('express-force-ssl'),
|
||||
Url = require('url'),
|
||||
io = require('ws'),
|
||||
serveStatic = require('serve-static'),
|
||||
log = require('./lib/colorized').log,
|
||||
//colorized = require('./lib/colorized').colorized,
|
||||
logo = require('./lib/logo').logo,
|
||||
options = {
|
||||
key: fs.readFileSync(__dirname + '/ssl/key.pem'),
|
||||
cert: fs.readFileSync(__dirname + '/ssl/cert.pem')
|
||||
},
|
||||
channels = {},
|
||||
styles = {
|
||||
disconnect: ["FgRed", "Bright"],
|
||||
connect: ["FgGreen", "Bright"]
|
||||
};
|
||||
|
||||
logo();
|
||||
|
||||
app
|
||||
//.use(secure)
|
||||
.use(serveStatic(__dirname + '/public'));
|
||||
|
||||
const server = http.createServer(app),
|
||||
ws = new io.Server({
|
||||
server: server
|
||||
});
|
||||
server.listen(80)
|
||||
|
||||
ws.on('connection', (socket, req) => {
|
||||
let params = Url.parse(req.url, true).query;
|
||||
socket.channel = params.channelName;
|
||||
socket.username = params.username;
|
||||
if (!channels[socket.channel]) {
|
||||
channels[socket.channel] = map.create(socket.channel);
|
||||
}
|
||||
socket.send(socket.username + " create " + JSON.stringify(channels[socket.channel]));
|
||||
channels[socket.channel].players[socket.username] = {
|
||||
"position": map.getRandomPosition(channels[socket.channel].limits),
|
||||
"direction": "down",
|
||||
"state": "stop",
|
||||
"username": socket.username,
|
||||
"lives": channels[socket.channel].player.lives,
|
||||
"scale": channels[socket.channel].player.scale,
|
||||
"score": 0,
|
||||
"width": 0,
|
||||
"height": 0
|
||||
};
|
||||
|
||||
let msg = socket.username + " " + JSON.stringify(channels[socket.channel].players[socket.username]);
|
||||
socket.send(msg);
|
||||
|
||||
// Cuando recive un mensaje
|
||||
socket.on('message', msg => {
|
||||
var username = msg.split(" ")[0];
|
||||
var type = msg.split(" ")[1];
|
||||
if (type != "chat" && channels[socket.channel].players[socket.username].position) {
|
||||
var data = JSON.parse(msg.replace(username + " ", "")),
|
||||
v = channels[socket.channel].player.velocity_divisor ? ((channels[socket.channel].players[socket.username].position.y) + (channels[socket.channel].size.y / 2)) / channels[socket.channel].player.velocity_divisor : channels[socket.channel].player.velocity,
|
||||
mx = -data.vx / channels[socket.channel].player.dvx * v,
|
||||
my = -data.vy / channels[socket.channel].player.dvy * v;
|
||||
|
||||
if (map.moveX(mx, channels[socket.channel].players[socket.username], channels[socket.channel])) {
|
||||
channels[socket.channel].players[socket.username].position.x += mx;
|
||||
}
|
||||
if (map.moveY(my, channels[socket.channel].players[socket.username], channels[socket.channel])) {
|
||||
channels[socket.channel].players[socket.username].position.y += my;
|
||||
}
|
||||
|
||||
channels[socket.channel].players[socket.username].state = data.state;
|
||||
channels[socket.channel].players[socket.username].direction = data.direction;
|
||||
channels[socket.channel].players[socket.username].width = data.width;
|
||||
channels[socket.channel].players[socket.username].height = data.height;
|
||||
|
||||
if(channels[socket.channel].player.scale_ratio_divisor){
|
||||
channels[socket.channel].players[socket.username].scale = (((channels[socket.channel].players[socket.username].position.y * -1) / channels[socket.channel].player.scale_ratio_divisor) - channels[socket.channel].player.scale) * -1;
|
||||
}else{
|
||||
channels[socket.channel].players[socket.username].scale = channels[socket.channel].player.scale;
|
||||
}
|
||||
|
||||
if (channels[socket.channel].players[socket.username].state == "attack") {
|
||||
var collider;
|
||||
var punch = 80;
|
||||
switch (channels[socket.channel].players[socket.username].direction) {
|
||||
case "up":
|
||||
collider = {
|
||||
position: {
|
||||
x: channels[socket.channel].players[socket.username].position.x,
|
||||
y: parseInt(channels[socket.channel].players[socket.username].position.y) - 40
|
||||
},
|
||||
width: channels[socket.channel].players[socket.username].width,
|
||||
height: 40,
|
||||
punch: -punch,
|
||||
direction: "y"
|
||||
};
|
||||
break;
|
||||
case "down":
|
||||
collider = {
|
||||
position: {
|
||||
x: channels[socket.channel].players[socket.username].position.x,
|
||||
y: parseInt(channels[socket.channel].players[socket.username].position.y) + parseInt(channels[socket.channel].players[socket.username].height)
|
||||
},
|
||||
width: channels[socket.channel].players[socket.username].height,
|
||||
height: 40,
|
||||
punch: punch,
|
||||
direction: "y"
|
||||
};
|
||||
break;
|
||||
case "left":
|
||||
collider = {
|
||||
position: {
|
||||
x: parseInt(channels[socket.channel].players[socket.username].position.x) - 40,
|
||||
y: channels[socket.channel].players[socket.username].position.y
|
||||
},
|
||||
width: 40,
|
||||
height: channels[socket.channel].players[socket.username].height,
|
||||
punch: -punch,
|
||||
direction: "x"
|
||||
};
|
||||
break;
|
||||
case "right":
|
||||
collider = {
|
||||
position: {
|
||||
x: parseInt(channels[socket.channel].players[socket.username].position.x) + parseInt(channels[socket.channel].players[socket.username].width),
|
||||
y: channels[socket.channel].players[socket.username].position.y
|
||||
},
|
||||
width: 40,
|
||||
height: channels[socket.channel].players[socket.username].height,
|
||||
punch: punch,
|
||||
direction: "x"
|
||||
};
|
||||
break;
|
||||
}
|
||||
|
||||
var msg2 = "";
|
||||
Object.values(channels[socket.channel].players).map(x => {
|
||||
if(map.collision(collider, x)){
|
||||
x.lives -= parseInt(x.lives) > 0 ? 1 : 0;
|
||||
if(parseInt(x.lives) == 0){
|
||||
channels[socket.channel].players[socket.username].lives += parseInt(channels[socket.channel].players[socket.username].lives) < 16 ? 1 : 0;
|
||||
channels[socket.channel].players[socket.username].score += parseInt(x.score) != 0 ? Math.round(x.score/2) : 0;
|
||||
x.score = 0;
|
||||
x.position = map.getRandomPosition(channels[socket.channel].limits);
|
||||
if(channels[socket.channel].player.scale_ratio_divisor){
|
||||
x.scale = (((x.position.y * -1) / channels[socket.channel].player.scale_ratio_divisor) - channels[socket.channel].player.scale) * -1;
|
||||
}
|
||||
x.lives = channels[socket.channel].player.lives;
|
||||
}else{
|
||||
if(collider.direction == "x"){
|
||||
if(map.moveX(collider.punch, x, channels[socket.channel])){
|
||||
x.position[collider.direction] += collider.punch;
|
||||
}
|
||||
}else{
|
||||
if(map.moveY(collider.punch, x, channels[socket.channel])){
|
||||
x.position[collider.direction] += collider.punch;
|
||||
}
|
||||
}
|
||||
channels[socket.channel].players[socket.username].score += 10;
|
||||
if(channels[socket.channel].player.scale_ratio_divisor){
|
||||
x.scale = (((x.position.y * -1) / channels[socket.channel].player.scale_ratio_divisor) - channels[socket.channel].player.scale) * -1;
|
||||
}
|
||||
}
|
||||
channels[socket.channel].players[x.username] = x;
|
||||
msg2 = x.username + " " + JSON.stringify(x);
|
||||
}
|
||||
});
|
||||
}
|
||||
msg = socket.username + " " + JSON.stringify(channels[socket.channel].players[socket.username]);
|
||||
}
|
||||
|
||||
ws.clients.forEach(function each(client) {
|
||||
if (client.channel == socket.channel && client.readyState === io.OPEN) {
|
||||
if (msg2) client.send(msg2);
|
||||
client.send(msg);
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
// Cierra la conexión y envía a los demás el mensaje
|
||||
.on('close', () => {
|
||||
log(socket.username + " | Disconect on " + socket.channel + ".", styles.disconnect);
|
||||
ws.clients.forEach(function each(client) {
|
||||
if (client !== socket && client.channel == socket.channel && client.readyState === io.OPEN) {
|
||||
client.send(socket.username + " left");
|
||||
}
|
||||
});
|
||||
delete channels[socket.channel].players[socket.username];
|
||||
socket.removeAllListeners();
|
||||
//socket.disconnect();
|
||||
});
|
||||
|
||||
log(socket.username + " | Connect on " + socket.channel + ".", styles.connect);
|
||||
});
|
||||
|
||||
/*
|
||||
.on('register', data => {
|
||||
log("register");
|
||||
socket.emit('users', { users: "testing" })
|
||||
socket.broadcast.emit('adduser', { user: "elgustavo" })
|
||||
})
|
||||
*/
|
||||
46
testing/magicworld/server/server_gus.js
Archivo normal
@@ -0,0 +1,46 @@
|
||||
'use strict';
|
||||
|
||||
var constants = require('constants'),
|
||||
https = require('https'),
|
||||
path = require('path'),
|
||||
tls = require('tls'),
|
||||
fs = require('fs'),
|
||||
Url = require('url'),
|
||||
WebSocket = require('ws');
|
||||
|
||||
const server = https.createServer({
|
||||
secureProtocol: 'SSLv23_method',
|
||||
secureOptions: constants.SSL_OP_NO_SSLv3,
|
||||
rejectUnauthorized: false,
|
||||
key: fs.readFileSync(__dirname + '/ssl/key.pem'),
|
||||
cert: fs.readFileSync(__dirname + '/ssl/cert.pem')
|
||||
});
|
||||
|
||||
const wss = new WebSocket.Server({ server });
|
||||
|
||||
wss.on('connection', function connection(ws, req) {
|
||||
//console.log(Url.parse(req.url, true).query);
|
||||
console.log("Connect");
|
||||
var params = Url.parse(req.url, true).query;
|
||||
ws.channel = params.channelName;
|
||||
ws.on('message', function message(msg) {
|
||||
wss.clients.forEach(function each(client) {
|
||||
if (client !== ws && client.channel == ws.channel && client.readyState === WebSocket.OPEN) {
|
||||
client.send(msg);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
server.listen('9000', 'magicworld.servebeer.com', function listening() {
|
||||
|
||||
const ws = new WebSocket(`wss://magicworld.servebeer.com:${server.address().port}`, {
|
||||
rejectUnauthorized: true
|
||||
});
|
||||
|
||||
ws.on('open', function open() {
|
||||
ws.send(`WebSocket Listen in ${server.address().port}`);
|
||||
});
|
||||
});
|
||||
|
||||
wss.on('connection', function connection(ws) {})
|
||||
578
testing/magicworld/server/yarn.lock
Archivo normal
@@ -0,0 +1,578 @@
|
||||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
||||
# yarn lockfile v1
|
||||
|
||||
|
||||
accepts@~1.3.4, accepts@~1.3.5:
|
||||
version "1.3.5"
|
||||
resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.5.tgz#eb777df6011723a3b14e8a72c0805c8e86746bd2"
|
||||
dependencies:
|
||||
mime-types "~2.1.18"
|
||||
negotiator "0.6.1"
|
||||
|
||||
after@0.8.2:
|
||||
version "0.8.2"
|
||||
resolved "https://registry.yarnpkg.com/after/-/after-0.8.2.tgz#fedb394f9f0e02aa9768e702bda23b505fae7e1f"
|
||||
|
||||
array-flatten@1.1.1:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2"
|
||||
|
||||
arraybuffer.slice@~0.0.7:
|
||||
version "0.0.7"
|
||||
resolved "https://registry.yarnpkg.com/arraybuffer.slice/-/arraybuffer.slice-0.0.7.tgz#3bbc4275dd584cc1b10809b89d4e8b63a69e7675"
|
||||
|
||||
async-limiter@~1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.0.tgz#78faed8c3d074ab81f22b4e985d79e8738f720f8"
|
||||
|
||||
backo2@1.0.2:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/backo2/-/backo2-1.0.2.tgz#31ab1ac8b129363463e35b3ebb69f4dfcfba7947"
|
||||
|
||||
base64-arraybuffer@0.1.5:
|
||||
version "0.1.5"
|
||||
resolved "https://registry.yarnpkg.com/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz#73926771923b5a19747ad666aa5cd4bf9c6e9ce8"
|
||||
|
||||
base64id@1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/base64id/-/base64id-1.0.0.tgz#47688cb99bb6804f0e06d3e763b1c32e57d8e6b6"
|
||||
|
||||
better-assert@~1.0.0:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/better-assert/-/better-assert-1.0.2.tgz#40866b9e1b9e0b55b481894311e68faffaebc522"
|
||||
dependencies:
|
||||
callsite "1.0.0"
|
||||
|
||||
blob@0.0.4:
|
||||
version "0.0.4"
|
||||
resolved "https://registry.yarnpkg.com/blob/-/blob-0.0.4.tgz#bcf13052ca54463f30f9fc7e95b9a47630a94921"
|
||||
|
||||
body-parser@1.18.2:
|
||||
version "1.18.2"
|
||||
resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.18.2.tgz#87678a19d84b47d859b83199bd59bce222b10454"
|
||||
dependencies:
|
||||
bytes "3.0.0"
|
||||
content-type "~1.0.4"
|
||||
debug "2.6.9"
|
||||
depd "~1.1.1"
|
||||
http-errors "~1.6.2"
|
||||
iconv-lite "0.4.19"
|
||||
on-finished "~2.3.0"
|
||||
qs "6.5.1"
|
||||
raw-body "2.3.2"
|
||||
type-is "~1.6.15"
|
||||
|
||||
bytes@3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048"
|
||||
|
||||
callsite@1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/callsite/-/callsite-1.0.0.tgz#280398e5d664bd74038b6f0905153e6e8af1bc20"
|
||||
|
||||
component-bind@1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/component-bind/-/component-bind-1.0.0.tgz#00c608ab7dcd93897c0009651b1d3a8e1e73bbd1"
|
||||
|
||||
component-emitter@1.2.1:
|
||||
version "1.2.1"
|
||||
resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.2.1.tgz#137918d6d78283f7df7a6b7c5a63e140e69425e6"
|
||||
|
||||
component-inherit@0.0.3:
|
||||
version "0.0.3"
|
||||
resolved "https://registry.yarnpkg.com/component-inherit/-/component-inherit-0.0.3.tgz#645fc4adf58b72b649d5cae65135619db26ff143"
|
||||
|
||||
content-disposition@0.5.2:
|
||||
version "0.5.2"
|
||||
resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.2.tgz#0cf68bb9ddf5f2be7961c3a85178cb85dba78cb4"
|
||||
|
||||
content-type@~1.0.4:
|
||||
version "1.0.4"
|
||||
resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b"
|
||||
|
||||
cookie-signature@1.0.6:
|
||||
version "1.0.6"
|
||||
resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c"
|
||||
|
||||
cookie@0.3.1:
|
||||
version "0.3.1"
|
||||
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.3.1.tgz#e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb"
|
||||
|
||||
debug@2.6.9:
|
||||
version "2.6.9"
|
||||
resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
|
||||
dependencies:
|
||||
ms "2.0.0"
|
||||
|
||||
debug@~3.1.0:
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261"
|
||||
dependencies:
|
||||
ms "2.0.0"
|
||||
|
||||
depd@1.1.1:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.1.tgz#5783b4e1c459f06fa5ca27f991f3d06e7a310359"
|
||||
|
||||
depd@~1.1.1, depd@~1.1.2:
|
||||
version "1.1.2"
|
||||
resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9"
|
||||
|
||||
destroy@~1.0.4:
|
||||
version "1.0.4"
|
||||
resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80"
|
||||
|
||||
ee-first@1.1.1:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"
|
||||
|
||||
encodeurl@~1.0.2:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59"
|
||||
|
||||
engine.io-client@~3.2.0:
|
||||
version "3.2.1"
|
||||
resolved "https://registry.yarnpkg.com/engine.io-client/-/engine.io-client-3.2.1.tgz#6f54c0475de487158a1a7c77d10178708b6add36"
|
||||
dependencies:
|
||||
component-emitter "1.2.1"
|
||||
component-inherit "0.0.3"
|
||||
debug "~3.1.0"
|
||||
engine.io-parser "~2.1.1"
|
||||
has-cors "1.1.0"
|
||||
indexof "0.0.1"
|
||||
parseqs "0.0.5"
|
||||
parseuri "0.0.5"
|
||||
ws "~3.3.1"
|
||||
xmlhttprequest-ssl "~1.5.4"
|
||||
yeast "0.1.2"
|
||||
|
||||
engine.io-parser@~2.1.0, engine.io-parser@~2.1.1:
|
||||
version "2.1.2"
|
||||
resolved "https://registry.yarnpkg.com/engine.io-parser/-/engine.io-parser-2.1.2.tgz#4c0f4cff79aaeecbbdcfdea66a823c6085409196"
|
||||
dependencies:
|
||||
after "0.8.2"
|
||||
arraybuffer.slice "~0.0.7"
|
||||
base64-arraybuffer "0.1.5"
|
||||
blob "0.0.4"
|
||||
has-binary2 "~1.0.2"
|
||||
|
||||
engine.io@~3.2.0:
|
||||
version "3.2.0"
|
||||
resolved "https://registry.yarnpkg.com/engine.io/-/engine.io-3.2.0.tgz#54332506f42f2edc71690d2f2a42349359f3bf7d"
|
||||
dependencies:
|
||||
accepts "~1.3.4"
|
||||
base64id "1.0.0"
|
||||
cookie "0.3.1"
|
||||
debug "~3.1.0"
|
||||
engine.io-parser "~2.1.0"
|
||||
ws "~3.3.1"
|
||||
|
||||
escape-html@~1.0.3:
|
||||
version "1.0.3"
|
||||
resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988"
|
||||
|
||||
etag@~1.8.1:
|
||||
version "1.8.1"
|
||||
resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887"
|
||||
|
||||
express-force-ssl@^0.3.2:
|
||||
version "0.3.2"
|
||||
resolved "https://registry.yarnpkg.com/express-force-ssl/-/express-force-ssl-0.3.2.tgz#01b2b498ae6fd2e41152b22b57a3e173773af67e"
|
||||
dependencies:
|
||||
lodash.assign "^3.2.0"
|
||||
|
||||
express@^4.16.3:
|
||||
version "4.16.3"
|
||||
resolved "https://registry.yarnpkg.com/express/-/express-4.16.3.tgz#6af8a502350db3246ecc4becf6b5a34d22f7ed53"
|
||||
dependencies:
|
||||
accepts "~1.3.5"
|
||||
array-flatten "1.1.1"
|
||||
body-parser "1.18.2"
|
||||
content-disposition "0.5.2"
|
||||
content-type "~1.0.4"
|
||||
cookie "0.3.1"
|
||||
cookie-signature "1.0.6"
|
||||
debug "2.6.9"
|
||||
depd "~1.1.2"
|
||||
encodeurl "~1.0.2"
|
||||
escape-html "~1.0.3"
|
||||
etag "~1.8.1"
|
||||
finalhandler "1.1.1"
|
||||
fresh "0.5.2"
|
||||
merge-descriptors "1.0.1"
|
||||
methods "~1.1.2"
|
||||
on-finished "~2.3.0"
|
||||
parseurl "~1.3.2"
|
||||
path-to-regexp "0.1.7"
|
||||
proxy-addr "~2.0.3"
|
||||
qs "6.5.1"
|
||||
range-parser "~1.2.0"
|
||||
safe-buffer "5.1.1"
|
||||
send "0.16.2"
|
||||
serve-static "1.13.2"
|
||||
setprototypeof "1.1.0"
|
||||
statuses "~1.4.0"
|
||||
type-is "~1.6.16"
|
||||
utils-merge "1.0.1"
|
||||
vary "~1.1.2"
|
||||
|
||||
finalhandler@1.1.1:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.1.tgz#eebf4ed840079c83f4249038c9d703008301b105"
|
||||
dependencies:
|
||||
debug "2.6.9"
|
||||
encodeurl "~1.0.2"
|
||||
escape-html "~1.0.3"
|
||||
on-finished "~2.3.0"
|
||||
parseurl "~1.3.2"
|
||||
statuses "~1.4.0"
|
||||
unpipe "~1.0.0"
|
||||
|
||||
forwarded@~0.1.2:
|
||||
version "0.1.2"
|
||||
resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84"
|
||||
|
||||
fresh@0.5.2:
|
||||
version "0.5.2"
|
||||
resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7"
|
||||
|
||||
has-binary2@~1.0.2:
|
||||
version "1.0.3"
|
||||
resolved "https://registry.yarnpkg.com/has-binary2/-/has-binary2-1.0.3.tgz#7776ac627f3ea77250cfc332dab7ddf5e4f5d11d"
|
||||
dependencies:
|
||||
isarray "2.0.1"
|
||||
|
||||
has-cors@1.1.0:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/has-cors/-/has-cors-1.1.0.tgz#5e474793f7ea9843d1bb99c23eef49ff126fff39"
|
||||
|
||||
http-errors@1.6.2:
|
||||
version "1.6.2"
|
||||
resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.2.tgz#0a002cc85707192a7e7946ceedc11155f60ec736"
|
||||
dependencies:
|
||||
depd "1.1.1"
|
||||
inherits "2.0.3"
|
||||
setprototypeof "1.0.3"
|
||||
statuses ">= 1.3.1 < 2"
|
||||
|
||||
http-errors@~1.6.2:
|
||||
version "1.6.3"
|
||||
resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.3.tgz#8b55680bb4be283a0b5bf4ea2e38580be1d9320d"
|
||||
dependencies:
|
||||
depd "~1.1.2"
|
||||
inherits "2.0.3"
|
||||
setprototypeof "1.1.0"
|
||||
statuses ">= 1.4.0 < 2"
|
||||
|
||||
iconv-lite@0.4.19:
|
||||
version "0.4.19"
|
||||
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.19.tgz#f7468f60135f5e5dad3399c0a81be9a1603a082b"
|
||||
|
||||
indexof@0.0.1:
|
||||
version "0.0.1"
|
||||
resolved "https://registry.yarnpkg.com/indexof/-/indexof-0.0.1.tgz#82dc336d232b9062179d05ab3293a66059fd435d"
|
||||
|
||||
inherits@2.0.3:
|
||||
version "2.0.3"
|
||||
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
|
||||
|
||||
ipaddr.js@1.8.0:
|
||||
version "1.8.0"
|
||||
resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.8.0.tgz#eaa33d6ddd7ace8f7f6fe0c9ca0440e706738b1e"
|
||||
|
||||
isarray@2.0.1:
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.1.tgz#a37d94ed9cda2d59865c9f76fe596ee1f338741e"
|
||||
|
||||
lodash._baseassign@^3.0.0:
|
||||
version "3.2.0"
|
||||
resolved "https://registry.yarnpkg.com/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz#8c38a099500f215ad09e59f1722fd0c52bfe0a4e"
|
||||
dependencies:
|
||||
lodash._basecopy "^3.0.0"
|
||||
lodash.keys "^3.0.0"
|
||||
|
||||
lodash._basecopy@^3.0.0:
|
||||
version "3.0.1"
|
||||
resolved "https://registry.yarnpkg.com/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz#8da0e6a876cf344c0ad8a54882111dd3c5c7ca36"
|
||||
|
||||
lodash._bindcallback@^3.0.0:
|
||||
version "3.0.1"
|
||||
resolved "https://registry.yarnpkg.com/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz#e531c27644cf8b57a99e17ed95b35c748789392e"
|
||||
|
||||
lodash._createassigner@^3.0.0:
|
||||
version "3.1.1"
|
||||
resolved "https://registry.yarnpkg.com/lodash._createassigner/-/lodash._createassigner-3.1.1.tgz#838a5bae2fdaca63ac22dee8e19fa4e6d6970b11"
|
||||
dependencies:
|
||||
lodash._bindcallback "^3.0.0"
|
||||
lodash._isiterateecall "^3.0.0"
|
||||
lodash.restparam "^3.0.0"
|
||||
|
||||
lodash._getnative@^3.0.0:
|
||||
version "3.9.1"
|
||||
resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5"
|
||||
|
||||
lodash._isiterateecall@^3.0.0:
|
||||
version "3.0.9"
|
||||
resolved "https://registry.yarnpkg.com/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz#5203ad7ba425fae842460e696db9cf3e6aac057c"
|
||||
|
||||
lodash.assign@^3.2.0:
|
||||
version "3.2.0"
|
||||
resolved "https://registry.yarnpkg.com/lodash.assign/-/lodash.assign-3.2.0.tgz#3ce9f0234b4b2223e296b8fa0ac1fee8ebca64fa"
|
||||
dependencies:
|
||||
lodash._baseassign "^3.0.0"
|
||||
lodash._createassigner "^3.0.0"
|
||||
lodash.keys "^3.0.0"
|
||||
|
||||
lodash.isarguments@^3.0.0:
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz#2f573d85c6a24289ff00663b491c1d338ff3458a"
|
||||
|
||||
lodash.isarray@^3.0.0:
|
||||
version "3.0.4"
|
||||
resolved "https://registry.yarnpkg.com/lodash.isarray/-/lodash.isarray-3.0.4.tgz#79e4eb88c36a8122af86f844aa9bcd851b5fbb55"
|
||||
|
||||
lodash.keys@^3.0.0:
|
||||
version "3.1.2"
|
||||
resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-3.1.2.tgz#4dbc0472b156be50a0b286855d1bd0b0c656098a"
|
||||
dependencies:
|
||||
lodash._getnative "^3.0.0"
|
||||
lodash.isarguments "^3.0.0"
|
||||
lodash.isarray "^3.0.0"
|
||||
|
||||
lodash.restparam@^3.0.0:
|
||||
version "3.6.1"
|
||||
resolved "https://registry.yarnpkg.com/lodash.restparam/-/lodash.restparam-3.6.1.tgz#936a4e309ef330a7645ed4145986c85ae5b20805"
|
||||
|
||||
media-typer@0.3.0:
|
||||
version "0.3.0"
|
||||
resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748"
|
||||
|
||||
merge-descriptors@1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61"
|
||||
|
||||
methods@~1.1.2:
|
||||
version "1.1.2"
|
||||
resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee"
|
||||
|
||||
mime-db@~1.35.0:
|
||||
version "1.35.0"
|
||||
resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.35.0.tgz#0569d657466491283709663ad379a99b90d9ab47"
|
||||
|
||||
mime-types@~2.1.18:
|
||||
version "2.1.19"
|
||||
resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.19.tgz#71e464537a7ef81c15f2db9d97e913fc0ff606f0"
|
||||
dependencies:
|
||||
mime-db "~1.35.0"
|
||||
|
||||
mime@1.4.1:
|
||||
version "1.4.1"
|
||||
resolved "https://registry.yarnpkg.com/mime/-/mime-1.4.1.tgz#121f9ebc49e3766f311a76e1fa1c8003c4b03aa6"
|
||||
|
||||
ms@2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
|
||||
|
||||
negotiator@0.6.1:
|
||||
version "0.6.1"
|
||||
resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.1.tgz#2b327184e8992101177b28563fb5e7102acd0ca9"
|
||||
|
||||
object-component@0.0.3:
|
||||
version "0.0.3"
|
||||
resolved "https://registry.yarnpkg.com/object-component/-/object-component-0.0.3.tgz#f0c69aa50efc95b866c186f400a33769cb2f1291"
|
||||
|
||||
on-finished@~2.3.0:
|
||||
version "2.3.0"
|
||||
resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947"
|
||||
dependencies:
|
||||
ee-first "1.1.1"
|
||||
|
||||
parseqs@0.0.5:
|
||||
version "0.0.5"
|
||||
resolved "https://registry.yarnpkg.com/parseqs/-/parseqs-0.0.5.tgz#d5208a3738e46766e291ba2ea173684921a8b89d"
|
||||
dependencies:
|
||||
better-assert "~1.0.0"
|
||||
|
||||
parseuri@0.0.5:
|
||||
version "0.0.5"
|
||||
resolved "https://registry.yarnpkg.com/parseuri/-/parseuri-0.0.5.tgz#80204a50d4dbb779bfdc6ebe2778d90e4bce320a"
|
||||
dependencies:
|
||||
better-assert "~1.0.0"
|
||||
|
||||
parseurl@~1.3.2:
|
||||
version "1.3.2"
|
||||
resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.2.tgz#fc289d4ed8993119460c156253262cdc8de65bf3"
|
||||
|
||||
path-to-regexp@0.1.7:
|
||||
version "0.1.7"
|
||||
resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c"
|
||||
|
||||
pixi@^0.3.1:
|
||||
version "0.3.1"
|
||||
resolved "https://registry.yarnpkg.com/pixi/-/pixi-0.3.1.tgz#858cd6164a32a1e4b41192cdf5c6d98209300ba8"
|
||||
|
||||
proxy-addr@~2.0.3:
|
||||
version "2.0.4"
|
||||
resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.4.tgz#ecfc733bf22ff8c6f407fa275327b9ab67e48b93"
|
||||
dependencies:
|
||||
forwarded "~0.1.2"
|
||||
ipaddr.js "1.8.0"
|
||||
|
||||
qs@6.5.1:
|
||||
version "6.5.1"
|
||||
resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.1.tgz#349cdf6eef89ec45c12d7d5eb3fc0c870343a6d8"
|
||||
|
||||
range-parser@~1.2.0:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e"
|
||||
|
||||
raw-body@2.3.2:
|
||||
version "2.3.2"
|
||||
resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.3.2.tgz#bcd60c77d3eb93cde0050295c3f379389bc88f89"
|
||||
dependencies:
|
||||
bytes "3.0.0"
|
||||
http-errors "1.6.2"
|
||||
iconv-lite "0.4.19"
|
||||
unpipe "1.0.0"
|
||||
|
||||
safe-buffer@5.1.1:
|
||||
version "5.1.1"
|
||||
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853"
|
||||
|
||||
safe-buffer@~5.1.0:
|
||||
version "5.1.2"
|
||||
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
|
||||
|
||||
send@0.16.2:
|
||||
version "0.16.2"
|
||||
resolved "https://registry.yarnpkg.com/send/-/send-0.16.2.tgz#6ecca1e0f8c156d141597559848df64730a6bbc1"
|
||||
dependencies:
|
||||
debug "2.6.9"
|
||||
depd "~1.1.2"
|
||||
destroy "~1.0.4"
|
||||
encodeurl "~1.0.2"
|
||||
escape-html "~1.0.3"
|
||||
etag "~1.8.1"
|
||||
fresh "0.5.2"
|
||||
http-errors "~1.6.2"
|
||||
mime "1.4.1"
|
||||
ms "2.0.0"
|
||||
on-finished "~2.3.0"
|
||||
range-parser "~1.2.0"
|
||||
statuses "~1.4.0"
|
||||
|
||||
serve-static@1.13.2, serve-static@^1.13.2:
|
||||
version "1.13.2"
|
||||
resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.13.2.tgz#095e8472fd5b46237db50ce486a43f4b86c6cec1"
|
||||
dependencies:
|
||||
encodeurl "~1.0.2"
|
||||
escape-html "~1.0.3"
|
||||
parseurl "~1.3.2"
|
||||
send "0.16.2"
|
||||
|
||||
setprototypeof@1.0.3:
|
||||
version "1.0.3"
|
||||
resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.0.3.tgz#66567e37043eeb4f04d91bd658c0cbefb55b8e04"
|
||||
|
||||
setprototypeof@1.1.0:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.0.tgz#d0bd85536887b6fe7c0d818cb962d9d91c54e656"
|
||||
|
||||
socket.io-adapter@~1.1.0:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/socket.io-adapter/-/socket.io-adapter-1.1.1.tgz#2a805e8a14d6372124dd9159ad4502f8cb07f06b"
|
||||
|
||||
socket.io-client@2.1.1:
|
||||
version "2.1.1"
|
||||
resolved "https://registry.yarnpkg.com/socket.io-client/-/socket.io-client-2.1.1.tgz#dcb38103436ab4578ddb026638ae2f21b623671f"
|
||||
dependencies:
|
||||
backo2 "1.0.2"
|
||||
base64-arraybuffer "0.1.5"
|
||||
component-bind "1.0.0"
|
||||
component-emitter "1.2.1"
|
||||
debug "~3.1.0"
|
||||
engine.io-client "~3.2.0"
|
||||
has-binary2 "~1.0.2"
|
||||
has-cors "1.1.0"
|
||||
indexof "0.0.1"
|
||||
object-component "0.0.3"
|
||||
parseqs "0.0.5"
|
||||
parseuri "0.0.5"
|
||||
socket.io-parser "~3.2.0"
|
||||
to-array "0.1.4"
|
||||
|
||||
socket.io-parser@~3.2.0:
|
||||
version "3.2.0"
|
||||
resolved "https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-3.2.0.tgz#e7c6228b6aa1f814e6148aea325b51aa9499e077"
|
||||
dependencies:
|
||||
component-emitter "1.2.1"
|
||||
debug "~3.1.0"
|
||||
isarray "2.0.1"
|
||||
|
||||
socket.io@^2.1.1:
|
||||
version "2.1.1"
|
||||
resolved "https://registry.yarnpkg.com/socket.io/-/socket.io-2.1.1.tgz#a069c5feabee3e6b214a75b40ce0652e1cfb9980"
|
||||
dependencies:
|
||||
debug "~3.1.0"
|
||||
engine.io "~3.2.0"
|
||||
has-binary2 "~1.0.2"
|
||||
socket.io-adapter "~1.1.0"
|
||||
socket.io-client "2.1.1"
|
||||
socket.io-parser "~3.2.0"
|
||||
|
||||
"statuses@>= 1.3.1 < 2", "statuses@>= 1.4.0 < 2":
|
||||
version "1.5.0"
|
||||
resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c"
|
||||
|
||||
statuses@~1.4.0:
|
||||
version "1.4.0"
|
||||
resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.4.0.tgz#bb73d446da2796106efcc1b601a253d6c46bd087"
|
||||
|
||||
to-array@0.1.4:
|
||||
version "0.1.4"
|
||||
resolved "https://registry.yarnpkg.com/to-array/-/to-array-0.1.4.tgz#17e6c11f73dd4f3d74cda7a4ff3238e9ad9bf890"
|
||||
|
||||
type-is@~1.6.15, type-is@~1.6.16:
|
||||
version "1.6.16"
|
||||
resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.16.tgz#f89ce341541c672b25ee7ae3c73dee3b2be50194"
|
||||
dependencies:
|
||||
media-typer "0.3.0"
|
||||
mime-types "~2.1.18"
|
||||
|
||||
ultron@~1.1.0:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.1.1.tgz#9fe1536a10a664a65266a1e3ccf85fd36302bc9c"
|
||||
|
||||
unpipe@1.0.0, unpipe@~1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec"
|
||||
|
||||
utils-merge@1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713"
|
||||
|
||||
vary@~1.1.2:
|
||||
version "1.1.2"
|
||||
resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc"
|
||||
|
||||
ws@^6.0.0:
|
||||
version "6.0.0"
|
||||
resolved "https://registry.yarnpkg.com/ws/-/ws-6.0.0.tgz#eaa494aded00ac4289d455bac8d84c7c651cef35"
|
||||
dependencies:
|
||||
async-limiter "~1.0.0"
|
||||
|
||||
ws@~3.3.1:
|
||||
version "3.3.3"
|
||||
resolved "https://registry.yarnpkg.com/ws/-/ws-3.3.3.tgz#f1cf84fe2d5e901ebce94efaece785f187a228f2"
|
||||
dependencies:
|
||||
async-limiter "~1.0.0"
|
||||
safe-buffer "~5.1.0"
|
||||
ultron "~1.1.0"
|
||||
|
||||
xmlhttprequest-ssl@~1.5.4:
|
||||
version "1.5.5"
|
||||
resolved "https://registry.yarnpkg.com/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.5.tgz#c2876b06168aadc40e57d97e81191ac8f4398b3e"
|
||||
|
||||
yeast@0.1.2:
|
||||
version "0.1.2"
|
||||
resolved "https://registry.yarnpkg.com/yeast/-/yeast-0.1.2.tgz#008e06d8094320c372dbc2f8ed76a0ca6c8ac419"
|
||||
3
testing/magicworld/start-build.sh
Archivo normal
@@ -0,0 +1,3 @@
|
||||
sudo docker-compose down
|
||||
sudo sh update.sh
|
||||
sudo docker-compose up --build
|
||||
3
testing/magicworld/start.sh
Archivo normal
@@ -0,0 +1,3 @@
|
||||
docker-compose down
|
||||
sh update.sh
|
||||
docker-compose up
|
||||
4
testing/magicworld/update.sh
Archivo normal
@@ -0,0 +1,4 @@
|
||||
git pull origin 0.4
|
||||
git add .
|
||||
git commit -m "update automático"
|
||||
git push origin 0.4
|
||||
0
testing/magicworld/web/.well-known/acme-challenge/test.html
Archivo normal
9
testing/magicworld/web/css/fonts.css
Archivo normal
@@ -0,0 +1,9 @@
|
||||
@font-face {
|
||||
font-family: 'komtit';
|
||||
src: url(/fonts/KOMTITT_.ttf);
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'oswald';
|
||||
src: url(/fonts/Oswald-Regular.ttf);
|
||||
}
|
||||
91
testing/magicworld/web/css/game.css
Archivo normal
@@ -0,0 +1,91 @@
|
||||
body{
|
||||
background-color: black;
|
||||
overflow: hidden;
|
||||
font-family: 'komtit';
|
||||
-webkit-touch-callout: none;
|
||||
-webkit-user-select: none;
|
||||
-khtml-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
#loading{
|
||||
position: absolute;
|
||||
top:0;
|
||||
left: 0;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background-image: url(/img/logos/sword2.png);
|
||||
background-position-x: 50%;
|
||||
background-position-y: 50%;
|
||||
background-repeat: no-repeat;
|
||||
min-height: 100vh;
|
||||
animation-name: rotate;
|
||||
animation-duration:2s;
|
||||
animation-iteration-count:infinite;
|
||||
animation-timing-function:linear;
|
||||
}
|
||||
|
||||
@keyframes rotate {
|
||||
from {-webkit-transform:rotate(0deg);}
|
||||
to { -webkit-transform:rotate(360deg);}
|
||||
}
|
||||
|
||||
.guiContanier{
|
||||
position: fixed;
|
||||
z-index: 1;
|
||||
background: gray;
|
||||
padding: 5px;
|
||||
border: 2px solid black;
|
||||
opacity: 0.6;
|
||||
filter: alpha(opacity=60); /* For IE8 and earlier */
|
||||
}
|
||||
|
||||
.guiContanier:hover{
|
||||
opacity: 1;
|
||||
filter: alpha(opacity=100); /* For IE8 and earlier */
|
||||
}
|
||||
|
||||
#chat{
|
||||
width: 20vw;
|
||||
min-width: 257px;
|
||||
bottom: 20px;
|
||||
left: 20px;
|
||||
}
|
||||
|
||||
#chatOutput{
|
||||
margin-bottom: 5px;
|
||||
overflow-x: hidden;
|
||||
overflow-y: scroll;
|
||||
word-break: break-all;
|
||||
height: 20vh;
|
||||
}
|
||||
|
||||
|
||||
.output{
|
||||
width: 100%;
|
||||
font-family: "oswald";
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
#score{
|
||||
width: 15vw;
|
||||
min-width: 144px;
|
||||
top: 20px;
|
||||
right: 20px;
|
||||
}
|
||||
#scoreOutput{
|
||||
height: auto;
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
@media (max-width: 1000px) {
|
||||
.guiContanier {
|
||||
zoom: 0.5;
|
||||
}
|
||||
|
||||
#score{
|
||||
width: 50vw;
|
||||
}
|
||||
}
|
||||
37
testing/magicworld/web/css/main.css
Archivo normal
@@ -0,0 +1,37 @@
|
||||
body{
|
||||
background-image: url("/img/home.jpg");
|
||||
background-position: center center;
|
||||
background-size: cover;
|
||||
background-attachment: fixed;
|
||||
margin-bottom: 0px;
|
||||
|
||||
}
|
||||
|
||||
.container{
|
||||
background: rgba(255, 255, 255, 0.8);
|
||||
min-height: calc(100vh - 20px);
|
||||
padding-top: 10vw;
|
||||
padding-left: 10vw;
|
||||
padding-right: 10vw;
|
||||
padding-bottom: 10vw;
|
||||
-webkit-box-shadow: 0px 0px 12px 8px rgba(0,0,0,0.75);
|
||||
-moz-box-shadow: 0px 0px 12px 8px rgba(0,0,0,0.75);
|
||||
box-shadow: 0px 0px 12px 8px rgba(0,0,0,0.75);
|
||||
/*border-radius: 50% 0 50% 0;*/
|
||||
}
|
||||
.container h1{
|
||||
margin-bottom: 5vw;
|
||||
}
|
||||
.container form{
|
||||
margin-bottom: 5vw;
|
||||
}
|
||||
|
||||
#music{
|
||||
margin-top: -7vw;
|
||||
margin-right: -5vw;
|
||||
}
|
||||
|
||||
p{
|
||||
font-family: "oswald";
|
||||
text-align: justify;
|
||||
}
|
||||
BIN
testing/magicworld/web/fonts/KOMTITA_.ttf
Archivo normal
BIN
testing/magicworld/web/fonts/KOMTITBR.ttf
Archivo normal
BIN
testing/magicworld/web/fonts/KOMTITE_.ttf
Archivo normal
BIN
testing/magicworld/web/fonts/KOMTITG_.ttf
Archivo normal
BIN
testing/magicworld/web/fonts/KOMTITK_.ttf
Archivo normal
BIN
testing/magicworld/web/fonts/KOMTITP_.ttf
Archivo normal
BIN
testing/magicworld/web/fonts/KOMTITS_.ttf
Archivo normal
BIN
testing/magicworld/web/fonts/KOMTITTL.ttf
Archivo normal
BIN
testing/magicworld/web/fonts/KOMTITT_.ttf
Archivo normal
BIN
testing/magicworld/web/fonts/KOMTITWR.ttf
Archivo normal
BIN
testing/magicworld/web/fonts/KOMTITW_.ttf
Archivo normal
BIN
testing/magicworld/web/fonts/KOMTIT__.ttf
Archivo normal
BIN
testing/magicworld/web/fonts/Oswald-Bold.ttf
Archivo normal
BIN
testing/magicworld/web/fonts/Oswald-BoldItalic.ttf
Archivo normal
BIN
testing/magicworld/web/fonts/Oswald-Demi-BoldItalic.ttf
Archivo normal
BIN
testing/magicworld/web/fonts/Oswald-DemiBold.ttf
Archivo normal
BIN
testing/magicworld/web/fonts/Oswald-Extra-LightItalic.ttf
Archivo normal
BIN
testing/magicworld/web/fonts/Oswald-ExtraLight.ttf
Archivo normal
BIN
testing/magicworld/web/fonts/Oswald-Heavy.ttf
Archivo normal
BIN
testing/magicworld/web/fonts/Oswald-HeavyItalic.ttf
Archivo normal
BIN
testing/magicworld/web/fonts/Oswald-Light.ttf
Archivo normal
BIN
testing/magicworld/web/fonts/Oswald-LightItalic.ttf
Archivo normal
BIN
testing/magicworld/web/fonts/Oswald-Medium.ttf
Archivo normal
BIN
testing/magicworld/web/fonts/Oswald-MediumItalic.ttf
Archivo normal
BIN
testing/magicworld/web/fonts/Oswald-Regular.ttf
Archivo normal
BIN
testing/magicworld/web/fonts/Oswald-RegularItalic.ttf
Archivo normal
BIN
testing/magicworld/web/fonts/Oswald-Stencil.ttf
Archivo normal
37
testing/magicworld/web/game.html
Archivo normal
@@ -0,0 +1,37 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>MagicWorld</title>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0' name='viewport' />
|
||||
<meta name="mobile-web-app-capable" content="yes">
|
||||
<link rel="stylesheet" href="css/fonts.css" />
|
||||
<link rel="stylesheet" href="libs/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="css/game.css" />
|
||||
<script src="libs/pixi.min.js"></script>
|
||||
<script src="libs/jquery.min.js"></script>
|
||||
<script src="libs/bootstrap.min.js"></script>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/ice/3.7.1/Ice.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/ice/3.7.1/Glacier2.js"></script>
|
||||
|
||||
<script src="js/functions.js"></script>
|
||||
<script src="js/mosters.js"></script>
|
||||
<script src="js/game.js"></script>
|
||||
<script src="js/connect.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="loading">
|
||||
</div>
|
||||
<div id="chat" class="guiContanier">
|
||||
<div id="chatOutput" class="form-control output"></div>
|
||||
<input id="chatInput" class="form-control">
|
||||
</div>
|
||||
<div id="score" class="guiContanier">
|
||||
<div id="scoreOutput" class="form-control output"></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
BIN
testing/magicworld/web/img/cosas/a.jpg
Archivo normal
|
Después Anchura: | Altura: | Tamaño: 1.7 MiB |
BIN
testing/magicworld/web/img/cosas/gui/heart.png
Archivo normal
|
Después Anchura: | Altura: | Tamaño: 256 B |
BIN
testing/magicworld/web/img/cosas/llanura-puszta_0.jpg
Archivo normal
|
Después Anchura: | Altura: | Tamaño: 1.7 MiB |
BIN
testing/magicworld/web/img/cosas/pj/gato.png
Archivo normal
|
Después Anchura: | Altura: | Tamaño: 14 KiB |
BIN
testing/magicworld/web/img/cosas/pj/pnj1.png
Archivo normal
|
Después Anchura: | Altura: | Tamaño: 60 KiB |
BIN
testing/magicworld/web/img/cosas/pj/pnj2.png
Archivo normal
|
Después Anchura: | Altura: | Tamaño: 13 KiB |
BIN
testing/magicworld/web/img/cosas/pj/pnj3.png
Archivo normal
|
Después Anchura: | Altura: | Tamaño: 44 KiB |
BIN
testing/magicworld/web/img/cosas/pj/pnj4.png
Archivo normal
|
Después Anchura: | Altura: | Tamaño: 24 KiB |
BIN
testing/magicworld/web/img/cosas/pj/pnj5.png
Archivo normal
|
Después Anchura: | Altura: | Tamaño: 82 KiB |
BIN
testing/magicworld/web/img/cosas/shop.jpg
Archivo normal
|
Después Anchura: | Altura: | Tamaño: 80 KiB |
BIN
testing/magicworld/web/img/gui/heart.png
Archivo normal
|
Después Anchura: | Altura: | Tamaño: 256 B |
BIN
testing/magicworld/web/img/home.jpg
Archivo normal
|
Después Anchura: | Altura: | Tamaño: 358 KiB |
BIN
testing/magicworld/web/img/logos/magicworld.jpg
Archivo normal
|
Después Anchura: | Altura: | Tamaño: 46 KiB |
BIN
testing/magicworld/web/img/logos/magicworldnobeta.jpg
Archivo normal
|
Después Anchura: | Altura: | Tamaño: 44 KiB |
BIN
testing/magicworld/web/img/logos/sword.png
Archivo normal
|
Después Anchura: | Altura: | Tamaño: 3.7 KiB |
BIN
testing/magicworld/web/img/logos/sword2.png
Archivo normal
|
Después Anchura: | Altura: | Tamaño: 75 KiB |
BIN
testing/magicworld/web/img/map01/front.png
Archivo normal
|
Después Anchura: | Altura: | Tamaño: 276 KiB |
BIN
testing/magicworld/web/img/map01/landscape.jpg
Archivo normal
|
Después Anchura: | Altura: | Tamaño: 227 KiB |
BIN
testing/magicworld/web/img/map01/tree.png
Archivo normal
|
Después Anchura: | Altura: | Tamaño: 28 KiB |
BIN
testing/magicworld/web/img/map01/tree2.png
Archivo normal
|
Después Anchura: | Altura: | Tamaño: 34 KiB |
BIN
testing/magicworld/web/img/map01/tree_old.png
Archivo normal
|
Después Anchura: | Altura: | Tamaño: 70 KiB |
BIN
testing/magicworld/web/img/moster/boos3.png
Archivo normal
|
Después Anchura: | Altura: | Tamaño: 26 KiB |
BIN
testing/magicworld/web/img/moster/boss.png
Archivo normal
|
Después Anchura: | Altura: | Tamaño: 46 KiB |
BIN
testing/magicworld/web/img/moster/boss2.png
Archivo normal
|
Después Anchura: | Altura: | Tamaño: 15 KiB |
BIN
testing/magicworld/web/img/moster/boss4.png
Archivo normal
|
Después Anchura: | Altura: | Tamaño: 20 KiB |
BIN
testing/magicworld/web/img/moster/boss5.png
Archivo normal
|
Después Anchura: | Altura: | Tamaño: 14 KiB |
BIN
testing/magicworld/web/img/moster/boss6.png
Archivo normal
|
Después Anchura: | Altura: | Tamaño: 25 KiB |
BIN
testing/magicworld/web/img/moster/boss7.png
Archivo normal
|
Después Anchura: | Altura: | Tamaño: 130 KiB |
BIN
testing/magicworld/web/img/moster/moster1.png
Archivo normal
|
Después Anchura: | Altura: | Tamaño: 24 KiB |
BIN
testing/magicworld/web/img/moster/moster2.png
Archivo normal
|
Después Anchura: | Altura: | Tamaño: 210 KiB |
BIN
testing/magicworld/web/img/moster/moster3.png
Archivo normal
|
Después Anchura: | Altura: | Tamaño: 48 KiB |
BIN
testing/magicworld/web/img/moster/moster4.png
Archivo normal
|
Después Anchura: | Altura: | Tamaño: 101 KiB |
BIN
testing/magicworld/web/img/moster/moster5.png
Archivo normal
|
Después Anchura: | Altura: | Tamaño: 7.2 KiB |
BIN
testing/magicworld/web/img/moster/orc_stop_for_door.gif
Archivo normal
|
Después Anchura: | Altura: | Tamaño: 36 KiB |
BIN
testing/magicworld/web/img/moster/zeta1.jpg
Archivo normal
|
Después Anchura: | Altura: | Tamaño: 32 KiB |
BIN
testing/magicworld/web/img/player.png
Archivo normal
|
Después Anchura: | Altura: | Tamaño: 23 KiB |
101
testing/magicworld/web/index.html
Archivo normal
@@ -0,0 +1,101 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>MagicWorld</title>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<link rel="stylesheet" href="libs/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="css/fonts.css" />
|
||||
<link rel="stylesheet" href="css/main.css" />
|
||||
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.2.0/css/all.css" integrity="sha384-hWVjflwFxL6sNzntih27bfxkr27PmbbK/iSvJ+a4+0owXq79v+lsFkW54bOGbiDQ" crossorigin="anonymous">
|
||||
<script src="libs/pixi.min.js"></script>
|
||||
<script src="libs/jquery.min.js"></script>
|
||||
<script src="libs/bootstrap.min.js"></script>
|
||||
<script src="js/functions.js"></script>
|
||||
<script src="js/index.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container">
|
||||
<div id="music" class="float-right">
|
||||
<a id="musicPlay" class="btn btn-info d-none" onclick="play()"><i class="fas fa-music"></i> <i class="fas fa-play"></i></a>
|
||||
<a id="musicStop" class="btn btn-info" onclick="stop()"><i class="fas fa-music"></i> <i class="fas fa-stop"></i></a>
|
||||
</div>
|
||||
<div class="logo col-12">
|
||||
<img src="/img/logos/magicworldnobeta.jpg" class="img-fluid">
|
||||
</div>
|
||||
<h1 class="text-center">0.4.1</h1>
|
||||
<form method="GET" action="game.html">
|
||||
<div class="row d-none">
|
||||
<div class="col alert alert-danger text-center">Estamos en mantenimiento, perdonen las molestias....</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="col"></div>
|
||||
<div class="col">
|
||||
<input id="username" name="username" class="form-control" placeholder="Nick">
|
||||
</div>
|
||||
<div class="col">
|
||||
<input type="submit" class="btn btn-primary" value="Play Game!!!">
|
||||
</div>
|
||||
<div class="col"></div>
|
||||
</div>
|
||||
</form>
|
||||
<div>
|
||||
<p>
|
||||
En estos momentos "Magic World" es un proyecto desarollado en ratos libres, sin fines de lucro, solo por amor a las tecnologías y los videojuegos.
|
||||
</p>
|
||||
<p>
|
||||
Todo el trabajo esta realizado en nuestros ratos libres y vacaciones. Si juegas y te gusta tanto que quieres ayudar a su creación. De momento lo mejor que puedes hacer es invitarnos a una cerveza si te encuentras con alguno de nosotros.
|
||||
</p>
|
||||
<p>
|
||||
En el caso de que el proyecto se completara y los jugadores lo apoyaran. Se buscaría métodos de financiar el servicio y las actualizaciones.
|
||||
</p>
|
||||
<p>
|
||||
Un cordial saludo.
|
||||
</p>
|
||||
<!--
|
||||
<p class="text-center">
|
||||
<b>Staff</b>
|
||||
<ul>
|
||||
<li>
|
||||
<b>Gore</b>
|
||||
<ul>
|
||||
<li>Idea inicial</li>
|
||||
<li>desarrollo de ideas</li>
|
||||
<li>Desarollador de cliente</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><b>Cabesa Nuklear</b>
|
||||
<ul>
|
||||
<li>Apoyo moral</li>
|
||||
<li>Encargado de seguridad</li>
|
||||
<li>Desarollador de backend</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><b>Ninguno</b>
|
||||
<ul>
|
||||
<li>Apoyo moral</li>
|
||||
<li>Desarollador de cliente</li>
|
||||
<li>Desarollador de backend</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><b>LangostiNo</b>
|
||||
<ul>
|
||||
<li>Apoyo moral</li>
|
||||
<li>Diseño y arte grafico</li>
|
||||
<li>Coordinador de testing</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</p>-->
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
<!---
|
||||
Komika Title
|
||||
la de abajo
|
||||
oswarld la de arriba(editado)
|
||||
-->
|
||||
114
testing/magicworld/web/js/connect.js
Archivo normal
@@ -0,0 +1,114 @@
|
||||
var socket;
|
||||
|
||||
function init() {
|
||||
var server = "mw.hatthieves.es";
|
||||
var host = "wss://" + server + "/?channelName=" + channel + "&username=" + userName;
|
||||
try {
|
||||
socket = new WebSocket(host);
|
||||
log('WebSocket - status ' + socket.readyState);
|
||||
socket.onopen = function (msg) {
|
||||
log("Welcome - status " + this.readyState);
|
||||
};
|
||||
socket.onmessage = function (msg) {
|
||||
data = msg.data;
|
||||
var username = data.split(" ")[0];
|
||||
var type = data.split(" ")[1];
|
||||
switch (type) {
|
||||
case "create":
|
||||
map = JSON.parse(data.split(" ")[2]);
|
||||
map.players = {};
|
||||
run(socket);
|
||||
break;
|
||||
|
||||
case "left":
|
||||
if (map.players[username]) {
|
||||
map.players[username].deleted = true;
|
||||
$("#chatOutput").html($("#chatOutput").html() + "<b>[" + [username] + "]</b>" + " left the game.<br>");
|
||||
$("#chatOutput").scrollTop($("#chatOutput").get(0).scrollHeight);
|
||||
}
|
||||
break;
|
||||
|
||||
case "chat":
|
||||
$("#chatOutput").html($("#chatOutput").html() + "<b>[" + [username] + "]</b>" + ": " + data.replace(username + " chat ", "") + "<br>");
|
||||
$("#chatOutput").scrollTop($("#chatOutput").get(0).scrollHeight);
|
||||
break;
|
||||
|
||||
default:
|
||||
if (username != userName) {
|
||||
if (!map.players) {
|
||||
map.players = {};
|
||||
}
|
||||
|
||||
if (!map.players[username]) {
|
||||
map.players[username] = {};
|
||||
}
|
||||
let jsonData = JSON.parse(data.replace(username + " ", ""));
|
||||
if (!map.players[username].item) {
|
||||
map.players[username].deleted = false;
|
||||
map.players[username].landscapeTexture = new PIXI.Texture.fromImage(map.player.url);
|
||||
map.players[username].texture = new PIXI.Texture(map.players[username].landscapeTexture);
|
||||
map.players[username].item = new PIXI.Sprite(map.players[username].texture);
|
||||
map.players[username].nameStyle = new PIXI.TextStyle({
|
||||
fontFamily: 'komtit',
|
||||
fontSize: 24,
|
||||
fill: ['#FFF1E1', '#FFF1E1'], // gradient
|
||||
stroke: '#35130B',
|
||||
strokeThickness: 5,
|
||||
dropShadow: true,
|
||||
dropShadowColor: '#724833',
|
||||
dropShadowBlur: 4,
|
||||
dropShadowAngle: Math.PI / 2,
|
||||
dropShadowDistance: 1,
|
||||
wordWrap: false,
|
||||
wordWrapWidth: 440,
|
||||
padding: 20
|
||||
});
|
||||
map.players[username].username = username;
|
||||
map.players[username].name = new PIXI.Text([username], map.players[username].nameStyle);
|
||||
$("#chatOutput").html($("#chatOutput").html() + "<b>[" + [username] + "]</b>" + " join the game.<br>");
|
||||
$("#chatOutput").scrollTop($("#chatOutput").get(0).scrollHeight);
|
||||
}
|
||||
map.players[username].position = jsonData.position;
|
||||
map.players[username].direction = jsonData.direction;
|
||||
map.players[username].state = jsonData.state;
|
||||
map.players[username].scale = jsonData.scale;
|
||||
map.players[username].lives = jsonData.lives;
|
||||
map.players[username].score = jsonData.score;
|
||||
} else {
|
||||
let jsonData = JSON.parse(data.replace(username + " ", ""))
|
||||
position = jsonData.position;
|
||||
scale = jsonData.scale;
|
||||
lives = jsonData.lives;
|
||||
score = jsonData.score;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
};
|
||||
socket.onclose = function (msg) {
|
||||
reconnect();
|
||||
};
|
||||
|
||||
} catch (ex) {
|
||||
log(ex);
|
||||
}
|
||||
}
|
||||
|
||||
function quit() {
|
||||
if (socket != null) {
|
||||
log("Goodbye!");
|
||||
socket.close();
|
||||
socket = null;
|
||||
}
|
||||
}
|
||||
|
||||
function reconnect() {
|
||||
quit();
|
||||
init();
|
||||
}
|
||||
|
||||
function log(msg) {
|
||||
console.log(msg);
|
||||
}
|
||||
|
||||
init();
|
||||
172
testing/magicworld/web/js/connect_n.js
Archivo normal
@@ -0,0 +1,172 @@
|
||||
(function () {
|
||||
$(document).ready(function () {
|
||||
|
||||
class MWCallbackI extends MW.MWCallback {
|
||||
message(data) {
|
||||
var username = data.split(" ")[0];
|
||||
if (data.split(" ")[1] == "left") {
|
||||
if (map.players[username]) {
|
||||
map.players[username].deleted = true;
|
||||
$("#chatOutput").html($("#chatOutput").html() + "<b>[" + [username] + "]</b>" + " left the game.<br>");
|
||||
$("#chatOutput").scrollTop($("#chatOutput").get(0).scrollHeight);
|
||||
}
|
||||
} else if (data.split(" ")[1] == "chat") {
|
||||
$("#chatOutput").html($("#chatOutput").html() + "<b>[" + [username] + "]</b>" + ": " + data.replace(username + " chat ", "") + "<br>");
|
||||
$("#chatOutput").scrollTop($("#chatOutput").get(0).scrollHeight);
|
||||
} else {
|
||||
if (username != userName) {
|
||||
if (!map.players[username]) {
|
||||
map.players[username] = {};
|
||||
}
|
||||
let jsonData = JSON.parse(data.replace(username + " ", ""))
|
||||
if (!map.players[username].item) {
|
||||
map.players[username].deleted = false;
|
||||
map.players[username].landscapeTexture = new PIXI.Texture.fromImage(map.player.url);
|
||||
map.players[username].texture = new PIXI.Texture(map.players[username].landscapeTexture);
|
||||
map.players[username].item = new PIXI.Sprite(map.players[username].texture);
|
||||
map.players[username].nameStyle = new PIXI.TextStyle({
|
||||
fontFamily: 'komtit',
|
||||
fontSize: 24,
|
||||
fill: ['#FFF1E1', '#FFF1E1'], // gradient
|
||||
stroke: '#35130B',
|
||||
strokeThickness: 5,
|
||||
dropShadow: true,
|
||||
dropShadowColor: '#724833',
|
||||
dropShadowBlur: 4,
|
||||
dropShadowAngle: Math.PI / 2,
|
||||
dropShadowDistance: 1,
|
||||
wordWrap: false,
|
||||
wordWrapWidth: 440,
|
||||
padding: 20
|
||||
});
|
||||
map.players[username].username = username;
|
||||
map.players[username].name = new PIXI.Text([username], map.players[username].nameStyle);
|
||||
$("#chatOutput").html($("#chatOutput").html() + "<b>[" + [username] + "]</b>" + " join the game.<br>");
|
||||
$("#chatOutput").scrollTop($("#chatOutput").get(0).scrollHeight);
|
||||
}
|
||||
map.players[username].px = jsonData.px;
|
||||
map.players[username].py = jsonData.py;
|
||||
map.players[username].direction = jsonData.direction;
|
||||
map.players[username].state = jsonData.state;
|
||||
map.players[username].scale = jsonData.scale;
|
||||
map.players[username].score = jsonData.score;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const State = {
|
||||
Disconnected: 0,
|
||||
Connecting: 1,
|
||||
Connected: 2
|
||||
};
|
||||
|
||||
let state = State.Disconnected;
|
||||
|
||||
async function runWithSession(router, session) {
|
||||
try {
|
||||
|
||||
const [timeout, category, adapter] = await Promise.all(
|
||||
[
|
||||
router.getACMTimeout(),
|
||||
router.getCategoryForClient(),
|
||||
router.ice_getCommunicator().createObjectAdapterWithRouter("", router)
|
||||
]);
|
||||
|
||||
const connection = router.ice_getCachedConnection();
|
||||
if (timeout > 0) {
|
||||
connection.setACM(timeout, undefined, Ice.ACMHeartbeat.HeartbeatAlways);
|
||||
}
|
||||
|
||||
connection.setCloseCallback(() => error("Connection lost"));
|
||||
|
||||
const callback = MW.MWCallbackPrx.uncheckedCast(
|
||||
adapter.add(new MWCallbackI(), new Ice.Identity("callback", category)));
|
||||
|
||||
await session.setCallback(callback);
|
||||
|
||||
state = State.Connected;
|
||||
|
||||
await new Promise(
|
||||
(resolve, reject) => {
|
||||
setTimeout(function () {
|
||||
run(session);
|
||||
}, 2000);
|
||||
$("#chatInput").keypress(
|
||||
e => {
|
||||
if (e.which === 13) {
|
||||
(async function () {
|
||||
const message = $(e.currentTarget).val();
|
||||
$(e.currentTarget).val("");
|
||||
try {
|
||||
await session.sendPosition("chat " + message);
|
||||
} catch (ex) {
|
||||
reject(ex);
|
||||
}
|
||||
|
||||
}());
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
$("#signout").click(() => {
|
||||
connection.setCloseCallback(null);
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
await router.destroySession();
|
||||
} finally {
|
||||
state = State.Disconnected;
|
||||
}
|
||||
}
|
||||
|
||||
async function signin() {
|
||||
let communicator;
|
||||
try {
|
||||
state = State.Connecting;
|
||||
|
||||
const port = "4064";
|
||||
if (window.location.hostname == "172.100.0.100") {
|
||||
var hostname = "172.100.0.102";
|
||||
} else if (window.location.hostname == "192.168.1.51") {
|
||||
var hostname = "192.168.1.51";
|
||||
} else {
|
||||
var hostname = "83.57.124.192";
|
||||
}
|
||||
|
||||
const proxy = "MWServer/router:ws -p " + port + " -h " + hostname;
|
||||
|
||||
const initData = new Ice.InitializationData();
|
||||
initData.properties = Ice.createProperties();
|
||||
initData.properties.setProperty("Ice.Default.Router", proxy);
|
||||
communicator = Ice.initialize(initData);
|
||||
|
||||
const router = await Glacier2.RouterPrx.checkedCast(communicator.getDefaultRouter());
|
||||
const session = await router.createSession(userName, "pass");
|
||||
await runWithSession(router, MW.MWSessionPrx.uncheckedCast(session));
|
||||
} catch (ex) {
|
||||
|
||||
if (ex instanceof Glacier2.PermissionDeniedException) {
|
||||
await error("permission denied:\n" + ex.reason);
|
||||
} else if (ex instanceof Glacier2.CannotCreateSessionException) {
|
||||
await error("cannot create session:\n" + ex.reason);
|
||||
} else if (ex instanceof Ice.ConnectFailedException) {
|
||||
await error("connection to server failed");
|
||||
} else {
|
||||
await error(ex.toString());
|
||||
}
|
||||
} finally {
|
||||
if (communicator) {
|
||||
await communicator.destroy();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async function error(message) {
|
||||
console.log(message);
|
||||
state = State.Disconnected;
|
||||
}
|
||||
|
||||
signin();
|
||||
});
|
||||
}());
|
||||
123
testing/magicworld/web/js/functions.js
Archivo normal
@@ -0,0 +1,123 @@
|
||||
function percent(m, p){
|
||||
return (m * 100) / p;
|
||||
}
|
||||
|
||||
function getDirection(mouse, wx, wy){
|
||||
if(mouse.y < window.innerHeight/2){
|
||||
if(mouse.x < window.innerWidth/2){
|
||||
if(percent(mouse.x, wx) >= percent(mouse.y, wy)){
|
||||
direction = "up";
|
||||
}else{
|
||||
direction = "left";
|
||||
}
|
||||
}else{
|
||||
if(percent((mouse.x - wx)*-1, wx) >= percent(mouse.y, wy)){
|
||||
direction = "up";
|
||||
}else{
|
||||
direction = "right";
|
||||
}
|
||||
}
|
||||
}else{
|
||||
if(mouse.x < wx/2){
|
||||
if(percent(mouse.x, wx) >= percent((mouse.y - wy) * -1, wy)){
|
||||
direction = "down";
|
||||
}else{
|
||||
direction = "left";
|
||||
}
|
||||
}else{
|
||||
if(percent((mouse.x - wx)*-1, wx) >= percent((mouse.y - wy) * -1, wy)){
|
||||
direction = "down";
|
||||
}else{
|
||||
direction = "right";
|
||||
}
|
||||
}
|
||||
}
|
||||
return direction;
|
||||
}
|
||||
|
||||
function getLive(life){
|
||||
var r = ""
|
||||
for (var i = 0; i < map.player.lives; i++){
|
||||
r += "💗 ";
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
function getParam(name) {
|
||||
name = name.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]');
|
||||
var regex = new RegExp('[\\?&]' + name + '=([^&#]*)');
|
||||
var results = regex.exec(location.search);
|
||||
return results === null ? '' : decodeURIComponent(results[1].replace(/\+/g, ' '));
|
||||
};
|
||||
|
||||
function guid() {
|
||||
function s4() {
|
||||
return Math.floor((1 + Math.random()) * 0x10000)
|
||||
.toString(16)
|
||||
.substring(1);
|
||||
}
|
||||
return s4() + s4(); + '-' + s4() + '-' + s4() + '-' + s4() + '-' + s4() + s4() + s4();
|
||||
}
|
||||
|
||||
function comparePlayer(a, b) {
|
||||
if (a.py > b.py) {
|
||||
return -1;
|
||||
}
|
||||
if (a.py < b.py) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
function comparePlayerScore(a, b) {
|
||||
if (parseInt(a.score) > parseInt(b.score)) {
|
||||
return -1;
|
||||
}
|
||||
if (parseInt(a.score) < parseInt(b.score)) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
function is_touch_device() {
|
||||
try {
|
||||
document.createEvent("TouchEvent");
|
||||
return true;
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function refreshScore(){
|
||||
|
||||
setInterval(function(){
|
||||
$("#scoreOutput").html("");
|
||||
var i = 1;
|
||||
var showPlayer = false;
|
||||
if(map.players){
|
||||
Object.values(map.players).sort(comparePlayerScore).map(function(element){
|
||||
if (score > element.score && !showPlayer){
|
||||
$("#scoreOutput").html($("#scoreOutput").html() + i + "º - " + userName + " - " + score + "<br>");
|
||||
i++;
|
||||
showPlayer = true;
|
||||
}
|
||||
if(!element.deleted){
|
||||
$("#scoreOutput").html($("#scoreOutput").html() + i + "º - " + element.username + " - " + element.score + "<br>");
|
||||
i++;
|
||||
}
|
||||
});
|
||||
}
|
||||
if(!showPlayer){
|
||||
$("#scoreOutput").html($("#scoreOutput").html() + i + "º - " + userName + " - " + score + "<br>");
|
||||
}
|
||||
}, 1000)
|
||||
}
|
||||
|
||||
function getUserRamdom(){
|
||||
function s4() {
|
||||
return Math.floor((1 + Math.random()) * 0x10000)
|
||||
.toString(16)
|
||||
.substring(1);
|
||||
}
|
||||
return "Guest-" + s4();
|
||||
}
|
||||
448
testing/magicworld/web/js/game.js
Archivo normal
@@ -0,0 +1,448 @@
|
||||
var userName = getParam("username") ? getParam("username") : getUserRamdom(),
|
||||
channel = getParam("map") ? getParam("map") : "forest",
|
||||
score = 0,
|
||||
wx = window.innerWidth,
|
||||
wy = window.innerHeight,
|
||||
wx2 = window.innerWidth / 2,
|
||||
wy2 = window.innerHeight / 2,
|
||||
stateScale = wx < 1000 ? 0.5 : 1,
|
||||
zoom = wx < 1000 ? 2 : 1,
|
||||
scaleDivisor = wx < 1000 ? 1 : 2,
|
||||
map,
|
||||
scale = 0,
|
||||
lives = 0,
|
||||
direction = "down",
|
||||
state = "stop",
|
||||
position = {
|
||||
x: 0,
|
||||
y: 0
|
||||
},
|
||||
vx = 0,
|
||||
vy = 0,
|
||||
key = 0;
|
||||
|
||||
window.scrollTo(0, 1);
|
||||
|
||||
function run(session) {
|
||||
$(document).ready(function () {
|
||||
|
||||
$("#chatInput").keypress(
|
||||
e => {
|
||||
if (e.which === 13) {
|
||||
(async function () {
|
||||
const message = $(e.currentTarget).val();
|
||||
$(e.currentTarget).val("");
|
||||
session.send(userName + " chat " + message);
|
||||
}());
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
$(document).keydown(
|
||||
e => {
|
||||
if (e.which === 87) {
|
||||
vy = 100;
|
||||
key + 1;
|
||||
}
|
||||
if (e.which === 83) {
|
||||
vy = -100;
|
||||
key + 1;
|
||||
}
|
||||
if (e.which === 68) {
|
||||
vx = -150;
|
||||
key + 1;
|
||||
}
|
||||
if (e.which === 65) {
|
||||
vx = 150;
|
||||
key + 1;
|
||||
};
|
||||
});
|
||||
|
||||
$(document).keyup(
|
||||
e => {
|
||||
if (e.which === 87) {
|
||||
vy = 0;
|
||||
key -= 1;
|
||||
}
|
||||
if (e.which === 83) {
|
||||
vy = 0;
|
||||
key -= 1;
|
||||
}
|
||||
if (e.which === 68) {
|
||||
vx = 0;
|
||||
key -= 1;
|
||||
}
|
||||
if (e.which === 65) {
|
||||
vx = 0;
|
||||
key -= 1;
|
||||
}
|
||||
key = key > 0 ? key : 0;
|
||||
});
|
||||
|
||||
// Cargamos variables
|
||||
var Container = PIXI.Container,
|
||||
autoDetectRenderer = PIXI.autoDetectRenderer,
|
||||
loader = PIXI.loader,
|
||||
resources = PIXI.loader.resources,
|
||||
Sprite = PIXI.Sprite,
|
||||
responsiveScale = 1,
|
||||
maxFrame = 7,
|
||||
af = 0,
|
||||
df = 5, // Imagenes por segundo
|
||||
stop = true,
|
||||
msg = {},
|
||||
touch;
|
||||
|
||||
scale = map.player.scale;
|
||||
|
||||
// Creamos el render (Esto lo cambiare)
|
||||
var renderer = autoDetectRenderer(wx, wy);
|
||||
|
||||
// Lo añadimos
|
||||
document.body.appendChild(renderer.view);
|
||||
|
||||
// Creamos la stage y le añadimos los eventos del raton
|
||||
var stage = new Container();
|
||||
|
||||
stage.scale.set(wx < 1000 ? 0.5 : 1);
|
||||
|
||||
stage.interactive = true;
|
||||
stage.on('mousedown', clickdown)
|
||||
.on('mouseup', clickup)
|
||||
.on('mouseupoutside', clickup)
|
||||
.on('touchstart', clickdown)
|
||||
.on('touchend', clickup)
|
||||
.on('touchendoutside', clickup);
|
||||
|
||||
// Eventos del raton
|
||||
function clickdown(e) {
|
||||
af = 0;
|
||||
state = "attack";
|
||||
if (is_touch_device()) {
|
||||
touch = e.data.global;
|
||||
}
|
||||
}
|
||||
|
||||
function clickup(e) {
|
||||
af = 0;
|
||||
state = "run";
|
||||
}
|
||||
|
||||
// Caragmos, cetramos y añadimos el fondo.
|
||||
var landscapeTexture = PIXI.Texture.fromImage(map.background.url),
|
||||
texture = new PIXI.Texture(landscapeTexture),
|
||||
background = new PIXI.Sprite(texture);
|
||||
|
||||
bx = (window.innerWidth / scaleDivisor) - (map.size.x / 2);
|
||||
by = (window.innerHeight / scaleDivisor) - (map.size.y / 2);
|
||||
background.position.x = bx;
|
||||
background.position.y = by;
|
||||
stage.addChild(background);
|
||||
|
||||
// Caragmos, cetramos y añadimos el frente.
|
||||
if (map.front) {
|
||||
var landscapeTexture2 = PIXI.Texture.fromImage(map.front.url),
|
||||
texture2 = new PIXI.Texture(landscapeTexture2),
|
||||
front = new PIXI.Sprite(texture2);
|
||||
|
||||
front.position.x = bx;
|
||||
front.position.y = by;
|
||||
}
|
||||
|
||||
|
||||
//Ptexture = new PIXI.Texture(PlandscapeTexture);
|
||||
|
||||
// Caragmos y cetramos los objetos.
|
||||
map.objects.map(function (element) {
|
||||
element.landscapeTexture = PIXI.Texture.fromImage(element.url);
|
||||
element.texture = new PIXI.Texture(element.landscapeTexture);
|
||||
element.item = new PIXI.Sprite(element.texture);
|
||||
element.item.position.x = bx;
|
||||
element.item.position.y = by;
|
||||
});
|
||||
|
||||
// Renderizamos la stage
|
||||
renderer.render(stage);
|
||||
renderer.view.style.position = "absolute";
|
||||
renderer.view.style.display = "block";
|
||||
renderer.autoResize = true;
|
||||
renderer.resize(window.innerWidth, window.innerHeight);
|
||||
loader.add("player", map.player.url).load(setup);
|
||||
|
||||
// Creamos marcador. Primero el estilo del texto depues el objeto, lo pocicionamos y lo agregamos.
|
||||
var scoreStyle = new PIXI.TextStyle({
|
||||
fontFamily: 'komtit',
|
||||
fontSize: 36,
|
||||
fill: ['#FFF1E1', '#FFF1E1'], // gradient
|
||||
stroke: '#35130B',
|
||||
strokeThickness: 10,
|
||||
dropShadow: true,
|
||||
dropShadowColor: '#724833',
|
||||
dropShadowBlur: 4,
|
||||
dropShadowAngle: Math.PI / 2,
|
||||
dropShadowDistance: 3,
|
||||
wordWrap: false,
|
||||
wordWrapWidth: 440,
|
||||
padding: 20
|
||||
});
|
||||
|
||||
var scoreText = new PIXI.Text('Score: ', scoreStyle);
|
||||
scoreText.x = 30;
|
||||
scoreText.y = 20;
|
||||
|
||||
stage.addChild(scoreText);
|
||||
|
||||
var heartTexture = PIXI.Texture.fromImage('/img/gui/heart.png');
|
||||
|
||||
var heartTilingSprite = new PIXI.extras.TilingSprite(
|
||||
heartTexture,
|
||||
44 * lives,
|
||||
37
|
||||
);
|
||||
heartTilingSprite.x = 35;
|
||||
heartTilingSprite.y = 80;
|
||||
heartTilingSprite.scale.set(0.75);
|
||||
stage.addChild(heartTilingSprite);
|
||||
|
||||
// Cargamos el juegador
|
||||
var player,
|
||||
playerTexture,
|
||||
playersName,
|
||||
playersNameStyle;
|
||||
|
||||
function setup() {
|
||||
playersNameStyle = new PIXI.TextStyle({
|
||||
fontFamily: 'komtit',
|
||||
fontSize: 24,
|
||||
fill: ['#FFF1E1', '#FFF1E1'], // gradient
|
||||
stroke: '#35130B',
|
||||
strokeThickness: 5,
|
||||
dropShadow: true,
|
||||
dropShadowColor: '#724833',
|
||||
dropShadowBlur: 4,
|
||||
dropShadowAngle: Math.PI / 2,
|
||||
dropShadowDistance: 1,
|
||||
wordWrap: false,
|
||||
wordWrapWidth: 440,
|
||||
padding: 20
|
||||
});
|
||||
playersName = new PIXI.Text(userName, playersNameStyle);
|
||||
|
||||
playerTexture = loader.resources["player"].texture;
|
||||
playerTexture.frame = map.player.sprite[state][direction][0];
|
||||
player = new Sprite(playerTexture);
|
||||
player.scale.set(scale);
|
||||
player.x = window.innerWidth / scaleDivisor;
|
||||
player.y = window.innerHeight / scaleDivisor;
|
||||
|
||||
playersName.scale.set(scale / map.player.scale);
|
||||
playersName.x = player.x + (player.width / 2) - (playersName.width / 2);
|
||||
playersName.y = player.y - (player.height / 6);
|
||||
|
||||
|
||||
stage.addChild(player);
|
||||
stage.addChild(playersName);
|
||||
renderer.render(stage);
|
||||
// Comienza el loop
|
||||
gameLoop();
|
||||
refreshScore();
|
||||
}
|
||||
|
||||
function gameLoop() {
|
||||
// Empieza el loop y carga las varibles
|
||||
var mouse;
|
||||
if (is_touch_device()) {
|
||||
mouse = touch ? touch : {
|
||||
x: 0,
|
||||
y: 0
|
||||
};
|
||||
} else {
|
||||
mouse = renderer.plugins.interaction.mouse.global;
|
||||
}
|
||||
|
||||
// Cargamos la direcion del sprite y aplicamos los ajustes
|
||||
direction = getDirection(mouse, wx, wy);
|
||||
|
||||
if (direction == "up" || direction == "down") {
|
||||
maxFrame = 8;
|
||||
df = 5;
|
||||
}
|
||||
if (direction == "left" || direction == "right") {
|
||||
maxFrame = 6;
|
||||
df = 8;
|
||||
}
|
||||
|
||||
// Vemos que el personaje no tenga el raton encima (Parado)
|
||||
if (player) {
|
||||
if (mouse.y > wy2 - (player.height / 2) && mouse.y < wy2 + (player.height / 2) &&
|
||||
mouse.x > wx2 - (player.width / 2) && mouse.x < wx2 + (player.width / 2)) {
|
||||
if (state != "attack") {
|
||||
state = "stop";
|
||||
}
|
||||
stop = true;
|
||||
} else {
|
||||
if (state != "attack") {
|
||||
state = "run";
|
||||
}
|
||||
stop = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (key == 0) {
|
||||
if (stop == false) {
|
||||
var px = percent(mouse.x, wx) - 50,
|
||||
py = percent(mouse.y, wy) - 50;
|
||||
|
||||
vx = (px < 0 ? (px < -25 ? -115 : px * 3) : (px > 25 ? 115 : px * 3)) * -1,
|
||||
vy = (py < 0 ? (py < -25 ? -115 : py * 3) : (py > 25 ? 115 : py * 3)) * -1;
|
||||
} else {
|
||||
vx = 0,
|
||||
vy = 0;
|
||||
}
|
||||
}
|
||||
|
||||
background.position.x = (bx) - position.x;
|
||||
background.position.y = (by) - position.y;
|
||||
|
||||
|
||||
if (map.front) {
|
||||
front.position.x = bx - position.x;
|
||||
front.position.y = by - position.y;
|
||||
}
|
||||
|
||||
map.objects.map(function (element) {
|
||||
element.item.position.x = bx - position.x + element.x;
|
||||
element.item.position.y = by - position.y + element.y;
|
||||
});
|
||||
|
||||
|
||||
//Mandamos pocisicon al server;
|
||||
msg = userName + ` {"vx":${ vx ? vx : 0 },"vy":${ vy ? vy : 0} ,"state": "${state}", "direction":"${direction}", "width":"${player.width}", "height":"${player.height}" } `;
|
||||
session.send(msg);
|
||||
|
||||
// Ajusta el fotograma
|
||||
if (af >= maxFrame) {
|
||||
af = 0;
|
||||
} else {
|
||||
af += 1 / df;
|
||||
}
|
||||
|
||||
// Aplica el foto grama
|
||||
if (playerTexture) {
|
||||
playerTexture.frame = map.player.sprite[state][direction][Math.floor(af)] ? map.player.sprite[state][direction][Math.floor(af)] : map.player.sprite[state][direction][0];
|
||||
}
|
||||
|
||||
// Borramos todos los obejetos de la pantalla
|
||||
stage.removeChild(player);
|
||||
stage.removeChild(playersName);
|
||||
|
||||
map.objects.map(function (element) {
|
||||
stage.removeChild(element.item);
|
||||
});
|
||||
|
||||
jQuery.each(map.players, function (i, element) {
|
||||
if (element.item) {
|
||||
stage.removeChild(element.item);
|
||||
stage.removeChild(element.name);
|
||||
}
|
||||
});
|
||||
|
||||
if (map.front) {
|
||||
stage.removeChild(front);
|
||||
}
|
||||
|
||||
stage.removeChild(heartTilingSprite);
|
||||
stage.removeChild(scoreText);
|
||||
|
||||
// Calculamos la posicion del jugador
|
||||
player.scale.set(scale);
|
||||
player.x = (wx / scaleDivisor) - ((player.width / scaleDivisor) / zoom);
|
||||
player.y = (wy / scaleDivisor) - ((player.height / scaleDivisor) / zoom);
|
||||
|
||||
playersName.scale.set(scale / map.player.scale);
|
||||
playersName.x = player.x + (player.width / 2) - (playersName.width / 2);
|
||||
playersName.y = player.y - (player.height / 6);
|
||||
|
||||
// Dibujamos los objetos
|
||||
map.objects.map(function (element, key) {
|
||||
if (position.y > element.yv && position.x > element.xv) {
|
||||
stage.addChild(element.item);
|
||||
}
|
||||
});
|
||||
|
||||
var paintedPlayer = false;
|
||||
if (map.players) {
|
||||
Object.values(map.players).sort(comparePlayer).map(function (element) {
|
||||
if (element.position.y > position.y && !paintedPlayer) {
|
||||
stage.addChild(player);
|
||||
stage.addChild(playersName);
|
||||
paintedPlayer = true;
|
||||
}
|
||||
if (!element.deleted) {
|
||||
try {
|
||||
element.item.scale.set(element.scale);
|
||||
element.texture.frame = map.player.sprite[element.state][element.direction][Math.floor(af)] ? map.player.sprite[element.state][element.direction][Math.floor(af)] : map.player.sprite[element.state][element.direction][0];
|
||||
element.item.position.x = (wx / scaleDivisor) - position.x + (element.position.x - (element.item.width / 2));
|
||||
element.item.position.y = (wy / scaleDivisor) - position.y + (element.position.y - (element.item.height / 2));
|
||||
element.name.scale.set(element.scale / map.player.scale);
|
||||
element.name.x = element.item.position.x + (element.item.width / 2) - (element.name.width / 2);
|
||||
element.name.y = element.item.position.y - (element.item.height / 6);
|
||||
stage.addChild(element.item);
|
||||
stage.addChild(element.name);
|
||||
}
|
||||
catch(error) {
|
||||
console.error(error);
|
||||
}
|
||||
|
||||
} else {
|
||||
delete element.item;
|
||||
delete element.name;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (!paintedPlayer) {
|
||||
stage.addChild(player);
|
||||
stage.addChild(playersName);
|
||||
}
|
||||
|
||||
if (map.front) {
|
||||
stage.addChild(front);
|
||||
}
|
||||
|
||||
//Actualizamos el marcador.
|
||||
scoreText.text = 'Score: ' + score + '\n';
|
||||
heartTilingSprite.width = 44 * lives;
|
||||
stage.addChild(heartTilingSprite);
|
||||
stage.addChild(scoreText);
|
||||
|
||||
// Lo renderizamos y mandamos la proxima llamada del bucle.
|
||||
stage.scale.set(stateScale);
|
||||
renderer.render(stage);
|
||||
requestAnimationFrame(gameLoop);
|
||||
}
|
||||
|
||||
window.onresize = function (event) {
|
||||
setTimeout(function () {
|
||||
wx = window.innerWidth;
|
||||
wy = window.innerHeight;
|
||||
wx2 = window.innerWidth / 2;
|
||||
wy2 = window.innerHeight / 2;
|
||||
bx = (window.innerWidth / scaleDivisor) - (map.size.x / 2);
|
||||
by = (window.innerHeight / scaleDivisor) - (map.size.y / 2);
|
||||
|
||||
stateScale = wx < 1000 ? 0.5 : 1;
|
||||
zoom = wx < 1000 ? 2 : 1;
|
||||
scaleDivisor = wx < 1000 ? 1 : 2;
|
||||
|
||||
renderer.resize(wx, wy);
|
||||
window.onresize();
|
||||
});
|
||||
}
|
||||
|
||||
$("#chatInput").css({
|
||||
"font-family": 'oswald'
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
31
testing/magicworld/web/js/index.js
Archivo normal
@@ -0,0 +1,31 @@
|
||||
|
||||
var audio = new Audio('/sounds/wonderworld.mp3');
|
||||
audio.loop = true
|
||||
audio.play();
|
||||
audio.volume = 0.5
|
||||
|
||||
function play(){
|
||||
audio.play();
|
||||
$("#musicStop").removeClass("d-none");
|
||||
$("#musicPlay").addClass("d-none");
|
||||
}
|
||||
|
||||
function stop(){
|
||||
audio.pause();
|
||||
$("#musicPlay").removeClass("d-none");
|
||||
$("#musicStop").addClass("d-none");
|
||||
}
|
||||
$(document).ready(function () {
|
||||
// stop();
|
||||
$("#username").val(getUserRamdom());
|
||||
|
||||
$("#username").on({
|
||||
keydown: function(e) {
|
||||
if (e.which === 32)
|
||||
return false;
|
||||
},
|
||||
change: function() {
|
||||
this.value = this.value.replace(/\s/g, "");
|
||||
}
|
||||
});
|
||||
});
|
||||