Skip to content

Commit

Permalink
Start css
Browse files Browse the repository at this point in the history
  • Loading branch information
Etienne Dldc committed Nov 26, 2015
1 parent 95bf57f commit ce9bda0
Show file tree
Hide file tree
Showing 43 changed files with 2,813 additions and 175 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.DS_Dtore
.DS_Store
node_modules
bower_components
data
dist
323 changes: 195 additions & 128 deletions dist/build.js → build.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ var config = {
index: 'src/index.html',
outFileMin: 'build.min.js',
outFile: 'build.js',
out: 'dist/',
out: '',
in: 'src/',
entryPoint: './src/main.js',
allIn: ['src/**/*'],
Expand Down
Binary file added cpcompany-light-webfont.eot
Binary file not shown.
804 changes: 804 additions & 0 deletions cpcompany-light-webfont.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added cpcompany-light-webfont.ttf
Binary file not shown.
Binary file added cpcompany-light-webfont.woff
Binary file not shown.
Binary file added cpcompany-light-webfont.woff2
Binary file not shown.
File renamed without changes.
Binary file added dekar-webfont.eot
Binary file not shown.
433 changes: 433 additions & 0 deletions dekar-webfont.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dekar-webfont.ttf
Binary file not shown.
Binary file added dekar-webfont.woff
Binary file not shown.
Binary file added dekar-webfont.woff2
Binary file not shown.
File renamed without changes.
10 changes: 7 additions & 3 deletions src/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<div class="app-container">
<loader v-if="displayLoader" transition="fade"></loader>
<graph></graph>
<sidebar></sidebar>
</div>
</template>

Expand All @@ -12,6 +13,7 @@
}
@import "./styles/transitions.scss";
@import "./styles/fonts.scss";
.app-container{
position: fixed;
Expand All @@ -23,8 +25,9 @@
</style>

<script>
import Graph from './components/graph.vue'
import Loader from './components/loader.vue'
import Graph from './components/Graph.vue'
import Loader from './components/Loader.vue'
import Sidebar from './components/Sidebar.vue'
export default {
data () {
Expand All @@ -34,7 +37,8 @@ export default {
},
components: {
Graph,
Loader
Loader,
Sidebar
},
events: {
"loader-off": function () {
Expand Down
Binary file added src/assets/textures/particle3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
70 changes: 70 additions & 0 deletions src/components/Sidebar.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<style lang="sass?outputStyle=expanded" scoped>
@import "../styles/variables.scss";
.sidebar{
position: absolute;
right: 0;
top: 0;
bottom: 0;
width : 325px;
background: $color_main;
opacity : 0.98 ;
padding-left: 40px;
padding-right: 35px;
h3{
color : #808080;
text-transform: uppercase;
font-family : 'cpcompanyregular', sans-serif;
font-size: 16px;
padding-top: 30px;
padding-bottom: 12px;
letter-spacing: 3px;
margin: 0;
}
hr{
//width : 250px;
background-color : #303030;
height : 1px;
border: none;
}
p.legende-info{
font-family : ‘Helvetica-Neue’, sans-serif;
font-weight: 300;
font-size : 14px;
line-height: 1.6;
color : #666666;
margin-top : 15px;
margin-bottom : 20px;
}
}
</style>

<template>
<div class="sidebar">
<h3>Légendes</h3>
<hr/>
<p class="legende-info"><span class="num">1.</span>Afficher/Masquer les facteurs affectant la solitude des arbres.</p>
<p class="legende-info"><span class="num">2.</span>Jaugez l’importance que vous accordez à l’impact des
différents facteurs sur la solitude des arbres</p>
<hr/>

</div>
</template>

<script>
import $ from 'jquery';
export default {
ready() {
},
methods: {
}
}
</script>
6 changes: 3 additions & 3 deletions src/components/graph.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ canvas {

<script>
import raf from 'raf';
import dat from 'dat-gui';
//import dat from 'dat-gui';
import $ from 'jquery';
import 'gsap';
import Webgl from '../three/Webgl';
Expand All @@ -36,8 +36,8 @@ export default {
$(this.$el).height(winHeight);
this.webgl = new Webgl(this.$el.clientWidth, this.$el.clientHeight);
// GUI settings
this.gui = new dat.GUI();
this.gui.add(this.webgl.params, 'usePostprocessing');
// this.gui = new dat.GUI();
// this.gui.add(this.webgl.params, 'usePostprocessing');
// handle resize
window.addEventListener('resize', this.resizeHandler);
this.$el.appendChild(this.webgl.renderer.domElement);
Expand Down
2 changes: 1 addition & 1 deletion src/main.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var Vue = require('vue')
var App = require('./app.vue')
var App = require('./App.vue')
var VueRouter = require('vue-router')

Vue.use(VueRouter)
Expand Down
27 changes: 27 additions & 0 deletions src/styles/fonts.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/* Generated by Font Squirrel (http://www.fontsquirrel.com) on November 26, 2015 */

@font-face {
font-family: 'cpcompanyregular';
src: url('styles/fonts/cpcompany-light-webfont.eot');
src: url('styles/fonts/cpcompany-light-webfont.eot?#iefix') format('embedded-opentype'),
url('styles/fonts/cpcompany-light-webfont.woff2') format('woff2'),
url('styles/fonts/cpcompany-light-webfont.woff') format('woff'),
url('styles/fonts/cpcompany-light-webfont.ttf') format('truetype'),
url('styles/fonts/cpcompany-light-webfont.svg#cpcompanyregular') format('svg');
font-weight: normal;
font-style: normal;

}

@font-face {
font-family: 'dekarregular';
src: url('styles/fonts/dekar-webfont.eot');
src: url('styles/fonts/dekar-webfont.eot?#iefix') format('embedded-opentype'),
url('styles/fonts/dekar-webfont.woff2') format('woff2'),
url('styles/fonts/dekar-webfont.woff') format('woff'),
url('styles/fonts/dekar-webfont.ttf') format('truetype'),
url('styles/fonts/dekar-webfont.svg#dekarregular') format('svg');
font-weight: normal;
font-style: normal;

}
Binary file added src/styles/fonts/cpcompany-light-webfont.eot
Binary file not shown.
804 changes: 804 additions & 0 deletions src/styles/fonts/cpcompany-light-webfont.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/styles/fonts/cpcompany-light-webfont.ttf
Binary file not shown.
Binary file added src/styles/fonts/cpcompany-light-webfont.woff
Binary file not shown.
Binary file added src/styles/fonts/cpcompany-light-webfont.woff2
Binary file not shown.
Binary file added src/styles/fonts/dekar-webfont.eot
Binary file not shown.
433 changes: 433 additions & 0 deletions src/styles/fonts/dekar-webfont.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/styles/fonts/dekar-webfont.ttf
Binary file not shown.
Binary file added src/styles/fonts/dekar-webfont.woff
Binary file not shown.
Binary file added src/styles/fonts/dekar-webfont.woff2
Binary file not shown.
5 changes: 5 additions & 0 deletions src/styles/fonts/generator_config.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Font Squirrel Font-face Generator Configuration File
# Upload this file to the generator to recreate the settings
# you used to create these fonts.

{"mode":"optimal","formats":["ttf","woff","woff2","eotz"],"tt_instructor":"default","fix_gasp":"xy","fix_vertical_metrics":"Y","metrics_ascent":"","metrics_descent":"","metrics_linegap":"","add_spaces":"Y","add_hyphens":"Y","fallback":"none","fallback_custom":"100","options_subset":"basic","subset_custom":"","subset_custom_range":"","subset_ot_features_list":"","css_stylesheet":"stylesheet.css","filename_suffix":"-webfont","emsquare":"2048","spacing_adjustment":"0"}
3 changes: 3 additions & 0 deletions src/styles/variables.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@


$color_main : #1b1b1b;
16 changes: 8 additions & 8 deletions src/three/Webgl.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,24 +40,24 @@ export default class Webgl {
this.camera.position.set(280, 330, 410);
this.camera.lookAt(new THREE.Vector3())

/**
* RENDERER
*/
this.renderer = new THREE.WebGLRenderer();
this.renderer.setSize(width, height);
this.renderer.setClearColor(0x121111);

/**
* CONTROL
*/
this.controls = new OrbitControls(this.camera);
this.controls = new OrbitControls(this.camera, this.renderer.domElement);
//this.controls.minDistance = 100;
this.controls.maxDistance = 700;
this.controls.minAzimuthAngle = -Math.PI/2;
this.controls.maxAzimuthAngle = Math.PI/2;
this.controls.minPolarAngle = 0; // radians
this.controls.maxPolarAngle = Math.PI * 0.4; // radians

/**
* RENDERER
*/
this.renderer = new THREE.WebGLRenderer();
this.renderer.setSize(width, height);
this.renderer.setClearColor(0x000000);

this.composer = null;
this.initPostprocessing();
}
Expand Down
8 changes: 4 additions & 4 deletions src/three/objects/Forest.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ export default class Forest extends THREE.Object3D {
super();

this.dataParams = {
hauteur: { multiplier: 0.001, color: 0xFFFFFF, user_multiplier: 1 },
arbres_align_dist: { multiplier: 1, color: 0xFF0000, user_multiplier: 1, max: 104025 },
bancs_dist: { multiplier: 1, color: 0x00FF00, user_multiplier: 1, max: 11581 },
poteaux_bois_dist: { multiplier: 0.5, color: 0x0000FF, user_multiplier: 1, max: 137 }
hauteur: { multiplier: 0.001, color: 0xffffff, user_multiplier: 1 },
arbres_align_dist: { multiplier: 1, color: 0x16f1d4, user_multiplier: 1, max: 104025 },
bancs_dist: { multiplier: 1, color: 0x18f277, user_multiplier: 1, max: 11581 },
poteaux_bois_dist: { multiplier: 0.5, color: 0x1dacdd, user_multiplier: 1, max: 137 }
};

this.allData = [];
Expand Down
21 changes: 0 additions & 21 deletions src/three/objects/Leaf.js

This file was deleted.

7 changes: 3 additions & 4 deletions src/three/objects/Tree.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import THREE from 'three';

import Leaf from './Leaf';
import textures from '../textures';
import _ from 'lodash';
import Tools from '../../modules/tools';
Expand Down Expand Up @@ -130,12 +129,12 @@ export default class Tree extends THREE.Object3D {
geometry.addAttribute( 'color', new THREE.BufferAttribute( colors, 3 ) );
geometry.computeBoundingSphere();
var material = new THREE.PointsMaterial({
size: 2,
size: 1.7,
vertexColors: THREE.VertexColors,
map: textures.particle2,
map: textures.particle3,
transparent : true,
//blending: THREE.AdditiveBlending,
opacity: 0.4,
opacity: 0.9,
depthTest: false,
});
var particleSystem = new THREE.Points( geometry, material );
Expand Down
3 changes: 2 additions & 1 deletion src/three/textures.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ const textures = {};

const texturesUrl = [
{ name: 'particle1', url: 'textures/particle1.png' },
{ name: 'particle2', url: 'textures/particle2.png' }
{ name: 'particle2', url: 'textures/particle2.png' },
{ name: 'particle3', url: 'textures/particle3.png' }
];

let nbrOfTexture = texturesUrl.length;
Expand Down
File renamed without changes.
File renamed without changes
File renamed without changes
Binary file added textures/particle3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,18 @@ var webpackConfig = {
test: /src\/(three|modules)\/.*(\.js)$/,
loader: 'babel'
},
{
test: /src\/styles\/.*(\.scss)$/,
loader: 'sass'
},
{
// edit this for additional asset file types
test: /\.(png|jpg|gif)$/,
loader: 'file?name=[name].[ext]?[hash]'
},
{
test: /\.(svg|eot|woff2|woff|ttf)$/,
loader: 'file?name=[name].[ext]?[hash]'
}
]
},
Expand Down

0 comments on commit ce9bda0

Please sign in to comment.