├── docs
├── RiggedSimple0.bin
├── index.html
└── RiggedSimple.gltf
├── Assets
├── RiggedSimple0.bin
└── RiggedSimple.gltf
├── README.md
├── .gitmodules
├── Sources
├── Main.hx
├── Loader.hx
└── Game.hx
├── Shaders
├── skin.frag.glsl
└── skin.vert.glsl
├── khafile.js
├── completion.hxml
├── .gitignore
└── LICENSE
/docs/RiggedSimple0.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hamaluik/animation-test/master/docs/RiggedSimple0.bin
--------------------------------------------------------------------------------
/Assets/RiggedSimple0.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hamaluik/animation-test/master/Assets/RiggedSimple0.bin
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Animation Test
2 |
3 | Testing skinned animations using GLTF in Kha.
4 |
5 | [demo](https://fuzzywuzzie.github.io/animation-test/)
--------------------------------------------------------------------------------
/docs/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Animation Test
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "Kha"]
2 | path = Kha
3 | url = https://github.com/Kode/Kha.git
4 | [submodule "Libraries/glm"]
5 | path = Libraries/glm
6 | url = git@github.com:FuzzyWuzzie/haxe-glm.git
7 | [submodule "Libraries/gltf"]
8 | path = Libraries/gltf
9 | url = git@github.com:FuzzyWuzzie/haxe-gltf.git
10 |
--------------------------------------------------------------------------------
/Sources/Main.hx:
--------------------------------------------------------------------------------
1 | import kha.System;
2 | import kha.Scheduler;
3 |
4 | class Main {
5 | public static function main() {
6 | Loader.onDone = function():Void {
7 | Game.initialize();
8 | System.notifyOnRender(Game.render);
9 | Scheduler.addTimeTask(Game.update, 0, 1/60);
10 | };
11 | System.init({ title: "Animation Test", width: 1280, height: 720}, Loader.load);
12 | }
13 | }
--------------------------------------------------------------------------------
/Shaders/skin.frag.glsl:
--------------------------------------------------------------------------------
1 | #version 450
2 |
3 | in vec3 pos;
4 | in vec3 norm;
5 | out vec4 fragColour;
6 |
7 | void main() {
8 | vec3 surfaceToLight = vec3(0, 0, 5) - pos;
9 | float brightness = dot(norm, surfaceToLight) / (length(surfaceToLight) * length(norm));
10 | brightness = mix(0.5, 1.0, clamp(brightness, 0, 1));
11 | fragColour = vec4(vec3(0.27963539958000185, 0.6399999856948853, 0.21094389259815217) * brightness, 1.0);
12 | }
13 |
--------------------------------------------------------------------------------
/khafile.js:
--------------------------------------------------------------------------------
1 | let project = new Project('Animation Test');
2 |
3 | project.addSources('Sources');
4 | project.addShaders('Shaders/**');
5 |
6 | project.addLibrary('glm');
7 | project.addLibrary('gltf');
8 |
9 | project.addAssets('Assets/**');
10 |
11 | project.addParameter('-debug');
12 | project.addParameter('--times');
13 | project.addParameter('-D eval-times');
14 |
15 | // HTML target
16 | project.windowOptions.width = 1280;
17 | project.windowOptions.height = 720;
18 |
19 | resolve(project);
--------------------------------------------------------------------------------
/completion.hxml:
--------------------------------------------------------------------------------
1 | -cp Kha/Sources
2 | -cp Kha/Backends/HTML5
3 | -cp Sources
4 | -cp Libraries/glm/src
5 | -cp Libraries/gltf/src
6 | -cp Libraries/glm/src
7 | -cp Libraries/glm
8 | -cp Libraries/gltf
9 | -cp Libraries/glm
10 | -D glm
11 | -D gltf
12 | -D sys_g1
13 | -D sys_g2
14 | -D sys_g3
15 | -D sys_g4
16 | -D sys_a1
17 | -D sys_a2
18 | -D kha_js
19 | -D kha_g1
20 | -D kha_g2
21 | -D kha_g3
22 | -D kha_g4
23 | -D kha_a1
24 | -D kha_a2
25 | -D canvas_id=khanvas
26 | -D script_name=kha
27 | -D kha_webgl
28 | -D sys_html5
29 | -D kha_html5
30 | -D kha_html5_js
31 | -D kha
32 | -D kha_version=1611
33 | -D kha_output=build/html5
34 | -D completion
35 | -js build/html5/kha.js
36 | -main Main
37 |
--------------------------------------------------------------------------------
/Shaders/skin.vert.glsl:
--------------------------------------------------------------------------------
1 | #version 450
2 |
3 | in vec3 position;
4 | in vec3 normal;
5 | in vec4 joints;
6 | in vec4 weights;
7 |
8 | uniform mat4 MVP;
9 | uniform mat4 M;
10 | uniform mat4 jointMatrices[2];
11 |
12 | out vec3 pos;
13 | out vec3 norm;
14 |
15 | void main() {
16 | mat4 skinMatrix = weights.x * jointMatrices[int(joints.x)]
17 | + weights.y * jointMatrices[int(joints.y)]
18 | + weights.z * jointMatrices[int(joints.z)]
19 | + weights.w * jointMatrices[int(joints.w)];
20 |
21 | pos = (M * skinMatrix * vec4(position, 1.0)).xyz;
22 | norm = (M * skinMatrix * vec4(normal, 0.0)).xyz;
23 |
24 | gl_Position = MVP * skinMatrix * vec4(position, 1.0);
25 | }
26 |
--------------------------------------------------------------------------------
/Sources/Loader.hx:
--------------------------------------------------------------------------------
1 | package;
2 |
3 | import kha.System;
4 | import kha.Framebuffer;
5 | import kha.Assets;
6 | import kha.Color;
7 |
8 | class Loader {
9 | @:allow(Main)
10 | static var onDone:Void->Void = null;
11 |
12 | @:allow(Main)
13 | static function load():Void {
14 | System.notifyOnRender(render);
15 | Assets.loadEverything(function() {
16 | System.removeRenderListener(render);
17 | onDone();
18 | });
19 | }
20 |
21 | static var bg:Color = Color.Black;
22 | static var barbg:Color = Color.fromFloats(0.25, 0.25, 0.25, 1);
23 | static var barfg:Color = Color.White;
24 | static var barw:Float = 256;
25 | static var barh:Float = 4;
26 |
27 | static function render(fb:Framebuffer):Void {
28 | var g = fb.g2;
29 | g.begin(true, bg);
30 |
31 | var sw:Float = System.windowWidth();
32 | var sh:Float = System.windowHeight();
33 | g.color = barbg;
34 | g.fillRect((sw - barw) / 2, (sh - barh) / 2, barw, barh);
35 | g.color = barfg;
36 | g.fillRect((sw - barw) / 2, (sh - barh) / 2, barw * Assets.progress, barh);
37 |
38 | g.end();
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | build/
2 | korefile.js
3 |
4 | # Created by https://www.gitignore.io/api/windows,osx,linux,visualstudiocode
5 |
6 | ### Linux ###
7 | *~
8 |
9 | # temporary files which can be created if a process still has a handle open of a deleted file
10 | .fuse_hidden*
11 |
12 | # KDE directory preferences
13 | .directory
14 |
15 | # Linux trash folder which might appear on any partition or disk
16 | .Trash-*
17 |
18 | # .nfs files are created when an open file is removed but is still being accessed
19 | .nfs*
20 |
21 | ### OSX ###
22 | *.DS_Store
23 | .AppleDouble
24 | .LSOverride
25 |
26 | # Icon must end with two \r
27 | Icon
28 |
29 | # Thumbnails
30 | ._*
31 |
32 | # Files that might appear in the root of a volume
33 | .DocumentRevisions-V100
34 | .fseventsd
35 | .Spotlight-V100
36 | .TemporaryItems
37 | .Trashes
38 | .VolumeIcon.icns
39 | .com.apple.timemachine.donotpresent
40 |
41 | # Directories potentially created on remote AFP share
42 | .AppleDB
43 | .AppleDesktop
44 | Network Trash Folder
45 | Temporary Items
46 | .apdisk
47 |
48 | ### VisualStudioCode ###
49 | .vscode/*
50 | !.vscode/settings.json
51 | !.vscode/tasks.json
52 | !.vscode/launch.json
53 | !.vscode/extensions.json
54 | .history
55 |
56 | ### Windows ###
57 | # Windows thumbnail cache files
58 | Thumbs.db
59 | ehthumbs.db
60 | ehthumbs_vista.db
61 |
62 | # Folder config file
63 | Desktop.ini
64 |
65 | # Recycle Bin used on file shares
66 | $RECYCLE.BIN/
67 |
68 | # Windows Installer files
69 | *.cab
70 | *.msi
71 | *.msm
72 | *.msp
73 |
74 | # Windows shortcuts
75 | *.lnk
76 |
77 | # End of https://www.gitignore.io/api/windows,osx,linux,visualstudiocode
78 |
--------------------------------------------------------------------------------
/Sources/Game.hx:
--------------------------------------------------------------------------------
1 | import kha.System;
2 | import kha.Framebuffer;
3 | import kha.Color;
4 | import kha.Shaders;
5 | import kha.Image;
6 | import kha.Assets;
7 | import kha.graphics4.PipelineState;
8 | import kha.graphics4.VertexStructure;
9 | import kha.graphics4.VertexData;
10 | import kha.graphics4.ConstantLocation;
11 | import kha.graphics4.TextureUnit;
12 | import kha.graphics4.CullMode;
13 | import kha.graphics4.CompareMode;
14 | import kha.graphics4.VertexStructure;
15 | import kha.graphics4.VertexBuffer;
16 | import kha.graphics4.IndexBuffer;
17 | import kha.graphics4.Usage;
18 | import haxe.ds.Vector;
19 | import gltf.GLTF;
20 | import gltf.types.AnimationChannel;
21 | import glm.GLM;
22 | import glm.Mat4;
23 | import glm.Vec4;
24 | import glm.Vec3;
25 | import glm.Quat;
26 |
27 | class Transform {
28 | public var pos:Vec3 = new Vec3();
29 | public var rot:Quat = Quat.identity(new Quat());
30 | public var sca:Vec3 = new Vec3(1, 1, 1);
31 | public var mat:Mat4 = Mat4.identity(new Mat4());
32 |
33 | public function new() {}
34 |
35 | public function calculate(?parent:Transform):Void {
36 | mat = GLM.transform(pos, rot, sca, mat);
37 | if(parent != null) {
38 | Mat4.multMat(parent.mat, mat, mat);
39 | }
40 | }
41 | }
42 |
43 | @:allow(Main)
44 | class Game {
45 | static var pipeline:PipelineState;
46 | static var mvpID:ConstantLocation;
47 | static var mID:ConstantLocation;
48 | static var jointMatricesIDs:Array;
49 | static var inverseBindMatrices:Array;
50 |
51 | static var mvp:Mat4;
52 | static var vp:Mat4;
53 | static var base:Transform;
54 | static var bones:Array;
55 |
56 | static var channels:Vector;
57 |
58 | static var jointMatrices:Array;
59 |
60 | static var vertexBuffer:VertexBuffer;
61 | static var indexBuffer:IndexBuffer;
62 |
63 | static var t:Float = 0;
64 |
65 | static function initialize():Void {
66 | var structure = new VertexStructure();
67 | structure.add("position", VertexData.Float3);
68 | structure.add("normal", VertexData.Float3);
69 | structure.add("joints", VertexData.Float4);
70 | structure.add("weights", VertexData.Float4);
71 |
72 | pipeline = new PipelineState();
73 | pipeline.inputLayout = [structure];
74 | pipeline.vertexShader = Shaders.skin_vert;
75 | pipeline.fragmentShader = Shaders.skin_frag;
76 | pipeline.cullMode = CullMode.Clockwise;
77 | pipeline.depthMode = CompareMode.Less;
78 | pipeline.depthWrite = true;
79 |
80 | try {
81 | pipeline.compile();
82 | }
83 | catch(e:String) {
84 | #if js
85 | js.Browser.console.error(e);
86 | #else
87 | trace('ERROR:');
88 | trace(e);
89 | #end
90 | }
91 |
92 | mvpID = pipeline.getConstantLocation("MVP");
93 | mID = pipeline.getConstantLocation("M");
94 | jointMatricesIDs = new Array();
95 | jointMatricesIDs.push(pipeline.getConstantLocation("jointMatrices[0]"));
96 | jointMatricesIDs.push(pipeline.getConstantLocation("jointMatrices[1]"));
97 |
98 | var riggedSimple:GLTF = GLTF.parseAndLoad(Assets.blobs.RiggedSimple_gltf.toString(), [
99 | Assets.blobs.RiggedSimple0_bin.bytes
100 | ]);
101 |
102 | var positions:Vector = riggedSimple.meshes[0].primitives[0].getFloatAttributeValues("POSITION");
103 | var normals:Vector = riggedSimple.meshes[0].primitives[0].getFloatAttributeValues("NORMAL");
104 | var joints:Vector = riggedSimple.meshes[0].primitives[0].getIntAttributeValues("JOINTS_0");
105 | var weights:Vector = riggedSimple.meshes[0].primitives[0].getFloatAttributeValues("WEIGHTS_0");
106 | var indices:Vector = riggedSimple.meshes[0].primitives[0].getIndexValues();
107 |
108 | var numVerts:Int = Std.int(positions.length / 3);
109 |
110 | vertexBuffer = new VertexBuffer(numVerts, structure, Usage.StaticUsage);
111 | var vbData = vertexBuffer.lock();
112 | for(v in 0...numVerts) {
113 | vbData[(v * 14) + 0] = positions[(v * 3) + 0];
114 | vbData[(v * 14) + 1] = positions[(v * 3) + 1];
115 | vbData[(v * 14) + 2] = positions[(v * 3) + 2];
116 |
117 | vbData[(v * 14) + 3] = normals[(v * 3) + 0];
118 | vbData[(v * 14) + 4] = normals[(v * 3) + 1];
119 | vbData[(v * 14) + 5] = normals[(v * 3) + 2];
120 |
121 | vbData[(v * 14) + 6] = joints[(v * 4) + 0];
122 | vbData[(v * 14) + 7] = joints[(v * 4) + 1];
123 | vbData[(v * 14) + 8] = joints[(v * 4) + 2];
124 | vbData[(v * 14) + 9] = joints[(v * 4) + 3];
125 |
126 | vbData[(v * 14) + 10] = weights[(v * 4) + 0];
127 | vbData[(v * 14) + 11] = weights[(v * 4) + 1];
128 | vbData[(v * 14) + 12] = weights[(v * 4) + 2];
129 | vbData[(v * 14) + 13] = weights[(v * 4) + 3];
130 | }
131 | vertexBuffer.unlock();
132 |
133 | indexBuffer = new IndexBuffer(indices.length, Usage.StaticUsage);
134 | var iData = indexBuffer.lock();
135 | for (i in 0...iData.length) {
136 | iData[i] = indices[i];
137 | }
138 | indexBuffer.unlock();
139 |
140 | mvp = new Mat4();
141 | base = new Transform();
142 | base.calculate();
143 | var v:Mat4 = GLM.lookAt(
144 | new Vec3(10, 10, 10),
145 | new Vec3(0, 0, 0),
146 | new Vec3(0, 0, 1),
147 | new Mat4()
148 | );
149 | var p:Mat4 = GLM.perspective(
150 | 49 * Math.PI / 180,
151 | System.windowWidth() / System.windowHeight(),
152 | 0.1, 100,
153 | new Mat4()
154 | );
155 | vp = Mat4.multMat(p, v, new Mat4());
156 |
157 | inverseBindMatrices = new Array();
158 | inverseBindMatrices.push(Mat4.fromFloatArray(riggedSimple.skins[0].inverseBindMatrices[0].toArray()));
159 | inverseBindMatrices.push(Mat4.fromFloatArray(riggedSimple.skins[0].inverseBindMatrices[1].toArray()));
160 |
161 | bones = new Array();
162 | bones.push(new Transform());
163 | bones.push(new Transform());
164 |
165 | jointMatrices = new Array();
166 | jointMatrices.push(Mat4.identity(new Mat4()));
167 | jointMatrices.push(Mat4.identity(new Mat4()));
168 |
169 | channels = riggedSimple.animations[0].channels;
170 | }
171 |
172 | static function sample(t:Float, samples:Vector):Vector {
173 | if(t < samples[0].input) return samples[0].output;
174 | if(t > samples[samples.length - 1].input) return samples[samples.length - 1].output;
175 |
176 | // find the two points to interpolate between
177 | var j:Int = 0;
178 | var alpha:Float = 0.0;
179 | for(i in 0...(samples.length - 1)) {
180 | if(t >= samples[i].input && t < samples[i + 1].input) {
181 | j = i;
182 | alpha = (t - samples[i].input) / (samples[i + 1].input - samples[i].input);
183 | break;
184 | }
185 | }
186 |
187 | var output:Vector = new Vector(samples[0].output.length);
188 | for(i in 0...output.length) {
189 | output[i] = GLM.lerp(samples[j].output[i], samples[j + 1].output[i], alpha);
190 | }
191 |
192 | return output;
193 | }
194 |
195 | static function update():Void {
196 | for(channel in channels) {
197 | switch(channel.path) {
198 | case TRANSLATION: {
199 | var translation:Vector = sample(t, channel.samples);
200 | bones[channel.node.id - 2].pos.x = translation[0];
201 | bones[channel.node.id - 2].pos.y = translation[1];
202 | bones[channel.node.id - 2].pos.z = translation[2];
203 | }
204 |
205 | case ROTATION: {
206 | var rotation:Vector = sample(t, channel.samples);
207 | bones[channel.node.id - 2].rot.x = rotation[0];
208 | bones[channel.node.id - 2].rot.y = rotation[1];
209 | bones[channel.node.id - 2].rot.z = rotation[2];
210 | bones[channel.node.id - 2].rot.w = rotation[3];
211 | }
212 |
213 | case SCALE: {
214 | var scale:Vector = sample(t, channel.samples);
215 | bones[channel.node.id - 2].sca.x = scale[0];
216 | bones[channel.node.id - 2].sca.y = scale[1];
217 | bones[channel.node.id - 2].sca.z = scale[2];
218 | }
219 |
220 | default: {}
221 | }
222 | }
223 |
224 | Quat.multiplyQuats(Quat.fromEuler(0, 0, -0.25 * (1 / 60), new Quat()), base.rot, base.rot);
225 | base.calculate();
226 | bones[0].calculate(base);
227 | bones[1].calculate(bones[0]);
228 |
229 | Mat4.multMat(bones[0].mat, inverseBindMatrices[0], jointMatrices[0]);
230 | Mat4.multMat(bones[1].mat, inverseBindMatrices[1], jointMatrices[1]);
231 |
232 | Mat4.multMat(vp, base.mat, mvp);
233 |
234 | t += 1 / 60;
235 | if(t >= 2) {
236 | t = 0;
237 | }
238 | }
239 |
240 | static function render(fb:Framebuffer):Void {
241 | var g = fb.g4;
242 |
243 | g.begin();
244 | g.clear(Color.Black, 1);
245 | g.setPipeline(pipeline);
246 |
247 | g.setMatrix(mvpID, mvp);
248 | g.setMatrix(mID, base.mat);
249 | g.setMatrix(jointMatricesIDs[0], jointMatrices[0]);
250 | g.setMatrix(jointMatricesIDs[1], jointMatrices[1]);
251 |
252 | g.setVertexBuffer(vertexBuffer);
253 | g.setIndexBuffer(indexBuffer);
254 | g.drawIndexedVertices();
255 | }
256 | }
257 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "[]"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright 2018 Kenton Hamaluik
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
202 |
--------------------------------------------------------------------------------
/Assets/RiggedSimple.gltf:
--------------------------------------------------------------------------------
1 | {
2 | "asset": {
3 | "generator": "COLLADA2GLTF",
4 | "version": "2.0"
5 | },
6 | "scene": 0,
7 | "scenes": [
8 | {
9 | "nodes": [
10 | 0
11 | ]
12 | }
13 | ],
14 | "nodes": [
15 | {
16 | "children": [
17 | 4,
18 | 1
19 | ],
20 | "matrix": [
21 | 1.0,
22 | 0.0,
23 | 0.0,
24 | 0.0,
25 | 0.0,
26 | 0.0,
27 | -1.0,
28 | 0.0,
29 | 0.0,
30 | 1.0,
31 | 0.0,
32 | 0.0,
33 | 0.0,
34 | 0.0,
35 | 0.0,
36 | 1.0
37 | ]
38 | },
39 | {
40 | "mesh": 0,
41 | "skin": 0
42 | },
43 | {
44 | "children": [
45 | 3
46 | ],
47 | "translation": [
48 | 0.0,
49 | -3.156060017772689e-7,
50 | -4.1803297996521
51 | ],
52 | "rotation": [
53 | -0.7047404050827026,
54 | -0.0,
55 | -0.0,
56 | -0.7094652056694031
57 | ],
58 | "scale": [
59 | 1.0,
60 | 0.9999998807907105,
61 | 0.9999998807907105
62 | ]
63 | },
64 | {
65 | "translation": [
66 | 0.0,
67 | 4.18717098236084,
68 | 0.0
69 | ],
70 | "rotation": [
71 | -0.0020521103870123626,
72 | -9.947898149675895e-8,
73 | -0.00029137087403796613,
74 | -0.999997854232788
75 | ],
76 | "scale": [
77 | 1.0,
78 | 1.0,
79 | 1.0000001192092896
80 | ]
81 | },
82 | {
83 | "children": [
84 | 2
85 | ]
86 | }
87 | ],
88 | "meshes": [
89 | {
90 | "primitives": [
91 | {
92 | "attributes": {
93 | "JOINTS_0": 1,
94 | "NORMAL": 2,
95 | "POSITION": 3,
96 | "WEIGHTS_0": 4
97 | },
98 | "indices": 0,
99 | "mode": 4,
100 | "material": 0
101 | }
102 | ],
103 | "name": "Cylinder"
104 | }
105 | ],
106 | "animations": [
107 | {
108 | "channels": [
109 | {
110 | "sampler": 0,
111 | "target": {
112 | "node": 2,
113 | "path": "translation"
114 | }
115 | },
116 | {
117 | "sampler": 1,
118 | "target": {
119 | "node": 2,
120 | "path": "rotation"
121 | }
122 | },
123 | {
124 | "sampler": 2,
125 | "target": {
126 | "node": 2,
127 | "path": "scale"
128 | }
129 | },
130 | {
131 | "sampler": 3,
132 | "target": {
133 | "node": 3,
134 | "path": "translation"
135 | }
136 | },
137 | {
138 | "sampler": 4,
139 | "target": {
140 | "node": 3,
141 | "path": "rotation"
142 | }
143 | },
144 | {
145 | "sampler": 5,
146 | "target": {
147 | "node": 3,
148 | "path": "scale"
149 | }
150 | }
151 | ],
152 | "samplers": [
153 | {
154 | "input": 5,
155 | "interpolation": "LINEAR",
156 | "output": 6
157 | },
158 | {
159 | "input": 5,
160 | "interpolation": "LINEAR",
161 | "output": 7
162 | },
163 | {
164 | "input": 5,
165 | "interpolation": "LINEAR",
166 | "output": 8
167 | },
168 | {
169 | "input": 9,
170 | "interpolation": "LINEAR",
171 | "output": 10
172 | },
173 | {
174 | "input": 9,
175 | "interpolation": "LINEAR",
176 | "output": 11
177 | },
178 | {
179 | "input": 9,
180 | "interpolation": "LINEAR",
181 | "output": 12
182 | }
183 | ]
184 | }
185 | ],
186 | "skins": [
187 | {
188 | "inverseBindMatrices": 13,
189 | "skeleton": 2,
190 | "joints": [
191 | 2,
192 | 3
193 | ],
194 | "name": "Armature"
195 | }
196 | ],
197 | "accessors": [
198 | {
199 | "bufferView": 0,
200 | "byteOffset": 0,
201 | "componentType": 5123,
202 | "count": 564,
203 | "max": [
204 | 95
205 | ],
206 | "min": [
207 | 0
208 | ],
209 | "type": "SCALAR"
210 | },
211 | {
212 | "bufferView": 1,
213 | "byteOffset": 0,
214 | "componentType": 5123,
215 | "count": 96,
216 | "max": [
217 | 1,
218 | 1,
219 | 0,
220 | 0
221 | ],
222 | "min": [
223 | 0,
224 | 0,
225 | 0,
226 | 0
227 | ],
228 | "type": "VEC4"
229 | },
230 | {
231 | "bufferView": 2,
232 | "byteOffset": 0,
233 | "componentType": 5126,
234 | "count": 96,
235 | "max": [
236 | 0.998198390007019,
237 | 0.998198390007019,
238 | 0.6888381242752075
239 | ],
240 | "min": [
241 | -0.998198390007019,
242 | -0.998198390007019,
243 | -0.6444730758666992
244 | ],
245 | "type": "VEC3"
246 | },
247 | {
248 | "bufferView": 2,
249 | "byteOffset": 1152,
250 | "componentType": 5126,
251 | "count": 96,
252 | "max": [
253 | 1.0,
254 | 1.0,
255 | 4.575077056884766
256 | ],
257 | "min": [
258 | -1.0,
259 | -0.9999995827674866,
260 | -4.575077056884766
261 | ],
262 | "type": "VEC3"
263 | },
264 | {
265 | "bufferView": 3,
266 | "byteOffset": 0,
267 | "componentType": 5126,
268 | "count": 96,
269 | "max": [
270 | 1.0,
271 | 0.26139819622039797,
272 | 0.0,
273 | 0.0
274 | ],
275 | "min": [
276 | 0.738601803779602,
277 | 0.0,
278 | 0.0,
279 | 0.0
280 | ],
281 | "type": "VEC4"
282 | },
283 | {
284 | "bufferView": 4,
285 | "byteOffset": 0,
286 | "componentType": 5126,
287 | "count": 3,
288 | "max": [
289 | 2.083333015441895
290 | ],
291 | "min": [
292 | 0.04166661947965622
293 | ],
294 | "type": "SCALAR"
295 | },
296 | {
297 | "bufferView": 5,
298 | "byteOffset": 0,
299 | "componentType": 5126,
300 | "count": 3,
301 | "max": [
302 | 0.0,
303 | -3.156060017772689e-7,
304 | -4.1803297996521
305 | ],
306 | "min": [
307 | 0.0,
308 | -3.156060017772689e-7,
309 | -4.1803297996521
310 | ],
311 | "type": "VEC3"
312 | },
313 | {
314 | "bufferView": 6,
315 | "byteOffset": 0,
316 | "componentType": 5126,
317 | "count": 3,
318 | "max": [
319 | -0.7047404050827026,
320 | -0.0,
321 | -0.0,
322 | -0.7094652056694031
323 | ],
324 | "min": [
325 | -0.7047404050827026,
326 | -0.0,
327 | -0.0,
328 | -0.7094652056694031
329 | ],
330 | "type": "VEC4"
331 | },
332 | {
333 | "bufferView": 5,
334 | "byteOffset": 36,
335 | "componentType": 5126,
336 | "count": 3,
337 | "max": [
338 | 1.0,
339 | 0.9999998807907105,
340 | 0.9999998807907105
341 | ],
342 | "min": [
343 | 1.0,
344 | 0.9999998807907105,
345 | 0.9999998807907105
346 | ],
347 | "type": "VEC3"
348 | },
349 | {
350 | "bufferView": 4,
351 | "byteOffset": 12,
352 | "componentType": 5126,
353 | "count": 3,
354 | "max": [
355 | 2.083333015441895
356 | ],
357 | "min": [
358 | 0.04166661947965622
359 | ],
360 | "type": "SCALAR"
361 | },
362 | {
363 | "bufferView": 5,
364 | "byteOffset": 72,
365 | "componentType": 5126,
366 | "count": 3,
367 | "max": [
368 | 0.0,
369 | 4.18717098236084,
370 | 0.0
371 | ],
372 | "min": [
373 | 0.0,
374 | 4.18717098236084,
375 | 0.0
376 | ],
377 | "type": "VEC3"
378 | },
379 | {
380 | "bufferView": 6,
381 | "byteOffset": 48,
382 | "componentType": 5126,
383 | "count": 3,
384 | "max": [
385 | 0.2933785021305084,
386 | -9.947898149675895e-8,
387 | -0.0002783441450446844,
388 | -0.9559963345527648
389 | ],
390 | "min": [
391 | -0.0020521103870123626,
392 | -0.00008614854596089572,
393 | -0.00029137087403796613,
394 | -0.999997854232788
395 | ],
396 | "type": "VEC4"
397 | },
398 | {
399 | "bufferView": 5,
400 | "byteOffset": 108,
401 | "componentType": 5126,
402 | "count": 3,
403 | "max": [
404 | 1.0,
405 | 1.0,
406 | 1.0000001192092896
407 | ],
408 | "min": [
409 | 1.0,
410 | 1.0,
411 | 1.0000001192092896
412 | ],
413 | "type": "VEC3"
414 | },
415 | {
416 | "bufferView": 7,
417 | "byteOffset": 0,
418 | "componentType": 5126,
419 | "count": 2,
420 | "max": [
421 | 1.0,
422 | 0.0,
423 | 0.0000013948100558991428,
424 | 0.0,
425 | 0.000002896920022976701,
426 | 0.006681859027594328,
427 | -0.9999778270721436,
428 | 0.0,
429 | 0.0005827349959872663,
430 | 0.9999966025352478,
431 | 0.006681739818304777,
432 | 0.0,
433 | 0.0,
434 | 4.18023681640625,
435 | 0.02795993909239769,
436 | 1.0
437 | ],
438 | "min": [
439 | 0.9999998807907105,
440 | -0.0005827400018461049,
441 | 0.0,
442 | 0.0,
443 | 0.0,
444 | 0.002577662002295256,
445 | -0.9999967217445374,
446 | 0.0,
447 | 0.0,
448 | 0.999977707862854,
449 | 0.002577601931989193,
450 | 0.0,
451 | -0.000004012620138382772,
452 | -0.006818830035626888,
453 | 0.027931740507483484,
454 | 1.0
455 | ],
456 | "type": "MAT4"
457 | }
458 | ],
459 | "materials": [
460 | {
461 | "pbrMetallicRoughness": {
462 | "baseColorFactor": [
463 | 0.27963539958000185,
464 | 0.6399999856948853,
465 | 0.21094389259815217,
466 | 1.0
467 | ],
468 | "metallicFactor": 0.0
469 | },
470 | "emissiveFactor": [
471 | 0.0,
472 | 0.0,
473 | 0.0
474 | ],
475 | "name": "Material_001-effect"
476 | }
477 | ],
478 | "bufferViews": [
479 | {
480 | "buffer": 0,
481 | "byteOffset": 5000,
482 | "byteLength": 1128,
483 | "target": 34963
484 | },
485 | {
486 | "buffer": 0,
487 | "byteOffset": 4208,
488 | "byteLength": 768,
489 | "byteStride": 8,
490 | "target": 34962
491 | },
492 | {
493 | "buffer": 0,
494 | "byteOffset": 1904,
495 | "byteLength": 2304,
496 | "byteStride": 12,
497 | "target": 34962
498 | },
499 | {
500 | "buffer": 0,
501 | "byteOffset": 224,
502 | "byteLength": 1536,
503 | "byteStride": 16,
504 | "target": 34962
505 | },
506 | {
507 | "buffer": 0,
508 | "byteOffset": 4976,
509 | "byteLength": 24
510 | },
511 | {
512 | "buffer": 0,
513 | "byteOffset": 1760,
514 | "byteLength": 144
515 | },
516 | {
517 | "buffer": 0,
518 | "byteOffset": 128,
519 | "byteLength": 96
520 | },
521 | {
522 | "buffer": 0,
523 | "byteOffset": 0,
524 | "byteLength": 128
525 | }
526 | ],
527 | "buffers": [
528 | {
529 | "byteLength": 6128,
530 | "uri": "RiggedSimple0.bin"
531 | }
532 | ]
533 | }
534 |
--------------------------------------------------------------------------------
/docs/RiggedSimple.gltf:
--------------------------------------------------------------------------------
1 | {
2 | "asset": {
3 | "generator": "COLLADA2GLTF",
4 | "version": "2.0"
5 | },
6 | "scene": 0,
7 | "scenes": [
8 | {
9 | "nodes": [
10 | 0
11 | ]
12 | }
13 | ],
14 | "nodes": [
15 | {
16 | "children": [
17 | 4,
18 | 1
19 | ],
20 | "matrix": [
21 | 1.0,
22 | 0.0,
23 | 0.0,
24 | 0.0,
25 | 0.0,
26 | 0.0,
27 | -1.0,
28 | 0.0,
29 | 0.0,
30 | 1.0,
31 | 0.0,
32 | 0.0,
33 | 0.0,
34 | 0.0,
35 | 0.0,
36 | 1.0
37 | ]
38 | },
39 | {
40 | "mesh": 0,
41 | "skin": 0
42 | },
43 | {
44 | "children": [
45 | 3
46 | ],
47 | "translation": [
48 | 0.0,
49 | -3.156060017772689e-7,
50 | -4.1803297996521
51 | ],
52 | "rotation": [
53 | -0.7047404050827026,
54 | -0.0,
55 | -0.0,
56 | -0.7094652056694031
57 | ],
58 | "scale": [
59 | 1.0,
60 | 0.9999998807907105,
61 | 0.9999998807907105
62 | ]
63 | },
64 | {
65 | "translation": [
66 | 0.0,
67 | 4.18717098236084,
68 | 0.0
69 | ],
70 | "rotation": [
71 | -0.0020521103870123626,
72 | -9.947898149675895e-8,
73 | -0.00029137087403796613,
74 | -0.999997854232788
75 | ],
76 | "scale": [
77 | 1.0,
78 | 1.0,
79 | 1.0000001192092896
80 | ]
81 | },
82 | {
83 | "children": [
84 | 2
85 | ]
86 | }
87 | ],
88 | "meshes": [
89 | {
90 | "primitives": [
91 | {
92 | "attributes": {
93 | "JOINTS_0": 1,
94 | "NORMAL": 2,
95 | "POSITION": 3,
96 | "WEIGHTS_0": 4
97 | },
98 | "indices": 0,
99 | "mode": 4,
100 | "material": 0
101 | }
102 | ],
103 | "name": "Cylinder"
104 | }
105 | ],
106 | "animations": [
107 | {
108 | "channels": [
109 | {
110 | "sampler": 0,
111 | "target": {
112 | "node": 2,
113 | "path": "translation"
114 | }
115 | },
116 | {
117 | "sampler": 1,
118 | "target": {
119 | "node": 2,
120 | "path": "rotation"
121 | }
122 | },
123 | {
124 | "sampler": 2,
125 | "target": {
126 | "node": 2,
127 | "path": "scale"
128 | }
129 | },
130 | {
131 | "sampler": 3,
132 | "target": {
133 | "node": 3,
134 | "path": "translation"
135 | }
136 | },
137 | {
138 | "sampler": 4,
139 | "target": {
140 | "node": 3,
141 | "path": "rotation"
142 | }
143 | },
144 | {
145 | "sampler": 5,
146 | "target": {
147 | "node": 3,
148 | "path": "scale"
149 | }
150 | }
151 | ],
152 | "samplers": [
153 | {
154 | "input": 5,
155 | "interpolation": "LINEAR",
156 | "output": 6
157 | },
158 | {
159 | "input": 5,
160 | "interpolation": "LINEAR",
161 | "output": 7
162 | },
163 | {
164 | "input": 5,
165 | "interpolation": "LINEAR",
166 | "output": 8
167 | },
168 | {
169 | "input": 9,
170 | "interpolation": "LINEAR",
171 | "output": 10
172 | },
173 | {
174 | "input": 9,
175 | "interpolation": "LINEAR",
176 | "output": 11
177 | },
178 | {
179 | "input": 9,
180 | "interpolation": "LINEAR",
181 | "output": 12
182 | }
183 | ]
184 | }
185 | ],
186 | "skins": [
187 | {
188 | "inverseBindMatrices": 13,
189 | "skeleton": 2,
190 | "joints": [
191 | 2,
192 | 3
193 | ],
194 | "name": "Armature"
195 | }
196 | ],
197 | "accessors": [
198 | {
199 | "bufferView": 0,
200 | "byteOffset": 0,
201 | "componentType": 5123,
202 | "count": 564,
203 | "max": [
204 | 95
205 | ],
206 | "min": [
207 | 0
208 | ],
209 | "type": "SCALAR"
210 | },
211 | {
212 | "bufferView": 1,
213 | "byteOffset": 0,
214 | "componentType": 5123,
215 | "count": 96,
216 | "max": [
217 | 1,
218 | 1,
219 | 0,
220 | 0
221 | ],
222 | "min": [
223 | 0,
224 | 0,
225 | 0,
226 | 0
227 | ],
228 | "type": "VEC4"
229 | },
230 | {
231 | "bufferView": 2,
232 | "byteOffset": 0,
233 | "componentType": 5126,
234 | "count": 96,
235 | "max": [
236 | 0.998198390007019,
237 | 0.998198390007019,
238 | 0.6888381242752075
239 | ],
240 | "min": [
241 | -0.998198390007019,
242 | -0.998198390007019,
243 | -0.6444730758666992
244 | ],
245 | "type": "VEC3"
246 | },
247 | {
248 | "bufferView": 2,
249 | "byteOffset": 1152,
250 | "componentType": 5126,
251 | "count": 96,
252 | "max": [
253 | 1.0,
254 | 1.0,
255 | 4.575077056884766
256 | ],
257 | "min": [
258 | -1.0,
259 | -0.9999995827674866,
260 | -4.575077056884766
261 | ],
262 | "type": "VEC3"
263 | },
264 | {
265 | "bufferView": 3,
266 | "byteOffset": 0,
267 | "componentType": 5126,
268 | "count": 96,
269 | "max": [
270 | 1.0,
271 | 0.26139819622039797,
272 | 0.0,
273 | 0.0
274 | ],
275 | "min": [
276 | 0.738601803779602,
277 | 0.0,
278 | 0.0,
279 | 0.0
280 | ],
281 | "type": "VEC4"
282 | },
283 | {
284 | "bufferView": 4,
285 | "byteOffset": 0,
286 | "componentType": 5126,
287 | "count": 3,
288 | "max": [
289 | 2.083333015441895
290 | ],
291 | "min": [
292 | 0.04166661947965622
293 | ],
294 | "type": "SCALAR"
295 | },
296 | {
297 | "bufferView": 5,
298 | "byteOffset": 0,
299 | "componentType": 5126,
300 | "count": 3,
301 | "max": [
302 | 0.0,
303 | -3.156060017772689e-7,
304 | -4.1803297996521
305 | ],
306 | "min": [
307 | 0.0,
308 | -3.156060017772689e-7,
309 | -4.1803297996521
310 | ],
311 | "type": "VEC3"
312 | },
313 | {
314 | "bufferView": 6,
315 | "byteOffset": 0,
316 | "componentType": 5126,
317 | "count": 3,
318 | "max": [
319 | -0.7047404050827026,
320 | -0.0,
321 | -0.0,
322 | -0.7094652056694031
323 | ],
324 | "min": [
325 | -0.7047404050827026,
326 | -0.0,
327 | -0.0,
328 | -0.7094652056694031
329 | ],
330 | "type": "VEC4"
331 | },
332 | {
333 | "bufferView": 5,
334 | "byteOffset": 36,
335 | "componentType": 5126,
336 | "count": 3,
337 | "max": [
338 | 1.0,
339 | 0.9999998807907105,
340 | 0.9999998807907105
341 | ],
342 | "min": [
343 | 1.0,
344 | 0.9999998807907105,
345 | 0.9999998807907105
346 | ],
347 | "type": "VEC3"
348 | },
349 | {
350 | "bufferView": 4,
351 | "byteOffset": 12,
352 | "componentType": 5126,
353 | "count": 3,
354 | "max": [
355 | 2.083333015441895
356 | ],
357 | "min": [
358 | 0.04166661947965622
359 | ],
360 | "type": "SCALAR"
361 | },
362 | {
363 | "bufferView": 5,
364 | "byteOffset": 72,
365 | "componentType": 5126,
366 | "count": 3,
367 | "max": [
368 | 0.0,
369 | 4.18717098236084,
370 | 0.0
371 | ],
372 | "min": [
373 | 0.0,
374 | 4.18717098236084,
375 | 0.0
376 | ],
377 | "type": "VEC3"
378 | },
379 | {
380 | "bufferView": 6,
381 | "byteOffset": 48,
382 | "componentType": 5126,
383 | "count": 3,
384 | "max": [
385 | 0.2933785021305084,
386 | -9.947898149675895e-8,
387 | -0.0002783441450446844,
388 | -0.9559963345527648
389 | ],
390 | "min": [
391 | -0.0020521103870123626,
392 | -0.00008614854596089572,
393 | -0.00029137087403796613,
394 | -0.999997854232788
395 | ],
396 | "type": "VEC4"
397 | },
398 | {
399 | "bufferView": 5,
400 | "byteOffset": 108,
401 | "componentType": 5126,
402 | "count": 3,
403 | "max": [
404 | 1.0,
405 | 1.0,
406 | 1.0000001192092896
407 | ],
408 | "min": [
409 | 1.0,
410 | 1.0,
411 | 1.0000001192092896
412 | ],
413 | "type": "VEC3"
414 | },
415 | {
416 | "bufferView": 7,
417 | "byteOffset": 0,
418 | "componentType": 5126,
419 | "count": 2,
420 | "max": [
421 | 1.0,
422 | 0.0,
423 | 0.0000013948100558991428,
424 | 0.0,
425 | 0.000002896920022976701,
426 | 0.006681859027594328,
427 | -0.9999778270721436,
428 | 0.0,
429 | 0.0005827349959872663,
430 | 0.9999966025352478,
431 | 0.006681739818304777,
432 | 0.0,
433 | 0.0,
434 | 4.18023681640625,
435 | 0.02795993909239769,
436 | 1.0
437 | ],
438 | "min": [
439 | 0.9999998807907105,
440 | -0.0005827400018461049,
441 | 0.0,
442 | 0.0,
443 | 0.0,
444 | 0.002577662002295256,
445 | -0.9999967217445374,
446 | 0.0,
447 | 0.0,
448 | 0.999977707862854,
449 | 0.002577601931989193,
450 | 0.0,
451 | -0.000004012620138382772,
452 | -0.006818830035626888,
453 | 0.027931740507483484,
454 | 1.0
455 | ],
456 | "type": "MAT4"
457 | }
458 | ],
459 | "materials": [
460 | {
461 | "pbrMetallicRoughness": {
462 | "baseColorFactor": [
463 | 0.27963539958000185,
464 | 0.6399999856948853,
465 | 0.21094389259815217,
466 | 1.0
467 | ],
468 | "metallicFactor": 0.0
469 | },
470 | "emissiveFactor": [
471 | 0.0,
472 | 0.0,
473 | 0.0
474 | ],
475 | "name": "Material_001-effect"
476 | }
477 | ],
478 | "bufferViews": [
479 | {
480 | "buffer": 0,
481 | "byteOffset": 5000,
482 | "byteLength": 1128,
483 | "target": 34963
484 | },
485 | {
486 | "buffer": 0,
487 | "byteOffset": 4208,
488 | "byteLength": 768,
489 | "byteStride": 8,
490 | "target": 34962
491 | },
492 | {
493 | "buffer": 0,
494 | "byteOffset": 1904,
495 | "byteLength": 2304,
496 | "byteStride": 12,
497 | "target": 34962
498 | },
499 | {
500 | "buffer": 0,
501 | "byteOffset": 224,
502 | "byteLength": 1536,
503 | "byteStride": 16,
504 | "target": 34962
505 | },
506 | {
507 | "buffer": 0,
508 | "byteOffset": 4976,
509 | "byteLength": 24
510 | },
511 | {
512 | "buffer": 0,
513 | "byteOffset": 1760,
514 | "byteLength": 144
515 | },
516 | {
517 | "buffer": 0,
518 | "byteOffset": 128,
519 | "byteLength": 96
520 | },
521 | {
522 | "buffer": 0,
523 | "byteOffset": 0,
524 | "byteLength": 128
525 | }
526 | ],
527 | "buffers": [
528 | {
529 | "byteLength": 6128,
530 | "uri": "RiggedSimple0.bin"
531 | }
532 | ]
533 | }
534 |
--------------------------------------------------------------------------------