@woosh/meep-engine 2.119.25 → 2.119.26

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.
Files changed (51) hide show
  1. package/package.json +1 -1
  2. package/src/engine/ecs/terrain/ecs/layers/TerrainLayers.d.ts.map +1 -1
  3. package/src/engine/ecs/terrain/ecs/layers/TerrainLayers.js +3 -3
  4. package/src/engine/graphics/GraphicsEngine.d.ts.map +1 -1
  5. package/src/engine/graphics/GraphicsEngine.js +2 -1
  6. package/src/engine/graphics/ecs/highlight/renderer/OutlineRenderer.d.ts.map +1 -1
  7. package/src/engine/graphics/ecs/highlight/renderer/OutlineRenderer.js +7 -6
  8. package/src/engine/graphics/ecs/light/binding/three/ThreeLightBinding.d.ts.map +1 -1
  9. package/src/engine/graphics/ecs/light/binding/three/ThreeLightBinding.js +2 -1
  10. package/src/engine/graphics/impostors/octahedral/ImpostorBaker.d.ts.map +1 -1
  11. package/src/engine/graphics/impostors/octahedral/ImpostorBaker.js +2 -1
  12. package/src/engine/graphics/loadCubeTexture.d.ts.map +1 -1
  13. package/src/engine/graphics/loadCubeTexture.js +3 -2
  14. package/src/engine/graphics/render/buffer/buffers/ColorAndDepthFrameBuffer.d.ts.map +1 -1
  15. package/src/engine/graphics/render/buffer/buffers/ColorAndDepthFrameBuffer.js +4 -4
  16. package/src/engine/graphics/render/buffer/buffers/NormalFrameBuffer.d.ts.map +1 -1
  17. package/src/engine/graphics/render/buffer/buffers/NormalFrameBuffer.js +3 -2
  18. package/src/engine/graphics/render/forward_plus/prototype/prototypeLightManager.js +2 -1
  19. package/src/engine/graphics/render/utils/renderScreenSpace.d.ts.map +1 -1
  20. package/src/engine/graphics/render/utils/renderScreenSpace.js +2 -1
  21. package/src/engine/graphics/render/visibility/hiz/buildCanvasViewFromTexture.js +2 -2
  22. package/src/engine/graphics/sh3/lpv/WebGLCubeProbeRenderer.d.ts.map +1 -1
  23. package/src/engine/graphics/sh3/lpv/WebGLCubeProbeRenderer.js +0 -2
  24. package/src/engine/graphics/sh3/lpv/depth/octahedral/stitching/prototype.js +3 -3
  25. package/src/engine/graphics/texture/GL_RGBFormat.d.ts +6 -0
  26. package/src/engine/graphics/texture/GL_RGBFormat.d.ts.map +1 -0
  27. package/src/engine/graphics/texture/GL_RGBFormat.js +6 -0
  28. package/src/engine/graphics/texture/GL_RGBIntegerFormat.d.ts +6 -0
  29. package/src/engine/graphics/texture/GL_RGBIntegerFormat.d.ts.map +1 -0
  30. package/src/engine/graphics/texture/GL_RGBIntegerFormat.js +5 -0
  31. package/src/engine/graphics/texture/channelCountToThreIntegerTextureType.d.ts +1 -1
  32. package/src/engine/graphics/texture/channelCountToThreIntegerTextureType.d.ts.map +1 -1
  33. package/src/engine/graphics/texture/channelCountToThreIntegerTextureType.js +3 -2
  34. package/src/engine/graphics/texture/channelCountToThreeTextureFormat.d.ts.map +1 -1
  35. package/src/engine/graphics/texture/channelCountToThreeTextureFormat.js +3 -2
  36. package/src/engine/graphics/texture/formatToChannelCount.d.ts.map +1 -1
  37. package/src/engine/graphics/texture/formatToChannelCount.js +2 -7
  38. package/src/engine/graphics/texture/sampler/writeSampler2DDataToDataTexture.d.ts.map +1 -1
  39. package/src/engine/graphics/texture/sampler/writeSampler2DDataToDataTexture.js +3 -2
  40. package/src/engine/graphics/texture/virtual/VirtualTextureMemoryMapping.d.ts.map +1 -1
  41. package/src/engine/graphics/texture/virtual/VirtualTextureMemoryMapping.js +4 -0
  42. package/src/engine/graphics/texture/virtual/VirtualTexturePage.d.ts +5 -1
  43. package/src/engine/graphics/texture/virtual/VirtualTexturePage.d.ts.map +1 -1
  44. package/src/engine/graphics/texture/virtual/VirtualTexturePage.js +31 -7
  45. package/src/engine/graphics/texture/virtual/VirtualTextureSystem.d.ts +4 -6
  46. package/src/engine/graphics/texture/virtual/VirtualTextureSystem.d.ts.map +1 -1
  47. package/src/engine/graphics/texture/virtual/VirtualTextureSystem.js +7 -6
  48. package/src/engine/graphics/texture/virtual/prototype.js +2 -2
  49. package/src/engine/graphics/three/three_setSceneAutoUpdate.d.ts +7 -0
  50. package/src/engine/graphics/three/three_setSceneAutoUpdate.d.ts.map +1 -0
  51. package/src/engine/graphics/three/three_setSceneAutoUpdate.js +18 -0
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "description": "Fully featured ECS game engine written in JavaScript",
6
6
  "type": "module",
7
7
  "author": "Alexander Goldring",
8
- "version": "2.119.25",
8
+ "version": "2.119.26",
9
9
  "main": "build/meep.module.js",
10
10
  "module": "build/meep.module.js",
11
11
  "exports": {
@@ -1 +1 @@
1
- {"version":3,"file":"TerrainLayers.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/ecs/terrain/ecs/layers/TerrainLayers.js"],"names":[],"mappings":"AA6EA;IAGQ;;;OAGG;IACH,QAFU,KAAK,YAAY,CAAC,CAEJ;IAExB;;;OAGG;IACH,YAFU,OAAO,CAEoD;IAErE;;;OAGG;IACH,SAFU,kBAAkB,CAEqC;IAgBjE,2BAAsF;IAa1F;;;MAKC;IAED;;;aAGC;IAED;;;;OAIG;IACH,gCAHW,MAAM,iBACN,MAAM,QAuChB;IAED;;;;OAIG;IACH,0DAyBC;IAED,sCAIC;IAED;;;;OAIG;IACH,WAHW,MAAM,GACL,YAAY,CAIvB;IAED;;;;OAIG;IACH,8DAFa,MAAM,CAqBlB;IAED;;;;OAIG;IACH,kCAHW,MAAM,GACJ,MAAM,CAMlB;IAED;;;OAGG;IACH,SAFY,MAAM,CAIjB;IAED;;;;OAIG;IACH,gBAHW,YAAY,GACV,MAAM,CAWlB;IAED;;;;OAIG;IACH,mBAHW,YAAY,GACX,OAAO,CAIlB;IAED;;;;;;OAMG;IACH,0CA8BC;IAED;;;OAGG;IACH,iCAFW,MAAM,QAgChB;IAED,gBAGC;IAED,cAEC;IAGD,qBAqCC;CACJ;iBApZgB,6CAA6C;6BAOjC,mBAAmB;oBAN5B,qCAAqC;mCALlD,OAAO;4BAAP,OAAO"}
1
+ {"version":3,"file":"TerrainLayers.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/ecs/terrain/ecs/layers/TerrainLayers.js"],"names":[],"mappings":"AA6EA;IAGQ;;;OAGG;IACH,QAFU,KAAK,YAAY,CAAC,CAEJ;IAExB;;;OAGG;IACH,YAFU,OAAO,CAEoD;IAErE;;;OAGG;IACH,SAFU,kBAAkB,CAEqC;IAgBjE,2BAAsF;IAa1F;;;MAKC;IAED;;;aAGC;IAED;;;;OAIG;IACH,gCAHW,MAAM,iBACN,MAAM,QAuChB;IAED;;;;OAIG;IACH,0DAyBC;IAED,sCAIC;IAED;;;;OAIG;IACH,WAHW,MAAM,GACL,YAAY,CAIvB;IAED;;;;OAIG;IACH,8DAFa,MAAM,CAqBlB;IAED;;;;OAIG;IACH,kCAHW,MAAM,GACJ,MAAM,CAMlB;IAED;;;OAGG;IACH,SAFY,MAAM,CAIjB;IAED;;;;OAIG;IACH,gBAHW,YAAY,GACV,MAAM,CAWlB;IAED;;;;OAIG;IACH,mBAHW,YAAY,GACX,OAAO,CAIlB;IAED;;;;;;OAMG;IACH,0CA8BC;IAED;;;OAGG;IACH,iCAFW,MAAM,QAgChB;IAED,gBAGC;IAED,cAEC;IAGD,qBAqCC;CACJ;iBArZgB,6CAA6C;6BAQjC,mBAAmB;oBAP5B,qCAAqC;mCALlD,OAAO;4BAAP,OAAO"}
@@ -8,7 +8,6 @@ import {
8
8
  LinearMipMapLinearFilter,
9
9
  NearestFilter,
10
10
  RepeatWrapping,
11
- RGBFormat,
12
11
  RGFormat,
13
12
  UnsignedByteType
14
13
  } from "three";
@@ -20,6 +19,7 @@ import Vector2 from "../../../../../core/geom/Vector2.js";
20
19
  import { invokeObjectEquals } from "../../../../../core/model/object/invokeObjectEquals.js";
21
20
  import { invokeObjectHash } from "../../../../../core/model/object/invokeObjectHash.js";
22
21
  import { computeStringHash } from "../../../../../core/primitives/strings/computeStringHash.js";
22
+ import { GL_RGBFormat } from "../../../../graphics/texture/GL_RGBFormat.js";
23
23
  import { sampler2d_scale } from "../../../../graphics/texture/sampler/resize/sampler2d_scale.js";
24
24
  import { Sampler2D } from "../../../../graphics/texture/sampler/Sampler2D.js";
25
25
  import { TerrainLayer } from "./TerrainLayer.js";
@@ -36,7 +36,7 @@ class ScaledTextureKey {
36
36
  * @returns {ScaledTextureKey}
37
37
  */
38
38
  static from(uri, size) {
39
- assert.typeOf(uri, 'string', 'uri');
39
+ assert.isString(uri, 'uri');
40
40
 
41
41
  const r = new ScaledTextureKey();
42
42
 
@@ -95,7 +95,7 @@ export class TerrainLayers {
95
95
  * @type {DataTexture2DArray}
96
96
  */
97
97
  this.texture = new DataTexture2DArray(new Uint8Array(3), 1, 1, 1);
98
- this.texture.format = RGBFormat;
98
+ this.texture.format = GL_RGBFormat;
99
99
  this.texture.type = UnsignedByteType;
100
100
 
101
101
  this.texture.wrapS = RepeatWrapping;
@@ -1 +1 @@
1
- {"version":3,"file":"GraphicsEngine.d.ts","sourceRoot":"","sources":["../../../../src/engine/graphics/GraphicsEngine.js"],"names":[],"mappings":"AA0DA;IAOI;;;;;OAKG;IACH,+BAJW,MAAM,EAuKhB;IA7KD,gCAEC;IAgBG;;;;OAIG;IACH,2BAA+C;IAK/C;;;;;QAOI;;WAEG;;QAEH;;WAEG;;;;;MAMN;IAED;;OAEG;IACH,YAFU,OAAO,CAEe;IAEhC;;;OAGG;IACH,QAFU,kBAAkB,CAEU;IAWtC;;;OAGG;IACH,aAAkB;IAGlB;;;OAGG;IACH,cAFU,KAAK,CAEgB;IAK/B;;;OAGG;IACH,QAFU,MAAM,CAEI;IAEpB;;;OAGG;IACH,UAFU,aAAa,CAEH;IAGpB,+BAA0C;IAU1C;;OAEG;IACH,eAA+B;IAI/B;;;OAGG;IACH,uBAFU,kBAAkB,CAEgB;IAE5C;;;OAGG;IACH,oBAFU,iBAAiB,CAEsB;IAEjD;;;OAGG;IACH,gBAFU,iBAAiB,CAES;IAEpC;;;OAGG;IACH,sBAAoC;IAGpC;;;;OAIG;IACH,UAFU,OAAO,CAEG;IAEpB;;;OAGG;IACH,UAFU,OAAO,CAEG;IAEpB;;;OAGG;IACH,YAFU,MAAM,CAEG;IACnB,kKAcI;IAGR;;;OAGG;IACH,sBAFa,eAAe,CAI3B;IAED;;;OAGG;IACH,eAFa,aAAa,CAIzB;IAED,mBA0BC;IAED;;;OAGG;IACH,iCAOC;IAED;;;OAGG;IACH,0BAFa,MAAM,CAIlB;IAED,+BAcC;IAED,cAgEC;IAzBsB,8BAA0C;IA2BjE;;;OAGG;IACH,cAFa,MAAM,CAYlB;IAED;;OAEG;IACH,aAQC;IAED;;OAEG;IACH,yBAQC;IAED;;;;;;OAMG;IACH,yBALW,MAAM,KACN,MAAM,6CAMhB;IAED;;;;OAIG;IACH,8BAHW,iBAAe,UACf,iBAAe,QAczB;IAED;;;;;OAKG;IACH,8BAQC;IAED,0BAEC;IAED;;;OAGG;IACH,4BAFW,cAAc,QA8BxB;IAED;;OAEG;IACH,qBAqBC;IAED;;OAEG;IACH,0BAeC;IAED;;OAEG;IACH,eA8CC;;CACJ;mBAjlBkB,oCAAoC;oBACnC,4BAA4B;mCAab,uCAAuC;sBAjBnE,OAAO;uBAYS,wBAAwB;8BAZxC,OAAO;4BAWc,+BAA+B;mCAKxB,uCAAuC;kCAKxC,gCAAgC;kCADhC,oCAAoC;gCAPtC,uCAAuC;+BAKxC,4BAA4B"}
1
+ {"version":3,"file":"GraphicsEngine.d.ts","sourceRoot":"","sources":["../../../../src/engine/graphics/GraphicsEngine.js"],"names":[],"mappings":"AA2DA;IAOI;;;;;OAKG;IACH,+BAJW,MAAM,EAuKhB;IA7KD,gCAEC;IAgBG;;;;OAIG;IACH,2BAA+C;IAK/C;;;;;QAOI;;WAEG;;QAEH;;WAEG;;;;;MAMN;IAED;;OAEG;IACH,YAFU,OAAO,CAEe;IAEhC;;;OAGG;IACH,QAFU,kBAAkB,CAEU;IAWtC;;;OAGG;IACH,aAAkB;IAGlB;;;OAGG;IACH,cAFU,KAAK,CAEgB;IAK/B;;;OAGG;IACH,QAFU,MAAM,CAEI;IAEpB;;;OAGG;IACH,UAFU,aAAa,CAEH;IAGpB,+BAA0C;IAU1C;;OAEG;IACH,eAA+B;IAI/B;;;OAGG;IACH,uBAFU,kBAAkB,CAEgB;IAE5C;;;OAGG;IACH,oBAFU,iBAAiB,CAEsB;IAEjD;;;OAGG;IACH,gBAFU,iBAAiB,CAES;IAEpC;;;OAGG;IACH,sBAAoC;IAGpC;;;;OAIG;IACH,UAFU,OAAO,CAEG;IAEpB;;;OAGG;IACH,UAFU,OAAO,CAEG;IAEpB;;;OAGG;IACH,YAFU,MAAM,CAEG;IACnB,kKAcI;IAGR;;;OAGG;IACH,sBAFa,eAAe,CAI3B;IAED;;;OAGG;IACH,eAFa,aAAa,CAIzB;IAED,mBA0BC;IAED;;;OAGG;IACH,iCAOC;IAED;;;OAGG;IACH,0BAFa,MAAM,CAIlB;IAED,+BAcC;IAED,cAgEC;IAzBsB,8BAA0C;IA2BjE;;;OAGG;IACH,cAFa,MAAM,CAYlB;IAED;;OAEG;IACH,aAQC;IAED;;OAEG;IACH,yBAQC;IAED;;;;;;OAMG;IACH,yBALW,MAAM,KACN,MAAM,6CAMhB;IAED;;;;OAIG;IACH,8BAHW,iBAAe,UACf,iBAAe,QAczB;IAED;;;;;OAKG;IACH,8BAQC;IAED,0BAEC;IAED;;;OAGG;IACH,4BAFW,cAAc,QA8BxB;IAED;;OAEG;IACH,qBAqBC;IAED;;OAEG;IACH,0BAeC;IAED;;OAEG;IACH,eA8CC;;CACJ;mBAllBkB,oCAAoC;oBACnC,4BAA4B;mCAab,uCAAuC;sBAjBnE,OAAO;uBAYS,wBAAwB;8BAZxC,OAAO;4BAWc,+BAA+B;mCAKxB,uCAAuC;kCAKxC,gCAAgC;kCADhC,oCAAoC;gCAPtC,uCAAuC;+BAKxC,4BAA4B"}
@@ -30,6 +30,7 @@ import { renderTextureToScreenQuad } from "./render/utils/renderTextureToScreenQ
30
30
  import { CameraViewManager } from "./render/view/CameraViewManager.js";
31
31
  import { ShadowMapRenderer } from "./shadows/ShadowMapRenderer.js";
32
32
  import { StandardFrameBuffers } from "./StandardFrameBuffers.js";
33
+ import { three_setSceneAutoUpdate } from "./three/three_setSceneAutoUpdate.js";
33
34
 
34
35
  /**
35
36
  *
@@ -122,7 +123,7 @@ export class GraphicsEngine {
122
123
  //renderer setup
123
124
  const scene = new ThreeScene();
124
125
  //prevent automatic updates to all descendants of the scene, such updates are very wasteful
125
- scene.autoUpdate = false;
126
+ three_setSceneAutoUpdate(scene, false);
126
127
  //prevent scene matrix from automatically updating, as it would result in updates to the entire scene graph
127
128
  scene.matrixAutoUpdate = false;
128
129
  //setup environment
@@ -1 +1 @@
1
- {"version":3,"file":"OutlineRenderer.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/ecs/highlight/renderer/OutlineRenderer.js"],"names":[],"mappings":"AA8JA;IAQQ;;;OAGG;IACH,wBAAoB;IAEpB;;;OAGG;IACH,eAAkB;IAElB;;;OAGG;IACH,OAFU,KAAK,CAEE;IAEjB;;;;OAIG;IACH,gCAGE;IAEF,gCAA6D;IAC7D,kBAA6B;IAE7B,kCAAoD;IACpD,kCAA6C;IAC7C,gCAAuC;IAEvC,qDAAsF;IAGtF,kBAA6B;IAK7B;;;OAGG;IACH,eAFU,OAAO,CAEQ;IAEzB,sCAMC;IASD,6CAOE;IAEF,6CAOE;IAEF,6CAOE;IAEF,uCAOE;IAEF,uCAOE;IASF;;;;OAIG;IACH,yBAAyB;IAEzB;;;;OAIG;IACH,2BAA2B;IAG3B;;;;OAIG;IACH,4BAA+B;IAGnC,2BAEC;IAED;;;OAGG;IACH,gDAEC;IAED;;;;OAIG;IACH,UAHW,MAAM,KACN,MAAM,QA0BhB;IAED;;;OAGG;IACH,kBAFW,oBAAkB,kBAAkB,QAI9C;IAED;;;;OAIG;IACH,sCAyBC;IAED;;;;OAIG;IACH,6BAmBC;IAED;;;OAGG;IACH,mDAiDC;IAhDG,sCAA4B;IAkDhC;;;OAGG;IACH,2BAFW,MAAM,QA0ChB;IAED;;;;;OAKG;IACH,8BAyBC;IAED,wBAEC;IAED;;OAEG;IACH,uBAIC;IAED;;;;;OAKG;IACH,0CAgBC;IAED,wBAEC;IAGD;;;OAGG;IACH,0CAqBC;IAED,0BAeC;CACJ;sBAtmBM,OAAO;mCAAP,OAAO;+BAAP,OAAO;oCAAP,OAAO;qBAAP,OAAO;4BAAP,OAAO;kCAAP,OAAO"}
1
+ {"version":3,"file":"OutlineRenderer.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/ecs/highlight/renderer/OutlineRenderer.js"],"names":[],"mappings":"AA+JA;IAQQ;;;OAGG;IACH,wBAAoB;IAEpB;;;OAGG;IACH,eAAkB;IAElB;;;OAGG;IACH,OAFU,KAAK,CAEE;IAEjB;;;;OAIG;IACH,gCAGE;IAEF,gCAA6D;IAC7D,kBAA6B;IAE7B,kCAAoD;IACpD,kCAA6C;IAC7C,gCAAuC;IAEvC,qDAAsF;IAGtF,kBAA6B;IAK7B;;;OAGG;IACH,eAFU,OAAO,CAEQ;IAEzB,sCAMC;IASD,6CAOE;IAEF,6CAOE;IAEF,6CAOE;IAEF,uCAOE;IAEF,uCAOE;IASF;;;;OAIG;IACH,yBAAyB;IAEzB;;;;OAIG;IACH,2BAA2B;IAG3B;;;;OAIG;IACH,4BAA+B;IAGnC,2BAEC;IAED;;;OAGG;IACH,gDAEC;IAED;;;;OAIG;IACH,UAHW,MAAM,KACN,MAAM,QA0BhB;IAED;;;OAGG;IACH,kBAFW,oBAAkB,kBAAkB,QAI9C;IAED;;;;OAIG;IACH,sCAyBC;IAED;;;;OAIG;IACH,6BAmBC;IAED;;;OAGG;IACH,mDAiDC;IAhDG,sCAA4B;IAkDhC;;;OAGG;IACH,2BAFW,MAAM,QA0ChB;IAED;;;;;OAKG;IACH,8BAyBC;IAED,wBAEC;IAED;;OAEG;IACH,uBAIC;IAED;;;;;OAKG;IACH,0CAgBC;IAED,wBAEC;IAGD;;;OAGG;IACH,0CAqBC;IAED,0BAeC;CACJ;sBAvmBM,OAAO;mCAAP,OAAO;+BAAP,OAAO;oCAAP,OAAO;qBAAP,OAAO;4BAAP,OAAO;kCAAP,OAAO"}
@@ -18,14 +18,15 @@ import {
18
18
  Vector2,
19
19
  WebGLRenderTarget
20
20
  } from "three";
21
- import { makeHighlightDecodeShader } from "./HighlightDecodeShader.js";
22
- import { makeDilationShader } from "./makeDilationShader.js";
23
- import { ScreenSpaceQuadShader } from "../../../shaders/ScreenSpaceQuadShader.js";
24
- import { makeGaussianBlurShader } from "./makeGaussianBlurShader.js";
21
+ import { assert } from "../../../../../core/assert.js";
25
22
  import { HashMap } from "../../../../../core/collection/map/HashMap.js";
26
23
  import { invokeObjectEquals } from "../../../../../core/model/object/invokeObjectEquals.js";
27
24
  import { invokeObjectHash } from "../../../../../core/model/object/invokeObjectHash.js";
28
- import { assert } from "../../../../../core/assert.js";
25
+ import { ScreenSpaceQuadShader } from "../../../shaders/ScreenSpaceQuadShader.js";
26
+ import { three_setSceneAutoUpdate } from "../../../three/three_setSceneAutoUpdate.js";
27
+ import { makeHighlightDecodeShader } from "./HighlightDecodeShader.js";
28
+ import { makeDilationShader } from "./makeDilationShader.js";
29
+ import { makeGaussianBlurShader } from "./makeGaussianBlurShader.js";
29
30
  import { traverseThreeObject } from "./traverseThreeObject.js";
30
31
 
31
32
  const material_id_fragment_shader = `
@@ -203,7 +204,7 @@ export class OutlineRenderer {
203
204
  this.__ss_scene.add(this.__ss_mesh);
204
205
 
205
206
  this.__id_scene = new Scene();
206
- this.__id_scene.autoUpdate = false;
207
+ three_setSceneAutoUpdate(this.__id_scene, false);
207
208
  this.__id_scene.matrixAutoUpdate = false;
208
209
  this.__id_scene.matrixWorldNeedsUpdate = false;
209
210
 
@@ -1 +1 @@
1
- {"version":3,"file":"ThreeLightBinding.d.ts","sourceRoot":"","sources":["../../../../../../../../src/engine/graphics/ecs/light/binding/three/ThreeLightBinding.js"],"names":[],"mappings":"AAwEA;;;;GAIG;AACH,6EAFW,MAAM,QAgBhB;AAED;IAGQ;;;;OAIG;IACH,iBAAgB;IAEhB;;;;OAIG;IACH,qBAAoB;IAEpB;;;;OAIG;IACH,qBAA6B;IAGjC,qBAYC;IAED,uBAcC;IAED;;;;OAIG;IACH,yBAEC;IAYD,+BAEC;IAUD,yBAuBC;IAED,2BAgBC;IAED,iCA0BC;IAGD,2BA0CC;IA8CD,mCAmBC;CAEJ;6BAlW4B,oBAAoB"}
1
+ {"version":3,"file":"ThreeLightBinding.d.ts","sourceRoot":"","sources":["../../../../../../../../src/engine/graphics/ecs/light/binding/three/ThreeLightBinding.js"],"names":[],"mappings":"AAyEA;;;;GAIG;AACH,6EAFW,MAAM,QAgBhB;AAED;IAGQ;;;;OAIG;IACH,iBAAgB;IAEhB;;;;OAIG;IACH,qBAAoB;IAEpB;;;;OAIG;IACH,qBAA6B;IAGjC,qBAYC;IAED,uBAcC;IAED;;;;OAIG;IACH,yBAEC;IAYD,+BAEC;IAUD,yBAuBC;IAED,2BAgBC;IAED,iCA0BC;IAGD,2BA0CC;IA8CD,mCAmBC;CAEJ;6BAlW4B,oBAAoB"}
@@ -1,6 +1,7 @@
1
1
  import { DoubleSide, Mesh, MeshDepthMaterial, RGBADepthPacking, Scene } from "three";
2
2
  import { ThreeBypassRenderer } from "../../../../render/utils/ThreeBypassRenderer.js";
3
3
  import { CameraView } from "../../../../render/view/CameraView.js";
4
+ import { three_setSceneAutoUpdate } from "../../../../three/three_setSceneAutoUpdate.js";
4
5
  import { threeUpdateTransform } from "../../../../util/threeUpdateTransform.js";
5
6
  import { LightType } from "../../LightType.js";
6
7
  import { ShadowMap } from "../../shadow/ShadowMap.js";
@@ -9,7 +10,7 @@ import { applyRotation } from "./applyRotation.js";
9
10
  import { threeEnsureLightObject } from "./threeEnsureLightObject.js";
10
11
 
11
12
  const shadow_scene = new Scene();
12
- shadow_scene.autoUpdate = false;
13
+ three_setSceneAutoUpdate(shadow_scene, false);
13
14
  shadow_scene.matrixAutoUpdate = false;
14
15
  shadow_scene.matrixWorldNeedsUpdate = false;
15
16
 
@@ -1 +1 @@
1
- {"version":3,"file":"ImpostorBaker.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/impostors/octahedral/ImpostorBaker.js"],"names":[],"mappings":";AAoBA;IAEI;;;;OAIG;IACH,kBAAiB;IAEjB;;;OAGG;IACH,iDAEC;IAGD;;;;;;;OAOG;IACH,yEANW,MAAM,EAAE,OAAK,uBAgPvB;IAED;;;;;;;OAOG;IACH,4CANW;QAAC,IAAI,iBAAgB;QAAC,WAAU,IAAI,CAAA;KAAC,EAAE,GAIrC,mBAAmB,CAmE/B;CACJ;oCApVmC,0BAA0B;qBAhBnC,WAAW"}
1
+ {"version":3,"file":"ImpostorBaker.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/impostors/octahedral/ImpostorBaker.js"],"names":[],"mappings":";AAqBA;IAEI;;;;OAIG;IACH,kBAAiB;IAEjB;;;OAGG;IACH,iDAEC;IAGD;;;;;;;OAOG;IACH,yEANW,MAAM,EAAE,OAAK,uBAgPvB;IAED;;;;;;;OAOG;IACH,4CANW;QAAC,IAAI,iBAAgB;QAAC,WAAU,IAAI,CAAA;KAAC,EAAE,GAIrC,mBAAmB,CAmE/B;CACJ;oCApVmC,0BAA0B;qBAjBnC,WAAW"}
@@ -8,6 +8,7 @@ import { isPowerOfTwo } from "../../../../core/math/isPowerOfTwo.js";
8
8
  import { computeMaterialEquality } from "../../../asset/loaders/material/computeMaterialEquality.js";
9
9
  import { computeMaterialHash } from "../../../asset/loaders/material/computeMaterialHash.js";
10
10
  import { Sampler2D } from "../../texture/sampler/Sampler2D.js";
11
+ import { three_setSceneAutoUpdate } from "../../three/three_setSceneAutoUpdate.js";
11
12
  import { compute_bounding_sphere } from "./bake/compute_bounding_sphere.js";
12
13
  import { prepare_bake_material } from "./bake/prepare_bake_material.js";
13
14
  import { HemiOctahedralUvEncoder } from "./grid/HemiOctahedralUvEncoder.js";
@@ -104,7 +105,7 @@ export class ImpostorBaker {
104
105
  // construct scene
105
106
  const scene = new Scene();
106
107
 
107
- scene.autoUpdate = false;
108
+ three_setSceneAutoUpdate(scene, false);
108
109
  scene.matrixAutoUpdate = false;
109
110
  scene.matrixWorldNeedsUpdate = false;
110
111
 
@@ -1 +1 @@
1
- {"version":3,"file":"loadCubeTexture.d.ts","sourceRoot":"","sources":["../../../../src/engine/graphics/loadCubeTexture.js"],"names":[],"mappings":";AAEA,gGA2BC"}
1
+ {"version":3,"file":"loadCubeTexture.d.ts","sourceRoot":"","sources":["../../../../src/engine/graphics/loadCubeTexture.js"],"names":[],"mappings":";AAGA,gGA2BC"}
@@ -1,4 +1,5 @@
1
- import { CubeReflectionMapping, ImageUtils, RGBFormat } from 'three';
1
+ import { CubeReflectionMapping, ImageUtils } from 'three';
2
+ import { GL_RGBFormat } from "./texture/GL_RGBFormat.js";
2
3
 
3
4
  function loadCubeTexture(folder, format, names) {
4
5
  if (format === void 0) {
@@ -24,7 +25,7 @@ function loadCubeTexture(folder, format, names) {
24
25
  ];
25
26
 
26
27
  const textureCube = ImageUtils.loadTextureCube(urls);
27
- textureCube.format = RGBFormat;
28
+ textureCube.format = GL_RGBFormat;
28
29
  textureCube.mapping = CubeReflectionMapping;
29
30
  return textureCube;
30
31
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ColorAndDepthFrameBuffer.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/render/buffer/buffers/ColorAndDepthFrameBuffer.js"],"names":[],"mappings":"AA6BA;IACI,gCA8BC;CACJ;4BA7D2B,mBAAmB"}
1
+ {"version":3,"file":"ColorAndDepthFrameBuffer.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/render/buffer/buffers/ColorAndDepthFrameBuffer.js"],"names":[],"mappings":"AA6BA;IACI,gCA8BC;CACJ;4BAnD2B,mBAAmB"}
@@ -1,14 +1,14 @@
1
- import { FrameBuffer } from "../FrameBuffer.js";
2
1
  import {
3
2
  DepthFormat,
4
3
  DepthTexture,
5
4
  FloatType,
6
5
  NearestFilter,
7
- RGBFormat,
8
6
  sRGBEncoding,
9
7
  Vector2,
10
8
  WebGLMultisampleRenderTarget
11
9
  } from "three";
10
+ import { GL_RGBFormat } from "../../../texture/GL_RGBFormat.js";
11
+ import { FrameBuffer } from "../FrameBuffer.js";
12
12
 
13
13
  /**
14
14
  *
@@ -40,9 +40,9 @@ export class ColorAndDepthFrameBuffer extends FrameBuffer {
40
40
 
41
41
  renderer.getSize(size);
42
42
 
43
- const target = new WebGLMultisampleRenderTarget(size.x, size.y,{ignoreDepth: false});
43
+ const target = new WebGLMultisampleRenderTarget(size.x, size.y, { ignoreDepth: false });
44
44
 
45
- target.texture.format = RGBFormat; // note, three.js required RGBA render texture, even though RGB would do here
45
+ target.texture.format = GL_RGBFormat; // note, three.js required RGBA render texture, even though RGB would do here
46
46
  target.texture.minFilter = NearestFilter;
47
47
  target.texture.magFilter = NearestFilter;
48
48
  target.texture.generateMipmaps = false;
@@ -1 +1 @@
1
- {"version":3,"file":"NormalFrameBuffer.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/render/buffer/buffers/NormalFrameBuffer.js"],"names":[],"mappings":"AAeA;IAEI,qBAIC;IAED,gCAwCC;IAjBG,sCAAqE;IACrE,uCAAsE;IAQtE;;;OAGG;IACH,gBAAoB;IAOxB;;;;;OAKG;IACH,uBAoCC;IAED;;;;;;;OAOG;IACH,wEAuBC;IAtBG,gBAA0B;CAuBjC;4BA9I2B,mBAAmB;mCAWxC,OAAO"}
1
+ {"version":3,"file":"NormalFrameBuffer.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/render/buffer/buffers/NormalFrameBuffer.js"],"names":[],"mappings":"AAgBA;IAEI,qBAIC;IAED,gCAwCC;IAjBG,sCAAqE;IACrE,uCAAsE;IAQtE;;;OAGG;IACH,gBAAoB;IAOxB;;;;;OAKG;IACH,uBAoCC;IAED;;;;;;;OAOG;IACH,wEAuBC;IAtBG,gBAA0B;CAuBjC;4BAjI2B,mBAAmB;mCAJxC,OAAO"}
@@ -1,4 +1,3 @@
1
- import { FrameBuffer } from "../FrameBuffer.js";
2
1
  import {
3
2
  DoubleSide,
4
3
  HalfFloatType,
@@ -11,7 +10,9 @@ import {
11
10
  WebGLMultisampleRenderTarget
12
11
  } from "three";
13
12
  import { StandardFrameBuffers } from "../../../StandardFrameBuffers.js";
13
+ import { three_setSceneAutoUpdate } from "../../../three/three_setSceneAutoUpdate.js";
14
14
  import { ThreeBypassRenderer } from "../../utils/ThreeBypassRenderer.js";
15
+ import { FrameBuffer } from "../FrameBuffer.js";
15
16
 
16
17
  export class NormalFrameBuffer extends FrameBuffer {
17
18
 
@@ -58,7 +59,7 @@ export class NormalFrameBuffer extends FrameBuffer {
58
59
  * @private
59
60
  */
60
61
  this.__scene = scene;
61
- scene.autoUpdate = false;
62
+ three_setSceneAutoUpdate(scene, false);
62
63
  scene.matrixAutoUpdate = false;
63
64
  scene.matrixWorldNeedsUpdate = false;
64
65
  }
@@ -55,6 +55,7 @@ import { PointerDevice } from "../../../../input/devices/PointerDevice.js";
55
55
  import { StaticKnowledgeDatabase } from "../../../../knowledge/database/StaticKnowledgeDatabase.js";
56
56
  import { debugAtlas } from "../../../particles/particular/engine/shader/debugAtlas.js";
57
57
  import { Sampler2D } from "../../../texture/sampler/Sampler2D.js";
58
+ import { three_setSceneAutoUpdate } from "../../../three/three_setSceneAutoUpdate.js";
58
59
  import { threeUpdateTransform } from "../../../util/threeUpdateTransform.js";
59
60
  import { buildLightClusterWidget } from "../debug/buildLightClusterWidget.js";
60
61
  import { createLayerSwitcher } from "../debug/createLayerSwitcher.js";
@@ -99,7 +100,7 @@ const random = seededRandom(0);
99
100
 
100
101
  const scene = new Scene();
101
102
  scene.matrixAutoUpdate = false;
102
- scene.autoUpdate = false;
103
+ three_setSceneAutoUpdate(scene, false);
103
104
 
104
105
  const sphere_geometry = new OctahedronBufferGeometry(1, 2);
105
106
  const sphere_geometry_shell = makeHelperSphereGeometry(1);
@@ -1 +1 @@
1
- {"version":3,"file":"renderScreenSpace.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/render/utils/renderScreenSpace.js"],"names":[],"mappings":"AAmBA;;;;GAIG;AACH,qFAOC"}
1
+ {"version":3,"file":"renderScreenSpace.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/render/utils/renderScreenSpace.js"],"names":[],"mappings":"AAoBA;;;;GAIG;AACH,qFAOC"}
@@ -1,5 +1,6 @@
1
1
  import { Mesh, OrthographicCamera, Scene } from "three";
2
2
  import { FULL_SCREEN_TRIANGLE_GEOMETRY } from "../../geometry/FULL_SCREEN_TRIANGLE_GEOMETRY.js";
3
+ import { three_setSceneAutoUpdate } from "../../three/three_setSceneAutoUpdate.js";
3
4
 
4
5
 
5
6
  const quad = new Mesh(FULL_SCREEN_TRIANGLE_GEOMETRY, null);
@@ -11,7 +12,7 @@ quad.matrixWorldNeedsUpdate = false;
11
12
  const camera = new OrthographicCamera(-1, 1, 1, -1, 0, 1);
12
13
  const scene = new Scene();
13
14
 
14
- scene.autoUpdate = false;
15
+ three_setSceneAutoUpdate(scene, false);
15
16
  scene.matrixAutoUpdate = false;
16
17
  scene.matrixWorldNeedsUpdate = false;
17
18
 
@@ -6,7 +6,6 @@ import {
6
6
  OrthographicCamera,
7
7
  RedIntegerFormat,
8
8
  RGBAIntegerFormat,
9
- RGBIntegerFormat,
10
9
  RGIntegerFormat,
11
10
  Scene,
12
11
  ShaderMaterial,
@@ -19,6 +18,7 @@ import { FULL_SCREEN_TRIANGLE_GEOMETRY } from "../../../geometry/FULL_SCREEN_TRI
19
18
  import { glsl_gen_swizzled_read } from "../../../shaders/glsl_gen_swizzled_read.js";
20
19
  import CheckersTexture from "../../../texture/CheckersTexture.js";
21
20
  import { formatToChannelCount } from "../../../texture/formatToChannelCount.js";
21
+ import { GL_RGBIntegerFormat } from "../../../texture/GL_RGBIntegerFormat.js";
22
22
  import { Sampler2D } from "../../../texture/sampler/Sampler2D.js";
23
23
 
24
24
 
@@ -31,7 +31,7 @@ function defineSamplerType(texture) {
31
31
  switch (texture.format) {
32
32
  case RedIntegerFormat:
33
33
  case RGIntegerFormat:
34
- case RGBIntegerFormat:
34
+ case GL_RGBIntegerFormat:
35
35
  case RGBAIntegerFormat:
36
36
  return 'usampler2D';
37
37
  default:
@@ -1 +1 @@
1
- {"version":3,"file":"WebGLCubeProbeRenderer.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/sh3/lpv/WebGLCubeProbeRenderer.js"],"names":[],"mappings":"AAwBA;IACI,iCA0CC;IApCG;;;;OAIG;IACH,mBAAsB;IAEtB,qCASE;IAEF;;;;OAIG;IACH,wBAA8F;IAG9F,0BAAiE;IAEjE;;;;OAIG;IACH,gBAA0B;IA8C9B,mBAMC;CA6CJ;8BA3I6B,oBAAoB;sCAb3C,OAAO;2BAAP,OAAO"}
1
+ {"version":3,"file":"WebGLCubeProbeRenderer.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/sh3/lpv/WebGLCubeProbeRenderer.js"],"names":[],"mappings":"AAwBA;IACI,iCAwCC;IAlCG;;;;OAIG;IACH,mBAAsB;IAEtB,qCASE;IAEF;;;;OAIG;IACH,wBAA8F;IAG9F,0BAAiE;IAEjE;;;;OAIG;IACH,gBAA0B;IA4C9B,mBAMC;CA6CJ;8BAzI6B,oBAAoB;sCAb3C,OAAO;2BAAP,OAAO"}
@@ -63,8 +63,6 @@ export class WebGLCubeProbeRenderer extends ProbeRenderer {
63
63
  * @private
64
64
  */
65
65
  this.__scene = new Scene();
66
- // this.__scene.autoUpdate = false;
67
- // this.__scene.matrixAutoUpdate = false;
68
66
  }
69
67
 
70
68
  /**
@@ -7,7 +7,6 @@ import {
7
7
  NearestFilter,
8
8
  PerspectiveCamera,
9
9
  PlaneBufferGeometry,
10
- RGBFormat,
11
10
  Scene,
12
11
  ShaderMaterial,
13
12
  WebGLRenderer
@@ -16,6 +15,7 @@ import { OrbitControls } from "three/examples/jsm/controls/OrbitControls.js";
16
15
  import { float_to_uint8 } from "../../../../../../../core/binary/float_to_uint8.js";
17
16
  import { Color } from "../../../../../../../core/color/Color.js";
18
17
  import { FrameRunner } from "../../../../../FrameRunner.js";
18
+ import { GL_RGBFormat } from "../../../../../texture/GL_RGBFormat.js";
19
19
  import fragment from "./frag.glsl";
20
20
  import vertex from "./vert.glsl";
21
21
 
@@ -27,14 +27,14 @@ camera.lookAt(0, 0, 0);
27
27
 
28
28
  const scene = new Scene();
29
29
 
30
- const geometry = new PlaneBufferGeometry(1, 1,16,16);
30
+ const geometry = new PlaneBufferGeometry(1, 1, 16, 16);
31
31
 
32
32
  const texture = new DataTexture(new Uint8Array([
33
33
  '#000000', '#ff0000', '#00FF00', '#00FFFF',
34
34
  '#f8f8f8', '#FFAAFF', '#ffbc00', '#dd00ff',
35
35
  '#0071ff', '#FFFF00', '#a62c2c', '#ff7c2d',
36
36
  '#c5ff34', '#ffb7b7', '#833d1a', '#7b00ff',
37
- ].map(c => Color.parse(c).toArray().slice(0,3).map(float_to_uint8)).flat()), 4, 4, RGBFormat);
37
+ ].map(c => Color.parse(c).toArray().slice(0, 3).map(float_to_uint8)).flat()), 4, 4, GL_RGBFormat);
38
38
  texture.needsUpdate = true;
39
39
  texture.magFilter = NearestFilter;
40
40
  texture.minFilter = NearestFilter;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * WebGL constant, declared explicitly to avoid issues with later THREE.js versions where it is absent
3
+ * @type {number}
4
+ */
5
+ export const GL_RGBFormat: number;
6
+ //# sourceMappingURL=GL_RGBFormat.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GL_RGBFormat.d.ts","sourceRoot":"","sources":["../../../../../src/engine/graphics/texture/GL_RGBFormat.js"],"names":[],"mappings":"AAAA;;;GAGG;AACH,2BAFU,MAAM,CAEiB"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * WebGL constant, declared explicitly to avoid issues with later THREE.js versions where it is absent
3
+ * @type {number}
4
+ */
5
+ export const GL_RGBFormat = 1022;
6
+
@@ -0,0 +1,6 @@
1
+ /**
2
+ *
3
+ * @type {number}
4
+ */
5
+ export const GL_RGBIntegerFormat: number;
6
+ //# sourceMappingURL=GL_RGBIntegerFormat.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GL_RGBIntegerFormat.d.ts","sourceRoot":"","sources":["../../../../../src/engine/graphics/texture/GL_RGBIntegerFormat.js"],"names":[],"mappings":"AAAA;;;GAGG;AACH,kCAFU,MAAM,CAEwB"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ *
3
+ * @type {number}
4
+ */
5
+ export const GL_RGBIntegerFormat = 1032;
@@ -1,2 +1,2 @@
1
- export function channelCountToThreIntegerTextureType(channel_count: any): import("three").PixelFormat;
1
+ export function channelCountToThreIntegerTextureType(channel_count: any): number | import("three").PixelFormat;
2
2
  //# sourceMappingURL=channelCountToThreIntegerTextureType.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"channelCountToThreIntegerTextureType.d.ts","sourceRoot":"","sources":["../../../../../src/engine/graphics/texture/channelCountToThreIntegerTextureType.js"],"names":[],"mappings":"AAEA,sGAaC"}
1
+ {"version":3,"file":"channelCountToThreIntegerTextureType.d.ts","sourceRoot":"","sources":["../../../../../src/engine/graphics/texture/channelCountToThreIntegerTextureType.js"],"names":[],"mappings":"AAGA,+GAaC"}
@@ -1,4 +1,5 @@
1
- import { RedIntegerFormat, RGBAIntegerFormat, RGBIntegerFormat, RGIntegerFormat } from "three";
1
+ import { RedIntegerFormat, RGBAIntegerFormat, RGIntegerFormat } from "three";
2
+ import { GL_RGBIntegerFormat } from "./GL_RGBIntegerFormat.js";
2
3
 
3
4
  export function channelCountToThreIntegerTextureType(channel_count) {
4
5
  switch (channel_count) {
@@ -7,7 +8,7 @@ export function channelCountToThreIntegerTextureType(channel_count) {
7
8
  case 2:
8
9
  return RGIntegerFormat;
9
10
  case 3:
10
- return RGBIntegerFormat;
11
+ return GL_RGBIntegerFormat;
11
12
  case 4:
12
13
  return RGBAIntegerFormat;
13
14
  default:
@@ -1 +1 @@
1
- {"version":3,"file":"channelCountToThreeTextureFormat.d.ts","sourceRoot":"","sources":["../../../../../src/engine/graphics/texture/channelCountToThreeTextureFormat.js"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,wDAHW,MAAM,GACL,MAAM,CAejB"}
1
+ {"version":3,"file":"channelCountToThreeTextureFormat.d.ts","sourceRoot":"","sources":["../../../../../src/engine/graphics/texture/channelCountToThreeTextureFormat.js"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,wDAHW,MAAM,GACL,MAAM,CAejB"}
@@ -1,4 +1,5 @@
1
- import { RedFormat, RGBAFormat, RGBFormat, RGFormat } from "three";
1
+ import { RedFormat, RGBAFormat, RGFormat } from "three";
2
+ import { GL_RGBFormat } from "./GL_RGBFormat.js";
2
3
 
3
4
  /**
4
5
  *
@@ -12,7 +13,7 @@ export function channelCountToThreeTextureFormat(count) {
12
13
  case 2:
13
14
  return RGFormat;
14
15
  case 3:
15
- return RGBFormat;
16
+ return GL_RGBFormat;
16
17
  case 4:
17
18
  return RGBAFormat;
18
19
  default:
@@ -1 +1 @@
1
- {"version":3,"file":"formatToChannelCount.d.ts","sourceRoot":"","sources":["../../../../../src/engine/graphics/texture/formatToChannelCount.js"],"names":[],"mappings":"AAkBA;;;;GAIG;AACH,6CAHW,MAAM,GACJ,MAAM,CAoBlB"}
1
+ {"version":3,"file":"formatToChannelCount.d.ts","sourceRoot":"","sources":["../../../../../src/engine/graphics/texture/formatToChannelCount.js"],"names":[],"mappings":"AAaA;;;;GAIG;AACH,6CAHW,MAAM,GACJ,MAAM,CAoBlB"}
@@ -8,14 +8,9 @@ import {
8
8
  RGBAFormat,
9
9
  RGFormat
10
10
  } from "three";
11
+ import { GL_RGBFormat } from "./GL_RGBFormat.js";
11
12
 
12
13
 
13
- /**
14
- * WebGL constant, declared explicitly to avoid issues with later THREE.js versions where it is absent
15
- * @type {number}
16
- */
17
- const RGBFormat = 1022;
18
-
19
14
  /**
20
15
  *
21
16
  * @param {number} format
@@ -28,7 +23,7 @@ export function formatToChannelCount(format) {
28
23
  return 1;
29
24
  case RGFormat:
30
25
  return 2;
31
- case RGBFormat:
26
+ case GL_RGBFormat:
32
27
  case RGB_S3TC_DXT1_Format:
33
28
  return 3;
34
29
  case RGBAFormat:
@@ -1 +1 @@
1
- {"version":3,"file":"writeSampler2DDataToDataTexture.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/texture/sampler/writeSampler2DDataToDataTexture.js"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,4EAFW,MAAM,WAAW,QAiC3B"}
1
+ {"version":3,"file":"writeSampler2DDataToDataTexture.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/texture/sampler/writeSampler2DDataToDataTexture.js"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,4EAFW,MAAM,WAAW,QAiC3B"}
@@ -1,4 +1,5 @@
1
- import { LuminanceFormat, RedFormat, RGBAFormat, RGBFormat, RGFormat } from "three";
1
+ import { LuminanceFormat, RedFormat, RGBAFormat, RGFormat } from "three";
2
+ import { GL_RGBFormat } from "../GL_RGBFormat.js";
2
3
 
3
4
  /**
4
5
  *
@@ -15,7 +16,7 @@ export function writeSample2DDataToDataTexture(sampler, texture) {
15
16
  throw new Error('itemSize is 2 and texture.format is not RGFormat');
16
17
  }
17
18
  } else if (sampler.itemSize === 3) {
18
- if (texture.format !== RGBFormat) {
19
+ if (texture.format !== GL_RGBFormat) {
19
20
  throw new Error('itemSize is 3 and texture.format is not RGBFormat');
20
21
  }
21
22
  } else if (sampler.itemSize === 4) {
@@ -1 +1 @@
1
- {"version":3,"file":"VirtualTextureMemoryMapping.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/texture/virtual/VirtualTextureMemoryMapping.js"],"names":[],"mappings":"AAcA;;GAEG;AACH;IAQI,4BAEC;IAWD,2BAEC;IAgBD;;;OAGG;IACH,4BAiCC;IAED,yBAEC;IAED;;;OAGG;IACH,uCAsEC;IAED;;;MAUC;IAGD,gBAEC;;CACJ;4BA/LkG,OAAO"}
1
+ {"version":3,"file":"VirtualTextureMemoryMapping.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/texture/virtual/VirtualTextureMemoryMapping.js"],"names":[],"mappings":"AAcA;;GAEG;AACH;IAQI,4BAEC;IAWD,2BAEC;IAoBD;;;OAGG;IACH,4BAiCC;IAED,yBAEC;IAED;;;OAGG;IACH,uCAsEC;IAED;;;MAUC;IAGD,gBAEC;;CACJ;4BAnMkG,OAAO"}
@@ -44,6 +44,10 @@ export class VirtualTextureMemoryMapping {
44
44
  const texture = this.#texture;
45
45
  texture.name = "Virtual Texture / Dereference Mapping"
46
46
 
47
+ texture.unpackAlignment = 1;
48
+ texture.format = RedIntegerFormat;
49
+ texture.type = UnsignedIntType;
50
+
47
51
  texture.internalFormat = "R32UI";
48
52
  texture.generateMipmaps = false;
49
53
 
@@ -36,7 +36,11 @@ export class VirtualTexturePage {
36
36
  * @param {string} v
37
37
  */
38
38
  set path(arg: string);
39
- set asset_manager(arg: any);
39
+ /**
40
+ *
41
+ * @param {AssetManager} v
42
+ */
43
+ set asset_manager(arg: AssetManager);
40
44
  /**
41
45
  *
42
46
  * @param {VirtualTextureUsage} usage
@@ -1 +1 @@
1
- {"version":3,"file":"VirtualTexturePage.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/texture/virtual/VirtualTexturePage.js"],"names":[],"mappings":"AA8BA;IAkBI,iDAEC;IAED;;;OAGG;IACH,cAFU,MAAM,CAEC;IAEjB;;;OAGG;IACH,SAFU,MAAM,CAEJ;IAeZ,uBAEC;IAGD,wCAEC;IAED,2BAEC;IAQD;;;OAGG;IACH,2CAEC;IAmBD;;;OAGG;IACH,iCAKC;IAbD,8BAEC;IAoBD,0BAEC;IAuPD;;;OAGG;IACH,qCA8BC;IAED,kCAEC;IAnND;;;OAGG;IACH,sBAEC;IAED,4BAIC;IAyMD;;;OAGG;IACH,+CAuDC;IAED,uBAMC;IAED,gBAOC;;CACJ;4BAlfM,OAAO"}
1
+ {"version":3,"file":"VirtualTexturePage.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/texture/virtual/VirtualTexturePage.js"],"names":[],"mappings":"AAgCA;IAwBI,iDAEC;IAED;;;OAGG;IACH,cAFU,MAAM,CAEC;IAEjB;;;OAGG;IACH,SAFU,MAAM,CAEJ;IAeZ,uBAEC;IAGD,wCAEC;IAED,2BAEC;IAQD;;;OAGG;IACH,2CAEC;IAmBD;;;OAGG;IACH,iCAKC;IAbD,8BAEC;IAoBD,0BAEC;IAsQD;;;OAGG;IACH,qCA+BC;IAED,kCAEC;IAxND;;;OAGG;IACH,sBAEC;IAED;;;OAGG;IACH,qCAIC;IA0MD;;;OAGG;IACH,+CAuDC;IAED,uBAMC;IAED,gBAOC;;CACJ;4BAxgBM,OAAO"}
@@ -4,6 +4,8 @@ import {
4
4
  LinearFilter,
5
5
  NearestFilter,
6
6
  REVISION as THREE_VERSION,
7
+ RGBAFormat,
8
+ UnsignedByteType,
7
9
  Vector2
8
10
  } from "three";
9
11
  import { assert } from "../../../../core/assert.js";
@@ -29,22 +31,28 @@ import { VT_DEFAULT_PAGE_RESOLUTION } from "./VT_DEFAULT_PAGE_RESOLUTION.js";
29
31
  const DEFAULT_CACHE_SIZE = 256 * 1024 * 1024;
30
32
 
31
33
  export class VirtualTexturePage {
34
+ /**
35
+ * @readonly
36
+ * @type {DataTexture}
37
+ */
32
38
  #page_texture = new DataTexture(
33
- new Uint8Array(VT_DEFAULT_PAGE_RESOLUTION * VT_DEFAULT_PAGE_RESOLUTION * 4),
34
- VT_DEFAULT_PAGE_RESOLUTION,
35
- VT_DEFAULT_PAGE_RESOLUTION
39
+ new Uint8Array(1 * 1 * 4),
40
+ 1,
41
+ 1,
42
+ RGBAFormat,
43
+ UnsignedByteType,
36
44
  );
37
45
 
38
46
  #tile_copy_sampler = Sampler2D.uint8(4, 1, 1);
39
47
  #tile_copy_texture = new DataTexture(this.#tile_copy_sampler.data, 1, 1);
40
48
 
41
- #page_texture_size = [VT_DEFAULT_PAGE_RESOLUTION, VT_DEFAULT_PAGE_RESOLUTION];
49
+ #page_texture_size = [1, 1];
42
50
 
43
51
  /**
44
52
  *
45
53
  * @type {number[]}
46
54
  */
47
- #page_texture_resolution_in_tiles = [1, 1];
55
+ #page_texture_resolution_in_tiles = [0, 0];
48
56
 
49
57
  get page_texture_resolution_in_tiles() {
50
58
  return this.#page_texture_resolution_in_tiles;
@@ -169,11 +177,20 @@ export class VirtualTexturePage {
169
177
 
170
178
  const texture = this.#page_texture;
171
179
 
180
+ texture.unpackAlignment = 4;
181
+
182
+ texture.type = UnsignedByteType;
183
+ texture.format = RGBAFormat;
184
+ texture.internalFormat = "RGBA8";
185
+
172
186
  texture.generateMipmaps = false;
173
187
 
174
188
  texture.minFilter = NearestFilter;
175
189
  texture.magFilter = LinearFilter;
176
190
 
191
+ texture.wrapS = ClampToEdgeWrapping;
192
+ texture.wrapT = ClampToEdgeWrapping;
193
+
177
194
  texture.anisotropy = this.#tile_margin * 2;
178
195
 
179
196
  }
@@ -187,6 +204,8 @@ export class VirtualTexturePage {
187
204
 
188
205
  this.#tile_copy_texture.wrapT = ClampToEdgeWrapping;
189
206
  this.#tile_copy_texture.wrapS = ClampToEdgeWrapping;
207
+ this.#tile_copy_texture.generateMipmaps = false;
208
+
190
209
 
191
210
  this.#loader.on.loaded.add(this.#handle_tile_loaded, this);
192
211
 
@@ -221,6 +240,10 @@ export class VirtualTexturePage {
221
240
  this.#loader.path = v;
222
241
  }
223
242
 
243
+ /**
244
+ *
245
+ * @param {AssetManager} v
246
+ */
224
247
  set asset_manager(v) {
225
248
  this.#asset_manager = v
226
249
 
@@ -391,8 +414,6 @@ export class VirtualTexturePage {
391
414
  * @param {number[]} v
392
415
  */
393
416
  set page_texture_size(v) {
394
- const page_texture = this.#page_texture;
395
- const page_image = page_texture.image;
396
417
 
397
418
  const current_resolution = this.#page_texture_size;
398
419
 
@@ -406,6 +427,9 @@ export class VirtualTexturePage {
406
427
 
407
428
  this.clear_resident();
408
429
 
430
+ const page_texture = this.#page_texture;
431
+ const page_image = page_texture.image;
432
+
409
433
  page_texture.dispose();
410
434
 
411
435
  const width = current_resolution[0];
@@ -8,12 +8,10 @@ export class VirtualTextureSystem {
8
8
  tile_resolution: any;
9
9
  tile_margin: any;
10
10
  }): void;
11
- /**
12
- *
13
- * @param {number} [page_resolution]
14
- * @param {AssetManager} asset_manager
15
- */
16
- initialize({ page_resolution, asset_manager }?: number): void;
11
+ initialize({ page_resolution, asset_manager }: {
12
+ page_resolution?: number;
13
+ asset_manager: any;
14
+ }): void;
17
15
  makeMaterial(): VirtualTextureMaterial;
18
16
  /**
19
17
  *
@@ -1 +1 @@
1
- {"version":3,"file":"VirtualTextureSystem.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/texture/virtual/VirtualTextureSystem.js"],"names":[],"mappings":"AAOA;IACI,oCAA0C;IAC1C,yBAA+B;IAC/B,qCAA2C;IAgB3C;;;;;aAeC;IAsBD;;;;OAIG;IACH,gDAHW,MAAM,QAYhB;IAED,uCAIC;IAED;;;;;OAKG;IACH,oEAaC;;CACJ;2CArG0C,iCAAiC;mCADzC,yBAAyB;4CADhB,kCAAkC;uCADvC,6BAA6B"}
1
+ {"version":3,"file":"VirtualTextureSystem.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/texture/virtual/VirtualTextureSystem.js"],"names":[],"mappings":"AAQA;IACI,oCAA0C;IAC1C,yBAA+B;IAC/B,qCAA2C;IAgB3C;;;;;aAeC;IAsBD;;;aAcC;IAED,uCAIC;IAED;;;;;OAKG;IACH,oEAaC;;CACJ;2CArG0C,iCAAiC;mCADzC,yBAAyB;4CADhB,kCAAkC;uCADvC,6BAA6B"}
@@ -1,4 +1,5 @@
1
1
  import { Vector2 } from "three";
2
+ import { assert } from "../../../../core/assert.js";
2
3
  import { VirtualTextureMaterial } from "./VirtualTextureMaterial.js";
3
4
  import { VirtualTextureMemoryMapping } from "./VirtualTextureMemoryMapping.js";
4
5
  import { VirtualTexturePage } from "./VirtualTexturePage.js";
@@ -48,7 +49,7 @@ export class VirtualTextureSystem {
48
49
  const page = this.page;
49
50
  const mapping = this.mapping;
50
51
 
51
- uniforms.u_page.value = page.texture;
52
+ // uniforms.u_page.value = page.texture;
52
53
  uniforms.u_page_resolution.value.set(
53
54
  page.page_texture_resolution_in_tiles[0],
54
55
  page.page_texture_resolution_in_tiles[1]
@@ -61,16 +62,16 @@ export class VirtualTextureSystem {
61
62
  uniforms.u_mapping_texture_width.value = mapping.texture.image.width;
62
63
  }
63
64
 
64
- /**
65
- *
66
- * @param {number} [page_resolution]
67
- * @param {AssetManager} asset_manager
68
- */
69
65
  initialize({
70
66
  page_resolution = VT_DEFAULT_PAGE_RESOLUTION,
71
67
  asset_manager
72
68
  }) {
73
69
 
70
+ assert.defined(asset_manager, 'asset_manager');
71
+ assert.isObject(asset_manager, 'asset_manager');
72
+ assert.equal(asset_manager.isAssetManager, true, 'asset_manager.isAssetManager !== true');
73
+
74
+ assert.isNonNegativeInteger(page_resolution, 'page_resolution');
74
75
 
75
76
  this.page.page_texture_size = [page_resolution, page_resolution];
76
77
  this.page.asset_manager = asset_manager;
@@ -5,7 +5,7 @@ import {
5
5
  Matrix4,
6
6
  Mesh,
7
7
  PerspectiveCamera,
8
- PlaneBufferGeometry,
8
+ PlaneGeometry as PlaneBufferGeometry,
9
9
  Scene,
10
10
  WebGLRenderer
11
11
  } from "three";
@@ -267,7 +267,7 @@ async function init() {
267
267
  virtual_texture_managers.forEach(vt => {
268
268
  vt.initialize({
269
269
  asset_manager: am,
270
- page_resolution: 4096
270
+ page_resolution: 1024
271
271
  })
272
272
  });
273
273
 
@@ -0,0 +1,7 @@
1
+ /**
2
+ *
3
+ * @param {THREE.Scene} scene
4
+ * @param {boolean} value
5
+ */
6
+ export function three_setSceneAutoUpdate(scene: THREE.Scene, value: boolean): void;
7
+ //# sourceMappingURL=three_setSceneAutoUpdate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"three_setSceneAutoUpdate.d.ts","sourceRoot":"","sources":["../../../../../src/engine/graphics/three/three_setSceneAutoUpdate.js"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,gDAHW,MAAM,KAAK,SACX,OAAO,QAWjB"}
@@ -0,0 +1,18 @@
1
+ import { REVISION } from "three";
2
+ import { assert } from "../../../core/assert.js";
3
+
4
+ /**
5
+ *
6
+ * @param {THREE.Scene} scene
7
+ * @param {boolean} value
8
+ */
9
+ export function three_setSceneAutoUpdate(scene, value) {
10
+ assert.isBoolean(value, 'value');
11
+
12
+ if (REVISION < 144) {
13
+ scene.autoUpdate = value;
14
+ } else {
15
+ // was renamed after r144
16
+ scene.matrixWorldAutoUpdate = value;
17
+ }
18
+ }