-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Изменен способ парсинга настроек процессоров
Добавлено форматирование времени в процессор таймер Добавлено наложение маски в процессор изображение Добавлена возможность наложения глитча Рефакторинг для наложения глитчей
- Loading branch information
Showing
31 changed files
with
501 additions
and
1,174 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
package dto | ||
|
||
type Position struct { | ||
X float64 `json:"x"` | ||
Y float64 `json:"y"` | ||
X float64 `json:"x" mapstructure:"x"` | ||
Y float64 `json:"y" mapstructure:"y"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
package dto | ||
|
||
type Processor struct { | ||
Id string `json:"id"` | ||
Options map[string]string `json:"options"` | ||
Id string `json:"id" mapstructure:"id"` | ||
Options map[string]interface{} `json:"options" mapstructure:"options"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,17 @@ | ||
package processorOptions | ||
|
||
import "github.com/mo3golom/wonder-animator/pkg/draw2dExtend" | ||
|
||
type CircleOptions struct { | ||
radius float64 | ||
strokeWidth float64 | ||
fillColor draw2dExtend.ExtendColor | ||
strokeColor draw2dExtend.ExtendColor | ||
Radius float64 `mapstructure:"radius"` | ||
StrokeWidth float64 `mapstructure:"strokeWidth"` | ||
FillColor string `mapstructure:"fillColor"` | ||
StrokeColor string `mapstructure:"strokeColor"` | ||
} | ||
|
||
func NewCircleOptions() *CircleOptions { | ||
return &CircleOptions{ | ||
radius: 0, | ||
strokeWidth: 0, | ||
fillColor: draw2dExtend.ParseHexColor("#ffffff"), | ||
strokeColor: draw2dExtend.ParseHexColor("#000000"), | ||
Radius: 0, | ||
StrokeWidth: 0, | ||
FillColor: "#ffffff", | ||
StrokeColor: "#000000", | ||
} | ||
} | ||
|
||
func (c *CircleOptions) Radius() float64 { | ||
return c.radius | ||
} | ||
|
||
func (c *CircleOptions) Diameter() float64 { | ||
return c.radius * 2 | ||
} | ||
|
||
func (c *CircleOptions) SetRadius(radius float64) { | ||
c.radius = radius | ||
} | ||
|
||
func (c *CircleOptions) StrokeWidth() float64 { | ||
return c.strokeWidth | ||
} | ||
|
||
func (c *CircleOptions) SetStrokeWidth(strokeWidth float64) { | ||
c.strokeWidth = strokeWidth | ||
} | ||
|
||
func (c *CircleOptions) FillColor() draw2dExtend.ExtendColor { | ||
return c.fillColor | ||
} | ||
|
||
func (c *CircleOptions) SetFillColor(fillColor string) { | ||
c.fillColor = draw2dExtend.ParseHexColor(fillColor) | ||
} | ||
|
||
func (c *CircleOptions) StrokeColor() draw2dExtend.ExtendColor { | ||
return c.strokeColor | ||
} | ||
|
||
func (c *CircleOptions) SetStrokeColor(strokeColor string) { | ||
c.strokeColor = draw2dExtend.ParseHexColor(strokeColor) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,15 @@ | ||
package processorOptions | ||
|
||
type ImageOptions struct { | ||
data string | ||
width, height int | ||
Data string `mapstructure:"data"` | ||
Width int `mapstructure:"width"` | ||
Height int `mapstructure:"height"` | ||
Mask *MaskOptions `mapstructure:"mask"` | ||
} | ||
|
||
func NewImageOptions() *ImageOptions { | ||
return &ImageOptions{ | ||
width: 0, | ||
height: 0, | ||
Width: 0, | ||
Height: 0, | ||
} | ||
} | ||
|
||
func (i *ImageOptions) Data() string { | ||
return i.data | ||
} | ||
|
||
func (i *ImageOptions) SetData(data string) { | ||
i.data = data | ||
} | ||
|
||
func (i *ImageOptions) Width() int { | ||
return i.width | ||
} | ||
|
||
func (i *ImageOptions) SetWidth(width int) { | ||
i.width = width | ||
} | ||
|
||
func (i *ImageOptions) Height() int { | ||
return i.height | ||
} | ||
|
||
func (i *ImageOptions) SetHeight(height int) { | ||
i.height = height | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.