but0n / recastCLI.js

CLI tool & Node.js addon to generate navigation mesh
MIT License
49 stars 16 forks source link

Nodejs plugin support #1

Closed but0n closed 6 years ago

but0n commented 6 years ago

Node.js v8.9.3 文档 Node.js调用C/C++ 使用 C++ 扩展 Node.js by Kenneth Geisshirt Mar 17 2016

but0n commented 6 years ago

https://v8.paulfryzel.com/docs/master/classv8_1_1_string_1_1_value.html

but0n commented 6 years ago

How to convert v8::String to const char *

but0n commented 6 years ago

C++ string详解

but0n commented 6 years ago

Handle input

f31523961f3617373060eee103ab3d503fbc3552

but0n commented 6 years ago

Parse

7e0584be0c6ef1145a7369143e074eaa8ee556fb

but0n commented 6 years ago

image

but0n commented 6 years ago

6217757

image

修改了解析三角形数据的函数, 不需要long, 解析verts的还没改, 反正return没用上 原本以为需要记录行数以便三角形索引引用, 结果发现有add方法, 会自动++

中途调试的时候不小心grhh了, 不知道存在有哪些疏忽的addition

现在可以像c++工具一样输出navmesh的obj数据, 下一步是看怎样把数据给js...

but0n commented 6 years ago

90abcf2

image

把加载步骤从 build 分离出来

but0n commented 6 years ago

9a3127e

image

but0n commented 6 years ago

Test handle string input

image

but0n commented 6 years ago

C/C++文件创建、打开、读、写、复制、关闭、删除等操作汇总 image

but0n commented 6 years ago

Node.js 和 C++ 之间的类型转换

but0n commented 6 years ago

https://v8docs.nodesource.com/node-8.9/d3/d32/classv8_1_1_array.html

v8 array