Skip to content

Commit

Permalink
Merge pull request #3891 from lasalvavida/web3d-quantized-attributes
Browse files Browse the repository at this point in the history
Web3d quantized attributes
  • Loading branch information
pjcozzi authored Jun 30, 2016
2 parents 714cf5d + b4837fa commit e6aba2f
Show file tree
Hide file tree
Showing 12 changed files with 4,168 additions and 94 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Change Log
* Added [hot air balloon](https://github.com/AnalyticalGraphicsInc/cesium/tree/master/Apps/SampleData/models/CesiumBalloon) sample model.
* Fixed handling of sampled Rectangle coordinates in CZML. [#4033](https://github.com/AnalyticalGraphicsInc/cesium/pull/4033)
* Fix "Cannot read property 'x' of undefined" error when calling SceneTransforms.wgs84ToWindowCoordinates in certain cases. [#4022](https://github.com/AnalyticalGraphicsInc/cesium/pull/4022)
* Implemented support for [WEB3D_quantized_attributes](https://github.com/KhronosGroup/glTF/blob/master/extensions/Vendor/WEB3D_quantized_attributes/README.md). [#3241](https://github.com/AnalyticalGraphicsInc/cesium/issues/3241)
* Re-enabled mouse inputs after a specified number of milliseconds past the most recent touch event.
* Exposed a parametric ray-triangle intersection test to the API as `IntersectionTests.rayTriangleParametric`.
* Added `packArray` and `unpackArray` functions to `Cartesian2`, `Cartesian3`, and `Cartesian4`.
Expand Down
458 changes: 364 additions & 94 deletions Source/Scene/Model.js

Large diffs are not rendered by default.

233 changes: 233 additions & 0 deletions Specs/Data/Models/Box-Color/Box-Color.gltf
Original file line number Diff line number Diff line change
@@ -0,0 +1,233 @@
{
"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_27": {
"bufferView": "bufferView_30",
"byteOffset": 288,
"byteStride": 12,
"componentType": 5126,
"count": 24,
"max": [
1,
1,
1
],
"min": [
0,
0,
0
],
"type": "VEC3"
}
},
"animations": {},
"asset": {
"generator": "collada2gltf@027f74366341d569dea42e9a68b7104cc3892054",
"premultipliedAlpha": true,
"profile": {
"api": "WebGL",
"version": "1.0.2"
},
"version": "1.0"
},
"bufferViews": {
"bufferView_29": {
"buffer": "Box",
"byteLength": 72,
"byteOffset": 0,
"target": 34963
},
"bufferView_30": {
"buffer": "Box",
"byteLength": 576,
"byteOffset": 72,
"target": 34962
}
},
"buffers": {
"Box": {
"byteLength": 648,
"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/AACAPwAAAAAAAAAAAACAPwAAAAAAAAAAAACAPwAAAAAAAAAAAACAPwAAAAAAAAAAAACAPwAAAD8AAAAAAACAPwAAAD8AAAAAAACAPwAAAD8AAAAAAACAPwAAAD8AAAAAAACAPwAAgD8AAAAAAACAPwAAgD8AAAAAAACAPwAAgD8AAAAAAACAPwAAgD8AAAAAAAAAAAAAgD8AAAAAAAAAAAAAgD8AAAAAAAAAAAAAgD8AAAAAAAAAAAAAgD8AAAAAAAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/lZaWPgAAAACCggI/lZaWPgAAAACCggI/lZaWPgAAAACCggI/lZaWPgAAAACCggI/"
}
},
"materials": {
"Effect-Red": {
"name": "Red",
"technique": "technique0",
"values": {}
}
},
"meshes": {
"Geometry-mesh002": {
"name": "Mesh",
"primitives": [
{
"attributes": {
"POSITION": "accessor_23",
"COLOR": "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_position",
"a_color"
],
"fragmentShader": "Box0FS",
"vertexShader": "Box0VS"
}
},
"scene": "defaultScene",
"scenes": {
"defaultScene": {
"nodes": [
"node_1"
]
}
},
"shaders": {
"Box0FS": {
"type": 35632,
"uri": "data:text/plain;base64,cHJlY2lzaW9uIGhpZ2hwIGZsb2F0Ow0KDQp2YXJ5aW5nIHZlYzMgY29sb3JBdHRyaWJ1dGU7DQoNCnZvaWQgbWFpbih2b2lkKSB7DQp2ZWM0IGNvbG9yID0gdmVjNChjb2xvckF0dHJpYnV0ZSwgMS4pOw0KZ2xfRnJhZ0NvbG9yID0gY29sb3I7DQp9DQo="
},
"Box0VS": {
"type": 35633,
"uri": "data:text/plain;base64,cHJlY2lzaW9uIGhpZ2hwIGZsb2F0Ow0KDQp2YXJ5aW5nIHZlYzMgY29sb3JBdHRyaWJ1dGU7DQoNCmF0dHJpYnV0ZSB2ZWMzIGFfcG9zaXRpb247DQphdHRyaWJ1dGUgdmVjMyBhX2NvbG9yOw0KDQp1bmlmb3JtIG1hdDQgdV9tb2RlbFZpZXdNYXRyaXg7DQp1bmlmb3JtIG1hdDQgdV9wcm9qZWN0aW9uTWF0cml4Ow0KDQp2b2lkIG1haW4odm9pZCkgew0KICAgIHZlYzQgcG9zID0gdV9tb2RlbFZpZXdNYXRyaXggKiB2ZWM0KGFfcG9zaXRpb24sMS4wKTsNCiAgICBnbF9Qb3NpdGlvbiA9IHVfcHJvamVjdGlvbk1hdHJpeCAqIHBvczsNCiAgICBjb2xvckF0dHJpYnV0ZSA9IGFfY29sb3I7DQp9DQo="
}
},
"skins": {},
"techniques": {
"technique0": {
"attributes": {
"a_position": "position",
"a_color": "color"
},
"parameters": {
"modelViewMatrix": {
"semantic": "MODELVIEW",
"type": 35676
},
"color": {
"semantic": "COLOR",
"type": 35665
},
"position": {
"semantic": "POSITION",
"type": 35665
},
"projectionMatrix": {
"semantic": "PROJECTION",
"type": 35676
}
},
"program": "program_0",
"states": {
"enable": [
2929,
2884
],
"disable": []
},
"uniforms": {
"u_modelViewMatrix": "modelViewMatrix",
"u_projectionMatrix": "projectionMatrix"
}
}
},
"extensionsUsed": [],
"cameras": {},
"images": {},
"extensions": {
"KHR_materials_common": {
"lights": {
"extras": {}
},
"extras": {}
}
},
"samplers": {},
"textures": {}
}
Loading

0 comments on commit e6aba2f

Please sign in to comment.