@@ -61,6 +61,7 @@ export class OutletEnvironment extends RoomEnvironment{
61
61
// The FBX file to load for your room
62
62
// Defaults to " ./ pxlRooms / *YourRoomEnv* / Assets / *YourSceneFile.fbx* "
63
63
this . sceneFile = this . assetPath + "OutletEnvironment.fbx" ;
64
+ //this.sceneFile = this.assetPath+"OutletEnvironment.glb";
64
65
65
66
// Environment Shader
66
67
this . spiralizerUniforms = { } ;
@@ -158,15 +159,15 @@ buildDust(){
158
159
builBugs ( ) {
159
160
//if( this.mobile ) return;
160
161
161
- let vertexCount = 500 ; // Point Count
162
- let pScale = 10.0 ; // Point Base Scale
163
- let visibleDistance = 400 ; // Proximity Distance from Camera
162
+ let vertexCount = 300 ; // Point Count
163
+ let pScale = 6.25 ; // Point Base Scale
164
+ let visibleDistance = 500 ; // Proximity Distance from Camera
164
165
let particleOpacity = 1.0 ; // Overall Opacity
165
- let opacityRolloff = 0.9 ; // Distance-opacity falloff multiplier
166
+ let opacityRolloff = 0.85 ; // Distance-opacity falloff multiplier
166
167
167
168
let jumpHeightMult = 17.0 ; // How high the bugs jump
168
169
let wanderInfluence = 0.85 ; // How much the particle sways
169
- let wanderFrequency = 3.50 ; // How frequent the sway happens
170
+ let wanderFrequency = 3.75 ; // How frequent the sway happens
170
171
171
172
// -- -- --
172
173
@@ -180,24 +181,37 @@ builBugs(){
180
181
grassBugsSettings [ "proxDist" ] = visibleDistance ;
181
182
grassBugsSettings [ "fadeOutScalar" ] = opacityRolloff ;
182
183
grassBugsSettings [ "additiveBlend" ] = false ;
184
+
185
+ grassBugsSettings [ "tint" ] . set ( .85 , .72 , .55 ) ;
183
186
184
187
grassBugsSettings [ "jumpHeightMult" ] = jumpHeightMult ;
185
- grassBugsSettings [ "offsetPos" ] . y = .1 ;
188
+ grassBugsSettings [ "offsetPos" ] . y = .2 ;
186
189
187
190
grassBugsSettings [ "wanderInf" ] = wanderInfluence ;
188
191
grassBugsSettings [ "wanderFrequency" ] = wanderFrequency ;
189
192
193
+ // Use a texture from the internal `pxlAsset` folder; ( RGB, Alpha )
194
+
195
+ // For the darker tones, few of the white dust
196
+ grassBugsSettings [ "atlasPicks" ] = [
197
+ ...grassBugsSystem . dupeArray ( [ 0.0 , 0.0 ] , 4 ) , ...grassBugsSystem . dupeArray ( [ 0.25 , 0. ] , 4 ) ,
198
+ ...grassBugsSystem . dupeArray ( [ 0.0 , 0.25 ] , 4 ) , ...grassBugsSystem . dupeArray ( [ 0.25 , 0.25 ] , 4 ) ,
199
+ ...grassBugsSystem . dupeArray ( [ 0.0 , 0.5 ] , 2 ) , ...grassBugsSystem . dupeArray ( [ 0.25 , 0.5 ] , 2 ) ,
200
+ ] ;
201
+ grassBugsSystem . setAtlasPath ( "sprite_dustAtlas_rgb.jpg" , "sprite_dustAtlas_alpha.jpg" ) ;
202
+
203
+
204
+ /*
205
+ // For more of the lighter & bluer dustLiquid textures -
190
206
grassBugsSettings["atlasPicks"] = [
191
207
...grassBugsSystem.dupeArray([0.0,0.],4), ...grassBugsSystem.dupeArray([0.25,0.],4),
192
208
...grassBugsSystem.dupeArray([0.50,0.],4), ...grassBugsSystem.dupeArray([0.75,0.],4),
193
209
...grassBugsSystem.dupeArray([0.50,0.25],4), ...grassBugsSystem.dupeArray([0.75,0.25],4),
194
210
...grassBugsSystem.dupeArray([0.50,0.5],2), ...grassBugsSystem.dupeArray([0.75,0.5],2),
195
211
...grassBugsSystem.dupeArray([0.50,0.75],3), ...grassBugsSystem.dupeArray([0.75,0.75],3)
196
212
];
197
-
198
- // Use a texture from the internal `pxlAsset` folder; ( RGB, Alpha )
199
213
grassBugsSystem.setAtlasPath( "sprite_dustLiquid_rgb.jpg", "sprite_dustLiquid_alpha.jpg" );
200
-
214
+ */
201
215
202
216
// Set height map
203
217
grassBugsSystem . setHeightMapPath ( this . assetPath + "bug_heightMap.webp" ) ;
@@ -212,6 +226,7 @@ builBugs(){
212
226
213
227
// Generate geometry and load texture resources
214
228
grassBugsSystem . build ( grassBugsSettings , bugObj ) ;
229
+
215
230
this . particleList [ systemName ] = grassBugsSystem ;
216
231
}
217
232
@@ -519,8 +534,18 @@ builBugs(){
519
534
520
535
//
521
536
// -- -- --
522
-
523
- let fieldFbxLoader = this . pxlFile . loadRoomFBX ( this ) ; // , null, null, true );
537
+
538
+ // 'meshIsChild' - Some GLTF compressions splits Meshes -&- Transforms into Parent-Child relationships
539
+ // Read transforms from the parent, but apply the material + settings to the child
540
+ let loadSettings = Object . assign ( { } , this . pxlFile . getSettings ( ) ) ;
541
+ loadSettings [ 'filePath' ] = this . sceneFile ;
542
+ loadSettings [ 'fileType' ] = this . pxlEnums . FILE_TYPE . GLB ; // Optional; Default is 'AUTO'
543
+ loadSettings [ 'filePath' ] = this . assetPath + "OutletEnvironment.glb" ;
544
+ loadSettings [ 'filePath' ] = this . assetPath + "OutletEnvironment_blender.glb" ;
545
+ loadSettings [ 'meshIsChild' ] = true ; // If your GLB has been "optimized" to split transforms & meshes
546
+ loadSettings [ 'enableLogging' ] = true ;
547
+ //let fieldFbxLoader = this.pxlFile.loadRoom( this, loadSettings );
548
+ let fieldFbxLoader = this . pxlFile . loadRoom ( this ) ;
524
549
525
550
// -- -- -- -- -- -- -- -- -- -- -- -- -- //
526
551
0 commit comments