@xviewer.js/debug 1.0.0-alpha.47 → 1.0.0-alpha.49

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/dist/module.js CHANGED
@@ -1,4 +1,4 @@
1
- import { Material, MeshBasicMaterial, MeshStandardMaterial, ShaderMaterial } from 'three';
1
+ import { Material, MeshBasicMaterial, MeshStandardMaterial, MeshPhysicalMaterial, ShaderMaterial } from 'three';
2
2
  import { property, Plugin, PropertyManager, Component, ObjectInstance } from '@xviewer.js/core';
3
3
 
4
4
  var e=[],t=[];function n(n,r){if(n&&"undefined"!=typeof document){var a,s=!0===r.prepend?"prepend":"append",d=!0===r.singleTag,i="string"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName("head")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c();}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n));}function c(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a="prepend"===s?"afterbegin":"beforeend";return i.insertAdjacentElement(a,e),e}}
@@ -2454,8 +2454,15 @@ class ViewerExtension extends ObjectInstance {
2454
2454
  set backgroundBlurriness(v) {
2455
2455
  this._scene.backgroundBlurriness = v;
2456
2456
  }
2457
+ get targetFrameRate() {
2458
+ return this._viewer.targetFrameRate;
2459
+ }
2460
+ set targetFrameRate(v) {
2461
+ this._viewer.targetFrameRate = v;
2462
+ }
2457
2463
  constructor(viewer){
2458
2464
  super();
2465
+ this._viewer = viewer;
2459
2466
  this._scene = viewer.scene;
2460
2467
  this._renderer = viewer.renderer;
2461
2468
  }
@@ -2498,6 +2505,13 @@ __decorate([
2498
2505
  step: 0.01
2499
2506
  })
2500
2507
  ], ViewerExtension.prototype, "backgroundBlurriness", null);
2508
+ __decorate([
2509
+ property({
2510
+ min: 1,
2511
+ max: 120,
2512
+ step: 1
2513
+ })
2514
+ ], ViewerExtension.prototype, "targetFrameRate", null);
2501
2515
  const materialProperties = {
2502
2516
  visible: {},
2503
2517
  transparent: {},
@@ -2608,7 +2622,8 @@ const meshStandardMaterialProperties = {
2608
2622
  },
2609
2623
  normalScale: {
2610
2624
  dir: "normal",
2611
- parent: "normalMap"
2625
+ parent: "normalMap",
2626
+ step: 0.01
2612
2627
  },
2613
2628
  displacementScale: {
2614
2629
  dir: "displacement",
@@ -2644,6 +2659,116 @@ const meshStandardMaterialProperties = {
2644
2659
  for(let k in meshStandardMaterialProperties){
2645
2660
  property(meshStandardMaterialProperties[k])(MeshStandardMaterial.prototype, k);
2646
2661
  }
2662
+ const meshPhysicalMaterialProperties = {
2663
+ ior: {
2664
+ min: 0,
2665
+ max: 10,
2666
+ step: 0.01
2667
+ },
2668
+ anisotropy: {
2669
+ min: 0,
2670
+ max: 10,
2671
+ step: 0.01
2672
+ },
2673
+ clearcoat: {
2674
+ dir: "clearcoat"
2675
+ },
2676
+ clearcoatMap: {
2677
+ dir: "clearcoat",
2678
+ min: 0,
2679
+ max: 1,
2680
+ step: 0.01
2681
+ },
2682
+ clearcoatRoughness: {
2683
+ dir: "clearcoat",
2684
+ min: 0,
2685
+ max: 1,
2686
+ step: 0.01
2687
+ },
2688
+ clearcoatNormalScale: {
2689
+ dir: "clearcoat",
2690
+ step: 0.01
2691
+ },
2692
+ clearcoatNormalMap: {
2693
+ dir: "clearcoat"
2694
+ },
2695
+ iridescence: {
2696
+ dir: "iridescence",
2697
+ min: 0,
2698
+ max: 1,
2699
+ step: 0.01
2700
+ },
2701
+ iridescenceMap: {
2702
+ dir: "iridescence"
2703
+ },
2704
+ iridescenceIOR: {
2705
+ dir: "iridescence",
2706
+ step: 0.01
2707
+ },
2708
+ iridescenceThicknessRange: {
2709
+ dir: "iridescence"
2710
+ },
2711
+ iridescenceThicknessMap: {
2712
+ dir: "iridescence"
2713
+ },
2714
+ sheen: {
2715
+ dir: "sheen"
2716
+ },
2717
+ sheenColor: {
2718
+ dir: "sheen"
2719
+ },
2720
+ sheenColorMap: {
2721
+ dir: "sheen"
2722
+ },
2723
+ sheenRoughness: {
2724
+ dir: "sheen",
2725
+ min: 0,
2726
+ max: 1,
2727
+ step: 0.01
2728
+ },
2729
+ sheenRoughnessMap: {
2730
+ dir: "sheen"
2731
+ },
2732
+ transmission: {
2733
+ dir: "transmission"
2734
+ },
2735
+ transmissionMap: {
2736
+ dir: "transmission"
2737
+ },
2738
+ thickness: {
2739
+ dir: "thickness",
2740
+ min: 0,
2741
+ max: 1,
2742
+ step: 0.01
2743
+ },
2744
+ thicknessMap: {
2745
+ dir: "thickness"
2746
+ },
2747
+ attenuationDistance: {
2748
+ dir: "attenuation"
2749
+ },
2750
+ attenuationColor: {
2751
+ dir: "attenuation"
2752
+ },
2753
+ specularIntensity: {
2754
+ dir: "specular",
2755
+ min: 0,
2756
+ max: 1,
2757
+ step: 0.01
2758
+ },
2759
+ specularIntensityMap: {
2760
+ dir: "specular"
2761
+ },
2762
+ specularColor: {
2763
+ dir: "specular"
2764
+ },
2765
+ specularColorMap: {
2766
+ dir: "specular"
2767
+ }
2768
+ };
2769
+ for(let k in meshPhysicalMaterialProperties){
2770
+ property(meshPhysicalMaterialProperties[k])(MeshPhysicalMaterial.prototype, k);
2771
+ }
2647
2772
 
2648
2773
  /**
2649
2774
  * @author mrdoob / http://mrdoob.com/