Skip to content

Commit

Permalink
Merge pull request #4 from sjcobb/develop
Browse files Browse the repository at this point in the history
Develop - bolero of fire video v4 release prep
  • Loading branch information
sjcobb authored Sep 15, 2019
2 parents 49ee2bd + ea0f0a7 commit 3e17bd5
Show file tree
Hide file tree
Showing 12 changed files with 73 additions and 34 deletions.
18 changes: 10 additions & 8 deletions css/bounce.css
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ button#bounce {

#legend-container {
display: inline-block;
width: 80px;
width: 90px;
margin: 0 auto;
position: absolute;
right: 0;
Expand All @@ -129,7 +129,7 @@ button#bounce {
display: inline-block;
position: relative;
margin: 0;
padding: 6px 0px 6px 20px;
padding: 10px 0px 8px 20px;
box-sizing: border-box;
}
.legend ul {
Expand All @@ -139,13 +139,13 @@ button#bounce {
}
.legend ul li {
height: 14px;
margin: 0 0 5px;
margin: 0 0 6px;
}
.legend span.symbol {
display: block;
width: 8px;
height: 8px;
margin: 7px 0 0 0;
width: 10px;
height: 10px;
margin: 5px 0 0 0;
padding: 0;
position: absolute;
left: 0;
Expand All @@ -156,11 +156,13 @@ button#bounce {
.legend p {
margin: 0;
padding: 0;
font-family: 'Didact Gothic', sans-serif;
/* font-family: 'Didact Gothic', sans-serif; */
/* font-family: 'Sawarabi Gothic', sans-serif; */
font-family: Verdana, sans-serif;
line-height: 20px;
font-size: 12px;
font-size: 14px;
color: #fff;
letter-spacing: 1.25px;
}

#legend-container.animate-in {
Expand Down
13 changes: 10 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -84,17 +84,24 @@
</section>
</div>

<!-- <div id="legend-container" class="hidden"> -->
<!-- <div id="legend-container" class=""> -->
<div id="legend-container" class="pos-top-left animate-in">
<div class="legend">
<ul>
<li><span id="symbol_1" class="symbol" style="background-color: #0018F9"></span><p>I</p></li>
<!-- <li><span id="symbol_1" class="symbol" style="background-color: #0018F9"></span><p>I</p></li>
<li><span id="symbol_2" class="symbol" style="background-color: #680896"></span><p>ii</p></li>
<li><span id="symbol_3" class="symbol" style="background-color: #FF001F"></span><p>iii</p></li>
<li><span id="symbol_4" class="symbol" style="background-color: #006CFA"></span><p>IV</p></li>
<li><span id="symbol_5" class="symbol" style="background-color: #4B0AA1"></span><p>V</p></li>
<li><span id="symbol_6" class="symbol" style="background-color: #C6018B"></span><p>vi</p></li>
<li><span id="symbol_7" class="symbol" style="background-color: #FF872B"></span><p>vii</p></li>
<li><span id="symbol_7" class="symbol" style="background-color: #FF872B"></span><p>vii</p></li> -->
<li><span id="symbol_1" class="symbol" style="background-color: #0018F9"></span><p>I</p></li>
<li><span id="symbol_2" class="symbol" style="background-color: #680896"></span><p>II</p></li>
<li><span id="symbol_3" class="symbol" style="background-color: #FF001F"></span><p>III</p></li>
<li><span id="symbol_4" class="symbol" style="background-color: #006CFA"></span><p>IV</p></li>
<li><span id="symbol_5" class="symbol" style="background-color: #4B0AA1"></span><p>V</p></li>
<li><span id="symbol_6" class="symbol" style="background-color: #C6018B"></span><p>VI</p></li>
<li><span id="symbol_7" class="symbol" style="background-color: #FF872B"></span><p>VII</p></li>
</ul>
</div>
</div>
Expand Down
19 changes: 17 additions & 2 deletions src/js/Flame.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,27 @@ export default class Flame {

create(pos) {
// console.log(pos);
console.log(globals);
// console.log(globals);
// console.log(globals.flameArr);

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/InstrumentMappings.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ export default class InstrumentMappings {
},
tomHigh: {
ballDesc: 'T',
color: '#800080', //purple
// color: '#800080', //purple
color: '#006400', //dkgreen
keyInput: '7',
note: 'C',
octave: 2,
Expand Down
8 changes: 5 additions & 3 deletions src/js/Light.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,15 @@ export default class Light {
light.shadow.camera.left = light.shadow.camera.bottom = -lightSize;
light.shadow.camera.right = light.shadow.camera.top = lightSize;

light.shadow.mapSize.width = 1024;
light.shadow.mapSize.height = 1024;
// light.shadow.mapSize.width = 1024; // prev
// light.shadow.mapSize.height = 1024;

light.shadow.mapSize.width = 0;
light.shadow.mapSize.height = 0;

this.sun = light;
// globals.scene.add(light);


globals.scene.add(light);

// const fogColor = new THREE.Color(0xffffff);
Expand Down
4 changes: 2 additions & 2 deletions src/js/Trigger.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ var toneSnare = new Tone.NoiseSynth({
// const player808HiHat = new Player(`${sampleBaseUrl}/808-hihat-vh.mp3`).toMaster();
// const playerHiHatOpen = new Tone.Player("./assets/sounds/drum-kits/dubstep/hihat-open.mp3").toMaster(); //PREV
const playerHiHatOpen = new Player("./assets/sounds/drum-kits/dubstep/hihat-open.mp3").toMaster();

const playerHiHat = new Player("./assets/sounds/drum-kits/dubstep/hihat-closed.mp3").toMaster();
// playerHiHat.volume.value = 1.5;
playerHiHatOpen.volume.value = -2;
playerHiHat.volume.value = -2;

// const playerKick = new Player("./assets/sounds/drum-kits/analog/kick.mp3").toMaster(); //aka dubstep - 808?
// const playerKick = new Player("./assets/sounds/drum-kits/dubstep/kick.mp3").toMaster(); //aka analog - PREV
Expand Down
1 change: 1 addition & 0 deletions src/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,7 @@ let animate = () => {
// console.log('position: ', Tone.Transport.position); //ex: 0:0:0.124
// console.log('seconds: ', Tone.Transport.seconds);
// console.log(globals.ticks);
// console.log(globals.clock.elapsedTime);

if (globals.showStaticRows === true) {
for (var key in poolBalls) {
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
11 changes: 7 additions & 4 deletions src/js/globals.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,17 @@
import { FlyControls } from 'three/examples/jsm/controls/FlyControls.js';

export default {
activeInstrColor: '#9F532A', //red
// activeInstrColor: '#9F532A', //ltred
// activeInstrColor: '#800000', //dkred
activeInstrColor: '#8F0000', //medred
// activeInstrColor: '#0018F9', //music wheel I blue
autoScroll: true,
autoStart: false,
autoStart: true,
autoStartTime: 9000,
camera: new THREE.PerspectiveCamera(40, window.innerWidth / window.innerHeight, 0.1, 1000),
cameraPositionBehind: true,
// cameraLookUp: true,
cameraLookUp: false,
cameraLookUp: true,
// cameraLookUp: false,
clock: new THREE.Clock(),
configColorAnimate: true,
controls: '',
Expand Down
4 changes: 2 additions & 2 deletions src/js/physics.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,11 @@ export default class Physics {
body.angularVelocity.z = 12;

if (options.type === 'animation') {
console.log('addBody -> animation: ', options);
// console.log('addBody -> animation: ', options);

// if (globals.flameCounter % 2 === 0) {
// if (globals.flameCounter % 3 === 0) {
console.log(globals.flameCounter);
// console.log(globals.flameCounter);
// if (globals.flameCounter === 4) {
// if (globals.flameCounter % 2 === 1) { //is flame is called odd num of times
// if (globals.flameCounter === 1) {
Expand Down
22 changes: 14 additions & 8 deletions src/js/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ if (globals.autoStart === true) {
controlsId.classList.toggle('hidden');
setTimeout(function() {
Tone.Transport.start();
}, 9000);
}, globals.autoStartTime);
// }, 9000);
} else {
controlsId.classList.toggle('show');
}
Expand All @@ -111,18 +112,23 @@ document.addEventListener("visibilitychange", function() {
if (document.hidden){
console.log("visibilitychange -> Browser tab is hidden");
Tone.Transport.stop();
console.log("Tone.Transport stopped......");
} else {
console.log("visibilitychange -> Browser tab is visible");
}
});

// setTimeout(function() {
// globals.cameraPositionBehind = false;
// // camera.position.set(0, 20, 40);
// camera.position.set(0, 5, 35);
// camera.lookAt(new THREE.Vector3(-1, 1, 10));
// // }, 54000);
// }, 2000);
setTimeout(function() {
globals.cameraPositionBehind = false;
// globals.camera.position.set(0, 20, 40);
// globals.camera.position.set(0, 5, 35);
globals.camera.position.set(0, 12, 30);
globals.camera.lookAt(new THREE.Vector3(0, 1, 10));
// globals.camera.lookAt(new THREE.Vector3(-1, 1, 10));
// }, globals.autoStartTime + 32000); //globals.autoStartTime = 9000
}, globals.autoStartTime + 46000);
// }, 33000);
// }, 1000);

// globals.cameraPositionBehind = false;
// // camera.position.set(0, 5, 35);
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 3e17bd5

Please sign in to comment.