コード例 #1
0
        public MeshLoader(GltfLoaderData data)
        {
            this.data = data;

            materialLoader = new MaterialLoader(data);
            accessorLoader = new AccessorLoader(data);
        }
コード例 #2
0
        private Material LoadMaterial(glTFLoader.Schema.MeshPrimitive primitive, MaterialLoader materialLoader)
        {
            var materialIndex = primitive.Material;

            if (materialIndex.HasValue)
            {
                return(materialLoader.LoadMaterial(materialIndex.Value));
            }
            else
            {
                return(materialLoader.LoadDefaultMaterial());
            }
        }