GithubHelp home page GithubHelp logo

mezz / cameracirclefade Goto Github PK

View Code? Open in Web Editor NEW

This project forked from paraself/cameracirclefade

1.0 2.0 0.0 648 KB

A simple circular wipe / fade in / fade out transition effect for Unity3D.

C# 88.47% GLSL 11.53%

cameracirclefade's Introduction

CameraCircleFade

A simple circular wipe / fade in / fade out transition effect for Unity3D.

一个非常简单的圆形遮罩转场特效,使用Unity3D的后期特效Shader编写。

screenshot

Usage / 用法:

// in one of your monobehaviour script
// you call the instance method .FadeIn for the main camera
// the main camera will start to fade in from black to clear
// 在任意的脚本里调用任何一个相机的实例方法.FadeIn就可以把场景由全黑变成清楚的啦。
public class MyTest : Monobehaviour {
  void Start () {
    Camera.main.FadeIn(5f);
  }
}

or you can do these / 或者也可以这么用:

// support many easing interpolation
// 支持十几种不同的平滑插值方式
Camera.main.FadeIn(10f, Easing.Type.CubicInOut);
// fade out as well
Camera.main.FadeOut(5f);

Anyway it's just a member function for any camera, very simple!

Camera#FadeIn (float duration, Easing.Type easing);
Camera#FadeOut (float duration, Easing.Type easing);

在这个代码里,能够学到简单入门的全屏特效的写法,还有c#扩展方法的使用,还有Coroutine的用法!

cameracirclefade's People

Contributors

paraself avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.