@gnsx/three 0.184.13 → 0.184.15
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.
- package/build/three.cjs +2 -22
- package/build/three.core.js +2 -22
- package/build/three.core.min.js +1 -1
- package/package.json +1 -1
- package/src/profiler/ProfilerService.js +2 -22
package/build/three.cjs
CHANGED
|
@@ -59691,10 +59691,6 @@ class TextureUtils {
|
|
|
59691
59691
|
/**
|
|
59692
59692
|
* ProfilerService — per-label CPU timing with ring-buffer aggregation and DevTools integration.
|
|
59693
59693
|
*
|
|
59694
|
-
* Activate via environment variable:
|
|
59695
|
-
* PROFILING=1 stats + trace (full profile)
|
|
59696
|
-
* PROFILING=stats stats only, no trace accumulation (lower overhead)
|
|
59697
|
-
*
|
|
59698
59694
|
* Quick start (browser console):
|
|
59699
59695
|
* __gnsx_profiler.enable()
|
|
59700
59696
|
* // play for a few seconds
|
|
@@ -59710,26 +59706,12 @@ const FRAME_BUDGET_MS = 1000 / 60;
|
|
|
59710
59706
|
const MAX_TRACE_EVENTS = 50_000;
|
|
59711
59707
|
const NOOP = () => {};
|
|
59712
59708
|
|
|
59713
|
-
function _readProfilingEnv() {
|
|
59714
|
-
|
|
59715
|
-
const raw =
|
|
59716
|
-
( typeof process !== 'undefined' ? process.env?.[ 'PROFILING' ] : undefined ) ??
|
|
59717
|
-
( typeof globalThis !== 'undefined' ? globalThis[ '__gnsx_env__' ]?.[ 'PROFILING' ] : undefined ) ??
|
|
59718
|
-
( typeof globalThis !== 'undefined' ? globalThis[ '__GNSX_PROFILING__' ] : undefined );
|
|
59719
|
-
|
|
59720
|
-
if ( ! raw || raw === '0' || raw === 'false' ) return false;
|
|
59721
|
-
if ( raw === 'stats' ) return 'stats';
|
|
59722
|
-
return 'full';
|
|
59723
|
-
|
|
59724
|
-
}
|
|
59725
|
-
|
|
59726
59709
|
class ProfilerServiceClass {
|
|
59727
59710
|
|
|
59728
59711
|
constructor() {
|
|
59729
59712
|
|
|
59730
|
-
|
|
59731
|
-
this.
|
|
59732
|
-
this._enabled = envProfile !== false;
|
|
59713
|
+
this._profile = 'full';
|
|
59714
|
+
this._enabled = false;
|
|
59733
59715
|
|
|
59734
59716
|
/** @type {Map<string, Float64Array>} */
|
|
59735
59717
|
this.buffers = new Map();
|
|
@@ -60113,8 +60095,6 @@ const ProfilerService = new ProfilerServiceClass();
|
|
|
60113
60095
|
|
|
60114
60096
|
function applyProfileToMethod( label, descriptor ) {
|
|
60115
60097
|
|
|
60116
|
-
if ( _readProfilingEnv() === false ) return descriptor;
|
|
60117
|
-
|
|
60118
60098
|
const original = descriptor.value;
|
|
60119
60099
|
|
|
60120
60100
|
function profiled( ...args ) {
|
package/build/three.core.js
CHANGED
|
@@ -59711,10 +59711,6 @@ class TextureUtils {
|
|
|
59711
59711
|
/**
|
|
59712
59712
|
* ProfilerService — per-label CPU timing with ring-buffer aggregation and DevTools integration.
|
|
59713
59713
|
*
|
|
59714
|
-
* Activate via environment variable:
|
|
59715
|
-
* PROFILING=1 stats + trace (full profile)
|
|
59716
|
-
* PROFILING=stats stats only, no trace accumulation (lower overhead)
|
|
59717
|
-
*
|
|
59718
59714
|
* Quick start (browser console):
|
|
59719
59715
|
* __gnsx_profiler.enable()
|
|
59720
59716
|
* // play for a few seconds
|
|
@@ -59730,26 +59726,12 @@ const FRAME_BUDGET_MS = 1000 / 60;
|
|
|
59730
59726
|
const MAX_TRACE_EVENTS = 50_000;
|
|
59731
59727
|
const NOOP = () => {};
|
|
59732
59728
|
|
|
59733
|
-
function _readProfilingEnv() {
|
|
59734
|
-
|
|
59735
|
-
const raw =
|
|
59736
|
-
( typeof process !== 'undefined' ? process.env?.[ 'PROFILING' ] : undefined ) ??
|
|
59737
|
-
( typeof globalThis !== 'undefined' ? globalThis[ '__gnsx_env__' ]?.[ 'PROFILING' ] : undefined ) ??
|
|
59738
|
-
( typeof globalThis !== 'undefined' ? globalThis[ '__GNSX_PROFILING__' ] : undefined );
|
|
59739
|
-
|
|
59740
|
-
if ( ! raw || raw === '0' || raw === 'false' ) return false;
|
|
59741
|
-
if ( raw === 'stats' ) return 'stats';
|
|
59742
|
-
return 'full';
|
|
59743
|
-
|
|
59744
|
-
}
|
|
59745
|
-
|
|
59746
59729
|
class ProfilerServiceClass {
|
|
59747
59730
|
|
|
59748
59731
|
constructor() {
|
|
59749
59732
|
|
|
59750
|
-
|
|
59751
|
-
this.
|
|
59752
|
-
this._enabled = envProfile !== false;
|
|
59733
|
+
this._profile = 'full';
|
|
59734
|
+
this._enabled = false;
|
|
59753
59735
|
|
|
59754
59736
|
/** @type {Map<string, Float64Array>} */
|
|
59755
59737
|
this.buffers = new Map();
|
|
@@ -60133,8 +60115,6 @@ const ProfilerService = new ProfilerServiceClass();
|
|
|
60133
60115
|
|
|
60134
60116
|
function applyProfileToMethod( label, descriptor ) {
|
|
60135
60117
|
|
|
60136
|
-
if ( _readProfilingEnv() === false ) return descriptor;
|
|
60137
|
-
|
|
60138
60118
|
const original = descriptor.value;
|
|
60139
60119
|
|
|
60140
60120
|
function profiled( ...args ) {
|