Commit 02d327c7 authored by DavidLibeau's avatar DavidLibeau
Browse files

Add first VR website draft

parent c6ce22ea
AFRAME.registerShader('gradient', {
schema: {
topColor: {type: 'vec3', default: '1 0 0', is: 'uniform'},
bottomColor: {type: 'vec3', default: '0 0 1', is: 'uniform'},
offset: {type: 'float', default: '400', is: 'uniform'},
exponent: {type: 'float', default: '0.6', is: 'uniform'}
},
vertexShader: [
'varying vec3 vWorldPosition;',
'void main() {',
'vec4 worldPosition = modelMatrix * vec4( position, 1.0 );',
'vWorldPosition = worldPosition.xyz;',
'gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0 );',
'}'
].join('\n'),
fragmentShader: [
'uniform vec3 bottomColor;',
'uniform vec3 topColor;',
'uniform float offset;',
'uniform float exponent;',
'varying vec3 vWorldPosition;',
'void main() {',
' float h = normalize( vWorldPosition + offset ).y;',
' gl_FragColor = vec4( mix( bottomColor, topColor, max( pow( max(h, 0.0 ), exponent ), 0.0 ) ), 1.0 );',
'}'
].join('\n')
});
AFRAME.registerPrimitive('a-gradient-ground', {
defaultComponents: {
geometry: {
primitive: 'circle',
segments: 32,
thetaStrat: 0,
thetaLenght: 360,
radius: 20
},
material: {
shader: 'gradient'
}/*,
scale: '-1 1 1'*/
},
mappings: {
topColor: 'material.topColor',
bottomColor: 'material.bottomColor',
offset: 'material.offset',
exponent: 'material.exponent'
}
});
AFRAME.registerPrimitive('a-gradient-sky', {
defaultComponents: {
geometry: {
primitive: 'sphere',
radius: 5000,
segmentsWidth: 64,
segmentsHeight: 20
},
material: {
shader: 'gradient'
},
scale: '-1 1 1'
},
mappings: {
topColor: 'material.topColor',
bottomColor: 'material.bottomColor',
offset: 'material.offset',
exponent: 'material.exponent'
}
});
\ No newline at end of file
<html>
<head>
<title>VR test</title>
<meta name="description" content="Using different typeface fonts"></meta>
<script src="https://aframe.io/releases/0.5.0/aframe.min.js"></script>
<script src="resrc/script/text-geometry-aframe.js"></script>
<script src="resrc/script/crawling-cursor-aframe.js"></script>
<script src="customs.js"></script>
<script type="text/javascript" src="//dav.li/jquery/2.1.4.js"></script>
<script src="script.js"></script>
</head>
<body>
<a-scene>
<a-assets>
<a-asset-item id="droidFont" src="resrc/font/droid_sans_mono_regular.typeface.json"></a-asset-item>
<a-asset-item id="bebasNeue" src="resrc/font/Bebas_Neue_Regular.typeface.json"></a-asset-item>
<img id="resrc-logoScript" src="resrc/img/LogoScriptDavidLibeau.svg" />
<img id="Gradient" src="resrc/img/gradient.png" />
<img id="resrc-CV" src="resrc/img/DavidLibeau_CV.jpg" />
</a-assets>
<a-image class="logoScript" src="#resrc-logoScript" position="0 1.6 -4" scale="3 1.5 1.5"></a-image>
<a-box class="logoScript" color="#424242" position="0 1.6 -4.8" scale="3.3 1.6 0.5"></a-box>
<a-sphere id="logoScriptBg" color="#424242" position="0 1.6 0" radius="4.8" side="double" opacity="0.95"></a-sphere>
<a-cone id="arrowLeft" color="white" hover-color="#424242" radius-bottom="0.5" radius-top="0" position="0 0.7 -3" rotation="-90 -90 0" scale="0.3 0.3 0.3"></a-cone>
<a-entity class="CV" text-geometry="value: CV; font: #bebasNeue" material="color: #ffffff" position="-2.3 1.35 -4" visible="false"></a-entity>
<a-image class="CV" src="#resrc-CV" position="0 1.6 -4" scale="3 3.8 1.5" visible="false"></a-image>
<a-circle color="#000" transparent="true" opacity="0" rotation="-90 0 0" position="0 -0.2 0" radius="20"></a-circle>
<a-circle color="#000" transparent="true" opacity="0.1" rotation="-90 0 0" position="0 0 0" radius="2"></a-circle>
<a-circle color="#424242" rotation="-90 0 0" position="0 0.05 0" radius="1"></a-circle>
<a-sky src="#Gradient"></a-sky>
<a-camera fov="50" wasd-controls="enabled: false">
<!--a-entity geometry="primitive: plane; height: 0.15; width: 0.2" position="0 -0.35 -1" material="color: #424242; opacity: 0.5"></a-entity-->
<a-entity position="0 0 -3" geometry="primitive: ring; radiusOuter: 0.30;
radiusInner: 0.20;" material="color: black; shader: flat" cursor="maxDistance: 30; fuse: true">
<a-animation begin="click" easing="ease-in" attribute="scale" fill="backwards" from="0.15 0.15 0.15" to="0.1 0.1 0.1" dur="150"></a-animation>
<a-animation begin="fusing" easing="ease-in" attribute="scale" fill="forwards" from="0.5 0.5 0.5" to="0.15 0.15 0.15" dur="1500"></a-animation>
</a-entity>
</a-camera>
<a-entity include-script></a-entity>
</a-scene>
</body>
</html>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Calque_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="710px" height="314px" viewBox="-12.917 -8 710 314" enable-background="new -12.917 -8 710 314" xml:space="preserve">
<path fill="#F0F0F0" d="M155.115,222.652c-10.934,0-21.292-1.263-30.394-2.611c-1.093-0.162-1.847-1.179-1.686-2.271
c0.162-1.093,1.181-1.848,2.271-1.686c12.228,1.812,26.751,3.467,41.749,2.01c1.09-0.108,2.078,0.697,2.184,1.797
c0.107,1.1-0.698,2.077-1.797,2.184C163.279,222.479,159.157,222.652,155.115,222.652z"/>
<path fill="#F0F0F0" d="M179.754,127.755c-9.318,0-18.889-2.057-26.96-8.16c-8.674-6.558-14.011-17.017-14.278-27.978
c-0.241-9.876,3.664-18.689,10.994-24.814c0.847-0.708,2.109-0.596,2.817,0.252c0.708,0.847,0.595,2.109-0.252,2.817
c-6.375,5.327-9.77,13.015-9.56,21.647c0.237,9.752,4.982,19.056,12.691,24.885c19.337,14.62,49.118,3.528,58.904-0.117l0.437-0.163
c4.474-1.664,10.318-3.935,17.085-6.564c25.329-9.841,63.605-24.712,84.489-28.745c1.093-0.208,2.134,0.5,2.343,1.585
c0.209,1.084-0.5,2.133-1.585,2.343c-20.53,3.964-58.604,18.757-83.798,28.545c-6.782,2.635-12.638,4.91-17.139,6.584l-0.435,0.162
C209.152,122.403,194.782,127.755,179.754,127.755z"/>
<path fill="#F0F0F0" d="M235,90c-0.499,0-0.998-0.186-1.386-0.559c-1.872-1.8-3.682-3.708-5.597-5.729
c-4.597-4.848-9.351-9.86-15.534-13.958c-0.921-0.61-1.173-1.852-0.563-2.772c0.611-0.921,1.851-1.172,2.772-0.563
c6.564,4.349,11.698,9.763,16.228,14.54c1.883,1.986,3.662,3.862,5.467,5.598c0.796,0.766,0.821,2.031,0.055,2.828
C236.049,89.794,235.525,90,235,90z"/>
<path fill="#F0F0F0" d="M344.998,78.781c-0.919,0-1.747-0.638-1.952-1.573c-0.236-1.079,0.447-2.145,1.526-2.381
c16.611-3.639,31.299-2.373,31.916-2.317c1.1,0.099,1.911,1.071,1.812,2.17c-0.099,1.101-1.081,1.907-2.17,1.813
c-0.145-0.014-14.718-1.261-30.702,2.24C345.284,78.766,345.14,78.781,344.998,78.781z"/>
<g>
<path fill="#F0F0F0" d="M133.359,275.989c-2.119,0-4.217-0.184-6.296-0.553c-13.75-2.439-24.156-12.59-31.426-21.697
c-4.766,5.443-10.018,9.481-15.687,11.549c-9.669,3.526-19.125,1.576-25.292-5.214c-5.655-6.226-7.261-15-3.997-21.833
c3.512-7.349,9.997-12.028,17.793-12.838c8.597-0.891,17.13,3.021,22.827,10.471c0.917,1.2,1.945,2.673,3.134,4.378
c0.413,0.592,0.842,1.208,1.289,1.844c17.042-26.046,26.159-74.004,20.395-97.807l6.804-1.648
c6.403,26.443-3.259,77.767-22.826,105.437c6.688,8.678,16.009,18.303,28.209,20.467c9.102,1.616,18.928-1.216,29.208-8.411
c14.285-9.999,23.245-27.362,25.229-48.891c2.295-24.897-5.402-51.761-18.72-65.325c-10.724-10.923-24.509-16.756-38.78-16.423
c-11.478,0.267-22.347,4.612-28.364,11.339c-4.989,5.578-7.019,11.338-5.87,16.656c1.221,5.654,6.114,10.748,13.425,13.976
l-2.827,6.404c-9.522-4.204-15.716-10.917-17.44-18.902c-1.144-5.299-0.773-13.557,7.495-22.8
c7.375-8.245,19.868-13.356,33.419-13.671c16.235-0.36,31.844,6.199,43.938,18.518c14.889,15.165,23.205,43.646,20.695,70.872
c-2.177,23.612-12.187,42.783-28.185,53.982C151.891,272.599,142.449,275.989,133.359,275.989z M70.864,232.278
c-0.562,0-1.124,0.029-1.687,0.088c-5.395,0.561-9.728,3.719-12.201,8.893c-2.02,4.228-0.842,10.029,2.863,14.109
c4.25,4.679,10.707,5.898,17.712,3.344c4.935-1.8,9.56-5.543,13.793-10.664c-0.974-1.356-1.865-2.634-2.672-3.792
c-1.142-1.638-2.128-3.052-2.953-4.13C81.9,235.13,76.445,232.278,70.864,232.278z"/>
<path fill="#F0F0F0" d="M232.693,197.548c-1.497,0-2.993-0.213-4.463-0.646c-6.259-1.842-10.979-7.257-12.95-14.856
c-3.018-11.641-1.42-33.139,23.714-39.876c0.026-0.007,0.052-0.013,0.078-0.02c1.758-0.431,3.556,0.557,4.142,2.271
c0.032,0.094,3.277,9.563,7.722,18.69c7.953,16.326,12.042,15.98,12.083,15.957c7.236-1.009,6.132-22.429,5.602-32.722
c-0.5-9.714-0.669-12.987,2.318-14.479c1.006-0.501,2.157-0.571,3.243-0.192c2.802,0.979,4.6,4.642,8.754,13.574
c2.38,5.115,5.077,10.914,7.853,15.301c3.103,4.904,4.877,5.755,5.435,5.9c3.117-2.468,8.21-21.031,10.831-44.774
c-0.889-0.133-1.315-0.378-1.63-0.56c-1.83-1.054-2.684-3.159-2.126-5.239c0.708-2.635,3.418-4.544,6.448-4.544
c0.004,0,0.009,0,0.014,0c1.279,0.002,2.446,0.517,3.283,1.451c0.351,0.39,0.621,0.817,0.825,1.287
c4.768-0.985,11.605-2.79,17.559-4.588c0.945-0.284,1.967-0.158,2.813,0.349c3.845,2.307,3.192,8.587,2.006,19.987
c-0.973,9.351-2.783,26.757,2.121,27.751c9.456,1.923,18.149-10.722,18.237-10.85l5.804,3.913
c-0.457,0.681-11.379,16.643-25.432,13.798c-11.132-2.258-9.305-19.831-7.692-35.336c0.411-3.952,0.937-9.007,0.884-11.935
c-7.352,2.145-12.446,3.354-16.016,3.99c-0.014,0.135-0.028,0.272-0.043,0.411c-1.211,11.295-3.252,23.294-5.459,32.096
c-3.377,13.472-6.859,19.393-11.641,19.799c-7.747,0.664-13.348-10.054-20.419-25.254c-0.308-0.661-0.634-1.364-0.97-2.079
c0.782,15.181,1.917,37.99-11.633,39.88c-5.023,0.702-10.002-3.307-15.443-12.507c1.381,8.676,1.186,14.567-3.457,18.849
C241.385,195.755,237.037,197.548,232.693,197.548z M237.079,150.133c-20.17,7.71-15.642,27.772-15.023,30.156
c1.338,5.16,4.309,8.768,8.15,9.898c3.368,0.992,6.967-0.07,10.134-2.989c3.159-2.912,2.146-8.815-0.446-21.889
C239.008,160.838,238.025,155.881,237.079,150.133z"/>
<path fill="#F0F0F0" d="M367.799,152.178c-4.969,0-9.46-2.114-13.357-6.29c-5.896-6.316-6.872-15.858-2.612-25.525
c4.022-9.13,13.209-18.29,24.705-18.29c0.074,0,0.148,0,0.223,0.001l-0.072,7c-8.329-0.081-15.429,7.254-18.45,14.111
c-3.094,7.021-2.599,13.723,1.324,17.927c2.635,2.822,5.421,4.152,8.547,4.062c7.172-0.206,13.896-7.638,15.786-9.912l5.383,4.476
c-3.03,3.644-11.14,12.151-20.969,12.433C368.137,152.176,367.967,152.178,367.799,152.178z"/>
<path fill="#F0F0F0" d="M393.102,154.08c-23.53-31.84-10.897-80.04-0.931-101.079l6.326,2.997
c-7.517,15.865-22.126,63.665,0.233,93.921L393.102,154.08z"/>
<path fill="#F0F0F0" d="M413.919,194.245c-2.248,0-4.521-0.42-6.712-1.283c-5.864-2.313-9.674-7.327-9.707-12.773
c-0.026-4.291,1.641-8.172,4.82-11.221c4.247-4.072,10.958-6.3,17.974-5.964c3.442,0.166,7.304,1.55,11.401,3.293
c5.633-15.353,8.634-35.739,8.306-51.725c-0.048-2.305-0.159-4.787-0.277-7.414c-0.147-3.277-0.303-6.73-0.348-10.229
c-12.653-2.41-26.486-7.18-39.962-14.028l3.172-6.24c12.523,6.365,25.276,10.86,36.884,13.222
c0.445-10.023,2.444-19.691,8.774-25.903c4.957-4.866,12.007-7.042,20.979-6.472c12.157,0.775,20.108,6.616,21.268,15.624
c1.242,9.646-6.127,19.67-17.141,23.317c-7.269,2.407-16.58,2.879-26.953,1.59c0.06,3.003,0.192,5.978,0.32,8.806
c0.12,2.67,0.233,5.193,0.282,7.584c0.352,17.106-2.824,38.348-8.921,54.684c7.633,3.359,15.909,6.564,22.219,4.033
c16.172-6.488,19.304-23.159,16.842-36.597l6.885-1.262c2.961,16.159-1.033,36.297-21.121,44.354
c-8.876,3.562-18.645-0.161-27.516-4.065c-2.436,5.233-5.226,9.698-8.343,12.996C423.547,192.271,418.795,194.245,413.919,194.245z
M418.914,169.971c-4.672,0-9.103,1.512-11.749,4.049c-1.783,1.71-2.68,3.771-2.665,6.126c0.016,2.572,2.086,5.047,5.274,6.304
c3.396,1.342,8.379,1.337,12.183-2.687c2.607-2.759,4.969-6.534,7.061-10.998c-3.496-1.491-6.672-2.653-9.061-2.769
C419.609,169.979,419.261,169.971,418.914,169.971z M446.428,91.06c9.611,1.283,18.146,0.921,24.723-1.257
c8.988-2.976,13.096-10.35,12.397-15.778c-0.709-5.504-6.093-8.979-14.771-9.531c-6.99-0.448-12.104,1.021-15.631,4.482
C448.261,73.771,446.737,82.154,446.428,91.06z"/>
<path fill="#F0F0F0" d="M595.9,205.596c-19.221,0.001-23.229-11.699-24.058-16.906c-0.457-2.867-0.354-5.898,0.193-8.866
c-2.857-0.98-5.532-2.093-7.857-3.157c-1.693,7.097-7.118,12.447-12.717,14.418c-6.761,2.381-13.268,0.06-16.969-6.06
c-2.97-4.909-4.283-10.671-4.188-17.66c-9.669,6.238-18.56,10.521-23.259,10.382c-2.799-0.104-4.454-1.359-5.35-2.395
c-2.602-3.005-2.293-7.639-1.625-13.973c-5,6.064-11.604,11.196-18.246,13.708c-6.115,2.316-11.536,2.09-15.671-0.646l3.863-5.838
c2.755,1.825,6.595,0.974,9.331-0.063c9.369-3.544,19.354-14.231,21.805-23.338c0.451-1.679,2.078-2.771,3.792-2.566
c1.727,0.205,3.04,1.646,3.087,3.383c0.145,5.432-0.389,10.395-0.858,14.774c-0.396,3.696-0.938,8.732-0.226,9.916
c0.063,0.016,0.177,0.035,0.354,0.041c2.915,0.146,12.468-4.508,23.754-12.254c1.628-11.196,5.806-25.076,11.854-42.657
c8.603-25.012,19.61-25.931,23.959-25.164c7.507,1.327,12.609,9.868,12.406,20.771c-0.22,11.867-11.949,25.413-21.749,34.687
c-5.754,5.444-12.808,11.177-19.896,16.243c-0.842,8.043-0.02,14.279,2.852,19.024c2.658,4.394,6.564,3.816,8.655,3.079
c4.094-1.44,7.926-5.77,8.502-11.112c-1.063-0.59-1.718-0.984-1.856-1.068c-0.382-0.232-0.716-0.535-0.983-0.893
c-3.329-4.441-2.178-6.788-0.626-7.974c2.501-1.909,6.111-0.342,9.654,4.206c0.323,0.415,0.549,0.896,0.659,1.408
c2.582,1.285,5.94,2.81,9.577,4.085c2.548-5.943,6.784-10.735,11.529-12.011c5.288-1.421,10.433-0.149,13.76,3.404
c2.747,2.933,3.711,6.938,2.516,10.451c-0.779,2.291-3.154,6.309-10.303,7.479c-4.032,0.658-8.449,0.25-12.758-0.704
c-0.309,1.939-0.358,3.922-0.053,5.837c1.563,9.818,11.454,11.373,19.477,10.943l0.371,6.99
C597.67,205.572,596.769,205.596,595.9,205.596z M580.91,175.073c3.307,0.687,6.594,0.955,9.524,0.475
c2.588-0.424,4.34-1.453,4.807-2.824c0.361-1.063-0.021-2.369-0.998-3.412c-0.734-0.785-2.872-2.493-6.834-1.43
C585.258,168.46,582.718,171.298,580.91,175.073z M564.917,97.505c-3.987,0-10.123,5.302-15.389,20.611
c-4.68,13.604-8.229,24.965-10.264,34.402c4.482-3.458,9.052-7.309,13.449-11.469c12.478-11.809,19.426-22.368,19.563-29.733
c0.15-8.143-3.302-13.161-6.627-13.749C565.415,97.527,565.17,97.505,564.917,97.505z"/>
<path fill="#F0F0F0" d="M645.592,244.412c-2.923-3.24-2.719-11.158-0.697-19.558c-5.097,4.287-10.696,6.99-15.58,3.79
c-5.08-3.334-4.273-9.432-1.634-15.816c-4.455,3.01-8.966,5.195-12.148,4.755c-1.978-0.275-3.553-1.456-4.321-3.239
c-0.342-0.793-0.529-1.678-0.58-2.645c-3.794,0.873-8.747-0.24-12.204-4.333c-4.535-5.371-3.514-13.429,2.484-19.595
c5.164-5.31,13.775-8.555,21.053-3.771c0.949-1.49,2.879-2.044,4.485-1.262c1.684,0.822,2.421,2.822,1.675,4.54
c-0.472,1.086-1.373,2.75-2.514,4.856c-1.991,3.676-7.646,14.117-8.038,18.315c4.242-1.365,15.006-9.473,19.371-14.837
c1.129-1.387,3.12-1.7,4.621-0.727c1.499,0.974,2.024,2.921,1.217,4.517c-0.714,1.409-1.682,3.076-2.802,5.007
c-2.376,4.095-9.607,16.556-6.824,18.382c1.54,1.01,5.658-0.406,16.479-12.93c0.82-0.948,1.53-1.77,2.1-2.39
c1.198-1.305,3.183-1.51,4.623-0.474c1.438,1.035,1.876,2.982,1.019,4.534c-6.575,11.897-7.978,25.974-6.53,28.26L645.592,244.412z
M614.185,188.719c-3.014,0-6.088,1.704-8.256,3.934c-2.868,2.949-4.646,7.245-2.154,10.197c1.729,2.046,4.157,2.382,5.474,1.98
c1.468-1.495,5.409-7.889,9.285-14.689C617.18,189.144,615.69,188.719,614.185,188.719z"/>
<path fill="#F0F0F0" d="M204.433,217.13l-1.616-6.811c10.629-2.522,19.128-11.45,20.94-16.657l6.611,2.301
C228.073,202.562,218.242,213.854,204.433,217.13z"/>
</g>
<path fill="#F0F0F0" d="M106.333,113.333c-0.826,0-1.598-0.515-1.887-1.338c-5.967-16.998-5.343-36.185,1.714-52.642
c0.434-1.016,1.611-1.487,2.626-1.05c1.015,0.435,1.485,1.611,1.05,2.626c-6.667,15.547-7.255,33.676-1.616,49.74
c0.366,1.042-0.183,2.184-1.225,2.55C106.777,113.297,106.553,113.333,106.333,113.333z"/>
<path fill="#F0F0F0" d="M133.104,33.483c-0.687,0-1.355-0.354-1.728-0.99c-0.558-0.953-0.238-2.179,0.715-2.737
c8.624-5.049,18.323-7.75,29.653-8.255c12.443-0.555,25.502,1.818,38.813,7.054c1.028,0.404,1.534,1.565,1.129,2.593
c-0.405,1.028-1.567,1.532-2.593,1.129c-12.785-5.029-25.291-7.318-37.171-6.78c-10.665,0.476-19.762,2.998-27.81,7.711
C133.795,33.395,133.447,33.483,133.104,33.483z"/>
<path fill="#F0F0F0" d="M264.001,78.724c-0.539,0-1.076-0.216-1.47-0.644c-6.408-6.943-19.724-20.296-36.907-31.724
c-0.92-0.612-1.169-1.854-0.558-2.773c0.611-0.92,1.853-1.17,2.773-0.558c17.531,11.659,31.102,25.268,37.632,32.342
c0.749,0.812,0.698,2.077-0.113,2.826C264.972,78.549,264.486,78.724,264.001,78.724z"/>
<path fill="#F0F0F0" d="M126.662,114.445c-0.636,0-1.262-0.303-1.649-0.866c-5.902-8.578-8.345-22.887-5.809-34.023
c0.246-1.077,1.318-1.748,2.395-1.506c1.077,0.246,1.751,1.317,1.506,2.395c-2.273,9.981-0.037,23.251,5.203,30.867
c0.626,0.91,0.396,2.155-0.514,2.781C127.448,114.331,127.053,114.445,126.662,114.445z"/>
<path fill="#F0F0F0" d="M250.584,85.167c-0.542,0-1.083-0.219-1.477-0.651c-5.752-6.297-13.725-14.678-13.805-14.762
c-0.762-0.8-0.73-2.066,0.07-2.828c0.801-0.761,2.066-0.73,2.828,0.07c0.08,0.084,8.081,8.494,13.861,14.822
c0.745,0.815,0.688,2.081-0.128,2.825C251.549,84.994,251.065,85.167,250.584,85.167z"/>
<path fill="#F0F0F0" d="M88.832,209.501c-0.262,0-0.528-0.052-0.784-0.161c-13.76-5.872-23.664-17.729-27.884-33.389
c-5.371-19.925-0.82-42.876,11.877-59.897c0.661-0.885,1.915-1.067,2.799-0.407c0.885,0.66,1.068,1.914,0.407,2.799
c-11.98,16.061-16.28,37.697-11.221,56.464c3.895,14.449,12.984,25.37,25.593,30.75c1.016,0.434,1.488,1.608,1.054,2.625
C90.348,209.045,89.609,209.501,88.832,209.501z"/>
<path fill="#F0F0F0" d="M45.498,233.25c-0.379,0-0.762-0.107-1.101-0.332c-13.629-9.013-22.965-23.999-25.615-41.116
c-3.036-19.615,3.147-40.145,17.412-57.808c0.694-0.86,1.954-0.994,2.813-0.3c0.859,0.694,0.994,1.954,0.3,2.813
c-13.548,16.776-19.433,36.196-16.571,54.683c2.478,16.007,11.178,30,23.868,38.393c0.921,0.609,1.174,1.85,0.565,2.771
C46.784,232.935,46.147,233.25,45.498,233.25z"/>
<path fill="#F0F0F0" d="M79.738,250.773c-0.078,0-0.156-0.004-0.236-0.014c-5.262-0.618-10.588-2.226-14.998-4.525
c-0.979-0.511-1.359-1.72-0.848-2.698c0.51-0.981,1.717-1.359,2.698-0.849c3.988,2.081,8.823,3.537,13.614,4.1
c1.097,0.129,1.882,1.123,1.753,2.22C81.602,250.024,80.739,250.773,79.738,250.773z"/>
<path fill="#F0F0F0" d="M127.539,251.379c-3.895,0-8.066-0.104-12.708-0.304c-1.104-0.047-1.959-0.98-1.912-2.084
s0.981-1.945,2.084-1.912c16.425,0.707,26.875,0.201,39.941-1.929c1.089-0.185,2.118,0.563,2.296,1.652s-0.562,2.117-1.652,2.295
C145.93,250.672,137.681,251.379,127.539,251.379z"/>
<path fill="#F0F0F0" d="M202.252,243.001c-0.747,0-1.464-0.42-1.807-1.14c-0.476-0.997-0.052-2.19,0.945-2.666
c59.53-28.375,121.722-47.398,179.851-55.012c1.086-0.133,2.1,0.628,2.243,1.724s-0.629,2.1-1.724,2.243
c-57.717,7.56-119.493,26.459-178.649,54.656C202.833,242.938,202.54,243.001,202.252,243.001z"/>
<path fill="#F0F0F0" d="M529.132,238.433c-0.707,0-1.404-0.109-2.068-0.337c-2.612-0.895-4.331-3.4-4.717-6.875
c-0.122-1.098,0.669-2.087,1.767-2.208c1.094-0.13,2.086,0.669,2.208,1.767c0.212,1.899,0.936,3.154,2.038,3.532
c1.136,0.389,2.601-0.118,3.735-1.287c1.992-2.053,2.379-5.412,1.033-8.987c-4.332-11.515-16.702-17.019-29.425-21.251
c-13.616-4.531-40.446-7.753-56.478-9.679c-2.777-0.333-5.204-0.625-7.146-0.874c-1.096-0.14-1.87-1.143-1.729-2.237
c0.14-1.097,1.15-1.878,2.237-1.729c1.934,0.247,4.35,0.538,7.114,0.87c16.182,1.942,43.264,5.195,57.264,9.854
c13.662,4.545,26.983,10.554,31.906,23.638c1.904,5.062,1.191,9.988-1.906,13.181C533.323,237.503,531.186,238.433,529.132,238.433z
"/>
<path fill="#F0F0F0" d="M561.03,253.471c-1.729,0-3.451-0.444-4.97-1.342c-3.44-2.03-5.191-5.902-4.803-10.621
c0.091-1.101,1.052-1.926,2.157-1.829c1.101,0.091,1.92,1.057,1.829,2.157c-0.262,3.178,0.75,5.609,2.85,6.849
c1.922,1.134,4.403,1.041,6.325-0.234c2.478-1.646,3.534-4.818,2.976-8.931c-2.572-18.931-23.266-34.528-41.431-39.593
c-1.064-0.297-1.687-1.4-1.39-2.464c0.297-1.064,1.4-1.686,2.464-1.39c19.394,5.407,41.518,22.283,44.319,42.907
c0.767,5.632-0.956,10.298-4.726,12.802C564.94,252.905,562.98,253.471,561.03,253.471z"/>
<path fill="#F0F0F0" d="M218.002,264c-0.645,0-1.277-0.311-1.663-0.887c-0.615-0.917-0.37-2.159,0.547-2.774
c40.325-27.034,84.018-44.908,141.672-57.955c1.075-0.246,2.147,0.432,2.392,1.509s-0.432,2.148-1.509,2.392
c-57.152,12.935-100.431,30.63-140.328,57.377C218.772,263.891,218.385,264,218.002,264z"/>
<path fill="#F0F0F0" d="M507.159,129.25c-3.309,0-6-2.691-6-6s2.691-6,6-6s6,2.691,6,6S510.468,129.25,507.159,129.25z
M507.159,121.25c-1.103,0-2,0.897-2,2s0.897,2,2,2s2-0.897,2-2S508.262,121.25,507.159,121.25z"/>
<g>
<path fill="#F0F0F0" d="M162.234,42.942V41.2c0-2.233-0.759-3.217-2.501-3.217h-2.365v8.263h1.92
C161.118,46.247,162.234,45.443,162.234,42.942z"/>
<path fill="#F0F0F0" d="M159.555,50.713h-2.188v9.603h2.813c1.652,0,2.546-0.759,2.546-3.082v-2.725
C162.726,51.606,161.788,50.713,159.555,50.713z"/>
<path fill="#F0F0F0" d="M105.791,28.739v41.303H228.5V28.739H105.791z M130.071,64.781h-6.521l-1.742-16.658h-0.089l-1.742,16.658
h-6.744l-3.482-31.264h4.777l2.592,24.654h0.089l2.321-24.654h4.734l2.412,24.833h0.089l2.501-24.833h4.288L130.071,64.781z
M149.414,37.984h-8.486v8.709h6.744v4.467h-6.744v9.155h8.486v4.466h-13.398V33.518h13.398V37.984z M167.639,57.368
c0,4.823-2.546,7.413-7.458,7.413h-7.727V33.518h7.414c5.091,0,7.278,2.367,7.278,7.19v1.117c0,3.216-0.98,5.226-3.171,6.253v0.089
c2.635,1.026,3.662,3.35,3.662,6.653L167.639,57.368L167.639,57.368z M177.154,65.139c-4.822,0-7.323-2.858-7.323-7.861v-1.92
h4.645v2.233c0,2.232,0.982,3.037,2.545,3.037c1.563,0,2.546-0.805,2.546-3.037c0-2.278-0.98-3.975-4.196-6.789
c-4.109-3.618-5.404-6.208-5.404-9.781c0-5.002,2.457-7.86,7.235-7.86c4.776,0,7.233,2.857,7.233,7.86v0.982h-4.645v-1.295
c0-2.233-0.895-3.082-2.456-3.082c-1.563,0-2.457,0.849-2.457,3.082c0,2.277,0.98,3.975,4.198,6.789
c4.107,3.617,5.402,6.208,5.402,9.78C184.479,62.281,181.978,65.139,177.154,65.139z M192.208,64.781h-4.913V33.518h4.913V64.781z
M209.538,37.984h-5.138v26.797h-4.913V37.984h-5.136v-4.466h15.187V37.984L209.538,37.984z M225.082,37.984h-8.486v8.709h6.744
v4.467h-6.744v9.155h8.486v4.466h-13.398V33.518h13.398V37.984z"/>
</g>
<g enable-background="new ">
<path fill="#F0F0F0" d="M171.928,86.684c0-4.031,2.124-6.335,6.011-6.335c3.889,0,6.012,2.304,6.012,6.335v13.103
c0,4.031-2.124,6.335-6.012,6.335c-3.887,0-6.011-2.304-6.011-6.335V86.684z M175.887,100.038c0,1.8,0.792,2.483,2.052,2.483
c1.261,0,2.053-0.684,2.053-2.483V86.432c0-1.8-0.792-2.483-2.053-2.483c-1.26,0-2.052,0.684-2.052,2.483V100.038z"/>
<path fill="#F0F0F0" d="M190.468,91.831h5.111v3.6h-5.111v10.402h-3.959V80.636h10.475v3.6h-6.515L190.468,91.831L190.468,91.831z"
/>
</g>
<path fill="#F0F0F0" d="M331.307,85.784c-3.309,0-6-2.691-6-6s2.691-6,6-6s6,2.691,6,6S334.615,85.784,331.307,85.784z
M331.307,77.784c-1.103,0-2,0.897-2,2s0.897,2,2,2s2-0.897,2-2S332.41,77.784,331.307,77.784z"/>
<path fill="#F0F0F0" d="M670.999,184.665c-0.47,0-0.942-0.165-1.322-0.501c-37.749-33.324-69.752-46.005-70.071-46.129
c-1.028-0.401-1.538-1.56-1.138-2.589c0.4-1.028,1.557-1.54,2.588-1.139c0.325,0.126,32.944,13.027,71.268,46.859
c0.828,0.73,0.907,1.994,0.176,2.822C672.105,184.437,671.553,184.665,670.999,184.665z"/>
<path fill="#F0F0F0" d="M643.329,140.167c-0.382,0-0.768-0.109-1.108-0.337c-23.321-15.576-43.189-21.859-43.388-21.92
c-1.055-0.329-1.644-1.45-1.314-2.504c0.328-1.055,1.449-1.643,2.504-1.315c0.831,0.259,20.622,6.519,44.419,22.414
c0.919,0.613,1.166,1.855,0.553,2.774C644.609,139.855,643.975,140.167,643.329,140.167z"/>
</svg>
!function(e){function t(o){if(r[o])return r[o].exports;var n=r[o]={exports:{},id:o,loaded:!1};return e[o].call(n.exports,n,n.exports,t),n.loaded=!0,n.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t){if("undefined"==typeof AFRAME)throw new Error("Component attempted to register before AFRAME was available.");AFRAME.registerComponent("crawling-cursor",{dependencies:["raycaster"],schema:{target:{type:"selector"}},multiple:!1,init:function(){var e=this.el,t=this.data;if(null===t.target){var r=document.querySelector("a-cursor");if(null===r)return void console.warn("Please put a-cursor in a document");t.target=r}e.addEventListener("raycaster-intersection",function(e){function r(e){for(var r=0,o=e.length;r<o;r++)if(t.target!==e[r].object.el&&!e[r].object.el.classList.contains("ignore-ray"))return e[r];return null}var o=r(e.detail.intersections);if(o){var n=o.object.matrixWorld;n.setPosition(new THREE.Vector3(0,0,0));var a=o.face.normal.clone().applyMatrix4(n).normalize(),i=(new THREE.Vector3).addVectors(o.point,a);t.target.object3D.lookAt(i);var c=(new THREE.Vector3).addVectors(o.point,a.multiplyScalar(.05));t.target.setAttribute("position",c)}})}})}]);
\ No newline at end of file
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
require('../index.js');
},{"../index.js":2}],2:[function(require,module,exports){
/**
* TextGeometry component for A-Frame.
*/
var debug = AFRAME.utils.debug;
var error = debug('aframe-text-component:error');
var fontLoader = new THREE.FontLoader();
AFRAME.registerComponent('text-geometry', {
schema: {
bevelEnabled: {default: false},
bevelSize: {default: 8, min: 0},
bevelThickness: {default: 12, min: 0},
curveSegments: {default: 12, min: 0},
font: {type: 'asset', default: 'https://rawgit.com/ngokevin/kframe/master/components/text-geometry/lib/helvetiker_regular.typeface.json'},
height: {default: 0.05, min: 0},
size: {default: 0.5, min: 0},
style: {default: 'normal', oneOf: ['normal', 'italics']},
weight: {default: 'normal', oneOf: ['normal', 'bold']},
value: {default: ''}
},
/**
* Called when component is attached and when component data changes.
* Generally modifies the entity based on the data.
*/
update: function (oldData) {
var data = this.data;
var el = this.el;
var mesh = el.getOrCreateObject3D('mesh', THREE.Mesh);
if (data.font.constructor === String) {
// Load typeface.json font.
fontLoader.load(data.font, function (response) {
var textData = AFRAME.utils.clone(data);
textData.font = response;
mesh.geometry = new THREE.TextGeometry(data.value, textData);
});
} else if (data.font.constructor === Object) {
// Set font if already have a typeface.json through setAttribute.
mesh.geometry = new THREE.TextGeometry(data.value, data);
} else {
error('Must provide `font` (typeface.json) or `fontPath` (string) to text component.');
}
}
});
},{}]},{},[1]);
\ No newline at end of file
AFRAME.registerComponent('log', {
schema: {
type: 'string'
},
init: function () {
var stringToLog = this.data;
console.log(stringToLog);
}
});
AFRAME.registerComponent('hover-color', {
schema: {
type: 'string'
},
init: function () {
var thisparent = this;
var elem = this.el;
elem.addEventListener("mouseenter", switchColor);
elem.addEventListener("mouseleave", switchColor);
function switchColor(evt) {
var hoverColor = thisparent.data;
var color = elem.getAttribute("color");
elem.setAttribute("color", hoverColor);
elem.setAttribute("hover-color", color);
}
}
});
AFRAME.registerComponent('include-script', {
schema: {
type: 'string'
},
init: function () {
console.log("Init");
var scene = document.querySelector('a-scene');
/* Logo Script */
var logoScript = scene.querySelectorAll(".logoScript");
for (var e = 0; e < logoScript.length; e++) {
logoScript[e].addEventListener("mouseenter", function () {
easeIn("#logoScriptBg", 19);
});
logoScript[e].addEventListener("mouseleave", function () {
easeOut("#logoScriptBg", 19);
});
}
/* #arrowLeft */
scene.querySelector("#arrowLeft").addEventListener("click", function () {
easeOut(".logoScript,#arrowLeft", 19);
easeIn(".CV", 19);
console.log("Click");
});
/* Functions */
function easeOut(selector, iEnd) {
var i = 0;
var animInterval = setInterval(function () {
i++;
var elem = scene.querySelectorAll(selector);
for (var e = 0; e < elem.length; e++) {
elem[e].setAttribute("opacity", 1 - (0.05 * i));
if (i == iEnd) {
clearInterval(animInterval);
elem[e].setAttribute("visible", "false");
elem[e].setAttribute("opacity", 0);
}
}
}, 10);
}
function easeIn(selector, iEnd) {
var i = 0;
var animInterval = setInterval(function () {
i++;
var elem = scene.querySelectorAll(selector);
for (var e = 0; e < elem.length; e++) {
elem[e].setAttribute("visible", "true");
elem[e].setAttribute("opacity", 0.05 * i);
if (i == iEnd) {
clearInterval(animInterval);
}
}
}, 10);
}
}
});
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment