@needle-tools/engine 2.67.9-pre.1 → 2.67.10-pre

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": "@needle-tools/engine",
3
- "version": "2.67.9-pre.1",
3
+ "version": "2.67.10-pre",
4
4
  "description": "Needle Engine is a web-based runtime for 3D apps. It runs on your machine for development, and can be deployed anywhere. It is flexible, extensible, and collaboration and XR come naturally.",
5
5
  "main": "dist/needle-engine.umd.cjs",
6
6
  "module": "lib/needle-engine.js",
@@ -25,6 +25,8 @@
25
25
  "build:dist": "vite build",
26
26
  "build:src": "tsc --outDir ./lib --noEmit false --declaration",
27
27
  "build:license": "node plugins/publish/create-license.mjs",
28
+ "pack-gltf": "node --no-experimental-fetch node_modules/@needle-tools/gltf-transform-extensions/pack-gltf.mjs",
29
+ "transform:make-progressive": "node node_modules/@needle-tools/gltf-transform-extensions/make-progressive.mjs",
28
30
  "test:circular-imports": "node plugins/check-circular-imports.js",
29
31
  "test:tsc": "tsc"
30
32
  },
@@ -60,7 +62,7 @@
60
62
  "simplex-noise": "^4.0.1",
61
63
  "postprocessing": "^6.30.1",
62
64
  "stats.js": "^0.17.0",
63
- "three": "npm:@needle-tools/three@^0.146.6",
65
+ "three": "npm:@needle-tools/three@^0.146.7",
64
66
  "three-mesh-ui": "^6.4.5",
65
67
  "three.quarks": "^0.7.3",
66
68
  "uuid": "^9.0.0",
@@ -69,6 +71,7 @@
69
71
  "devDependencies": {
70
72
  "@babel/runtime": "^7.16.0",
71
73
  "@luncheon/esbuild-plugin-gzip": "^0.1.0",
74
+ "@needle-tools/gltf-transform-extensions": "^0.11.2-pre",
72
75
  "@needle-tools/helper": "^0.4.5",
73
76
  "@needle-tools/needle-component-compiler": "1.9.3",
74
77
  "@types/three": "0.146.0",
@@ -207,6 +207,7 @@ export class EngineLoadingView implements ILoadingViewHandler {
207
207
  needleLogo.style.transform = `translate(-${logoSize * .5}px, -${logoSize + 32}px)`;
208
208
  needleLogo.addEventListener("click", () => window.open("https://needle.tools", "_blank"));
209
209
  needleLogo.style.cursor = "pointer";
210
+ needleLogo.style.userSelect = "none";
210
211
  needleLogo.style.pointerEvents = "all";
211
212
  needleLogo.src = logoSVG;
212
213
  loadingBarContainer.appendChild(needleLogo);
@@ -4,6 +4,9 @@ import { VolumeParameter } from "./VolumeParameter";
4
4
  import { Component } from "../Component";
5
5
  import { ISerializable, SerializationContext } from "../../engine/engine_serialization_core";
6
6
  import { EditorModification, IEditorModification } from "../../engine/engine_editor-sync";
7
+ import { getParam } from "../../engine/engine_utils";
8
+
9
+ const debug = getParam("debugpost");
7
10
 
8
11
  export declare type EffectProviderResult = Effect | Pass | Array<Effect | Pass>;
9
12
 
@@ -42,9 +45,9 @@ export abstract class PostProcessingEffect extends Component implements IEffectP
42
45
  apply(): void | undefined | EffectProviderResult {
43
46
  if (!this._result) {
44
47
  this._result = this.onCreateEffect?.call(this);
45
- if (this._result) {
46
- this.initParameters();
47
- }
48
+ }
49
+ if (this._result) {
50
+ this.initParameters();
48
51
  }
49
52
  return this._result;
50
53
  }
@@ -56,6 +59,7 @@ export abstract class PostProcessingEffect extends Component implements IEffectP
56
59
  onCreateEffect?(): EffectProviderResult | undefined
57
60
 
58
61
  dispose() {
62
+ if(debug) console.warn("DISPOSE", this)
59
63
  if (this._result) {
60
64
  if (Array.isArray(this._result)) {
61
65
  this._result.forEach(r => r.dispose());
@@ -51,8 +51,6 @@ export class Volume extends Behaviour implements IEditorModificationReceiver {
51
51
  if (this.context.mainCamera) {
52
52
  if (!this._postprocessing || !this._postprocessing.isActive) {
53
53
  this.apply();
54
- // TODO: remove this workaround for postprocessing rendering not working correctly when applied for the first time
55
- this.apply();
56
54
  }
57
55
  }
58
56