Skip to content

EXT_mesh_primitive_edge_visibility #2479

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 21 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
292 changes: 292 additions & 0 deletions extensions/2.0/Vendor/EXT_mesh_primitive_edge_visibility/README.md

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "lineString",
"title": "Line String",
"type": "object",
"description": "Represents one or more line strings to be drawn as edges of a triangle mesh",
"allOf": [
{
"$ref": "glTFProperty.schema.json"
}
],
"properties": {
"indices": {
"allOf": [
{
"$ref": "glTFid.schema.json"
}
],
"description": "The index of the accessor that contains the vertex indices for the line strings",
"gltf_detailedDescription": "The index of the accessor that contains the vertex indices. The accessor **MUST** have `SCALAR` type and an unsigned integer component type. The indices are permitted to include the maximal index value for the component type, indicating the start of a new line string."
},
"material": {
"allOf": [
{
"$ref": "glTFid.schema.json"
}
],
"description": "The index of a glTF material with which the edges are to be drawn.",
"gltf_detailedDescription": "The index of a glTF material with which the edges are to be drawn. If omitted, the edges are drawn using the same material as the edges encoded by the extension's `visibility` field, or else that of the triangle mesh primitive."
},
"name": {},
"extensions": {},
"extras": {}
},
"required": [
"indices"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "EXT_mesh_primitive_edge_visibility glTF Mesh Primitive Extension",
"type": "object",
"description": "glTF extension encoding the visibility of the edges of a triangles primitive",
"allOf": [
{
"$ref": "glTFProperty.schema.json"
}
],
"properties": {
"visibility": {
"allOf": [
{
"$ref": "glTFid.schema.json"
}
],
"description": "The index of the accessor encoding the visibility of each triangle edge as a bitfield with two bits per edge.",
"gltf_detailedDescription": "An edge visibility of 0 indicates the edge is never drawn; 1 indicates the edge is only drawn in silhouette; 2 indicates a 'hard' (always-drawn) edge; and 3 indicates a repeated occurrence of a 'hard' edge."
},
"material": {
"allOf": [
{
"$ref": "glTFid.schema.json"
}
],
"description": "The index of a glTF material with which the edges are to be drawn.",
"gltf_detailedDescription": "The index of a glTF material with which the edges are to be drawn. If omitted, the edges are drawn using the same material as the triangle mesh primitive."
},
"silhouetteNormals": {
"allOf": [
{
"$ref": "glTFid.schema.json"
}
],
"description": "The index of the accessor encoding the pair of outward-facing normals for the two faces sharing each silhouette edge (visibility 1) encoded in `visibility`.",
"gltf_detailedDescription": "This property **MUST** be defined if and only if `visibility` encodes at least one edge with visibility value `1`."
},
"lineStrings": {
"type": "array",
"description": "An array of edges encoded as line strings.",
"gltf_detailedDescription": "Edges encoded as line strings **MUST NOT** also be encoded by the `visibility` property.",
"items": {
"$ref": "lineString.schema.json"
},
"minItems": 1
},
"extensions": {},
"extras": {}
}
}