@woosh/meep-engine 2.31.9 → 2.31.10

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.
@@ -0,0 +1 @@
1
+ export const VIRTUAL_MESH_FLAG: string
@@ -0,0 +1 @@
1
+ export const VIRTUAL_MESH_FLAG = '@meep/is-virtual';
@@ -1,8 +1,10 @@
1
1
  import { ThreeInstancedAdapter } from "../instanced/ThreeInstancedAdapter.js";
2
2
  import { composeCompile } from "../../../material/composeCompile.js";
3
3
  import { Mesh, MeshDepthMaterial, MeshNormalMaterial, RGBADepthPacking } from "three";
4
+ import { VIRTUAL_MESH_FLAG } from "../VIRTUAL_MESH_FLAG.js";
4
5
 
5
6
  const MATERIAL_FLAG = '@micron_instanced_rewritten';
7
+ const MATERIAL_VERTEX_DISPLACED = '@meep/vertex-displaced';
6
8
 
7
9
  export class MaterialContext {
8
10
  /**
@@ -73,6 +75,7 @@ export class MaterialContext {
73
75
  if (material[MATERIAL_FLAG] === undefined) {
74
76
  material.onBeforeCompile = composeCompile(material.onBeforeCompile, rewrite_material);
75
77
  material[MATERIAL_FLAG] = true;
78
+ material[MATERIAL_VERTEX_DISPLACED] = true;
76
79
  } else {
77
80
  throw new Error(`Material was already processed by micron, this is an illegal state`);
78
81
  }
@@ -82,6 +85,8 @@ export class MaterialContext {
82
85
 
83
86
  const m = new Mesh();
84
87
 
88
+ m[VIRTUAL_MESH_FLAG] = true;
89
+
85
90
  m.name = 'Materialized Micron Mesh';
86
91
 
87
92
  m.geometry = null;
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "productName": "Meep",
5
5
  "description": "production-ready JavaScript game engine based on Entity Component System Architecture",
6
6
  "author": "Alexander Goldring",
7
- "version": "2.31.9",
7
+ "version": "2.31.10",
8
8
  "dependencies": {
9
9
  "fast-levenshtein": "2.0.6",
10
10
  "opentype.js": "1.3.3",