[ home / overboard ] [ soy / qa / raid / r ] [ craft ] [ int / pol ] [ a / an / asp / biz / mtv / r9k / tech / v / sude / x ] [ q / news / chive / rules / pass / bans / status ] [ wiki / booru / irc ]

A banner for soyjak.party

/soy/ - Soyjaks

2023 was 0.75 showers ago
Catalog
Email
Subject
Comment
File
Password (For file deletion.)

File: 3dgifmaker94222.gif šŸ“„ļøŽ (401.86 KB, 300x300) ImgOps

 ā„–15391734[Quote]

function animate(p5, props) {
const { mainImage, size, currentFrame, totalFrames, bgColor, featureValue } = props;

p5.background(bgColor);

const t = (currentFrame / totalFrames) * Math.PI * 2;
const speed = 0.5 + (featureValue / 100) * 1.5;
const trailLength = Math.floor(5 + (featureValue / 100) * 15);

const biggestImageDimension = Math.max(mainImage.width, mainImage.height);
const scaleFactor = (size / biggestImageDimension) * 0.5;

// Draw ghost trail with decreasing opacity
for (let i = trailLength; i > 0; i–) {
const trailT = t - (i / trailLength) * 0.3 * speed;
const x = Math.sin(trailT * speed) * size * 0.25;
const y = Math.cos(trailT * speed * 0.7) * size * 0.2;
const z = Math.sin(trailT * speed * 0.5) * size * 0.15;

const opacity = (i / trailLength) * 0.4;
p5.push();
p5.translate(x, y, z);
p5.scale(scaleFactor);
p5.tint(255, 255, 255, opacity * 255);
p5.texture(mainImage);
p5.plane(mainImage.width, mainImage.height);
p5.pop();
}


}

 ā„–15391743[Quote]

fly around like a spooky ghost with after images. make sure it shrinks and grows instead of moving in the Z axis, also make sure the gif loops

 ā„–15391746[Quote]

File: 846c377e326c14ad362e6f80a860a8ad57aa8fa4fc1f1….jpeg šŸ“„ļøŽ (84.15 KB, 1109x1346) ImgOps

first, how could you tell?

 ā„–15391759[Quote]

File: 100337.png šŸ“„ļøŽ (165.31 KB, 598x800) ImgOps

>function animate(p5, props) {
> const { mainImage, size, currentFrame, totalFrames, bgColor, featureValue } = props;
>
> p5.background(bgColor);
>
> const t = (currentFrame / totalFrames) * Math.PI * 2;
> const speed = 0.5 + (featureValue / 100) * 1.5;
> const trailLength = Math.floor(5 + (featureValue / 100) * 15);
>
> const biggestImageDimension = Math.max(mainImage.width, mainImage.height);
> const scaleFactor = (size / biggestImageDimension) * 0.5;
>
> // Draw ghost trail with decreasing opacity
> for (let i = trailLength; i > 0; i–) {
> const trailT = t - (i / trailLength) * 0.3 * speed;
> const x = Math.sin(trailT * speed) * size * 0.25;
> const y = Math.cos(trailT * speed * 0.7) * size * 0.2;
> const z = Math.sin(trailT * speed * 0.5) * size * 0.15;
>
> const opacity = (i / trailLength) * 0.4;
> p5.push();
> p5.translate(x, y, z);
> p5.scale(scaleFactor);
> p5.tint(255, 255, 255, opacity * 255);
> p5.texture(mainImage);
> p5.plane(mainImage.width, mainImage.height);
> p5.pop();
> }
>
>
>}



[Return][Catalog][Go to top][Post a Reply]
Delete Post [ ]
[ home / overboard ] [ soy / qa / raid / r ] [ craft ] [ int / pol ] [ a / an / asp / biz / mtv / r9k / tech / v / sude / x ] [ q / news / chive / rules / pass / bans / status ] [ wiki / booru / irc ]