@needle-tools/engine 4.6.0 → 4.6.1-next.26cf56c

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 (68) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/generateMeshBVH.worker-BaNp_Xtp.js +25 -0
  3. package/dist/{gltf-progressive-Bm9eEfgu.min.js → gltf-progressive-Bl4okF1b.min.js} +1 -1
  4. package/dist/{gltf-progressive-GjIqwSG3.js → gltf-progressive-DSpdn0QT.js} +2 -2
  5. package/dist/{gltf-progressive-Dn6o99rH.umd.cjs → gltf-progressive-P8b8a0qY.umd.cjs} +1 -1
  6. package/dist/{needle-engine.bundle-CoJqbtmp.umd.cjs → needle-engine.bundle-B0Kku0-E.umd.cjs} +145 -141
  7. package/dist/needle-engine.bundle-B23LP9xh.min.js +1563 -0
  8. package/dist/{needle-engine.bundle-DsrPZ9gj.js → needle-engine.bundle-gJVfKnbJ.js} +6252 -6216
  9. package/dist/needle-engine.js +4 -4
  10. package/dist/needle-engine.min.js +1 -1
  11. package/dist/needle-engine.umd.cjs +1 -1
  12. package/dist/{postprocessing-CRQa6Qxn.umd.cjs → postprocessing-BPhSPjAn.umd.cjs} +2 -2
  13. package/dist/{postprocessing-DF8AlRgW.min.js → postprocessing-DoBd3XIR.min.js} +2 -2
  14. package/dist/{postprocessing-D6W1EyZ-.js → postprocessing-XKNCD6By.js} +3 -3
  15. package/dist/{three-DMrv-4ar.umd.cjs → three-B_hneGZr.umd.cjs} +4 -4
  16. package/dist/{three-Bz6X1mrw.js → three-DrqIzZTH.js} +4198 -4198
  17. package/dist/{three-Boa-jOq-.min.js → three-DuDKwKB8.min.js} +33 -33
  18. package/dist/{three-examples-GggCDHv0.js → three-examples-B50TT3Iu.js} +5 -5
  19. package/dist/{three-examples-DuVhxqft.min.js → three-examples-DaDLBuy6.min.js} +14 -14
  20. package/dist/{three-examples-C7ryg8vN.umd.cjs → three-examples-X3OadjXB.umd.cjs} +3 -3
  21. package/dist/{three-mesh-ui-CY6Izc7C.min.js → three-mesh-ui-B3p3gyUz.min.js} +1 -1
  22. package/dist/{three-mesh-ui-CwlN0FUC.umd.cjs → three-mesh-ui-CQiIQIlA.umd.cjs} +1 -1
  23. package/dist/{three-mesh-ui-CLNOfsWn.js → three-mesh-ui-CxuWt7m-.js} +1 -1
  24. package/dist/{vendor-zxXa3Dmr.min.js → vendor-BlSxe9JJ.min.js} +3 -3
  25. package/dist/{vendor-BSD1RQIh.js → vendor-BmYIgaS1.js} +3 -3
  26. package/dist/{vendor-DHr4aqIZ.umd.cjs → vendor-Cavtu3CP.umd.cjs} +3 -3
  27. package/lib/engine/engine_assetdatabase.js +3 -1
  28. package/lib/engine/engine_assetdatabase.js.map +1 -1
  29. package/lib/engine/engine_context.d.ts +2 -2
  30. package/lib/engine/engine_context.js +11 -10
  31. package/lib/engine/engine_context.js.map +1 -1
  32. package/lib/engine/engine_utils_screenshot.d.ts +1 -1
  33. package/lib/engine/engine_utils_screenshot.js +11 -2
  34. package/lib/engine/engine_utils_screenshot.js.map +1 -1
  35. package/lib/engine-components/ReflectionProbe.d.ts +2 -1
  36. package/lib/engine-components/ReflectionProbe.js +4 -1
  37. package/lib/engine-components/ReflectionProbe.js.map +1 -1
  38. package/lib/engine-components/Renderer.js +9 -5
  39. package/lib/engine-components/Renderer.js.map +1 -1
  40. package/lib/engine-components/postprocessing/Effects/Antialiasing.js +2 -1
  41. package/lib/engine-components/postprocessing/Effects/Antialiasing.js.map +1 -1
  42. package/lib/engine-components/postprocessing/Effects/Tonemapping.js +10 -6
  43. package/lib/engine-components/postprocessing/Effects/Tonemapping.js.map +1 -1
  44. package/lib/engine-components/postprocessing/PostProcessingEffect.js +2 -1
  45. package/lib/engine-components/postprocessing/PostProcessingEffect.js.map +1 -1
  46. package/lib/engine-components/postprocessing/PostProcessingHandler.d.ts +8 -1
  47. package/lib/engine-components/postprocessing/PostProcessingHandler.js +103 -66
  48. package/lib/engine-components/postprocessing/PostProcessingHandler.js.map +1 -1
  49. package/lib/engine-components/postprocessing/Volume.d.ts +2 -0
  50. package/lib/engine-components/postprocessing/Volume.js +12 -1
  51. package/lib/engine-components/postprocessing/Volume.js.map +1 -1
  52. package/lib/engine-components/postprocessing/utils.d.ts +2 -0
  53. package/lib/engine-components/postprocessing/utils.js.map +1 -1
  54. package/package.json +2 -2
  55. package/plugins/vite/dependency-watcher.js +8 -2
  56. package/src/engine/engine_assetdatabase.ts +3 -1
  57. package/src/engine/engine_context.ts +14 -11
  58. package/src/engine/engine_utils_screenshot.ts +13 -3
  59. package/src/engine-components/ReflectionProbe.ts +5 -1
  60. package/src/engine-components/Renderer.ts +10 -7
  61. package/src/engine-components/postprocessing/Effects/Antialiasing.ts +2 -1
  62. package/src/engine-components/postprocessing/Effects/Tonemapping.ts +9 -7
  63. package/src/engine-components/postprocessing/PostProcessingEffect.ts +2 -1
  64. package/src/engine-components/postprocessing/PostProcessingHandler.ts +115 -72
  65. package/src/engine-components/postprocessing/Volume.ts +14 -1
  66. package/src/engine-components/postprocessing/utils.ts +2 -0
  67. package/dist/generateMeshBVH.worker-Cdfpaq5W.js +0 -25
  68. package/dist/needle-engine.bundle-BDO_N7gN.min.js +0 -1559
@@ -56,6 +56,9 @@ export class Volume extends Behaviour implements IEditorModificationReceiver, IP
56
56
  return this._activeEffects;
57
57
  }
58
58
 
59
+ get dirty() { return this._isDirty; }
60
+ set dirty(value: boolean) { this._isDirty = value; }
61
+
59
62
  @serializeable(VolumeProfile)
60
63
  sharedProfile?: VolumeProfile;
61
64
 
@@ -185,7 +188,17 @@ export class Volume extends Behaviour implements IEditorModificationReceiver, IP
185
188
  this.context.composer.setMainScene(this.context.scene);
186
189
 
187
190
  const composer = this.context.composer;
188
- if (this.multisampling === "auto") {
191
+
192
+ // If the postprocessing handler is using depth+normals (e.g. with SMAA) we ALWAYS disable multisampling to avoid ugly edges
193
+ if (this._postprocessing && (this._postprocessing.hasSmaaEffect)) {
194
+ if (composer.multisampling !== 0) {
195
+ composer.multisampling = 0;
196
+ if (debug || isDevEnvironment()) {
197
+ console.warn(`[PostProcessing] Disabling multisampling because depth or normals are used. If you need anti-aliasing, consider adding an Antialiasing component or SMAA effect to the PostprocessingManager.`);
198
+ }
199
+ }
200
+ }
201
+ else if (this.multisampling === "auto") {
189
202
 
190
203
  const timeSinceLastChange = this.context.time.realtimeSinceStartup - this._multisampleAutoChangeTime;
191
204
 
@@ -11,6 +11,8 @@ export const debug = getParam("debugpost");
11
11
 
12
12
  export type IPostProcessingManager = IComponent & {
13
13
  get isPostProcessingManager(): boolean;
14
+ get dirty(): boolean;
15
+ set dirty(value: boolean);
14
16
  addEffect(effect: PostProcessingEffect): void;
15
17
  removeEffect(effect: PostProcessingEffect): void;
16
18
  }