This commit is contained in:
Diego F. Goberna
2018-12-05 23:42:54 +01:00
committed by Diego Marcos
parent cba2bb9459
commit 25ec36e686
10 changed files with 7285 additions and 128 deletions

BIN
assets/img/logotex.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

7047
assets/models/logo.obj Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,115 +1,171 @@
# Blender v2.79 (sub 0) OBJ File: 'logo.blend'
# Blender v2.79 (sub 0) OBJ File: 'logo_ingame.blend'
# www.blender.org
o front-u
v -2.717021 0.213856 -0.432641
v -2.481948 0.213856 -0.432641
v -2.596068 0.281658 0.246647
v -2.601781 0.284149 0.271606
v -2.609817 0.286328 0.293430
v -2.620259 0.288268 0.312870
v -2.633156 0.289993 0.330149
v -2.648534 0.291517 0.345422
v -2.666604 0.292851 0.358787
v -2.687619 0.294000 0.370291
v -2.711763 0.294958 0.379890
v -2.739197 0.295718 0.387510
v -2.769191 0.296269 0.393030
v -2.802123 0.296603 0.396378
v -2.838644 0.296717 0.397516
v -3.075703 0.296717 0.397516
v -3.112225 0.296603 0.396379
v -3.144592 0.296271 0.393043
v -3.172701 0.295728 0.387611
v -3.196138 0.294992 0.380236
v -3.215701 0.294078 0.371080
v -3.231472 0.293008 0.360358
v -3.243768 0.291791 0.348168
v -3.253002 0.290412 0.334349
v -3.259457 0.288829 0.318485
v -3.263135 0.286993 0.300092
v -3.263813 0.284873 0.278855
v -3.261158 0.282399 0.254070
v -3.145792 0.213856 -0.432641
v -2.910716 0.213856 -0.432641
v -3.019783 0.278656 0.216573
v -3.020541 0.279347 0.223487
v -3.020359 0.280111 0.231145
v -3.018923 0.280885 0.238901
v -3.016008 0.281642 0.246482
v -3.011583 0.282336 0.253433
v -3.005905 0.282922 0.259309
v -2.999403 0.283381 0.263903
v -2.992451 0.283717 0.267272
v -2.985247 0.283950 0.269610
v -2.977841 0.284101 0.271118
v -2.970201 0.284184 0.271950
v -2.962610 0.284209 0.272199
v -2.894376 0.284209 0.272199
v -2.886713 0.284184 0.271953
v -2.878971 0.284103 0.271144
v -2.871470 0.283961 0.269720
v -2.864215 0.283750 0.267602
v -2.857247 0.283460 0.264700
v -2.850662 0.283085 0.260937
v -2.844611 0.282620 0.256283
v -2.839276 0.282071 0.250784
v -2.834814 0.281451 0.244570
v -2.831311 0.280778 0.237825
v -2.828767 0.280069 0.230728
v -2.827246 0.279396 0.223987
vn 0.0000 0.9951 -0.0993
v -2.717021 0.219126 -0.429996
v -2.481948 0.219126 -0.429996
v -2.596068 0.278624 0.250069
v -2.601781 0.280810 0.275057
v -2.609817 0.282722 0.296906
v -2.620259 0.284424 0.316369
v -2.633156 0.285938 0.333667
v -2.648534 0.287275 0.348958
v -2.666604 0.288446 0.362338
v -2.687619 0.289454 0.373855
v -2.711763 0.290295 0.383466
v -2.739197 0.290962 0.391094
v -2.769191 0.291445 0.396620
v -2.802123 0.291739 0.399972
v -2.838644 0.291838 0.401112
v -3.075703 0.291838 0.401112
v -3.112225 0.291739 0.399973
v -3.144592 0.291447 0.396634
v -3.172701 0.290971 0.391195
v -3.196138 0.290325 0.383812
v -3.215701 0.289523 0.374645
v -3.231472 0.288584 0.363911
v -3.243768 0.287516 0.351706
v -3.253002 0.286306 0.337873
v -3.259457 0.284916 0.321990
v -3.263135 0.283305 0.303576
v -3.263813 0.281445 0.282315
v -3.261158 0.279274 0.257501
v -3.145792 0.219126 -0.429996
v -2.910716 0.219126 -0.429996
v -3.019783 0.275990 0.219961
v -3.020541 0.276595 0.226883
v -3.020359 0.277266 0.234550
v -3.018923 0.277945 0.242315
v -3.016008 0.278609 0.249905
v -3.011583 0.279218 0.256863
v -3.005905 0.279733 0.262747
v -2.999403 0.280135 0.267345
v -2.992451 0.280430 0.270718
v -2.985247 0.280635 0.273059
v -2.977841 0.280767 0.274569
v -2.970201 0.280840 0.275402
v -2.962610 0.280862 0.275651
v -2.894376 0.280862 0.275651
v -2.886713 0.280840 0.275404
v -2.878971 0.280770 0.274595
v -2.871470 0.280645 0.273169
v -2.864215 0.280459 0.271048
v -2.857247 0.280205 0.268143
v -2.850662 0.279876 0.264376
v -2.844611 0.279468 0.259717
v -2.839276 0.278986 0.254211
v -2.834814 0.278442 0.247990
v -2.831311 0.277851 0.241237
v -2.828767 0.277230 0.234132
v -2.827246 0.276639 0.227384
vt 0.200741 0.615191
vt 0.200773 0.615318
vt 0.199274 0.617357
vt 0.201765 0.616085
vt 0.209735 0.613586
vt 0.211194 0.617264
vt 0.202238 0.620649
vt 0.906927 0.639345
vt 0.906550 0.639454
vt 0.904667 0.638315
vt 0.201668 0.616108
vt 0.906211 0.639488
vt 0.904887 0.638685
vt 0.905903 0.639455
vt 0.905121 0.638979
vt 0.905623 0.639359
vt 0.905365 0.639202
vt 0.199978 0.619619
vt 0.199773 0.619174
vt 0.199585 0.618641
vt 0.201438 0.616102
vt 0.199418 0.618033
vt 0.201317 0.616062
vt 0.201091 0.615907
vt 0.200999 0.615802
vt 0.201198 0.615996
vt 0.198521 0.613318
vt 0.200448 0.613704
vt 0.200453 0.613588
vt 0.198431 0.612746
vt 0.200469 0.613475
vt 0.198384 0.612238
vt 0.200543 0.613269
vt 0.198377 0.611782
vt 0.200600 0.613181
vt 0.198406 0.611371
vt 0.200671 0.613106
vt 0.200499 0.613368
vt 0.198471 0.611013
vt 0.200752 0.613045
vt 0.198570 0.610704
vt 0.198700 0.610440
vt 0.200841 0.612999
vt 0.198863 0.610216
vt 0.199057 0.610027
vt 0.199285 0.609873
vt 0.199549 0.609753
vt 0.200928 0.612969
vt 0.199858 0.609663
vt 0.207509 0.607974
vt 0.208668 0.610895
vt 0.200455 0.613825
vt 0.201557 0.616115
vt 0.200471 0.613949
vt 0.200924 0.615688
vt 0.200494 0.614072
vt 0.200863 0.615569
vt 0.200813 0.615446
s 1
f 43//1 42//1 16//1
f 31//1 30//1 29//1
f 29//1 28//1 31//1
f 28//1 27//1 20//1
f 31//1 28//1 32//1
f 27//1 26//1 21//1
f 26//1 25//1 22//1
f 21//1 26//1 22//1
f 25//1 24//1 23//1
f 23//1 22//1 25//1
f 21//1 20//1 27//1
f 20//1 19//1 28//1
f 19//1 18//1 34//1
f 18//1 17//1 35//1
f 37//1 16//1 38//1
f 17//1 16//1 36//1
f 16//1 15//1 43//1
f 47//1 15//1 48//1
f 15//1 14//1 49//1
f 14//1 13//1 51//1
f 15//1 49//1 48//1
f 13//1 12//1 52//1
f 12//1 11//1 53//1
f 50//1 14//1 51//1
f 11//1 10//1 54//1
f 10//1 9//1 54//1
f 9//1 8//1 55//1
f 8//1 7//1 55//1
f 7//1 6//1 55//1
f 6//1 5//1 55//1
f 5//1 4//1 56//1
f 4//1 3//1 56//1
f 3//1 2//1 1//1
f 3//1 1//1 56//1
f 9//1 55//1 54//1
f 12//1 53//1 52//1
f 14//1 50//1 49//1
f 16//1 37//1 36//1
f 15//1 47//1 46//1
f 32//1 28//1 33//1
f 33//1 28//1 34//1
f 15//1 46//1 45//1
f 56//1 55//1 5//1
f 51//1 13//1 52//1
f 34//1 28//1 19//1
f 54//1 53//1 11//1
f 35//1 34//1 18//1
f 36//1 35//1 17//1
f 39//1 38//1 16//1
f 15//1 45//1 44//1
f 40//1 39//1 16//1
f 41//1 40//1 16//1
f 15//1 44//1 43//1
f 42//1 41//1 16//1
f 43/1 42/2 16/3
f 31/4 30/5 29/6
f 29/6 28/7 31/4
f 28/8 27/9 20/10
f 31/4 28/7 32/11
f 27/9 26/12 21/13
f 26/12 25/14 22/15
f 21/13 26/12 22/15
f 25/14 24/16 23/17
f 23/17 22/15 25/14
f 21/13 20/10 27/9
f 20/18 19/19 28/7
f 19/19 18/20 34/21
f 18/20 17/22 35/23
f 37/24 16/3 38/25
f 17/22 16/3 36/26
f 16/3 15/27 43/1
f 47/28 15/27 48/29
f 15/27 14/30 49/31
f 14/30 13/32 51/33
f 15/27 49/31 48/29
f 13/32 12/34 52/35
f 12/34 11/36 53/37
f 50/38 14/30 51/33
f 11/36 10/39 54/40
f 10/39 9/41 54/40
f 9/41 8/42 55/43
f 8/42 7/44 55/43
f 7/44 6/45 55/43
f 6/45 5/46 55/43
f 5/46 4/47 56/48
f 4/47 3/49 56/48
f 3/49 2/50 1/51
f 3/49 1/51 56/48
f 9/41 55/43 54/40
f 12/34 53/37 52/35
f 14/30 50/38 49/31
f 16/3 37/24 36/26
f 15/27 47/28 46/52
f 32/11 28/7 33/53
f 33/53 28/7 34/21
f 15/27 46/52 45/54
f 56/48 55/43 5/46
f 51/33 13/32 52/35
f 34/21 28/7 19/19
f 54/40 53/37 11/36
f 35/23 34/21 18/20
f 36/26 35/23 17/22
f 39/55 38/25 16/3
f 15/27 45/54 44/56
f 40/57 39/55 16/3
f 41/58 40/57 16/3
f 15/27 44/56 43/1
f 42/2 41/58 16/3

View File

@@ -0,0 +1,13 @@
# Blender v2.79 (sub 0) OBJ File: 'logo_ingame.blend'
# www.blender.org
v -4.664457 0.390802 1.071457
v 4.289112 0.390802 1.071457
v -4.664457 0.262706 -0.962642
v 4.289112 0.262706 -0.962642
vt 0.347319 0.003906
vt 0.784990 0.996094
vt 0.347320 0.996094
vt 0.784990 0.003906
s off
f 2/1 3/2 1/3
f 2/1 4/4 3/2

17
assets/shaders/flat.js Normal file
View File

@@ -0,0 +1,17 @@
module.exports = {
vertexShader : `
varying vec2 uvs;
void main() {
uvs.xy = uv.xy;
gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
}
`,
fragmentShader: `
varying vec2 uvs;
uniform sampler2D src;
void main() {
gl_FragColor = texture2D(src, uvs);
}
`};

View File

@@ -4,9 +4,11 @@
<a-asset-item id="dotblueObj" src="assets/models/dotblue.obj"></a-asset-item>
<a-asset-item id="backglowObj" src="assets/models/backglow.obj"></a-asset-item>
<a-asset-item id="beatObj" src="assets/models/beat.obj"></a-asset-item>
<!--
<a-asset-item id="logofrontObj" src="assets/models/logofront.obj"></a-asset-item>
<a-asset-item id="logobackObj" src="assets/models/logoback.obj"></a-asset-item>
<a-asset-item id="logofrontUObj" src="assets/models/logofront-u.obj"></a-asset-item>
-->
<a-asset-item id="laserObj" src="assets/models/laser/laser.obj"></a-asset-item>
<!--<a-asset-item id="laserNeonObj" src="assets/models/laserneon.obj"></a-asset-item>-->
<a-asset-item id="logoSparksJSON" src="assets/models/logosparks.json"></a-asset-item>
@@ -29,6 +31,11 @@
<a-asset-item id="audiocolumnObj" src="assets/models/audiocolumn.obj"></a-asset-item>
<a-asset-item id="leftLaserObj" src="assets/models/leftlaser.obj"></a-asset-item>
<a-asset-item id="rightLaserObj" src="assets/models/rightlaser.obj"></a-asset-item>
<a-asset-item id="logoObj" src="assets/models/logo.obj"></a-asset-item>
<a-asset-item id="logofrontUObj" src="assets/models/logofront-u.obj"></a-asset-item>
<a-asset-item id="logoGlowObj" src="assets/models/logoglow.obj"></a-asset-item>
<!--<a-asset-item id="wallglowObj" src="assets/models/wallglow.obj"></a-asset-item>-->
@@ -72,6 +79,7 @@
<img id="floorEnvImg" src="assets/img/floorenv.jpg">
<img id="floorNormalsImg" src="assets/img/floornormals.png">
<img id="atlasImg" src="assets/img/atlas.png">
<img id="logotexImg" src="assets/img/logotex.png">
<a-mixin id="slice" slice9="color: #050505; transparent: true; opacity: 0.9; src: #sliceImg; left: 50; right: 52; top: 50; bottom: 52; padding: 0.18"></a-mixin>
<a-mixin id="font" text="font: assets/fonts/Teko-Bold.json; shader: msdf; letterSpacing: 1"></a-mixin>

View File

@@ -33,8 +33,7 @@ AFRAME.registerComponent('logoflicker', {
this.sparkPositions[Math.floor(Math.random() * this.sparkPositions.length)],
false);
this.timeout = setTimeout(this.setOn,
50 + Math.floor(Math.random() * 100));
this.timeout = setTimeout(this.setOn, 50);
},
setOn: function () {

View File

@@ -1,5 +1,6 @@
const stageNormalShaders = require('../../assets/shaders/stageNormal.js');
const stageAdditiveShaders = require('../../assets/shaders/stageAdditive.js');
const flatShaders = require('../../assets/shaders/flat.js');
const COLORS = require('../constants/colors.js');
AFRAME.registerSystem('materials', {
@@ -30,6 +31,29 @@ AFRAME.registerSystem('materials', {
fog: false,
transparent: true
});
this.logo = new THREE.ShaderMaterial({
uniforms: {
src: {value: new THREE.TextureLoader().load(document.getElementById('logotexImg').src)},
},
vertexShader: flatShaders.vertexShader,
fragmentShader: flatShaders.fragmentShader,
depthTest: false,
fog: false,
transparent: true
});
this.logoadditive = new THREE.ShaderMaterial({
uniforms: {
src: {value: new THREE.TextureLoader().load(document.getElementById('logotexImg').src)},
},
vertexShader: flatShaders.vertexShader,
fragmentShader: flatShaders.fragmentShader,
depthTest: false,
blending: THREE.AdditiveBlending,
fog: false,
transparent: true
});
}
});

View File

@@ -111,19 +111,12 @@
<a-entity light="type: directional; intensity: 3" position="0 10 10"></a-entity>
<a-entity
id="logolight"
position="0 6 0"
rotation="0 50 0"
logo-light
animation__rotate="property: object3D.rotation.y; from: 50; to: -50; dur: 300; easing: linear; startEvents: audioanalyserbeat"></a-entity>
<a-entity id="logosparks" bind__visible="menuActive || isVictory" particleplayer="src: #logoSparksJSON; scale: 1.4; pscale: 0.35; count: 10; interpolate: true; dur: 1000; on: logoflicker; animateScale: true; initialScale: 1.5 1.5 1.5; finalScale: 0.3 0.3 0.3" position="-2.8 5.5 -7.2"></a-entity>
<a-entity id="logo" bind__visible="menuActive || isVictory" position="0 6 -7.5" rotation="90 0 0">
<a-entity id="logoBack" obj-model="obj: #logobackObj" material="color: #001b29"></a-entity>
<a-entity id="logoFront" obj-model="obj: #logofrontObj" material="color: #e81e23"></a-entity>
<a-entity id="logoFrontU" obj-model="obj: #logofrontUObj" material="color: #e81e23" logoflicker="delay: 1200" bind__logoflicker="active: menuActive || isVictory"></a-entity>
<a-entity id="logoObj" obj-model="obj: #logoObj" materials="name: logo"></a-entity>
<a-entity id="logoFrontU" obj-model="obj: #logofrontUObj" materials="name: logo" logoflicker="delay: 1200" bind__logoflicker="active: menuActive || isVictory"></a-entity>
<a-entity id="logoGlowObj" obj-model="obj: #logoGlowObj" materials="name: logoadditive"></a-entity>
</a-entity>
<a-entity id="logosparks" bind__visible="menuActive || isVictory" particleplayer="src: #logoSparksJSON; scale: 1.4; pscale: 0.35; count: 10; interpolate: true; dur: 1000; on: logoflicker; animateScale: true; initialScale: 1.5 1.5 1.5; finalScale: 0.3 0.3 0.3" position="-2.8 5.5 -7.2"></a-entity>
<!-- material="color: #030303" -->
<a-entity

View File

@@ -35,8 +35,8 @@
bind__visible="menuActive">
<a-entity
mixin="font"
text="align: center; value: HOW TO PLAY; color: #aaa; wrapCount: 30; width: 3"
position="0 0.4 0"></a-entity>
text="align: center; value: HOW TO PLAY; wrapCount: 30; width: 3"
position="0 0.6 0"></a-entity>
<a-entity mixin="slice" slice9="left: 70; width: 3.3; height: 1.6; padding: 0.12; opacity: 0.9" position="0 0 -0.01"></a-entity>