MCPcopy Create free account
hub / github.com/TheOrcDev/github-creature / constructor

Method constructor

components/liquid-ether.tsx:353–370  ·  view source on GitHub ↗
(
        mouse: MouseClass,
        manager: WebGLManager,
        opts: {
          enabled: boolean;
          speed: number;
          resumeDelay: number;
          rampDuration: number;
        }
      )

Source from the content-addressed store, hash-verified

351 margin = 0.2;
352 private _tmpDir = new THREE.Vector2();
353 constructor(
354 mouse: MouseClass,
355 manager: WebGLManager,
356 opts: {
357 enabled: boolean;
358 speed: number;
359 resumeDelay: number;
360 rampDuration: number;
361 }
362 ) {
363 this.mouse = mouse;
364 this.manager = manager;
365 this.enabled = opts.enabled;
366 this.speed = opts.speed;
367 this.resumeDelay = opts.resumeDelay || 3000;
368 this.rampDurationMs = (opts.rampDuration || 0) * 1000;
369 this.pickNewTarget();
370 }
371 pickNewTarget() {
372 const r = Math.random;
373 this.target.set(

Callers

nothing calls this directly

Calls 1

pickNewTargetMethod · 0.95

Tested by

no test coverage detected