diff --git a/Apps/SampleData/Cesium3DTiles/Voxel/VoxelBox3DTiles/schema.json b/Apps/SampleData/Cesium3DTiles/Voxel/VoxelBox3DTiles/schema.json new file mode 100644 index 000000000000..43c7cd03f778 --- /dev/null +++ b/Apps/SampleData/Cesium3DTiles/Voxel/VoxelBox3DTiles/schema.json @@ -0,0 +1,14 @@ +{ + "id": "voxel", + "classes": { + "voxel": { + "properties": { + "a": { + "type": "SCALAR", + "componentType": "FLOAT32", + "required": false + } + } + } + } +} diff --git a/Apps/SampleData/Cesium3DTiles/Voxel/VoxelBox3DTiles/tiles/0/0/0/0.gltf b/Apps/SampleData/Cesium3DTiles/Voxel/VoxelBox3DTiles/tiles/0/0/0/0.gltf new file mode 100644 index 000000000000..51189372b25e --- /dev/null +++ b/Apps/SampleData/Cesium3DTiles/Voxel/VoxelBox3DTiles/tiles/0/0/0/0.gltf @@ -0,0 +1,91 @@ +{ + "asset": { + "version": "2.0" + }, + "scene": 0, + "scenes": [ + { + "nodes": [ + 0 + ] + } + ], + "nodes": [ + { + "mesh": 0 + } + ], + "meshes": [ + { + "primitives": [ + { + "mode": 2147483648, + "attributes": { + "_a": 0 + }, + "extensions": { + "EXT_primitive_voxels": { + "dimensions": [ + 2, + 2, + 2 + ] + }, + "EXT_structural_metadata": { + "propertyAttributes": [0] + } + } + } + ] + } + ], + "extensionsUsed": [ + "EXT_primitive_voxels", + "EXT_structural_metadata" + ], + "extensionsRequired": [ + "EXT_primitive_voxels", + "EXT_structural_metadata" + ], + "extensions": { + "EXT_structural_metadata": { + "schemaUri": "../../../../schema.json", + "propertyAttributes": [ + { + "class": "voxel", + "properties": { + "a": { + "attribute": "_a" + } + } + } + ] + } + }, + "accessors": [ + { + "bufferView": 0, + "type": "SCALAR", + "componentType": 5126, + "min": [ + 0.0 + ], + "max": [ + 1.0 + ], + "count": 8 + } + ], + "bufferViews": [ + { + "buffer": 0, + "byteLength": 32 + } + ], + "buffers": [ + { + "uri": "a.bin", + "byteLength": 32 + } + ] +} diff --git a/Apps/SampleData/Cesium3DTiles/Voxel/VoxelBox3DTiles/tiles/0/0/0/0.json b/Apps/SampleData/Cesium3DTiles/Voxel/VoxelBox3DTiles/tiles/0/0/0/0.json deleted file mode 100644 index 688327759afe..000000000000 --- a/Apps/SampleData/Cesium3DTiles/Voxel/VoxelBox3DTiles/tiles/0/0/0/0.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "buffers": [ - { - "uri": "a.bin", - "byteLength": 32 - } - ], - "bufferViews": [ - { - "buffer": 0, - "byteOffset": 0, - "byteLength": 32 - } - ], - "propertyTables": [ - { - "class": "voxel", - "count": 8, - "properties": { - "a": { - "values": 0 - } - } - } - ], - "voxelTable": 0 -} diff --git a/Apps/SampleData/Cesium3DTiles/Voxel/VoxelBox3DTiles/tileset.json b/Apps/SampleData/Cesium3DTiles/Voxel/VoxelBox3DTiles/tileset.json index 7d704a8f00b5..a3bbf8bc97fa 100644 --- a/Apps/SampleData/Cesium3DTiles/Voxel/VoxelBox3DTiles/tileset.json +++ b/Apps/SampleData/Cesium3DTiles/Voxel/VoxelBox3DTiles/tileset.json @@ -2,19 +2,7 @@ "asset": { "version": "1.1" }, - "schema": { - "id": "voxel", - "classes": { - "voxel": { - "properties": { - "a": { - "type": "SCALAR", - "componentType": "FLOAT32" - } - } - } - } - }, + "schemaUri": "schema.json", "statistics": { "classes": { "voxel": { @@ -49,7 +37,7 @@ "geometricError": 0.0, "refine": "REPLACE", "content": { - "uri": "tiles/{level}/{x}/{y}/{z}.json", + "uri": "tiles/{level}/{x}/{y}/{z}.gltf", "extensions": { "3DTILES_content_voxels": { "dimensions": [ diff --git a/Apps/SampleData/Cesium3DTiles/Voxel/VoxelCylinder3DTiles/schema.json b/Apps/SampleData/Cesium3DTiles/Voxel/VoxelCylinder3DTiles/schema.json new file mode 100644 index 000000000000..43c7cd03f778 --- /dev/null +++ b/Apps/SampleData/Cesium3DTiles/Voxel/VoxelCylinder3DTiles/schema.json @@ -0,0 +1,14 @@ +{ + "id": "voxel", + "classes": { + "voxel": { + "properties": { + "a": { + "type": "SCALAR", + "componentType": "FLOAT32", + "required": false + } + } + } + } +} diff --git a/Apps/SampleData/Cesium3DTiles/Voxel/VoxelCylinder3DTiles/tiles/0/0/0/0.gltf b/Apps/SampleData/Cesium3DTiles/Voxel/VoxelCylinder3DTiles/tiles/0/0/0/0.gltf new file mode 100644 index 000000000000..d7247ac82e1d --- /dev/null +++ b/Apps/SampleData/Cesium3DTiles/Voxel/VoxelCylinder3DTiles/tiles/0/0/0/0.gltf @@ -0,0 +1,88 @@ +{ + "asset": { + "version": "2.0" + }, + "scene": 0, + "scenes": [ + { + "nodes": [ + 0 + ] + } + ], + "nodes": [ + { + "mesh": 0 + } + ], + "meshes": [ + { + "primitives": [ + { + "mode": 2147483650, + "attributes": { + "_a": 0 + }, + "extensions": { + "EXT_primitive_voxels": { + "dimensions": [ + 2, + 2, + 2 + ] + } + } + } + ] + } + ], + "extensionsUsed": [ + "EXT_primitive_voxels", + "EXT_structural_metadata" + ], + "extensionsRequired": [ + "EXT_primitive_voxels", + "EXT_structural_metadata" + ], + "extensions": { + "EXT_structural_metadata": { + "schemaUri": "../../../../schema.json", + "propertyAttributes": [ + { + "class": "voxel", + "properties": { + "a": { + "attribute": "_a" + } + } + } + ] + } + }, + "accessors": [ + { + "bufferView": 0, + "type": "SCALAR", + "componentType": 5126, + "min": [ + 0.0 + ], + "max": [ + 1.0 + ], + "count": 8 + } + ], + "bufferViews": [ + { + "buffer": 0, + "byteLength": 32 + } + ], + "buffers": [ + { + "uri": "a.bin", + "byteLength": 32 + } + ] +} \ No newline at end of file diff --git a/Apps/SampleData/Cesium3DTiles/Voxel/VoxelCylinder3DTiles/tiles/0/0/0/0.json b/Apps/SampleData/Cesium3DTiles/Voxel/VoxelCylinder3DTiles/tiles/0/0/0/0.json deleted file mode 100644 index 688327759afe..000000000000 --- a/Apps/SampleData/Cesium3DTiles/Voxel/VoxelCylinder3DTiles/tiles/0/0/0/0.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "buffers": [ - { - "uri": "a.bin", - "byteLength": 32 - } - ], - "bufferViews": [ - { - "buffer": 0, - "byteOffset": 0, - "byteLength": 32 - } - ], - "propertyTables": [ - { - "class": "voxel", - "count": 8, - "properties": { - "a": { - "values": 0 - } - } - } - ], - "voxelTable": 0 -} diff --git a/Apps/SampleData/Cesium3DTiles/Voxel/VoxelCylinder3DTiles/tileset.json b/Apps/SampleData/Cesium3DTiles/Voxel/VoxelCylinder3DTiles/tileset.json index d1652c7e8757..07abdcad5187 100644 --- a/Apps/SampleData/Cesium3DTiles/Voxel/VoxelCylinder3DTiles/tileset.json +++ b/Apps/SampleData/Cesium3DTiles/Voxel/VoxelCylinder3DTiles/tileset.json @@ -2,19 +2,7 @@ "asset": { "version": "1.1" }, - "schema": { - "id": "voxel", - "classes": { - "voxel": { - "properties": { - "a": { - "type": "SCALAR", - "componentType": "FLOAT32" - } - } - } - } - }, + "schemaUri": "schema.json", "statistics": { "classes": { "voxel": { @@ -53,7 +41,7 @@ "geometricError": 0.0, "refine": "REPLACE", "content": { - "uri": "tiles/{level}/{x}/{y}/{z}.json", + "uri": "tiles/{level}/{x}/{y}/{z}.gltf", "extensions": { "3DTILES_content_voxels": { "dimensions": [ diff --git a/Apps/SampleData/Cesium3DTiles/Voxel/VoxelEllipsoid3DTiles/schema.json b/Apps/SampleData/Cesium3DTiles/Voxel/VoxelEllipsoid3DTiles/schema.json new file mode 100644 index 000000000000..43c7cd03f778 --- /dev/null +++ b/Apps/SampleData/Cesium3DTiles/Voxel/VoxelEllipsoid3DTiles/schema.json @@ -0,0 +1,14 @@ +{ + "id": "voxel", + "classes": { + "voxel": { + "properties": { + "a": { + "type": "SCALAR", + "componentType": "FLOAT32", + "required": false + } + } + } + } +} diff --git a/Apps/SampleData/Cesium3DTiles/Voxel/VoxelEllipsoid3DTiles/tiles/0/0/0/0.gltf b/Apps/SampleData/Cesium3DTiles/Voxel/VoxelEllipsoid3DTiles/tiles/0/0/0/0.gltf new file mode 100644 index 000000000000..5a1815f6d105 --- /dev/null +++ b/Apps/SampleData/Cesium3DTiles/Voxel/VoxelEllipsoid3DTiles/tiles/0/0/0/0.gltf @@ -0,0 +1,100 @@ +{ + "asset": { + "version": "2.0" + }, + "scene": 0, + "scenes": [ + { + "nodes": [ + 0 + ] + } + ], + "nodes": [ + { + "mesh": 0 + } + ], + "meshes": [ + { + "primitives": [ + { + "mode": 2147483649, + "attributes": { + "_a": 0 + }, + "extensions": { + "EXT_primitive_voxels": { + "dimensions": [ + 2, + 2, + 2 + ], + "bounds": { + "min": [ + 0.0, + 0.0, + -1.0 + ], + "max": [ + 1.0, + 1.0, + 0.0 + ] + } + } + } + } + ] + } + ], + "extensionsUsed": [ + "EXT_primitive_voxels", + "EXT_structural_metadata" + ], + "extensionsRequired": [ + "EXT_primitive_voxels", + "EXT_structural_metadata" + ], + "extensions": { + "EXT_structural_metadata": { + "schemaUri": "../../../../schema.json", + "propertyAttributes": [ + { + "class": "voxel", + "properties": { + "a": { + "attribute": "_a" + } + } + } + ] + } + }, + "accessors": [ + { + "bufferView": 0, + "type": "SCALAR", + "componentType": 5126, + "min": [ + 0.0 + ], + "max": [ + 1.0 + ], + "count": 8 + } + ], + "bufferViews": [ + { + "buffer": 0, + "byteLength": 32 + } + ], + "buffers": [ + { + "uri": "a.bin", + "byteLength": 32 + } + ] +} \ No newline at end of file diff --git a/Apps/SampleData/Cesium3DTiles/Voxel/VoxelEllipsoid3DTiles/tiles/0/0/0/0.json b/Apps/SampleData/Cesium3DTiles/Voxel/VoxelEllipsoid3DTiles/tiles/0/0/0/0.json deleted file mode 100644 index 688327759afe..000000000000 --- a/Apps/SampleData/Cesium3DTiles/Voxel/VoxelEllipsoid3DTiles/tiles/0/0/0/0.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "buffers": [ - { - "uri": "a.bin", - "byteLength": 32 - } - ], - "bufferViews": [ - { - "buffer": 0, - "byteOffset": 0, - "byteLength": 32 - } - ], - "propertyTables": [ - { - "class": "voxel", - "count": 8, - "properties": { - "a": { - "values": 0 - } - } - } - ], - "voxelTable": 0 -} diff --git a/Apps/SampleData/Cesium3DTiles/Voxel/VoxelEllipsoid3DTiles/tileset.json b/Apps/SampleData/Cesium3DTiles/Voxel/VoxelEllipsoid3DTiles/tileset.json index cbc44570ebac..fa43b62f031a 100644 --- a/Apps/SampleData/Cesium3DTiles/Voxel/VoxelEllipsoid3DTiles/tileset.json +++ b/Apps/SampleData/Cesium3DTiles/Voxel/VoxelEllipsoid3DTiles/tileset.json @@ -2,19 +2,7 @@ "asset": { "version": "1.1" }, - "schema": { - "id": "voxel", - "classes": { - "voxel": { - "properties": { - "a": { - "type": "SCALAR", - "componentType": "FLOAT32" - } - } - } - } - }, + "schemaUri": "schema.json", "statistics": { "classes": { "voxel": { @@ -37,13 +25,13 @@ 1.0, 1.0, -1.0, - 0.0 + 500000.0 ] }, "geometricError": 0.0, "refine": "REPLACE", "content": { - "uri": "tiles/{level}/{x}/{y}/{z}.json", + "uri": "tiles/{level}/{x}/{y}/{z}.gltf", "extensions": { "3DTILES_content_voxels": { "dimensions": [ diff --git a/Apps/Sandcastle/gallery/Voxel Picking.html b/Apps/Sandcastle/gallery/Voxel Picking.html index 18040bdca8c7..53a92a051a07 100644 --- a/Apps/Sandcastle/gallery/Voxel Picking.html +++ b/Apps/Sandcastle/gallery/Voxel Picking.html @@ -7,8 +7,11 @@ name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no" /> - - + +