Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Polyfills/Canvas/Source/Context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -961,6 +961,6 @@ namespace Babylon::Polyfills::Internal

Napi::Value Context::GetCanvas(const Napi::CallbackInfo& info)
{
throw Napi::Error::New(info.Env(), "not implemented");
return m_canvas->Value();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This returns NULL value and this code:

return Napi::Pointer<NativeCanvas>::Create(info.Env(), m_canvas);

returns an object that doesn't support getContext.
I tried to do a loop back like this in exprience.js :

context = context.canvas.getContext();

Any idea @bghgary ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ping me offline.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After chatting with Gary, there are a few changes needed in Canvas/Context to make it more robust. I can take care of these changes.

}
}