mirror of
https://git.mirrors.martin98.com/https://github.com/syoyo/tinygltf.git
synced 2025-08-12 18:58:59 +08:00
commit
4ebd5a9f82
25
README.md
25
README.md
@ -1,6 +1,6 @@
|
|||||||
# Tiny glTF loader, header only C++ glTF parsing library.
|
# Header only C++ tiny glTF library(loader/saver).
|
||||||
|
|
||||||
`TinyGLTFLoader` is a header only C++ glTF https://github.com/KhronosGroup/glTF parsing library
|
`TinyGLTF` is a header only C++ glTF https://github.com/KhronosGroup/glTF library.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
@ -12,9 +12,10 @@
|
|||||||
|
|
||||||
* Portable C++. C++-03 with STL dependency only.
|
* Portable C++. C++-03 with STL dependency only.
|
||||||
* Moderate parsing time and memory consumption.
|
* Moderate parsing time and memory consumption.
|
||||||
* glTF specification v1.0.0
|
* glTF specification v2.0.0
|
||||||
* [x] ASCII glTF
|
* [x] ASCII glTF
|
||||||
* [x] Binary glTF(https://github.com/KhronosGroup/glTF/tree/master/extensions/Khronos/KHR_binary_glTF)
|
* [x] Binary glTF(https://github.com/KhronosGroup/glTF/tree/master/extensions/Khronos/KHR_binary_glTF)
|
||||||
|
* [x] PBR material description
|
||||||
* Buffers
|
* Buffers
|
||||||
* [x] Parse BASE64 encoded embedded buffer fata(DataURI).
|
* [x] Parse BASE64 encoded embedded buffer fata(DataURI).
|
||||||
* [x] Load `.bin` file.
|
* [x] Load `.bin` file.
|
||||||
@ -29,24 +30,24 @@
|
|||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
* [glview](examples/glview) : Simple glTF geometry viewer.
|
* [glview](examples/glview) : Simple glTF geometry viewer.
|
||||||
* [writer](examples/writer) : Simple glTF writer(serialize `tinygltf::Scene` class)
|
* [writer](examples/writer) : Simple glTF writer(serialize `tinygltf::Model` class)
|
||||||
* [alembic_to_gltf](examples/alembic_to_gltf) : Simple Alembic to glTF converter.
|
* [alembic_to_gltf](examples/alembic_to_gltf) : Simple Alembic to glTF converter.
|
||||||
* [cyhair_to_gltf](examples/cyhair_to_gltf) : Simple CyHair(hair curves) to glTF converter.
|
* [cyhair_to_gltf](examples/cyhair_to_gltf) : Simple CyHair(hair curves) to glTF converter.
|
||||||
|
|
||||||
## TODOs
|
## TODOs
|
||||||
|
|
||||||
* [ ] Write C++ code generator from json schema for robust parsing.
|
* [ ] Write C++ code generator from json schema for robust parsing.
|
||||||
* [ ] Support multiple scenes in `.gltf`
|
* [ ] Write serialization example.
|
||||||
* [ ] Parse `skin`
|
|
||||||
* [ ] Compression/decompression(Open3DGC, etc)
|
* [ ] Compression/decompression(Open3DGC, etc)
|
||||||
* [ ] Support `extensions` and `extras` property
|
* [ ] Support `extensions` and `extras` property
|
||||||
* [ ] HDR image?
|
* [ ] HDR image?
|
||||||
|
* [ ] Write tests for `animation` and `skin`
|
||||||
|
|
||||||
## License
|
## Licenses
|
||||||
|
|
||||||
TinyGLTFLoader is licensed under MIT license.
|
TinyGLTF is licensed under MIT license.
|
||||||
|
|
||||||
TinyGLTFLoader uses the following third party libraries.
|
TinyGLTF uses the following third party libraries.
|
||||||
|
|
||||||
* picojson.h : Copyright 2009-2010 Cybozu Labs, Inc. Copyright 2011-2014 Kazuho Oku
|
* picojson.h : Copyright 2009-2010 Cybozu Labs, Inc. Copyright 2011-2014 Kazuho Oku
|
||||||
* base64 : Copyright (C) 2004-2008 René Nyffenegger
|
* base64 : Copyright (C) 2004-2008 René Nyffenegger
|
||||||
@ -57,6 +58,8 @@ TinyGLTFLoader uses the following third party libraries.
|
|||||||
|
|
||||||
Copy `stb_image.h`, `picojson.h` and `tiny_gltf_loader.h` to your project.
|
Copy `stb_image.h`, `picojson.h` and `tiny_gltf_loader.h` to your project.
|
||||||
|
|
||||||
|
### Loading glTF 2.0 model
|
||||||
|
|
||||||
```
|
```
|
||||||
// Define these only in *one* .cc file.
|
// Define these only in *one* .cc file.
|
||||||
#define TINYGLTF_LOADER_IMPLEMENTATION
|
#define TINYGLTF_LOADER_IMPLEMENTATION
|
||||||
@ -81,6 +84,10 @@ if (!ret) {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Saving gltTF 2.0 model
|
||||||
|
|
||||||
|
T.B.W.
|
||||||
|
|
||||||
## Running tests.
|
## Running tests.
|
||||||
|
|
||||||
### Setup
|
### Setup
|
||||||
|
267
box.gltf
267
box.gltf
@ -1,267 +0,0 @@
|
|||||||
{
|
|
||||||
"accessors": {
|
|
||||||
"accessor_21": {
|
|
||||||
"bufferView": "bufferView_29",
|
|
||||||
"byteOffset": 0,
|
|
||||||
"byteStride": 0,
|
|
||||||
"componentType": 5123,
|
|
||||||
"count": 36,
|
|
||||||
"type": "SCALAR"
|
|
||||||
},
|
|
||||||
"accessor_23": {
|
|
||||||
"bufferView": "bufferView_30",
|
|
||||||
"byteOffset": 0,
|
|
||||||
"byteStride": 12,
|
|
||||||
"componentType": 5126,
|
|
||||||
"count": 24,
|
|
||||||
"max": [
|
|
||||||
0.5,
|
|
||||||
0.5,
|
|
||||||
0.5
|
|
||||||
],
|
|
||||||
"min": [
|
|
||||||
-0.5,
|
|
||||||
-0.5,
|
|
||||||
-0.5
|
|
||||||
],
|
|
||||||
"type": "VEC3"
|
|
||||||
},
|
|
||||||
"accessor_25": {
|
|
||||||
"bufferView": "bufferView_30",
|
|
||||||
"byteOffset": 288,
|
|
||||||
"byteStride": 12,
|
|
||||||
"componentType": 5126,
|
|
||||||
"count": 24,
|
|
||||||
"max": [
|
|
||||||
1,
|
|
||||||
1,
|
|
||||||
1
|
|
||||||
],
|
|
||||||
"min": [
|
|
||||||
-1,
|
|
||||||
-1,
|
|
||||||
-1
|
|
||||||
],
|
|
||||||
"type": "VEC3"
|
|
||||||
},
|
|
||||||
"accessor_27": {
|
|
||||||
"bufferView": "bufferView_30",
|
|
||||||
"byteOffset": 576,
|
|
||||||
"byteStride": 8,
|
|
||||||
"componentType": 5126,
|
|
||||||
"count": 24,
|
|
||||||
"max": [
|
|
||||||
1,
|
|
||||||
1
|
|
||||||
],
|
|
||||||
"min": [
|
|
||||||
0,
|
|
||||||
0
|
|
||||||
],
|
|
||||||
"type": "VEC2"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"animations": {},
|
|
||||||
"asset": {
|
|
||||||
"generator": "collada2gltf@ceec062e3d5793f2f249f53cbd843aee382ad40b",
|
|
||||||
"premultipliedAlpha": true,
|
|
||||||
"profile": {
|
|
||||||
"api": "WebGL",
|
|
||||||
"version": "1.0.2"
|
|
||||||
},
|
|
||||||
"version": 1
|
|
||||||
},
|
|
||||||
"bufferViews": {
|
|
||||||
"bufferView_29": {
|
|
||||||
"buffer": "box",
|
|
||||||
"byteLength": 72,
|
|
||||||
"byteOffset": 0,
|
|
||||||
"target": 34963
|
|
||||||
},
|
|
||||||
"bufferView_30": {
|
|
||||||
"buffer": "box",
|
|
||||||
"byteLength": 768,
|
|
||||||
"byteOffset": 72,
|
|
||||||
"target": 34962
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"buffers": {
|
|
||||||
"box": {
|
|
||||||
"byteLength": 840,
|
|
||||||
"type": "arraybuffer",
|
|
||||||
"uri": "data:application/octet-stream;base64,AAABAAIAAwACAAEABAAFAAYABwAGAAUACAAJAAoACwAKAAkADAANAA4ADwAOAA0AEAARABIAEwASABEAFAAVABYAFwAWABUAAAAAvwAAAL8AAAA/AAAAPwAAAL8AAAA/AAAAvwAAAD8AAAA/AAAAPwAAAD8AAAA/AAAAPwAAAL8AAAA/AAAAvwAAAL8AAAA/AAAAPwAAAL8AAAC/AAAAvwAAAL8AAAC/AAAAPwAAAD8AAAA/AAAAPwAAAL8AAAA/AAAAPwAAAD8AAAC/AAAAPwAAAL8AAAC/AAAAvwAAAD8AAAA/AAAAPwAAAD8AAAA/AAAAvwAAAD8AAAC/AAAAPwAAAD8AAAC/AAAAvwAAAL8AAAA/AAAAvwAAAD8AAAA/AAAAvwAAAL8AAAC/AAAAvwAAAD8AAAC/AAAAvwAAAL8AAAC/AAAAvwAAAD8AAAC/AAAAPwAAAL8AAAC/AAAAPwAAAD8AAAC/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAgL8AAAAAAAAAAAAAgL8AAAAAAAAAAAAAgL8AAAAAAAAAAAAAgL8AAAAAAACAPwAAAAAAAAAAAACAPwAAAAAAAAAAAACAPwAAAAAAAAAAAACAPwAAAAAAAAAAAAAAAAAAgD8AAAAAAAAAAAAAgD8AAAAAAAAAAAAAgD8AAAAAAAAAAAAAgD8AAAAAAACAvwAAAAAAAAAAAACAvwAAAAAAAAAAAACAvwAAAAAAAAAAAACAvwAAAAAAAAAAAAAAAAAAAAAAAIC/AAAAAAAAAAAAAIC/AAAAAAAAAAAAAIC/AAAAAAAAAAAAAIC/AACAPgAAAAAAAIA+oKqqPgAAAD8AAAAAAAAAP6Cqqj4AAIA+oKqqPgAAAACgqqo+AACAPrCqKj8AAAAAsKoqPwAAAD+gqqo+AACAPqCqqj4AAAA/sKoqPwAAgD6wqio/AABAP6Cqqj4AAAA/oKqqPgAAQD+wqio/AAAAP7CqKj8AAIA/oKqqPgAAQD+gqqo+AACAP7CqKj8AAEA/sKoqPwAAgD4AAIA/AAAAPwAAgD8AAIA+sKoqPwAAAD+wqio/"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"materials": {
|
|
||||||
"Effect-Red": {
|
|
||||||
"name": "Red",
|
|
||||||
"technique": "technique0",
|
|
||||||
"values": {
|
|
||||||
"diffuse": [
|
|
||||||
0.8,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
1
|
|
||||||
],
|
|
||||||
"shininess": 256,
|
|
||||||
"specular": [
|
|
||||||
0.2,
|
|
||||||
0.2,
|
|
||||||
0.2,
|
|
||||||
1
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"meshes": {
|
|
||||||
"Geometry-mesh002": {
|
|
||||||
"name": "Mesh",
|
|
||||||
"primitives": [
|
|
||||||
{
|
|
||||||
"attributes": {
|
|
||||||
"NORMAL": "accessor_25",
|
|
||||||
"POSITION": "accessor_23",
|
|
||||||
"TEXCOORD_0": "accessor_27"
|
|
||||||
},
|
|
||||||
"indices": "accessor_21",
|
|
||||||
"material": "Effect-Red",
|
|
||||||
"mode": 4
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nodes": {
|
|
||||||
"Geometry-mesh002Node": {
|
|
||||||
"children": [],
|
|
||||||
"matrix": [
|
|
||||||
1,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
1,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
1,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
1
|
|
||||||
],
|
|
||||||
"meshes": [
|
|
||||||
"Geometry-mesh002"
|
|
||||||
],
|
|
||||||
"name": "Mesh"
|
|
||||||
},
|
|
||||||
"node_1": {
|
|
||||||
"children": [
|
|
||||||
"Geometry-mesh002Node"
|
|
||||||
],
|
|
||||||
"matrix": [
|
|
||||||
1,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
-1,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
1,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
1
|
|
||||||
],
|
|
||||||
"name": "Y_UP_Transform"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"programs": {
|
|
||||||
"program_0": {
|
|
||||||
"attributes": [
|
|
||||||
"a_normal",
|
|
||||||
"a_position"
|
|
||||||
],
|
|
||||||
"fragmentShader": "box0FS",
|
|
||||||
"vertexShader": "box0VS"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"scene": "defaultScene",
|
|
||||||
"scenes": {
|
|
||||||
"defaultScene": {
|
|
||||||
"nodes": [
|
|
||||||
"node_1"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"shaders": {
|
|
||||||
"box0FS": {
|
|
||||||
"type": 35632,
|
|
||||||
"uri": "data:text/plain;base64,cHJlY2lzaW9uIGhpZ2hwIGZsb2F0Owp2YXJ5aW5nIHZlYzMgdl9ub3JtYWw7CnVuaWZvcm0gdmVjNCB1X2RpZmZ1c2U7CnVuaWZvcm0gdmVjNCB1X3NwZWN1bGFyOwp1bmlmb3JtIGZsb2F0IHVfc2hpbmluZXNzOwp2b2lkIG1haW4odm9pZCkgewp2ZWMzIG5vcm1hbCA9IG5vcm1hbGl6ZSh2X25vcm1hbCk7CnZlYzQgY29sb3IgPSB2ZWM0KDAuLCAwLiwgMC4sIDAuKTsKdmVjNCBkaWZmdXNlID0gdmVjNCgwLiwgMC4sIDAuLCAxLik7CnZlYzQgc3BlY3VsYXI7CmRpZmZ1c2UgPSB1X2RpZmZ1c2U7CnNwZWN1bGFyID0gdV9zcGVjdWxhcjsKZGlmZnVzZS54eXogKj0gbWF4KGRvdChub3JtYWwsdmVjMygwLiwwLiwxLikpLCAwLik7CmNvbG9yLnh5eiArPSBkaWZmdXNlLnh5ejsKY29sb3IgPSB2ZWM0KGNvbG9yLnJnYiAqIGRpZmZ1c2UuYSwgZGlmZnVzZS5hKTsKZ2xfRnJhZ0NvbG9yID0gY29sb3I7Cn0K"
|
|
||||||
},
|
|
||||||
"box0VS": {
|
|
||||||
"type": 35633,
|
|
||||||
"uri": "data:text/plain;base64,cHJlY2lzaW9uIGhpZ2hwIGZsb2F0OwphdHRyaWJ1dGUgdmVjMyBhX3Bvc2l0aW9uOwphdHRyaWJ1dGUgdmVjMyBhX25vcm1hbDsKdmFyeWluZyB2ZWMzIHZfbm9ybWFsOwp1bmlmb3JtIG1hdDMgdV9ub3JtYWxNYXRyaXg7CnVuaWZvcm0gbWF0NCB1X21vZGVsVmlld01hdHJpeDsKdW5pZm9ybSBtYXQ0IHVfcHJvamVjdGlvbk1hdHJpeDsKdm9pZCBtYWluKHZvaWQpIHsKdmVjNCBwb3MgPSB1X21vZGVsVmlld01hdHJpeCAqIHZlYzQoYV9wb3NpdGlvbiwxLjApOwp2X25vcm1hbCA9IHVfbm9ybWFsTWF0cml4ICogYV9ub3JtYWw7CmdsX1Bvc2l0aW9uID0gdV9wcm9qZWN0aW9uTWF0cml4ICogcG9zOwp9Cg=="
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"skins": {},
|
|
||||||
"techniques": {
|
|
||||||
"technique0": {
|
|
||||||
"attributes": {
|
|
||||||
"a_normal": "normal",
|
|
||||||
"a_position": "position"
|
|
||||||
},
|
|
||||||
"parameters": {
|
|
||||||
"diffuse": {
|
|
||||||
"type": 35666
|
|
||||||
},
|
|
||||||
"modelViewMatrix": {
|
|
||||||
"semantic": "MODELVIEW",
|
|
||||||
"type": 35676
|
|
||||||
},
|
|
||||||
"normal": {
|
|
||||||
"semantic": "NORMAL",
|
|
||||||
"type": 35665
|
|
||||||
},
|
|
||||||
"normalMatrix": {
|
|
||||||
"semantic": "MODELVIEWINVERSETRANSPOSE",
|
|
||||||
"type": 35675
|
|
||||||
},
|
|
||||||
"position": {
|
|
||||||
"semantic": "POSITION",
|
|
||||||
"type": 35665
|
|
||||||
},
|
|
||||||
"projectionMatrix": {
|
|
||||||
"semantic": "PROJECTION",
|
|
||||||
"type": 35676
|
|
||||||
},
|
|
||||||
"shininess": {
|
|
||||||
"type": 5126
|
|
||||||
},
|
|
||||||
"specular": {
|
|
||||||
"type": 35666
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": "program_0",
|
|
||||||
"states": {
|
|
||||||
"enable": [
|
|
||||||
2929,
|
|
||||||
2884
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"uniforms": {
|
|
||||||
"u_diffuse": "diffuse",
|
|
||||||
"u_modelViewMatrix": "modelViewMatrix",
|
|
||||||
"u_normalMatrix": "normalMatrix",
|
|
||||||
"u_projectionMatrix": "projectionMatrix",
|
|
||||||
"u_shininess": "shininess",
|
|
||||||
"u_specular": "specular"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -62,15 +62,6 @@ static std::string PrintType(int ty) {
|
|||||||
return "**UNKNOWN**";
|
return "**UNKNOWN**";
|
||||||
}
|
}
|
||||||
|
|
||||||
static std::string PrintShaderType(int ty) {
|
|
||||||
if (ty == TINYGLTF_SHADER_TYPE_VERTEX_SHADER) {
|
|
||||||
return "VERTEX_SHADER";
|
|
||||||
} else if (ty == TINYGLTF_SHADER_TYPE_FRAGMENT_SHADER) {
|
|
||||||
return "FRAGMENT_SHADER";
|
|
||||||
}
|
|
||||||
return "**UNKNOWN**";
|
|
||||||
}
|
|
||||||
|
|
||||||
static std::string PrintComponentType(int ty) {
|
static std::string PrintComponentType(int ty) {
|
||||||
if (ty == TINYGLTF_COMPONENT_TYPE_BYTE) {
|
if (ty == TINYGLTF_COMPONENT_TYPE_BYTE) {
|
||||||
return "BYTE";
|
return "BYTE";
|
||||||
@ -93,6 +84,7 @@ static std::string PrintComponentType(int ty) {
|
|||||||
return "**UNKNOWN**";
|
return "**UNKNOWN**";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
static std::string PrintParameterType(int ty) {
|
static std::string PrintParameterType(int ty) {
|
||||||
if (ty == TINYGLTF_PARAMETER_TYPE_BYTE) {
|
if (ty == TINYGLTF_PARAMETER_TYPE_BYTE) {
|
||||||
return "BYTE";
|
return "BYTE";
|
||||||
@ -140,6 +132,7 @@ static std::string PrintParameterType(int ty) {
|
|||||||
|
|
||||||
return "**UNKNOWN**";
|
return "**UNKNOWN**";
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static std::string PrintWrapMode(int mode) {
|
static std::string PrintWrapMode(int mode) {
|
||||||
if (mode == TINYGLTF_TEXTURE_WRAP_RPEAT) {
|
if (mode == TINYGLTF_TEXTURE_WRAP_RPEAT) {
|
||||||
@ -170,7 +163,7 @@ static std::string PrintFilterMode(int mode) {
|
|||||||
return "**UNKNOWN**";
|
return "**UNKNOWN**";
|
||||||
}
|
}
|
||||||
|
|
||||||
static std::string PrintFloatArray(const std::vector<double> &arr) {
|
static std::string PrintIntArray(const std::vector<int> &arr) {
|
||||||
if (arr.size() == 0) {
|
if (arr.size() == 0) {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
@ -185,7 +178,7 @@ static std::string PrintFloatArray(const std::vector<double> &arr) {
|
|||||||
return ss.str();
|
return ss.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
static std::string PrintStringArray(const std::vector<std::string> &arr) {
|
static std::string PrintFloatArray(const std::vector<double> &arr) {
|
||||||
if (arr.size() == 0) {
|
if (arr.size() == 0) {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
@ -244,6 +237,7 @@ static std::string PrintValue(const std::string& name, const tinygltf::Value &va
|
|||||||
static void DumpNode(const tinygltf::Node &node, int indent) {
|
static void DumpNode(const tinygltf::Node &node, int indent) {
|
||||||
std::cout << Indent(indent) << "name : " << node.name << std::endl;
|
std::cout << Indent(indent) << "name : " << node.name << std::endl;
|
||||||
std::cout << Indent(indent) << "camera : " << node.camera << std::endl;
|
std::cout << Indent(indent) << "camera : " << node.camera << std::endl;
|
||||||
|
std::cout << Indent(indent) << "mesh : " << node.mesh << std::endl;
|
||||||
if (!node.rotation.empty()) {
|
if (!node.rotation.empty()) {
|
||||||
std::cout << Indent(indent)
|
std::cout << Indent(indent)
|
||||||
<< "rotation : " << PrintFloatArray(node.rotation)
|
<< "rotation : " << PrintFloatArray(node.rotation)
|
||||||
@ -265,16 +259,13 @@ static void DumpNode(const tinygltf::Node &node, int indent) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::cout << Indent(indent)
|
std::cout << Indent(indent)
|
||||||
<< "meshes : " << PrintStringArray(node.meshes) << std::endl;
|
<< "children : " << PrintIntArray(node.children) << std::endl;
|
||||||
|
|
||||||
std::cout << Indent(indent)
|
|
||||||
<< "children : " << PrintStringArray(node.children) << std::endl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void DumpStringMap(const std::map<std::string, std::string> &map,
|
static void DumpStringIntMap(const std::map<std::string, int> &m,
|
||||||
int indent) {
|
int indent) {
|
||||||
std::map<std::string, std::string>::const_iterator it(map.begin());
|
std::map<std::string, int>::const_iterator it(m.begin());
|
||||||
std::map<std::string, std::string>::const_iterator itEnd(map.end());
|
std::map<std::string, int>::const_iterator itEnd(m.end());
|
||||||
for (; it != itEnd; it++) {
|
for (; it != itEnd; it++) {
|
||||||
std::cout << Indent(indent) << it->first << ": " << it->second << std::endl;
|
std::cout << Indent(indent) << it->first << ": " << it->second << std::endl;
|
||||||
}
|
}
|
||||||
@ -289,110 +280,79 @@ static void DumpPrimitive(const tinygltf::Primitive &primitive, int indent) {
|
|||||||
std::cout << Indent(indent)
|
std::cout << Indent(indent)
|
||||||
<< "attributes(items=" << primitive.attributes.size() << ")"
|
<< "attributes(items=" << primitive.attributes.size() << ")"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
DumpStringMap(primitive.attributes, indent + 1);
|
DumpStringIntMap(primitive.attributes, indent + 1);
|
||||||
|
|
||||||
std::cout << Indent(indent)
|
std::cout << Indent(indent)
|
||||||
<< "extras :" << std::endl
|
<< "extras :" << std::endl
|
||||||
<< PrintValue("extras", primitive.extras, indent+1) << std::endl;
|
<< PrintValue("extras", primitive.extras, indent+1) << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void DumpTechniqueParameter(const tinygltf::TechniqueParameter ¶m,
|
static void Dump(const tinygltf::Model &model) {
|
||||||
int indent) {
|
|
||||||
std::cout << Indent(indent) << "count : " << param.count << std::endl;
|
|
||||||
std::cout << Indent(indent) << "node : " << param.node << std::endl;
|
|
||||||
std::cout << Indent(indent) << "semantic : " << param.semantic << std::endl;
|
|
||||||
std::cout << Indent(indent) << "type : " << PrintParameterType(param.type)
|
|
||||||
<< std::endl;
|
|
||||||
std::cout << Indent(indent)
|
|
||||||
<< "value : " << PrintParameterValue(param.value) << std::endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void Dump(const tinygltf::Scene &scene) {
|
|
||||||
std::cout << "=== Dump glTF ===" << std::endl;
|
std::cout << "=== Dump glTF ===" << std::endl;
|
||||||
std::cout << "asset.generator : " << scene.asset.generator
|
std::cout << "asset.copyright : " << model.asset.copyright
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
std::cout << "asset.premultipliedAlpha : " << scene.asset.premultipliedAlpha
|
std::cout << "asset.generator : " << model.asset.generator
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
std::cout << "asset.version : " << scene.asset.version
|
std::cout << "asset.version : " << model.asset.version
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
std::cout << "asset.profile.api : " << scene.asset.profile_api
|
std::cout << "asset.minVersion : " << model.asset.minVersion
|
||||||
<< std::endl;
|
|
||||||
std::cout << "asset.profile.version : " << scene.asset.profile_version
|
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
std::cout << std::endl;
|
std::cout << std::endl;
|
||||||
|
|
||||||
std::cout << "=== Dump scene ===" << std::endl;
|
std::cout << "=== Dump scene ===" << std::endl;
|
||||||
std::cout << "defaultScene: " << scene.defaultScene << std::endl;
|
std::cout << "defaultScene: " << model.defaultScene << std::endl;
|
||||||
|
|
||||||
{
|
{
|
||||||
std::map<std::string, std::vector<std::string> >::const_iterator it(
|
std::cout << "scenes(items=" << model.scenes.size() << ")" << std::endl;
|
||||||
scene.scenes.begin());
|
for (size_t i = 0; i < model.scenes.size(); i++) {
|
||||||
std::map<std::string, std::vector<std::string> >::const_iterator itEnd(
|
std::cout << Indent(1) << "scene[" << i << "] name : " << model.scenes[i].name << std::endl;
|
||||||
scene.scenes.end());
|
|
||||||
std::cout << "scenes(items=" << scene.scenes.size() << ")" << std::endl;
|
|
||||||
for (; it != itEnd; it++) {
|
|
||||||
std::cout << Indent(1) << "name : " << it->first << std::endl;
|
|
||||||
std::cout << Indent(2) << "nodes : [ ";
|
|
||||||
for (size_t i = 0; i < it->second.size(); i++) {
|
|
||||||
std::cout << it->second[i]
|
|
||||||
<< ((i != (it->second.size() - 1)) ? ", " : "");
|
|
||||||
}
|
|
||||||
std::cout << " ] " << std::endl;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
std::map<std::string, tinygltf::Mesh>::const_iterator it(
|
std::cout << "meshes(item=" << model.meshes.size() << ")" << std::endl;
|
||||||
scene.meshes.begin());
|
for (size_t i = 0; i < model.meshes.size(); i++) {
|
||||||
std::map<std::string, tinygltf::Mesh>::const_iterator itEnd(
|
std::cout << Indent(1) << "name : " << model.meshes[i].name << std::endl;
|
||||||
scene.meshes.end());
|
|
||||||
std::cout << "meshes(item=" << scene.meshes.size() << ")" << std::endl;
|
|
||||||
for (; it != itEnd; it++) {
|
|
||||||
std::cout << Indent(1) << "name : " << it->second.name << std::endl;
|
|
||||||
std::cout << Indent(1)
|
std::cout << Indent(1)
|
||||||
<< "primitives(items=" << it->second.primitives.size()
|
<< "primitives(items=" << model.meshes[i].primitives.size()
|
||||||
<< "): " << std::endl;
|
<< "): " << std::endl;
|
||||||
|
|
||||||
for (size_t i = 0; i < it->second.primitives.size(); i++) {
|
for (size_t k = 0; k < model.meshes[i].primitives.size(); k++) {
|
||||||
DumpPrimitive(it->second.primitives[i], 2);
|
DumpPrimitive(model.meshes[i].primitives[k], 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
std::map<std::string, tinygltf::Accessor>::const_iterator it(
|
for (size_t i = 0; i < model.accessors.size(); i++) {
|
||||||
scene.accessors.begin());
|
const tinygltf::Accessor &accessor = model.accessors[i];
|
||||||
std::map<std::string, tinygltf::Accessor>::const_iterator itEnd(
|
std::cout << Indent(1) << "name : " << accessor.name << std::endl;
|
||||||
scene.accessors.end());
|
std::cout << Indent(2) << "bufferView : " << accessor.bufferView
|
||||||
std::cout << "accessors(items=" << scene.accessors.size() << ")"
|
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
for (; it != itEnd; it++) {
|
std::cout << Indent(2) << "byteOffset : " << accessor.byteOffset
|
||||||
std::cout << Indent(1) << "name : " << it->first << std::endl;
|
|
||||||
std::cout << Indent(2) << "bufferView : " << it->second.bufferView
|
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
std::cout << Indent(2) << "byteOffset : " << it->second.byteOffset
|
std::cout << Indent(2) << "byteStride : " << accessor.byteStride
|
||||||
<< std::endl;
|
|
||||||
std::cout << Indent(2) << "byteStride : " << it->second.byteStride
|
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
std::cout << Indent(2) << "componentType: "
|
std::cout << Indent(2) << "componentType: "
|
||||||
<< PrintComponentType(it->second.componentType) << "("
|
<< PrintComponentType(accessor.componentType) << "("
|
||||||
<< it->second.componentType << ")" << std::endl;
|
<< accessor.componentType << ")" << std::endl;
|
||||||
std::cout << Indent(2) << "count : " << it->second.count
|
std::cout << Indent(2) << "count : " << accessor.count
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
std::cout << Indent(2) << "type : " << PrintType(it->second.type)
|
std::cout << Indent(2) << "type : " << PrintType(accessor.type)
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
if (!it->second.minValues.empty()) {
|
if (!accessor.minValues.empty()) {
|
||||||
std::cout << Indent(2) << "min : [";
|
std::cout << Indent(2) << "min : [";
|
||||||
for (size_t i = 0; i < it->second.minValues.size(); i++) {
|
for (size_t k = 0; k < accessor.minValues.size(); k++) {
|
||||||
std::cout << it->second.minValues[i]
|
std::cout << accessor.minValues[k]
|
||||||
<< ((i != it->second.minValues.size() - 1) ? ", " : "");
|
<< ((i != accessor.minValues.size() - 1) ? ", " : "");
|
||||||
}
|
}
|
||||||
std::cout << "]" << std::endl;
|
std::cout << "]" << std::endl;
|
||||||
}
|
}
|
||||||
if (!it->second.maxValues.empty()) {
|
if (!accessor.maxValues.empty()) {
|
||||||
std::cout << Indent(2) << "max : [";
|
std::cout << Indent(2) << "max : [";
|
||||||
for (size_t i = 0; i < it->second.maxValues.size(); i++) {
|
for (size_t k = 0; k < accessor.maxValues.size(); k++) {
|
||||||
std::cout << it->second.maxValues[i]
|
std::cout << accessor.maxValues[k]
|
||||||
<< ((i != it->second.maxValues.size() - 1) ? ", " : "");
|
<< ((i != accessor.maxValues.size() - 1) ? ", " : "");
|
||||||
}
|
}
|
||||||
std::cout << "]" << std::endl;
|
std::cout << "]" << std::endl;
|
||||||
}
|
}
|
||||||
@ -400,113 +360,82 @@ static void Dump(const tinygltf::Scene &scene) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
std::map<std::string, tinygltf::Animation>::const_iterator it(
|
std::cout << "animations(items=" << model.animations.size() << ")"
|
||||||
scene.animations.begin());
|
|
||||||
std::map<std::string, tinygltf::Animation>::const_iterator itEnd(
|
|
||||||
scene.animations.end());
|
|
||||||
std::cout << "animations(items=" << scene.animations.size() << ")"
|
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
for (; it != itEnd; it++) {
|
for (size_t i = 0; i < model.animations.size(); i++) {
|
||||||
std::cout << Indent(1) << "name : " << it->first << std::endl;
|
const tinygltf::Animation &animation = model.animations[i];
|
||||||
|
std::cout << Indent(1) << "name : " << animation.name << std::endl;
|
||||||
|
|
||||||
std::cout << Indent(1) << "channels : [ " << std::endl;
|
std::cout << Indent(1) << "channels : [ " << std::endl;
|
||||||
for (size_t i = 0; i < it->second.channels.size(); i++) {
|
for (size_t j = 0; i < animation.channels.size(); i++) {
|
||||||
std::cout << Indent(2)
|
std::cout << Indent(2)
|
||||||
<< "sampler : " << it->second.channels[i].sampler
|
<< "sampler : " << animation.channels[j].sampler
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
std::cout << Indent(2)
|
std::cout << Indent(2)
|
||||||
<< "target.id : " << it->second.channels[i].target_id
|
<< "target.id : " << animation.channels[j].target_node
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
std::cout << Indent(2)
|
std::cout << Indent(2)
|
||||||
<< "target.path : " << it->second.channels[i].target_path
|
<< "target.path : " << animation.channels[j].target_path
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
std::cout << ((i != (it->second.channels.size() - 1)) ? " , " : "");
|
std::cout << ((i != (animation.channels.size() - 1)) ? " , " : "");
|
||||||
}
|
}
|
||||||
std::cout << " ]" << std::endl;
|
std::cout << " ]" << std::endl;
|
||||||
|
|
||||||
std::map<std::string, tinygltf::AnimationSampler>::const_iterator
|
std::cout << Indent(1) << "samplers(items=" << animation.samplers.size()
|
||||||
samplerIt(it->second.samplers.begin());
|
|
||||||
std::map<std::string, tinygltf::AnimationSampler>::const_iterator
|
|
||||||
samplerItEnd(it->second.samplers.end());
|
|
||||||
std::cout << Indent(1) << "samplers(items=" << it->second.samplers.size()
|
|
||||||
<< ")" << std::endl;
|
<< ")" << std::endl;
|
||||||
for (; samplerIt != samplerItEnd; samplerIt++) {
|
for (size_t j = 0; j < animation.samplers.size(); j++) {
|
||||||
std::cout << Indent(1) << "name : " << samplerIt->first
|
const tinygltf::AnimationSampler &sampler = animation.samplers[j];
|
||||||
<< std::endl;
|
std::cout << Indent(2) << "input : " << sampler.input
|
||||||
std::cout << Indent(2) << "input : " << samplerIt->second.input
|
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
std::cout << Indent(2)
|
std::cout << Indent(2)
|
||||||
<< "interpolation : " << samplerIt->second.interpolation
|
<< "interpolation : " << sampler.interpolation
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
std::cout << Indent(2) << "output : " << samplerIt->second.output
|
std::cout << Indent(2) << "output : " << sampler.output
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
|
||||||
std::cout << Indent(1)
|
|
||||||
<< "parameters(items=" << it->second.parameters.size() << ")"
|
|
||||||
<< std::endl;
|
|
||||||
tinygltf::ParameterMap::const_iterator p(it->second.parameters.begin());
|
|
||||||
tinygltf::ParameterMap::const_iterator pEnd(
|
|
||||||
it->second.parameters.end());
|
|
||||||
for (; p != pEnd; p++) {
|
|
||||||
std::cout << Indent(2) << p->first << ": "
|
|
||||||
<< PrintParameterValue(p->second) << std::endl;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
std::map<std::string, tinygltf::BufferView>::const_iterator it(
|
std::cout << "bufferViews(items=" << model.bufferViews.size() << ")"
|
||||||
scene.bufferViews.begin());
|
|
||||||
std::map<std::string, tinygltf::BufferView>::const_iterator itEnd(
|
|
||||||
scene.bufferViews.end());
|
|
||||||
std::cout << "bufferViews(items=" << scene.bufferViews.size() << ")"
|
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
for (; it != itEnd; it++) {
|
for (size_t i = 0; i < model.bufferViews.size(); i++) {
|
||||||
std::cout << Indent(1) << "name : " << it->first << std::endl;
|
const tinygltf::BufferView &bufferView = model.bufferViews[i];
|
||||||
std::cout << Indent(2) << "buffer : " << it->second.buffer
|
std::cout << Indent(1) << "name : " << bufferView.name << std::endl;
|
||||||
|
std::cout << Indent(2) << "buffer : " << bufferView.buffer
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
std::cout << Indent(2) << "byteLength : " << it->second.byteLength
|
std::cout << Indent(2) << "byteLength : " << bufferView.byteLength
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
std::cout << Indent(2) << "byteOffset : " << it->second.byteOffset
|
std::cout << Indent(2) << "byteOffset : " << bufferView.byteOffset
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
std::cout << Indent(2)
|
std::cout << Indent(2)
|
||||||
<< "target : " << PrintTarget(it->second.target)
|
<< "target : " << PrintTarget(bufferView.target)
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
std::map<std::string, tinygltf::Buffer>::const_iterator it(
|
std::cout << "buffers(items=" << model.buffers.size() << ")" << std::endl;
|
||||||
scene.buffers.begin());
|
for (size_t i = 0; i < model.buffers.size(); i++) {
|
||||||
std::map<std::string, tinygltf::Buffer>::const_iterator itEnd(
|
const tinygltf::Buffer &buffer = model.buffers[i];
|
||||||
scene.buffers.end());
|
std::cout << Indent(1) << "name : " << buffer.name << std::endl;
|
||||||
std::cout << "buffers(items=" << scene.buffers.size() << ")" << std::endl;
|
std::cout << Indent(2) << "byteLength : " << buffer.data.size()
|
||||||
for (; it != itEnd; it++) {
|
|
||||||
std::cout << Indent(1) << "name : " << it->first << std::endl;
|
|
||||||
std::cout << Indent(2) << "byteLength : " << it->second.data.size()
|
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
std::map<std::string, tinygltf::Material>::const_iterator it(
|
std::cout << "materials(items=" << model.materials.size() << ")"
|
||||||
scene.materials.begin());
|
|
||||||
std::map<std::string, tinygltf::Material>::const_iterator itEnd(
|
|
||||||
scene.materials.end());
|
|
||||||
std::cout << "materials(items=" << scene.materials.size() << ")"
|
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
for (; it != itEnd; it++) {
|
for (size_t i = 0; i < model.materials.size(); i++) {
|
||||||
std::cout << Indent(1) << "name : " << it->first << std::endl;
|
const tinygltf::Material &material = model.materials[i];
|
||||||
std::cout << Indent(1) << "technique : " << it->second.technique
|
std::cout << Indent(1) << "name : " << material.name << std::endl;
|
||||||
<< std::endl;
|
std::cout << Indent(1) << "values(items=" << material.values.size()
|
||||||
std::cout << Indent(1) << "values(items=" << it->second.values.size()
|
|
||||||
<< ")" << std::endl;
|
<< ")" << std::endl;
|
||||||
|
|
||||||
tinygltf::ParameterMap::const_iterator p(it->second.values.begin());
|
tinygltf::ParameterMap::const_iterator p(material.values.begin());
|
||||||
tinygltf::ParameterMap::const_iterator pEnd(it->second.values.end());
|
tinygltf::ParameterMap::const_iterator pEnd(material.values.end());
|
||||||
for (; p != pEnd; p++) {
|
for (; p != pEnd; p++) {
|
||||||
std::cout << Indent(2) << p->first << ": "
|
std::cout << Indent(2) << p->first << ": "
|
||||||
<< PrintParameterValue(p->second) << std::endl;
|
<< PrintParameterValue(p->second) << std::endl;
|
||||||
@ -515,179 +444,57 @@ static void Dump(const tinygltf::Scene &scene) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
std::map<std::string, tinygltf::Node>::const_iterator it(
|
std::cout << "nodes(items=" << model.nodes.size() << ")" << std::endl;
|
||||||
scene.nodes.begin());
|
for (size_t i = 0; i < model.nodes.size(); i++) {
|
||||||
std::map<std::string, tinygltf::Node>::const_iterator itEnd(
|
const tinygltf::Node &node = model.nodes[i];
|
||||||
scene.nodes.end());
|
std::cout << Indent(1) << "name : " << node.name << std::endl;
|
||||||
std::cout << "nodes(items=" << scene.nodes.size() << ")" << std::endl;
|
|
||||||
for (; it != itEnd; it++) {
|
|
||||||
std::cout << Indent(1) << "name : " << it->first << std::endl;
|
|
||||||
|
|
||||||
DumpNode(it->second, 2);
|
DumpNode(node, 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
std::map<std::string, tinygltf::Image>::const_iterator it(
|
std::cout << "images(items=" << model.images.size() << ")" << std::endl;
|
||||||
scene.images.begin());
|
for (size_t i = 0; i < model.images.size(); i++) {
|
||||||
std::map<std::string, tinygltf::Image>::const_iterator itEnd(
|
const tinygltf::Image &image = model.images[i];
|
||||||
scene.images.end());
|
std::cout << Indent(1) << "name : " << image.name << std::endl;
|
||||||
std::cout << "images(items=" << scene.images.size() << ")" << std::endl;
|
|
||||||
for (; it != itEnd; it++) {
|
|
||||||
std::cout << Indent(1) << "name : " << it->first << std::endl;
|
|
||||||
|
|
||||||
std::cout << Indent(2) << "width : " << it->second.width << std::endl;
|
std::cout << Indent(2) << "width : " << image.width << std::endl;
|
||||||
std::cout << Indent(2) << "height : " << it->second.height
|
std::cout << Indent(2) << "height : " << image.height
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
std::cout << Indent(2) << "component : " << it->second.component
|
std::cout << Indent(2) << "component : " << image.component
|
||||||
<< std::endl;
|
|
||||||
std::cout << Indent(2) << "name : " << it->second.name << std::endl;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
std::map<std::string, tinygltf::Texture>::const_iterator it(
|
|
||||||
scene.textures.begin());
|
|
||||||
std::map<std::string, tinygltf::Texture>::const_iterator itEnd(
|
|
||||||
scene.textures.end());
|
|
||||||
std::cout << "textures(items=" << scene.textures.size() << ")" << std::endl;
|
|
||||||
for (; it != itEnd; it++) {
|
|
||||||
std::cout << Indent(1) << "name : " << it->first << std::endl;
|
|
||||||
std::cout << Indent(1) << "format : " << it->second.format
|
|
||||||
<< std::endl;
|
|
||||||
std::cout << Indent(1) << "internalFormat : " << it->second.internalFormat
|
|
||||||
<< std::endl;
|
|
||||||
std::cout << Indent(1) << "sampler : " << it->second.sampler
|
|
||||||
<< std::endl;
|
|
||||||
std::cout << Indent(1) << "source : " << it->second.source
|
|
||||||
<< std::endl;
|
|
||||||
std::cout << Indent(1) << "target : " << it->second.target
|
|
||||||
<< std::endl;
|
|
||||||
std::cout << Indent(1) << "type : " << it->second.type
|
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
std::map<std::string, tinygltf::Shader>::const_iterator it(
|
std::cout << "textures(items=" << model.textures.size() << ")" << std::endl;
|
||||||
scene.shaders.begin());
|
for (size_t i = 0; i < model.textures.size(); i++) {
|
||||||
std::map<std::string, tinygltf::Shader>::const_iterator itEnd(
|
const tinygltf::Texture &texture = model.textures[i];
|
||||||
scene.shaders.end());
|
std::cout << Indent(1) << "sampler : " << texture.sampler
|
||||||
|
|
||||||
std::cout << "shaders(items=" << scene.shaders.size() << ")" << std::endl;
|
|
||||||
for (; it != itEnd; it++) {
|
|
||||||
std::cout << Indent(1) << "name (id) : " << it->first << std::endl;
|
|
||||||
std::cout << Indent(2)
|
|
||||||
<< "type : " << PrintShaderType(it->second.type)
|
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
|
std::cout << Indent(1) << "source : " << texture.source
|
||||||
std::cout << Indent(2) << "name (json) : " << it->second.name
|
|
||||||
<< std::endl;
|
|
||||||
|
|
||||||
// Indent shader source nicely.
|
|
||||||
std::string shader_source(Indent(3));
|
|
||||||
shader_source.resize(shader_source.size() + it->second.source.size());
|
|
||||||
|
|
||||||
std::vector<unsigned char>::const_iterator sourceIt(
|
|
||||||
it->second.source.begin());
|
|
||||||
std::vector<unsigned char>::const_iterator sourceItEnd(
|
|
||||||
it->second.source.end());
|
|
||||||
|
|
||||||
for (; sourceIt != sourceItEnd; ++sourceIt) {
|
|
||||||
shader_source += static_cast<char>(*sourceIt);
|
|
||||||
if (*sourceIt == '\n') {
|
|
||||||
shader_source += Indent(3);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
std::cout << Indent(2) << "source :\n"
|
|
||||||
<< shader_source << std::endl;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
std::map<std::string, tinygltf::Program>::const_iterator it(
|
|
||||||
scene.programs.begin());
|
|
||||||
std::map<std::string, tinygltf::Program>::const_iterator itEnd(
|
|
||||||
scene.programs.end());
|
|
||||||
|
|
||||||
std::cout << "programs(items=" << scene.programs.size() << ")" << std::endl;
|
|
||||||
for (; it != itEnd; it++) {
|
|
||||||
std::cout << Indent(1) << "name : " << it->first << std::endl;
|
|
||||||
std::cout << Indent(2) << "vertexShader : " << it->second.vertexShader
|
|
||||||
<< std::endl;
|
|
||||||
std::cout << Indent(2) << "fragmentShader : " << it->second.fragmentShader
|
|
||||||
<< std::endl;
|
|
||||||
std::cout << Indent(2) << "attributes : "
|
|
||||||
<< PrintStringArray(it->second.attributes) << std::endl;
|
|
||||||
std::cout << Indent(2) << "name : " << it->second.name
|
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
std::map<std::string, tinygltf::Technique>::const_iterator it(
|
std::cout << "samplers(items=" << model.samplers.size() << ")" << std::endl;
|
||||||
scene.techniques.begin());
|
|
||||||
std::map<std::string, tinygltf::Technique>::const_iterator itEnd(
|
|
||||||
scene.techniques.end());
|
|
||||||
|
|
||||||
std::cout << "techniques(items=" << scene.techniques.size() << ")"
|
|
||||||
<< std::endl;
|
|
||||||
|
|
||||||
for (; it != itEnd; it++) {
|
|
||||||
std::cout << Indent(1) << "name (id) : " << it->first << std::endl;
|
|
||||||
std::cout << Indent(2) << "program : " << it->second.program
|
|
||||||
<< std::endl;
|
|
||||||
|
|
||||||
std::cout << Indent(2) << "name (json) : " << it->second.name
|
|
||||||
<< std::endl;
|
|
||||||
|
|
||||||
|
for (size_t i = 0; i < model.samplers.size(); i++) {
|
||||||
|
const tinygltf::Sampler &sampler = model.samplers[i];
|
||||||
|
std::cout << Indent(1) << "name (id) : " << sampler.name << std::endl;
|
||||||
std::cout << Indent(2)
|
std::cout << Indent(2)
|
||||||
<< "parameters(items=" << it->second.parameters.size() << ")"
|
<< "minFilter : " << PrintFilterMode(sampler.minFilter)
|
||||||
<< std::endl;
|
|
||||||
|
|
||||||
std::map<std::string, tinygltf::TechniqueParameter>::const_iterator
|
|
||||||
paramIt(it->second.parameters.begin());
|
|
||||||
std::map<std::string, tinygltf::TechniqueParameter>::const_iterator
|
|
||||||
paramItEnd(it->second.parameters.end());
|
|
||||||
|
|
||||||
for (; paramIt != paramItEnd; ++paramIt) {
|
|
||||||
std::cout << Indent(3) << "name : " << paramIt->first << std::endl;
|
|
||||||
DumpTechniqueParameter(paramIt->second, 4);
|
|
||||||
}
|
|
||||||
|
|
||||||
std::cout << Indent(2)
|
|
||||||
<< "attributes(items=" << it->second.attributes.size() << ")"
|
|
||||||
<< std::endl;
|
|
||||||
|
|
||||||
DumpStringMap(it->second.attributes, 3);
|
|
||||||
|
|
||||||
std::cout << Indent(2) << "uniforms(items=" << it->second.uniforms.size()
|
|
||||||
<< ")" << std::endl;
|
|
||||||
DumpStringMap(it->second.uniforms, 3);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
std::map<std::string, tinygltf::Sampler>::const_iterator it(
|
|
||||||
scene.samplers.begin());
|
|
||||||
std::map<std::string, tinygltf::Sampler>::const_iterator itEnd(
|
|
||||||
scene.samplers.end());
|
|
||||||
|
|
||||||
std::cout << "samplers(items=" << scene.samplers.size() << ")" << std::endl;
|
|
||||||
|
|
||||||
for (; it != itEnd; it++) {
|
|
||||||
std::cout << Indent(1) << "name (id) : " << it->first << std::endl;
|
|
||||||
std::cout << Indent(2)
|
|
||||||
<< "minFilter : " << PrintFilterMode(it->second.minFilter)
|
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
std::cout << Indent(2)
|
std::cout << Indent(2)
|
||||||
<< "magFilter : " << PrintFilterMode(it->second.magFilter)
|
<< "magFilter : " << PrintFilterMode(sampler.magFilter)
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
std::cout << Indent(2)
|
std::cout << Indent(2)
|
||||||
<< "wrapS : " << PrintWrapMode(it->second.wrapS)
|
<< "wrapS : " << PrintWrapMode(sampler.wrapS)
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
std::cout << Indent(2)
|
std::cout << Indent(2)
|
||||||
<< "wrapT : " << PrintWrapMode(it->second.wrapT)
|
<< "wrapT : " << PrintWrapMode(sampler.wrapT)
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -699,7 +506,7 @@ int main(int argc, char **argv) {
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
tinygltf::Scene scene;
|
tinygltf::Model model;
|
||||||
tinygltf::TinyGLTFLoader loader;
|
tinygltf::TinyGLTFLoader loader;
|
||||||
std::string err;
|
std::string err;
|
||||||
std::string input_filename(argv[1]);
|
std::string input_filename(argv[1]);
|
||||||
@ -707,11 +514,13 @@ int main(int argc, char **argv) {
|
|||||||
|
|
||||||
bool ret = false;
|
bool ret = false;
|
||||||
if (ext.compare("glb") == 0) {
|
if (ext.compare("glb") == 0) {
|
||||||
|
std::cout << "Reading binary glTF" << std::endl;
|
||||||
// assume binary glTF.
|
// assume binary glTF.
|
||||||
ret = loader.LoadBinaryFromFile(&scene, &err, input_filename.c_str());
|
ret = loader.LoadBinaryFromFile(&model, &err, input_filename.c_str());
|
||||||
} else {
|
} else {
|
||||||
|
std::cout << "Reading ASCII glTF" << std::endl;
|
||||||
// assume ascii glTF.
|
// assume ascii glTF.
|
||||||
ret = loader.LoadASCIIFromFile(&scene, &err, input_filename.c_str());
|
ret = loader.LoadASCIIFromFile(&model, &err, input_filename.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!err.empty()) {
|
if (!err.empty()) {
|
||||||
@ -723,7 +532,7 @@ int main(int argc, char **argv) {
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
Dump(scene);
|
Dump(model);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
BIN
models/Cube/Cube.bin
Normal file
BIN
models/Cube/Cube.bin
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
193
models/Cube/Cube.gltf
Normal file
193
models/Cube/Cube.gltf
Normal file
@ -0,0 +1,193 @@
|
|||||||
|
{
|
||||||
|
"accessors" : [
|
||||||
|
{
|
||||||
|
"bufferView" : 0,
|
||||||
|
"byteOffset" : 0,
|
||||||
|
"componentType" : 5123,
|
||||||
|
"count" : 36,
|
||||||
|
"max" : [
|
||||||
|
35
|
||||||
|
],
|
||||||
|
"min" : [
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"type" : "SCALAR"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"bufferView" : 1,
|
||||||
|
"byteOffset" : 0,
|
||||||
|
"componentType" : 5126,
|
||||||
|
"count" : 36,
|
||||||
|
"max" : [
|
||||||
|
1.000000,
|
||||||
|
1.000000,
|
||||||
|
1.000001
|
||||||
|
],
|
||||||
|
"min" : [
|
||||||
|
-1.000000,
|
||||||
|
-1.000000,
|
||||||
|
-1.000000
|
||||||
|
],
|
||||||
|
"type" : "VEC3"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"bufferView" : 2,
|
||||||
|
"byteOffset" : 0,
|
||||||
|
"componentType" : 5126,
|
||||||
|
"count" : 36,
|
||||||
|
"max" : [
|
||||||
|
1.000000,
|
||||||
|
1.000000,
|
||||||
|
1.000000
|
||||||
|
],
|
||||||
|
"min" : [
|
||||||
|
-1.000000,
|
||||||
|
-1.000000,
|
||||||
|
-1.000000
|
||||||
|
],
|
||||||
|
"type" : "VEC3"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"bufferView" : 3,
|
||||||
|
"byteOffset" : 0,
|
||||||
|
"componentType" : 5126,
|
||||||
|
"count" : 36,
|
||||||
|
"max" : [
|
||||||
|
1.000000,
|
||||||
|
-0.000000,
|
||||||
|
-0.000000,
|
||||||
|
1.000000
|
||||||
|
],
|
||||||
|
"min" : [
|
||||||
|
0.000000,
|
||||||
|
-0.000000,
|
||||||
|
-1.000000,
|
||||||
|
-1.000000
|
||||||
|
],
|
||||||
|
"type" : "VEC4"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"bufferView" : 4,
|
||||||
|
"byteOffset" : 0,
|
||||||
|
"componentType" : 5126,
|
||||||
|
"count" : 36,
|
||||||
|
"max" : [
|
||||||
|
1.000000,
|
||||||
|
1.000000
|
||||||
|
],
|
||||||
|
"min" : [
|
||||||
|
-1.000000,
|
||||||
|
-1.000000
|
||||||
|
],
|
||||||
|
"type" : "VEC2"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"asset" : {
|
||||||
|
"generator" : "VKTS glTF 2.0 exporter",
|
||||||
|
"version" : "2.0"
|
||||||
|
},
|
||||||
|
"bufferViews" : [
|
||||||
|
{
|
||||||
|
"buffer" : 0,
|
||||||
|
"byteLength" : 72,
|
||||||
|
"byteOffset" : 0,
|
||||||
|
"target" : 34963
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buffer" : 0,
|
||||||
|
"byteLength" : 432,
|
||||||
|
"byteOffset" : 72,
|
||||||
|
"target" : 34962
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buffer" : 0,
|
||||||
|
"byteLength" : 432,
|
||||||
|
"byteOffset" : 504,
|
||||||
|
"target" : 34962
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buffer" : 0,
|
||||||
|
"byteLength" : 576,
|
||||||
|
"byteOffset" : 936,
|
||||||
|
"target" : 34962
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buffer" : 0,
|
||||||
|
"byteLength" : 288,
|
||||||
|
"byteOffset" : 1512,
|
||||||
|
"target" : 34962
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"buffers" : [
|
||||||
|
{
|
||||||
|
"byteLength" : 1800,
|
||||||
|
"uri" : "Cube.bin"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"uri" : "Cube_BaseColor.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uri" : "Cube_MetallicRoughness.png"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"materials" : [
|
||||||
|
{
|
||||||
|
"name" : "Cube",
|
||||||
|
"pbrMetallicRoughness" : {
|
||||||
|
"baseColorTexture" : {
|
||||||
|
"index" : 0
|
||||||
|
},
|
||||||
|
"metallicRoughnessTexture" : {
|
||||||
|
"index" : 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"meshes" : [
|
||||||
|
{
|
||||||
|
"name" : "Cube",
|
||||||
|
"primitives" : [
|
||||||
|
{
|
||||||
|
"attributes" : {
|
||||||
|
"NORMAL" : 2,
|
||||||
|
"POSITION" : 1,
|
||||||
|
"TANGENT" : 3,
|
||||||
|
"TEXCOORD_0" : 4
|
||||||
|
},
|
||||||
|
"indices" : 0,
|
||||||
|
"material" : 0,
|
||||||
|
"mode" : 4
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"nodes" : [
|
||||||
|
{
|
||||||
|
"mesh" : 0,
|
||||||
|
"name" : "Cube"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"samplers" : [
|
||||||
|
{}
|
||||||
|
],
|
||||||
|
"scene" : 0,
|
||||||
|
"scenes" : [
|
||||||
|
{
|
||||||
|
"nodes" : [
|
||||||
|
0
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"textures" : [
|
||||||
|
{
|
||||||
|
"sampler" : 0,
|
||||||
|
"source" : 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sampler" : 0,
|
||||||
|
"source" : 1
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
715
models/Cube/Cube_BaseColor.png
Normal file
715
models/Cube/Cube_BaseColor.png
Normal file
@ -0,0 +1,715 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<link crossorigin="anonymous" href="https://assets-cdn.github.com/assets/frameworks-148da7a2b8b9ad739a5a0b8b68683fed4ac7e50ce8185f17d86aa05e75ed376e.css" integrity="sha256-FI2nori5rXOaWguLaGg/7UrH5QzoGF8X2GqgXnXtN24=" media="all" rel="stylesheet" />
|
||||||
|
<link crossorigin="anonymous" href="https://assets-cdn.github.com/assets/github-4cb6b37ae0c653978a80cfe0c9288fcb02f00f746d1e076237703e57761c8973.css" integrity="sha256-TLazeuDGU5eKgM/gySiPywLwD3RtHgdiN3A+V3YciXM=" media="all" rel="stylesheet" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<meta name="viewport" content="width=device-width">
|
||||||
|
|
||||||
|
<title>glTF-Sample-Models/Cube_BaseColor.png at master · KhronosGroup/glTF-Sample-Models</title>
|
||||||
|
<link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="GitHub">
|
||||||
|
<link rel="fluid-icon" href="https://github.com/fluidicon.png" title="GitHub">
|
||||||
|
<meta property="fb:app_id" content="1401488693436528">
|
||||||
|
|
||||||
|
|
||||||
|
<meta content="https://avatars2.githubusercontent.com/u/1608701?v=3&s=400" property="og:image" /><meta content="GitHub" property="og:site_name" /><meta content="object" property="og:type" /><meta content="KhronosGroup/glTF-Sample-Models" property="og:title" /><meta content="https://github.com/KhronosGroup/glTF-Sample-Models" property="og:url" /><meta content="glTF-Sample-Models - glTF Sample Models" property="og:description" />
|
||||||
|
|
||||||
|
<link rel="assets" href="https://assets-cdn.github.com/">
|
||||||
|
<link rel="web-socket" href="wss://live.github.com/_sockets/VjI6MTI0MzUxODA0OjNhMWJiZDRiNWU0NDM5NTVmOTMxNThjNTcxNTk2YjFjNmMxNzY2Y2RmNWUyYWQ2ZWIxMTU5NTRhMjA1ZmMwYWE=--197373b30fd6ed678b4eb37ad4ca9af49647197c">
|
||||||
|
<meta name="pjax-timeout" content="1000">
|
||||||
|
<link rel="sudo-modal" href="/sessions/sudo_modal">
|
||||||
|
<meta name="request-id" content="937C:246F8:93F1F0:E6F760:59295D74" data-pjax-transient>
|
||||||
|
|
||||||
|
|
||||||
|
<meta name="selected-link" value="repo_source" data-pjax-transient>
|
||||||
|
|
||||||
|
<meta name="google-site-verification" content="KT5gs8h0wvaagLKAVWq8bbeNwnZZK1r1XQysX3xurLU">
|
||||||
|
<meta name="google-site-verification" content="ZzhVyEFwb7w3e0-uOTltm8Jsck2F5StVihD0exw2fsA">
|
||||||
|
<meta name="google-analytics" content="UA-3769691-2">
|
||||||
|
|
||||||
|
<meta content="collector.githubapp.com" name="octolytics-host" /><meta content="github" name="octolytics-app-id" /><meta content="https://collector.githubapp.com/github-external/browser_event" name="octolytics-event-url" /><meta content="937C:246F8:93F1F0:E6F760:59295D74" name="octolytics-dimension-request_id" /><meta content="sea" name="octolytics-dimension-region_edge" /><meta content="iad" name="octolytics-dimension-region_render" /><meta content="18676" name="octolytics-actor-id" /><meta content="syoyo" name="octolytics-actor-login" /><meta content="325285e9d46c6ec39edf55e947c8c362b28925a437f41d10016a69c5e8213c66" name="octolytics-actor-hash" />
|
||||||
|
<meta content="/<user-name>/<repo-name>/blob/show" data-pjax-transient="true" name="analytics-location" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<meta class="js-ga-set" name="dimension1" content="Logged In">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<meta name="hostname" content="github.com">
|
||||||
|
<meta name="user-login" content="syoyo">
|
||||||
|
|
||||||
|
<meta name="expected-hostname" content="github.com">
|
||||||
|
<meta name="js-proxy-site-detection-payload" content="ZDMxYWZmY2RlYjY4YjU3OGVmODRhODA4NDFjZDBkMTc4NDRiNWY4ODRiODg3MmQ3MmViOTQ5ZGQ5NzFiOTZkM3x7InJlbW90ZV9hZGRyZXNzIjoiMjEwLjE0OS4yNTEuNTUiLCJyZXF1ZXN0X2lkIjoiOTM3QzoyNDZGODo5M0YxRjA6RTZGNzYwOjU5Mjk1RDc0IiwidGltZXN0YW1wIjoxNDk1ODgzMTMxLCJob3N0IjoiZ2l0aHViLmNvbSJ9">
|
||||||
|
|
||||||
|
|
||||||
|
<meta name="html-safe-nonce" content="a0781e426efdb2cdf113a43ff2217ccaf104341e">
|
||||||
|
|
||||||
|
<meta http-equiv="x-pjax-version" content="757efe3f0bbc93dc131b9a7d2ae5448c">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<meta name="description" content="glTF-Sample-Models - glTF Sample Models">
|
||||||
|
<meta name="go-import" content="github.com/KhronosGroup/glTF-Sample-Models git https://github.com/KhronosGroup/glTF-Sample-Models.git">
|
||||||
|
|
||||||
|
<meta content="1608701" name="octolytics-dimension-user_id" /><meta content="KhronosGroup" name="octolytics-dimension-user_login" /><meta content="71492395" name="octolytics-dimension-repository_id" /><meta content="KhronosGroup/glTF-Sample-Models" name="octolytics-dimension-repository_nwo" /><meta content="true" name="octolytics-dimension-repository_public" /><meta content="false" name="octolytics-dimension-repository_is_fork" /><meta content="71492395" name="octolytics-dimension-repository_network_root_id" /><meta content="KhronosGroup/glTF-Sample-Models" name="octolytics-dimension-repository_network_root_nwo" />
|
||||||
|
<link href="https://github.com/KhronosGroup/glTF-Sample-Models/commits/master.atom" rel="alternate" title="Recent Commits to glTF-Sample-Models:master" type="application/atom+xml">
|
||||||
|
|
||||||
|
|
||||||
|
<link rel="canonical" href="https://github.com/KhronosGroup/glTF-Sample-Models/blob/master/2.0/Cube/glTF/Cube_BaseColor.png" data-pjax-transient>
|
||||||
|
|
||||||
|
|
||||||
|
<meta name="browser-stats-url" content="https://api.github.com/_private/browser/stats">
|
||||||
|
|
||||||
|
<meta name="browser-errors-url" content="https://api.github.com/_private/browser/errors">
|
||||||
|
|
||||||
|
<link rel="mask-icon" href="https://assets-cdn.github.com/pinned-octocat.svg" color="#000000">
|
||||||
|
<link rel="icon" type="image/x-icon" href="https://assets-cdn.github.com/favicon.ico">
|
||||||
|
|
||||||
|
<meta name="theme-color" content="#1e2327">
|
||||||
|
|
||||||
|
|
||||||
|
<meta name="u2f-support" content="true">
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body class="logged-in env-production emoji-size-boost page-blob">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="position-relative js-header-wrapper ">
|
||||||
|
<a href="#start-of-content" tabindex="1" class="accessibility-aid js-skip-to-content">Skip to content</a>
|
||||||
|
<div id="js-pjax-loader-bar" class="pjax-loader-bar"><div class="progress"></div></div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="header" role="banner">
|
||||||
|
<div class="container clearfix">
|
||||||
|
<a class="header-logo-invertocat" href="https://github.com/" data-hotkey="g d" aria-label="Homepage" data-ga-click="Header, go to dashboard, icon:logo">
|
||||||
|
<svg aria-hidden="true" class="octicon octicon-mark-github" height="32" version="1.1" viewBox="0 0 16 16" width="32"><path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z"/></svg>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="header-search scoped-search site-scoped-search js-site-search" role="search">
|
||||||
|
<!-- '"` --><!-- </textarea></xmp> --></option></form><form accept-charset="UTF-8" action="/KhronosGroup/glTF-Sample-Models/search" class="js-site-search-form" data-scoped-search-url="/KhronosGroup/glTF-Sample-Models/search" data-unscoped-search-url="/search" method="get"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓" /></div>
|
||||||
|
<label class="form-control header-search-wrapper js-chromeless-input-container">
|
||||||
|
<a href="/KhronosGroup/glTF-Sample-Models/blob/master/2.0/Cube/glTF/Cube_BaseColor.png" class="header-search-scope no-underline">This repository</a>
|
||||||
|
<input type="text"
|
||||||
|
class="form-control header-search-input js-site-search-focus js-site-search-field is-clearable"
|
||||||
|
data-hotkey="s"
|
||||||
|
name="q"
|
||||||
|
value=""
|
||||||
|
placeholder="Search"
|
||||||
|
aria-label="Search this repository"
|
||||||
|
data-unscoped-placeholder="Search GitHub"
|
||||||
|
data-scoped-placeholder="Search"
|
||||||
|
autocapitalize="off">
|
||||||
|
<input type="hidden" class="js-site-search-type-field" name="type" >
|
||||||
|
</label>
|
||||||
|
</form></div>
|
||||||
|
|
||||||
|
|
||||||
|
<ul class="header-nav float-left" role="navigation">
|
||||||
|
<li class="header-nav-item">
|
||||||
|
<a href="/pulls" aria-label="Pull requests you created" class="js-selected-navigation-item header-nav-link" data-ga-click="Header, click, Nav menu - item:pulls context:user" data-hotkey="g p" data-selected-links="/pulls /pulls/assigned /pulls/mentioned /pulls">
|
||||||
|
Pull requests
|
||||||
|
</a> </li>
|
||||||
|
<li class="header-nav-item">
|
||||||
|
<a href="/issues" aria-label="Issues you created" class="js-selected-navigation-item header-nav-link" data-ga-click="Header, click, Nav menu - item:issues context:user" data-hotkey="g i" data-selected-links="/issues /issues/assigned /issues/mentioned /issues">
|
||||||
|
Issues
|
||||||
|
</a> </li>
|
||||||
|
<li class="header-nav-item">
|
||||||
|
<a href="/marketplace" class="js-selected-navigation-item header-nav-link" data-ga-click="Header, click, Nav menu - item:marketplace context:user" data-selected-links=" /marketplace">
|
||||||
|
Marketplace
|
||||||
|
</a> </li>
|
||||||
|
<li class="header-nav-item">
|
||||||
|
<a class="header-nav-link" href="https://gist.github.com/" data-ga-click="Header, go to gist, text:gist">Gist</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
<ul class="header-nav user-nav float-right" id="user-links">
|
||||||
|
<li class="header-nav-item">
|
||||||
|
|
||||||
|
<a href="/notifications" aria-label="You have no unread notifications" class="header-nav-link notification-indicator tooltipped tooltipped-s js-socket-channel js-notification-indicator " data-channel="notification-changed:18676" data-ga-click="Header, go to notifications, icon:read" data-hotkey="g n">
|
||||||
|
<span class="mail-status "></span>
|
||||||
|
<svg aria-hidden="true" class="octicon octicon-bell float-left" height="16" version="1.1" viewBox="0 0 14 16" width="14"><path fill-rule="evenodd" d="M14 12v1H0v-1l.73-.58c.77-.77.81-2.55 1.19-4.42C2.69 3.23 6 2 6 2c0-.55.45-1 1-1s1 .45 1 1c0 0 3.39 1.23 4.16 5 .38 1.88.42 3.66 1.19 4.42l.66.58H14zm-7 4c1.11 0 2-.89 2-2H5c0 1.11.89 2 2 2z"/></svg>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="header-nav-item dropdown js-menu-container">
|
||||||
|
<a class="header-nav-link tooltipped tooltipped-s js-menu-target" href="/new"
|
||||||
|
aria-label="Create new…"
|
||||||
|
data-ga-click="Header, create new, icon:add">
|
||||||
|
<svg aria-hidden="true" class="octicon octicon-plus float-left" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M12 9H7v5H5V9H0V7h5V2h2v5h5z"/></svg>
|
||||||
|
<span class="dropdown-caret"></span>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<div class="dropdown-menu-content js-menu-content">
|
||||||
|
<ul class="dropdown-menu dropdown-menu-sw">
|
||||||
|
|
||||||
|
<a class="dropdown-item" href="/new" data-ga-click="Header, create new repository">
|
||||||
|
New repository
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a class="dropdown-item" href="/new/import" data-ga-click="Header, import a repository">
|
||||||
|
Import repository
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a class="dropdown-item" href="https://gist.github.com/" data-ga-click="Header, create new gist">
|
||||||
|
New gist
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a class="dropdown-item" href="/organizations/new" data-ga-click="Header, create new organization">
|
||||||
|
New organization
|
||||||
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="dropdown-divider"></div>
|
||||||
|
<div class="dropdown-header">
|
||||||
|
<span title="KhronosGroup/glTF-Sample-Models">This repository</span>
|
||||||
|
</div>
|
||||||
|
<a class="dropdown-item" href="/KhronosGroup/glTF-Sample-Models/issues/new" data-ga-click="Header, create new issue">
|
||||||
|
New issue
|
||||||
|
</a>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="header-nav-item dropdown js-menu-container">
|
||||||
|
<a class="header-nav-link name tooltipped tooltipped-sw js-menu-target" href="/syoyo"
|
||||||
|
aria-label="View profile and more"
|
||||||
|
data-ga-click="Header, show menu, icon:avatar">
|
||||||
|
<img alt="@syoyo" class="avatar" src="https://avatars1.githubusercontent.com/u/18676?v=3&s=40" height="20" width="20">
|
||||||
|
<span class="dropdown-caret"></span>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<div class="dropdown-menu-content js-menu-content">
|
||||||
|
<div class="dropdown-menu dropdown-menu-sw">
|
||||||
|
<div class="dropdown-header header-nav-current-user css-truncate">
|
||||||
|
Signed in as <strong class="css-truncate-target">syoyo</strong>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="dropdown-divider"></div>
|
||||||
|
|
||||||
|
<a class="dropdown-item" href="/syoyo" data-ga-click="Header, go to profile, text:your profile">
|
||||||
|
Your profile
|
||||||
|
</a>
|
||||||
|
<a class="dropdown-item" href="/syoyo?tab=stars" data-ga-click="Header, go to starred repos, text:your stars">
|
||||||
|
Your stars
|
||||||
|
</a>
|
||||||
|
<a class="dropdown-item" href="/explore" data-ga-click="Header, go to explore, text:explore">
|
||||||
|
Explore
|
||||||
|
</a>
|
||||||
|
<a class="dropdown-item" href="https://help.github.com" data-ga-click="Header, go to help, text:help">
|
||||||
|
Help
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<div class="dropdown-divider"></div>
|
||||||
|
|
||||||
|
<a class="dropdown-item" href="/settings/profile" data-ga-click="Header, go to settings, icon:settings">
|
||||||
|
Settings
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<!-- '"` --><!-- </textarea></xmp> --></option></form><form accept-charset="UTF-8" action="/logout" class="logout-form" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓" /><input name="authenticity_token" type="hidden" value="sCFuut5qUXVKdUmd4n/UkYshqEdZoH0Z64UJ0WzkAovfpJXmg8CgyfcuEGYdgl/9ol4GRMNAq+arucyphE27aA==" /></div>
|
||||||
|
<button type="submit" class="dropdown-item dropdown-signout" data-ga-click="Header, sign out, icon:logout">
|
||||||
|
Sign out
|
||||||
|
</button>
|
||||||
|
</form> </div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- '"` --><!-- </textarea></xmp> --></option></form><form accept-charset="UTF-8" action="/logout" class="sr-only right-0" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓" /><input name="authenticity_token" type="hidden" value="4V369U+pX2gbZyf49AhQ167hk62PWA/fJ/W0xwsrlXiO2AGpEgOu1KY8fgML9du7h549rhW42SBnyXG/44Ismw==" /></div>
|
||||||
|
<button type="submit" class="dropdown-item dropdown-signout" data-ga-click="Header, sign out, icon:logout">
|
||||||
|
Sign out
|
||||||
|
</button>
|
||||||
|
</form> </div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="start-of-content" class="accessibility-aid"></div>
|
||||||
|
|
||||||
|
<div id="js-flash-container">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div role="main">
|
||||||
|
<div itemscope itemtype="http://schema.org/SoftwareSourceCode">
|
||||||
|
<div id="js-repo-pjax-container" data-pjax-container>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="pagehead repohead instapaper_ignore readability-menu experiment-repo-nav">
|
||||||
|
<div class="container repohead-details-container">
|
||||||
|
|
||||||
|
<ul class="pagehead-actions">
|
||||||
|
<li>
|
||||||
|
<!-- '"` --><!-- </textarea></xmp> --></option></form><form accept-charset="UTF-8" action="/notifications/subscribe" class="js-social-container" data-autosubmit="true" data-remote="true" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓" /><input name="authenticity_token" type="hidden" value="UNH0srxaAk75YxDfBX/rS1tPh2d/twthbcABmuX1JFvFAFESSkb56J0WKXd6A1E44UQYnQH9i6TbG/EcZ6ORVA==" /></div> <input class="form-control" id="repository_id" name="repository_id" type="hidden" value="71492395" />
|
||||||
|
|
||||||
|
<div class="select-menu js-menu-container js-select-menu">
|
||||||
|
<a href="/KhronosGroup/glTF-Sample-Models/subscription"
|
||||||
|
class="btn btn-sm btn-with-count select-menu-button js-menu-target" role="button" tabindex="0" aria-haspopup="true"
|
||||||
|
data-ga-click="Repository, click Watch settings, action:blob#show">
|
||||||
|
<span class="js-select-button">
|
||||||
|
<svg aria-hidden="true" class="octicon octicon-eye" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M8.06 2C3 2 0 8 0 8s3 6 8.06 6C13 14 16 8 16 8s-3-6-7.94-6zM8 12c-2.2 0-4-1.78-4-4 0-2.2 1.8-4 4-4 2.22 0 4 1.8 4 4 0 2.22-1.78 4-4 4zm2-4c0 1.11-.89 2-2 2-1.11 0-2-.89-2-2 0-1.11.89-2 2-2 1.11 0 2 .89 2 2z"/></svg>
|
||||||
|
Watch
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
<a class="social-count js-social-count"
|
||||||
|
href="/KhronosGroup/glTF-Sample-Models/watchers"
|
||||||
|
aria-label="23 users are watching this repository">
|
||||||
|
23
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<div class="select-menu-modal-holder">
|
||||||
|
<div class="select-menu-modal subscription-menu-modal js-menu-content">
|
||||||
|
<div class="select-menu-header js-navigation-enable" tabindex="-1">
|
||||||
|
<svg aria-label="Close" class="octicon octicon-x js-menu-close" height="16" role="img" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M7.48 8l3.75 3.75-1.48 1.48L6 9.48l-3.75 3.75-1.48-1.48L4.52 8 .77 4.25l1.48-1.48L6 6.52l3.75-3.75 1.48 1.48z"/></svg>
|
||||||
|
<span class="select-menu-title">Notifications</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="select-menu-list js-navigation-container" role="menu">
|
||||||
|
|
||||||
|
<div class="select-menu-item js-navigation-item selected" role="menuitem" tabindex="0">
|
||||||
|
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"/></svg>
|
||||||
|
<div class="select-menu-item-text">
|
||||||
|
<input checked="checked" id="do_included" name="do" type="radio" value="included" />
|
||||||
|
<span class="select-menu-item-heading">Not watching</span>
|
||||||
|
<span class="description">Be notified when participating or @mentioned.</span>
|
||||||
|
<span class="js-select-button-text hidden-select-button-text">
|
||||||
|
<svg aria-hidden="true" class="octicon octicon-eye" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M8.06 2C3 2 0 8 0 8s3 6 8.06 6C13 14 16 8 16 8s-3-6-7.94-6zM8 12c-2.2 0-4-1.78-4-4 0-2.2 1.8-4 4-4 2.22 0 4 1.8 4 4 0 2.22-1.78 4-4 4zm2-4c0 1.11-.89 2-2 2-1.11 0-2-.89-2-2 0-1.11.89-2 2-2 1.11 0 2 .89 2 2z"/></svg>
|
||||||
|
Watch
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="select-menu-item js-navigation-item " role="menuitem" tabindex="0">
|
||||||
|
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"/></svg>
|
||||||
|
<div class="select-menu-item-text">
|
||||||
|
<input id="do_subscribed" name="do" type="radio" value="subscribed" />
|
||||||
|
<span class="select-menu-item-heading">Watching</span>
|
||||||
|
<span class="description">Be notified of all conversations.</span>
|
||||||
|
<span class="js-select-button-text hidden-select-button-text">
|
||||||
|
<svg aria-hidden="true" class="octicon octicon-eye" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M8.06 2C3 2 0 8 0 8s3 6 8.06 6C13 14 16 8 16 8s-3-6-7.94-6zM8 12c-2.2 0-4-1.78-4-4 0-2.2 1.8-4 4-4 2.22 0 4 1.8 4 4 0 2.22-1.78 4-4 4zm2-4c0 1.11-.89 2-2 2-1.11 0-2-.89-2-2 0-1.11.89-2 2-2 1.11 0 2 .89 2 2z"/></svg>
|
||||||
|
Unwatch
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="select-menu-item js-navigation-item " role="menuitem" tabindex="0">
|
||||||
|
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"/></svg>
|
||||||
|
<div class="select-menu-item-text">
|
||||||
|
<input id="do_ignore" name="do" type="radio" value="ignore" />
|
||||||
|
<span class="select-menu-item-heading">Ignoring</span>
|
||||||
|
<span class="description">Never be notified.</span>
|
||||||
|
<span class="js-select-button-text hidden-select-button-text">
|
||||||
|
<svg aria-hidden="true" class="octicon octicon-mute" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M8 2.81v10.38c0 .67-.81 1-1.28.53L3 10H1c-.55 0-1-.45-1-1V7c0-.55.45-1 1-1h2l3.72-3.72C7.19 1.81 8 2.14 8 2.81zm7.53 3.22l-1.06-1.06-1.97 1.97-1.97-1.97-1.06 1.06L11.44 8 9.47 9.97l1.06 1.06 1.97-1.97 1.97 1.97 1.06-1.06L13.56 8l1.97-1.97z"/></svg>
|
||||||
|
Stop ignoring
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<div class="js-toggler-container js-social-container starring-container ">
|
||||||
|
<!-- '"` --><!-- </textarea></xmp> --></option></form><form accept-charset="UTF-8" action="/KhronosGroup/glTF-Sample-Models/unstar" class="starred" data-remote="true" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓" /><input name="authenticity_token" type="hidden" value="Xew/6Uwal8B2Mkfbw8t6+zoomT7uMM4MNIZeS+iKD6fdhtVHswg9tlhTFwUXDyzcGjE8IIyRTiF/n7R3PfeFPw==" /></div>
|
||||||
|
<button
|
||||||
|
type="submit"
|
||||||
|
class="btn btn-sm btn-with-count js-toggler-target"
|
||||||
|
aria-label="Unstar this repository" title="Unstar KhronosGroup/glTF-Sample-Models"
|
||||||
|
data-ga-click="Repository, click unstar button, action:blob#show; text:Unstar">
|
||||||
|
<svg aria-hidden="true" class="octicon octicon-star" height="16" version="1.1" viewBox="0 0 14 16" width="14"><path fill-rule="evenodd" d="M14 6l-4.9-.64L7 1 4.9 5.36 0 6l3.6 3.26L2.67 14 7 11.67 11.33 14l-.93-4.74z"/></svg>
|
||||||
|
Unstar
|
||||||
|
</button>
|
||||||
|
<a class="social-count js-social-count" href="/KhronosGroup/glTF-Sample-Models/stargazers"
|
||||||
|
aria-label="52 users starred this repository">
|
||||||
|
52
|
||||||
|
</a>
|
||||||
|
</form>
|
||||||
|
<!-- '"` --><!-- </textarea></xmp> --></option></form><form accept-charset="UTF-8" action="/KhronosGroup/glTF-Sample-Models/star" class="unstarred" data-remote="true" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓" /><input name="authenticity_token" type="hidden" value="fSpOMa+BPIwrkIHeRtPc+45tkoDZAV0EzLUTfKzqb0DCyg/q0UrQaCq15d8RoAOUvIrwyOXQRal+82BJRDeD8g==" /></div>
|
||||||
|
<button
|
||||||
|
type="submit"
|
||||||
|
class="btn btn-sm btn-with-count js-toggler-target"
|
||||||
|
aria-label="Star this repository" title="Star KhronosGroup/glTF-Sample-Models"
|
||||||
|
data-ga-click="Repository, click star button, action:blob#show; text:Star">
|
||||||
|
<svg aria-hidden="true" class="octicon octicon-star" height="16" version="1.1" viewBox="0 0 14 16" width="14"><path fill-rule="evenodd" d="M14 6l-4.9-.64L7 1 4.9 5.36 0 6l3.6 3.26L2.67 14 7 11.67 11.33 14l-.93-4.74z"/></svg>
|
||||||
|
Star
|
||||||
|
</button>
|
||||||
|
<a class="social-count js-social-count" href="/KhronosGroup/glTF-Sample-Models/stargazers"
|
||||||
|
aria-label="52 users starred this repository">
|
||||||
|
52
|
||||||
|
</a>
|
||||||
|
</form> </div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<a href="#fork-destination-box" class="btn btn-sm btn-with-count"
|
||||||
|
title="Fork your own copy of KhronosGroup/glTF-Sample-Models to your account"
|
||||||
|
aria-label="Fork your own copy of KhronosGroup/glTF-Sample-Models to your account"
|
||||||
|
rel="facebox"
|
||||||
|
data-ga-click="Repository, show fork modal, action:blob#show; text:Fork">
|
||||||
|
<svg aria-hidden="true" class="octicon octicon-repo-forked" height="16" version="1.1" viewBox="0 0 10 16" width="10"><path fill-rule="evenodd" d="M8 1a1.993 1.993 0 0 0-1 3.72V6L5 8 3 6V4.72A1.993 1.993 0 0 0 2 1a1.993 1.993 0 0 0-1 3.72V6.5l3 3v1.78A1.993 1.993 0 0 0 5 15a1.993 1.993 0 0 0 1-3.72V9.5l3-3V4.72A1.993 1.993 0 0 0 8 1zM2 4.2C1.34 4.2.8 3.65.8 3c0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2zm3 10c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2zm3-10c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2z"/></svg>
|
||||||
|
Fork
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<div id="fork-destination-box" style="display: none;">
|
||||||
|
<h2 class="facebox-header" data-facebox-id="facebox-header">Where should we fork this repository?</h2>
|
||||||
|
<include-fragment src=""
|
||||||
|
class="js-fork-select-fragment fork-select-fragment"
|
||||||
|
data-url="/KhronosGroup/glTF-Sample-Models/fork?fragment=1">
|
||||||
|
<img alt="Loading" height="64" src="https://assets-cdn.github.com/images/spinners/octocat-spinner-128.gif" width="64" />
|
||||||
|
</include-fragment>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<a href="/KhronosGroup/glTF-Sample-Models/network" class="social-count"
|
||||||
|
aria-label="21 users forked this repository">
|
||||||
|
21
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h1 class="public ">
|
||||||
|
<svg aria-hidden="true" class="octicon octicon-repo" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M4 9H3V8h1v1zm0-3H3v1h1V6zm0-2H3v1h1V4zm0-2H3v1h1V2zm8-1v12c0 .55-.45 1-1 1H6v2l-1.5-1.5L3 16v-2H1c-.55 0-1-.45-1-1V1c0-.55.45-1 1-1h10c.55 0 1 .45 1 1zm-1 10H1v2h2v-1h3v1h5v-2zm0-10H2v9h9V1z"/></svg>
|
||||||
|
<span class="author" itemprop="author"><a href="/KhronosGroup" class="url fn" rel="author">KhronosGroup</a></span><!--
|
||||||
|
--><span class="path-divider">/</span><!--
|
||||||
|
--><strong itemprop="name"><a href="/KhronosGroup/glTF-Sample-Models" data-pjax="#js-repo-pjax-container">glTF-Sample-Models</a></strong>
|
||||||
|
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="container">
|
||||||
|
|
||||||
|
<nav class="reponav js-repo-nav js-sidenav-container-pjax"
|
||||||
|
itemscope
|
||||||
|
itemtype="http://schema.org/BreadcrumbList"
|
||||||
|
role="navigation"
|
||||||
|
data-pjax="#js-repo-pjax-container">
|
||||||
|
|
||||||
|
<span itemscope itemtype="http://schema.org/ListItem" itemprop="itemListElement">
|
||||||
|
<a href="/KhronosGroup/glTF-Sample-Models" class="js-selected-navigation-item selected reponav-item" data-hotkey="g c" data-selected-links="repo_source repo_downloads repo_commits repo_releases repo_tags repo_branches /KhronosGroup/glTF-Sample-Models" itemprop="url">
|
||||||
|
<svg aria-hidden="true" class="octicon octicon-code" height="16" version="1.1" viewBox="0 0 14 16" width="14"><path fill-rule="evenodd" d="M9.5 3L8 4.5 11.5 8 8 11.5 9.5 13 14 8 9.5 3zm-5 0L0 8l4.5 5L6 11.5 2.5 8 6 4.5 4.5 3z"/></svg>
|
||||||
|
<span itemprop="name">Code</span>
|
||||||
|
<meta itemprop="position" content="1">
|
||||||
|
</a> </span>
|
||||||
|
|
||||||
|
<span itemscope itemtype="http://schema.org/ListItem" itemprop="itemListElement">
|
||||||
|
<a href="/KhronosGroup/glTF-Sample-Models/issues" class="js-selected-navigation-item reponav-item" data-hotkey="g i" data-selected-links="repo_issues repo_labels repo_milestones /KhronosGroup/glTF-Sample-Models/issues" itemprop="url">
|
||||||
|
<svg aria-hidden="true" class="octicon octicon-issue-opened" height="16" version="1.1" viewBox="0 0 14 16" width="14"><path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"/></svg>
|
||||||
|
<span itemprop="name">Issues</span>
|
||||||
|
<span class="Counter">13</span>
|
||||||
|
<meta itemprop="position" content="2">
|
||||||
|
</a> </span>
|
||||||
|
|
||||||
|
<span itemscope itemtype="http://schema.org/ListItem" itemprop="itemListElement">
|
||||||
|
<a href="/KhronosGroup/glTF-Sample-Models/pulls" class="js-selected-navigation-item reponav-item" data-hotkey="g p" data-selected-links="repo_pulls /KhronosGroup/glTF-Sample-Models/pulls" itemprop="url">
|
||||||
|
<svg aria-hidden="true" class="octicon octicon-git-pull-request" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M11 11.28V5c-.03-.78-.34-1.47-.94-2.06C9.46 2.35 8.78 2.03 8 2H7V0L4 3l3 3V4h1c.27.02.48.11.69.31.21.2.3.42.31.69v6.28A1.993 1.993 0 0 0 10 15a1.993 1.993 0 0 0 1-3.72zm-1 2.92c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2zM4 3c0-1.11-.89-2-2-2a1.993 1.993 0 0 0-1 3.72v6.56A1.993 1.993 0 0 0 2 15a1.993 1.993 0 0 0 1-3.72V4.72c.59-.34 1-.98 1-1.72zm-.8 10c0 .66-.55 1.2-1.2 1.2-.65 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2zM2 4.2C1.34 4.2.8 3.65.8 3c0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2z"/></svg>
|
||||||
|
<span itemprop="name">Pull requests</span>
|
||||||
|
<span class="Counter">3</span>
|
||||||
|
<meta itemprop="position" content="3">
|
||||||
|
</a> </span>
|
||||||
|
|
||||||
|
<a href="/KhronosGroup/glTF-Sample-Models/projects" class="js-selected-navigation-item reponav-item" data-selected-links="repo_projects new_repo_project repo_project /KhronosGroup/glTF-Sample-Models/projects">
|
||||||
|
<svg aria-hidden="true" class="octicon octicon-project" height="16" version="1.1" viewBox="0 0 15 16" width="15"><path fill-rule="evenodd" d="M10 12h3V2h-3v10zm-4-2h3V2H6v8zm-4 4h3V2H2v12zm-1 1h13V1H1v14zM14 0H1a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h13a1 1 0 0 0 1-1V1a1 1 0 0 0-1-1z"/></svg>
|
||||||
|
Projects
|
||||||
|
<span class="Counter" >0</span>
|
||||||
|
</a>
|
||||||
|
<a href="/KhronosGroup/glTF-Sample-Models/wiki" class="js-selected-navigation-item reponav-item" data-hotkey="g w" data-selected-links="repo_wiki /KhronosGroup/glTF-Sample-Models/wiki">
|
||||||
|
<svg aria-hidden="true" class="octicon octicon-book" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M3 5h4v1H3V5zm0 3h4V7H3v1zm0 2h4V9H3v1zm11-5h-4v1h4V5zm0 2h-4v1h4V7zm0 2h-4v1h4V9zm2-6v9c0 .55-.45 1-1 1H9.5l-1 1-1-1H2c-.55 0-1-.45-1-1V3c0-.55.45-1 1-1h5.5l1 1 1-1H15c.55 0 1 .45 1 1zm-8 .5L7.5 3H2v9h6V3.5zm7-.5H9.5l-.5.5V12h6V3z"/></svg>
|
||||||
|
Wiki
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<div class="reponav-dropdown js-menu-container">
|
||||||
|
<button type="button" class="btn-link reponav-item reponav-dropdown js-menu-target " data-no-toggle aria-expanded="false" aria-haspopup="true">
|
||||||
|
Insights
|
||||||
|
<svg aria-hidden="true" class="octicon octicon-triangle-down v-align-middle text-gray" height="11" version="1.1" viewBox="0 0 12 16" width="8"><path fill-rule="evenodd" d="M0 5l6 6 6-6z"/></svg>
|
||||||
|
</button>
|
||||||
|
<div class="dropdown-menu-content js-menu-content">
|
||||||
|
<div class="dropdown-menu dropdown-menu-sw">
|
||||||
|
<a class="dropdown-item" href="/KhronosGroup/glTF-Sample-Models/pulse" data-skip-pjax>
|
||||||
|
<svg aria-hidden="true" class="octicon octicon-pulse" height="16" version="1.1" viewBox="0 0 14 16" width="14"><path fill-rule="evenodd" d="M11.5 8L8.8 5.4 6.6 8.5 5.5 1.6 2.38 8H0v2h3.6l.9-1.8.9 5.4L9 8.5l1.6 1.5H14V8z"/></svg>
|
||||||
|
Pulse
|
||||||
|
</a>
|
||||||
|
<a class="dropdown-item" href="/KhronosGroup/glTF-Sample-Models/graphs" data-skip-pjax>
|
||||||
|
<svg aria-hidden="true" class="octicon octicon-graph" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M16 14v1H0V0h1v14h15zM5 13H3V8h2v5zm4 0H7V3h2v10zm4 0h-2V6h2v7z"/></svg>
|
||||||
|
Graphs
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container new-discussion-timeline experiment-repo-nav">
|
||||||
|
<div class="repository-content">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a href="/KhronosGroup/glTF-Sample-Models/blob/d86fae091e760a868442748ada7efadaaf497b19/2.0/Cube/glTF/Cube_BaseColor.png" class="d-none js-permalink-shortcut" data-hotkey="y">Permalink</a>
|
||||||
|
|
||||||
|
<!-- blob contrib key: blob_contributors:v21:e2eac7be906cccd2e62eabdf96c69566 -->
|
||||||
|
|
||||||
|
<div class="file-navigation js-zeroclipboard-container">
|
||||||
|
|
||||||
|
<div class="select-menu branch-select-menu js-menu-container js-select-menu float-left">
|
||||||
|
<button class=" btn btn-sm select-menu-button js-menu-target css-truncate" data-hotkey="w"
|
||||||
|
|
||||||
|
type="button" aria-label="Switch branches or tags" tabindex="0" aria-haspopup="true">
|
||||||
|
<i>Branch:</i>
|
||||||
|
<span class="js-select-button css-truncate-target">master</span>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<div class="select-menu-modal-holder js-menu-content js-navigation-container" data-pjax>
|
||||||
|
|
||||||
|
<div class="select-menu-modal">
|
||||||
|
<div class="select-menu-header">
|
||||||
|
<svg aria-label="Close" class="octicon octicon-x js-menu-close" height="16" role="img" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M7.48 8l3.75 3.75-1.48 1.48L6 9.48l-3.75 3.75-1.48-1.48L4.52 8 .77 4.25l1.48-1.48L6 6.52l3.75-3.75 1.48 1.48z"/></svg>
|
||||||
|
<span class="select-menu-title">Switch branches/tags</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="select-menu-filters">
|
||||||
|
<div class="select-menu-text-filter">
|
||||||
|
<input type="text" aria-label="Filter branches/tags" id="context-commitish-filter-field" class="form-control js-filterable-field js-navigation-enable" placeholder="Filter branches/tags">
|
||||||
|
</div>
|
||||||
|
<div class="select-menu-tabs">
|
||||||
|
<ul>
|
||||||
|
<li class="select-menu-tab">
|
||||||
|
<a href="#" data-tab-filter="branches" data-filter-placeholder="Filter branches/tags" class="js-select-menu-tab" role="tab">Branches</a>
|
||||||
|
</li>
|
||||||
|
<li class="select-menu-tab">
|
||||||
|
<a href="#" data-tab-filter="tags" data-filter-placeholder="Find a tag…" class="js-select-menu-tab" role="tab">Tags</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="select-menu-list select-menu-tab-bucket js-select-menu-tab-bucket" data-tab-filter="branches" role="menu">
|
||||||
|
|
||||||
|
<div data-filterable-for="context-commitish-filter-field" data-filterable-type="substring">
|
||||||
|
|
||||||
|
|
||||||
|
<a class="select-menu-item js-navigation-item js-navigation-open "
|
||||||
|
href="/KhronosGroup/glTF-Sample-Models/blob/1.1/2.0/Cube/glTF/Cube_BaseColor.png"
|
||||||
|
data-name="1.1"
|
||||||
|
data-skip-pjax="true"
|
||||||
|
rel="nofollow">
|
||||||
|
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"/></svg>
|
||||||
|
<span class="select-menu-item-text css-truncate-target js-select-menu-filter-text">
|
||||||
|
1.1
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
<a class="select-menu-item js-navigation-item js-navigation-open selected"
|
||||||
|
href="/KhronosGroup/glTF-Sample-Models/blob/master/2.0/Cube/glTF/Cube_BaseColor.png"
|
||||||
|
data-name="master"
|
||||||
|
data-skip-pjax="true"
|
||||||
|
rel="nofollow">
|
||||||
|
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"/></svg>
|
||||||
|
<span class="select-menu-item-text css-truncate-target js-select-menu-filter-text">
|
||||||
|
master
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="select-menu-no-results">Nothing to show</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="select-menu-list select-menu-tab-bucket js-select-menu-tab-bucket" data-tab-filter="tags">
|
||||||
|
<div data-filterable-for="context-commitish-filter-field" data-filterable-type="substring">
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="select-menu-no-results">Nothing to show</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="BtnGroup float-right">
|
||||||
|
<a href="/KhronosGroup/glTF-Sample-Models/find/master"
|
||||||
|
class="js-pjax-capture-input btn btn-sm BtnGroup-item"
|
||||||
|
data-pjax
|
||||||
|
data-hotkey="t">
|
||||||
|
Find file
|
||||||
|
</a>
|
||||||
|
<button aria-label="Copy file path to clipboard" class="js-zeroclipboard btn btn-sm BtnGroup-item tooltipped tooltipped-s" data-copied-hint="Copied!" type="button">Copy path</button>
|
||||||
|
</div>
|
||||||
|
<div class="breadcrumb js-zeroclipboard-target">
|
||||||
|
<span class="repo-root js-repo-root"><span class="js-path-segment"><a href="/KhronosGroup/glTF-Sample-Models"><span>glTF-Sample-Models</span></a></span></span><span class="separator">/</span><span class="js-path-segment"><a href="/KhronosGroup/glTF-Sample-Models/tree/master/2.0"><span>2.0</span></a></span><span class="separator">/</span><span class="js-path-segment"><a href="/KhronosGroup/glTF-Sample-Models/tree/master/2.0/Cube"><span>Cube</span></a></span><span class="separator">/</span><span class="js-path-segment"><a href="/KhronosGroup/glTF-Sample-Models/tree/master/2.0/Cube/glTF"><span>glTF</span></a></span><span class="separator">/</span><strong class="final-path">Cube_BaseColor.png</strong>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<include-fragment class="commit-tease" src="/KhronosGroup/glTF-Sample-Models/contributors/master/2.0/Cube/glTF/Cube_BaseColor.png">
|
||||||
|
<div>
|
||||||
|
Fetching contributors…
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="commit-tease-contributors">
|
||||||
|
<img alt="" class="loader-loading float-left" height="16" src="https://assets-cdn.github.com/images/spinners/octocat-spinner-32-EAF2F5.gif" width="16" />
|
||||||
|
<span class="loader-error">Cannot retrieve contributors at this time</span>
|
||||||
|
</div>
|
||||||
|
</include-fragment>
|
||||||
|
<div class="file">
|
||||||
|
<div class="file-header">
|
||||||
|
<div class="file-actions">
|
||||||
|
|
||||||
|
<div class="BtnGroup">
|
||||||
|
<a href="/KhronosGroup/glTF-Sample-Models/raw/master/2.0/Cube/glTF/Cube_BaseColor.png" class="btn btn-sm BtnGroup-item" id="raw-url">Download</a>
|
||||||
|
<a href="/KhronosGroup/glTF-Sample-Models/commits/master/2.0/Cube/glTF/Cube_BaseColor.png" class="btn btn-sm BtnGroup-item" rel="nofollow">History</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<a class="btn-octicon tooltipped tooltipped-nw"
|
||||||
|
href="github-mac://openRepo/https://github.com/KhronosGroup/glTF-Sample-Models?branch=master&filepath=2.0%2FCube%2FglTF%2FCube_BaseColor.png"
|
||||||
|
aria-label="Open this file in GitHub Desktop"
|
||||||
|
data-ga-click="Repository, open with desktop, type:mac">
|
||||||
|
<svg aria-hidden="true" class="octicon octicon-device-desktop" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M15 2H1c-.55 0-1 .45-1 1v9c0 .55.45 1 1 1h5.34c-.25.61-.86 1.39-2.34 2h8c-1.48-.61-2.09-1.39-2.34-2H15c.55 0 1-.45 1-1V3c0-.55-.45-1-1-1zm0 9H1V3h14v8z"/></svg>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<!-- '"` --><!-- </textarea></xmp> --></option></form><form accept-charset="UTF-8" action="/KhronosGroup/glTF-Sample-Models/delete/master/2.0/Cube/glTF/Cube_BaseColor.png" class="inline-form" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓" /><input name="authenticity_token" type="hidden" value="+7aLSRs2xGnlMxUByQuJ6ZrMJhDGMIncdR1LMDNlyoIrgLD4f425Ir0f3hC9BifeaEz7zX3ppuG6iIsp7den0w==" /></div>
|
||||||
|
<button class="btn-octicon btn-octicon-danger tooltipped tooltipped-nw" type="submit"
|
||||||
|
aria-label="Fork this project and delete the file" data-disable-with>
|
||||||
|
<svg aria-hidden="true" class="octicon octicon-trashcan" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M11 2H9c0-.55-.45-1-1-1H5c-.55 0-1 .45-1 1H2c-.55 0-1 .45-1 1v1c0 .55.45 1 1 1v9c0 .55.45 1 1 1h7c.55 0 1-.45 1-1V5c.55 0 1-.45 1-1V3c0-.55-.45-1-1-1zm-1 12H3V5h1v8h1V5h1v8h1V5h1v8h1V5h1v9zm1-10H2V3h9v1z"/></svg>
|
||||||
|
</button>
|
||||||
|
</form> </div>
|
||||||
|
|
||||||
|
<div class="file-info">
|
||||||
|
871 KB
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div itemprop="text" class="blob-wrapper data type-text">
|
||||||
|
<div class="image">
|
||||||
|
<span class="border-wrap"><img src="/KhronosGroup/glTF-Sample-Models/blob/master/2.0/Cube/glTF/Cube_BaseColor.png?raw=true" alt="Cube_BaseColor.png"></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<button type="button" data-facebox="#jump-to-line" data-facebox-class="linejump" data-hotkey="l" class="d-none">Jump to Line</button>
|
||||||
|
<div id="jump-to-line" style="display:none">
|
||||||
|
<!-- '"` --><!-- </textarea></xmp> --></option></form><form accept-charset="UTF-8" action="" class="js-jump-to-line-form" method="get"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓" /></div>
|
||||||
|
<input class="form-control linejump-input js-jump-to-line-field" type="text" placeholder="Jump to line…" aria-label="Jump to line" autofocus>
|
||||||
|
<button type="submit" class="btn">Go</button>
|
||||||
|
</form></div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="modal-backdrop js-touch-events"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="container site-footer-container">
|
||||||
|
<div class="site-footer " role="contentinfo">
|
||||||
|
<ul class="site-footer-links float-right">
|
||||||
|
<li><a href="https://github.com/contact" data-ga-click="Footer, go to contact, text:contact">Contact GitHub</a></li>
|
||||||
|
<li><a href="https://developer.github.com" data-ga-click="Footer, go to api, text:api">API</a></li>
|
||||||
|
<li><a href="https://training.github.com" data-ga-click="Footer, go to training, text:training">Training</a></li>
|
||||||
|
<li><a href="https://shop.github.com" data-ga-click="Footer, go to shop, text:shop">Shop</a></li>
|
||||||
|
<li><a href="https://github.com/blog" data-ga-click="Footer, go to blog, text:blog">Blog</a></li>
|
||||||
|
<li><a href="https://github.com/about" data-ga-click="Footer, go to about, text:about">About</a></li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<a href="https://github.com" aria-label="Homepage" class="site-footer-mark" title="GitHub">
|
||||||
|
<svg aria-hidden="true" class="octicon octicon-mark-github" height="24" version="1.1" viewBox="0 0 16 16" width="24"><path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z"/></svg>
|
||||||
|
</a>
|
||||||
|
<ul class="site-footer-links">
|
||||||
|
<li>© 2017 <span title="0.29038s from github-fe-bbb28be.cp1-iad.github.net">GitHub</span>, Inc.</li>
|
||||||
|
<li><a href="https://github.com/site/terms" data-ga-click="Footer, go to terms, text:terms">Terms</a></li>
|
||||||
|
<li><a href="https://github.com/site/privacy" data-ga-click="Footer, go to privacy, text:privacy">Privacy</a></li>
|
||||||
|
<li><a href="https://github.com/security" data-ga-click="Footer, go to security, text:security">Security</a></li>
|
||||||
|
<li><a href="https://status.github.com/" data-ga-click="Footer, go to status, text:status">Status</a></li>
|
||||||
|
<li><a href="https://help.github.com" data-ga-click="Footer, go to help, text:help">Help</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div id="ajax-error-message" class="ajax-error-message flash flash-error">
|
||||||
|
<svg aria-hidden="true" class="octicon octicon-alert" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M8.865 1.52c-.18-.31-.51-.5-.87-.5s-.69.19-.87.5L.275 13.5c-.18.31-.18.69 0 1 .19.31.52.5.87.5h13.7c.36 0 .69-.19.86-.5.17-.31.18-.69.01-1L8.865 1.52zM8.995 13h-2v-2h2v2zm0-3h-2V6h2v4z"/></svg>
|
||||||
|
<button type="button" class="flash-close js-flash-close js-ajax-error-dismiss" aria-label="Dismiss error">
|
||||||
|
<svg aria-hidden="true" class="octicon octicon-x" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M7.48 8l3.75 3.75-1.48 1.48L6 9.48l-3.75 3.75-1.48-1.48L4.52 8 .77 4.25l1.48-1.48L6 6.52l3.75-3.75 1.48 1.48z"/></svg>
|
||||||
|
</button>
|
||||||
|
You can't perform that action at this time.
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<script crossorigin="anonymous" integrity="sha256-EjcFZu3GC0BKxFiWen8voNZpbamfN+333rEZbxr/Xwo=" src="https://assets-cdn.github.com/assets/frameworks-12370566edc60b404ac458967a7f2fa0d6696da99f37edf7deb1196f1aff5f0a.js"></script>
|
||||||
|
<script async="async" crossorigin="anonymous" integrity="sha256-hMRPCrOL1keRE33pLi8bw7DGU0k0WPbrLrin8nqGbj4=" src="https://assets-cdn.github.com/assets/github-84c44f0ab38bd64791137de92e2f1bc3b0c653493458f6eb2eb8a7f27a866e3e.js"></script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="js-stale-session-flash stale-session-flash flash flash-warn flash-banner d-none">
|
||||||
|
<svg aria-hidden="true" class="octicon octicon-alert" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M8.865 1.52c-.18-.31-.51-.5-.87-.5s-.69.19-.87.5L.275 13.5c-.18.31-.18.69 0 1 .19.31.52.5.87.5h13.7c.36 0 .69-.19.86-.5.17-.31.18-.69.01-1L8.865 1.52zM8.995 13h-2v-2h2v2zm0-3h-2V6h2v4z"/></svg>
|
||||||
|
<span class="signed-in-tab-flash">You signed in with another tab or window. <a href="">Reload</a> to refresh your session.</span>
|
||||||
|
<span class="signed-out-tab-flash">You signed out in another tab or window. <a href="">Reload</a> to refresh your session.</span>
|
||||||
|
</div>
|
||||||
|
<div class="facebox" id="facebox" style="display:none;">
|
||||||
|
<div class="facebox-popup">
|
||||||
|
<div class="facebox-content" role="dialog" aria-labelledby="facebox-header" aria-describedby="facebox-description">
|
||||||
|
</div>
|
||||||
|
<button type="button" class="facebox-close js-facebox-close" aria-label="Close modal">
|
||||||
|
<svg aria-hidden="true" class="octicon octicon-x" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M7.48 8l3.75 3.75-1.48 1.48L6 9.48l-3.75 3.75-1.48-1.48L4.52 8 .77 4.25l1.48-1.48L6 6.52l3.75-3.75 1.48 1.48z"/></svg>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
715
models/Cube/Cube_MetallicRoughness.png
Normal file
715
models/Cube/Cube_MetallicRoughness.png
Normal file
@ -0,0 +1,715 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<link crossorigin="anonymous" href="https://assets-cdn.github.com/assets/frameworks-148da7a2b8b9ad739a5a0b8b68683fed4ac7e50ce8185f17d86aa05e75ed376e.css" integrity="sha256-FI2nori5rXOaWguLaGg/7UrH5QzoGF8X2GqgXnXtN24=" media="all" rel="stylesheet" />
|
||||||
|
<link crossorigin="anonymous" href="https://assets-cdn.github.com/assets/github-4cb6b37ae0c653978a80cfe0c9288fcb02f00f746d1e076237703e57761c8973.css" integrity="sha256-TLazeuDGU5eKgM/gySiPywLwD3RtHgdiN3A+V3YciXM=" media="all" rel="stylesheet" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<meta name="viewport" content="width=device-width">
|
||||||
|
|
||||||
|
<title>glTF-Sample-Models/Cube_MetallicRoughness.png at master · KhronosGroup/glTF-Sample-Models</title>
|
||||||
|
<link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="GitHub">
|
||||||
|
<link rel="fluid-icon" href="https://github.com/fluidicon.png" title="GitHub">
|
||||||
|
<meta property="fb:app_id" content="1401488693436528">
|
||||||
|
|
||||||
|
|
||||||
|
<meta content="https://avatars2.githubusercontent.com/u/1608701?v=3&s=400" property="og:image" /><meta content="GitHub" property="og:site_name" /><meta content="object" property="og:type" /><meta content="KhronosGroup/glTF-Sample-Models" property="og:title" /><meta content="https://github.com/KhronosGroup/glTF-Sample-Models" property="og:url" /><meta content="glTF-Sample-Models - glTF Sample Models" property="og:description" />
|
||||||
|
|
||||||
|
<link rel="assets" href="https://assets-cdn.github.com/">
|
||||||
|
<link rel="web-socket" href="wss://live.github.com/_sockets/VjI6MTI0MzUxODA0OmM4ZWZhYWNkODg2MjEwYTZkMGU1M2M5ZTgxNTdmMTAyYmEyNDI1Y2FhZjUwYzhiYjRlNDZmMzQyNzkyYzgxYzY=--4d722a83d604fd2fa26d593c80cb0ded754337f4">
|
||||||
|
<meta name="pjax-timeout" content="1000">
|
||||||
|
<link rel="sudo-modal" href="/sessions/sudo_modal">
|
||||||
|
<meta name="request-id" content="937C:246F8:93F3A9:E6F9D9:59295D7B" data-pjax-transient>
|
||||||
|
|
||||||
|
|
||||||
|
<meta name="selected-link" value="repo_source" data-pjax-transient>
|
||||||
|
|
||||||
|
<meta name="google-site-verification" content="KT5gs8h0wvaagLKAVWq8bbeNwnZZK1r1XQysX3xurLU">
|
||||||
|
<meta name="google-site-verification" content="ZzhVyEFwb7w3e0-uOTltm8Jsck2F5StVihD0exw2fsA">
|
||||||
|
<meta name="google-analytics" content="UA-3769691-2">
|
||||||
|
|
||||||
|
<meta content="collector.githubapp.com" name="octolytics-host" /><meta content="github" name="octolytics-app-id" /><meta content="https://collector.githubapp.com/github-external/browser_event" name="octolytics-event-url" /><meta content="937C:246F8:93F3A9:E6F9D9:59295D7B" name="octolytics-dimension-request_id" /><meta content="sea" name="octolytics-dimension-region_edge" /><meta content="iad" name="octolytics-dimension-region_render" /><meta content="18676" name="octolytics-actor-id" /><meta content="syoyo" name="octolytics-actor-login" /><meta content="325285e9d46c6ec39edf55e947c8c362b28925a437f41d10016a69c5e8213c66" name="octolytics-actor-hash" />
|
||||||
|
<meta content="/<user-name>/<repo-name>/blob/show" data-pjax-transient="true" name="analytics-location" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<meta class="js-ga-set" name="dimension1" content="Logged In">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<meta name="hostname" content="github.com">
|
||||||
|
<meta name="user-login" content="syoyo">
|
||||||
|
|
||||||
|
<meta name="expected-hostname" content="github.com">
|
||||||
|
<meta name="js-proxy-site-detection-payload" content="M2JjNzkwZGE2MjMzOGZlNjVjZWU1N2U5ODVmNDQ2NWEzZDE4ZGI5MTU2Zjg0MjFlZTFlMTk4ZDA0MjYwMjhkYXx7InJlbW90ZV9hZGRyZXNzIjoiMjEwLjE0OS4yNTEuNTUiLCJyZXF1ZXN0X2lkIjoiOTM3QzoyNDZGODo5M0YzQTk6RTZGOUQ5OjU5Mjk1RDdCIiwidGltZXN0YW1wIjoxNDk1ODgzMTM5LCJob3N0IjoiZ2l0aHViLmNvbSJ9">
|
||||||
|
|
||||||
|
|
||||||
|
<meta name="html-safe-nonce" content="a0781e426efdb2cdf113a43ff2217ccaf104341e">
|
||||||
|
|
||||||
|
<meta http-equiv="x-pjax-version" content="757efe3f0bbc93dc131b9a7d2ae5448c">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<meta name="description" content="glTF-Sample-Models - glTF Sample Models">
|
||||||
|
<meta name="go-import" content="github.com/KhronosGroup/glTF-Sample-Models git https://github.com/KhronosGroup/glTF-Sample-Models.git">
|
||||||
|
|
||||||
|
<meta content="1608701" name="octolytics-dimension-user_id" /><meta content="KhronosGroup" name="octolytics-dimension-user_login" /><meta content="71492395" name="octolytics-dimension-repository_id" /><meta content="KhronosGroup/glTF-Sample-Models" name="octolytics-dimension-repository_nwo" /><meta content="true" name="octolytics-dimension-repository_public" /><meta content="false" name="octolytics-dimension-repository_is_fork" /><meta content="71492395" name="octolytics-dimension-repository_network_root_id" /><meta content="KhronosGroup/glTF-Sample-Models" name="octolytics-dimension-repository_network_root_nwo" />
|
||||||
|
<link href="https://github.com/KhronosGroup/glTF-Sample-Models/commits/master.atom" rel="alternate" title="Recent Commits to glTF-Sample-Models:master" type="application/atom+xml">
|
||||||
|
|
||||||
|
|
||||||
|
<link rel="canonical" href="https://github.com/KhronosGroup/glTF-Sample-Models/blob/master/2.0/Cube/glTF/Cube_MetallicRoughness.png" data-pjax-transient>
|
||||||
|
|
||||||
|
|
||||||
|
<meta name="browser-stats-url" content="https://api.github.com/_private/browser/stats">
|
||||||
|
|
||||||
|
<meta name="browser-errors-url" content="https://api.github.com/_private/browser/errors">
|
||||||
|
|
||||||
|
<link rel="mask-icon" href="https://assets-cdn.github.com/pinned-octocat.svg" color="#000000">
|
||||||
|
<link rel="icon" type="image/x-icon" href="https://assets-cdn.github.com/favicon.ico">
|
||||||
|
|
||||||
|
<meta name="theme-color" content="#1e2327">
|
||||||
|
|
||||||
|
|
||||||
|
<meta name="u2f-support" content="true">
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body class="logged-in env-production emoji-size-boost page-blob">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="position-relative js-header-wrapper ">
|
||||||
|
<a href="#start-of-content" tabindex="1" class="accessibility-aid js-skip-to-content">Skip to content</a>
|
||||||
|
<div id="js-pjax-loader-bar" class="pjax-loader-bar"><div class="progress"></div></div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="header" role="banner">
|
||||||
|
<div class="container clearfix">
|
||||||
|
<a class="header-logo-invertocat" href="https://github.com/" data-hotkey="g d" aria-label="Homepage" data-ga-click="Header, go to dashboard, icon:logo">
|
||||||
|
<svg aria-hidden="true" class="octicon octicon-mark-github" height="32" version="1.1" viewBox="0 0 16 16" width="32"><path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z"/></svg>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="header-search scoped-search site-scoped-search js-site-search" role="search">
|
||||||
|
<!-- '"` --><!-- </textarea></xmp> --></option></form><form accept-charset="UTF-8" action="/KhronosGroup/glTF-Sample-Models/search" class="js-site-search-form" data-scoped-search-url="/KhronosGroup/glTF-Sample-Models/search" data-unscoped-search-url="/search" method="get"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓" /></div>
|
||||||
|
<label class="form-control header-search-wrapper js-chromeless-input-container">
|
||||||
|
<a href="/KhronosGroup/glTF-Sample-Models/blob/master/2.0/Cube/glTF/Cube_MetallicRoughness.png" class="header-search-scope no-underline">This repository</a>
|
||||||
|
<input type="text"
|
||||||
|
class="form-control header-search-input js-site-search-focus js-site-search-field is-clearable"
|
||||||
|
data-hotkey="s"
|
||||||
|
name="q"
|
||||||
|
value=""
|
||||||
|
placeholder="Search"
|
||||||
|
aria-label="Search this repository"
|
||||||
|
data-unscoped-placeholder="Search GitHub"
|
||||||
|
data-scoped-placeholder="Search"
|
||||||
|
autocapitalize="off">
|
||||||
|
<input type="hidden" class="js-site-search-type-field" name="type" >
|
||||||
|
</label>
|
||||||
|
</form></div>
|
||||||
|
|
||||||
|
|
||||||
|
<ul class="header-nav float-left" role="navigation">
|
||||||
|
<li class="header-nav-item">
|
||||||
|
<a href="/pulls" aria-label="Pull requests you created" class="js-selected-navigation-item header-nav-link" data-ga-click="Header, click, Nav menu - item:pulls context:user" data-hotkey="g p" data-selected-links="/pulls /pulls/assigned /pulls/mentioned /pulls">
|
||||||
|
Pull requests
|
||||||
|
</a> </li>
|
||||||
|
<li class="header-nav-item">
|
||||||
|
<a href="/issues" aria-label="Issues you created" class="js-selected-navigation-item header-nav-link" data-ga-click="Header, click, Nav menu - item:issues context:user" data-hotkey="g i" data-selected-links="/issues /issues/assigned /issues/mentioned /issues">
|
||||||
|
Issues
|
||||||
|
</a> </li>
|
||||||
|
<li class="header-nav-item">
|
||||||
|
<a href="/marketplace" class="js-selected-navigation-item header-nav-link" data-ga-click="Header, click, Nav menu - item:marketplace context:user" data-selected-links=" /marketplace">
|
||||||
|
Marketplace
|
||||||
|
</a> </li>
|
||||||
|
<li class="header-nav-item">
|
||||||
|
<a class="header-nav-link" href="https://gist.github.com/" data-ga-click="Header, go to gist, text:gist">Gist</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
<ul class="header-nav user-nav float-right" id="user-links">
|
||||||
|
<li class="header-nav-item">
|
||||||
|
|
||||||
|
<a href="/notifications" aria-label="You have no unread notifications" class="header-nav-link notification-indicator tooltipped tooltipped-s js-socket-channel js-notification-indicator " data-channel="notification-changed:18676" data-ga-click="Header, go to notifications, icon:read" data-hotkey="g n">
|
||||||
|
<span class="mail-status "></span>
|
||||||
|
<svg aria-hidden="true" class="octicon octicon-bell float-left" height="16" version="1.1" viewBox="0 0 14 16" width="14"><path fill-rule="evenodd" d="M14 12v1H0v-1l.73-.58c.77-.77.81-2.55 1.19-4.42C2.69 3.23 6 2 6 2c0-.55.45-1 1-1s1 .45 1 1c0 0 3.39 1.23 4.16 5 .38 1.88.42 3.66 1.19 4.42l.66.58H14zm-7 4c1.11 0 2-.89 2-2H5c0 1.11.89 2 2 2z"/></svg>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="header-nav-item dropdown js-menu-container">
|
||||||
|
<a class="header-nav-link tooltipped tooltipped-s js-menu-target" href="/new"
|
||||||
|
aria-label="Create new…"
|
||||||
|
data-ga-click="Header, create new, icon:add">
|
||||||
|
<svg aria-hidden="true" class="octicon octicon-plus float-left" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M12 9H7v5H5V9H0V7h5V2h2v5h5z"/></svg>
|
||||||
|
<span class="dropdown-caret"></span>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<div class="dropdown-menu-content js-menu-content">
|
||||||
|
<ul class="dropdown-menu dropdown-menu-sw">
|
||||||
|
|
||||||
|
<a class="dropdown-item" href="/new" data-ga-click="Header, create new repository">
|
||||||
|
New repository
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a class="dropdown-item" href="/new/import" data-ga-click="Header, import a repository">
|
||||||
|
Import repository
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a class="dropdown-item" href="https://gist.github.com/" data-ga-click="Header, create new gist">
|
||||||
|
New gist
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a class="dropdown-item" href="/organizations/new" data-ga-click="Header, create new organization">
|
||||||
|
New organization
|
||||||
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="dropdown-divider"></div>
|
||||||
|
<div class="dropdown-header">
|
||||||
|
<span title="KhronosGroup/glTF-Sample-Models">This repository</span>
|
||||||
|
</div>
|
||||||
|
<a class="dropdown-item" href="/KhronosGroup/glTF-Sample-Models/issues/new" data-ga-click="Header, create new issue">
|
||||||
|
New issue
|
||||||
|
</a>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="header-nav-item dropdown js-menu-container">
|
||||||
|
<a class="header-nav-link name tooltipped tooltipped-sw js-menu-target" href="/syoyo"
|
||||||
|
aria-label="View profile and more"
|
||||||
|
data-ga-click="Header, show menu, icon:avatar">
|
||||||
|
<img alt="@syoyo" class="avatar" src="https://avatars1.githubusercontent.com/u/18676?v=3&s=40" height="20" width="20">
|
||||||
|
<span class="dropdown-caret"></span>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<div class="dropdown-menu-content js-menu-content">
|
||||||
|
<div class="dropdown-menu dropdown-menu-sw">
|
||||||
|
<div class="dropdown-header header-nav-current-user css-truncate">
|
||||||
|
Signed in as <strong class="css-truncate-target">syoyo</strong>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="dropdown-divider"></div>
|
||||||
|
|
||||||
|
<a class="dropdown-item" href="/syoyo" data-ga-click="Header, go to profile, text:your profile">
|
||||||
|
Your profile
|
||||||
|
</a>
|
||||||
|
<a class="dropdown-item" href="/syoyo?tab=stars" data-ga-click="Header, go to starred repos, text:your stars">
|
||||||
|
Your stars
|
||||||
|
</a>
|
||||||
|
<a class="dropdown-item" href="/explore" data-ga-click="Header, go to explore, text:explore">
|
||||||
|
Explore
|
||||||
|
</a>
|
||||||
|
<a class="dropdown-item" href="https://help.github.com" data-ga-click="Header, go to help, text:help">
|
||||||
|
Help
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<div class="dropdown-divider"></div>
|
||||||
|
|
||||||
|
<a class="dropdown-item" href="/settings/profile" data-ga-click="Header, go to settings, icon:settings">
|
||||||
|
Settings
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<!-- '"` --><!-- </textarea></xmp> --></option></form><form accept-charset="UTF-8" action="/logout" class="logout-form" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓" /><input name="authenticity_token" type="hidden" value="JUnpA+WIIuG97mpSLaUorVI0m6/UPdolZv/aOAghE6xKzBJfuCLTXQC1M6nSWKPBe0s1rE7dDNomwx9A4IiqTw==" /></div>
|
||||||
|
<button type="submit" class="dropdown-item dropdown-signout" data-ga-click="Header, sign out, icon:logout">
|
||||||
|
Sign out
|
||||||
|
</button>
|
||||||
|
</form> </div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- '"` --><!-- </textarea></xmp> --></option></form><form accept-charset="UTF-8" action="/logout" class="sr-only right-0" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓" /><input name="authenticity_token" type="hidden" value="JINb+AnK1cOLP5vUAKBLb606fXDL2B1OrTJp30fKlGFLBqCkVGAkfzZkwi//XcADhEXTc1E4y7HtDqynr2Mtgg==" /></div>
|
||||||
|
<button type="submit" class="dropdown-item dropdown-signout" data-ga-click="Header, sign out, icon:logout">
|
||||||
|
Sign out
|
||||||
|
</button>
|
||||||
|
</form> </div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="start-of-content" class="accessibility-aid"></div>
|
||||||
|
|
||||||
|
<div id="js-flash-container">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div role="main">
|
||||||
|
<div itemscope itemtype="http://schema.org/SoftwareSourceCode">
|
||||||
|
<div id="js-repo-pjax-container" data-pjax-container>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="pagehead repohead instapaper_ignore readability-menu experiment-repo-nav">
|
||||||
|
<div class="container repohead-details-container">
|
||||||
|
|
||||||
|
<ul class="pagehead-actions">
|
||||||
|
<li>
|
||||||
|
<!-- '"` --><!-- </textarea></xmp> --></option></form><form accept-charset="UTF-8" action="/notifications/subscribe" class="js-social-container" data-autosubmit="true" data-remote="true" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓" /><input name="authenticity_token" type="hidden" value="mgVM8QnTA+zbCUoedsrzs1j6ZUufDPqHUYnomoznzBIP1OlR/8/4Sr98c7YJtknA4vH6seFGekLnUhgcDrF5HQ==" /></div> <input class="form-control" id="repository_id" name="repository_id" type="hidden" value="71492395" />
|
||||||
|
|
||||||
|
<div class="select-menu js-menu-container js-select-menu">
|
||||||
|
<a href="/KhronosGroup/glTF-Sample-Models/subscription"
|
||||||
|
class="btn btn-sm btn-with-count select-menu-button js-menu-target" role="button" tabindex="0" aria-haspopup="true"
|
||||||
|
data-ga-click="Repository, click Watch settings, action:blob#show">
|
||||||
|
<span class="js-select-button">
|
||||||
|
<svg aria-hidden="true" class="octicon octicon-eye" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M8.06 2C3 2 0 8 0 8s3 6 8.06 6C13 14 16 8 16 8s-3-6-7.94-6zM8 12c-2.2 0-4-1.78-4-4 0-2.2 1.8-4 4-4 2.22 0 4 1.8 4 4 0 2.22-1.78 4-4 4zm2-4c0 1.11-.89 2-2 2-1.11 0-2-.89-2-2 0-1.11.89-2 2-2 1.11 0 2 .89 2 2z"/></svg>
|
||||||
|
Watch
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
<a class="social-count js-social-count"
|
||||||
|
href="/KhronosGroup/glTF-Sample-Models/watchers"
|
||||||
|
aria-label="23 users are watching this repository">
|
||||||
|
23
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<div class="select-menu-modal-holder">
|
||||||
|
<div class="select-menu-modal subscription-menu-modal js-menu-content">
|
||||||
|
<div class="select-menu-header js-navigation-enable" tabindex="-1">
|
||||||
|
<svg aria-label="Close" class="octicon octicon-x js-menu-close" height="16" role="img" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M7.48 8l3.75 3.75-1.48 1.48L6 9.48l-3.75 3.75-1.48-1.48L4.52 8 .77 4.25l1.48-1.48L6 6.52l3.75-3.75 1.48 1.48z"/></svg>
|
||||||
|
<span class="select-menu-title">Notifications</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="select-menu-list js-navigation-container" role="menu">
|
||||||
|
|
||||||
|
<div class="select-menu-item js-navigation-item selected" role="menuitem" tabindex="0">
|
||||||
|
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"/></svg>
|
||||||
|
<div class="select-menu-item-text">
|
||||||
|
<input checked="checked" id="do_included" name="do" type="radio" value="included" />
|
||||||
|
<span class="select-menu-item-heading">Not watching</span>
|
||||||
|
<span class="description">Be notified when participating or @mentioned.</span>
|
||||||
|
<span class="js-select-button-text hidden-select-button-text">
|
||||||
|
<svg aria-hidden="true" class="octicon octicon-eye" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M8.06 2C3 2 0 8 0 8s3 6 8.06 6C13 14 16 8 16 8s-3-6-7.94-6zM8 12c-2.2 0-4-1.78-4-4 0-2.2 1.8-4 4-4 2.22 0 4 1.8 4 4 0 2.22-1.78 4-4 4zm2-4c0 1.11-.89 2-2 2-1.11 0-2-.89-2-2 0-1.11.89-2 2-2 1.11 0 2 .89 2 2z"/></svg>
|
||||||
|
Watch
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="select-menu-item js-navigation-item " role="menuitem" tabindex="0">
|
||||||
|
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"/></svg>
|
||||||
|
<div class="select-menu-item-text">
|
||||||
|
<input id="do_subscribed" name="do" type="radio" value="subscribed" />
|
||||||
|
<span class="select-menu-item-heading">Watching</span>
|
||||||
|
<span class="description">Be notified of all conversations.</span>
|
||||||
|
<span class="js-select-button-text hidden-select-button-text">
|
||||||
|
<svg aria-hidden="true" class="octicon octicon-eye" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M8.06 2C3 2 0 8 0 8s3 6 8.06 6C13 14 16 8 16 8s-3-6-7.94-6zM8 12c-2.2 0-4-1.78-4-4 0-2.2 1.8-4 4-4 2.22 0 4 1.8 4 4 0 2.22-1.78 4-4 4zm2-4c0 1.11-.89 2-2 2-1.11 0-2-.89-2-2 0-1.11.89-2 2-2 1.11 0 2 .89 2 2z"/></svg>
|
||||||
|
Unwatch
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="select-menu-item js-navigation-item " role="menuitem" tabindex="0">
|
||||||
|
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"/></svg>
|
||||||
|
<div class="select-menu-item-text">
|
||||||
|
<input id="do_ignore" name="do" type="radio" value="ignore" />
|
||||||
|
<span class="select-menu-item-heading">Ignoring</span>
|
||||||
|
<span class="description">Never be notified.</span>
|
||||||
|
<span class="js-select-button-text hidden-select-button-text">
|
||||||
|
<svg aria-hidden="true" class="octicon octicon-mute" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M8 2.81v10.38c0 .67-.81 1-1.28.53L3 10H1c-.55 0-1-.45-1-1V7c0-.55.45-1 1-1h2l3.72-3.72C7.19 1.81 8 2.14 8 2.81zm7.53 3.22l-1.06-1.06-1.97 1.97-1.97-1.97-1.06 1.06L11.44 8 9.47 9.97l1.06 1.06 1.97-1.97 1.97 1.97 1.06-1.06L13.56 8l1.97-1.97z"/></svg>
|
||||||
|
Stop ignoring
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<div class="js-toggler-container js-social-container starring-container ">
|
||||||
|
<!-- '"` --><!-- </textarea></xmp> --></option></form><form accept-charset="UTF-8" action="/KhronosGroup/glTF-Sample-Models/unstar" class="starred" data-remote="true" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓" /><input name="authenticity_token" type="hidden" value="ix1iDI4Pv18/Bsz+lWDn9FYiMpRjR2TgmwCQboUPFrcLd4iicR0VKRFnnCBBpLHTdjuXigHm5M3QGXpSUHKcLw==" /></div>
|
||||||
|
<button
|
||||||
|
type="submit"
|
||||||
|
class="btn btn-sm btn-with-count js-toggler-target"
|
||||||
|
aria-label="Unstar this repository" title="Unstar KhronosGroup/glTF-Sample-Models"
|
||||||
|
data-ga-click="Repository, click unstar button, action:blob#show; text:Unstar">
|
||||||
|
<svg aria-hidden="true" class="octicon octicon-star" height="16" version="1.1" viewBox="0 0 14 16" width="14"><path fill-rule="evenodd" d="M14 6l-4.9-.64L7 1 4.9 5.36 0 6l3.6 3.26L2.67 14 7 11.67 11.33 14l-.93-4.74z"/></svg>
|
||||||
|
Unstar
|
||||||
|
</button>
|
||||||
|
<a class="social-count js-social-count" href="/KhronosGroup/glTF-Sample-Models/stargazers"
|
||||||
|
aria-label="52 users starred this repository">
|
||||||
|
52
|
||||||
|
</a>
|
||||||
|
</form>
|
||||||
|
<!-- '"` --><!-- </textarea></xmp> --></option></form><form accept-charset="UTF-8" action="/KhronosGroup/glTF-Sample-Models/star" class="unstarred" data-remote="true" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓" /><input name="authenticity_token" type="hidden" value="aoxR/ric31m9DfdrZM5USpFFCxlSmWRE2emWMvlyQ+TVbBAlxlczvbwok2ozvYslo6JpUW5IfOlrr+UHEa+vVg==" /></div>
|
||||||
|
<button
|
||||||
|
type="submit"
|
||||||
|
class="btn btn-sm btn-with-count js-toggler-target"
|
||||||
|
aria-label="Star this repository" title="Star KhronosGroup/glTF-Sample-Models"
|
||||||
|
data-ga-click="Repository, click star button, action:blob#show; text:Star">
|
||||||
|
<svg aria-hidden="true" class="octicon octicon-star" height="16" version="1.1" viewBox="0 0 14 16" width="14"><path fill-rule="evenodd" d="M14 6l-4.9-.64L7 1 4.9 5.36 0 6l3.6 3.26L2.67 14 7 11.67 11.33 14l-.93-4.74z"/></svg>
|
||||||
|
Star
|
||||||
|
</button>
|
||||||
|
<a class="social-count js-social-count" href="/KhronosGroup/glTF-Sample-Models/stargazers"
|
||||||
|
aria-label="52 users starred this repository">
|
||||||
|
52
|
||||||
|
</a>
|
||||||
|
</form> </div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<a href="#fork-destination-box" class="btn btn-sm btn-with-count"
|
||||||
|
title="Fork your own copy of KhronosGroup/glTF-Sample-Models to your account"
|
||||||
|
aria-label="Fork your own copy of KhronosGroup/glTF-Sample-Models to your account"
|
||||||
|
rel="facebox"
|
||||||
|
data-ga-click="Repository, show fork modal, action:blob#show; text:Fork">
|
||||||
|
<svg aria-hidden="true" class="octicon octicon-repo-forked" height="16" version="1.1" viewBox="0 0 10 16" width="10"><path fill-rule="evenodd" d="M8 1a1.993 1.993 0 0 0-1 3.72V6L5 8 3 6V4.72A1.993 1.993 0 0 0 2 1a1.993 1.993 0 0 0-1 3.72V6.5l3 3v1.78A1.993 1.993 0 0 0 5 15a1.993 1.993 0 0 0 1-3.72V9.5l3-3V4.72A1.993 1.993 0 0 0 8 1zM2 4.2C1.34 4.2.8 3.65.8 3c0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2zm3 10c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2zm3-10c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2z"/></svg>
|
||||||
|
Fork
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<div id="fork-destination-box" style="display: none;">
|
||||||
|
<h2 class="facebox-header" data-facebox-id="facebox-header">Where should we fork this repository?</h2>
|
||||||
|
<include-fragment src=""
|
||||||
|
class="js-fork-select-fragment fork-select-fragment"
|
||||||
|
data-url="/KhronosGroup/glTF-Sample-Models/fork?fragment=1">
|
||||||
|
<img alt="Loading" height="64" src="https://assets-cdn.github.com/images/spinners/octocat-spinner-128.gif" width="64" />
|
||||||
|
</include-fragment>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<a href="/KhronosGroup/glTF-Sample-Models/network" class="social-count"
|
||||||
|
aria-label="21 users forked this repository">
|
||||||
|
21
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h1 class="public ">
|
||||||
|
<svg aria-hidden="true" class="octicon octicon-repo" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M4 9H3V8h1v1zm0-3H3v1h1V6zm0-2H3v1h1V4zm0-2H3v1h1V2zm8-1v12c0 .55-.45 1-1 1H6v2l-1.5-1.5L3 16v-2H1c-.55 0-1-.45-1-1V1c0-.55.45-1 1-1h10c.55 0 1 .45 1 1zm-1 10H1v2h2v-1h3v1h5v-2zm0-10H2v9h9V1z"/></svg>
|
||||||
|
<span class="author" itemprop="author"><a href="/KhronosGroup" class="url fn" rel="author">KhronosGroup</a></span><!--
|
||||||
|
--><span class="path-divider">/</span><!--
|
||||||
|
--><strong itemprop="name"><a href="/KhronosGroup/glTF-Sample-Models" data-pjax="#js-repo-pjax-container">glTF-Sample-Models</a></strong>
|
||||||
|
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="container">
|
||||||
|
|
||||||
|
<nav class="reponav js-repo-nav js-sidenav-container-pjax"
|
||||||
|
itemscope
|
||||||
|
itemtype="http://schema.org/BreadcrumbList"
|
||||||
|
role="navigation"
|
||||||
|
data-pjax="#js-repo-pjax-container">
|
||||||
|
|
||||||
|
<span itemscope itemtype="http://schema.org/ListItem" itemprop="itemListElement">
|
||||||
|
<a href="/KhronosGroup/glTF-Sample-Models" class="js-selected-navigation-item selected reponav-item" data-hotkey="g c" data-selected-links="repo_source repo_downloads repo_commits repo_releases repo_tags repo_branches /KhronosGroup/glTF-Sample-Models" itemprop="url">
|
||||||
|
<svg aria-hidden="true" class="octicon octicon-code" height="16" version="1.1" viewBox="0 0 14 16" width="14"><path fill-rule="evenodd" d="M9.5 3L8 4.5 11.5 8 8 11.5 9.5 13 14 8 9.5 3zm-5 0L0 8l4.5 5L6 11.5 2.5 8 6 4.5 4.5 3z"/></svg>
|
||||||
|
<span itemprop="name">Code</span>
|
||||||
|
<meta itemprop="position" content="1">
|
||||||
|
</a> </span>
|
||||||
|
|
||||||
|
<span itemscope itemtype="http://schema.org/ListItem" itemprop="itemListElement">
|
||||||
|
<a href="/KhronosGroup/glTF-Sample-Models/issues" class="js-selected-navigation-item reponav-item" data-hotkey="g i" data-selected-links="repo_issues repo_labels repo_milestones /KhronosGroup/glTF-Sample-Models/issues" itemprop="url">
|
||||||
|
<svg aria-hidden="true" class="octicon octicon-issue-opened" height="16" version="1.1" viewBox="0 0 14 16" width="14"><path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"/></svg>
|
||||||
|
<span itemprop="name">Issues</span>
|
||||||
|
<span class="Counter">13</span>
|
||||||
|
<meta itemprop="position" content="2">
|
||||||
|
</a> </span>
|
||||||
|
|
||||||
|
<span itemscope itemtype="http://schema.org/ListItem" itemprop="itemListElement">
|
||||||
|
<a href="/KhronosGroup/glTF-Sample-Models/pulls" class="js-selected-navigation-item reponav-item" data-hotkey="g p" data-selected-links="repo_pulls /KhronosGroup/glTF-Sample-Models/pulls" itemprop="url">
|
||||||
|
<svg aria-hidden="true" class="octicon octicon-git-pull-request" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M11 11.28V5c-.03-.78-.34-1.47-.94-2.06C9.46 2.35 8.78 2.03 8 2H7V0L4 3l3 3V4h1c.27.02.48.11.69.31.21.2.3.42.31.69v6.28A1.993 1.993 0 0 0 10 15a1.993 1.993 0 0 0 1-3.72zm-1 2.92c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2zM4 3c0-1.11-.89-2-2-2a1.993 1.993 0 0 0-1 3.72v6.56A1.993 1.993 0 0 0 2 15a1.993 1.993 0 0 0 1-3.72V4.72c.59-.34 1-.98 1-1.72zm-.8 10c0 .66-.55 1.2-1.2 1.2-.65 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2zM2 4.2C1.34 4.2.8 3.65.8 3c0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2z"/></svg>
|
||||||
|
<span itemprop="name">Pull requests</span>
|
||||||
|
<span class="Counter">3</span>
|
||||||
|
<meta itemprop="position" content="3">
|
||||||
|
</a> </span>
|
||||||
|
|
||||||
|
<a href="/KhronosGroup/glTF-Sample-Models/projects" class="js-selected-navigation-item reponav-item" data-selected-links="repo_projects new_repo_project repo_project /KhronosGroup/glTF-Sample-Models/projects">
|
||||||
|
<svg aria-hidden="true" class="octicon octicon-project" height="16" version="1.1" viewBox="0 0 15 16" width="15"><path fill-rule="evenodd" d="M10 12h3V2h-3v10zm-4-2h3V2H6v8zm-4 4h3V2H2v12zm-1 1h13V1H1v14zM14 0H1a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h13a1 1 0 0 0 1-1V1a1 1 0 0 0-1-1z"/></svg>
|
||||||
|
Projects
|
||||||
|
<span class="Counter" >0</span>
|
||||||
|
</a>
|
||||||
|
<a href="/KhronosGroup/glTF-Sample-Models/wiki" class="js-selected-navigation-item reponav-item" data-hotkey="g w" data-selected-links="repo_wiki /KhronosGroup/glTF-Sample-Models/wiki">
|
||||||
|
<svg aria-hidden="true" class="octicon octicon-book" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M3 5h4v1H3V5zm0 3h4V7H3v1zm0 2h4V9H3v1zm11-5h-4v1h4V5zm0 2h-4v1h4V7zm0 2h-4v1h4V9zm2-6v9c0 .55-.45 1-1 1H9.5l-1 1-1-1H2c-.55 0-1-.45-1-1V3c0-.55.45-1 1-1h5.5l1 1 1-1H15c.55 0 1 .45 1 1zm-8 .5L7.5 3H2v9h6V3.5zm7-.5H9.5l-.5.5V12h6V3z"/></svg>
|
||||||
|
Wiki
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<div class="reponav-dropdown js-menu-container">
|
||||||
|
<button type="button" class="btn-link reponav-item reponav-dropdown js-menu-target " data-no-toggle aria-expanded="false" aria-haspopup="true">
|
||||||
|
Insights
|
||||||
|
<svg aria-hidden="true" class="octicon octicon-triangle-down v-align-middle text-gray" height="11" version="1.1" viewBox="0 0 12 16" width="8"><path fill-rule="evenodd" d="M0 5l6 6 6-6z"/></svg>
|
||||||
|
</button>
|
||||||
|
<div class="dropdown-menu-content js-menu-content">
|
||||||
|
<div class="dropdown-menu dropdown-menu-sw">
|
||||||
|
<a class="dropdown-item" href="/KhronosGroup/glTF-Sample-Models/pulse" data-skip-pjax>
|
||||||
|
<svg aria-hidden="true" class="octicon octicon-pulse" height="16" version="1.1" viewBox="0 0 14 16" width="14"><path fill-rule="evenodd" d="M11.5 8L8.8 5.4 6.6 8.5 5.5 1.6 2.38 8H0v2h3.6l.9-1.8.9 5.4L9 8.5l1.6 1.5H14V8z"/></svg>
|
||||||
|
Pulse
|
||||||
|
</a>
|
||||||
|
<a class="dropdown-item" href="/KhronosGroup/glTF-Sample-Models/graphs" data-skip-pjax>
|
||||||
|
<svg aria-hidden="true" class="octicon octicon-graph" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M16 14v1H0V0h1v14h15zM5 13H3V8h2v5zm4 0H7V3h2v10zm4 0h-2V6h2v7z"/></svg>
|
||||||
|
Graphs
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container new-discussion-timeline experiment-repo-nav">
|
||||||
|
<div class="repository-content">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a href="/KhronosGroup/glTF-Sample-Models/blob/d86fae091e760a868442748ada7efadaaf497b19/2.0/Cube/glTF/Cube_MetallicRoughness.png" class="d-none js-permalink-shortcut" data-hotkey="y">Permalink</a>
|
||||||
|
|
||||||
|
<!-- blob contrib key: blob_contributors:v21:59341fe1b1602e113cf3b9701f120e03 -->
|
||||||
|
|
||||||
|
<div class="file-navigation js-zeroclipboard-container">
|
||||||
|
|
||||||
|
<div class="select-menu branch-select-menu js-menu-container js-select-menu float-left">
|
||||||
|
<button class=" btn btn-sm select-menu-button js-menu-target css-truncate" data-hotkey="w"
|
||||||
|
|
||||||
|
type="button" aria-label="Switch branches or tags" tabindex="0" aria-haspopup="true">
|
||||||
|
<i>Branch:</i>
|
||||||
|
<span class="js-select-button css-truncate-target">master</span>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<div class="select-menu-modal-holder js-menu-content js-navigation-container" data-pjax>
|
||||||
|
|
||||||
|
<div class="select-menu-modal">
|
||||||
|
<div class="select-menu-header">
|
||||||
|
<svg aria-label="Close" class="octicon octicon-x js-menu-close" height="16" role="img" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M7.48 8l3.75 3.75-1.48 1.48L6 9.48l-3.75 3.75-1.48-1.48L4.52 8 .77 4.25l1.48-1.48L6 6.52l3.75-3.75 1.48 1.48z"/></svg>
|
||||||
|
<span class="select-menu-title">Switch branches/tags</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="select-menu-filters">
|
||||||
|
<div class="select-menu-text-filter">
|
||||||
|
<input type="text" aria-label="Filter branches/tags" id="context-commitish-filter-field" class="form-control js-filterable-field js-navigation-enable" placeholder="Filter branches/tags">
|
||||||
|
</div>
|
||||||
|
<div class="select-menu-tabs">
|
||||||
|
<ul>
|
||||||
|
<li class="select-menu-tab">
|
||||||
|
<a href="#" data-tab-filter="branches" data-filter-placeholder="Filter branches/tags" class="js-select-menu-tab" role="tab">Branches</a>
|
||||||
|
</li>
|
||||||
|
<li class="select-menu-tab">
|
||||||
|
<a href="#" data-tab-filter="tags" data-filter-placeholder="Find a tag…" class="js-select-menu-tab" role="tab">Tags</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="select-menu-list select-menu-tab-bucket js-select-menu-tab-bucket" data-tab-filter="branches" role="menu">
|
||||||
|
|
||||||
|
<div data-filterable-for="context-commitish-filter-field" data-filterable-type="substring">
|
||||||
|
|
||||||
|
|
||||||
|
<a class="select-menu-item js-navigation-item js-navigation-open "
|
||||||
|
href="/KhronosGroup/glTF-Sample-Models/blob/1.1/2.0/Cube/glTF/Cube_MetallicRoughness.png"
|
||||||
|
data-name="1.1"
|
||||||
|
data-skip-pjax="true"
|
||||||
|
rel="nofollow">
|
||||||
|
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"/></svg>
|
||||||
|
<span class="select-menu-item-text css-truncate-target js-select-menu-filter-text">
|
||||||
|
1.1
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
<a class="select-menu-item js-navigation-item js-navigation-open selected"
|
||||||
|
href="/KhronosGroup/glTF-Sample-Models/blob/master/2.0/Cube/glTF/Cube_MetallicRoughness.png"
|
||||||
|
data-name="master"
|
||||||
|
data-skip-pjax="true"
|
||||||
|
rel="nofollow">
|
||||||
|
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"/></svg>
|
||||||
|
<span class="select-menu-item-text css-truncate-target js-select-menu-filter-text">
|
||||||
|
master
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="select-menu-no-results">Nothing to show</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="select-menu-list select-menu-tab-bucket js-select-menu-tab-bucket" data-tab-filter="tags">
|
||||||
|
<div data-filterable-for="context-commitish-filter-field" data-filterable-type="substring">
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="select-menu-no-results">Nothing to show</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="BtnGroup float-right">
|
||||||
|
<a href="/KhronosGroup/glTF-Sample-Models/find/master"
|
||||||
|
class="js-pjax-capture-input btn btn-sm BtnGroup-item"
|
||||||
|
data-pjax
|
||||||
|
data-hotkey="t">
|
||||||
|
Find file
|
||||||
|
</a>
|
||||||
|
<button aria-label="Copy file path to clipboard" class="js-zeroclipboard btn btn-sm BtnGroup-item tooltipped tooltipped-s" data-copied-hint="Copied!" type="button">Copy path</button>
|
||||||
|
</div>
|
||||||
|
<div class="breadcrumb js-zeroclipboard-target">
|
||||||
|
<span class="repo-root js-repo-root"><span class="js-path-segment"><a href="/KhronosGroup/glTF-Sample-Models"><span>glTF-Sample-Models</span></a></span></span><span class="separator">/</span><span class="js-path-segment"><a href="/KhronosGroup/glTF-Sample-Models/tree/master/2.0"><span>2.0</span></a></span><span class="separator">/</span><span class="js-path-segment"><a href="/KhronosGroup/glTF-Sample-Models/tree/master/2.0/Cube"><span>Cube</span></a></span><span class="separator">/</span><span class="js-path-segment"><a href="/KhronosGroup/glTF-Sample-Models/tree/master/2.0/Cube/glTF"><span>glTF</span></a></span><span class="separator">/</span><strong class="final-path">Cube_MetallicRoughness.png</strong>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<include-fragment class="commit-tease" src="/KhronosGroup/glTF-Sample-Models/contributors/master/2.0/Cube/glTF/Cube_MetallicRoughness.png">
|
||||||
|
<div>
|
||||||
|
Fetching contributors…
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="commit-tease-contributors">
|
||||||
|
<img alt="" class="loader-loading float-left" height="16" src="https://assets-cdn.github.com/images/spinners/octocat-spinner-32-EAF2F5.gif" width="16" />
|
||||||
|
<span class="loader-error">Cannot retrieve contributors at this time</span>
|
||||||
|
</div>
|
||||||
|
</include-fragment>
|
||||||
|
<div class="file">
|
||||||
|
<div class="file-header">
|
||||||
|
<div class="file-actions">
|
||||||
|
|
||||||
|
<div class="BtnGroup">
|
||||||
|
<a href="/KhronosGroup/glTF-Sample-Models/raw/master/2.0/Cube/glTF/Cube_MetallicRoughness.png" class="btn btn-sm BtnGroup-item" id="raw-url">Download</a>
|
||||||
|
<a href="/KhronosGroup/glTF-Sample-Models/commits/master/2.0/Cube/glTF/Cube_MetallicRoughness.png" class="btn btn-sm BtnGroup-item" rel="nofollow">History</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<a class="btn-octicon tooltipped tooltipped-nw"
|
||||||
|
href="github-mac://openRepo/https://github.com/KhronosGroup/glTF-Sample-Models?branch=master&filepath=2.0%2FCube%2FglTF%2FCube_MetallicRoughness.png"
|
||||||
|
aria-label="Open this file in GitHub Desktop"
|
||||||
|
data-ga-click="Repository, open with desktop, type:mac">
|
||||||
|
<svg aria-hidden="true" class="octicon octicon-device-desktop" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M15 2H1c-.55 0-1 .45-1 1v9c0 .55.45 1 1 1h5.34c-.25.61-.86 1.39-2.34 2h8c-1.48-.61-2.09-1.39-2.34-2H15c.55 0 1-.45 1-1V3c0-.55-.45-1-1-1zm0 9H1V3h14v8z"/></svg>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<!-- '"` --><!-- </textarea></xmp> --></option></form><form accept-charset="UTF-8" action="/KhronosGroup/glTF-Sample-Models/delete/master/2.0/Cube/glTF/Cube_MetallicRoughness.png" class="inline-form" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓" /><input name="authenticity_token" type="hidden" value="e07YoSQNnXgMJhB8K8kzyozcaYf1sV8PR6VNS6VNhyog/RlPtD7vOD1z7HoEilgQ+nVhqTZ280xClLEi1Vbh/A==" /></div>
|
||||||
|
<button class="btn-octicon btn-octicon-danger tooltipped tooltipped-nw" type="submit"
|
||||||
|
aria-label="Fork this project and delete the file" data-disable-with>
|
||||||
|
<svg aria-hidden="true" class="octicon octicon-trashcan" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M11 2H9c0-.55-.45-1-1-1H5c-.55 0-1 .45-1 1H2c-.55 0-1 .45-1 1v1c0 .55.45 1 1 1v9c0 .55.45 1 1 1h7c.55 0 1-.45 1-1V5c.55 0 1-.45 1-1V3c0-.55-.45-1-1-1zm-1 12H3V5h1v8h1V5h1v8h1V5h1v8h1V5h1v9zm1-10H2V3h9v1z"/></svg>
|
||||||
|
</button>
|
||||||
|
</form> </div>
|
||||||
|
|
||||||
|
<div class="file-info">
|
||||||
|
319 Bytes
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div itemprop="text" class="blob-wrapper data type-text">
|
||||||
|
<div class="image">
|
||||||
|
<span class="border-wrap"><img src="/KhronosGroup/glTF-Sample-Models/blob/master/2.0/Cube/glTF/Cube_MetallicRoughness.png?raw=true" alt="Cube_MetallicRoughness.png"></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<button type="button" data-facebox="#jump-to-line" data-facebox-class="linejump" data-hotkey="l" class="d-none">Jump to Line</button>
|
||||||
|
<div id="jump-to-line" style="display:none">
|
||||||
|
<!-- '"` --><!-- </textarea></xmp> --></option></form><form accept-charset="UTF-8" action="" class="js-jump-to-line-form" method="get"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓" /></div>
|
||||||
|
<input class="form-control linejump-input js-jump-to-line-field" type="text" placeholder="Jump to line…" aria-label="Jump to line" autofocus>
|
||||||
|
<button type="submit" class="btn">Go</button>
|
||||||
|
</form></div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="modal-backdrop js-touch-events"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="container site-footer-container">
|
||||||
|
<div class="site-footer " role="contentinfo">
|
||||||
|
<ul class="site-footer-links float-right">
|
||||||
|
<li><a href="https://github.com/contact" data-ga-click="Footer, go to contact, text:contact">Contact GitHub</a></li>
|
||||||
|
<li><a href="https://developer.github.com" data-ga-click="Footer, go to api, text:api">API</a></li>
|
||||||
|
<li><a href="https://training.github.com" data-ga-click="Footer, go to training, text:training">Training</a></li>
|
||||||
|
<li><a href="https://shop.github.com" data-ga-click="Footer, go to shop, text:shop">Shop</a></li>
|
||||||
|
<li><a href="https://github.com/blog" data-ga-click="Footer, go to blog, text:blog">Blog</a></li>
|
||||||
|
<li><a href="https://github.com/about" data-ga-click="Footer, go to about, text:about">About</a></li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<a href="https://github.com" aria-label="Homepage" class="site-footer-mark" title="GitHub">
|
||||||
|
<svg aria-hidden="true" class="octicon octicon-mark-github" height="24" version="1.1" viewBox="0 0 16 16" width="24"><path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z"/></svg>
|
||||||
|
</a>
|
||||||
|
<ul class="site-footer-links">
|
||||||
|
<li>© 2017 <span title="0.22750s from github-fe144-cp1-prd.iad.github.net">GitHub</span>, Inc.</li>
|
||||||
|
<li><a href="https://github.com/site/terms" data-ga-click="Footer, go to terms, text:terms">Terms</a></li>
|
||||||
|
<li><a href="https://github.com/site/privacy" data-ga-click="Footer, go to privacy, text:privacy">Privacy</a></li>
|
||||||
|
<li><a href="https://github.com/security" data-ga-click="Footer, go to security, text:security">Security</a></li>
|
||||||
|
<li><a href="https://status.github.com/" data-ga-click="Footer, go to status, text:status">Status</a></li>
|
||||||
|
<li><a href="https://help.github.com" data-ga-click="Footer, go to help, text:help">Help</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div id="ajax-error-message" class="ajax-error-message flash flash-error">
|
||||||
|
<svg aria-hidden="true" class="octicon octicon-alert" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M8.865 1.52c-.18-.31-.51-.5-.87-.5s-.69.19-.87.5L.275 13.5c-.18.31-.18.69 0 1 .19.31.52.5.87.5h13.7c.36 0 .69-.19.86-.5.17-.31.18-.69.01-1L8.865 1.52zM8.995 13h-2v-2h2v2zm0-3h-2V6h2v4z"/></svg>
|
||||||
|
<button type="button" class="flash-close js-flash-close js-ajax-error-dismiss" aria-label="Dismiss error">
|
||||||
|
<svg aria-hidden="true" class="octicon octicon-x" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M7.48 8l3.75 3.75-1.48 1.48L6 9.48l-3.75 3.75-1.48-1.48L4.52 8 .77 4.25l1.48-1.48L6 6.52l3.75-3.75 1.48 1.48z"/></svg>
|
||||||
|
</button>
|
||||||
|
You can't perform that action at this time.
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<script crossorigin="anonymous" integrity="sha256-EjcFZu3GC0BKxFiWen8voNZpbamfN+333rEZbxr/Xwo=" src="https://assets-cdn.github.com/assets/frameworks-12370566edc60b404ac458967a7f2fa0d6696da99f37edf7deb1196f1aff5f0a.js"></script>
|
||||||
|
<script async="async" crossorigin="anonymous" integrity="sha256-hMRPCrOL1keRE33pLi8bw7DGU0k0WPbrLrin8nqGbj4=" src="https://assets-cdn.github.com/assets/github-84c44f0ab38bd64791137de92e2f1bc3b0c653493458f6eb2eb8a7f27a866e3e.js"></script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="js-stale-session-flash stale-session-flash flash flash-warn flash-banner d-none">
|
||||||
|
<svg aria-hidden="true" class="octicon octicon-alert" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M8.865 1.52c-.18-.31-.51-.5-.87-.5s-.69.19-.87.5L.275 13.5c-.18.31-.18.69 0 1 .19.31.52.5.87.5h13.7c.36 0 .69-.19.86-.5.17-.31.18-.69.01-1L8.865 1.52zM8.995 13h-2v-2h2v2zm0-3h-2V6h2v4z"/></svg>
|
||||||
|
<span class="signed-in-tab-flash">You signed in with another tab or window. <a href="">Reload</a> to refresh your session.</span>
|
||||||
|
<span class="signed-out-tab-flash">You signed out in another tab or window. <a href="">Reload</a> to refresh your session.</span>
|
||||||
|
</div>
|
||||||
|
<div class="facebox" id="facebox" style="display:none;">
|
||||||
|
<div class="facebox-popup">
|
||||||
|
<div class="facebox-content" role="dialog" aria-labelledby="facebox-header" aria-describedby="facebox-description">
|
||||||
|
</div>
|
||||||
|
<button type="button" class="facebox-close js-facebox-close" aria-label="Close modal">
|
||||||
|
<svg aria-hidden="true" class="octicon octicon-x" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M7.48 8l3.75 3.75-1.48 1.48L6 9.48l-3.75 3.75-1.48-1.48L4.52 8 .77 4.25l1.48-1.48L6 6.52l3.75-3.75 1.48 1.48z"/></svg>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
4
models/Cube/README.md
Normal file
4
models/Cube/README.md
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
License: Donated by Norbert Nopper for glTF testing.
|
||||||
|
|
||||||
|
https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/Cube
|
||||||
|
|
383
picojson.h
383
picojson.h
@ -40,6 +40,7 @@
|
|||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
// for isnan/isinf
|
// for isnan/isinf
|
||||||
#if __cplusplus >= 201103L
|
#if __cplusplus >= 201103L
|
||||||
@ -64,7 +65,6 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
#endif // PICOJSON_USE_RVALUE_REFERENCE
|
#endif // PICOJSON_USE_RVALUE_REFERENCE
|
||||||
|
|
||||||
|
|
||||||
// experimental support for int64_t (see README.mkdn for detail)
|
// experimental support for int64_t (see README.mkdn for detail)
|
||||||
#ifdef PICOJSON_USE_INT64
|
#ifdef PICOJSON_USE_INT64
|
||||||
#define __STDC_FORMAT_MACROS
|
#define __STDC_FORMAT_MACROS
|
||||||
@ -83,7 +83,11 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef PICOJSON_ASSERT
|
#ifndef PICOJSON_ASSERT
|
||||||
# define PICOJSON_ASSERT(e) do { if (! (e)) throw std::runtime_error(#e); } while (0)
|
#define PICOJSON_ASSERT(e) \
|
||||||
|
do { \
|
||||||
|
if (!(e)) \
|
||||||
|
throw std::runtime_error(#e); \
|
||||||
|
} while (0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
@ -106,13 +110,12 @@ namespace picojson {
|
|||||||
array_type,
|
array_type,
|
||||||
object_type
|
object_type
|
||||||
#ifdef PICOJSON_USE_INT64
|
#ifdef PICOJSON_USE_INT64
|
||||||
, int64_type
|
,
|
||||||
|
int64_type
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
enum {
|
enum { INDENT_WIDTH = 2 };
|
||||||
INDENT_WIDTH = 2
|
|
||||||
};
|
|
||||||
|
|
||||||
struct null {};
|
struct null {};
|
||||||
|
|
||||||
@ -130,9 +133,11 @@ namespace picojson {
|
|||||||
array *array_;
|
array *array_;
|
||||||
object *object_;
|
object *object_;
|
||||||
};
|
};
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
int type_;
|
int type_;
|
||||||
_storage u_;
|
_storage u_;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
value();
|
value();
|
||||||
value(int type, bool);
|
value(int type, bool);
|
||||||
@ -144,6 +149,11 @@ namespace picojson {
|
|||||||
explicit value(const std::string &s);
|
explicit value(const std::string &s);
|
||||||
explicit value(const array &a);
|
explicit value(const array &a);
|
||||||
explicit value(const object &o);
|
explicit value(const object &o);
|
||||||
|
#if PICOJSON_USE_RVALUE_REFERENCE
|
||||||
|
explicit value(std::string &&s);
|
||||||
|
explicit value(array &&a);
|
||||||
|
explicit value(object &&o);
|
||||||
|
#endif
|
||||||
explicit value(const char *s);
|
explicit value(const char *s);
|
||||||
value(const char *s, size_t len);
|
value(const char *s, size_t len);
|
||||||
~value();
|
~value();
|
||||||
@ -157,32 +167,42 @@ namespace picojson {
|
|||||||
template <typename T> bool is() const;
|
template <typename T> bool is() const;
|
||||||
template <typename T> const T &get() const;
|
template <typename T> const T &get() const;
|
||||||
template <typename T> T &get();
|
template <typename T> T &get();
|
||||||
|
template <typename T> void set(const T &);
|
||||||
|
#if PICOJSON_USE_RVALUE_REFERENCE
|
||||||
|
template <typename T> void set(T &&);
|
||||||
|
#endif
|
||||||
bool evaluate_as_boolean() const;
|
bool evaluate_as_boolean() const;
|
||||||
const value& get(size_t idx) const;
|
const value &get(const size_t idx) const;
|
||||||
const value &get(const std::string &key) const;
|
const value &get(const std::string &key) const;
|
||||||
value& get(size_t idx);
|
value &get(const size_t idx);
|
||||||
value &get(const std::string &key);
|
value &get(const std::string &key);
|
||||||
|
|
||||||
bool contains(size_t idx) const;
|
bool contains(const size_t idx) const;
|
||||||
bool contains(const std::string &key) const;
|
bool contains(const std::string &key) const;
|
||||||
std::string to_str() const;
|
std::string to_str() const;
|
||||||
template <typename Iter> void serialize(Iter os, bool prettify = false) const;
|
template <typename Iter> void serialize(Iter os, bool prettify = false) const;
|
||||||
std::string serialize(bool prettify = false) const;
|
std::string serialize(bool prettify = false) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
template <typename T> value(const T *); // intentionally defined to block implicit conversion of pointer to bool
|
template <typename T> value(const T *); // intentionally defined to block implicit conversion of pointer to bool
|
||||||
template <typename Iter> static void _indent(Iter os, int indent);
|
template <typename Iter> static void _indent(Iter os, int indent);
|
||||||
template <typename Iter> void _serialize(Iter os, int indent) const;
|
template <typename Iter> void _serialize(Iter os, int indent) const;
|
||||||
std::string _serialize(int indent) const;
|
std::string _serialize(int indent) const;
|
||||||
|
void clear();
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef value::array array;
|
typedef value::array array;
|
||||||
typedef value::object object;
|
typedef value::object object;
|
||||||
|
|
||||||
inline value::value() : type_(null_type) {}
|
inline value::value() : type_(null_type), u_() {
|
||||||
|
}
|
||||||
|
|
||||||
inline value::value(int type, bool) : type_(type) {
|
inline value::value(int type, bool) : type_(type), u_() {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
#define INIT(p, v) case p##type: u_.p = v; break
|
#define INIT(p, v) \
|
||||||
|
case p##type: \
|
||||||
|
u_.p = v; \
|
||||||
|
break
|
||||||
INIT(boolean_, false);
|
INIT(boolean_, false);
|
||||||
INIT(number_, 0.0);
|
INIT(number_, 0.0);
|
||||||
#ifdef PICOJSON_USE_INT64
|
#ifdef PICOJSON_USE_INT64
|
||||||
@ -192,21 +212,22 @@ namespace picojson {
|
|||||||
INIT(array_, new array());
|
INIT(array_, new array());
|
||||||
INIT(object_, new object());
|
INIT(object_, new object());
|
||||||
#undef INIT
|
#undef INIT
|
||||||
default: break;
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inline value::value(bool b) : type_(boolean_type) {
|
inline value::value(bool b) : type_(boolean_type), u_() {
|
||||||
u_.boolean_ = b;
|
u_.boolean_ = b;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef PICOJSON_USE_INT64
|
#ifdef PICOJSON_USE_INT64
|
||||||
inline value::value(int64_t i) : type_(int64_type) {
|
inline value::value(int64_t i) : type_(int64_type), u_() {
|
||||||
u_.int64_ = i;
|
u_.int64_ = i;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
inline value::value(double n) : type_(number_type) {
|
inline value::value(double n) : type_(number_type), u_() {
|
||||||
if (
|
if (
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
!_finite(n)
|
!_finite(n)
|
||||||
@ -221,40 +242,65 @@ namespace picojson {
|
|||||||
u_.number_ = n;
|
u_.number_ = n;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline value::value(const std::string& s) : type_(string_type) {
|
inline value::value(const std::string &s) : type_(string_type), u_() {
|
||||||
u_.string_ = new std::string(s);
|
u_.string_ = new std::string(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline value::value(const array& a) : type_(array_type) {
|
inline value::value(const array &a) : type_(array_type), u_() {
|
||||||
u_.array_ = new array(a);
|
u_.array_ = new array(a);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline value::value(const object& o) : type_(object_type) {
|
inline value::value(const object &o) : type_(object_type), u_() {
|
||||||
u_.object_ = new object(o);
|
u_.object_ = new object(o);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline value::value(const char* s) : type_(string_type) {
|
#if PICOJSON_USE_RVALUE_REFERENCE
|
||||||
|
inline value::value(std::string &&s) : type_(string_type), u_() {
|
||||||
|
u_.string_ = new std::string(std::move(s));
|
||||||
|
}
|
||||||
|
|
||||||
|
inline value::value(array &&a) : type_(array_type), u_() {
|
||||||
|
u_.array_ = new array(std::move(a));
|
||||||
|
}
|
||||||
|
|
||||||
|
inline value::value(object &&o) : type_(object_type), u_() {
|
||||||
|
u_.object_ = new object(std::move(o));
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
inline value::value(const char *s) : type_(string_type), u_() {
|
||||||
u_.string_ = new std::string(s);
|
u_.string_ = new std::string(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline value::value(const char* s, size_t len) : type_(string_type) {
|
inline value::value(const char *s, size_t len) : type_(string_type), u_() {
|
||||||
u_.string_ = new std::string(s, len);
|
u_.string_ = new std::string(s, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline value::~value() {
|
inline void value::clear() {
|
||||||
switch (type_) {
|
switch (type_) {
|
||||||
#define DEINIT(p) case p##type: delete u_.p; break
|
#define DEINIT(p) \
|
||||||
|
case p##type: \
|
||||||
|
delete u_.p; \
|
||||||
|
break
|
||||||
DEINIT(string_);
|
DEINIT(string_);
|
||||||
DEINIT(array_);
|
DEINIT(array_);
|
||||||
DEINIT(object_);
|
DEINIT(object_);
|
||||||
#undef DEINIT
|
#undef DEINIT
|
||||||
default: break;
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inline value::value(const value& x) : type_(x.type_) {
|
inline value::~value() {
|
||||||
|
clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
inline value::value(const value &x) : type_(x.type_), u_() {
|
||||||
switch (type_) {
|
switch (type_) {
|
||||||
#define INIT(p, v) case p##type: u_.p = v; break
|
#define INIT(p, v) \
|
||||||
|
case p##type: \
|
||||||
|
u_.p = v; \
|
||||||
|
break
|
||||||
INIT(string_, new std::string(*x.u_.string_));
|
INIT(string_, new std::string(*x.u_.string_));
|
||||||
INIT(array_, new array(*x.u_.array_));
|
INIT(array_, new array(*x.u_.array_));
|
||||||
INIT(object_, new object(*x.u_.object_));
|
INIT(object_, new object(*x.u_.object_));
|
||||||
@ -274,7 +320,7 @@ namespace picojson {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if PICOJSON_USE_RVALUE_REFERENCE
|
#if PICOJSON_USE_RVALUE_REFERENCE
|
||||||
inline value::value(value&& x)throw() : type_(null_type) {
|
inline value::value(value &&x) throw() : type_(null_type), u_() {
|
||||||
swap(x);
|
swap(x);
|
||||||
}
|
}
|
||||||
inline value &value::operator=(value &&x) throw() {
|
inline value &value::operator=(value &&x) throw() {
|
||||||
@ -310,13 +356,11 @@ namespace picojson {
|
|||||||
|
|
||||||
#define GET(ctype, var) \
|
#define GET(ctype, var) \
|
||||||
template <> inline const ctype &value::get<ctype>() const { \
|
template <> inline const ctype &value::get<ctype>() const { \
|
||||||
PICOJSON_ASSERT("type mismatch! call is<type>() before get<type>()" \
|
PICOJSON_ASSERT("type mismatch! call is<type>() before get<type>()" && is<ctype>()); \
|
||||||
&& is<ctype>()); \
|
|
||||||
return var; \
|
return var; \
|
||||||
} \
|
} \
|
||||||
template <> inline ctype &value::get<ctype>() { \
|
template <> inline ctype &value::get<ctype>() { \
|
||||||
PICOJSON_ASSERT("type mismatch! call is<type>() before get<type>()" \
|
PICOJSON_ASSERT("type mismatch! call is<type>() before get<type>()" && is<ctype>()); \
|
||||||
&& is<ctype>()); \
|
|
||||||
return var; \
|
return var; \
|
||||||
}
|
}
|
||||||
GET(bool, u_.boolean_)
|
GET(bool, u_.boolean_)
|
||||||
@ -324,13 +368,44 @@ namespace picojson {
|
|||||||
GET(array, *u_.array_)
|
GET(array, *u_.array_)
|
||||||
GET(object, *u_.object_)
|
GET(object, *u_.object_)
|
||||||
#ifdef PICOJSON_USE_INT64
|
#ifdef PICOJSON_USE_INT64
|
||||||
GET(double, (type_ == int64_type && (const_cast<value*>(this)->type_ = number_type, const_cast<value*>(this)->u_.number_ = u_.int64_), u_.number_))
|
GET(double,
|
||||||
|
(type_ == int64_type && (const_cast<value *>(this)->type_ = number_type, const_cast<value *>(this)->u_.number_ = u_.int64_),
|
||||||
|
u_.number_))
|
||||||
GET(int64_t, u_.int64_)
|
GET(int64_t, u_.int64_)
|
||||||
#else
|
#else
|
||||||
GET(double, u_.number_)
|
GET(double, u_.number_)
|
||||||
#endif
|
#endif
|
||||||
#undef GET
|
#undef GET
|
||||||
|
|
||||||
|
#define SET(ctype, jtype, setter) \
|
||||||
|
template <> inline void value::set<ctype>(const ctype &_val) { \
|
||||||
|
clear(); \
|
||||||
|
type_ = jtype##_type; \
|
||||||
|
setter \
|
||||||
|
}
|
||||||
|
SET(bool, boolean, u_.boolean_ = _val;)
|
||||||
|
SET(std::string, string, u_.string_ = new std::string(_val);)
|
||||||
|
SET(array, array, u_.array_ = new array(_val);)
|
||||||
|
SET(object, object, u_.object_ = new object(_val);)
|
||||||
|
SET(double, number, u_.number_ = _val;)
|
||||||
|
#ifdef PICOJSON_USE_INT64
|
||||||
|
SET(int64_t, int64, u_.int64_ = _val;)
|
||||||
|
#endif
|
||||||
|
#undef SET
|
||||||
|
|
||||||
|
#if PICOJSON_USE_RVALUE_REFERENCE
|
||||||
|
#define MOVESET(ctype, jtype, setter) \
|
||||||
|
template <> inline void value::set<ctype>(ctype && _val) { \
|
||||||
|
clear(); \
|
||||||
|
type_ = jtype##_type; \
|
||||||
|
setter \
|
||||||
|
}
|
||||||
|
MOVESET(std::string, string, u_.string_ = new std::string(std::move(_val));)
|
||||||
|
MOVESET(array, array, u_.array_ = new array(std::move(_val));)
|
||||||
|
MOVESET(object, object, u_.object_ = new object(std::move(_val));)
|
||||||
|
#undef MOVESET
|
||||||
|
#endif
|
||||||
|
|
||||||
inline bool value::evaluate_as_boolean() const {
|
inline bool value::evaluate_as_boolean() const {
|
||||||
switch (type_) {
|
switch (type_) {
|
||||||
case null_type:
|
case null_type:
|
||||||
@ -350,13 +425,13 @@ namespace picojson {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inline const value& value::get(size_t idx) const {
|
inline const value &value::get(const size_t idx) const {
|
||||||
static value s_null;
|
static value s_null;
|
||||||
PICOJSON_ASSERT(is<array>());
|
PICOJSON_ASSERT(is<array>());
|
||||||
return idx < u_.array_->size() ? (*u_.array_)[idx] : s_null;
|
return idx < u_.array_->size() ? (*u_.array_)[idx] : s_null;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline value& value::get(size_t idx) {
|
inline value &value::get(const size_t idx) {
|
||||||
static value s_null;
|
static value s_null;
|
||||||
PICOJSON_ASSERT(is<array>());
|
PICOJSON_ASSERT(is<array>());
|
||||||
return idx < u_.array_->size() ? (*u_.array_)[idx] : s_null;
|
return idx < u_.array_->size() ? (*u_.array_)[idx] : s_null;
|
||||||
@ -376,7 +451,7 @@ namespace picojson {
|
|||||||
return i != u_.object_->end() ? i->second : s_null;
|
return i != u_.object_->end() ? i->second : s_null;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool value::contains(size_t idx) const {
|
inline bool value::contains(const size_t idx) const {
|
||||||
PICOJSON_ASSERT(is<array>());
|
PICOJSON_ASSERT(is<array>());
|
||||||
return idx < u_.array_->size();
|
return idx < u_.array_->size();
|
||||||
}
|
}
|
||||||
@ -389,8 +464,10 @@ namespace picojson {
|
|||||||
|
|
||||||
inline std::string value::to_str() const {
|
inline std::string value::to_str() const {
|
||||||
switch (type_) {
|
switch (type_) {
|
||||||
case null_type: return "null";
|
case null_type:
|
||||||
case boolean_type: return u_.boolean_ ? "true" : "false";
|
return "null";
|
||||||
|
case boolean_type:
|
||||||
|
return u_.boolean_ ? "true" : "false";
|
||||||
#ifdef PICOJSON_USE_INT64
|
#ifdef PICOJSON_USE_INT64
|
||||||
case int64_type: {
|
case int64_type: {
|
||||||
char buf[sizeof("-9223372036854775808")];
|
char buf[sizeof("-9223372036854775808")];
|
||||||
@ -415,10 +492,14 @@ namespace picojson {
|
|||||||
#endif
|
#endif
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
case string_type: return *u_.string_;
|
case string_type:
|
||||||
case array_type: return "array";
|
return *u_.string_;
|
||||||
case object_type: return "object";
|
case array_type:
|
||||||
default: PICOJSON_ASSERT(0);
|
return "array";
|
||||||
|
case object_type:
|
||||||
|
return "object";
|
||||||
|
default:
|
||||||
|
PICOJSON_ASSERT(0);
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
__assume(0);
|
__assume(0);
|
||||||
#endif
|
#endif
|
||||||
@ -430,11 +511,14 @@ namespace picojson {
|
|||||||
std::copy(s.begin(), s.end(), oi);
|
std::copy(s.begin(), s.end(), oi);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename Iter> void serialize_str(const std::string& s, Iter oi) {
|
template <typename Iter> struct serialize_str_char {
|
||||||
*oi++ = '"';
|
Iter oi;
|
||||||
for (std::string::const_iterator i = s.begin(); i != s.end(); ++i) {
|
void operator()(char c) {
|
||||||
switch (*i) {
|
switch (c) {
|
||||||
#define MAP(val, sym) case val: copy(sym, oi); break
|
#define MAP(val, sym) \
|
||||||
|
case val: \
|
||||||
|
copy(sym, oi); \
|
||||||
|
break
|
||||||
MAP('"', "\\\"");
|
MAP('"', "\\\"");
|
||||||
MAP('\\', "\\\\");
|
MAP('\\', "\\\\");
|
||||||
MAP('/', "\\/");
|
MAP('/', "\\/");
|
||||||
@ -445,16 +529,22 @@ namespace picojson {
|
|||||||
MAP('\t', "\\t");
|
MAP('\t', "\\t");
|
||||||
#undef MAP
|
#undef MAP
|
||||||
default:
|
default:
|
||||||
if (static_cast<unsigned char>(*i) < 0x20 || *i == 0x7f) {
|
if (static_cast<unsigned char>(c) < 0x20 || c == 0x7f) {
|
||||||
char buf[7];
|
char buf[7];
|
||||||
SNPRINTF(buf, sizeof(buf), "\\u%04x", *i & 0xff);
|
SNPRINTF(buf, sizeof(buf), "\\u%04x", c & 0xff);
|
||||||
copy(buf, buf + 6, oi);
|
copy(buf, buf + 6, oi);
|
||||||
} else {
|
} else {
|
||||||
*oi++ = *i;
|
*oi++ = c;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
template <typename Iter> void serialize_str(const std::string &s, Iter oi) {
|
||||||
|
*oi++ = '"';
|
||||||
|
serialize_str_char<Iter> process_char = {oi};
|
||||||
|
std::for_each(s.begin(), s.end(), process_char);
|
||||||
*oi++ = '"';
|
*oi++ = '"';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -483,9 +573,7 @@ namespace picojson {
|
|||||||
if (indent != -1) {
|
if (indent != -1) {
|
||||||
++indent;
|
++indent;
|
||||||
}
|
}
|
||||||
for (array::const_iterator i = u_.array_->begin();
|
for (array::const_iterator i = u_.array_->begin(); i != u_.array_->end(); ++i) {
|
||||||
i != u_.array_->end();
|
|
||||||
++i) {
|
|
||||||
if (i != u_.array_->begin()) {
|
if (i != u_.array_->begin()) {
|
||||||
*oi++ = ',';
|
*oi++ = ',';
|
||||||
}
|
}
|
||||||
@ -508,9 +596,7 @@ namespace picojson {
|
|||||||
if (indent != -1) {
|
if (indent != -1) {
|
||||||
++indent;
|
++indent;
|
||||||
}
|
}
|
||||||
for (object::const_iterator i = u_.object_->begin();
|
for (object::const_iterator i = u_.object_->begin(); i != u_.object_->end(); ++i) {
|
||||||
i != u_.object_->end();
|
|
||||||
++i) {
|
|
||||||
if (i != u_.object_->begin()) {
|
if (i != u_.object_->begin()) {
|
||||||
*oi++ = ',';
|
*oi++ = ',';
|
||||||
}
|
}
|
||||||
@ -551,35 +637,40 @@ namespace picojson {
|
|||||||
template <typename Iter> class input {
|
template <typename Iter> class input {
|
||||||
protected:
|
protected:
|
||||||
Iter cur_, end_;
|
Iter cur_, end_;
|
||||||
int last_ch_;
|
bool consumed_;
|
||||||
bool ungot_;
|
|
||||||
int line_;
|
int line_;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
input(const Iter& first, const Iter& last) : cur_(first), end_(last), last_ch_(-1), ungot_(false), line_(1) {}
|
input(const Iter &first, const Iter &last) : cur_(first), end_(last), consumed_(false), line_(1) {
|
||||||
|
}
|
||||||
int getc() {
|
int getc() {
|
||||||
if (ungot_) {
|
if (consumed_) {
|
||||||
ungot_ = false;
|
if (*cur_ == '\n') {
|
||||||
return last_ch_;
|
++line_;
|
||||||
|
}
|
||||||
|
++cur_;
|
||||||
}
|
}
|
||||||
if (cur_ == end_) {
|
if (cur_ == end_) {
|
||||||
last_ch_ = -1;
|
consumed_ = false;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (last_ch_ == '\n') {
|
consumed_ = true;
|
||||||
line_++;
|
return *cur_ & 0xff;
|
||||||
}
|
|
||||||
last_ch_ = *cur_ & 0xff;
|
|
||||||
++cur_;
|
|
||||||
return last_ch_;
|
|
||||||
}
|
}
|
||||||
void ungetc() {
|
void ungetc() {
|
||||||
if (last_ch_ != -1) {
|
consumed_ = false;
|
||||||
PICOJSON_ASSERT(! ungot_);
|
|
||||||
ungot_ = true;
|
|
||||||
}
|
}
|
||||||
|
Iter cur() const {
|
||||||
|
if (consumed_) {
|
||||||
|
input<Iter> *self = const_cast<input<Iter> *>(this);
|
||||||
|
self->consumed_ = false;
|
||||||
|
++self->cur_;
|
||||||
|
}
|
||||||
|
return cur_;
|
||||||
|
}
|
||||||
|
int line() const {
|
||||||
|
return line_;
|
||||||
}
|
}
|
||||||
Iter cur() const { return cur_; }
|
|
||||||
int line() const { return line_; }
|
|
||||||
void skip_ws() {
|
void skip_ws() {
|
||||||
while (1) {
|
while (1) {
|
||||||
int ch = getc();
|
int ch = getc();
|
||||||
@ -589,18 +680,16 @@ namespace picojson {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
bool expect(int expect) {
|
bool expect(const int expected) {
|
||||||
skip_ws();
|
skip_ws();
|
||||||
if (getc() != expect) {
|
if (getc() != expected) {
|
||||||
ungetc();
|
ungetc();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
bool match(const std::string &pattern) {
|
bool match(const std::string &pattern) {
|
||||||
for (std::string::const_iterator pi(pattern.begin());
|
for (std::string::const_iterator pi(pattern.begin()); pi != pattern.end(); ++pi) {
|
||||||
pi != pattern.end();
|
|
||||||
++pi) {
|
|
||||||
if (getc() != *pi) {
|
if (getc() != *pi) {
|
||||||
ungetc();
|
ungetc();
|
||||||
return false;
|
return false;
|
||||||
@ -654,20 +743,20 @@ namespace picojson {
|
|||||||
uni_ch += 0x10000;
|
uni_ch += 0x10000;
|
||||||
}
|
}
|
||||||
if (uni_ch < 0x80) {
|
if (uni_ch < 0x80) {
|
||||||
out.push_back(uni_ch);
|
out.push_back(static_cast<char>(uni_ch));
|
||||||
} else {
|
} else {
|
||||||
if (uni_ch < 0x800) {
|
if (uni_ch < 0x800) {
|
||||||
out.push_back(0xc0 | (uni_ch >> 6));
|
out.push_back(static_cast<char>(0xc0 | (uni_ch >> 6)));
|
||||||
} else {
|
} else {
|
||||||
if (uni_ch < 0x10000) {
|
if (uni_ch < 0x10000) {
|
||||||
out.push_back(0xe0 | (uni_ch >> 12));
|
out.push_back(static_cast<char>(0xe0 | (uni_ch >> 12)));
|
||||||
} else {
|
} else {
|
||||||
out.push_back(0xf0 | (uni_ch >> 18));
|
out.push_back(static_cast<char>(0xf0 | (uni_ch >> 18)));
|
||||||
out.push_back(0x80 | ((uni_ch >> 12) & 0x3f));
|
out.push_back(static_cast<char>(0x80 | ((uni_ch >> 12) & 0x3f)));
|
||||||
}
|
}
|
||||||
out.push_back(0x80 | ((uni_ch >> 6) & 0x3f));
|
out.push_back(static_cast<char>(0x80 | ((uni_ch >> 6) & 0x3f)));
|
||||||
}
|
}
|
||||||
out.push_back(0x80 | (uni_ch & 0x3f));
|
out.push_back(static_cast<char>(0x80 | (uni_ch & 0x3f)));
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -685,7 +774,10 @@ namespace picojson {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
switch (ch) {
|
switch (ch) {
|
||||||
#define MAP(sym, val) case sym: out.push_back(val); break
|
#define MAP(sym, val) \
|
||||||
|
case sym: \
|
||||||
|
out.push_back(val); \
|
||||||
|
break
|
||||||
MAP('"', '\"');
|
MAP('"', '\"');
|
||||||
MAP('\\', '\\');
|
MAP('\\', '\\');
|
||||||
MAP('/', '/');
|
MAP('/', '/');
|
||||||
@ -704,7 +796,7 @@ namespace picojson {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
out.push_back(ch);
|
out.push_back(static_cast<char>(ch));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@ -736,9 +828,7 @@ namespace picojson {
|
|||||||
}
|
}
|
||||||
do {
|
do {
|
||||||
std::string key;
|
std::string key;
|
||||||
if (! in.expect('"')
|
if (!in.expect('"') || !_parse_string(key, in) || !in.expect(':')) {
|
||||||
|| ! _parse_string(key, in)
|
|
||||||
|| ! in.expect(':')) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!ctx.parse_object_item(in, key)) {
|
if (!ctx.parse_object_item(in, key)) {
|
||||||
@ -752,9 +842,8 @@ namespace picojson {
|
|||||||
std::string num_str;
|
std::string num_str;
|
||||||
while (1) {
|
while (1) {
|
||||||
int ch = in.getc();
|
int ch = in.getc();
|
||||||
if (('0' <= ch && ch <= '9') || ch == '+' || ch == '-'
|
if (('0' <= ch && ch <= '9') || ch == '+' || ch == '-' || ch == 'e' || ch == 'E') {
|
||||||
|| ch == 'e' || ch == 'E') {
|
num_str.push_back(static_cast<char>(ch));
|
||||||
num_str.push_back(ch);
|
|
||||||
} else if (ch == '.') {
|
} else if (ch == '.') {
|
||||||
#if PICOJSON_USE_LOCALE
|
#if PICOJSON_USE_LOCALE
|
||||||
num_str += localeconv()->decimal_point;
|
num_str += localeconv()->decimal_point;
|
||||||
@ -773,7 +862,8 @@ namespace picojson {
|
|||||||
in.skip_ws();
|
in.skip_ws();
|
||||||
int ch = in.getc();
|
int ch = in.getc();
|
||||||
switch (ch) {
|
switch (ch) {
|
||||||
#define IS(ch, text, op) case ch: \
|
#define IS(ch, text, op) \
|
||||||
|
case ch: \
|
||||||
if (in.match(text) && op) { \
|
if (in.match(text) && op) { \
|
||||||
return true; \
|
return true; \
|
||||||
} else { \
|
} else { \
|
||||||
@ -794,7 +884,7 @@ namespace picojson {
|
|||||||
double f;
|
double f;
|
||||||
char *endp;
|
char *endp;
|
||||||
in.ungetc();
|
in.ungetc();
|
||||||
std::string num_str = _parse_number(in);
|
std::string num_str(_parse_number(in));
|
||||||
if (num_str.empty()) {
|
if (num_str.empty()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -802,10 +892,8 @@ namespace picojson {
|
|||||||
{
|
{
|
||||||
errno = 0;
|
errno = 0;
|
||||||
intmax_t ival = strtoimax(num_str.c_str(), &endp, 10);
|
intmax_t ival = strtoimax(num_str.c_str(), &endp, 10);
|
||||||
if (errno == 0
|
if (errno == 0 && std::numeric_limits<int64_t>::min() <= ival && ival <= std::numeric_limits<int64_t>::max() &&
|
||||||
&& std::numeric_limits<int64_t>::min() <= ival
|
endp == num_str.c_str() + num_str.size()) {
|
||||||
&& ival <= std::numeric_limits<int64_t>::max()
|
|
||||||
&& endp == num_str.c_str() + num_str.size()) {
|
|
||||||
ctx.set_int64(ival);
|
ctx.set_int64(ival);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -826,19 +914,35 @@ namespace picojson {
|
|||||||
|
|
||||||
class deny_parse_context {
|
class deny_parse_context {
|
||||||
public:
|
public:
|
||||||
bool set_null() { return false; }
|
bool set_null() {
|
||||||
bool set_bool(bool) { return false; }
|
return false;
|
||||||
|
}
|
||||||
|
bool set_bool(bool) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
#ifdef PICOJSON_USE_INT64
|
#ifdef PICOJSON_USE_INT64
|
||||||
bool set_int64(int64_t) { return false; }
|
bool set_int64(int64_t) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
bool set_number(double) { return false; }
|
bool set_number(double) {
|
||||||
template <typename Iter> bool parse_string(input<Iter>&) { return false; }
|
return false;
|
||||||
bool parse_array_start() { return false; }
|
}
|
||||||
|
template <typename Iter> bool parse_string(input<Iter> &) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
bool parse_array_start() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
template <typename Iter> bool parse_array_item(input<Iter> &, size_t) {
|
template <typename Iter> bool parse_array_item(input<Iter> &, size_t) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
bool parse_array_stop(size_t) { return false; }
|
bool parse_array_stop(size_t) {
|
||||||
bool parse_object_start() { return false; }
|
return false;
|
||||||
|
}
|
||||||
|
bool parse_object_start() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
template <typename Iter> bool parse_object_item(input<Iter> &, const std::string &) {
|
template <typename Iter> bool parse_object_item(input<Iter> &, const std::string &) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -847,8 +951,10 @@ namespace picojson {
|
|||||||
class default_parse_context {
|
class default_parse_context {
|
||||||
protected:
|
protected:
|
||||||
value *out_;
|
value *out_;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
default_parse_context(value* out) : out_(out) {}
|
default_parse_context(value *out) : out_(out) {
|
||||||
|
}
|
||||||
bool set_null() {
|
bool set_null() {
|
||||||
*out_ = value();
|
*out_ = value();
|
||||||
return true;
|
return true;
|
||||||
@ -881,7 +987,9 @@ namespace picojson {
|
|||||||
default_parse_context ctx(&a.back());
|
default_parse_context ctx(&a.back());
|
||||||
return _parse(ctx, in);
|
return _parse(ctx, in);
|
||||||
}
|
}
|
||||||
bool parse_array_stop(size_t) { return true; }
|
bool parse_array_stop(size_t) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
bool parse_object_start() {
|
bool parse_object_start() {
|
||||||
*out_ = value(object_type, false);
|
*out_ = value(object_type, false);
|
||||||
return true;
|
return true;
|
||||||
@ -891,6 +999,7 @@ namespace picojson {
|
|||||||
default_parse_context ctx(&o[key]);
|
default_parse_context ctx(&o[key]);
|
||||||
return _parse(ctx, in);
|
return _parse(ctx, in);
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
default_parse_context(const default_parse_context &);
|
default_parse_context(const default_parse_context &);
|
||||||
default_parse_context &operator=(const default_parse_context &);
|
default_parse_context &operator=(const default_parse_context &);
|
||||||
@ -899,29 +1008,47 @@ namespace picojson {
|
|||||||
class null_parse_context {
|
class null_parse_context {
|
||||||
public:
|
public:
|
||||||
struct dummy_str {
|
struct dummy_str {
|
||||||
void push_back(int) {}
|
void push_back(int) {
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
null_parse_context() {}
|
null_parse_context() {
|
||||||
bool set_null() { return true; }
|
}
|
||||||
bool set_bool(bool) { return true; }
|
bool set_null() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
bool set_bool(bool) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
#ifdef PICOJSON_USE_INT64
|
#ifdef PICOJSON_USE_INT64
|
||||||
bool set_int64(int64_t) { return true; }
|
bool set_int64(int64_t) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
bool set_number(double) { return true; }
|
bool set_number(double) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
template <typename Iter> bool parse_string(input<Iter> &in) {
|
template <typename Iter> bool parse_string(input<Iter> &in) {
|
||||||
dummy_str s;
|
dummy_str s;
|
||||||
return _parse_string(s, in);
|
return _parse_string(s, in);
|
||||||
}
|
}
|
||||||
bool parse_array_start() { return true; }
|
bool parse_array_start() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
template <typename Iter> bool parse_array_item(input<Iter> &in, size_t) {
|
template <typename Iter> bool parse_array_item(input<Iter> &in, size_t) {
|
||||||
return _parse(*this, in);
|
return _parse(*this, in);
|
||||||
}
|
}
|
||||||
bool parse_array_stop(size_t) { return true; }
|
bool parse_array_stop(size_t) {
|
||||||
bool parse_object_start() { return true; }
|
return true;
|
||||||
|
}
|
||||||
|
bool parse_object_start() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
template <typename Iter> bool parse_object_item(input<Iter> &in, const std::string &) {
|
template <typename Iter> bool parse_object_item(input<Iter> &in, const std::string &) {
|
||||||
return _parse(*this, in);
|
return _parse(*this, in);
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
null_parse_context(const null_parse_context &);
|
null_parse_context(const null_parse_context &);
|
||||||
null_parse_context &operator=(const null_parse_context &);
|
null_parse_context &operator=(const null_parse_context &);
|
||||||
@ -945,7 +1072,7 @@ namespace picojson {
|
|||||||
if (ch == -1 || ch == '\n') {
|
if (ch == -1 || ch == '\n') {
|
||||||
break;
|
break;
|
||||||
} else if (ch >= ' ') {
|
} else if (ch >= ' ') {
|
||||||
err->push_back(ch);
|
err->push_back(static_cast<char>(ch));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -965,14 +1092,11 @@ namespace picojson {
|
|||||||
|
|
||||||
inline std::string parse(value &out, std::istream &is) {
|
inline std::string parse(value &out, std::istream &is) {
|
||||||
std::string err;
|
std::string err;
|
||||||
parse(out, std::istreambuf_iterator<char>(is.rdbuf()),
|
parse(out, std::istreambuf_iterator<char>(is.rdbuf()), std::istreambuf_iterator<char>(), &err);
|
||||||
std::istreambuf_iterator<char>(), &err);
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T> struct last_error_t {
|
template <typename T> struct last_error_t { static std::string s; };
|
||||||
static std::string s;
|
|
||||||
};
|
|
||||||
template <typename T> std::string last_error_t<T>::s;
|
template <typename T> std::string last_error_t<T>::s;
|
||||||
|
|
||||||
inline void set_last_error(const std::string &s) {
|
inline void set_last_error(const std::string &s) {
|
||||||
@ -1009,17 +1133,15 @@ namespace picojson {
|
|||||||
|
|
||||||
#if !PICOJSON_USE_RVALUE_REFERENCE
|
#if !PICOJSON_USE_RVALUE_REFERENCE
|
||||||
namespace std {
|
namespace std {
|
||||||
template<> inline void swap(picojson::value& x, picojson::value& y)
|
template <> inline void swap(picojson::value &x, picojson::value &y) {
|
||||||
{
|
|
||||||
x.swap(y);
|
x.swap(y);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
inline std::istream& operator>>(std::istream& is, picojson::value& x)
|
inline std::istream &operator>>(std::istream &is, picojson::value &x) {
|
||||||
{
|
|
||||||
picojson::set_last_error(std::string());
|
picojson::set_last_error(std::string());
|
||||||
std::string err = picojson::parse(x, is);
|
const std::string err(picojson::parse(x, is));
|
||||||
if (!err.empty()) {
|
if (!err.empty()) {
|
||||||
picojson::set_last_error(err);
|
picojson::set_last_error(err);
|
||||||
is.setstate(std::ios::failbit);
|
is.setstate(std::ios::failbit);
|
||||||
@ -1027,8 +1149,7 @@ inline std::istream& operator>>(std::istream& is, picojson::value& x)
|
|||||||
return is;
|
return is;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline std::ostream& operator<<(std::ostream& os, const picojson::value& x)
|
inline std::ostream &operator<<(std::ostream &os, const picojson::value &x) {
|
||||||
{
|
|
||||||
x.serialize(std::ostream_iterator<char>(os));
|
x.serialize(std::ostream_iterator<char>(os));
|
||||||
return os;
|
return os;
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,7 @@ import subprocess
|
|||||||
|
|
||||||
# Absolute path pointing to your cloned git repo of https://github.com/KhronosGroup/glTF-Sample-Models
|
# Absolute path pointing to your cloned git repo of https://github.com/KhronosGroup/glTF-Sample-Models
|
||||||
sample_model_dir = "/home/syoyo/work/glTF-Sample-Models"
|
sample_model_dir = "/home/syoyo/work/glTF-Sample-Models"
|
||||||
base_model_dir = os.path.join(sample_model_dir, "1.0")
|
base_model_dir = os.path.join(sample_model_dir, "2.0")
|
||||||
|
|
||||||
kinds = [ "glTF", "glTF-Binary", "glTF-Embedded", "glTF-MaterialsCommon"]
|
kinds = [ "glTF", "glTF-Binary", "glTF-Embedded", "glTF-MaterialsCommon"]
|
||||||
# ---------------------------------
|
# ---------------------------------
|
||||||
|
1384
tiny_gltf_loader.h
1384
tiny_gltf_loader.h
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user