Make addition of config object specific to gltf files
Signed-off-by: Justin Georgi <justin.georgi@gmail.com>
This commit is contained in:
@@ -130,20 +130,23 @@ class GlModelHooks {
|
|||||||
* @param SpecialUpload $uploadFormObj current SpecialUpload object
|
* @param SpecialUpload $uploadFormObj current SpecialUpload object
|
||||||
*/
|
*/
|
||||||
public static function onUploadFormBeforeProcessing( $uploadFormObj ) {
|
public static function onUploadFormBeforeProcessing( $uploadFormObj ) {
|
||||||
$uploadFormObj->mComment .= <<<CONF
|
preg_match('/(glb|gltf)$/', $uploadFormObj->mUpload->getTitle(), $isGltf);
|
||||||
|
if ($isGltf) {
|
||||||
<mvconfig>
|
$uploadFormObj->mComment .= <<<CONF
|
||||||
{
|
|
||||||
"viewerConfig": {
|
<mvconfig>
|
||||||
"default": {
|
{
|
||||||
"camera-controls": true
|
"viewerConfig": {
|
||||||
|
"default": {
|
||||||
|
"camera-controls": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"annotations": {},
|
||||||
|
"annotationSets": {}
|
||||||
}
|
}
|
||||||
},
|
</mvconfig>
|
||||||
"annotations": {},
|
CONF;
|
||||||
"annotationSets": {}
|
|
||||||
}
|
}
|
||||||
</mvconfig>
|
|
||||||
CONF;
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user