mirror of
https://github.com/ToxicCrack/PrintABrick.git
synced 2025-05-19 21:50:08 -07:00
Move model images folder
This commit is contained in:
parent
2a02cd19ef
commit
bd4f21d102
@ -3,7 +3,10 @@
|
||||
<div class="ui bordered fluid image">
|
||||
<a href="{{ url('model_detail', {'number': model.number})}}">
|
||||
<div class="image">
|
||||
<img src="{{ asset('/ldraw/images/'~model.number~'.png') | imagine_filter('model_min') }}" data-src="{{ asset('/ldraw/images/'~model.number~'.png') | imagine_filter('model_min') }}" class="transition visible">
|
||||
<img src="{{ asset('/images/-1/'~model.number~'.png') | imagine_filter('model_min') }}" data-src="{{ asset('/ldraw/images/-1/'~model.number~'.png') | imagine_filter('model_min') }}" class="transition visible">
|
||||
{#<div class="image load">#}
|
||||
{#<img src="{{ model.number|partImage|imagine_filter('rebrickable_part_min') }}" data-src="{{ model.number|partImage|imagine_filter('rebrickable_part_min') }}" class="transition visible">#}
|
||||
{#</div>#}
|
||||
</div>
|
||||
<div class="ui bottom attached label {% if model.parts|length == 0 %}black{% endif %}">{{ model.number }}</div>
|
||||
</a>
|
||||
|
@ -11,7 +11,7 @@
|
||||
<div class="ui grid">
|
||||
<div class="column ten wide">
|
||||
<div id="model-viewer" class="model-container">
|
||||
<img src="{{ asset('ldraw/images/'~model.number~'.png') | imagine_filter('model_large')}}">
|
||||
<img src="{{ asset('/images/-1/'~model.number~'.png') | imagine_filter('model_large')}}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="column six wide">
|
||||
|
@ -58,11 +58,11 @@ class LDViewService
|
||||
*/
|
||||
public function datToStl($file, $rewrite = false)
|
||||
{
|
||||
if (!$this->mediaFilesystem->has('ldraw'.DIRECTORY_SEPARATOR.'models')) {
|
||||
$this->mediaFilesystem->createDir('ldraw'.DIRECTORY_SEPARATOR.'models');
|
||||
if (!$this->mediaFilesystem->has('models')) {
|
||||
$this->mediaFilesystem->createDir('models');
|
||||
}
|
||||
|
||||
$newFile = 'ldraw'.DIRECTORY_SEPARATOR.'models'.DIRECTORY_SEPARATOR.basename($file, '.dat').'.stl';
|
||||
$newFile = 'models'.DIRECTORY_SEPARATOR.basename($file, '.dat').'.stl';
|
||||
|
||||
if (!$this->mediaFilesystem->has($newFile) || $rewrite) {
|
||||
$this->runLDView([
|
||||
@ -70,7 +70,7 @@ class LDViewService
|
||||
'-LDrawDir='.$this->ldrawLibraryContext->getAdapter()->getPathPrefix(),
|
||||
'-ExportFiles=1',
|
||||
'-ExportSuffix=.stl',
|
||||
'-ExportsDir='.$this->mediaFilesystem->getAdapter()->getPathPrefix().'ldraw'.DIRECTORY_SEPARATOR.'models',
|
||||
'-ExportsDir='.$this->mediaFilesystem->getAdapter()->getPathPrefix().'models',
|
||||
]);
|
||||
|
||||
// Check if file created successfully
|
||||
@ -96,11 +96,11 @@ class LDViewService
|
||||
*/
|
||||
public function datToPng($file, $rewrite = false)
|
||||
{
|
||||
if (!$this->mediaFilesystem->has('ldraw'.DIRECTORY_SEPARATOR.'images')) {
|
||||
$this->mediaFilesystem->createDir('ldraw'.DIRECTORY_SEPARATOR.'images');
|
||||
if (!$this->mediaFilesystem->has('images')) {
|
||||
$this->mediaFilesystem->createDir('images');
|
||||
}
|
||||
|
||||
$newFile = 'ldraw'.DIRECTORY_SEPARATOR.'images'.DIRECTORY_SEPARATOR.basename($file, '.dat').'.png';
|
||||
$newFile = 'images'.DIRECTORY_SEPARATOR.basename($file, '.dat').'.png';
|
||||
|
||||
if (!$this->mediaFilesystem->has($newFile) || $this->rewrite) {
|
||||
$this->runLDView([
|
||||
@ -118,7 +118,7 @@ class LDViewService
|
||||
'-SaveWidth=800',
|
||||
'-CurveQuality=12',
|
||||
'-DefaultLatLong=45,40',
|
||||
'-SaveDir='.$this->mediaFilesystem->getAdapter()->getPathPrefix().'ldraw'.DIRECTORY_SEPARATOR.'images',
|
||||
'-SaveDir='.$this->mediaFilesystem->getAdapter()->getPathPrefix().'images',
|
||||
'-SaveSnapshots=1',
|
||||
]);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user