stevinz / extrude Goto Github PK
View Code? Open in Web Editor NEWExtruding a 32-bit color image into a 3D mesh.
Home Page: https://stevinz.github.io/extrude-html5/
License: MIT License
Extruding a 32-bit color image into a 3D mesh.
Home Page: https://stevinz.github.io/extrude-html5/
License: MIT License
Hi,
Can you please include the run instructions for the project for a sample image in the README file?
Hi,
When I run the compiled program, it crashes in Debug mode with assert some
vector subscript out of range.
In imaging_compare.cpp, function FloodFill
for (auto point : points) {
// somewhere wherepush_back is done conditionally.
if (processed.getPixel(x, y) == FLOOD_NOT_PROCESSED) {
if (Dr::IsSameColor(start_color, bitmap.getPixel(x, y), tolerance)) {
points.push_back(DrPoint(x, y));
processed.setPixel(x, y, FLOOD_MARKED_FOR_PROCESS);
processed_some = true;
}
}
}
push_back will invalidate the iterators if there is reallocate of points
I added points.reserve(500) to prevent the reallocation & it ran correctly.
Alternatively a while loop with accessing points by index instead.
P.S: Is there any version of Visual Studio / c++ should I be using?
My compiler does not seem to recognize .path initialization etc.
I had to changed to that below.
/* sfetch_request_t (sokol_fetch_font) {
.path = font_file.c_str(),
.callback = font_normal_loaded,
.buffer_ptr = state.font_normal_data,
.buffer_size = sizeof(state.font_normal_data)
};*/
sfetch_request_t sokol_fetch_font = { 0 };
sokol_fetch_font.path = font_file.c_str();
sokol_fetch_font.callback = font_normal_loaded;
sokol_fetch_font.buffer_ptr = state.font_normal_data;
sokol_fetch_font.buffer_size = sizeof(state.font_normal_data);
Regards,
Eugene
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.