MCPcopy Create free account
hub / github.com/Milkyroad/SCiPNET / init

Function init

public/src/ex_file/scripts/dna.js:22–39  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

20 const lerpMap = (val, sMin, sMax, dMin, dMax) => lerp(norm(val, sMin, sMax), dMin, dMax)
21
22 const init = () => {
23 renderer = new THREE.WebGLRenderer({
24 alpha: true
25 });
26 document.getElementById("dnaContainer").appendChild(renderer.domElement);
27 renderer.setSize($("#dnaContainer").width(), $("#dnaContainer").height());
28 camera = new THREE.PerspectiveCamera(
29 15,
30 200 / 100,
31 1,
32 5000
33 );
34 camera.position.z = 1200;
35 scene = new THREE.Scene();
36 const controls = new THREE.OrbitControls(camera, renderer.domElement);
37 controls.minDistance = 10;
38 controls.maxDistance = 1200;
39 };
40
41 const addParticles = particleArray => {
42 const geometry = new THREE.Geometry();

Callers 1

dna.jsFile · 0.70

Calls 1

$Function · 0.70

Tested by

no test coverage detected