// SPDX-FileCopyrightText: 2023 Unity Technologies and the glTFast authors // SPDX-License-Identifier: Apache-2.0 namespace GLTFast.Schema { /// /// Joints and matrices defining a skinned mesh. /// [System.Serializable] public class Skin : NamedObject { /// /// The index of the accessor containing the /// floating-point 4x4 inverse-bind matrices. /// public int inverseBindMatrices = -1; /// /// The index of the node used as a skeleton root. /// public int skeleton = -1; /// /// Indices of skeleton nodes, used as joints in this skin. /// public uint[] joints; internal void GltfSerialize(JsonWriter writer) { writer.AddObject(); GltfSerializeName(writer); if (inverseBindMatrices != -1) { writer.AddProperty("inverseBindMatrices", inverseBindMatrices); } if (skeleton != -1) { writer.AddProperty("skeleton", skeleton); } if (joints != null) { writer.AddArrayProperty("joints", joints); } writer.Close(); } } }