Skip to content

Commit 443574d

Browse files
committed
fix: avoid using z-fighting suppressor when exporting models
1 parent 68a46f4 commit 443574d

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/components/ModelRenderer.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ const props = defineProps<{
3939
curveSegments: number
4040
materialConfig: MaterialConfig
4141
controlsConfig: ControlsConfig
42+
zFighting: boolean
4243
}>()
4344
4445
const emit = defineEmits<{
@@ -110,7 +111,7 @@ function fixFloat(num: number) {
110111
}
111112
112113
// 计算实际显示的形状
113-
const shownShapes = computed(() => suppressZFighting(props.shapes))
114+
const shownShapes = computed(() => props.zFighting ? suppressZFighting(props.shapes) : props.shapes)
114115
115116
// 获取形状的材质配置
116117
function getShapeMaterialConfig(index: number) {

src/components/SvgTo3D.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ const isLoaded = computed(() => svgShapes.value.length && !isDefaultSvg.value)
221221
v-model:camera-position="cameraPosition"
222222
v-model:selected-shape-index="selectedShownShapeIndex"
223223
:shapes="shownShapes"
224+
:z-fighting="!isExporting"
224225
:scale="scale"
225226
:curve-segments="curveSegments"
226227
:material-config="{

0 commit comments

Comments
 (0)