@gnsx/three 0.184.14 → 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gnsx/three",
3
- "version": "0.184.14",
3
+ "version": "0.184.15",
4
4
  "description": "JavaScript 3D library",
5
5
  "type": "module",
6
6
  "main": "./build/three.cjs",
@@ -2,10 +2,6 @@
2
2
  /**
3
3
  * ProfilerService — per-label CPU timing with ring-buffer aggregation and DevTools integration.
4
4
  *
5
- * Activate via environment variable:
6
- * PROFILING=1 stats + trace (full profile)
7
- * PROFILING=stats stats only, no trace accumulation (lower overhead)
8
- *
9
5
  * Quick start (browser console):
10
6
  * __gnsx_profiler.enable()
11
7
  * // play for a few seconds
@@ -21,26 +17,12 @@ const FRAME_BUDGET_MS = 1000 / 60;
21
17
  const MAX_TRACE_EVENTS = 50_000;
22
18
  const NOOP = () => {};
23
19
 
24
- function _readProfilingEnv() {
25
-
26
- const raw =
27
- ( typeof process !== 'undefined' ? process.env?.[ 'PROFILING' ] : undefined ) ??
28
- ( typeof globalThis !== 'undefined' ? globalThis[ '__gnsx_env__' ]?.[ 'PROFILING' ] : undefined ) ??
29
- ( typeof globalThis !== 'undefined' ? globalThis[ '__GNSX_PROFILING__' ] : undefined );
30
-
31
- if ( ! raw || raw === '0' || raw === 'false' ) return false;
32
- if ( raw === 'stats' ) return 'stats';
33
- return 'full';
34
-
35
- }
36
-
37
20
  class ProfilerServiceClass {
38
21
 
39
22
  constructor() {
40
23
 
41
- const envProfile = _readProfilingEnv();
42
- this._profile = envProfile !== false ? envProfile : 'full';
43
- this._enabled = envProfile !== false;
24
+ this._profile = 'full';
25
+ this._enabled = false;
44
26
 
45
27
  /** @type {Map<string, Float64Array>} */
46
28
  this.buffers = new Map();
@@ -424,8 +406,6 @@ const ProfilerService = new ProfilerServiceClass();
424
406
 
425
407
  function applyProfileToMethod( label, descriptor ) {
426
408
 
427
- if ( _readProfilingEnv() === false ) return descriptor;
428
-
429
409
  const original = descriptor.value;
430
410
 
431
411
  function profiled( ...args ) {