-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #395 from CorneliusCornbread/main
Arbitrary Extension API
- Loading branch information
Showing
25 changed files
with
502 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,20 @@ | ||
use gltf_derive::Validate; | ||
use serde_derive::{Deserialize, Serialize}; | ||
#[cfg(feature = "extensions")] | ||
use serde_json::{Map, Value}; | ||
|
||
/// A buffer points to binary data representing geometry, animations, or skins. | ||
#[derive(Clone, Debug, Default, Deserialize, Serialize, Validate)] | ||
pub struct Buffer {} | ||
pub struct Buffer { | ||
#[cfg(feature = "extensions")] | ||
#[serde(default, flatten)] | ||
pub others: Map<String, Value>, | ||
} | ||
|
||
/// A view into a buffer generally representing a subset of the buffer. | ||
#[derive(Clone, Debug, Default, Deserialize, Serialize, Validate)] | ||
pub struct View {} | ||
pub struct View { | ||
#[cfg(feature = "extensions")] | ||
#[serde(default, flatten)] | ||
pub others: Map<String, Value>, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,31 @@ | ||
use gltf_derive::Validate; | ||
use serde_derive::{Deserialize, Serialize}; | ||
#[cfg(feature = "extensions")] | ||
use serde_json::{Map, Value}; | ||
|
||
/// A camera's projection. | ||
/// | ||
/// A node can reference a camera to apply a transform to place the camera in the | ||
/// scene. | ||
#[derive(Clone, Debug, Default, Deserialize, Serialize, Validate)] | ||
pub struct Camera {} | ||
pub struct Camera { | ||
#[cfg(feature = "extensions")] | ||
#[serde(default, flatten)] | ||
pub others: Map<String, Value>, | ||
} | ||
|
||
/// Values for an orthographic camera. | ||
#[derive(Clone, Debug, Default, Deserialize, Serialize, Validate)] | ||
pub struct Orthographic {} | ||
pub struct Orthographic { | ||
#[cfg(feature = "extensions")] | ||
#[serde(default, flatten)] | ||
pub others: Map<String, Value>, | ||
} | ||
|
||
/// Values for a perspective camera. | ||
#[derive(Clone, Debug, Default, Deserialize, Serialize, Validate)] | ||
pub struct Perspective {} | ||
pub struct Perspective { | ||
#[cfg(feature = "extensions")] | ||
#[serde(default, flatten)] | ||
pub others: Map<String, Value>, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,12 @@ | ||
use gltf_derive::Validate; | ||
use serde_derive::{Deserialize, Serialize}; | ||
#[cfg(feature = "extensions")] | ||
use serde_json::{Map, Value}; | ||
|
||
/// Image data used to create a texture. | ||
#[derive(Clone, Debug, Default, Deserialize, Serialize, Validate)] | ||
pub struct Image {} | ||
pub struct Image { | ||
#[cfg(feature = "extensions")] | ||
#[serde(default, flatten)] | ||
pub others: Map<String, Value>, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,12 @@ | ||
use gltf_derive::Validate; | ||
use serde_derive::{Deserialize, Serialize}; | ||
#[cfg(feature = "extensions")] | ||
use serde_json::{Map, Value}; | ||
|
||
/// Joints and matrices defining a skin. | ||
#[derive(Clone, Debug, Default, Deserialize, Serialize, Validate)] | ||
pub struct Skin {} | ||
pub struct Skin { | ||
#[cfg(feature = "extensions")] | ||
#[serde(default, flatten)] | ||
pub others: Map<String, Value>, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.