gltf icon indicating copy to clipboard operation
gltf copied to clipboard

Copy on gltf representing types?

Open Firestar99 opened this issue 7 months ago • 0 comments

Is there any particular reason most types representing a gltf type, like Node, Mesh or Primitive, are only clone and not copy? Or may I PR all the copy derives?

If we take Node for example, Copy could be trivially derived, and also does not copy too many bytes as it does not copy the underlying json object:

#[derive(Clone, Debug)]
pub struct Node<'a> {
    document: &'a Document,
    index: usize,
    json: &'a json::scene::Node,
}

Firestar99 avatar Jun 26 '24 11:06 Firestar99