Skip to content

Instantly share code, notes, and snippets.

@cdata
Created February 4, 2020 06:08
Show Gist options
  • Save cdata/92fde252cf5002f763ccde15d1e42cc2 to your computer and use it in GitHub Desktop.
Save cdata/92fde252cf5002f763ccde15d1e42cc2 to your computer and use it in GitHub Desktop.
/**
* A Scene describes an ordered subset Nodes associated with a root Model that
* should be rendered together.
*
* @see https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#reference-scene
* @access package
*/
export declare interface Scene extends ThreeDOMElement {
/**
* The name of the Scene
*/
readonly name?: string;
/**
* The root Nodes from a given Model that together (with their hierarchical
* descendants) represent the Scene
*/
readonly nodes: Readonly<Array<Node>>;
}
/**
* A Node is a basic hierarchical primitive of a 3DOM scene graph. Nodes hold
* references to descendant nodes children and can be traversed to access
* sub-trees in the graph.
*
* @see https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#reference-node
* @access package
*/
export declare interface Node extends ThreeDOMElement {
/**
* The name of the Node
*/
readonly name?: string;
/**
* An optional reference to a Mesh that is associated with this hierarchical
* position in the scene graph.
*/
readonly mesh?: Mesh;
/**
* The immediate hierarchical descendants of the current Node.
*/
readonly children: Readonly<Array<Node>>;
}
/**
* A Mesh associates an ordered set of primitives with a position in the scene
* graph via a Node that references it.
*
* @see https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#reference-mesh
* @access package
*/
export declare interface Mesh extends ThreeDOMElement {
/**
* The name of the Mesh
*/
readonly name?: string;
/**
* An ordered set of Primitives associated with the Mesh
*/
readonly primitives: Readonly<Array<Primitive>>;
}
/**
* A Primitive represents the pairing of geometry data and a Material.
*
* @see https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#reference-primitive
* @access package
*/
export declare interface Primitive extends ThreeDOMElement {
/**
* The name of the Primitive
*/
readonly name?: string;
/**
* The Material associated with the Primitive
*/
readonly material?: Material;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment