fl-web-component 2.1.1-beta.13 → 2.1.1-beta.15

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.
@@ -1068,10 +1068,10 @@ function draw3Dmodel(
1068
1068
  * @param {String} instanceName - 模型实例的名称
1069
1069
  * @returns {Object} - 包含所有 2D 模型的组对象
1070
1070
  */
1071
- function draw2Dmodel(geom, instanceName, instanceCount, nColor, nOpacity, options = {}) {
1072
- const points = geom.points;
1073
- const normals = geom.normals;
1074
- const geometry = new THREE.BufferGeometry();
1071
+ function draw2Dmodel(geom, instanceName, instanceCount, nColor, nOpacity, options = {}) {
1072
+ const points = geom.points;
1073
+ const normals = geom.normals;
1074
+ const geometry = new THREE.BufferGeometry();
1075
1075
 
1076
1076
  if (points && points.length) {
1077
1077
  const position = new Float32Array(points);
@@ -1082,18 +1082,18 @@ function draw2Dmodel(geom, instanceName, instanceCount, nColor, nOpacity, option
1082
1082
  const normal = new Float32Array(normals);
1083
1083
  geometry.setAttribute('normal', new THREE.BufferAttribute(normal, 3));
1084
1084
  }
1085
-
1086
- const { color, linewidth } = geom.prop;
1087
- const formatLinewidth = (linewidth < 1 ? linewidth * 50 : linewidth) || 5;
1088
- const meshLineResolution = options.meshLineResolution || {};
1089
- const resolutionWidth = meshLineResolution.width || window.innerWidth || 1;
1090
- const resolutionHeight = meshLineResolution.height || window.innerHeight || 1;
1091
- const material = new MeshLineMaterial({
1092
- color: new THREE.Color(`rgb(${color[0]}, ${color[1]}, ${color[2]})`),
1093
- lineWidth: formatLinewidth,
1094
- resolution: new THREE.Vector2(resolutionWidth, resolutionHeight),
1095
- sizeAttenuation: 0,
1096
- });
1085
+
1086
+ const { color, linewidth } = geom.prop;
1087
+ const formatLinewidth = (linewidth < 1 ? linewidth * 50 : linewidth) || 5;
1088
+ const meshLineResolution = options.meshLineResolution || {};
1089
+ const resolutionWidth = meshLineResolution.width || window.innerWidth || 1;
1090
+ const resolutionHeight = meshLineResolution.height || window.innerHeight || 1;
1091
+ const material = new MeshLineMaterial({
1092
+ color: new THREE.Color(`rgb(${color[0]}, ${color[1]}, ${color[2]})`),
1093
+ lineWidth: formatLinewidth,
1094
+ resolution: new THREE.Vector2(resolutionWidth, resolutionHeight),
1095
+ sizeAttenuation: 0,
1096
+ });
1097
1097
 
1098
1098
  const lineGeometry = new MeshLineGeometry();
1099
1099
  lineGeometry.setPoints(geometry);