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

Method createBoundary

components/liquid-ether.tsx:657–674  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

655 this.createBoundary();
656 }
657 createBoundary() {
658 const boundaryG = new THREE.BufferGeometry();
659 const vertices_boundary = new Float32Array([
660 -1, -1, 0, -1, 1, 0, -1, 1, 0, 1, 1, 0, 1, 1, 0, 1, -1, 0, 1, -1, 0,
661 -1, -1, 0,
662 ]);
663 boundaryG.setAttribute(
664 "position",
665 new THREE.BufferAttribute(vertices_boundary, 3)
666 );
667 const boundaryM = new THREE.RawShaderMaterial({
668 vertexShader: line_vert,
669 fragmentShader: advection_frag,
670 uniforms: this.uniforms!,
671 });
672 this.line = new THREE.LineSegments(boundaryG, boundaryM);
673 this.scene!.add(this.line);
674 }
675 update(...args: any[]) {
676 const { dt, isBounce, BFECC } = (args[0] || {}) as {
677 dt?: number;

Callers 1

initMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected