Start TEngine3.0

Start TEngine3.0
This commit is contained in:
ALEXTANG
2023-03-31 17:27:49 +08:00
parent 179765c43c
commit 36353294d6
1032 changed files with 21868 additions and 102407 deletions

View File

@@ -0,0 +1,59 @@
pub struct LoadError {
}
impl std::fmt::Debug for LoadError {
fn fmt(&self, _: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> { Ok(()) }
}
#[allow(dead_code)]
pub struct Vector2 {
pub x:f32,
pub y:f32,
}
impl Vector2 {
pub fn new(__js:&json::JsonValue) -> Result<Vector2, LoadError> {
Ok(Vector2{
x: match __js["x"].as_f32() { Some(__x__) => __x__, None => return Err(LoadError{})},
y: match __js["y"].as_f32() { Some(__x__) => __x__, None => return Err(LoadError{})},
})
}
}
#[allow(dead_code)]
pub struct Vector3 {
pub x:f32,
pub y:f32,
pub z:f32,
}
impl Vector3 {
pub fn new(__js:&json::JsonValue) -> Result<Vector3, LoadError> {
Ok(Vector3{
x: match __js["x"].as_f32() { Some(__x__) => __x__, None => return Err(LoadError{})},
y: match __js["y"].as_f32() { Some(__x__) => __x__, None => return Err(LoadError{})},
z: match __js["z"].as_f32() { Some(__x__) => __x__, None => return Err(LoadError{})},
})
}
}
#[allow(dead_code)]
pub struct Vector4 {
pub x:f32,
pub y:f32,
pub z:f32,
pub w:f32,
}
impl Vector4 {
pub fn new(__js:&json::JsonValue) -> Result<Vector4, LoadError> {
Ok(Vector4{
x: match __js["x"].as_f32() { Some(__x__) => __x__, None => return Err(LoadError{})},
y: match __js["y"].as_f32() { Some(__x__) => __x__, None => return Err(LoadError{})},
z: match __js["z"].as_f32() { Some(__x__) => __x__, None => return Err(LoadError{})},
w: match __js["w"].as_f32() { Some(__x__) => __x__, None => return Err(LoadError{})},
})
}
}