Skip to content

SoipoServices/laravel-assimp2amc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

laravel-assimp2amc

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages