zoukankan      html  css  js  c++  java
  • WebGL_0014:改变相机的刷新颜色

    1,

    CameraColorShift.prototype.OnColorShift = function(a) {
        switch (a) {
        case 0:
            targetColor = this.colorTable_1;
            break;
        case 1:
            targetColor = this.colorTable_2;
            break;
        case 2:
            targetColor = this.colorTable_3;
            break;
        case 3:
            targetColor = this.colorTable_4;
            break;
        case 4:
            targetColor = this.colorTable_5;
            break;
        default:
            targetColor = this.colorTable_1
        }
        this.lerpTimer = 0
    };
    CameraColorShift.prototype.LerpMatColorTo = function(a, b) {
        return a.r += (b.r - a.r) * this.colorLerpSpeed, a.g += (b.g - a.g) * this.colorLerpSpeed, a.b += (b.b - a.b) * this.colorLerpSpeed, a
    };
    CameraColorShift.prototype.update = function(a) {
        if (this.lerpTimer < this.lerpTimeTotal) {
            var b;
            b = this.entity.camera.clearColor;
            b = new pc.Color(b.r, b.g, b.b);
            b = this.LerpMatColorTo(b, targetColor);
            this.entity.camera.clearColor = new pc.Color(b.r, b.g, b.b);
            this.lerpTimer += a
        }
    };
    CameraColorShift.prototype.swap = function(a) {};

    琥珀君的博客
  • 相关阅读:
    python
    car-travel project
    数据库
    kafka笔记
    cloudera笔记
    上课笔记
    structured streaming
    SparkSQL
    流数据
    spark厦门大学
  • 原文地址:https://www.cnblogs.com/eliteboy/p/13499097.html
Copyright © 2011-2022 走看看