mirror of
https://github.com/mob-sakai/UIEffect.git
synced 2026-11-20 18:02:38 +08:00
Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3d8f0c6a98 | |||
| a6d4fd54b6 | |||
| 69e353eeba | |||
| 8483ba63cb | |||
| 5b6e2e5f61 | |||
| 34f128a603 | |||
| 7f4190c8c6 | |||
| 019f34276d | |||
| db492220b8 | |||
| e9cc165e2e | |||
| 0f595eb791 | |||
| d41a918a16 | |||
| 13a853887e | |||
| ad12e58d05 | |||
| bc7310df96 |
@@ -0,0 +1,84 @@
|
||||
# Contributor Covenant Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
|
||||
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
||||
|
||||
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to a positive environment for our community include:
|
||||
|
||||
* Demonstrating empathy and kindness toward other people
|
||||
* Being respectful of differing opinions, viewpoints, and experiences
|
||||
* Giving and gracefully accepting constructive feedback
|
||||
* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
|
||||
* Focusing on what is best not just for us as individuals, but for the overall community
|
||||
|
||||
Examples of unacceptable behavior include:
|
||||
|
||||
* The use of sexualized language or imagery, and sexual attention or
|
||||
advances of any kind
|
||||
* Trolling, insulting or derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or email
|
||||
address, without their explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
|
||||
## Enforcement Responsibilities
|
||||
|
||||
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
|
||||
|
||||
Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at email. All complaints will be reviewed and investigated promptly and fairly.
|
||||
|
||||
All community leaders are obligated to respect the privacy and security of the reporter of any incident.
|
||||
|
||||
## Enforcement Guidelines
|
||||
|
||||
Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
|
||||
|
||||
### 1. Correction
|
||||
|
||||
**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
|
||||
|
||||
**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
|
||||
|
||||
### 2. Warning
|
||||
|
||||
**Community Impact**: A violation through a single incident or series of actions.
|
||||
|
||||
**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
|
||||
|
||||
### 3. Temporary Ban
|
||||
|
||||
**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
|
||||
|
||||
**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
|
||||
|
||||
### 4. Permanent Ban
|
||||
|
||||
**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
|
||||
|
||||
**Consequence**: A permanent ban from any sort of public interaction within the community.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
|
||||
available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
|
||||
|
||||
Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
|
||||
|
||||
[homepage]: https://www.contributor-covenant.org
|
||||
|
||||
For answers to common questions about this code of conduct, see the FAQ at
|
||||
https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
|
||||
@@ -0,0 +1,92 @@
|
||||
# How to Contribute
|
||||
|
||||
## Issues
|
||||
|
||||
Issues are very valuable to this project.
|
||||
|
||||
- Ideas are a valuable source of contributions others can make
|
||||
- Problems show where this project is lacking
|
||||
- With a question you show where contributors can improve the user experience
|
||||
|
||||
Thank you for creating them.
|
||||
|
||||
<br><br><br>
|
||||
|
||||
## Pull Requests
|
||||
|
||||
Pull requests are, a great way to get your ideas into this repository.
|
||||
|
||||
When deciding if I merge in a pull request I look at the following things:
|
||||
|
||||
### Does it state intent
|
||||
|
||||
You should be clear which problem you're trying to solve with your contribution.
|
||||
|
||||
For example:
|
||||
|
||||
```
|
||||
Add link to code of conduct in README.md
|
||||
```
|
||||
|
||||
Doesn't tell me anything about why you're doing that
|
||||
|
||||
```
|
||||
Add link to code of conduct in README.md because users don't always look in the CONTRIBUTING.md
|
||||
```
|
||||
|
||||
Tells me the problem that you have found, and the pull request shows me the action you have taken to solve it.
|
||||
|
||||
### Is it of good quality
|
||||
|
||||
- There are no spelling mistakes
|
||||
- It reads well
|
||||
- For english language contributions: Has a good score on Grammarly or Hemingway App
|
||||
|
||||
### Does it move this repository closer to my vision for the repository
|
||||
|
||||
- The aim of this repository is:
|
||||
|
||||
- To provide a README.md and assorted documents anyone can copy and paste, into their project
|
||||
- The content is usable by someone who hasn't written something like this before
|
||||
- Foster a culture of respect and gratitude in the open source community
|
||||
|
||||
### Does it follow the contributor covenant
|
||||
|
||||
This repository has a [code of conduct](/CODE_OF_CONDUCT.md), I will remove things that do not respect it.
|
||||
|
||||
### Does it follow the development steps
|
||||
|
||||
1. Fork the repository.
|
||||
2. Clone the forked repository to local.
|
||||
3. Create your branch from `develop` branch.
|
||||
4. Develop the package.
|
||||
5. Commit with a message based on [Conventional Commits](https://www.conventionalcommits.org/).
|
||||
1. Fill out the description, link any related issues and submit your pull request.
|
||||
**NOTE: Create a pull request to merge into `develop` branch**
|
||||
|
||||
#### Commit messages in the most common cases
|
||||
|
||||
| Case | Commit message|
|
||||
| -- | -- |
|
||||
| Added a new feature | feat: add new feature |
|
||||
| Added a suggested feature #999 | feat: add new feature<br>Close #999 |
|
||||
| Fixed a bug | fix: a problem |
|
||||
| Fixed a reported bug #999 | fix: a problem<br>Close #999 |
|
||||
| Added features that include breaking changes | feat: add new feature<br><br>BREAKING CHANGE: Details of the changes |
|
||||
|
||||
<br><br><br>
|
||||
|
||||
## Support
|
||||
|
||||
This is an open source project that I am developing in my spare time.
|
||||
If you like it, please support me.
|
||||
With your support, I can spend more time on development. :)
|
||||
|
||||
[](https://www.patreon.com/join/2343451?)
|
||||
[](https://github.com/users/mob-sakai/sponsorship)
|
||||
|
||||
<br><br><br>
|
||||
|
||||
## License
|
||||
|
||||
By contributing to this repository, you agree that your contributions will be licensed under its MIT license.
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a7936eef3d0544cd9fec8c99b0f1031b
|
||||
timeCreated: 1586753876
|
||||
@@ -1,3 +1,42 @@
|
||||
# [4.0.0-preview.8](https://github.com/mob-sakai/UIEffect/compare/v4.0.0-preview.7...v4.0.0-preview.8) (2020-06-04)
|
||||
|
||||
|
||||
### change
|
||||
|
||||
* change namespace ([7f4190c](https://github.com/mob-sakai/UIEffect/commit/7f4190c8c6f294e90869767a96194ec5ac4ba57f))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* modify EffectPlayer at runtime ([8483ba6](https://github.com/mob-sakai/UIEffect/commit/8483ba63cb546ca032915c166c0333fa5fd7aa76)), closes [#214](https://github.com/mob-sakai/UIEffect/issues/214) [#215](https://github.com/mob-sakai/UIEffect/issues/215)
|
||||
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
* If your code contained the UIEffect API, it would fail to compile. Please change the namespace from `Coffee.UIExtensions` to `Coffee.UIEffects`.
|
||||
|
||||
# [4.0.0-preview.7](https://github.com/mob-sakai/UIEffect/compare/v4.0.0-preview.6...v4.0.0-preview.7) (2020-05-11)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* not working on PS4 ([0f595eb](https://github.com/mob-sakai/UIEffect/commit/0f595eb79197433e166bf74d736d9841b4117011)), closes [#211](https://github.com/mob-sakai/UIEffect/issues/211)
|
||||
* Shaders.meta file should be removed ([e9cc165](https://github.com/mob-sakai/UIEffect/commit/e9cc165e2edba572d868d224e42df31666fd4002)), closes [#210](https://github.com/mob-sakai/UIEffect/issues/210)
|
||||
|
||||
# [4.0.0-preview.6](https://github.com/mob-sakai/UIEffect/compare/v4.0.0-preview.5...v4.0.0-preview.6) (2020-04-14)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* can't import samples in Unity2019.1 or later ([13a8538](https://github.com/mob-sakai/UIEffect/commit/13a853887e87b7ecc12e937e92498af945bbeb8a)), closes [#209](https://github.com/mob-sakai/UIEffect/issues/209)
|
||||
|
||||
# [4.0.0-preview.5](https://github.com/mob-sakai/UIEffect/compare/v4.0.0-preview.4...v4.0.0-preview.5) (2020-04-13)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* move shaders to resources directory ([bc7310d](https://github.com/mob-sakai/UIEffect/commit/bc7310df96977ef48328675e9465b295b40a1418))
|
||||
|
||||
# [4.0.0-preview.4](https://github.com/mob-sakai/UIEffect/compare/v4.0.0-preview.3...v4.0.0-preview.4) (2020-04-13)
|
||||
|
||||
|
||||
|
||||
@@ -113,18 +113,13 @@ Or, use [UpmGitExtension](https://github.com/mob-sakai/UpmGitExtension) to insta
|
||||
<br><br><br><br>
|
||||
## How to play demo
|
||||
|
||||
#### For Unity 2019.1 or later
|
||||
- For Unity 2019.1 or later
|
||||
- Open `Package Manager` window and select `UI Effect` package in package list and click `Demo > Import in project` button
|
||||
- For Unity 2018.4 or earlier
|
||||
- Click `Assets/Samples/UIEffect/Import Demo` from menu
|
||||
|
||||
1. Open `Package Manager` window and select `UI Particle` package in package list
|
||||
2. Click `Import in project` button
|
||||

|
||||
3. The demo will be imported into `Assets/Samples/UI Effect/{version}/Demo`; open `UIEffect_Demo` scene and play it
|
||||
|
||||
#### For Unity 2018.4 or earlier
|
||||
|
||||
1. Select `Assets/Samples/UI Effect Demo` from menu
|
||||

|
||||
2. The demo will be imported into `Assets/Samples/UI Effect/{version}/Demo`; open `UIEffect_Demo` scene and play it
|
||||
The assets will be imported into `Assets/Samples/UI Effect/{version}/Demo`.
|
||||
Open `
|
||||
|
||||
|
||||
|
||||
|
||||
+2
-2
@@ -260,7 +260,7 @@ half4 ApplyShinyEffect(half4 color, half2 shinyParam)
|
||||
fixed gloss = param2.x;
|
||||
half normalized = 1 - saturate(abs((nomalizedPos - location) / width));
|
||||
half shinePower = smoothstep(0, soft, normalized);
|
||||
half3 reflectColor = lerp(1, color.rgb * 7, gloss);
|
||||
half3 reflectColor = lerp(fixed3(1,1,1), color.rgb * 7, gloss);
|
||||
|
||||
color.rgb += color.a * (shinePower / 2) * brightness * reflectColor;
|
||||
|
||||
@@ -282,7 +282,7 @@ half3 HsvToRgb(half3 c) {
|
||||
c = half3(c.x, clamp(c.yz, 0.0, 1.0));
|
||||
half4 K = half4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
|
||||
half3 p = abs(frac(c.xxx + K.xyz) * 6.0 - K.www);
|
||||
return c.z * lerp(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);
|
||||
return c.z * lerp(K.xxx, clamp(p.xyz - K.xxx, 0.0, 1.0), c.y);
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Coffee.UIExtensions
|
||||
namespace Coffee.UIEffects
|
||||
{
|
||||
public class UIEffect_Demo : MonoBehaviour
|
||||
{
|
||||
|
||||
@@ -6,7 +6,7 @@ using System.Text;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Coffee.UIExtensions
|
||||
namespace Coffee.UIEffects
|
||||
{
|
||||
/// <summary>
|
||||
/// Abstract effect base for UI.
|
||||
@@ -43,7 +43,6 @@ namespace Coffee.UIExtensions
|
||||
foreach (var effect in syncEffects)
|
||||
{
|
||||
effect.SetMaterialDirty();
|
||||
// BaseConnector.FindConnector(effect.graphic).SetMaterialDirty(effect.graphic);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Coffee.UIExtensions
|
||||
namespace Coffee.UIEffects
|
||||
{
|
||||
/// <summary>
|
||||
/// Base class for effects that modify the generated Mesh.
|
||||
@@ -16,14 +16,14 @@ namespace Coffee.UIExtensions
|
||||
{
|
||||
RectTransform _rectTransform;
|
||||
Graphic _graphic;
|
||||
BaseConnector _connector;
|
||||
GraphicConnector _connector;
|
||||
|
||||
/// <summary>
|
||||
/// The Graphic attached to this GameObject.
|
||||
/// </summary>
|
||||
protected BaseConnector connector
|
||||
protected GraphicConnector connector
|
||||
{
|
||||
get { return _connector ?? (_connector = BaseConnector.FindConnector(graphic)); }
|
||||
get { return _connector ?? (_connector = GraphicConnector.FindConnector(graphic)); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -44,15 +44,6 @@ namespace Coffee.UIExtensions
|
||||
|
||||
internal readonly List<UISyncEffect> syncEffects = new List<UISyncEffect>(0);
|
||||
|
||||
/// <summary>
|
||||
/// The material for rendering.
|
||||
/// </summary>
|
||||
// public virtual Material material
|
||||
// {
|
||||
// get { return connector.GetMaterial(graphic); }
|
||||
// set { connector.SetMaterial(graphic, value); }
|
||||
// }
|
||||
|
||||
/// <summary>
|
||||
/// Call used to modify mesh. (legacy)
|
||||
/// </summary>
|
||||
@@ -146,7 +137,7 @@ namespace Coffee.UIExtensions
|
||||
// _initialized = true;
|
||||
// _graphic = _graphic ? _graphic : GetComponent<Graphic>();
|
||||
//
|
||||
// _connector = BaseConnector.FindConnector(_graphic);
|
||||
// _connector = GraphicConnector.FindConnector(_graphic);
|
||||
//
|
||||
// // _canvasRenderer = _canvasRenderer ?? GetComponent<CanvasRenderer> ();
|
||||
// _rectTransform = _rectTransform ? _rectTransform : GetComponent<RectTransform>();
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Coffee.UIExtensions
|
||||
namespace Coffee.UIEffects
|
||||
{
|
||||
/// <summary>
|
||||
/// Effect player.
|
||||
|
||||
+62
-71
@@ -1,17 +1,18 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Coffee.UIExtensions
|
||||
namespace Coffee.UIEffects
|
||||
{
|
||||
public class BaseConnector
|
||||
public class GraphicConnector
|
||||
{
|
||||
private static readonly List<BaseConnector> s_Connectors = new List<BaseConnector>();
|
||||
private static readonly Dictionary<Type, BaseConnector> s_ConnectorMap = new Dictionary<Type, BaseConnector>();
|
||||
private static readonly BaseConnector s_EmptyConnector = new BaseConnector();
|
||||
private static readonly List<GraphicConnector> s_Connectors = new List<GraphicConnector>();
|
||||
|
||||
private static readonly Dictionary<Type, GraphicConnector> s_ConnectorMap =
|
||||
new Dictionary<Type, GraphicConnector>();
|
||||
|
||||
private static readonly GraphicConnector s_EmptyConnector = new GraphicConnector();
|
||||
|
||||
#if UNITY_EDITOR
|
||||
[UnityEditor.InitializeOnLoadMethod]
|
||||
@@ -19,21 +20,21 @@ namespace Coffee.UIExtensions
|
||||
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
|
||||
private static void Init()
|
||||
{
|
||||
AddConnector(s_EmptyConnector);
|
||||
AddConnector(new GraphicConnector());
|
||||
}
|
||||
|
||||
protected static void AddConnector(BaseConnector connector)
|
||||
protected static void AddConnector(GraphicConnector connector)
|
||||
{
|
||||
s_Connectors.Add(connector);
|
||||
s_Connectors.Sort((x, y) => y.priority - x.priority);
|
||||
}
|
||||
|
||||
public static BaseConnector FindConnector(Graphic graphic)
|
||||
public static GraphicConnector FindConnector(Graphic graphic)
|
||||
{
|
||||
if (!graphic) return s_EmptyConnector;
|
||||
|
||||
var type = graphic.GetType();
|
||||
BaseConnector connector = null;
|
||||
GraphicConnector connector = null;
|
||||
if (s_ConnectorMap.TryGetValue(type, out connector)) return connector;
|
||||
|
||||
foreach (var c in s_Connectors)
|
||||
@@ -47,6 +48,22 @@ namespace Coffee.UIExtensions
|
||||
return s_EmptyConnector;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Connector priority.
|
||||
/// </summary>
|
||||
protected virtual int priority
|
||||
{
|
||||
get { return -1; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Extra channel.
|
||||
/// </summary>
|
||||
public virtual AdditionalCanvasShaderChannels extraChannel
|
||||
{
|
||||
get { return AdditionalCanvasShaderChannels.TexCoord1; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The connector is valid for the component.
|
||||
/// </summary>
|
||||
@@ -60,52 +77,7 @@ namespace Coffee.UIExtensions
|
||||
/// </summary>
|
||||
public virtual Shader FindShader(string shaderName)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Priority.
|
||||
/// </summary>
|
||||
protected virtual int priority
|
||||
{
|
||||
get { return -1; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Extra channel.
|
||||
/// </summary>
|
||||
public virtual AdditionalCanvasShaderChannels extraChannel
|
||||
{
|
||||
get { return AdditionalCanvasShaderChannels.None; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set material.
|
||||
/// </summary>
|
||||
public virtual void SetMaterial(Graphic graphic, Material material)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get material.
|
||||
/// </summary>
|
||||
public virtual Material GetMaterial(Graphic graphic)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Mark the vertices as dirty.
|
||||
/// </summary>
|
||||
public virtual void SetVerticesDirty(Graphic graphic)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Mark the material as dirty.
|
||||
/// </summary>
|
||||
public virtual void SetMaterialDirty(Graphic graphic)
|
||||
{
|
||||
return Shader.Find("Hidden/" + shaderName);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -122,6 +94,24 @@ namespace Coffee.UIExtensions
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Mark the vertices as dirty.
|
||||
/// </summary>
|
||||
public virtual void SetVerticesDirty(Graphic graphic)
|
||||
{
|
||||
if (graphic)
|
||||
graphic.SetVerticesDirty();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Mark the material as dirty.
|
||||
/// </summary>
|
||||
public virtual void SetMaterialDirty(Graphic graphic)
|
||||
{
|
||||
if (graphic)
|
||||
graphic.SetMaterialDirty();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Event that is called just before Canvas rendering happens.
|
||||
/// This allows you to delay processing / updating of canvas based elements until just before they are rendered.
|
||||
@@ -133,7 +123,7 @@ namespace Coffee.UIExtensions
|
||||
/// <summary>
|
||||
/// Gets position factor for area.
|
||||
/// </summary>
|
||||
public void GetPositionFactor(EffectArea area, int index, Rect rect, Vector2 position, out float x, out float y)
|
||||
public virtual void GetPositionFactor(EffectArea area, int index, Rect rect, Vector2 position, out float x, out float y)
|
||||
{
|
||||
if (area == EffectArea.Fit)
|
||||
{
|
||||
@@ -147,22 +137,23 @@ namespace Coffee.UIExtensions
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Normalize vertex position by local matrix.
|
||||
/// </summary>
|
||||
public void GetNormalizedFactor(EffectArea area, int index, Matrix2x3 matrix, Vector2 position,
|
||||
out Vector2 normalizedPos)
|
||||
{
|
||||
normalizedPos = matrix * position;
|
||||
}
|
||||
|
||||
public virtual bool IsText(Graphic graphic)
|
||||
{
|
||||
return false;
|
||||
return graphic && graphic is Text;
|
||||
}
|
||||
|
||||
public virtual void SetExtraChannel(ref UIVertex vertex, Vector2 value)
|
||||
{
|
||||
vertex.uv1 = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Normalize vertex position by local matrix.
|
||||
/// </summary>
|
||||
public virtual void GetNormalizedFactor(EffectArea area, int index, Matrix2x3 matrix, Vector2 position,
|
||||
out Vector2 normalizedPos)
|
||||
{
|
||||
normalizedPos = matrix * position;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,7 @@ using UnityEngine;
|
||||
using System.Text;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Coffee.UIExtensions
|
||||
namespace Coffee.UIEffects
|
||||
{
|
||||
public class MaterialCache
|
||||
{
|
||||
@@ -40,7 +40,8 @@ namespace Coffee.UIExtensions
|
||||
}
|
||||
#endif
|
||||
|
||||
public static Material Register(Material baseMaterial, Hash128 hash, System.Action<Material, Graphic> onModifyMaterial, Graphic graphic)
|
||||
public static Material Register(Material baseMaterial, Hash128 hash,
|
||||
System.Action<Material, Graphic> onModifyMaterial, Graphic graphic)
|
||||
{
|
||||
if (!hash.isValid) return null;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Coffee.UIExtensions
|
||||
namespace Coffee.UIEffects
|
||||
{
|
||||
/// <summary>
|
||||
/// Matrix2x3.
|
||||
|
||||
@@ -4,7 +4,7 @@ using UnityEngine;
|
||||
using UnityEngine.Rendering;
|
||||
using System;
|
||||
|
||||
namespace Coffee.UIExtensions
|
||||
namespace Coffee.UIEffects
|
||||
{
|
||||
public interface IParameterTexture
|
||||
{
|
||||
@@ -24,7 +24,7 @@ namespace Coffee.UIExtensions
|
||||
//################################
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Coffee.UIExtensions.ParameterTexture"/> class.
|
||||
/// Initializes a new instance of the <see cref="Coffee.UIEffects.ParameterTexture"/> class.
|
||||
/// </summary>
|
||||
/// <param name="channels">Channels.</param>
|
||||
/// <param name="instanceLimit">Instance limit.</param>
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 73be53ea7d09c45bc83e7b957a5b99b5
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1fa123391c81f40ffbbe761447b7913c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,70 +0,0 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Coffee.UIExtensions
|
||||
{
|
||||
public class GraphicConnector : BaseConnector
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
[UnityEditor.InitializeOnLoadMethod]
|
||||
#endif
|
||||
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
|
||||
private static void Init()
|
||||
{
|
||||
AddConnector(new GraphicConnector());
|
||||
}
|
||||
|
||||
protected override int priority
|
||||
{
|
||||
get { return 0; }
|
||||
}
|
||||
|
||||
public override Material GetMaterial(Graphic graphic)
|
||||
{
|
||||
return graphic ? graphic.material : null;
|
||||
}
|
||||
|
||||
public override void SetMaterial(Graphic graphic, Material material)
|
||||
{
|
||||
if (graphic)
|
||||
graphic.material = material;
|
||||
}
|
||||
|
||||
public override AdditionalCanvasShaderChannels extraChannel
|
||||
{
|
||||
get { return AdditionalCanvasShaderChannels.TexCoord1; }
|
||||
}
|
||||
|
||||
public override Shader FindShader(string shaderName)
|
||||
{
|
||||
return Shader.Find("Hidden/" + shaderName);
|
||||
}
|
||||
|
||||
protected override bool IsValid(Graphic graphic)
|
||||
{
|
||||
return graphic;
|
||||
}
|
||||
|
||||
public override void SetVerticesDirty(Graphic graphic)
|
||||
{
|
||||
if (graphic)
|
||||
graphic.SetVerticesDirty();
|
||||
}
|
||||
|
||||
public override void SetMaterialDirty(Graphic graphic)
|
||||
{
|
||||
if (graphic)
|
||||
graphic.SetMaterialDirty();
|
||||
}
|
||||
|
||||
public override bool IsText(Graphic graphic)
|
||||
{
|
||||
return graphic && graphic is Text;
|
||||
}
|
||||
|
||||
public override void SetExtraChannel(ref UIVertex vertex, Vector2 value)
|
||||
{
|
||||
vertex.uv1 = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,14 +4,15 @@ using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
using UnityEditor;
|
||||
|
||||
namespace Coffee.UIExtensions
|
||||
namespace Coffee.UIEffects
|
||||
{
|
||||
public static class ImportSampleMenu_UIEffect
|
||||
public static class ImportSampleMenu
|
||||
{
|
||||
[MenuItem("Assets/Samples/Import UIEffect Sample")]
|
||||
private static void ImportSample()
|
||||
private const string jsonGuid = "546af75b6221c4768be79d67c9cea1fb";
|
||||
|
||||
[MenuItem("Assets/Samples/UIEffect/Import Demo")]
|
||||
private static void ImportDemo()
|
||||
{
|
||||
const string jsonGuid = "546af75b6221c4768be79d67c9cea1fb";
|
||||
ImportSample(jsonGuid, "Demo");
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Coffee.UIExtensions.Editors
|
||||
namespace Coffee.UIEffects.Editors
|
||||
{
|
||||
/// <summary>
|
||||
/// Changes in this scope cause the graphic's material to be dirty.
|
||||
|
||||
@@ -5,7 +5,7 @@ using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Coffee.UIExtensions.Editors
|
||||
namespace Coffee.UIEffects.Editors
|
||||
{
|
||||
/// <summary>
|
||||
/// UIEffect editor.
|
||||
|
||||
@@ -4,7 +4,7 @@ using UnityEngine;
|
||||
using System.Linq;
|
||||
using System;
|
||||
|
||||
namespace Coffee.UIExtensions.Editors
|
||||
namespace Coffee.UIEffects.Editors
|
||||
{
|
||||
/// <summary>
|
||||
/// UIEffect editor.
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Coffee.UIExtensions.Editors
|
||||
namespace Coffee.UIEffects.Editors
|
||||
{
|
||||
/// <summary>
|
||||
/// UIEffect editor.
|
||||
|
||||
@@ -3,7 +3,7 @@ using UnityEditorInternal;
|
||||
using UnityEngine;
|
||||
using System.Linq;
|
||||
|
||||
namespace Coffee.UIExtensions.Editors
|
||||
namespace Coffee.UIEffects.Editors
|
||||
{
|
||||
/// <summary>
|
||||
/// UIEffect editor.
|
||||
@@ -50,4 +50,4 @@ namespace Coffee.UIExtensions.Editors
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
using UnityEditorInternal;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Coffee.UIExtensions.Editors
|
||||
namespace Coffee.UIEffects.Editors
|
||||
{
|
||||
/// <summary>
|
||||
/// UIShadow editor.
|
||||
|
||||
@@ -3,7 +3,7 @@ using UnityEditorInternal;
|
||||
using UnityEngine;
|
||||
using System.Linq;
|
||||
|
||||
namespace Coffee.UIExtensions.Editors
|
||||
namespace Coffee.UIEffects.Editors
|
||||
{
|
||||
/// <summary>
|
||||
/// UIEffect editor.
|
||||
@@ -99,4 +99,4 @@ namespace Coffee.UIExtensions.Editors
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ using UnityEditorInternal;
|
||||
using UnityEngine;
|
||||
using System.Linq;
|
||||
|
||||
namespace Coffee.UIExtensions.Editors
|
||||
namespace Coffee.UIEffects.Editors
|
||||
{
|
||||
/// <summary>
|
||||
/// UIEffect editor.
|
||||
@@ -112,4 +112,4 @@ namespace Coffee.UIExtensions.Editors
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Coffee.UIExtensions
|
||||
namespace Coffee.UIEffects
|
||||
{
|
||||
/// <summary>
|
||||
/// Blur effect mode.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Coffee.UIExtensions
|
||||
namespace Coffee.UIEffects
|
||||
{
|
||||
/// <summary>
|
||||
/// Color effect mode.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Coffee.UIExtensions
|
||||
namespace Coffee.UIEffects
|
||||
{
|
||||
/// <summary>
|
||||
/// Area for effect.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Coffee.UIExtensions
|
||||
namespace Coffee.UIEffects
|
||||
{
|
||||
/// <summary>
|
||||
/// Effect mode.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Coffee.UIExtensions
|
||||
namespace Coffee.UIEffects
|
||||
{
|
||||
/// <summary>
|
||||
/// Shadow effect style.
|
||||
|
||||
@@ -7,7 +7,7 @@ using System.Text;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
|
||||
namespace Coffee.UIExtensions
|
||||
namespace Coffee.UIEffects
|
||||
{
|
||||
/// <summary>
|
||||
/// Dissolve effect for uGUI.
|
||||
@@ -196,6 +196,11 @@ namespace Coffee.UIExtensions
|
||||
get { return s_ParamTex; }
|
||||
}
|
||||
|
||||
EffectPlayer effectPlayer
|
||||
{
|
||||
get { return m_Player ?? (m_Player = new EffectPlayer()); }
|
||||
}
|
||||
|
||||
public override Hash128 GetMaterialHash(Material material)
|
||||
{
|
||||
if (!isActiveAndEnabled || !material || !material.shader)
|
||||
@@ -213,7 +218,7 @@ namespace Coffee.UIExtensions
|
||||
|
||||
public override void ModifyMaterial(Material newMaterial, Graphic graphic)
|
||||
{
|
||||
var connector = BaseConnector.FindConnector(graphic);
|
||||
var connector = GraphicConnector.FindConnector(graphic);
|
||||
newMaterial.shader = connector.FindShader("UIDissolve");
|
||||
SetShaderVariants(newMaterial, m_ColorMode);
|
||||
|
||||
@@ -288,7 +293,7 @@ namespace Coffee.UIExtensions
|
||||
/// </summary>
|
||||
public void Play(bool reset = true)
|
||||
{
|
||||
_player.Play(reset);
|
||||
effectPlayer.Play(reset);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -296,24 +301,19 @@ namespace Coffee.UIExtensions
|
||||
/// </summary>
|
||||
public void Stop(bool reset = true)
|
||||
{
|
||||
_player.Stop(reset);
|
||||
effectPlayer.Stop(reset);
|
||||
}
|
||||
|
||||
protected override void OnEnable()
|
||||
{
|
||||
base.OnEnable();
|
||||
_player.OnEnable((f) => effectFactor = m_Reverse ? 1f - f : f);
|
||||
effectPlayer.OnEnable((f) => effectFactor = m_Reverse ? 1f - f : f);
|
||||
}
|
||||
|
||||
protected override void OnDisable()
|
||||
{
|
||||
base.OnDisable();
|
||||
_player.OnDisable();
|
||||
}
|
||||
|
||||
EffectPlayer _player
|
||||
{
|
||||
get { return m_Player ?? (m_Player = new EffectPlayer()); }
|
||||
effectPlayer.OnDisable();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ using UnityEditor;
|
||||
|
||||
#endif
|
||||
|
||||
namespace Coffee.UIExtensions
|
||||
namespace Coffee.UIEffects
|
||||
{
|
||||
/// <summary>
|
||||
/// UIEffect.
|
||||
@@ -192,7 +192,7 @@ namespace Coffee.UIExtensions
|
||||
|
||||
public override void ModifyMaterial(Material newMaterial, Graphic graphic)
|
||||
{
|
||||
var connector = BaseConnector.FindConnector(graphic);
|
||||
var connector = GraphicConnector.FindConnector(graphic);
|
||||
|
||||
newMaterial.shader = connector.FindShader("UIEffect");
|
||||
SetShaderVariants(newMaterial, m_EffectMode, m_ColorMode, m_BlurMode,
|
||||
|
||||
@@ -3,7 +3,7 @@ using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Coffee.UIExtensions
|
||||
namespace Coffee.UIEffects
|
||||
{
|
||||
[DisallowMultipleComponent]
|
||||
[AddComponentMenu("UI/UIEffects/UIFlip", 102)]
|
||||
@@ -16,7 +16,7 @@ namespace Coffee.UIExtensions
|
||||
private bool m_Veritical = false;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether this <see cref="Coffee.UIExtensions.UIFlip"/> should be flipped horizontally.
|
||||
/// Gets or sets a value indicating whether this <see cref="Coffee.UIEffects.UIFlip"/> should be flipped horizontally.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if be flipped horizontally; otherwise, <c>false</c>.</value>
|
||||
public bool horizontal
|
||||
@@ -31,7 +31,7 @@ namespace Coffee.UIExtensions
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether this <see cref="Coffee.UIExtensions.UIFlip"/> should be flipped vertically.
|
||||
/// Gets or sets a value indicating whether this <see cref="Coffee.UIEffects.UIFlip"/> should be flipped vertically.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if be flipped horizontally; otherwise, <c>false</c>.</value>
|
||||
public bool vertical
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Coffee.UIExtensions
|
||||
namespace Coffee.UIEffects
|
||||
{
|
||||
/// <summary>
|
||||
/// UIGradient.
|
||||
|
||||
@@ -4,7 +4,7 @@ using UnityEngine.Serialization;
|
||||
using UnityEngine.UI;
|
||||
|
||||
|
||||
namespace Coffee.UIExtensions
|
||||
namespace Coffee.UIEffects
|
||||
{
|
||||
/// <summary>
|
||||
/// HSV Modifier.
|
||||
@@ -127,7 +127,7 @@ namespace Coffee.UIExtensions
|
||||
|
||||
public override void ModifyMaterial(Material newMaterial, Graphic graphic)
|
||||
{
|
||||
var connector = BaseConnector.FindConnector(graphic);
|
||||
var connector = GraphicConnector.FindConnector(graphic);
|
||||
|
||||
newMaterial.shader = connector.FindShader("UIHsvModifier");
|
||||
paramTex.RegisterMaterial(newMaterial);
|
||||
|
||||
@@ -10,7 +10,7 @@ using UnityEditor;
|
||||
|
||||
#endif
|
||||
|
||||
namespace Coffee.UIExtensions
|
||||
namespace Coffee.UIEffects
|
||||
{
|
||||
/// <summary>
|
||||
/// UIEffect.
|
||||
|
||||
@@ -5,7 +5,7 @@ using UnityEngine.Serialization;
|
||||
using UnityEngine.UI;
|
||||
using System.Collections;
|
||||
|
||||
namespace Coffee.UIExtensions
|
||||
namespace Coffee.UIEffects
|
||||
{
|
||||
/// <summary>
|
||||
/// UIEffect.
|
||||
@@ -153,13 +153,18 @@ namespace Coffee.UIExtensions
|
||||
get { return s_ParamTex; }
|
||||
}
|
||||
|
||||
EffectPlayer effectPlayer
|
||||
{
|
||||
get { return m_Player ?? (m_Player = new EffectPlayer()); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This function is called when the object becomes enabled and active.
|
||||
/// </summary>
|
||||
protected override void OnEnable()
|
||||
{
|
||||
base.OnEnable();
|
||||
_player.OnEnable(f => effectFactor = f);
|
||||
effectPlayer.OnEnable(f => effectFactor = f);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -168,7 +173,7 @@ namespace Coffee.UIExtensions
|
||||
protected override void OnDisable()
|
||||
{
|
||||
base.OnDisable();
|
||||
_player.OnDisable();
|
||||
effectPlayer.OnDisable();
|
||||
}
|
||||
|
||||
|
||||
@@ -187,7 +192,7 @@ namespace Coffee.UIExtensions
|
||||
|
||||
public override void ModifyMaterial(Material newMaterial, Graphic graphic)
|
||||
{
|
||||
var connector = BaseConnector.FindConnector(graphic);
|
||||
var connector = GraphicConnector.FindConnector(graphic);
|
||||
|
||||
newMaterial.shader = connector.FindShader("UIShiny");
|
||||
paramTex.RegisterMaterial(newMaterial);
|
||||
@@ -233,7 +238,7 @@ namespace Coffee.UIExtensions
|
||||
/// </summary>
|
||||
public void Play(bool reset = true)
|
||||
{
|
||||
_player.Play(reset);
|
||||
effectPlayer.Play(reset);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -241,7 +246,7 @@ namespace Coffee.UIExtensions
|
||||
/// </summary>
|
||||
public void Stop(bool reset = true)
|
||||
{
|
||||
_player.Stop(reset);
|
||||
effectPlayer.Stop(reset);
|
||||
}
|
||||
|
||||
protected override void SetEffectParamsDirty()
|
||||
@@ -269,10 +274,5 @@ namespace Coffee.UIExtensions
|
||||
|| _lastEffectArea != m_EffectArea)
|
||||
SetVerticesDirty();
|
||||
}
|
||||
|
||||
EffectPlayer _player
|
||||
{
|
||||
get { return m_Player ?? (m_Player = new EffectPlayer()); }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
|
||||
namespace Coffee.UIExtensions
|
||||
namespace Coffee.UIEffects
|
||||
{
|
||||
/// <summary>
|
||||
/// Dissolve effect for uGUI.
|
||||
|
||||
@@ -3,7 +3,7 @@ using UnityEngine.UI;
|
||||
using UnityEngine.Serialization;
|
||||
using System;
|
||||
|
||||
namespace Coffee.UIExtensions
|
||||
namespace Coffee.UIEffects
|
||||
{
|
||||
/// <summary>
|
||||
/// Transition effect.
|
||||
@@ -192,13 +192,18 @@ namespace Coffee.UIExtensions
|
||||
set { m_PassRayOnHidden = value; }
|
||||
}
|
||||
|
||||
EffectPlayer effectPlayer
|
||||
{
|
||||
get { return m_Player ?? (m_Player = new EffectPlayer()); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Show transition.
|
||||
/// </summary>
|
||||
public void Show(bool reset = true)
|
||||
{
|
||||
_player.loop = false;
|
||||
_player.Play(reset, f => effectFactor = f);
|
||||
effectPlayer.loop = false;
|
||||
effectPlayer.Play(reset, f => effectFactor = f);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -206,8 +211,8 @@ namespace Coffee.UIExtensions
|
||||
/// </summary>
|
||||
public void Hide(bool reset = true)
|
||||
{
|
||||
_player.loop = false;
|
||||
_player.Play(reset, f => effectFactor = 1 - f);
|
||||
effectPlayer.loop = false;
|
||||
effectPlayer.Play(reset, f => effectFactor = 1 - f);
|
||||
}
|
||||
|
||||
|
||||
@@ -228,7 +233,7 @@ namespace Coffee.UIExtensions
|
||||
|
||||
public override void ModifyMaterial(Material newMaterial, Graphic graphic)
|
||||
{
|
||||
var connector = BaseConnector.FindConnector(graphic);
|
||||
var connector = GraphicConnector.FindConnector(graphic);
|
||||
newMaterial.shader = connector.FindShader("UITransition");
|
||||
SetShaderVariants(newMaterial, m_EffectMode);
|
||||
|
||||
@@ -277,8 +282,8 @@ namespace Coffee.UIExtensions
|
||||
protected override void OnEnable()
|
||||
{
|
||||
base.OnEnable();
|
||||
_player.OnEnable(null);
|
||||
_player.loop = false;
|
||||
effectPlayer.OnEnable(null);
|
||||
effectPlayer.loop = false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -287,7 +292,7 @@ namespace Coffee.UIExtensions
|
||||
protected override void OnDisable()
|
||||
{
|
||||
base.OnDisable();
|
||||
_player.OnDisable();
|
||||
effectPlayer.OnDisable();
|
||||
}
|
||||
|
||||
protected override void SetEffectParamsDirty()
|
||||
@@ -323,10 +328,5 @@ namespace Coffee.UIExtensions
|
||||
if (_lastKeepAspectRatio != m_KeepAspectRatio)
|
||||
SetVerticesDirty();
|
||||
}
|
||||
|
||||
EffectPlayer _player
|
||||
{
|
||||
get { return m_Player ?? (m_Player = new EffectPlayer()); }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: deded9e09f6e644228da395138e4f232
|
||||
folderAsset: yes
|
||||
timeCreated: 1527743712
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"name": "com.coffee.ui-effect",
|
||||
"displayName": "UIEffect",
|
||||
"description": "UIEffect provides visual effect components for Unity UI.\nLet's decorate your UI with effects!",
|
||||
"version": "4.0.0-preview.4",
|
||||
"displayName": "UI Effect",
|
||||
"description": "UI Effect provides visual effect components for Unity UI.\nLet's decorate your UI with effects!",
|
||||
"version": "4.0.0-preview.8",
|
||||
"unity": "2017.1",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
@@ -14,5 +14,16 @@
|
||||
"email": "sakai861104@gmail.com",
|
||||
"url": "https://github.com/mob-sakai"
|
||||
},
|
||||
"dependencies": {}
|
||||
"dependencies": {},
|
||||
"keywords": [
|
||||
"ui",
|
||||
"effect"
|
||||
],
|
||||
"samples": [
|
||||
{
|
||||
"displayName": "Demo",
|
||||
"description": "UI Effect Demo",
|
||||
"path": "Samples~/Demo"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -37,8 +37,7 @@ GraphicsSettings:
|
||||
- {fileID: 10782, guid: 0000000000000000f000000000000000, type: 0}
|
||||
- {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0}
|
||||
- {fileID: 17000, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_PreloadedShaders:
|
||||
- {fileID: 20000000, guid: 73036fa061ee340dcb3c04b9d8872e66, type: 2}
|
||||
m_PreloadedShaders: []
|
||||
m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000,
|
||||
type: 0}
|
||||
m_CustomRenderPipeline: {fileID: 0}
|
||||
|
||||
@@ -1,25 +1,45 @@
|
||||
(DEVELOP) UIEffect
|
||||
(DEVELOP BRANCH)
|
||||
===
|
||||
|
||||
**NOTE: This branch is for development purposes only.**
|
||||
**To use a released package, see [Releases page](https://github.com/mob-sakai/UIEffect/releases) or [default branch](https://github.com/mob-sakai/UIEffect).**
|
||||
**NOTE: To use a released package, see [Releases page](/../../releases) or [default branch](/../..).**
|
||||
|
||||
<br><br><br>
|
||||
|
||||
## How to develop this package
|
||||
## How to contribute this repository
|
||||
|
||||
1. Fork the repository and create your branch from `develop`
|
||||
3. Open the project and click `Open Sesame > Develop Mode`
|
||||
4. Develop the package
|
||||
5. Test the package with test runnner (`Window > Generals > Test Runner`)
|
||||
6. Commit with a message based on [Angular Commit Message Conventions](https://gist.github.com/stephenparish/9941e89d80e2bc58a153)
|
||||
7. Create a pull request on GitHub
|
||||
See [CONTRIBUTING.md](/../../blob/develop/CONTRIBUTING.md) and [CODE_OF_CONDUCT.md](/../../blob/develop/CODE_OF_CONDUCT.md).
|
||||
|
||||
For details, see [CONTRIBUTING](https://github.com/mob-sakai/UIEffect/blob/upm/CONTRIBUTING.md) and [CODE_OF_CONDUCT](https://github.com/mob-sakai/UIEffect/blob/upm/CODE_OF_CONDUCT.md).
|
||||
<br><br><br>
|
||||
|
||||
## How to develop
|
||||
|
||||
## How to release this package
|
||||
1. Fork this repository.
|
||||
1. Clone the forked repository to local.
|
||||
1. Create your branch from `develop` branch.
|
||||
1. Develop the package.
|
||||
1. Commit with a message based on [Conventional Commits](https://www.conventionalcommits.org/).
|
||||
1. Fill out the description, link any related issues and submit your pull request.
|
||||
**NOTE: Create a pull request to merge into `develop` branch**
|
||||
|
||||
When you push to `preview`, `master` or `v{major}.x` branch, this package is automatically released by GitHub Action.
|
||||
### Committed messages in the most common cases
|
||||
|
||||
| Case | Commit message|
|
||||
| -- | -- |
|
||||
| Added a new feature | feat: add new feature |
|
||||
| Added a suggested feature #999 | feat: add new feature<br>Close #999 |
|
||||
| Fixed a bug | fix: a problem |
|
||||
| Fixed a reported bug #999 | fix: a problem<br>Close #999 |
|
||||
| Added features that include breaking changes | feat: add new feature<br><br>BREAKING CHANGE: Details of the changes |
|
||||
|
||||
<br><br><br>
|
||||
|
||||
## How to release
|
||||
|
||||
**NOTE: The contributor does not need to perform a release operation.**
|
||||
|
||||
When you push to `preview`, `master` or `v1.x` branch, this package is automatically released by GitHub Action.
|
||||
Internally, a npm tool [semantic-release](https://semantic-release.gitbook.io/semantic-release/) is used to release.
|
||||
|
||||
* Update version in `package.json`
|
||||
* Update CHANGELOG.md
|
||||
|
||||
Generated
+725
-766
File diff suppressed because it is too large
Load Diff
+4
-4
@@ -3,11 +3,11 @@
|
||||
"description": "To release upm package, execute `npm run release` on bash.",
|
||||
"version": "1.0.0",
|
||||
"devDependencies": {
|
||||
"git-snapshot": "^2.2.0",
|
||||
"@semantic-release/changelog": "^5.0.0",
|
||||
"@semantic-release/git": "^9.0.0",
|
||||
"@semantic-release/changelog": "^5.0.1",
|
||||
"@semantic-release/exec": "^5.0.0",
|
||||
"semantic-release": "^17.0.2"
|
||||
"@semantic-release/git": "^9.0.0",
|
||||
"git-snapshot": "^2.2.1",
|
||||
"semantic-release": "^17.0.8"
|
||||
},
|
||||
"scripts": {
|
||||
"release": "npm ci && cd `find Packages/*/.releaserc -exec dirname {} +` && npx semantic-release",
|
||||
|
||||
Reference in New Issue
Block a user