fl-web-component 1.2.8 → 1.2.9

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": "fl-web-component",
3
- "version": "1.2.8",
3
+ "version": "1.2.9",
4
4
  "scripts": {
5
5
  "tip1": "仅调试本组件不涉及业务组件,请执行dev",
6
6
  "dev": "vue-cli-service serve",
@@ -111,9 +111,11 @@ function parseData(input) {
111
111
  linewidth: material?.linewidth !== undefined ? material?.linewidth : 1, // 默认值
112
112
  };
113
113
 
114
+ const identity = new THREE.Matrix4().identity();
115
+
114
116
  geomList.push({
115
117
  matrix: {
116
- val: primitive.matrix,
118
+ val: primitive.matrix?.length ? primitive.matrix : identity.elements,
117
119
  },
118
120
  prmid: primitive.prmid,
119
121
  geomId: primitiveData.id,
@@ -121,7 +123,7 @@ function parseData(input) {
121
123
  text: primitiveData.geomText,
122
124
  points: primitiveData.position,
123
125
  normals: primitiveData.normal,
124
- triangles: primitiveData.indices,
126
+ triangles: primitiveData.indices || [],
125
127
  max: primitiveData.max,
126
128
  min: primitiveData.min,
127
129
  prop: prop,