kopia lustrzana https://github.com/robhawkes/vizicities
Removed TweenMax from core build and disabled devicePixelRatio support for the time being
rodzic
3f2fe5e7a0
commit
b4e91532ec
Plik diff jest za duży
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -11,9 +11,11 @@
|
|||
<!-- Livereload -->
|
||||
<script src='http://localhost:35729/livereload.js'></script>
|
||||
|
||||
<script src="../vendor/three.js"></script>
|
||||
<script src="../vendor/three.min.js"></script>
|
||||
<script src="../vendor/threex.rendererstats.js"></script>
|
||||
|
||||
<script src="../vendor/TweenMax.min.js"></script>
|
||||
|
||||
<!-- Include proj4 if you plan to use CRS.Proj4 -->
|
||||
<!-- <script src="../vendor/proj4.js"></script> -->
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -76,17 +76,25 @@ function build() {
|
|||
externals: {
|
||||
// Proxy the global THREE variable to require('three')
|
||||
'three': 'THREE',
|
||||
// Proxy the global THREE variable to require('TweenLite')
|
||||
'TweenLite': 'TweenLite',
|
||||
// Proxy the global THREE variable to require('TweenMax')
|
||||
'TweenMax': 'TweenMax',
|
||||
// Proxy the global THREE variable to require('TimelineLite')
|
||||
'TimelineLite': 'TimelineLite',
|
||||
// Proxy the global THREE variable to require('TimelineMax')
|
||||
'TimelineMax': 'TimelineMax',
|
||||
// Proxy the global proj4 variable to require('proj4')
|
||||
'proj4': 'proj4'
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
'TweenLite': __dirname + '/node_modules/gsap/src/uncompressed/TweenLite.js',
|
||||
'TweenMax': __dirname + '/node_modules/gsap/src/uncompressed/TweenMax.js',
|
||||
'TimelineLite': __dirname + '/node_modules/gsap/src/uncompressed/TimelineLite.js',
|
||||
'TimelineMax': __dirname + '/node_modules/gsap/src/uncompressed/TimelineMax.js'
|
||||
}
|
||||
},
|
||||
// resolve: {
|
||||
// alias: {
|
||||
// 'TweenLite': __dirname + '/node_modules/gsap/src/uncompressed/TweenLite.js',
|
||||
// 'TweenMax': __dirname + '/node_modules/gsap/src/uncompressed/TweenMax.js',
|
||||
// 'TimelineLite': __dirname + '/node_modules/gsap/src/uncompressed/TimelineLite.js',
|
||||
// 'TimelineMax': __dirname + '/node_modules/gsap/src/uncompressed/TimelineMax.js'
|
||||
// }
|
||||
// },
|
||||
module: {
|
||||
loaders: [
|
||||
{ test: /\.js$/, exclude: /node_modules/, loader: 'babel-loader' }
|
||||
|
|
|
@ -82,7 +82,6 @@
|
|||
"earcut": "^2.0.8",
|
||||
"eventemitter3": "^1.1.1",
|
||||
"geojson-merge": "^0.1.0",
|
||||
"gsap": "^1.18.2",
|
||||
"hammerjs": "^2.0.6",
|
||||
"lodash.assign": "^4.0.2",
|
||||
"lodash.throttle": "^4.0.0",
|
||||
|
|
|
@ -5,7 +5,12 @@ export default function(renderer, container) {
|
|||
var composer = new EffectComposer(renderer);
|
||||
|
||||
var updateSize = function() {
|
||||
var pixelRatio = window.devicePixelRatio;
|
||||
// TODO: Re-enable this when perf issues can be solved
|
||||
//
|
||||
// Rendering double the resolution of the screen can be really slow
|
||||
// var pixelRatio = window.devicePixelRatio;
|
||||
var pixelRatio = 1;
|
||||
|
||||
composer.setSize(container.clientWidth * pixelRatio, container.clientHeight * pixelRatio);
|
||||
};
|
||||
|
||||
|
|
|
@ -81,7 +81,11 @@ class Engine extends EventEmitter {
|
|||
var width = self._container.clientWidth;
|
||||
var height = self._container.clientHeight;
|
||||
|
||||
var pixelRatio = window.devicePixelRatio;
|
||||
// TODO: Re-enable this when perf issues can be solved
|
||||
//
|
||||
// Rendering double the resolution of the screen can be really slow
|
||||
// var pixelRatio = window.devicePixelRatio;
|
||||
var pixelRatio = 1;
|
||||
|
||||
fxaaPass.uniforms.resolution.value.set(1 / (width * pixelRatio), 1 / (height * pixelRatio));
|
||||
|
||||
|
|
|
@ -13,7 +13,14 @@ export default function(container, antialias) {
|
|||
// renderer.setClearColor(Scene.fog.color, 1);
|
||||
|
||||
renderer.setClearColor(0xffffff, 1);
|
||||
renderer.setPixelRatio(window.devicePixelRatio);
|
||||
|
||||
// TODO: Re-enable this when perf issues can be solved
|
||||
//
|
||||
// Rendering double the resolution of the screen can be really slow
|
||||
// var pixelRatio = window.devicePixelRatio;
|
||||
var pixelRatio = 1;
|
||||
|
||||
renderer.setPixelRatio(pixelRatio);
|
||||
|
||||
// Gamma settings make things look nicer
|
||||
renderer.gammaInput = true;
|
||||
|
|
Ładowanie…
Reference in New Issue