Skip to content

Commit

Permalink
[Task] Move namespace from FFMpegTween to FFMpegTools (#10)
Browse files Browse the repository at this point in the history
* move namespace from FFMpegTween to FFMpegTools

* update install command in readme

* update namespace in composer.json
  • Loading branch information
ProjektGopher authored Apr 6, 2023
1 parent 8345158 commit 3160ce9
Show file tree
Hide file tree
Showing 16 changed files with 53 additions and 53 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ The stringification of these math strings is ported from [This Gitlab repo](http
## Installation
You can install the package via composer:
```bash
composer require projektgopher/laravel-ffmpeg-tween
composer require projektgopher/laravel-ffmpeg-tools
```

## Usage
Expand All @@ -37,9 +37,9 @@ For now this package can only be used within a Laravel app, but there are plans

### Simple tween with delay and duration
```php
use ProjektGopher\FFMpegTween\Tween;
use ProjektGopher\FFMpegTween\Timing;
use ProjektGopher\FFMpegTween\Ease;
use ProjektGopher\FFMpegTools\Tween;
use ProjektGopher\FFMpegTools\Timing;
use ProjektGopher\FFMpegTools\Ease;

$x = (new Tween())
->from("50")
Expand All @@ -51,10 +51,10 @@ $x = (new Tween())

### Animation sequences using keyframes
```php
use ProjektGopher\FFMpegTween\Keyframe;
use ProjektGopher\FFMpegTween\Timeline;
use ProjektGopher\FFMpegTween\Timing;
use ProjektGopher\FFMpegTween\Ease;
use ProjektGopher\FFMpegTools\Keyframe;
use ProjektGopher\FFMpegTools\Timeline;
use ProjektGopher\FFMpegTools\Timing;
use ProjektGopher\FFMpegTools\Ease;

$x = new Timeline()
$x->keyframe((new Keyframe)
Expand Down Expand Up @@ -82,7 +82,7 @@ When writing _long_ and **complicated** evaluated expressions, it can be easy to
The `Expr` class can help with this. If your expression is short enough this might be overkill, but for longer expressions this can really help with these issues.

```diff
+ use ProjektGopher\FFMpegTween\Utils\Expr;
+ use ProjektGopher\FFMpegTools\Utils\Expr;

....

Expand Down
14 changes: 7 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "projektgopher/laravel-ffmpeg-tween",
"name": "projektgopher/laravel-ffmpeg-tools",
"description": "Generates strings for use in ffmpeg commands to tween between values with easings.",
"keywords": [
"ProjektGopher",
"laravel",
"laravel-ffmpeg-tween"
"laravel-ffmpeg-tools"
],
"homepage": "https://github.com/projektgopher/laravel-ffmpeg-tween",
"homepage": "https://github.com/projektgopher/laravel-ffmpeg-tools",
"license": "MIT",
"authors": [
{
Expand Down Expand Up @@ -34,12 +34,12 @@
},
"autoload": {
"psr-4": {
"ProjektGopher\\FFMpegTween\\": "src/"
"ProjektGopher\\FFMpegTools\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"ProjektGopher\\FFMpegTween\\Tests\\": "tests/"
"ProjektGopher\\FFMpegTools\\Tests\\": "tests/"
}
},
"scripts": {
Expand All @@ -59,10 +59,10 @@
"extra": {
"laravel": {
"providers": [
"ProjektGopher\\FFMpegTween\\FFMpegTweenServiceProvider"
"ProjektGopher\\FFMpegTools\\FFMpegToolsServiceProvider"
],
"aliases": {
"FFMpegTween": "ProjektGopher\\FFMpegTween\\Facades\\FFMpegTween"
"FFMpegTools": "ProjektGopher\\FFMpegTools\\Facades\\FFMpegTools"
}
}
},
Expand Down
2 changes: 1 addition & 1 deletion scripts/generateEasings
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

require_once __DIR__.'/../vendor/autoload.php';

use ProjektGopher\FFMpegTween\Ease;
use ProjektGopher\FFMpegTools\Ease;

echo 'starting... (fail fast)'.PHP_EOL;

Expand Down
8 changes: 4 additions & 4 deletions scripts/generateTimeline
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@

require_once __DIR__.'/../vendor/autoload.php';

use ProjektGopher\FFMpegTween\Timeline;
use ProjektGopher\FFMpegTween\Keyframe;
use ProjektGopher\FFMpegTween\Ease;
use ProjektGopher\FFMpegTween\Timing;
use ProjektGopher\FFMpegTools\Timeline;
use ProjektGopher\FFMpegTools\Keyframe;
use ProjektGopher\FFMpegTools\Ease;
use ProjektGopher\FFMpegTools\Timing;

echo 'Generating video sample using Timeline...'.PHP_EOL;

Expand Down
2 changes: 1 addition & 1 deletion src/Ease.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace ProjektGopher\FFMpegTween;
namespace ProjektGopher\FFMpegTools;

enum Ease: string
{
Expand Down
4 changes: 2 additions & 2 deletions src/EaseFunctions.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

namespace ProjektGopher\FFMpegTween;
namespace ProjektGopher\FFMpegTools;

use ProjektGopher\FFMpegTween\Utils\Expr;
use ProjektGopher\FFMpegTools\Utils\Expr;

/**
* Ease
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php

namespace ProjektGopher\FFMpegTween;
namespace ProjektGopher\FFMpegTools;

use Spatie\LaravelPackageTools\Package;
use Spatie\LaravelPackageTools\PackageServiceProvider;

class FFMpegTweenServiceProvider extends PackageServiceProvider
class FFMpegToolsServiceProvider extends PackageServiceProvider
{
public function configurePackage(Package $package): void
{
Expand Down
16 changes: 16 additions & 0 deletions src/Facades/FFMpegTools.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

namespace ProjektGopher\FFMpegTools\Facades;

use Illuminate\Support\Facades\Facade;

/**
* @see \ProjektGopher\FFMpegTools\FFMpegTools
*/
class FFMpegTools extends Facade
{
protected static function getFacadeAccessor()
{
return \ProjektGopher\FFMpegTools\Tween::class;
}
}
16 changes: 0 additions & 16 deletions src/Facades/FFMpegTween.php

This file was deleted.

2 changes: 1 addition & 1 deletion src/Keyframe.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace ProjektGopher\FFMpegTween;
namespace ProjektGopher\FFMpegTools;

class Keyframe
{
Expand Down
2 changes: 1 addition & 1 deletion src/Timeline.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace ProjektGopher\FFMpegTween;
namespace ProjektGopher\FFMpegTools;

class Timeline
{
Expand Down
2 changes: 1 addition & 1 deletion src/Timing.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace ProjektGopher\FFMpegTween;
namespace ProjektGopher\FFMpegTools;

class Timing
{
Expand Down
4 changes: 2 additions & 2 deletions src/Tween.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

namespace ProjektGopher\FFMpegTween;
namespace ProjektGopher\FFMpegTools;

use ProjektGopher\FFMpegTween\Utils\Expr;
use ProjektGopher\FFMpegTools\Utils\Expr;

class Tween
{
Expand Down
2 changes: 1 addition & 1 deletion src/Utils/Expr.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace ProjektGopher\FFMpegTween\Utils;
namespace ProjektGopher\FFMpegTools\Utils;

/**
* Expr
Expand Down
2 changes: 1 addition & 1 deletion tests/Pest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php

use ProjektGopher\FFMpegTween\Tests\TestCase;
use ProjektGopher\FFMpegTools\Tests\TestCase;

uses(TestCase::class)->in(__DIR__);
8 changes: 4 additions & 4 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

namespace ProjektGopher\FFMpegTween\Tests;
namespace ProjektGopher\FFMpegTools\Tests;

use Illuminate\Database\Eloquent\Factories\Factory;
use Orchestra\Testbench\TestCase as Orchestra;
use ProjektGopher\FFMpegTween\FFMpegTweenServiceProvider;
use ProjektGopher\FFMpegTools\FFMpegToolsServiceProvider;

class TestCase extends Orchestra
{
Expand All @@ -13,14 +13,14 @@ protected function setUp(): void
parent::setUp();

Factory::guessFactoryNamesUsing(
fn (string $modelName) => 'ProjektGopher\\FFMpegTween\\Database\\Factories\\'.class_basename($modelName).'Factory'
fn (string $modelName) => 'ProjektGopher\\FFMpegTools\\Database\\Factories\\'.class_basename($modelName).'Factory'
);
}

protected function getPackageProviders($app)
{
return [
FFMpegTweenServiceProvider::class,
FFMpegToolsServiceProvider::class,
];
}

Expand Down

0 comments on commit 3160ce9

Please sign in to comment.