Skip to content

Commit cff02c2

Browse files
committed
Mass style & formatting cleanup
Added extra options to pages and tons of page edits
1 parent 8ee4d55 commit cff02c2

33 files changed

+464
-239
lines changed

docs/js/pxlNav.esm.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/js/pxlNavLoader.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@ userSettings['headBounce']['height'] = 0.3; // Bounce magnitude in units
5858
userSettings['headBounce']['rate'] = 0.025; // Bounce rate per Step()
5959
userSettings['headBounce']['easeIn'] = 0.03; // When move key is pressed, the ease into bounce; `bounce * ( boundInf + easeIn )`
6060
userSettings['headBounce']['easeOut'] = 0.95; // When move key is let go, the ease back to no bounce; `bounce * easeOut`
61-
userSettings['jump']['impulse'] = 0.75; // Jump impulse force applied to the player while holding the jump button
61+
userSettings['jump']['impulse'] = 0.60; // Jump impulse force applied to the player while holding the jump button
6262
userSettings['jump']['holdMax'] = 2.85; // Max influence of holding the jump button on current jump; in seconds
6363
userSettings['jump']['repeatDelay'] = 0.08; // Delay between jumps when holding the jump button
64-
userSettings['gravity']['UPS'] = 0.3; // Units per Step() per Step()
64+
userSettings['gravity']['UPS'] = 0.28; // Units per Step() per Step()
6565
userSettings['gravity']['Max'] = 15.5; // Max gravity rate
6666

6767
// -- -- --

docs/js/pxlPages/ProcPage.js

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,15 @@ export class ProcPage {
1515
this.pageStyles = contentObject.pageStyles || "";
1616
this.styleOverrides = contentObject.styleOverrides || {};
1717
this.initialSection = contentObject.initialSection || 0;
18+
this.activeNavButton = contentObject.activeNavButton || [];
1819

1920
this.layoutTypes = ['single', 'triple', 'vertical'];
2021
this.layout = 'triple';
2122
if( contentObject.hasOwnProperty('layout') && this.layoutTypes.includes(contentObject.layout) ){
2223
this.layout = contentObject.layout;
2324
}
2425

26+
this.navButton = null;
2527
this.pageObject = null;
2628
this.pageContent = {};
2729
this.prevSection = null;
@@ -455,6 +457,14 @@ export class ProcPage {
455457
pageInnerContent.appendChild( pageSubHeader );
456458
}
457459

460+
if( this.hasPageStyle( 'headerLine' ) ){
461+
let headerLineObj = document.createElement('div');
462+
headerLineObj.classList.add('procPagesHeaderLine');
463+
this.applyPageStyle( 'headerLine', headerLineObj );
464+
pageInnerContent.appendChild( headerLineObj );
465+
}
466+
467+
458468
let pageSections = pageInnerContent;
459469
if( false && this.layout == 'triple' ){
460470
pageSections = document.createElement('div');
@@ -530,8 +540,14 @@ export class ProcPage {
530540

531541
let sectionContentBlock = document.createElement('div');
532542
sectionContentBlock.classList.add('procPageSectionContentStyle');
543+
sectionContentBlock.classList.add('pagesVisOff');
533544
sectionContentBlock.id = sectionTitle;
534545

546+
if( sectionData.hasOwnProperty( 'contentStyle' ) && Array.isArray( sectionData.contentStyle ) ){
547+
sectionData.contentStyle.forEach(( style )=>{ style!=''&&sectionContentBlock.classList.add(style) });
548+
}
549+
550+
535551
this.applyPageStyle( 'sectionNav', sectionContentBlock );
536552

537553
pageContentView.appendChild( sectionContentBlock );
@@ -550,6 +566,7 @@ export class ProcPage {
550566
this.sectionData[sectionTitle].objects.push( ...builtObjs['content'] );
551567
}
552568

569+
builtObjs.content.push( sectionContentBlock );
553570
this.sectionData[sectionTitle].objects = builtObjs.content;
554571

555572
if( builtObjs.hasOwnProperty('nav') ){
@@ -722,6 +739,7 @@ export class ProcPage {
722739

723740

724741
if( sectionData.name != '' ){
742+
725743
let sectionTitleDiv = document.createElement('div');
726744
if( this.layout == 'triple' ){
727745
sectionTitleDiv.classList.add('procPagesNavSectionStyle');
@@ -739,8 +757,16 @@ export class ProcPage {
739757
sectionTitleDiv.innerHTML = sectionData.name;
740758

741759
this.applyPageStyle( 'sectionNavButton', sectionTitleDiv );
742-
743-
sectionList.appendChild( sectionTitleDiv );
760+
if( this.hasPageStyle('sectionNavButtonBackground') ){
761+
let buttonBgObj = document.createElement('div');
762+
buttonBgObj.classList.add('procPagesSectionNavButtonBackground');
763+
this.applyPageStyle( 'sectionNavButtonBackground', buttonBgObj );
764+
buttonBgObj.appendChild( sectionTitleDiv );
765+
sectionList.appendChild( buttonBgObj );
766+
}else{
767+
sectionList.appendChild( sectionTitleDiv );
768+
}
769+
744770
ret['nav'] = sectionTitleDiv;
745771
}
746772

@@ -804,4 +830,8 @@ export class ProcPage {
804830
}
805831
}
806832

833+
hasPageStyle( styleType ){
834+
return this.pageStyles.hasOwnProperty( styleType );
835+
}
836+
807837
}

docs/js/pxlPages/ProcPageManager.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,7 @@ export class ProcPageManager {
266266
}
267267

268268
//this.runHidePages();
269+
this.activateNavButton( this.curPageName );
269270

270271
// Let the dom settle for a step
271272
setTimeout( ()=>{
@@ -493,6 +494,28 @@ export class ProcPageManager {
493494
}
494495
}
495496

497+
activateNavButton( pageName ){
498+
let navKeys = Object.keys(this.navBarObjs);
499+
navKeys.forEach( (navKey)=>{
500+
if( navKey == null ) return;
501+
502+
let curNav = this.navBarObjs[navKey];
503+
if( this.pageListing.hasOwnProperty(navKey) ){
504+
let pageData = this.pageListing[navKey]["pageData"];
505+
if( navKey == pageName ){
506+
console.log(pageData);
507+
if( pageData.hasOwnProperty("activeNavButton") && Array.isArray(pageData["activeNavButton"]) ){
508+
pageData["activeNavButton"].forEach( (activeNavButton)=>{ curNav.classList.add(activeNavButton); });
509+
}
510+
}else{
511+
if( pageData.hasOwnProperty("activeNavButton") && Array.isArray(pageData["activeNavButton"]) ){
512+
pageData["activeNavButton"].forEach( (activeNavButton)=>{ curNav.classList.remove(activeNavButton); });
513+
}
514+
}
515+
}
516+
});
517+
}
518+
496519
changePage( pageName, roomName=null, locationName=null ){
497520
if( pageName != this.curPage && Object.keys(this.pageListing).includes(pageName) ){
498521
this.toggleFader(this.curPage, false);
@@ -546,6 +569,9 @@ export class ProcPageManager {
546569
// Trigger css animation to bring the new page in
547570
this.toggleFader(this.curPage, true);
548571

572+
//Activate nav button
573+
this.activateNavButton( pageName );
574+
549575
// Apply new page styles
550576
this.setStyleOverrides();
551577

docs/js/pxlRooms/CampfireEnvironment/CampfireEnvironment.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -237,18 +237,18 @@ export class CampfireEnvironment extends RoomEnvironment{
237237

238238
let systemName = "floatingDust";
239239
let dustSystem = new FloatingDust( this, systemName );
240-
241240
let dustSystemSettings = dustSystem.getSettings();
242-
dustSystemSettings["vertCount"] = 800; // Point Count
243-
dustSystemSettings["pScale"] = 7.0; // Point Base Scale
244-
dustSystemSettings["pOpacity"] = .6; // Overall Opacity
245-
dustSystemSettings["proxDist"] = 380; // Proximity Distance from Camera
246-
dustSystemSettings["fadeOutScalar"] = 1.9; // Distance-opacity falloff multiplier
247-
dustSystemSettings["additiveBlend"] = true;
241+
dustSystemSettings["vertCount"] = 900; // Point Count
242+
dustSystemSettings["pScale"] = 8.5; // Point Base Scale
243+
dustSystemSettings["pOpacity"] = .95; // Overall Opacity
244+
dustSystemSettings["proxDist"] = 220; // Proximity Distance from Camera
245+
dustSystemSettings["fadeOutScalar"] = 1.2; // Distance-opacity falloff multiplier
246+
dustSystemSettings["additiveBlend"] = false;
248247

249-
dustSystemSettings["windDir"] = new Vector3( -0.9, 0.25, -1 ); // Constant direction flow
248+
dustSystemSettings["offsetPos"] = new Vector3( -10.0, 5.0, 10.0 ); // Offset center of the system
249+
dustSystemSettings["windDir"] = new Vector3( -4.4, 0.25, 4.8 ); // Constant direction flow
250250
dustSystemSettings["wanderInf"] = 0.50; // How much the particle sways
251-
dustSystemSettings["wanderFrequency"] = 2.30; // How frequent the sway happens
251+
dustSystemSettings["wanderFrequency"] = 2.80; // How frequent the sway happens
252252

253253

254254
dustSystemSettings["atlasPicks"] = [

docs/js/pxlRooms/OutletEnvironment/OutletEnvironment.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,13 @@ export class OutletEnvironment extends RoomEnvironment{
7474
buildDust(){
7575
if( this.mobile ) return;
7676

77-
let vertexCount = 800; // Point Count
78-
let pScale = 8.5; // Point Base Scale
77+
let vertexCount = 600; // Point Count
78+
let pScale = 8.0; // Point Base Scale
7979
let visibleDistance = 380; // Proximity Distance from Camera
80-
let particleOpacity = .6; // Overall Opacity
80+
let particleOpacity = .55; // Overall Opacity
8181
let opacityRolloff = 1.9; // Distance-opacity falloff multiplier
8282

83-
let windDirection = new Vector3( 8.218, 0.406, -7.812 ); // Constant direction flow
83+
let windDirection = new Vector3( 5.218, 0.406, -10.812 ); // Constant direction flow
8484
let wanderInfluence = 0.80; // How much the particle sways
8585
let wanderFrequency = 2.30; // How frequent the sway happens
8686

docs/js/pxlRooms/SaltFlatsEnvironment/SaltFlatsEnvironment.js

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -173,15 +173,17 @@ export class SaltFlatsEnvironment extends RoomEnvironment{
173173

174174
let dustSystemSettings = dustSystem.getSettings();
175175
dustSystemSettings["vertCount"] = 800; // Point Count
176-
dustSystemSettings["pScale"] = 7.0; // Point Base Scale
177-
dustSystemSettings["pOpacity"] = .6; // Overall Opacity
178-
dustSystemSettings["proxDist"] = 380; // Proximity Distance from Camera
179-
dustSystemSettings["fadeOutScalar"] = 1.9; // Distance-opacity falloff multiplier
176+
dustSystemSettings["pScale"] = 5.5; // Point Base Scale
177+
dustSystemSettings["pOpacity"] = .85; // Overall Opacity
178+
dustSystemSettings["proxDist"] = 300; // Proximity Distance from Camera
179+
dustSystemSettings["fadeOutScalar"] = 3.0; // Distance-opacity falloff multiplier
180180
dustSystemSettings["additiveBlend"] = true;
181181

182-
dustSystemSettings["windDir"] = new Vector3( -0.9, 0.25, -1 ); // Constant direction flow
183-
dustSystemSettings["wanderInf"] = 0.50; // How much the particle sways
184-
dustSystemSettings["wanderFrequency"] = 2.30; // How frequent the sway happens
182+
dustSystemSettings["offsetPos"] = new Vector3( -200.0, 15.0, 0.0 ); // Offset center of the system
183+
dustSystemSettings["windDir"] = new Vector3( -0.0, 0.25, 10.0 ); // Constant direction flow
184+
dustSystemSettings["wanderInf"] = 0.5; // How much the particle sways
185+
dustSystemSettings["wanderRate"] = 1.85; // Wander noise rate
186+
dustSystemSettings["wanderFrequency"] = 2.80; // How frequent the sway happens
185187

186188

187189
dustSystemSettings["atlasPicks"] = [
@@ -192,7 +194,7 @@ export class SaltFlatsEnvironment extends RoomEnvironment{
192194
];
193195

194196
// Use a texture from the internal `pxlAsset` folder; ( RGB, Alpha )
195-
//dustSystem.setAtlasPath( "sprite_dustLiquid_rgb.jpg", "sprite_dustLiquid_alpha.jpg" );
197+
dustSystem.setAtlasPath( "sprite_dustLiquid_rgb.jpg", "sprite_dustLiquid_alpha.jpg" );
196198

197199
// Generate geometry and load texture resources
198200
dustSystem.build( dustSystemSettings );

docs/pages/aboutMe.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { ProcPage } from '../js/pxlPages/ProcPage.js';
44
import { pageListingData as aiDevData } from './aboutMe/aidev.js';
55
import { pageListingData as filmWorkData } from './aboutMe/filmWork.js';
66
import { pageListingData as plushiesData } from './aboutMe/plushies.js';
7-
import { pageListingData as whoAmIData } from './aboutMe/whoAmI.js';
7+
import { pageListingData as whatAmIData } from './aboutMe/whatAmI.js';
88

99
const metaDataInput = {
1010
'page': 'AboutMe',
@@ -20,6 +20,7 @@ const pageContentObject = {
2020
'page' : 'AboutMe',
2121
'title' : 'About Me; Kevin Edzenga',
2222
'theme' : '#656565',
23+
'activeNavButton' : [ 'procPagesNav_aboutMeActiveStyle' ],
2324
'layout' : 'vertical',
2425
'header' : 'About Me',
2526
'subHeader' : '',
@@ -34,7 +35,7 @@ const pageContentObject = {
3435
'sectionNavList' : [ 'gitAboutMePage-sectionNavListStyle' ],
3536
'sectionNav' : [],
3637
'sectionNavButton' : [ 'gitAboutMePage-sectionNavButtonStyle' ],
37-
'sectionNavButtonActive' : [ 'gitAboutMePage-sectionNavButtonAvtiveStyle' ],
38+
'sectionNavButtonActive' : [ 'gitAboutMePage-sectionNavButtonActiveStyle' ],
3839
'sectionContent' : [],
3940
'sectionMedia' : [],
4041
'sectionCaption' : [ 'gitAboutMePage-sectionCaptionStyle' ],
@@ -47,7 +48,7 @@ const pageContentObject = {
4748
'footerBar' : 'aboutMePage_footerBar'
4849
},
4950
'sections' : [
50-
whoAmIData,
51+
whatAmIData,
5152
filmWorkData,
5253
plushiesData,
5354
aiDevData

0 commit comments

Comments
 (0)