A scaffold application that separates typical setup code from the main animation loop where the action happens.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import World from './World'; | |
export default class Grid { | |
private inner: EIGHT.Grid; | |
constructor(private world: World) { | |
this.inner = new EIGHT.Grid({ | |
uSegments: 8, | |
vSegments: 8 | |
}) | |
world.add(this.inner) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Geometric3, VectorE3, BivectorE3 } from 'davinci-eight' | |
/** | |
* Scratch variable for implementing the rotate method. | |
*/ | |
const R = Geometric3.zero() | |
/** | |
* Heading | |
*/ | |
const INDEX_H = 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const FLOATS_PER_VERTEX = 3; | |
const BYTES_PER_FLOAT = 4; | |
const STRIDE = BYTES_PER_FLOAT * FLOATS_PER_VERTEX; | |
function primitive(): EIGHT.Primitive { | |
const aPosition: EIGHT.Attribute = { | |
values: [ | |
[0,+0.0,0, 0,-0.3,0, -0.3,0,0, +0.3,0,0], // center | |
[0,+1,0, -1,-1,0], // LHS | |
[0,+1,0, +1,-1,0], // RHS |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const FLOATS_PER_VERTEX = 3; | |
const BYTES_PER_FLOAT = 4; | |
const STRIDE = BYTES_PER_FLOAT * FLOATS_PER_VERTEX; | |
function primitive(): EIGHT.Primitive { | |
const aPosition: EIGHT.Attribute = { | |
values: [ | |
[0,+0.1,0, 0,-0.1,0, -0.1,0,0, +0.1,0,0], // center | |
[0,+1,0, -1,-1,0], // LHS | |
[0,+1,0, +1,-1,0], // RHS |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare module 3DMol { | |
} | |
declare module '3dmol' { | |
export = 3DMol; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare module 3DMol { | |
} | |
declare module '3dmol' { | |
export = 3DMol; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare module 3DMol { | |
} | |
declare module '3dmol' { | |
export = 3DMol; | |
} |