@woosh/meep-engine 2.85.2 → 2.85.3
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/meep.cjs +19 -11
- package/build/meep.min.js +1 -1
- package/build/meep.module.js +19 -11
- package/package.json +1 -1
- package/src/engine/Engine.d.ts +1 -1
- package/src/engine/Engine.js +8 -5
- package/src/engine/graphics/GraphicsEngine.js +12 -7
package/build/meep.cjs
CHANGED
|
@@ -89213,22 +89213,24 @@ function configureThreeRenderer(webGLRenderer) {
|
|
|
89213
89213
|
//turn off automatic info reset, we use multi-pass rendering, so we manually reset the render info
|
|
89214
89214
|
webGLRenderer.info.autoReset = false;
|
|
89215
89215
|
|
|
89216
|
-
if (ENV_PRODUCTION) {
|
|
89217
|
-
//disable shader error checking in production build
|
|
89218
|
-
webGLRenderer.debug.checkShaderErrors = false;
|
|
89219
|
-
} else {
|
|
89220
|
-
webGLRenderer.debug.checkShaderErrors = true;
|
|
89221
|
-
}
|
|
89222
89216
|
}
|
|
89223
89217
|
|
|
89224
89218
|
|
|
89225
89219
|
class GraphicsEngine {
|
|
89220
|
+
#debug = false;
|
|
89221
|
+
|
|
89226
89222
|
/**
|
|
89227
89223
|
*
|
|
89228
89224
|
* @param {Camera} camera
|
|
89225
|
+
* @param {boolean} [debug]
|
|
89229
89226
|
* @constructor
|
|
89230
89227
|
*/
|
|
89231
|
-
constructor(
|
|
89228
|
+
constructor({
|
|
89229
|
+
camera,
|
|
89230
|
+
debug = false
|
|
89231
|
+
}) {
|
|
89232
|
+
this.#debug = debug;
|
|
89233
|
+
|
|
89232
89234
|
const self = this;
|
|
89233
89235
|
|
|
89234
89236
|
/**
|
|
@@ -89513,6 +89515,9 @@ class GraphicsEngine {
|
|
|
89513
89515
|
|
|
89514
89516
|
configureThreeRenderer(webGLRenderer);
|
|
89515
89517
|
|
|
89518
|
+
//disable shader error checking in production build
|
|
89519
|
+
webGLRenderer.debug.checkShaderErrors = this.#debug;
|
|
89520
|
+
|
|
89516
89521
|
this.enableExtensions();
|
|
89517
89522
|
|
|
89518
89523
|
this.initializeFrameBuffers();
|
|
@@ -103187,14 +103192,14 @@ class Engine {
|
|
|
103187
103192
|
* @param {EntityManager} [entityManager]
|
|
103188
103193
|
* @param {boolean} [enableGraphics]
|
|
103189
103194
|
* @param {boolean} [enableAudio]
|
|
103190
|
-
* @param {boolean} [
|
|
103195
|
+
* @param {boolean} [debug]
|
|
103191
103196
|
* @constructor
|
|
103192
103197
|
*/
|
|
103193
103198
|
constructor(platform, {
|
|
103194
103199
|
entityManager,
|
|
103195
103200
|
enableGraphics = true,
|
|
103196
103201
|
enableAudio = true,
|
|
103197
|
-
|
|
103202
|
+
debug = true
|
|
103198
103203
|
} = {}) {
|
|
103199
103204
|
|
|
103200
103205
|
/**
|
|
@@ -103208,7 +103213,7 @@ class Engine {
|
|
|
103208
103213
|
* @type {StaticKnowledgeDatabase}
|
|
103209
103214
|
*/
|
|
103210
103215
|
this.staticKnowledge = new StaticKnowledgeDatabase();
|
|
103211
|
-
this.staticKnowledge.validation_enabled =
|
|
103216
|
+
this.staticKnowledge.validation_enabled = debug;
|
|
103212
103217
|
|
|
103213
103218
|
/**
|
|
103214
103219
|
*
|
|
@@ -103359,7 +103364,10 @@ class Engine {
|
|
|
103359
103364
|
|
|
103360
103365
|
if (enableGraphics !== false) {
|
|
103361
103366
|
|
|
103362
|
-
const graphicsEngine = new GraphicsEngine(
|
|
103367
|
+
const graphicsEngine = new GraphicsEngine({
|
|
103368
|
+
camera: this.camera,
|
|
103369
|
+
debug
|
|
103370
|
+
});
|
|
103363
103371
|
|
|
103364
103372
|
/**
|
|
103365
103373
|
*
|