@gnsx/three 0.185.12 → 0.185.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -61363,20 +61363,24 @@ class Renderer {
61363
61363
  */
61364
61364
  render( scene, camera ) {
61365
61365
 
61366
- // WITH_GENESYS
61367
- ProfilerService.begin( 'Renderer.render' );
61368
- // !WITH_GENESYS
61369
-
61370
61366
  if ( this._initialized === false ) {
61371
61367
 
61372
61368
  throw new Error( 'THREE.Renderer: .render() called before the backend is initialized. Use "await renderer.init();" before rendering.' );
61373
61369
 
61374
61370
  }
61375
61371
 
61376
- this._renderScene( scene, camera );
61377
-
61378
61372
  // WITH_GENESYS
61379
- ProfilerService.end( 'Renderer.render' );
61373
+ const label = `Renderer.render (${scene.name || scene.type})`;
61374
+ const handle = ProfilerService.beginGpu( label, this );
61375
+ try {
61376
+
61377
+ this._renderScene( scene, camera );
61378
+
61379
+ } finally {
61380
+
61381
+ ProfilerService.endGpu( handle );
61382
+
61383
+ }
61380
61384
  // !WITH_GENESYS
61381
61385
 
61382
61386
  }
@@ -61530,10 +61534,6 @@ class Renderer {
61530
61534
 
61531
61535
  if ( this._isDeviceLost === true ) return;
61532
61536
 
61533
- // WITH_GENESYS
61534
- ProfilerService.begin( 'Renderer._renderScene' );
61535
- // !WITH_GENESYS
61536
-
61537
61537
  //
61538
61538
 
61539
61539
  const frameBufferTarget = useFrameBufferTarget ? this._getFrameBufferTarget() : null;
@@ -61770,6 +61770,12 @@ class Renderer {
61770
61770
  renderContext.activeMipmapLevel = activeMipmapLevel;
61771
61771
  renderContext.occlusionQueryCount = renderList.occlusionQueryCount;
61772
61772
 
61773
+ // WITH_GENESYS
61774
+ // Size is finalized above from the active RT or drawing buffer.
61775
+ const profilerLabel = `Renderer._renderScene (${renderContext.width}x${renderContext.height})`;
61776
+ ProfilerService.begin( profilerLabel );
61777
+ // !WITH_GENESYS
61778
+
61773
61779
  //
61774
61780
 
61775
61781
  renderContext.scissorValue.max( _vector4.set( 0, 0, 0, 0 ) );
@@ -61845,7 +61851,7 @@ class Renderer {
61845
61851
  //
61846
61852
 
61847
61853
  // WITH_GENESYS
61848
- ProfilerService.end( 'Renderer._renderScene' );
61854
+ ProfilerService.end( profilerLabel );
61849
61855
  // !WITH_GENESYS
61850
61856
 
61851
61857
  return renderContext;
@@ -63421,7 +63427,7 @@ class Renderer {
63421
63427
  _renderObjects( renderList, camera, scene, lightsNode, passId = null ) {
63422
63428
 
63423
63429
  // WITH_GENESYS
63424
- const label = `${this._currentRenderObjectFunction?.name || 'renderObject'} (${renderList.length})`;
63430
+ const label = `_renderObjects (${renderList.length})`;
63425
63431
  ProfilerService.begin( label );
63426
63432
  // !WITH_GENESYS
63427
63433
 
@@ -63656,6 +63662,11 @@ class Renderer {
63656
63662
  */
63657
63663
  renderObject( object, scene, camera, geometry, material, group, lightsNode, clippingContext = null, passId = null ) {
63658
63664
 
63665
+ // WITH_GENESYS
63666
+ const label = `renderObject (${object.name || object.type} - ${material.name || material.type})`;
63667
+ ProfilerService.begin( label );
63668
+ // !WITH_GENESYS
63669
+
63659
63670
  let materialOverride = false;
63660
63671
  let materialColorNode;
63661
63672
  let materialDepthNode;
@@ -63767,6 +63778,10 @@ class Renderer {
63767
63778
 
63768
63779
  object.onAfterRender( this, scene, camera, geometry, material, group );
63769
63780
 
63781
+ // WITH_GENESYS
63782
+ ProfilerService.end( label );
63783
+ // !WITH_GENESYS
63784
+
63770
63785
  }
63771
63786
 
63772
63787
  /**