-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1949 from AnalyticalGraphicsInc/gltf-8
Support for glTF 0.8
- Loading branch information
Showing
38 changed files
with
4,519 additions
and
3,565 deletions.
There are no files selected for viewing
Empty file.
Large diffs are not rendered by default.
Oops, something went wrong.
Empty file.
54 changes: 33 additions & 21 deletions
54
Apps/SampleData/models/CesiumGround/Cesium_Ground.gltf
100644 → 100755
Large diffs are not rendered by default.
Oops, something went wrong.
316 changes: 189 additions & 127 deletions
316
Apps/SampleData/models/CesiumMan/Cesium_Man.gltf
100644 → 100755
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/*global define*/ | ||
define([ | ||
'../Core/ComponentDatatype' | ||
], function( | ||
ComponentDatatype) { | ||
"use strict"; | ||
|
||
var ComponentsPerAttribute = { | ||
'SCALAR' : 1, | ||
'VEC2' : 2, | ||
'VEC3' : 3, | ||
'VEC4' : 4, | ||
'MAT2' : 4, | ||
'MAT3' : 9, | ||
'MAT4' : 16 | ||
}; | ||
|
||
/** | ||
* @private | ||
*/ | ||
var getModelAccessor = function(accessor) { | ||
var componentDatatype = accessor.componentType; | ||
var componentsPerAttribute = ComponentsPerAttribute[accessor.type]; | ||
|
||
return { | ||
componentsPerAttribute : componentsPerAttribute, | ||
createArrayBufferView : function(buffer, byteOffset, length) { | ||
return ComponentDatatype.createArrayBufferView(componentDatatype, buffer, byteOffset, componentsPerAttribute * length); | ||
} | ||
}; | ||
}; | ||
|
||
return getModelAccessor; | ||
}); |
Oops, something went wrong.