MCPcopy Create free account
hub / github.com/OpenWebCAD/node-occ / NAN_METHOD

Function NAN_METHOD

src/Mesh.cc:20–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18}
19
20NAN_METHOD(Mesh::New)
21{
22 if (!info.IsConstructCall()) {
23 return Nan::ThrowError(" use new occ.Mesh() to construct a Mesh");
24 }
25
26 Mesh* obj = new Mesh();
27
28 Nan::Set(info.This(),Nan::New("normals").ToLocalChecked(), Nan::New<v8::Object>());
29 Nan::Set(info.This(),Nan::New("edgeIndices").ToLocalChecked(), Nan::New<v8::Object>());
30 Nan::Set(info.This(),Nan::New("triangles").ToLocalChecked(), Nan::New<v8::Object>());
31
32 obj->Wrap(info.This());
33 info.GetReturnValue().Set(info.This());
34}
35
36Nan::Persistent<v8::FunctionTemplate> Mesh::_template;
37

Callers

nothing calls this directly

Calls 5

makeUint8ArrayFunction · 0.85
makeUint16ArrayFunction · 0.85
makeUint32ArrayFunction · 0.85
numNormalsMethod · 0.80
numVerticesMethod · 0.45

Tested by

no test coverage detected