Three.js Entities
Entities for 3D model management, customization, and visualization using Three.js.
ThreeJsModel
Purpose: Base 3D model entity for boats, rods, reels, and equipment.
Key Fields:
Id(int): Unique identifierModelType: Boat, Rod, Reel, Equipment, etc.ModelName: Model nameModelUrl: URL to GLTF/GLB fileModelData: Embedded JSON or Base64 dataReferenceLength,ReferenceWidth,ReferenceHeight: Reference dimensions at scale 1.0ReferenceDiameter: Reference diameter (for cylindrical models)AnchorPoint: Model origin locationDefaultRotationX,DefaultRotationY,DefaultRotationZ: Default rotationsDefaultScale: Default scaleAuthor: Model authorLicense: Model licenseVersion: Model versionPreviewImageUrl: Preview imageComplexity: Model complexity metrics
Relationships:
- One-to-many: ModelVariant, ModelTexture, RodModel, ReelModel, EquipmentModel
Usage Patterns:
// Get models by type
var rodModels = context.ThreeJsModels
.Where(tm => tm.ModelType == ModelType.Rod)
.ToList();
ModelVariant
Purpose: Pre-defined variants of a base model (different sizes).
Key Fields:
Id(int): Unique identifierThreeJsModelId: Base modelVariantName: Variant nameLength,Width,Height: Variant dimensionsScaleX,ScaleY,ScaleZ: Calculated scale factorsModelUrl: Variant-specific model URL (optional)
Relationships:
- Many-to-one: ThreeJsModel
UserModelCustomization
Purpose: User-specific model customizations.
Key Fields:
Id(int): Unique identifierUserId: Customizing userThreeJsModelId: Base modelModelVariantId: Selected variant (optional)CustomLength,CustomWidth,CustomHeight: User's actual dimensionsScaleX,ScaleY,ScaleZ: Calculated scale factorsRotationX,RotationY,RotationZ: Custom rotationsPositionOffsetX,PositionOffsetY,PositionOffsetZ: Position offsetsMaterialOverrides: Material/color overrides (JSON)
Relationships:
- Many-to-one: User, ThreeJsModel, ModelVariant (optional)
RodModel
Purpose: Links rods to their 3D models.
Key Fields:
Id(int): Unique identifierRodId: Specific rod (optional)RodTypeId: Rod type (optional)ThreeJsModelId: Associated modelDefaultLength: Default length for rod typeConfiguration: Additional configuration (JSON)
Relationships:
- Many-to-one: Rod (optional), RodType (optional), ThreeJsModel
ReelModel
Purpose: Links reels to their 3D models.
Key Fields:
Id(int): Unique identifierReelId: Specific reel (optional)ReelTypeId: Reel type (optional)ThreeJsModelId: Associated modelDefaultSize: Default size for reel type
Relationships:
- Many-to-one: Reel (optional), ReelType (optional), ThreeJsModel
EquipmentModel
Purpose: Links boat equipment to 3D models.
Key Fields:
Id(int): Unique identifierBoatEquipmentId: Specific equipment (optional)BoatEquipmentTypeId: Equipment type (optional)ThreeJsModelId: Associated modelDefaultSize: Default size for equipment type
Relationships:
- Many-to-one: BoatEquipment (optional), BoatEquipmentType (optional), ThreeJsModel
ModelTexture
Purpose: Textures for 3D models.
Key Fields:
Id(int): Unique identifierThreeJsModelId: Associated modelTextureType: Diffuse, Normal, Specular, etc.TextureUrl: Texture URLTextureData: Embedded texture data
Relationships:
- Many-to-one: ThreeJsModel
Related Documentation
- Three.js System - Complete 3D model system documentation
- Three.js Textures - Texture system
- Boat System - Boat 3D visualization