wcjs-ugly-demo icon indicating copy to clipboard operation
wcjs-ugly-demo copied to clipboard

Uncaught TypeError: Cannot read property 'render' of undefined

Open le-wei opened this issue 8 years ago • 12 comments

I want to use WebChimera.js to complete a project. But testing demo wcjs-ugly-demo does not work. Report the following error: Received first picture index.html:16 Uncaught TypeError: Cannot read property 'render' of undefined But I checked the webgl-video-renderer contains this function. I do not know why. please help me. Thank you。

le-wei avatar Nov 23 '17 06:11 le-wei

You don't have WebChimera.js binaries properly installed (or compiled)

RSATom avatar Nov 23 '17 08:11 RSATom

I understood, thank you. I will try again

le-wei avatar Nov 23 '17 10:11 le-wei

The renderContext I print is not undefined 。 this code var renderContext = require("webgl-video-renderer").setupCanvas(canvas); Can not get it。 I have executed build_nwjs.cmd and have succeeded。I do not know why. Please help me master。Thank you

le-wei avatar Dec 27 '17 09:12 le-wei

do you have any messages in js debug console?

RSATom avatar Dec 27 '17 10:12 RSATom

Uncaught TypeError: Cannot read property 'render' of undefined in js debug console of nw0.12.3 .

and

'VoutDisplayEvent 'window state' 0 index.html:12 reusing provided vout index.html:12 plane 0 not aligned: disabling direct rendering index.html:12 buffer deadlock prevented index.html:12 Decoder wait done in 22 ms index.html:12 inserting 4454 zeroes index.html:12 state changed: 1 index.html:12 Failed to change zoom index.html:12 Failed to set on top index.html:12 Failed to change source AR index.html:12 Failed to change Viewpoint index.html:12 auto hiding mouse cursor' in js debug console of nw0.16.0 .

I compiled the corresponding nw version of WebChimera.js and all succeeded What should I do?。thank you

le-wei avatar Dec 28 '17 01:12 le-wei

looks like it can't load webchimera.js.node with nw0.12.3 by some reason, and some compatibility issue with nw0.16.0.

RSATom avatar Dec 28 '17 01:12 RSATom

and keep in mind, you should use .node file built against exactly your nw version.

RSATom avatar Dec 28 '17 01:12 RSATom

I have built two versions of 0.12.3 and 0.16.0 respectively. And player has been created successfully。 var player = require("webchimera.js").createPlayer(); is ok。 var gl = canvas.getContext( "webgl", { preserveDrawingBuffer: Boolean(options.preserveDrawingBuffer) } ); gl is null in the setupCanvas function。

le-wei avatar Dec 28 '17 02:12 le-wei

it looks like nw.js can't use hardware acceleration on your hardware.

RSATom avatar Dec 28 '17 05:12 RSATom

How should I make it work, Can you give me some advice waiting for you free time? Thank you。My hardware is win7 64 bit。thank you

le-wei avatar Dec 28 '17 06:12 le-wei

I installed a computer graphics card and then solve this problem. thank you for your help

le-wei avatar Dec 28 '17 10:12 le-wei

Glad to see it. Please close issue then.

RSATom avatar Dec 29 '17 08:12 RSATom