@woosh/meep-engine 2.138.12 → 2.138.13

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.
@@ -96,10 +96,8 @@ export class PatchTerrainTextureAction extends Action {
96
96
 
97
97
  updateTerrain() {
98
98
 
99
- this.terrain.splat.materialTexture.needsUpdate = true;
100
99
  this.terrain.splat.weightTexture.needsUpdate = true;
101
100
 
102
-
103
101
  }
104
102
 
105
103
  async apply(context) {
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "description": "Pure JavaScript game engine. Fully featured and production ready.",
6
6
  "type": "module",
7
7
  "author": "Alexander Goldring",
8
- "version": "2.138.12",
8
+ "version": "2.138.13",
9
9
  "main": "build/meep.module.js",
10
10
  "module": "build/meep.module.js",
11
11
  "exports": {
@@ -17,12 +17,6 @@ export class SplatMapping {
17
17
  * @type {DataTexture2DArray}
18
18
  */
19
19
  weightTexture: DataTexture2DArray;
20
- /**
21
- * @deprecated No longer used due to poor blending results
22
- * stores indices of materials participating in the splat mix
23
- * @type {DataTexture}
24
- */
25
- materialTexture: DataTexture;
26
20
  toJSON(): {
27
21
  size: {
28
22
  x: number;
@@ -130,6 +124,5 @@ export class SplatMapping {
130
124
  }
131
125
  import Vector2 from "../../../../../core/geom/Vector2.js";
132
126
  import { DataTexture2DArray } from "three";
133
- import { DataTexture } from "three";
134
127
  import { Sampler2D } from "../../../../graphics/texture/sampler/Sampler2D.js";
135
128
  //# sourceMappingURL=SplatMapping.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SplatMapping.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/ecs/terrain/ecs/splat/SplatMapping.js"],"names":[],"mappings":"AAaA;;GAEG;AACH;IAEQ;;;OAGG;IACH,MAFU,OAAO,CAEY;IAE7B;;;OAGG;IACH,OAFU,MAAM,CAEF;IAOd;;;OAGG;IACH,eAFU,kBAAkB,CAEiE;IAO7F;;;;OAIG;IACH,iBAFU,WAAW,CAEoE;IAG7F;;;;;;;MAQC;IAED;;;;;;;aA6BC;IAED;;;;;OAKG;IACH,8BAJW,SAAS,SACT,MAAM,YACN,MAAM,QA0BhB;IAED;;;;;OAKG;IACH,gCAJW,SAAS,SACT,MAAM,YACN,MAAM,QA2BhB;IAED;;;;;;;OAOG;IACH,wBANW,UAAU,gBACV,MAAM,gBACN,MAAM,eACN,MAAM,gBACN,MAAM,QA2ChB;IAED;;;;;;;OAOG;IACH,4BANW,UAAU,WACV,MAAM,WACN,MAAM,SACN,MAAM,UACN,MAAM,QAuChB;IAED;;;;;;OAMG;IACH,gBALW,MAAM,KACN,MAAM,iBACN,MAAM,GACJ,MAAM,CAKlB;IAED;;;;OAIG;IACH,6BAHW,MAAM,GACJ,SAAS,CAcrB;IAED;;OAEG;IACH,iDAEC;IAED;;;OAGG;IACH,mDAEC;IAED;;;OAGG;IACH,iCAEC;IAED;;;;OAIG;IACH,gCAHW,UAAU,QAoDpB;IAED,gBAGC;IAED;;;;OAIG;IACH,yBAHW,MAAM,GACJ,OAAO,CAuCnB;IAED;;;;OAIG;IACH,8BAHW,MAAM,SACN,MAAM,QAqBhB;IAED,uBAiBC;IAED;;;;;;OAMG;IACH,cALW,MAAM,UACN,MAAM,SACN,MAAM,cACN,OAAO,QA6DjB;CACJ;oBA5gBmB,qCAAqC;mCALiD,OAAO;4BAAP,OAAO;0BAUvF,mDAAmD"}
1
+ {"version":3,"file":"SplatMapping.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/ecs/terrain/ecs/splat/SplatMapping.js"],"names":[],"mappings":"AAaA;;GAEG;AACH;IAEQ;;;OAGG;IACH,MAFU,OAAO,CAEY;IAE7B;;;OAGG;IACH,OAFU,MAAM,CAEF;IAOd;;;OAGG;IACH,eAFU,kBAAkB,CAEiE;IAUjG;;;;;;;MAQC;IAED;;;;;;;aA6BC;IAED;;;;;OAKG;IACH,8BAJW,SAAS,SACT,MAAM,YACN,MAAM,QA0BhB;IAED;;;;;OAKG;IACH,gCAJW,SAAS,SACT,MAAM,YACN,MAAM,QA2BhB;IAED;;;;;;;OAOG;IACH,wBANW,UAAU,gBACV,MAAM,gBACN,MAAM,eACN,MAAM,gBACN,MAAM,QA2ChB;IAED;;;;;;;OAOG;IACH,4BANW,UAAU,WACV,MAAM,WACN,MAAM,SACN,MAAM,UACN,MAAM,QAuChB;IAED;;;;;;OAMG;IACH,gBALW,MAAM,KACN,MAAM,iBACN,MAAM,GACJ,MAAM,CAKlB;IAED;;;;OAIG;IACH,6BAHW,MAAM,GACJ,SAAS,CAcrB;IAED;;OAEG;IACH,iDAEC;IAED;;;OAGG;IACH,mDAEC;IAED;;;OAGG;IACH,iCAEC;IAED;;;;OAIG;IACH,gCAHW,UAAU,QAoDpB;IAED,gBAEC;IAED;;;;OAIG;IACH,yBAHW,MAAM,GACJ,OAAO,CAuCnB;IAED;;;;OAIG;IACH,8BAHW,MAAM,SACN,MAAM,QAqBhB;IAED,uBAiBC;IAED;;;;;;OAMG;IACH,cALW,MAAM,UACN,MAAM,SACN,MAAM,cACN,OAAO,QA6DjB;CACJ;oBAtgBmB,qCAAqC;mCALoC,OAAO;0BAU1E,mDAAmD"}
@@ -1,4 +1,4 @@
1
- import { DataTexture, DataTexture2DArray, LinearFilter, NearestFilter, RedFormat, UnsignedByteType } from "three";
1
+ import { DataTexture2DArray, LinearFilter, NearestFilter, RedFormat, UnsignedByteType } from "three";
2
2
  import { assert } from "../../../../../core/assert.js";
3
3
  import { Base64 } from "../../../../../core/binary/base64/Base64.js";
4
4
  import { array_copy } from "../../../../../core/collection/array/array_copy.js";
@@ -43,13 +43,8 @@ export class SplatMapping {
43
43
  this.weightTexture.type = UnsignedByteType;
44
44
  this.weightTexture.magFilter = LinearFilter;
45
45
  this.weightTexture.minFilter = NearestFilter;
46
+ this.weightTexture.needsUpdate = true;
46
47
 
47
- /**
48
- * @deprecated No longer used due to poor blending results
49
- * stores indices of materials participating in the splat mix
50
- * @type {DataTexture}
51
- */
52
- this.materialTexture = new DataTexture(new Uint8Array(width * height * 4), width, height);
53
48
  }
54
49
 
55
50
  toJSON() {
@@ -117,7 +112,7 @@ export class SplatMapping {
117
112
  const targetIndex = y * width + x;
118
113
  const targetAddress = dataOffset + targetIndex;
119
114
 
120
- const value = source.sampleChannelBilinearUV(u , v , channel);
115
+ const value = source.sampleChannelBilinearUV(u, v, channel);
121
116
 
122
117
  weightData[targetAddress] = value;
123
118
  }
@@ -299,7 +294,7 @@ export class SplatMapping {
299
294
  * @returns {Uint8ClampedArray|Uint8Array}
300
295
  */
301
296
  get materialData() {
302
- return this.materialTexture.image.data;
297
+ throw new Error('deprecated, use getLayerWeightSampler');
303
298
  }
304
299
 
305
300
  /**
@@ -307,7 +302,7 @@ export class SplatMapping {
307
302
  * @return {Sampler2D}
308
303
  */
309
304
  get materialSampler() {
310
- return new Sampler2D(this.materialData, 4, this.size.x, this.size.y);
305
+ throw new Error('deprecated, use getLayerWeightSampler');
311
306
  }
312
307
 
313
308
  /**
@@ -368,7 +363,6 @@ export class SplatMapping {
368
363
 
369
364
  dispose() {
370
365
  this.weightTexture.dispose();
371
- this.materialTexture.dispose();
372
366
  }
373
367
 
374
368
  /**