Skip to content

Commit

Permalink
flame magnitude and lacunarity adjustments, webpack todo
Browse files Browse the repository at this point in the history
  • Loading branch information
sjcobb committed Aug 8, 2019
1 parent 99c720a commit b7b515a
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 3 deletions.
17 changes: 16 additions & 1 deletion src/js/Flame.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,22 @@ export default class Flame {

const fireTex = globals.loader.load("assets/flame/FireOrig.png");
const volumetricFire = new THREE.Fire(fireTex);
volumetricFire.scale.set(6, 6.8, 6.0); //width, height, z

// volumetricFire.material.uniforms.magnitude.value = 0.5; //PREV: higher = spaciness
// volumetricFire.material.uniforms.lacunarity.value = 0.1; //PREV: lower = more cartoony
// volumetricFire.material.uniforms.lacunarity.gain = 0.1; //PREV: more = less height

// volumetricFire.material.uniforms.magnitude.value = 0.7;
volumetricFire.material.uniforms.magnitude.value = 1.0;
volumetricFire.material.uniforms.lacunarity.value = 1.8; //lower = more cartoony
// volumetricFire.material.uniforms.lacunarity.value = 2.0; //lower = more cartoony
//volumetricFire.material.uniforms.lacunarity.value = 1.0; //higher = more grainy
//volumetricFire.material.uniforms.noiseScale.value.x = 2.5; //num of fires horiz

// volumetricFire.scale.set(6, 6.8, 6.0); //PREV: width, height, z
volumetricFire.scale.set(6, 7.5, 6.0); //width, height, z
// volumetricFire.scale.set(15, 22, 15); //
// volumetricFire.scale.set(150, 220, 150); // TODO: fix scale for higher values & position

// volumetricFire.position.set(globals.posBehindX + 30, 3.5, globals.posBehindZ);
// volumetricFire.position.set(pos.x, 3.5, globals.posBehindZ);
Expand Down
3 changes: 2 additions & 1 deletion src/js/audio.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ var animationPart = new Tone.Part(function(time, instr) {
// ["0:0:0", globals.instr.flameCenter],
["0:0:0", globals.instr.flameCenter],
]);
animationPart.start("6:5:0");
animationPart.start("6:4:3");
// animationPart.start("0:0:0");

var animationPart2 = new Tone.Part(function(time, instr) {
physics.addBody(true, time * globals.multiplierPosX, instr);
Expand Down
2 changes: 1 addition & 1 deletion src/js/globals.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
activeInstrColor: '#9F532A', //red
// activeInstrColor: '#0018F9', //music wheel I blue
autoScroll: true,
autoStart: true,
autoStart: false,
autoStartTime: 9000,
camera: new THREE.PerspectiveCamera(40, window.innerWidth / window.innerHeight, 0.1, 1000),
cameraPositionBehind: true,
Expand Down
1 change: 1 addition & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

const path = require('path');

// TODO: include Three.js here instead of in index.html, resolve all in src folder and node_modules to fix GitHub Pages 404s
const config = {
entry: {
'bundle.js': [
Expand Down

0 comments on commit b7b515a

Please sign in to comment.