feat:测试页
This commit is contained in:
@@ -84,6 +84,35 @@ const shapes = [
|
||||
svg: '<polygon points="30,20 70,20 85,80 15,80" stroke="#333" stroke-width="2" fill="none"/>',
|
||||
drawFunction: 'drawTrapezoid',
|
||||
},
|
||||
// 新增3D形状
|
||||
{
|
||||
id: 'cylinder',
|
||||
name: '圆柱体',
|
||||
type: '3d-cylinder',
|
||||
svg: '<ellipse cx="50" cy="20" rx="30" ry="8" stroke="#333" stroke-width="2" fill="none"/><rect x="20" y="20" width="60" height="50" stroke="none" fill="none"/><line x1="20" y1="20" x2="20" y2="70" stroke="#333" stroke-width="2"/><line x1="80" y1="20" x2="80" y2="70" stroke="#333" stroke-width="2"/><ellipse cx="50" cy="70" rx="30" ry="8" stroke="#333" stroke-width="2" fill="none"/>',
|
||||
drawFunction: 'drawCylinder',
|
||||
},
|
||||
{
|
||||
id: 'cube',
|
||||
name: '正方体',
|
||||
type: '3d-cube',
|
||||
svg: '<polygon points="20,30 60,30 60,70 20,70" stroke="#333" stroke-width="2" fill="none"/><polygon points="30,20 70,20 70,60 30,60" stroke="#333" stroke-width="2" fill="none"/><line x1="20" y1="30" x2="30" y2="20" stroke="#333" stroke-width="2"/><line x1="60" y1="30" x2="70" y2="20" stroke="#333" stroke-width="2"/><line x1="60" y1="70" x2="70" y2="60" stroke="#333" stroke-width="2"/>',
|
||||
drawFunction: 'drawCube',
|
||||
},
|
||||
{
|
||||
id: 'sphere',
|
||||
name: '球体',
|
||||
type: '3d-sphere',
|
||||
svg: '<circle cx="50" cy="50" r="35" stroke="#333" stroke-width="2" fill="none"/><ellipse cx="50" cy="50" rx="35" ry="15" stroke="#333" stroke-width="1" fill="none" opacity="0.5"/><ellipse cx="50" cy="50" rx="15" ry="35" stroke="#333" stroke-width="1" fill="none" opacity="0.5"/>',
|
||||
drawFunction: 'drawSphere',
|
||||
},
|
||||
{
|
||||
id: 'cone',
|
||||
name: '圆锥体',
|
||||
type: '3d-cone',
|
||||
svg: '<ellipse cx="50" cy="80" rx="30" ry="8" stroke="#333" stroke-width="2" fill="none"/><line x1="20" y1="80" x2="50" y2="20" stroke="#333" stroke-width="2"/><line x1="80" y1="80" x2="50" y2="20" stroke="#333" stroke-width="2"/>',
|
||||
drawFunction: 'drawCone',
|
||||
},
|
||||
];
|
||||
|
||||
// 颜色选项
|
||||
|
||||
Reference in New Issue
Block a user