adds skybox
This commit is contained in:
parent
0bda706671
commit
9a1c0af61d
|
@ -91,6 +91,12 @@ class Render3D extends AbstractBlockLayout
|
|||
}
|
||||
$width = $block->dataValue('width');
|
||||
$height = $width;
|
||||
$skybox = null;
|
||||
foreach($urls as $url) {
|
||||
if (strpos($url, "sky-box-image")) {
|
||||
$skybox = $url;
|
||||
}
|
||||
}
|
||||
return $view->partial('common/block-layout/render-3d', [
|
||||
'model_type' => $model_type,
|
||||
'title' => $block->dataValue('title'),
|
||||
|
@ -99,7 +105,7 @@ class Render3D extends AbstractBlockLayout
|
|||
'item_url' => $attachments[0]->item()->url(),
|
||||
'renderSourceLink' => $block->dataValue('renderSourceLink'),
|
||||
'addPreLoadImage' => 1,
|
||||
'skybox' => 0,
|
||||
'skybox' => $skybox,
|
||||
'urls' => $urls,
|
||||
'id' => 'v3d-' . ++$id,
|
||||
'mediaTypes' => $media_types,
|
||||
|
|
|
@ -41,7 +41,7 @@ model-viewer {
|
|||
camera-controls=""
|
||||
background-color="#455A64"
|
||||
<?php if ($skybox) { ?>
|
||||
skybox-image="{{ object['skybox'] }}"
|
||||
skybox-image="<?= $skybox ?>"
|
||||
<?php } ?>
|
||||
>
|
||||
<?php if($addPreLoadImage) { ?>
|
||||
|
|
Loading…
Reference in New Issue