Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy on gltf representing types? #426

Open
Firestar99 opened this issue Jun 26, 2024 · 0 comments
Open

Copy on gltf representing types? #426

Firestar99 opened this issue Jun 26, 2024 · 0 comments

Comments

@Firestar99
Copy link

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 Firestar99 changed the title Copy on json representing types? Copy on gltf representing types? Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant