From 5fd4f215f1a249aef8c62f3365f17c7c67060129 Mon Sep 17 00:00:00 2001 From: HifiExperiments Date: Wed, 17 Mar 2021 19:18:30 -0700 Subject: [PATCH] more docs --- libraries/entities/src/EntityItemProperties.cpp | 9 +++++---- .../src/procedural/ProceduralMaterialCache.cpp | 3 ++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/libraries/entities/src/EntityItemProperties.cpp b/libraries/entities/src/EntityItemProperties.cpp index 5c52cb2708..ebb06eac43 100644 --- a/libraries/entities/src/EntityItemProperties.cpp +++ b/libraries/entities/src/EntityItemProperties.cpp @@ -951,10 +951,11 @@ EntityPropertyFlags EntityItemProperties::getChangedProperties() const { * * @typedef {object} Entities.EntityProperties-Material * @property {Vec3} dimensions=0.1,0.1,0.1 - Used when materialMappingMode == "projected". - * @property {string} materialURL="" - URL to a {@link Entities.MaterialResource|MaterialResource}. If you append - * "#name" to the URL, the material with that name in the {@link Entities.MaterialResource|MaterialResource} - * will be applied to the entity. Alternatively, set the property value to "materialData" to use the - * materialData property for the {@link Entities.MaterialResource|MaterialResource} values. + * @property {string} materialURL="" - URL to a {@link Entities.MaterialResource|MaterialResource}. Alternatively, set the + * property value to "materialData" to use the materialData property for the + * {@link Entities.MaterialResource|MaterialResource} values. If you append "#name" to the URL, the material + * with that name will be applied to the entity. You can also use the ID of another material entity as the URL, in which + * case this material will act as a copy of that material, with its own unique material transform, priority, etc. * @property {string} materialData="" - Used to store {@link Entities.MaterialResource|MaterialResource} data as a JSON string. * You can use JSON.parse() to parse the string into a JavaScript object which you can manipulate the * properties of, and use JSON.stringify() to convert the object into a string to put in the property. diff --git a/libraries/procedural/src/procedural/ProceduralMaterialCache.cpp b/libraries/procedural/src/procedural/ProceduralMaterialCache.cpp index 450995f4eb..4ce609fd35 100644 --- a/libraries/procedural/src/procedural/ProceduralMaterialCache.cpp +++ b/libraries/procedural/src/procedural/ProceduralMaterialCache.cpp @@ -76,7 +76,8 @@ bool NetworkMaterialResource::parseJSONColor(const QJsonValue& array, glm::vec3& * A material or set of materials used by a {@link Entities.EntityType|Material entity}. * @typedef {object} Entities.MaterialResource * @property {number} materialVersion=1 - The version of the material. Currently not used. - * @property {Entities.Material|Entities.Material[]} materials - The details of the material or materials. + * @property {Entities.Material|Entities.Material[]|string} materials - The details of the material or materials, or the ID of another + * material entity. */ NetworkMaterialResource::ParsedMaterials NetworkMaterialResource::parseJSONMaterials(const QJsonDocument& materialJSON, const QUrl& baseUrl) { ParsedMaterials toReturn;