2D对象JS文件创建

时间:2019-03-04 08:58:00

标签: javascript blender pythreejs

如何创建下面已链接的2D对象文件。

我们正在使用threejs WebGLRenderer渲染器来渲染对象。我知道如何创建3d文件,但不知道如何从Blender或任何其他软件以2D视图导出该文件。我们在Blender中创建3d对象,然后直接从Blender中导出threejs文件。

我还附上了两个目标文件预览图像以供参考。如果需要更多详细信息,请告诉我。

在2d视图中我需要与以下两个示例文件相同的3D文件。

2D文件源代码:

{
"otf": "85",
"size": "70x20x140",
"level": "0",
"materials": [{
    "color": "rgb(163,163,163)",
    "name": "color"
}, {
    "color": "rgb(105,144,163)",
    "name": "color_1"
}],
"width": 12,
"className": "Window",
"items": [{
    "otf": "85",
    "stroke-opacity": "1",
    "material": "-1",
    "materials": "-1",
    "closed": true,
    "stroke-width": "1",
    "type": "square",
    "fill": "#ffffff",
    "stroke": "#000000",
    "fill-opacity": "1",
    "points": [
        [994, 965],
        [1006, 965],
        [1006, 1035],
        [994, 1035]
    ]
}, {
    "otf": "85",
    "stroke-opacity": "1",
    "material": "1",
    "materials": "1",
    "closed": true,
    "stroke-width": "1",
    "type": "square",
    "fill": "rgb(105,144,163)",
    "stroke": "#000000",
    "fill-opacity": "1",
    "points": [
        [998, 965],
        [1002, 965],
        [1002, 1035],
        [998, 1035]
    ]
}],
"colors": [],
"height": 70

}

2D Object Image 3D Object Image

0 个答案:

没有答案