Skip to content

Commit

Permalink
Fix review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Piecuch committed Dec 5, 2018
1 parent eb29d42 commit 810f42a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
7 changes: 2 additions & 5 deletions examples/js/Fire.js → examples/js/objects/Fire.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ THREE.Fire = function ( geometry, options ) {
var parameters = {
minFilter: THREE.NearestFilter,
magFilter: THREE.NearestFilter,
format: THREE.RGBAFormat,
depthBuffer: false,
stencilBuffer: false
};
Expand All @@ -138,9 +137,7 @@ THREE.Fire = function ( geometry, options ) {

this.field0.background = new THREE.Color( 0x000000 );

this.field1 = new THREE.WebGLRenderTarget( textureWidth,
textureHeight,
parameters );
this.field1 = new THREE.WebGLRenderTarget( textureWidth, textureHeight, parameters );

this.field0.background = new THREE.Color( 0x000000 );

Expand All @@ -164,7 +161,7 @@ THREE.Fire = function ( geometry, options ) {
this.orthoCamera = new THREE.OrthographicCamera( textureWidth / - 2, textureWidth / 2, textureHeight / 2, textureHeight / - 2, 1, 2 );
this.orthoCamera.position.z = 1;

this.fieldGeometry = new THREE.PlaneGeometry( textureWidth, textureHeight );
this.fieldGeometry = new THREE.PlaneBufferGeometry( textureWidth, textureHeight );

this.internalSource = new THREE.DataTexture( this.sourceData, textureWidth, textureHeight, THREE.RGBAFormat );

Expand Down
5 changes: 2 additions & 3 deletions examples/webgl_fire.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<script src="js/WebGL.js"></script>
<script src="js/libs/dat.gui.min.js"></script>
<script src="js/libs/stats.min.js"></script>
<script src="js/Fire.js"></script>
<script src="js/objects/Fire.js"></script>

</head>
<body>
Expand Down Expand Up @@ -96,7 +96,7 @@
camera.add( pointLight );
scene.add( camera );

var plane = new THREE.PlaneGeometry( 20, 20 );
var plane = new THREE.PlaneBufferGeometry( 20, 20 );
fire = new THREE.Fire( plane, {
textureWidth: 512,
textureHeight: 512,
Expand All @@ -109,7 +109,6 @@
renderer.setPixelRatio( window.devicePixelRatio );
renderer.setSize( window.innerWidth, window.innerHeight );
renderer.autoClear = false;
renderer.antialias = true;
document.body.appendChild( renderer.domElement );

function updateColor1( value ) {
Expand Down

0 comments on commit 810f42a

Please sign in to comment.