Skip to content

Drawing custom mesh #255

@Qaaj

Description

@Qaaj

Hi all,
I am pretty new to 3D, but I have some experience using away3D in flash and drawing with vertices etc. I am trying to draw a very basic triangle using THREE.js, and I just can't seem to get something on the screen. If someone can push me in the right direction, it would be very much appreciated. Here is my code:

var geom = new THREE.Geometry(); 
var v1 = new THREE.Vector3(0,0,0);
var v2 = new THREE.Vector3(0,500,0);
var v3 = new THREE.Vector3(0,500,500);

geom.vertices.push(new THREE.Vertex(v1));
geom.vertices.push(new THREE.Vertex(v2));
geom.vertices.push(new THREE.Vertex(v3));

var object = new THREE.Mesh( geom, new THREE.MeshNormalMaterial() );
scene.addObject(object);

Thanks a lot!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions