Skip to content

Commit c282f17

Browse files
committed
camera name hotfix; pvlNav v0.0.21
1 parent 49cf4dd commit c282f17

File tree

4 files changed

+58
-12
lines changed

4 files changed

+58
-12
lines changed

docs/js/ProckStackGitio.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,10 @@ const shadowMapBiasing = pxlEnums.SHADOW_MAP.SOFT;
9393
// Locations pulled from the 'Camera' group in the pxlRoom's FBX file
9494
const enableStaticCamera = true;
9595

96+
// If using static cameras, allow the user to rotate the camera
97+
// Default is `false`
98+
const allowStaticRotation = false;
99+
96100
// Visual effect for the sky
97101
// Options are - OFF, VAPOR
98102
const skyHaze = pxlEnums.SKY_HAZE.VAPOR;
@@ -148,6 +152,7 @@ pxlNavOptions.pxlRoomRoot = pxlRoomRootPath;
148152
pxlNavOptions.pxlAssetRoot = pxlAssetRoot;
149153
pxlNavOptions.showOnboarding = showOnboarding;
150154
pxlNavOptions.staticCamera = enableStaticCamera;
155+
pxlNavOptions.allowStaticRotation = allowStaticRotation;
151156
pxlNavOptions.skyHaze = skyHaze;
152157
pxlNavOptions.shadowMapBiasing = shadowMapBiasing;
153158
pxlNavOptions.loaderPhrases = loaderPhrases;

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: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,10 @@ const shadowMapBiasing = pxlEnums.SHADOW_MAP.SOFT;
9292
// Default is `false`
9393
const enableStaticCamera = false;
9494

95+
// If using static cameras, allow the user to rotate the camera
96+
// Default is `false`
97+
const allowStaticRotation = false;
98+
9599
// Visual effect for the sky
96100
// Default is `OFF`
97101
// Options are - OFF, VAPOR
@@ -102,7 +106,7 @@ const skyHaze = pxlEnums.SKY_HAZE.VAPOR;
102106
// gridSize - The size of the grid
103107
// gridReference - Grid scene reference threshold to scale `gridSize`
104108
const collisionScale = {
105-
'gridSize' : 100,
109+
'gridSize' : 150,
106110
'gridReference' : 1000
107111
};
108112

@@ -129,6 +133,7 @@ pxlNavOptions.pxlRoomRoot = pxlRoomRootPath;
129133
pxlNavOptions.pxlAssetRoot = pxlAssetRoot;
130134
pxlNavOptions.showOnboarding = showOnboarding;
131135
pxlNavOptions.staticCamera = enableStaticCamera;
136+
pxlNavOptions.allowStaticRotation = allowStaticRotation;
132137
pxlNavOptions.skyHaze = skyHaze;
133138
pxlNavOptions.shadowMapBiasing = shadowMapBiasing;
134139
pxlNavOptions.loaderPhrases = loaderPhrases;

docs/js/pxlRooms/SaltFlatsEnvironment/SaltFlatsEnvironment.js

Lines changed: 46 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
import {
55
Vector2,
6+
Vector3,
67
Color,
78
FogExp2,
89
UniformsUtils,
@@ -28,7 +29,6 @@ export class SaltFlatsEnvironment extends RoomEnvironment{
2829
super( roomName, assetPath, msRunner, camera, scene, cloud3dTexture );
2930

3031
this.assetPath=assetPath+"Assets/";
31-
this.assetPath="./js/pxlRooms/SaltFlatsEnvironment/Assets/";
3232

3333
this.sceneFile = this.assetPath+"SaltFlatsEnvironment.fbx";
3434
this.animInitCycle = "Walk";
@@ -82,9 +82,9 @@ export class SaltFlatsEnvironment extends RoomEnvironment{
8282
}
8383

8484
start(){
85-
if( this.booted ){
85+
/*if( this.booted ){
8686
this.resetCamera();
87-
}
87+
}*/
8888
let animKey = this.animRigName;
8989
let hasScripted = this.geoList.hasOwnProperty( 'Scripted' );
9090
if( this.geoList.hasOwnProperty( animKey ) && hasScripted && this.geoList["Scripted"].hasOwnProperty( "Offset_loc" ) ){
@@ -114,7 +114,7 @@ export class SaltFlatsEnvironment extends RoomEnvironment{
114114

115115
// Per-Frame Render updates
116116
step(){
117-
super.step();
117+
//super.step();
118118

119119
// When the Druid Rabbit finishes loading, we'll step the animation here
120120
// Cycle changes occur here as well.
@@ -161,6 +161,47 @@ export class SaltFlatsEnvironment extends RoomEnvironment{
161161
}
162162

163163
// -- -- --
164+
165+
166+
buildDust(){
167+
if( this.mobile ) return;
168+
169+
// -- -- --
170+
171+
let systemName = "floatingDust";
172+
let dustSystem = new FloatingDust( this, systemName );
173+
174+
let dustSystemSettings = dustSystem.getSettings();
175+
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
180+
dustSystemSettings["additiveBlend"] = true;
181+
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
185+
186+
187+
dustSystemSettings["atlasPicks"] = [
188+
...dustSystem.dupeArray([0.0,0.],4), ...dustSystem.dupeArray([0.25,0.],4),
189+
...dustSystem.dupeArray([0.0,0.25],4), ...dustSystem.dupeArray([0.25,0.25],4),
190+
...dustSystem.dupeArray([0.0,0.5],2), ...dustSystem.dupeArray([0.25,0.5],2),
191+
...dustSystem.dupeArray([0.0,0.75],3), ...dustSystem.dupeArray([0.25,0.75],3)
192+
];
193+
194+
// Use a texture from the internal `pxlAsset` folder; ( RGB, Alpha )
195+
//dustSystem.setAtlasPath( "sprite_dustLiquid_rgb.jpg", "sprite_dustLiquid_alpha.jpg" );
196+
197+
// Generate geometry and load texture resources
198+
dustSystem.build( dustSystemSettings );
199+
200+
this.particleList[systemName] = dustSystem;
201+
}
202+
203+
204+
// -- -- --
164205

165206

166207
fbxPostLoad(){
@@ -180,12 +221,7 @@ export class SaltFlatsEnvironment extends RoomEnvironment{
180221

181222
// Floating debris in the air
182223

183-
let systemName = "floatingDust";
184-
this.particleList[systemName] = new FloatingDust( this, systemName );
185-
let atlasPath = this.assetPath+"sprite_dustLiquid.png"
186-
187-
this.particleList[systemName].setAtlasPath( atlasPath );
188-
this.particleList[systemName].build( 1000, 10, 120, [-40,-10,0], [0.0, 5.0], [[.25,0],[.25,.25]], false );
224+
this.buildDust();
189225

190226
// -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
191227

0 commit comments

Comments
 (0)