document.addEventListener("DOMContentLoaded", function () {
const canvas = document.createElement("canvas");
canvas.style.position = "fixed";
canvas.style.top = "0";
canvas.style.left = "0";
canvas.style.pointerEvents = "none";
canvas.style.zIndex = "9999";
document.body.appendChild(canvas);
const ctx = canvas.getContext("2d");
let width = window.innerWidth + 100;
let height = window.innerHeight;
canvas.width = width;
canvas.height = height;
const flakes = [];
// Загружаем изображения для снежинок
const snowflakeImages = ["/sneg.png", "/sneg2.png"];
const snowflakes = [];
let img1 = new Image();
img1.src = snowflakeImages[0];
let img2 = new Image();
img2.src = snowflakeImages[1];
// Создаем снежинку с отклонением по горизонтали
function createFlake() {
const randomImage = Math.random() > 0.5 ? img1 : img2; // Выбираем случайное изображение
return {
x: Math.random() * width,
y: Math.random() * height * 0.5, // Появление снежинок в верхней половине экрана
image: randomImage, // Присваиваем изображение
width: 13 + Math.random() * 5, // Ширина изображения снежинки
height: 13 + Math.random() * 5, // Высота изображения снежинки
speed: Math.random() * 5 + 0.5, // Скорость падения
direction: (Math.random() - 0.5) * 2, // Направление горизонтального отклонения (-1 до 1)
drift: Math.random() * 0.5 - 0.1, // Медленное горизонтальное отклонение со временем
};
}
// Рисуем снежинки
function drawFlakes() {
ctx.clearRect(0, 0, width, height); // Очистить экран
// Рисуем падающие снежинки
flakes.forEach((flake) => {
ctx.drawImage(flake.image, flake.x, flake.y, flake.width, flake.height);
});
}
// Двигаем снежинки с эффектом отскока от краев
function moveFlakes() {
flakes.forEach((flake, index) => {
flake.y += flake.speed; // Падение вниз
flake.x += flake.direction + flake.drift; // Горизонтальное отклонение
// Отскок при достижении левого или правого края экрана
if (flake.x < 0 || flake.x > width) {
flake.direction = -flake.direction; // Меняем направление на противоположное
// Плавное возвращение к центру экрана
flake.x = Math.min(Math.max(flake.x, 0), width);
}
// Если снежинка выходит за нижнюю границу экрана, перемещаем её обратно в верхнюю часть
if (flake.y > height) {
flake.y = -flake.height; // Переходит в верхнюю часть
flake.x = Math.random() * width; // Новая случайная позиция по горизонтали
}
});
// Добавляем новые снежинки, чтобы поддерживать их количество
while (flakes.length < 100) { // Поддерживаем количество снежинок
flakes.push(createFlake());
}
}
// Анимация
function loop() {
drawFlakes();
moveFlakes();
requestAnimationFrame(loop);
}
// Инициализация снежинок
for (let i = 0; i < 100; i++) {
flakes.push(createFlake());
}
// Адаптация к изменению размера окна
window.addEventListener("resize", () => {
width = window.innerWidth + 100;
height = window.innerHeight;
canvas.width = width;
canvas.height = height;
});
loop();
});
MOLDINGS IN FRENCH STYLE
The moldings and decors used depending on the rooms of the houses bring French luxury to every corner of the house and look effective and beautiful. Although there are many different French styles, country and modern Parisian styles are predominant. Each French-style home has its own characteristics, but many of us want to add this quality to our stylish home. we went so far as to turn our entire house into a French pattern house. How can we achieve this look in our home with wall sconces as a distinguishing feature?
COMBINE DIFFERENT PERIODS
Combine modernity with vintage and classic elements in each room to transform them into elegant French-style spaces. You won't have to apply it all over the place, managing and matching multiple components to achieve this mysterious and modern look at once. If you have a vintage apartment, restore the moldings on the walls, ceiling and ceiling and fill the space with minimalist, modern furniture and art from the 1950s-1980s. This is necessary for a contrasting but beautiful French look.
KEEP COLORS NEUTRAL
To look French, choose neutral colors and shades. Then fill the interior with gold trim for a timeless French look. Neutral shades make houses with moldy decor walls more spacious and tasteful, which is suitable for any room. Adding all kinds of furniture and artwork to the wall and interior, neutral colors are a great background element for this.
ANTIQUE APPENDICES
The French look is achieved with a kind of vintage decoration. A room with modern Parisian moldings is impossible to allow antique artifacts. Take the liberty of adding old-yet-chic components like furniture, art, or even a fireplace. If they need restoration, give them suggestions for rebuilding so they can be restored with pleasure. You won't need a lot, even enough empty zones will add mystery to the mistakes of your Parisian room and fill your wall molding decorations with their beautiful ik.
AND FINALLY,
Spaces that you can design with French style include living room, bedrooms, fireplace and library. Add a mirror, a chandelier, and let in some natural light as an added design touch to the ubiquitous moldings.