sdk package
The Core3D SDK
Remarks
The SDK is a TypeScript library that enables developers to integrate Core3D directly into their platforms. You can use the SDK to programmatically create and edit designs in real-time, build custom 3D (and 2D) editing experiences, capture screenshots, and more.
The goal of the SDK is to be higher-level than Three.js, A-Frame, or Babylon.js, but lower-level than a typical <iframe /> or React component-type editor implementation to allow developers to focus on the design and UI rather than 3D interaction.
Please refer to our [versioning notes](/docs) for info on how SDK versions work.
Classes
|
Class |
Description |
|---|---|
|
Core3D API client | |
|
An error that includes error and response objects. | |
|
Provides a local, in-memory cache. | |
|
Establishes how the SDK should behave via configuration. | |
|
The Core3D facade is the easiest way to get started with the SDK. | |
|
The Design class handles Design Document manipulation. | |
|
A typed event emitter. | |
|
Graphic assignments are returned when applying graphic resources to a Design. | |
|
Graphic resources are non-repeating images. | |
|
Material assignments are returned when applying material resources to a Design. | |
|
Material resources are base texture e.g. cotton, plastic. | |
|
Pattern assignments are returned when applying pattern resources to a Design. | |
|
Pattern resources are used for repeating graphics. | |
|
A polygon utility class. | |
|
A utility for altering positions using mixed units. | |
|
Implementation of basic editing tools. | |
|
Zone attachments are returned when applying zone resources to a Design. | |
|
A zone resource is a utility for displaying the defined zones on the model. |
Enumerations
|
Enumeration |
Description |
|---|---|
|
A reference to public material identities. | |
|
A reference to public model identities. | |
|
A reference to standard model variants. | |
|
Defines render qualities of textures and resources. |
Functions
|
Function |
Description |
|---|---|
|
Provides conversion functionality between units. | |
|
Create an instance of the API client. | |
|
Create a cache. | |
|
Helper to create a Context object. | |
|
Helper for creating a design. | |
|
Helper to create a SceneInterface object. | |
|
Given a quality, get the target texture width (in pixels). | |
|
Type guard for AssignableInterface. | |
|
Type guard for AssignmentInterface. | |
|
Type guard for AttachableInterface. | |
|
Type guard for AttachmentInterface. | |
|
Type guard for GraphicAssignment. | |
|
Type guard for GraphicResource. | |
|
Type guard for MaterialAssignment. | |
|
Type guard for MaterialResource. | |
|
Type guard for MeshInterface. | |
|
Type guard for ModifierInterface. | |
|
Type guard for PatternAssignment. | |
|
Type guard for PatternResource. | |
|
Type guard for Quality. | |
|
Type guard for ResourceInterface. | |
|
Type guard for a serialized GraphicResource. | |
|
Type guard for a serialized MaterialResource. | |
|
Type guard for a serialized PatternResource. | |
|
Type guard for TexturedResourceInterface. | |
|
A type guard for ZoneInterface. | |
|
Type guard for ZoneAttachment. | |
|
Type guard for ZoneResource. | |
|
Helper to load a Design object by identity or data. | |
|
Helper to load a GraphicResource object by Upload identity. | |
|
Helper to load a MaterialResource object by Material identity. | |
|
Helper to load a ModelInterface object by Model identity. | |
|
Helper to load a PatternResource object by Upload identity. | |
|
Helper to load a SceneInterface. | |
|
Migrate an unknown version of a design document to the latest schema. | |
|
Helper to reproject Design onto a different ModelInterface. | |
|
Rotate a point around some origin. |
Interfaces
|
Interface |
Description |
|---|---|
|
An AdapterInterface constructor contract. | |
|
The interface for implementing an adapter. | |
|
Data for the API constructor. | |
|
Contract for Assignments. | |
|
Attachable resources apply to the model within a Design, rather than a specific node. | |
|
Contract for Attachments. | |
|
Options for Cache. | |
|
Options for . | |
|
Contract describing an entity. | |
|
Design Document (latest) | |
|
The interface for implementing an adapter material. | |
|
Contract for meshes. | |
|
Data for model instantiation. | |
|
Contract for models. | |
|
Contract for Modifiers. | |
|
Options for ModifierInterface.render(). | |
|
Contract describing Nodes. | |
|
Options for NodeInterface.computePolygons(). | |
|
Contract for a resource. | |
|
Options for ResourceInterface.render(). | |
|
Contract for scenes. | |
|
Contract for a textured resource. | |
|
Options for the Tool constructor. | |
|
Design Document (v0) | |
|
Design Document (v1) | |
|
Design Document (v10) | |
|
Design Document (v11) | |
|
Design Document (v12) | |
|
Design Document (v2) | |
|
Design Document (v3) | |
|
Design Document (v4) | |
|
Design Document (v5) | |
|
Design Document (v6) | |
|
Design Document (v7) | |
|
Design Document (v8) | |
|
Design Document (v9) | |
|
Contract for zones. |
Namespaces
|
Namespace |
Description |
|---|---|
Variables
|
Variable |
Description |
|---|---|
|
Validator for Latest. | |
|
Validator for V0. | |
|
Validator for V1. | |
|
Validator for V10. | |
|
Validator for V11. | |
|
Validator for V12. | |
|
Validator for V2. | |
|
Validator for V3. | |
|
Validator for V4. | |
|
Validator for V5. | |
|
Validator for V6. | |
|
Validator for V7. | |
|
Validator for V8. | |
|
Validator for V9. |
Type Aliases
|
Type Alias |
Description |
|---|---|
|
Options for AdapterInterface.createMaterial(). | |
|
Function that resolves a URI to its API resource. | |
|
Describes a bounding box. | |
|
Parameters for a conversion function given from/to. | |
|
Units supported by the conversion utility. | |
|
Events emitted by Design. | |
|
Fetch initialization options. | |
|
Options for parsing response bodies. | |
|
Fetch result. | |
|
Options for graphic assignments. | |
|
Options for graphic resources. | |
|
Sources for graphic resources. | |
|
Maps URIs to other URIs with UV transform information. | |
|
Options for material assignments. | |
|
Options for MaterialInterface.setTextureSources(). | |
|
Valid keys for MaterialInterface textures. | |
|
A key/value object containing texture sources. | |
|
Options for material resources. | |
|
Sources for material resources. | |
|
Function that determines a mesh "rank". | |
|
Function to check whether a mesh is a zone recipient. | |
|
Events emitted by ModifierInterface. | |
|
Options for pattern assignments. | |
|
Options for pattern resources. | |
|
Sources for pattern resources. | |
|
A point. | |
|
The position direction indicator. | |
|
The position unit indicator. | |
|
The position indicator value. | |
|
Events emitted by ResourceInterface. | |
|
Scene camera options. | |
|
Event types emitted by SceneInterface. | |
|
Scene layout options. | |
|
Describes a raycast hit during pointer interactions with SceneInterface. | |
|
Options for SceneInterface. | |
|
Event emitted for pointer events on SceneInterface. | |
|
The JSON-serialized representation of a modifier as stored in the Design Document. | |
|
The JSON-serialized representation of a resource as stored in the Design Document. | |
|
A utility type to extend provided options with TexturedResourceInterface options. | |
|
A utility type to extend provided sources with TexturedResourceInterface sources. | |
|
Modes that the tool supports. | |
|
Options for zone attachments. | |
|
Data for Zones. | |
|
Options for zone resources. | |
|
Sources for zone resources. |