-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.js
More file actions
29 lines (24 loc) · 825 Bytes
/
main.js
File metadata and controls
29 lines (24 loc) · 825 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import * as THREE from 'https://cdn.jsdelivr.net/npm/three@0.132.2/build/three.module.js';
import { particlesCursor } from 'https://unpkg.com/threejs-toys@0.0.8/build/threejs-toys.module.cdn.min.js';
document.addEventListener("DOMContentLoaded", () => {
const app = document.getElementById('app');
if (!app) {
console.error("Elemen #app tidak ditemukan!");
return;
}
const pc = particlesCursor({
el: app,
gpgpuSize: 512,
color: 0xffffff,
coordScale: 0.5,
pointSize: 2,
noiseIntensity: 0.005,
noiseTimeCoef: 0.0001,
pointDecay: 0.0025,
sleepRadiusX: 250,
sleepRadiusY: 250,
SleepTimeCoefX: 0.001,
SleepTimeCoefY: 0.002
});
console.log("Particles cursor berhasil diinisialisasi!");
});