Khoảng giá
Từ: 0 triệu
Đến: Không giới hạn
Máy quay phim Sony FX3 | Chính hãng
Giá giao động:
92,990,000đ
Máy quay DJI Ronin 4D - 8K
Vui lòng gọi
Máy quay phim Sony FX3 | Nhập Khẩu
Vui lòng gọi
Blackmagic Pocket Cinema Camera 6K Pro
Vui lòng gọi
Máy Quay Phim Canon XF705
Vui lòng gọi
Máy quay phim Blackmagic Design Pocket Cinema Camera 4K | Chính hãng
Vui lòng gọi
Máy quay phim Canon EOS C70 (Body Only)
Vui lòng gọi
Máy quay phim Canon EOS C70 (Body Only) | Chính hãng
Vui lòng gọi
Máy quay phim Panasonic LUMIX BGH1 Cinema 4K Box Camera
Vui lòng gọi
Máy Quay Phim Sony ILME-FX30 (Chính Hãng)
Giá giao động:
56,990,000đ
Máy quay Sony HXR-NX80
Giá giao động:
56,990,000đ
Máy quay Sony PXW-Z90V 4K HDR XDCAM
Giá giao động:
65,990,000đ
ILME-FX6V | Máy quay full-frame Sony
Giá giao động:
141,990,000đ
Máy quay Sony Alpha Cinema Line ILME - FX6 V
Giá giao động:
141,990,000đ
MÁY QUAY PHIM PANASONIC SDR-H80
HÀNG MỚI ĐÃ TẠM HẾT
MÁY QUAY PHIM SONY HDR-CX560V
HÀNG MỚI ĐÃ TẠM HẾT
MÁY QUAY PHIM PANASONIC AG-HPX250P
HÀNG MỚI ĐÃ TẠM HẾT
MÁY QUAY PHIM PANASONIC AG-AC90AP
HÀNG MỚI ĐÃ TẠM HẾT
MÁY QUAY PHIM PANASONIC AG-AC90P
HÀNG MỚI ĐÃ TẠM HẾT
MÁY QUAY PHIM SONY DCR-TRV950
HÀNG MỚI ĐÃ TẠM HẾT
MÁY QUAY PHIM PANASONIC AG-UX90
HÀNG MỚI ĐÃ TẠM HẾT
MÁY QUAY PHIM CANON XA30
HÀNG MỚI ĐÃ TẠM HẾT
MÁY QUAY PHIM SONY HXR-NX70U
HÀNG MỚI ĐÃ TẠM HẾT
MÁY QUAY PHIM NEX-EA50
HÀNG MỚI ĐÃ TẠM HẾT
MÁY QUAY PHIM SONY PMW-EX1
HÀNG MỚI ĐÃ TẠM HẾT
MÁY QUAY PHIM SONY EX1
HÀNG MỚI ĐÃ TẠM HẾT
Máy quay phim Z CAM E2C Professional 4K Cinema Camera
HÀNG MỚI ĐÃ TẠM HẾT
Máy quay DJI Ronin 4D - 6K
HÀNG MỚI ĐÃ TẠM HẾT
Máy quay phim Blackmagic Design Pocket Cinema Camera 4K
HÀNG MỚI ĐÃ TẠM HẾT
Máy quay phim Blackmagic Pocket Cinema Camera 6K Pro | Chính hãng
HÀNG MỚI ĐÃ TẠM HẾT
Máy quay phim Z CAM E2-F6 Full-Frame 6K Cinema Camera (EF Mount)
Máy quay phim Canon XF605
Máy quay phim Z CAM E2-S6 Super 35 6K Cinema Camera (EF Mount)
Máy quay phim Z CAM E2 Professional 4K Cinema Camera
Máy quay phim Blackmagic Design Pocket Cinema Camera 6K (Canon EF/EF-S) | Chính hãng
Máy quay phim Panasonic Lumix DC-BS1H | Chính hãng
Máy quay phim RED Komodo 6K | Chính hãng
Máy quay phim Canon XA45
Máy quay phim Canon XA55
Máy quay phim Sony Handycam HDR-CX405 (Chính hãng)
MÁY QUAY PHIM SONY FDR-AX43A
Máy Quay Phim Sony Handycam FDR- AXP55
MÁY QUAY PHIM SONY HXR-NX100
Sony 4K HDR FDR-AX700 (Chính Hãng)
Máy quay phim Sony HXR-NX200 (Chính hãng)
Máy quay phim Sony PXW-Z150 4K XDCAM (Chính hãng)
Máy quay chuyên nghiệp Sony PXW-Z190V
Máy quay phim chuyên dụng Sony ILME-FR7
Máy quay Sony Cinema Line PXW-FX9V (Chính hãng)
Máy quay phim Z CAM E2-F8 Full-Frame 8K Cinema Camera (EF Mount)
(function () {
const requestAnimFrame = (function () {
return window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
function (callback) {
window.setTimeout(callback, 1000 / 60);
};
})();
const hieuUngPhaoHoa = {
canvas: document.getElementById('hieuUngPhaoHoa__canvas'),
ctx: null,
cw: window.innerWidth,
ch: window.innerHeight,
fireworks: [],
particles: [],
colors: [0, 60, 300], // Mảng các màu
hue: 0,
timerTotal: 30, // Giảm thời gian giữa các lần bắn
timerTick: 0,
isActive: true, // Biến để kiểm soát trạng thái hoạt động
init: function () {
this.ctx = this.canvas.getContext('2d');
this.canvas.width = this.cw;
this.canvas.height = this.ch;
this.loop();
// Tự động dừng sau 5 giây
setTimeout(() => {
this.isActive = false;
}, 5000);
},
calculateDistance: function (p1x, p1y, p2x, p2y) {
const xDistance = p1x - p2x;
const yDistance = p1y - p2y;
return Math.sqrt(Math.pow(xDistance, 2) + Math.pow(yDistance, 2));
},
random: function (min, max) {
return Math.random() * (max - min) + min;
},
createParticles: function (x, y) {
let particleCount = 30;
// Chọn màu ngẫu nhiên từ mảng
this.hue = this.colors[Math.floor(Math.random() * this.colors.length)];
while (particleCount--) {
this.particles.push(new Particle(x, y, this));
}
},
// Main loop
loop: function () {
if (!this.isActive && this.fireworks.length === 0 && this.particles.length === 0) {
return; // Dừng animation khi hết pháo hoa
}
requestAnimFrame(this.loop.bind(this));
this.hue += 0.5;
this.ctx.globalCompositeOperation = 'destination-out';
this.ctx.fillStyle = 'rgba(0, 0, 0, 0.5)';
this.ctx.fillRect(0, 0, this.cw, this.ch);
this.ctx.globalCompositeOperation = 'lighter';
let i = this.fireworks.length;
while (i--) {
this.fireworks[i].draw();
this.fireworks[i].update(i);
}
i = this.particles.length;
while (i--) {
this.particles[i].draw();
this.particles[i].update(i);
}
// Tự động bắn pháo hoa nếu đang hoạt động
if (this.isActive && this.timerTick >= this.timerTotal) {
this.fireworks.push(new Firework(
this.cw / 2, this.ch,
this.random(0, this.cw),
this.random(0, this.ch / 2),
this
));
this.timerTick = 0;
} else {
this.timerTick++;
}
}
};
// Firework class
class Firework {
constructor(sx, sy, tx, ty, main) {
this.main = main;
this.x = sx;
this.y = sy;
this.sx = sx;
this.sy = sy;
this.tx = tx;
this.ty = ty;
this.distanceToTarget = main.calculateDistance(sx, sy, tx, ty);
this.distanceTraveled = 0;
this.coordinates = [];
this.coordinateCount = 3;
while (this.coordinateCount--) {
this.coordinates.push([this.x, this.y]);
}
this.angle = Math.atan2(ty - sy, tx - sx);
this.speed = 2;
this.acceleration = 1.05;
this.brightness = main.random(50, 70);
this.targetRadius = 1;
}
update(index) {
this.coordinates.pop();
this.coordinates.unshift([this.x, this.y]);
if (this.targetRadius < 8) {
this.targetRadius += 0.3;
} else {
this.targetRadius = 1;
}
this.speed *= this.acceleration;
const vx = Math.cos(this.angle) * this.speed;
const vy = Math.sin(this.angle) * this.speed;
this.distanceTraveled = this.main.calculateDistance(
this.sx, this.sy, this.x + vx, this.y + vy
);
if (this.distanceTraveled >= this.distanceToTarget) {
this.main.createParticles(this.tx, this.ty);
this.main.fireworks.splice(index, 1);
} else {
this.x += vx;
this.y += vy;
}
}
draw() {
this.main.ctx.beginPath();
this.main.ctx.moveTo(
this.coordinates[this.coordinates.length - 1][0],
this.coordinates[this.coordinates.length - 1][1]
);
this.main.ctx.lineTo(this.x, this.y);
this.main.ctx.strokeStyle = `hsl(${this.main.hue}, 100%, ${this.brightness}%)`;
this.main.ctx.stroke();
}
}
// Particle class
class Particle {
constructor(x, y, main) {
this.main = main;
this.x = x;
this.y = y;
this.coordinates = [];
this.coordinateCount = 5;
while (this.coordinateCount--) {
this.coordinates.push([this.x, this.y]);
}
this.angle = main.random(0, Math.PI * 2);
this.speed = main.random(1, 10);
this.friction = 0.95;
this.gravity = 1;
this.hue = main.random(main.hue - 20, main.hue + 20);
this.brightness = main.random(50, 80);
this.alpha = 1;
this.decay = main.random(0.015, 0.03);
}
update(index) {
this.coordinates.pop();
this.coordinates.unshift([this.x, this.y]);
this.speed *= this.friction;
this.x += Math.cos(this.angle) * this.speed;
this.y += Math.sin(this.angle) * this.speed + this.gravity;
this.alpha -= this.decay;
if (this.alpha <= this.decay) {
this.main.particles.splice(index, 1);
}
}
draw() {
this.main.ctx.beginPath();
this.main.ctx.moveTo(
this.coordinates[this.coordinates.length - 1][0],
this.coordinates[this.coordinates.length - 1][1]
);
this.main.ctx.lineTo(this.x, this.y);
this.main.ctx.strokeStyle = `hsla(${this.hue}, 100%, ${this.brightness}%, ${this.alpha})`;
this.main.ctx.stroke();
}
}
// Khởi chạy khi trang load xong
window.addEventListener('load', () => hieuUngPhaoHoa.init());
})();