soiposervices / laravel-assimp2amc
laravel-assimp2amc
Requires
- php: ^7.4
- artglass/assimp2amc: ^0.1
- illuminate/contracts: ^8.0
- spatie/laravel-package-tools: ^1.4.3
- symfony/process: ^5.2
Requires (Dev)
- brianium/paratest: ^6.2
- nunomaduro/collision: ^5.3
- orchestra/testbench: ^6.15
- phpunit/phpunit: ^9.3
- spatie/laravel-ray: ^1.9
- vimeo/psalm: ^4.4
This package is auto-updated.
Last update: 2024-10-25 07:21:52 UTC
README
This package can be used to verify that in a given folder, the .obj has all the required files to be run as a binary 3d model.
Compile
docker run -v "$PWD/vendor/artglass/assimp2amc/assimp2amc:/home" -w "/home" -i -t mcr.microsoft.com/dotnet/sdk:5.0-alpine dotnet publish -r linux-x64 -p:PublishSingleFile=true --self-contained true
The compiled file will be stored in /vendor/artglass/assimp2amc/assimp2amc/bin/Debug/netcoreapp3.1/linux-x64/publish
cp $PWD/vendor/artglass/assimp2amc/assimp2amc/bin/Debug/netcoreapp3.1/linux-x64/publish/assimp2amc .
or simply run:
composer compile
Run assimp2amc on obj
docker run -v "$PWD:/home" -w "/home" -i -t alpine ./assimp2amc -c src/ExampleModelData/851e122f30504b90ae495fe567342936.obj
Installation
You can install the package via composer:
composer require soiposervices/assimp2amc
You can publish and run the migrations with:
php artisan vendor:publish --provider="SoipoServices\Assimp2AmcServiceProvider" --tag="assimp2amc-migrations" php artisan migrate
You can publish the config file with:
php artisan vendor:publish --provider="SoipoServices\Assimp2AmcServiceProvider" --tag="assimp2amc-config"
This is the contents of the published config file:
return [ 'bash_script' => './', 'path_to_executable' => 'src/assimp2amcosx' ];
Usage
$laravel-assimp2amc = new SoipoServices\Assimp2Amc(); echo $laravel-assimp2amc->run('src/ExampleModelData/851e122f30504b90ae495fe567342936.obj');
Assimp2Amc::run('src/ExampleModelData/851e122f30504b90ae495fe567342936.obj');
Testing
Make sure you compile first in order to have the excutable in the src folder
composer compile
or for mac:
composer compile-osx
You should also have a folder containing 3d model .obj file with its assets in a folder called ExampleModelData in the src folder.
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Credits
License
The MIT License (MIT). Please see License File for more information.