chore: 统一代码风格并配置ESLint和Prettier
配置ESLint和Prettier规则 添加前端和后端的忽略文件 统一代码格式和缩进 修复代码风格问题
This commit is contained in:
@@ -3,32 +3,79 @@ import { MATERIAL_CONFIGS, MATERIAL_TYPES } from './constants.js';
|
||||
|
||||
export const createRackFrameMaterial = (options = {}) => {
|
||||
const config = MATERIAL_CONFIGS[MATERIAL_TYPES.RACK_FRAME];
|
||||
return <meshStandardMaterial color={config.color} metalness={config.metalness} roughness={config.roughness} envMapIntensity={config.envMapIntensity} {...options} />;
|
||||
return (
|
||||
<meshStandardMaterial
|
||||
color={config.color}
|
||||
metalness={config.metalness}
|
||||
roughness={config.roughness}
|
||||
envMapIntensity={config.envMapIntensity}
|
||||
{...options}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
export const createRailMaterial = (options = {}) => {
|
||||
const config = MATERIAL_CONFIGS[MATERIAL_TYPES.RAIL];
|
||||
return <meshStandardMaterial color={config.color} metalness={config.metalness} roughness={config.roughness} envMapIntensity={config.envMapIntensity} {...options} />;
|
||||
return (
|
||||
<meshStandardMaterial
|
||||
color={config.color}
|
||||
metalness={config.metalness}
|
||||
roughness={config.roughness}
|
||||
envMapIntensity={config.envMapIntensity}
|
||||
{...options}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
export const createRailHoleMaterial = (options = {}) => {
|
||||
const config = MATERIAL_CONFIGS[MATERIAL_TYPES.RAIL_HOLE];
|
||||
return <meshBasicMaterial color={config.color} metalness={config.metalness} roughness={config.roughness} {...options} />;
|
||||
return (
|
||||
<meshBasicMaterial
|
||||
color={config.color}
|
||||
metalness={config.metalness}
|
||||
roughness={config.roughness}
|
||||
{...options}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
export const createSidePanelMaterial = (options = {}) => {
|
||||
const config = MATERIAL_CONFIGS[MATERIAL_TYPES.SIDE_PANEL];
|
||||
return <meshStandardMaterial color={config.color} metalness={config.metalness} roughness={config.roughness} envMapIntensity={config.envMapIntensity} {...options} />;
|
||||
return (
|
||||
<meshStandardMaterial
|
||||
color={config.color}
|
||||
metalness={config.metalness}
|
||||
roughness={config.roughness}
|
||||
envMapIntensity={config.envMapIntensity}
|
||||
{...options}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
export const createTopPlateMaterial = (options = {}) => {
|
||||
const config = MATERIAL_CONFIGS[MATERIAL_TYPES.TOP_PLATE];
|
||||
return <meshStandardMaterial color={config.color} metalness={config.metalness} roughness={config.roughness} envMapIntensity={config.envMapIntensity} {...options} />;
|
||||
return (
|
||||
<meshStandardMaterial
|
||||
color={config.color}
|
||||
metalness={config.metalness}
|
||||
roughness={config.roughness}
|
||||
envMapIntensity={config.envMapIntensity}
|
||||
{...options}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
export const createBottomPlateMaterial = (options = {}) => {
|
||||
const config = MATERIAL_CONFIGS[MATERIAL_TYPES.BOTTOM_PLATE];
|
||||
return <meshStandardMaterial color={config.color} metalness={config.metalness} roughness={config.roughness} envMapIntensity={config.envMapIntensity} {...options} />;
|
||||
return (
|
||||
<meshStandardMaterial
|
||||
color={config.color}
|
||||
metalness={config.metalness}
|
||||
roughness={config.roughness}
|
||||
envMapIntensity={config.envMapIntensity}
|
||||
{...options}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
export const createTextLabelMaterial = (color = '#ffffff') => {
|
||||
|
||||
Reference in New Issue
Block a user