gitattributes for auto crlf normalization
This commit is contained in:
30
.gitattributes
vendored
Normal file
30
.gitattributes
vendored
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
# FIX CRLF always when developer has not set
|
||||||
|
# Linux/Mac: git config --global core.autocrlf input
|
||||||
|
# Windows: git config --global core.autocrlf true
|
||||||
|
# Auto detect text files and perform LF normalization
|
||||||
|
* text=auto
|
||||||
|
* eol=lf
|
||||||
|
|
||||||
|
*.js text
|
||||||
|
*.html text
|
||||||
|
*.npmignore text
|
||||||
|
*.md text
|
||||||
|
.ackrc text
|
||||||
|
.gitattributes text
|
||||||
|
.gitignore text
|
||||||
|
.jshintrc text
|
||||||
|
.nojekyll text
|
||||||
|
.travis.yml text
|
||||||
|
LICENSE text
|
||||||
|
|
||||||
|
# Avoid creation of unnecessary big commit objects
|
||||||
|
# For these files we do not want to see text diff for
|
||||||
|
*.min.* binary minified
|
||||||
|
*js.map* binary
|
||||||
|
*.svg binary
|
||||||
|
*.mtl binary
|
||||||
|
*.obj binary
|
||||||
|
*.jpg binary
|
||||||
|
*.jpeg binary
|
||||||
|
*.png binary
|
||||||
|
*.wav binary
|
||||||
@@ -1,29 +1,29 @@
|
|||||||
AFRAME.registerComponent('logoflicker', {
|
AFRAME.registerComponent('logoflicker', {
|
||||||
dependencies: ['text'],
|
dependencies: ['text'],
|
||||||
schema: {
|
schema: {
|
||||||
default: 1000.0,
|
default: 1000.0,
|
||||||
},
|
},
|
||||||
init: function () {
|
init: function () {
|
||||||
this.defaultColor = this.el.components['text'].data.color;
|
this.defaultColor = this.el.components['text'].data.color;
|
||||||
this.sparks = document.getElementById('logosparks');
|
this.sparks = document.getElementById('logosparks');
|
||||||
this.sparkPositions = [
|
this.sparkPositions = [
|
||||||
{ position: new THREE.Vector3(0, 0.1, 0) },
|
{ position: new THREE.Vector3(0, 0.1, 0) },
|
||||||
{ position: new THREE.Vector3(0.5, 1.2, 0) },
|
{ position: new THREE.Vector3(0.5, 1.2, 0) },
|
||||||
{ position: new THREE.Vector3(0, 1.2, 0) }
|
{ position: new THREE.Vector3(0, 1.2, 0) }
|
||||||
];
|
];
|
||||||
this.setOn();
|
this.setOn();
|
||||||
},
|
},
|
||||||
setOff: function () {
|
setOff: function () {
|
||||||
this.el.setAttribute('text', {color: '#0a0228'});
|
this.el.setAttribute('text', {color: '#0a0228'});
|
||||||
this.sparks.emit('flicker',
|
this.sparks.emit('flicker',
|
||||||
this.sparkPositions[Math.floor(Math.random() * this.sparkPositions.length)]);
|
this.sparkPositions[Math.floor(Math.random() * this.sparkPositions.length)]);
|
||||||
|
|
||||||
setTimeout(this.setOn.bind(this),
|
setTimeout(this.setOn.bind(this),
|
||||||
50 + Math.floor(Math.random() * 100));
|
50 + Math.floor(Math.random() * 100));
|
||||||
},
|
},
|
||||||
setOn: function () {
|
setOn: function () {
|
||||||
this.el.setAttribute('text', {color: this.defaultColor});
|
this.el.setAttribute('text', {color: this.defaultColor});
|
||||||
setTimeout(this.setOff.bind(this),
|
setTimeout(this.setOff.bind(this),
|
||||||
Math.floor((this.data * 3 / 10) + Math.random() * this.data));
|
Math.floor((this.data * 3 / 10) + Math.random() * this.data));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
Reference in New Issue
Block a user