{"action":"created","issue":{"url":"https://api.github.com/repos/KhronosGroup/glTF/issues/927","repository_url":"https://api.github.com/repos/KhronosGroup/glTF","labels_url":"https://api.github.com/repos/KhronosGroup/glTF/issues/927/labels{/name}","comments_url":"https://api.github.com/repos/KhronosGroup/glTF/issues/927/comments","events_url":"https://api.github.com/repos/KhronosGroup/glTF/issues/927/events","html_url":"https://github.com/KhronosGroup/glTF/issues/927","id":223580052,"number":927,"title":"The encoding of morph targets in the schema","user":{"login":"javagl","id":5597569,"avatar_url":"https://avatars3.githubusercontent.com/u/5597569?v=3","gravatar_id":"","url":"https://api.github.com/users/javagl","html_url":"https://github.com/javagl","followers_url":"https://api.github.com/users/javagl/followers","following_url":"https://api.github.com/users/javagl/following{/other_user}","gists_url":"https://api.github.com/users/javagl/gists{/gist_id}","starred_url":"https://api.github.com/users/javagl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javagl/subscriptions","organizations_url":"https://api.github.com/users/javagl/orgs","repos_url":"https://api.github.com/users/javagl/repos","events_url":"https://api.github.com/users/javagl/events{/privacy}","received_events_url":"https://api.github.com/users/javagl/received_events","type":"User","site_admin":false},"labels":[{"id":358193360,"url":"https://api.github.com/repos/KhronosGroup/glTF/labels/2.0","name":"2.0","color":"c5def5","default":false},{"id":32401424,"url":"https://api.github.com/repos/KhronosGroup/glTF/labels/specification","name":"specification","color":"d7e102","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-04-22T17:35:46Z","updated_at":"2017-04-22T22:29:39Z","closed_at":null,"body":"The [current schema for `mesh.primitive.target`](https://github.com/KhronosGroup/glTF/blob/fb8b472701bf54fc2dd80b1ade2dd312f42113ba/specification/2.0/schema/mesh.primitive.schema.json#L64) says that it is an array of `mesh.primitive.target` objects. These objects are supposed to be dictionaries. The [schema for `mesh.primitive.target`](https://github.com/KhronosGroup/glTF/blob/9b131950c0e6a793dbe51a72f6e3ca52e13f2246/specification/2.0/schema/mesh.primitive.target.schema.json) is\r\n\r\n    {\r\n        \"$schema\": \"http://json-schema.org/draft-04/schema\",\r\n        \"title\": \"target\",\r\n        \"allOf\": [ { \"$ref\": \"glTFid.schema.json\" } ],\r\n        \"description\": \"A dictionary object specifying attributes displacements in a Morph Target, where each key corresponds to one of the three supported attribute semantic (`POSITION`, `NORMAL`, or `TANGENT`) and each value is the index of the accessor containing the attribute displacements' data.\"\r\n    }\r\n\r\nI think this means that these objects are just IDs (Integers). \r\n\r\nI'm not a JSON schema expert, but to my understanding, the schema for `mesh.primitive.target` should rather be (roughly!) something like this:\r\n\r\n*(EDIT: This may be wrong, see the update below!)*\r\n\r\n    {\r\n        \"$schema\": \"http://json-schema.org/draft-04/schema\",\r\n        \"title\": \"target\",\r\n        \"type\": \"object\",\r\n        \"additionalProperties\": {\r\n            \"type\": { \"$ref\": \"glTFid.schema.json\" }\r\n        }\r\n        \"description\": \"A dictionary object specifying attributes displacements in a Morph Target, where each key corresponds to one of the three supported attribute semantic (`POSITION`, `NORMAL`, or `TANGENT`) and each value is the index of the accessor containing the attribute displacements' data.\"\r\n    }\r\n\r\nThat is: It is not just an integer, but really an object (dictionary), with arbitrary properties (as indicated by the `additionalProperties`), where the value of each property is an ID. \r\n\r\nAm I overlooking or misinterpreting something here?\r\n\r\n--- \r\n\r\n**Update** : I think that `mesh.primitive.target` should be defined as this:\r\n\r\n    {\r\n        \"$schema\": \"http://json-schema.org/draft-04/schema\",\r\n        \"title\": \"target\",\r\n        \"type\": \"object\",\r\n        \"additionalProperties\": {\r\n            \"allOf\": [ { \"$ref\": \"glTFid.schema.json\" } ]\r\n        },\r\n        \"description\": \"A dictionary object specifying attributes displacements in a Morph Target, where each key corresponds to one of the three supported attribute semantic (`POSITION`, `NORMAL`, or `TANGENT`) and each value is the index of the accessor containing the attribute displacements' data.\"\r\n    }\r\n\r\n(This way, my code generator creates the targets as `List<Map<String, Integer>> targets` (instead of `List<Integer> targets`), but of course, this does not mean much: The code generator may very well be buggy. However, the original definition for me looks like a `mesh.primitive.target` **is-a** ID, which probably isn't correct either...)\r\n"},"comment":{"url":"https://api.github.com/repos/KhronosGroup/glTF/issues/comments/296405699","html_url":"https://github.com/KhronosGroup/glTF/issues/927#issuecomment-296405699","issue_url":"https://api.github.com/repos/KhronosGroup/glTF/issues/927","id":296405699,"user":{"login":"lexaknyazev","id":3479527,"avatar_url":"https://avatars1.githubusercontent.com/u/3479527?v=3","gravatar_id":"","url":"https://api.github.com/users/lexaknyazev","html_url":"https://github.com/lexaknyazev","followers_url":"https://api.github.com/users/lexaknyazev/followers","following_url":"https://api.github.com/users/lexaknyazev/following{/other_user}","gists_url":"https://api.github.com/users/lexaknyazev/gists{/gist_id}","starred_url":"https://api.github.com/users/lexaknyazev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lexaknyazev/subscriptions","organizations_url":"https://api.github.com/users/lexaknyazev/orgs","repos_url":"https://api.github.com/users/lexaknyazev/repos","events_url":"https://api.github.com/users/lexaknyazev/events{/privacy}","received_events_url":"https://api.github.com/users/lexaknyazev/received_events","type":"User","site_admin":false},"created_at":"2017-04-22T22:29:39Z","updated_at":"2017-04-22T22:29:39Z","body":"@javagl \r\nSee #928."}}
{"actor":{"display_login":"lexaknyazev"}}