UNPKG

d2k

Version:

rendering engine from the Dark side of the Force - wip

29 lines (19 loc) 489 B
import { uniqid } from 'u3s'; import { Renderable } from '../core/d2k.renderable'; /** * @author monsieurbadia / https://monsieurbadia.com */ export class Triangle extends Renderable { uuid = uniqid(); colors = [ 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0 ]; indices = [ 0, 1, 2 ]; normals = []; positions = [ 0, 1, 0, 1, -1, 0, -1, -1, 0 ]; vertices = [ 0, 1, 0, 1, -1, 0, -1, -1, 0 ]; constructor ( { name = '' } = {} ) { super(); this.name = name; } }