Skip to content
This repository was archived by the owner on Mar 6, 2022. It is now read-only.
This repository was archived by the owner on Mar 6, 2022. It is now read-only.

是否需要光敏性癫痫警告? #22

@nkh0472

Description

@nkh0472

这个项目目前在快速切换场景时,偶尔会有快速闪过的高亮度白屏。
本现象通过快速滑动鼠标或触摸可稳定复现,现象在本项目各版本、及原作者网站均有发生,原因不明。或许是切换background-color的函数有bug。
不知是否需要加上光敏性癫痫警告。


背景颜色相关的函数内容(已反混淆):

this.play = function() {
	!function() {
		/** @type {number} */
		_turnType = turnType;
		var iLetter = test();
		c = letters[iLetter];
		$("#about").css("background-color", "#" + c.toString(16));
		if (Math.random() < .3) {
			w.flash(index);
		}
		auth0_time = iLetter;
		g.clear();
		/** @type {boolean} */
		g.visible = true;
		/** @type {number} */
		index = container.children.length - 1 - Math.floor(2 * Math.random());
		container.setChildIndex(g, index);
		/** @type {boolean} */
		var v = Math.random() < .5;
		/** @type {number} */
		var b = Math.floor(4 * Math.random()) + 1;
		data.pos = {};
		/** @type {number} */
		var y = 0;
		if (v) {
			/** @type {number} */
			y = height / b;
			data.pos.b0 = {
				x : 0,
				y : 0
			};
			data.pos.b1 = {
				x : 0,
				y : height
			};
		} else {
			/** @type {number} */
			y = width / b;
			data.pos.b0 = {
				x : 0,
				y : 0
			};
			data.pos.b1 = {
				x : width,
				y : 0
			};
		}
		if (Math.random() < .5) {
			/** @type {number} */
			g.rotation = 0;
			/** @type {number} */
			g.x = 0;
			/** @type {number} */
			g.y = 0;
		} else {
			/** @type {number} */
			g.rotation = Math.PI;
			g.x = width;
			g.y = height;
		}
		/** @type {number} */
		var a = expected_dates = 0;
		for (; a <= b; a++) {
			var layout = {
				x : 0,
				y : 0
			};
			/** @type {number} */
			var yOffset = 0;
			if (0 != a && a != b) {
				/** @type {number} */
				yOffset = y / 4 * Math.random() - y / 8;
			}
			if (v) {
				/** @type {number} */
				layout.y = y * a + yOffset;
			} else {
				/** @type {number} */
				layout.x = y * a + yOffset;
			}
			data.pos["p" + a] = layout;
			var properties;
			/** @type {number} */
			var chargeTime = .4 * Math.random() + .3;
			/** @type {number} */
			expected_dates = 2;
			/** @type {({x: ?}|{y: ?})} */
			properties = v ? {
				x : width
			} : {
				y : height
			};
			gsap.to(data.pos["p" + a], chargeTime, properties);
		}
		/** @type {number} */
		data.progress = 0;
		gsap.to(data, expected_dates, {
			progress : 1,
			ease : Power0.easeNone,
			onUpdate : init,
			onComplete : callback
		});
	}();
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions