Core Concepts
This guide will outline core concepts of the Core3D SDK.
Contents
Model
A 3D model on which to build or display a Design
. This entity allows you to access meshes, zones, and other properties of the underlying 3D model programmatically.
Design
An object representing the combination of a Model
and lists of Resource
and Modifier
entities. A Design
is not tied to the the specific Model
entity, meaning the Model
can be swapped and the Design
can be reprojected.
Resource
A Resource
represents a Material, Graphic, Pattern, etc. that can be applied to a Design
.
There are two general types of resources:
Assignable
— represents something you'd apply directly to a mesh, which include materials, patterns, and graphics.Attachable
— resource represents something applied to theModel
as a whole, which include: debugging utilities like theZoneResource
(for visualizing zones), additional mesh components, etc.
And a handful of specific Resource
types:
GraphicResource
— an image with a single motif e.g. a logo on the sleeve of a tee shirtPatternResource
— an image repeated across the entire target (mesh) AKA all-over printsMaterialResource
— a repeated texture representing some base surface e.g. cotton, plastic, leather, etc.ZoneResource
— used to visualize a “printable area” defined on a model
A Resource
can be reused across several components of a Design
, or multiple Design
s, for example:
const graphic = await core3d.loadGraphic('core3d:upload:...');
const design1 = core3d.createDesign();
design1.apply(graphic, design1.listMeshes()[0]);
design1.apply(graphic, design1.listMeshes()[1]);
const design2 = core3d.createDesign();
design2.apply(graphic, design2.listMeshes()[0]);
Modifier
An object that describes how a Resource
is applied to a Design
i.e. an entity representing a Resource
/Design
link.
There are two general types of Modifier
s:
Assignment
— represents the application of anAssignable
resource.Attachment
— represents the application of anAttachable
resource.
And specific Modifier
types for every Resource
type:
GraphicAssignment
fromGraphicResource
MaterialAssignment
fromMaterialResource
PatternAssignment
fromPatternResource
ZoneAttachment
fromZoneResource
- ... and so on
Any time a Resource
is applied to a Design
, a Modifier
is returned, for example:
const design = core3d.createDesign();
const graphic = await core3d.loadGraphic('core3d:upload:...');
const graphicAssignment = design.apply(graphic, design.listMeshes()[0]);
graphicAssignment.setScale(20);