@xviewer.js/debug 1.0.0-alpha.48 → 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}}
@@ -2622,7 +2622,8 @@ const meshStandardMaterialProperties = {
2622
2622
  },
2623
2623
  normalScale: {
2624
2624
  dir: "normal",
2625
- parent: "normalMap"
2625
+ parent: "normalMap",
2626
+ step: 0.01
2626
2627
  },
2627
2628
  displacementScale: {
2628
2629
  dir: "displacement",
@@ -2658,6 +2659,116 @@ const meshStandardMaterialProperties = {
2658
2659
  for(let k in meshStandardMaterialProperties){
2659
2660
  property(meshStandardMaterialProperties[k])(MeshStandardMaterial.prototype, k);
2660
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
+ }
2661
2772
 
2662
2773
  /**
2663
2774
  * @author mrdoob / http://mrdoob.com/