猫史档案馆


CFT猫鱼树

CFT猫鱼树

Lv.1

各位,我退坑了,转型做音乐了,在网易搜索"Chainlean_From_Tristan",关注一下吧

获赞:2282收藏:1500浏览:89893作品收藏:1276

签名:考古 为每一个我衷心热爱的兴趣爱好而喝彩!常言道:“知足常乐”,像这样的,就是我和我的编程猫! 有学习,有编程,学玩两不误 不坑弃作品如下: https://shequ.codemao.cn/work/46534168《笑死人不偿命2》 https://shequ.codemao.cn/work/44716439《方块的审判》 https://shequ.codemao.cn/work/42056642《auroraUI》

回复帖子评论
上一页2 页 / 共 3下一页

全天哀告!让我们用灰色的头像为英雄致敬吧! 中回复

大家可以换回来了!祝愿逝者永远安息!万分感谢大家!

2020-04-05T11:50:31 点赞:0

我想要加入 中回复

好!

2020-04-08T18:57:51 点赞:0

代码岛,世界之巅与最美的夜 中回复

厉害!好!

2020-04-08T19:01:21 点赞:0

室长我们没有副室长嘛? 中回复

有了lia

2020-04-08T19:01:43 点赞:0

申请加入逗逼工作室 中回复

发这个没必要吧,不过我也同意了,那,来吧

2020-04-09T07:53:40 点赞:0

谁能告诉我这两个家伙是来干什么的? 中回复

这是哪个地图的

2020-04-09T08:50:57 点赞:0

我想担任副室长 中回复

我同意!可以

2020-04-09T09:49:35 点赞:0

市长可以喵吗 中回复

可以,我同意

2020-04-09T09:50:51 点赞:1

【dobieStudio】Lv2奖励名单 中回复

大家宅吗,我来公布奖励名单:

2020-04-09T10:22:45 点赞:0

【dobieStudio】Lv2奖励名单 中回复

加薪没份?更多的奖励,请多多投稿QWQ

一周累计投稿1至2个作品,获得50金币

累积投稿3个或3个以上,但没被我审核过得,可获得100金币

累计投大于等于3个作品,且室长审核过的优秀作品(500点击量10个点赞或收藏)可获得150金币

还在等什,赶快来投稿赚金币吧!

2020-04-09T10:33:08 点赞:0

我们要改头像啦! 中回复

本人抠图Lv66,来个小调查,看看你们会不会抠图。。。

2020-04-13T00:18:17 点赞:0

我想要加入 中回复

不好意思,您还没过门槛,我们的门槛是500浏览,10点赞

2020-04-13T15:11:12 点赞:0

我想要加入 中回复

不过,就是没人气了一点,但是,哎,不忍心啊,好吧,破例一次。。。同意!

2020-04-14T09:35:39 点赞:0

我想要加入 中回复

center_image

太大了,所以糊

2020-04-14T09:48:19 点赞:0

编程猫网页源代码来啦 中回复

肮脏的黑客,我比你肮脏。。。

2020-04-15T19:29:12 点赞:0

免费来测联机!!!!! 中回复

我也会了,好不容易

2020-04-15T19:30:57 点赞:0

打字慢的相册: 2 迎春 中回复

这是哪的地图?我要链接(滑了个老头稽)

2020-04-15T23:34:16 点赞:0

工作是管理功能上线啦! 中回复

center_image

center_image

2020-04-16T15:37:59 点赞:0

编辑器今日开始发放!【代码岛3.0代码编辑器更新!】JS萌新秒上手 中回复

都不开放给我们玩,哎,光说有个啥用

2020-04-18T17:23:56 点赞:0

只是试一下 中回复

哪位大佬帮我研究一下:

css

* {
	border: 0;
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}
:root {
	font-size: calc(16px + (48 - 16)*(100vw - 320px)/(2560 - 320));
}
body, button {
	font: 1em/1.5 "Hind", sans-serif;
}
body {
	background: #272727; 
	display: flex;
	height: 100vh;
	overflow: hidden;
}
button {
	background: #255ff4;
	border-radius: 0.2em;
	color: #fff;
	cursor: pointer;
	margin: auto;
	padding: 0.5em 1em;
	transition: background .15s linear, color .15s linear;
}
button:focus, button:hover {
	background: #0b46da;
}
button:focus {
	outline: transparent;
}
button::-moz-focus-inner {
	border: 0;
}
button:active {
	transform: translateY(0.1em);
}
.exploding, .exploding:focus, .exploding:hover {
	background: transparent;
	color: transparent;
}
.exploding {
	pointer-events: none;
	position: relative;
	will-change: transform;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
}
.particle {
	position: absolute;
	top: 0;
	left: 0;
}
.particle--debris {
	background: #255ff4;
}
.particle--fire {
	border-radius: 50%;
}

@media (prefers-color-scheme: dark) {
	body {
		background: #17181c;
	}
}

javascript:

document.addEventListener("DOMContentLoaded",() => {
	let button = new ExplosiveButton("button");
});

class ExplosiveButton {
	constructor(el) {
		this.element = document.querySelector(el);
		this.width = 0;
		this.height = 0;
		this.centerX = 0;
		this.centerY = 0;
		this.pieceWidth = 0;
		this.pieceHeight = 0;
		this.piecesX = 9;
		this.piecesY = 4;
		this.duration = 1000;

		this.updateDimensions();
		window.addEventListener("resize",this.updateDimensions.bind(this));

		if (document.body.animate)
			this.element.addEventListener("click",this.explode.bind(this,this.duration));
	}
	updateDimensions() {
		this.width = pxToEm(this.element.offsetWidth);
		this.height = pxToEm(this.element.offsetHeight);
		this.centerX = this.width / 2;
		this.centerY = this.height / 2;
		this.pieceWidth = this.width / this.piecesX;
		this.pieceHeight = this.height / this.piecesY;
	}
	explode(duration) {
		let explodingState = "exploding";

		if (!this.element.classList.contains(explodingState)) {
			this.element.classList.add(explodingState);

			this.createParticles("fire",25,duration);
			this.createParticles("debris",this.piecesX * this.piecesY,duration);
		}
	}
	createParticles(kind,count,duration) {
		for (let c = 0; c < count; ++c) {
			let r = randomFloat(0.25,0.5),
				diam = r * 2,
				xBound = this.centerX - r,
				yBound = this.centerY - r,
				easing = "cubic-bezier(0.15,0.5,0.5,0.85)";

			if (kind == "fire") {
				let x = this.centerX + randomFloat(-xBound,xBound),
					y = this.centerY + randomFloat(-yBound,yBound),
					a = calcAngle(this.centerX,this.centerY,x,y),
					dist = randomFloat(1,5);

				new FireParticle(this.element,x,y,diam,diam,a,dist,duration,easing);

			} else if (kind == "debris") {
				let x = (this.pieceWidth / 2) + this.pieceWidth * (c % this.piecesX),
					y = (this.pieceHeight / 2) + this.pieceHeight * Math.floor(c / this.piecesX),
					a = calcAngle(this.centerX,this.centerY,x,y),
					dist = randomFloat(4,7);

				new DebrisParticle(this.element,x,y,this.pieceWidth,this.pieceHeight,a,dist,duration,easing);
			}
		}
	}
}
class Particle {
	constructor(parent,x,y,w,h,angle,distance = 1,className2 = "") {
		let width = `${w}em`,
			height = `${h}em`,
			adjustedAngle = angle + Math.PI/2;

		this.div = document.createElement("div");
		this.div.className = "particle";

		if (className2)
			this.div.classList.add(className2);

		this.div.style.width = width;
		this.div.style.height = height;

		parent.appendChild(this.div);

		this.s = {
			x: x - w/2,
			y: y - h/2
		};
		this.d = {
			x: this.s.x + Math.sin(adjustedAngle) * distance,
			y: this.s.y - Math.cos(adjustedAngle) * distance
		};
	}
	runSequence(el,keyframesArray,duration = 1e3,easing = "linear",delay = 0) {
		let animation = el.animate(keyframesArray, {
				duration: duration,
				easing: easing,
				delay: delay
			}
		);
		animation.onfinish = () => {
			let parentCL = el.parentElement.classList;

			el.remove();

			if (!document.querySelector(".particle"))
				parentCL.remove(...parentCL);
		};
	}
}
class DebrisParticle extends Particle {
	constructor(parent,x,y,w,h,angle,distance,duration,easing) {
		super(parent,x,y,w,h,angle,distance,"particle--debris");
		
		let maxAngle = 1080,
			rotX = randomInt(0,maxAngle),
			rotY = randomInt(0,maxAngle),
			rotZ = randomInt(0,maxAngle);

		this.runSequence(this.div,[
			{
				opacity: 1,
				transform: `translate(${this.s.x}em,${this.s.y}em) rotateX(0) rotateY(0) rotateZ(0)`
			},
			{
				opacity: 1,
			},
			{
				opacity: 1,
			},
			{
				opacity: 1,
			},
			{
				opacity: 0,
				transform: `translate(${this.d.x}em,${this.d.y}em) rotateX(${rotX}deg) rotateY(${rotY}deg) rotateZ(${rotZ}deg)`
			}
		],randomInt(duration/2,duration),easing);
	}
}
class FireParticle extends Particle {
	constructor(parent,x,y,w,h,angle,distance,duration,easing) {
		super(parent,x,y,w,h,angle,distance,"particle--fire");

		let sx = this.s.x,
			sy = this.s.y,
			dx = this.d.x,
			dy = this.d.y;

		this.runSequence(this.div,[
			{
				background: "hsl(60,100%,100%)",
				transform: `translate(${sx}em,${sy}em) scale(1)`
			},
			{
				background: "hsl(60,100%,80%)",
				transform: `translate(${sx + (dx - sx)*0.25}em,${sy + (dy - sy)*0.25}em) scale(4)`
			},
			{
				background: "hsl(40,100%,60%)",
				transform: `translate(${sx + (dx - sx)*0.5}em,${sy + (dy - sy)*0.5}em) scale(7)`
			},
			{
				background: "hsl(20,100%,40%)"
			},
			{
				background: "hsl(0,0%,20%)",
				transform: `translate(${dx}em,${dy}em) scale(0)`
			}
		],randomInt(duration/2,duration),easing);
	}
}
function calcAngle(x1,y1,x2,y2) {
	let opposite = y2 - y1,
		adjacent = x2 - x1,
		angle = Math.atan(opposite / adjacent);

	if (adjacent < 0)
		angle += Math.PI;

	if (isNaN(angle))
		angle = 0;

	return angle;
}
function propertyUnitsStripped(el,property,unit) {
	let cs = window.getComputedStyle(el),
		valueRaw = cs.getPropertyValue(property),
		value = 喵alueRaw.substr(0,valueRaw.indexOf(unit));

	return value;
}
function pxToEm(px) {
	let el = document.querySelector(":root");
	return px / propertyUnitsStripped(el,"font-size","px");
}
function randomFloat(min,max) {
	return Math.random() * (max - min) + min;
}
function randomInt(min,max) {
	return Math.round(Math.random() * (max - min)) + min;
}

2020-04-18T17:27:09 点赞:0

【公告】申诉流程指南 中回复

我上次要和人家合作,谁知就一句话也能被举报成“无意义刷屏”!

客服喵,你做事就是这么没头没脑吗?

2020-04-20T17:06:25 点赞:0

各位,我在编程猫先告一段落了~ 中回复

哎,太太太忙了,但我又不忍心解散啊,以后投稿的事您帮我监督,成员也帮我加,大伙们,暑假见~

2020-04-20T19:49:52 点赞:0

写一个关于我们工作室的小说 中回复

我欣赏!

2020-04-29T16:59:27 点赞:0

【限时福利】NEMO开学季,新生入学瓜分万元助学金! 中回复

一万个钱的理由~~~令人十分痛心~~~mo——ny——

2020-05-02T00:03:22 点赞:0

打字慢的相册: 3 错位 中回复

好!这拍的帅(为啥老用这皮肤。。。)

2020-05-02T02:26:10 点赞:0

我小说的人物规划 中回复

我,猹?我。。我我我我。。我我我我我我我不背这锅。。。

2020-05-02T02:27:42 点赞:0

我小说的人物规划 中回复

小馒头、草砂纸、宅龙、马婷婷、羊爸谁来当啊?毕竟我的工作室里有些人您可能不熟吧。。。

2020-05-02T02:36:13 点赞:0

我小说的人物规划 中回复

虽然如此,我毕竟,是,只,彩虹羊——Swap!Asriel

2020-05-02T02:37:37 点赞:0

我在ChasoTale的Sans!!! 中回复

这个cross。。。

2020-05-03T01:08:24 点赞:0

抄袭的事情 中回复

别把百度的作文抄砸吗一大截鸭。。。(((φ(◎ロ◎;)φ)))晕

2020-05-03T01:09:23 点赞:0