Permalink
Browse files

Merge branch 'master' into wms

Conflicts:
	build.xml
  • Loading branch information...
2 parents ae09c54 + 2b6dc9c commit 834a58e9c64029b13f6ef0104bea74050220d7bc @tfili tfili committed Aug 21, 2012
Showing with 8,069 additions and 3,115 deletions.
  1. +2 −2 .project
  2. +97 −68 CHANGES.md
  3. +9 −0 Documentation/Schemas/Fabric/Examples/Components.json
  4. +20 −0 Documentation/Schemas/Fabric/Examples/MaterialHierarchy.json
  5. +26 −0 Documentation/Schemas/Fabric/Examples/MaterialHierarchy2.json
  6. +10 −0 Documentation/Schemas/Fabric/Examples/MatrixUniforms.json
  7. +3 −0 Documentation/Schemas/Fabric/Examples/Source.json
  8. +19 −0 Documentation/Schemas/Fabric/Examples/TextureUniforms.json
  9. +27 −0 Documentation/Schemas/Fabric/Examples/VectorUniforms.json
  10. +27 −0 Documentation/Schemas/Fabric/Examples/VectorUniforms2.json
  11. +27 −0 Documentation/Schemas/Fabric/Examples/VectorUniforms3.json
  12. +184 −0 Documentation/Schemas/Fabric/Material.schema.json
  13. +1 −1 Examples/Sandbox/CodeSnippets/Circle.js
  14. +3 −3 Examples/Sandbox/CodeSnippets/Composite.js
  15. +5 −5 Examples/Sandbox/CodeSnippets/Picking.js
  16. +963 −101 Examples/Sandbox/CodeSnippets/Polygon.js
  17. +50 −58 Examples/Sandbox/CodeSnippets/SensorVolumes.js
  18. +19 −1 Examples/Sandbox/Main.js
  19. +9 −9 Examples/Skeleton/Skeleton.js
  20. BIN Images/bumpmap.png
  21. BIN Images/checkerboard.png
  22. BIN Images/normalmap.png
  23. +1 −1 Source/Core/AxisAlignedBoundingBox.js
  24. +3 −1 Source/Core/Cartesian3.js
  25. +1 −1 Source/Core/OrientationInterpolator.js
  26. +347 −11 Source/Core/PolygonPipeline.js
  27. +16 −2 Source/Core/PolylinePipeline.js
  28. +683 −376 Source/Core/Quaternion.js
  29. +60 −17 Source/Core/combine.js
  30. +2 −2 Source/DynamicScene/CzmlUnitQuaternion.js
  31. +8 −8 Source/DynamicScene/DynamicColorMaterial.js
  32. +14 −12 Source/DynamicScene/DynamicConeVisualizer.js
  33. +56 −49 Source/DynamicScene/DynamicConeVisualizerUsingCustomSensor.js
  34. +115 −154 Source/DynamicScene/DynamicImageMaterial.js
  35. +6 −4 Source/DynamicScene/DynamicPolygonVisualizer.js
  36. +8 −5 Source/DynamicScene/DynamicPyramidVisualizer.js
  37. +61 −0 Source/Renderer/Context.js
  38. +2 −2 Source/Renderer/TextureAtlas.js
  39. +10 −10 Source/Scene/AnimationCollection.js
  40. +4 −4 Source/Scene/BillboardCollection.js
  41. +0 −60 Source/Scene/BlobMaterial.js
  42. +8 −6 Source/Scene/Camera2DController.js
  43. +11 −10 Source/Scene/CentralBody.js
  44. +0 −65 Source/Scene/CheckerboardMaterial.js
  45. +0 −37 Source/Scene/ColorMaterial.js
  46. +50 −40 Source/Scene/ComplexConicSensorVolume.js
  47. +11 −12 Source/Scene/CustomSensorVolume.js
  48. +0 −50 Source/Scene/DiffuseMapMaterial.js
  49. +7 −5 Source/Scene/DistanceIntervalMaterial.js
  50. +0 −65 Source/Scene/DotMaterial.js
  51. +0 −60 Source/Scene/FacetMaterial.js
  52. +0 −65 Source/Scene/HorizontalStripeMaterial.js
  53. +1,192 −0 Source/Scene/Material.js
  54. +772 −663 Source/Scene/Polygon.js
  55. +3 −2 Source/Scene/Polyline.js
  56. +117 −89 Source/Scene/PolylineCollection.js
  57. +4 −4 Source/Scene/RectangularPyramidSensorVolume.js
  58. +0 −60 Source/Scene/TieDyeMaterial.js
  59. +0 −65 Source/Scene/VerticalStripeMaterial.js
  60. +0 −58 Source/Scene/combineMaterials.js
  61. +1 −1 Source/Shaders/.gitignore
  62. +0 −12 Source/Shaders/BlobMaterial.glsl
  63. +100 −28 Source/Shaders/BuiltinFunctions.glsl
  64. +0 −6 Source/Shaders/ColorMaterial.glsl
  65. +54 −65 Source/Shaders/ComplexConicSensorVolumeFS.glsl
  66. +19 −17 Source/Shaders/CustomSensorVolumeFS.glsl
  67. +0 −8 Source/Shaders/DiffuseMapMaterial.glsl
  68. +0 −18 Source/Shaders/DistanceIntervalMaterial.glsl
  69. +0 −11 Source/Shaders/DotMaterial.glsl
  70. +0 −12 Source/Shaders/FacetMaterial.glsl
  71. +0 −22 Source/Shaders/HorizontalStripeMaterial.glsl
  72. +25 −0 Source/Shaders/Materials/AsphaltMaterial.glsl
  73. +18 −0 Source/Shaders/Materials/BlobMaterial.glsl
  74. +42 −0 Source/Shaders/Materials/BrickMaterial.glsl
  75. +29 −0 Source/Shaders/Materials/BumpMapMaterial.glsl
  76. +19 −0 Source/Shaders/Materials/CementMaterial.glsl
  77. +18 −10 Source/Shaders/{ → Materials}/CheckerboardMaterial.glsl
  78. +23 −0 Source/Shaders/Materials/DistanceIntervalMaterial.glsl
  79. +17 −0 Source/Shaders/Materials/DotMaterial.glsl
  80. +18 −0 Source/Shaders/Materials/FacetMaterial.glsl
  81. +12 −0 Source/Shaders/Materials/FresnelMaterial.glsl
  82. +28 −0 Source/Shaders/Materials/GrassMaterial.glsl
  83. +19 −0 Source/Shaders/Materials/NormalMapMaterial.glsl
  84. +13 −0 Source/Shaders/Materials/ReflectionMaterial.glsl
  85. +14 −0 Source/Shaders/Materials/RefractionMaterial.glsl
  86. +29 −0 Source/Shaders/Materials/StripeMaterial.glsl
  87. +17 −0 Source/Shaders/Materials/TieDyeMaterial.glsl
  88. +36 −0 Source/Shaders/Materials/WoodMaterial.glsl
  89. +24 −24 Source/Shaders/PolygonFS.glsl
  90. +0 −11 Source/Shaders/TieDyeMaterial.glsl
  91. +0 −22 Source/Shaders/VerticalStripeMaterial.glsl
  92. +4 −4 Source/Widgets/Dojo/CesiumViewerWidget.js
  93. +163 −0 Specs/Core/PolygonPipelineSpec.js
  94. +13 −2 Specs/Core/PolylinePipelineSpec.js
  95. +682 −249 Specs/Core/QuaternionSpec.js
  96. +34 −7 Specs/Core/combineSpec.js
  97. BIN Specs/Data/Images/Gray.png
  98. BIN Specs/Data/Images/Green.png
  99. +8 −8 Specs/DynamicScene/DynamicConeSpec.js
  100. +15 −6 Specs/DynamicScene/DynamicConeVisualizerSpec.js
  101. +41 −8 Specs/DynamicScene/DynamicConeVisualizerUsingCustomSensorSpec.js
  102. +2 −2 Specs/DynamicScene/DynamicPolygonSpec.js
  103. +8 −4 Specs/DynamicScene/DynamicPolygonVisualizerSpec.js
  104. +2 −2 Specs/DynamicScene/DynamicPyramidSpec.js
  105. +5 −3 Specs/DynamicScene/DynamicPyramidVisualizerSpec.js
  106. +2 −2 Specs/DynamicScene/processCzmlSpec.js
  107. +48 −0 Specs/Renderer/CubeMapSpec.js
  108. +652 −0 Specs/Scene/MaterialSpec.js
  109. +94 −4 Specs/Scene/PolygonSpec.js
  110. +25 −1 Specs/Scene/PolylineCollectionSpec.js
  111. +31 −48 Specs/SpecRunner.js
  112. +2 −2 Tools/jsdoc3/templates/default/static/javascript/all.js
  113. +39 −11 Tools/jsdoc3/templates/default/static/javascript/indexLinks.js
  114. +19 −21 Tools/jsdoc3/templates/default/tmpl/index.tmpl
  115. +15 −24 Tools/jsdoc3/templates/default/tmpl/layout.tmpl
  116. +14 −0 Tools/proxy/.classpath
  117. +17 −0 Tools/proxy/.project
  118. +287 −0 Tools/proxy/.settings/org.eclipse.jdt.core.prefs
  119. +3 −0 Tools/proxy/.settings/org.eclipse.jdt.ui.prefs
  120. +17 −5 Tools/proxy/build.xml
  121. BIN Tools/proxy/proxy.jar
  122. +31 −0 Tools/proxy/src/com/agi/HostChecker.java
  123. +57 −81 Tools/proxy/src/com/agi/ProxyHandler.java
  124. +35 −4 Tools/proxy/src/com/agi/ServerTask.java
  125. +56 −27 build.xml
View
@@ -104,9 +104,9 @@
</matcher>
</filter>
<filter>
- <id>1334962574946</id>
+ <id>1338843689105</id>
<name>Source/Shaders</name>
- <type>6</type>
+ <type>22</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-false-false-*.js</arguments>
View

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -0,0 +1,9 @@
+{
+ "components": {
+ "diffuse" : "vec3(0.0)",
+ "specular" : 0.0,
+ "normal" : "normalize(vec3(1.0))",
+ "emission" : "vec3(0.0)",
+ "alpha" : 1.0
+ }
+}
@@ -0,0 +1,20 @@
+{
+ "materials" : {
+ "hot" : {
+ "components" : {
+ "diffuse" : "vec3(1.0, 0.0, 0.0)"
+ }
+ },
+ "cold" : {
+ "components" : {
+ "diffuse" : "vec3(0.0, 1.0, 0.0)"
+ }
+ }
+ },
+ "uniforms" : {
+ "temperature" : 0.5
+ },
+ "components" : {
+ "diffuse" : "mix(cold.diffuse, hot.diffuse, temperature)"
+ }
+}
@@ -0,0 +1,26 @@
+{
+ "materials" : {
+ "hot" : {
+ "uniforms" : {
+ "hot": "hot.jpg"
+ },
+ "components" : {
+ "diffuse" : "texture2D(hot, materialInput.st).rgb"
+ }
+ },
+ "cold" : {
+ "uniforms" : {
+ "cold": "cold.jpg"
+ },
+ "components" : {
+ "diffuse" : "texture2D(cold, materialInput.st).rgb"
+ }
+ }
+ },
+ "uniforms" : {
+ "temperature" : 0.5
+ },
+ "components" : {
+ "diffuse" : "mix(cold.diffuse, hot.diffuse, temperature)"
+ }
+}
@@ -0,0 +1,10 @@
+{
+ "uniforms": {
+ "mymat2" : [0.0, 1.0, 2.0, 3.0],
+ "mymat3" : [0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0],
+ "mymat4" : [0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0]
+ },
+ "components": {
+ "diffuse" : "vec3(mymat2[0][0], mymat3[0][0], mymat4[0][0])"
+ }
+}
@@ -0,0 +1,3 @@
+{
+ "source" : "agi_material agi_getMaterial(agi_materialInput m) { return agi_getDefaultMaterial(m); }"
+}
@@ -0,0 +1,19 @@
+{
+ "uniforms": {
+ "mytexture2D" : "../../Images/earthspec1k.jpg",
+ "myothertexture2D" : "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAC/SURBVDhPrZPRDYQgEEQpjVKuFEvhw0IoxU6QgQwMK+vdx5FsooT3GHdjCM4qZnnnHvvkYoxFi/uvIhwiRCClXFC6v5UQ1uQAsbrkHCLsbaPjFgIzQQc1yUOwu33ePGE3BQUaee2BpjhbP5YUmkAlbNzsAURfBDqJnMIyyv4JjsCCgCnIR32uZUfcJuGBOwEk6bOKhoAADh31EIq3MgFg1mgkE1BA2AoUZoo2iZ3gyqGgmMDC/xWwkfb3/eUd7A1v3kxjNW9taQAAAABJRU5ErkJggg==",
+ "mycubemap": {
+ "positiveX" : "posx.jpg",
+ "negativeX" : "negx.jpg",
+ "positiveY" : "negy.jpg",
+ "negativeY" : "posy.jpg",
+ "positiveZ" : "posz.jpg",
+ "negativeZ" : "negz.jpg"
+ }
+ },
+ "components": {
+ "diffuse" : "textureCube(mycubemap, normalize(vec3(1.0))).rgb /* not an interesting reflection */",
+ "specular" : "texture2D(myothertexture2D, materialInput.st).r",
+ "emission" : "texture2D(mytexture2D, materialInput.st).rgb"
+ }
+}
@@ -0,0 +1,27 @@
+{
+ "uniforms": {
+ "myfloat" : 0.0,
+ "myvec2" : {
+ "x" : 0.0,
+ "y" : 1.0
+ },
+ "myvec3" : {
+ "x" : 0.0,
+ "y" : 1.0,
+ "z" : 2.0
+ },
+ "myvec4" : {
+ "x" : 0.0,
+ "y" : 1.0,
+ "z" : 2.0,
+ "w" : 3.0
+ }
+ },
+ "components": {
+ "diffuse" : "myvec3",
+ "specular" : "myfloat",
+ "normal" : "myvec3",
+ "emission" : "myvec3",
+ "alpha" : "myfloat"
+ }
+}
@@ -0,0 +1,27 @@
+{
+ "uniforms": {
+ "myfloat" : 0.0,
+ "myvec2" : {
+ "r" : 0.0,
+ "g" : 1.0
+ },
+ "myvec3" : {
+ "r" : 0.0,
+ "g" : 1.0,
+ "b" : 2.0
+ },
+ "myvec4" : {
+ "r" : 0.0,
+ "g" : 1.0,
+ "b" : 2.0,
+ "a" : 3.0
+ }
+ },
+ "components": {
+ "diffuse" : "myvec3",
+ "specular" : "myfloat",
+ "normal" : "myvec3",
+ "emission" : "myvec3",
+ "alpha" : "myfloat"
+ }
+}
@@ -0,0 +1,27 @@
+{
+ "uniforms": {
+ "myfloat" : 0.0,
+ "myvec2" : {
+ "s" : 0.0,
+ "t" : 1.0
+ },
+ "myvec3" : {
+ "s" : 0.0,
+ "t" : 1.0,
+ "p" : 2.0
+ },
+ "myvec4" : {
+ "s" : 0.0,
+ "t" : 1.0,
+ "p" : 2.0,
+ "q" : 3.0
+ }
+ },
+ "components": {
+ "diffuse" : "myvec3",
+ "specular" : "myfloat",
+ "normal" : "myvec3",
+ "emission" : "myvec3",
+ "alpha" : "myfloat"
+ }
+}
@@ -0,0 +1,184 @@
+{
+ "title": "Material",
+ "description": "A material composed of uniforms, an agi_getMaterial GLSL function, and potentially other materials.",
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "description": "A unique identifier for this material type."
+ },
+
+ "materials": {
+ "type": "object",
+ "description": "Materials used by this material. This enables building a hierarchy of materials. For example, reflection and refraction materials can be combined to create a Fresnel material, and then the Fresnel material can be combined with a specular map material to create a water material.",
+ "properties": {
+ },
+ "additionalProperties": {
+ "$ref": "Material.schema.json"
+ }
+ },
+
+ "uniforms": {
+ "type": "object",
+ "description": "Uniform variables, and their default values, that are input to this material. Texture and cube-map face uniform values are specified as an image URL or a <a href=\"https://developer.mozilla.org/en/data_URIs\">data URI</a>. Alternatively, a placeholder RGBA white texture can be used by specifying agi_defaultImage or agi_defaultCubeMap for textures or cube-maps, respectively.",
+ "properties": {
+ },
+ "additionalProperties": {
+ "type": ["string", "number", "integer", "boolean", "object", "array"],
+
+ "format": "uri",
+
+ "items": {
+ "type": "number",
+ "description": "A floating-point component in a mat2, mat3, or mat4."
+ },
+ "minItems" : 4,
+ "maxItems" : 16,
+
+ "properties": {
+ "x": {
+ "type": ["number", "integer", "boolean"],
+ "description": "The x component of a floating-point, integer, or boolean vec2, vec3, or vec4."
+ },
+ "y": {
+ "type": ["number", "integer", "boolean"],
+ "description": "The y component of a floating-point, integer, or boolean vec2, vec3, or vec4."
+ },
+ "z": {
+ "type": ["number", "integer", "boolean"],
+ "description": "The z component of a floating-point, integer, or boolean vec3 or vec4."
+ },
+ "w": {
+ "type": ["number", "integer", "boolean"],
+ "description": "The w component of a floating-point, integer, or boolean vec4."
+ },
+
+ "r": {
+ "type": ["number", "integer", "boolean"],
+ "description": "The r component of a floating-point, integer, or boolean vec2, vec3, or vec4."
+ },
+ "g": {
+ "type": ["number", "integer", "boolean"],
+ "description": "The g component of a floating-point, integer, or boolean vec2, vec3, or vec4."
+ },
+ "b": {
+ "type": ["number", "integer", "boolean"],
+ "description": "The b component of a floating-point, integer, or boolean vec3 or vec4."
+ },
+ "a": {
+ "type": ["number", "integer", "boolean"],
+ "description": "The a component of a floating-point, integer, or boolean vec4."
+ },
+
+ "s": {
+ "type": ["number", "integer", "boolean"],
+ "description": "The r component of a floating-point, integer, or boolean vec2, vec3, or vec4."
+ },
+ "t": {
+ "type": ["number", "integer", "boolean"],
+ "description": "The g component of a floating-point, integer, or boolean vec2, vec3, or vec4."
+ },
+ "p": {
+ "type": ["number", "integer", "boolean"],
+ "description": "The b component of a floating-point, integer, or boolean vec3 or vec4."
+ },
+ "q": {
+ "type": ["number", "integer", "boolean"],
+ "description": "The a component of a floating-point, integer, or boolean vec4."
+ },
+
+ "positiveX": {
+ "type": "string",
+ "format": "uri",
+ "description": "An image for the +x side of a cube map. The image is specified as a URL. For broadest client compatibility, the URL should be accessible via Cross-Origin Resource Sharing (CORS). The URL may also be a <a href=\"https://developer.mozilla.org/en/data_URIs\">data URI</a>."
+ },
+ "negativeX": {
+ "type": "string",
+ "format": "uri",
+ "description": "An image for the -x side of a cube map. The image is specified as a URL. For broadest client compatibility, the URL should be accessible via Cross-Origin Resource Sharing (CORS). The URL may also be a <a href=\"https://developer.mozilla.org/en/data_URIs\">data URI</a>."
+ },
+ "positiveY": {
+ "type": "string",
+ "format": "uri",
+ "description": "An image for the +y side of a cube map. The image is specified as a URL. For broadest client compatibility, the URL should be accessible via Cross-Origin Resource Sharing (CORS). The URL may also be a <a href=\"https://developer.mozilla.org/en/data_URIs\">data URI</a>."
+ },
+ "negativeY": {
+ "type": "string",
+ "format": "uri",
+ "description": "An image for the -y side of a cube map. The image is specified as a URL. For broadest client compatibility, the URL should be accessible via Cross-Origin Resource Sharing (CORS). The URL may also be a <a href=\"https://developer.mozilla.org/en/data_URIs\">data URI</a>."
+ },
+ "positiveZ": {
+ "type": "string",
+ "format": "uri",
+ "description": "An image for the +z side of a cube map. The image is specified as a URL. For broadest client compatibility, the URL should be accessible via Cross-Origin Resource Sharing (CORS). The URL may also be a <a href=\"https://developer.mozilla.org/en/data_URIs\">data URI</a>."
+ },
+ "negativeZ": {
+ "type": "string",
+ "format": "uri",
+ "description": "An image for the -z side of a cube map. The image is specified as a URL. For broadest client compatibility, the URL should be accessible via Cross-Origin Resource Sharing (CORS). The URL may also be a <a href=\"https://developer.mozilla.org/en/data_URIs\">data URI</a>."
+ }
+ },
+ "dependencies": {
+ "x": "y",
+ "y": "x",
+ "z": ["x", "y"],
+ "w": ["x", "y", "z"],
+
+ "r": "g",
+ "g": "r",
+ "b": ["r", "g"],
+ "a": ["r", "g", "b"],
+
+ "s": "t",
+ "t": "s",
+ "p": ["s", "t"],
+ "q": ["s", "t", "p"],
+
+ "positiveX": ["negativeX", "positiveY", "negativeY", "positiveZ", "negativeZ"],
+ "negativeX": ["positiveX", "positiveY", "negativeY", "positiveZ", "negativeZ"],
+ "positiveY": ["positiveX", "negativeX", "negativeY", "positiveZ", "negativeZ"],
+ "negativeY": ["positiveX", "negativeX", "positiveY", "positiveZ", "negativeZ"],
+ "positiveZ": ["positiveX", "negativeX", "positiveY", "negativeY", "negativeZ"],
+ "negativeZ": ["positiveX", "negativeX", "positiveY", "negativeY", "positiveZ"]
+ },
+ "additionalProperties": false
+ }
+ },
+
+ "components": {
+ "type": "object",
+ "description": "The diffuse, specular, normal, emission, and alpha components returned by this material. The components or source property is required, but not both.",
+ "properties": {
+ "diffuse" : {
+ "type": "string",
+ "default" : "vec3(0.0)",
+ "description": "A GLSL expression returning the diffuse component of this material. The diffuse component is a vec3 defining incoming light that scatters evenly in all directions."
+ },
+ "specular" : {
+ "type": "string",
+ "default" : "0.0",
+ "description": "A GLSL expression returning the specular component of this material. The specular component is a float defining the intensity of incoming light reflecting in a single direction."
+ },
+ "normal" : {
+ "type": "string",
+ "description": "A GLSL expression returning the normal component of this material. The normal component is a vec3 defining the surface's normal in tangent coordinates. It is used for effects such as normal mapping. The default is the surface's unmodified normal."
+ },
+ "emission" : {
+ "type": "string",
+ "default" : "vec3(0.0)",
+ "description": "A GLSL expression returning the emission component of this material. The emission component is a vec3 defining light emitted by the material equally in all directions. The default is vec3(0.0), which emits no light."
+ },
+ "alpha" : {
+ "type": "string",
+ "default" : "1.0",
+ "description": "A GLSL expression returning the alpha component of this material. The alpha component is a float defining the opacity of this material. 0.0 is completely transparent; 1.0 is completely opaque."
+ }
+ }
+ },
+ "source": {
+ "type": "string",
+ "description": "GLSL source for the agi_getMaterial function with a full function definition. The components or source property is required, but not both.",
+ "pattern" : "agi_getMaterial"
+ }
+ }
+}
@@ -31,7 +31,7 @@
ellipsoid, ellipsoid.cartographicToCartesian(
Cesium.Cartographic.fromDegrees(-75.59777, 40.03883)), 300000.0));
// Any polygon-compatible material can be used
- polygon.material = new Cesium.TieDyeMaterial(undefined);
+ polygon.material = Cesium.Material.fromType(scene.getContext(), 'TieDye');
primitives.add(polygon);
};
Oops, something went wrong.

0 comments on commit 834a58e

Please sign in to comment.