illusoryMonad Posted November 16, 2020 Share Posted November 16, 2020 Hi everyone, Rather basic issue - I can't get a visible canvas, having followed along kittykatattack's Tutorial. And of course, all I get when my browser renders the HTML document is a blank page. Note that I've tried the page with multiple browsers, and also the incorrectly displayed character code points on the banner. Also, I didn't get pixi.min.js from anywhere odd. Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted November 16, 2020 Share Posted November 16, 2020 it should work. Please provide more information. Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted November 16, 2020 Share Posted November 16, 2020 zip-file, jsfiddle, codesandbox, codepen, e.t.c. Quote Link to comment Share on other sites More sharing options...
illusoryMonad Posted November 17, 2020 Author Share Posted November 17, 2020 When I remove the arguments to the Application constructor, it now works. Is the tutorial slightly out of date? Quote Link to comment Share on other sites More sharing options...
illusoryMonad Posted November 17, 2020 Author Share Posted November 17, 2020 In fact, trying it by directly dealing with the renderer works: const renderer = PIXI.autoDetectRenderer(); But not if I provide even an empty options object: const renderer = PIXI.autoDetectRenderer({}); Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted November 17, 2020 Share Posted November 17, 2020 You are running older version of pixijs with very very very strange effect. It works for everyone else. That means either my 4.4 bugs were flushed out of my memory, either you did something strange. Please provide the demo. Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted November 17, 2020 Share Posted November 17, 2020 According to sources: https://github.com/pixijs/pixi.js/blob/v4.4.x/src/core/autoDetectRenderer.js https://github.com/pixijs/pixi.js/blob/v4.4.x/src/core/Application.js#L40 https://github.com/pixijs/pixi.js/blob/v4.4.x/src/core/renderers/webgl/WebGLRenderer.js#L55 in 4.4 first param of all those constructors/functions has to be "width" and not an object. It turns out, 4.5 is first version that accepts "options" as first: https://github.com/pixijs/pixi.js/blob/v4.5.x/src/core/renderers/webgl/WebGLRenderer.js Please use latest pixi version, either 4.8.9 either 5.3.3 Quote Link to comment Share on other sites More sharing options...
KenC Posted November 19, 2020 Share Posted November 19, 2020 On 11/17/2020 at 8:01 AM, ivan.popelyshev said: According to sources: https://github.com/pixijs/pixi.js/blob/v4.4.x/src/core/autoDetectRenderer.js https://github.com/pixijs/pixi.js/blob/v4.4.x/src/core/Application.js#L40 https://github.com/pixijs/pixi.js/blob/v4.4.x/src/core/renderers/webgl/WebGLRenderer.js#L55 in 4.4 first param of all those constructors/functions has to be "width" and not an object. It turns out, 4.5 is first version that accepts "options" as first: https://github.com/pixijs/pixi.js/blob/v4.5.x/src/core/renderers/webgl/WebGLRenderer.js Please use latest pixi version, either 4.8.9 either 5.3.3 This fixed my problem also. I was initially using 4.4.X. Wondering, though, why I didn't see some kind of error. Is the place to look for error messages the Javascript console, or is there somewhere else also? Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted November 19, 2020 Share Posted November 19, 2020 because its javascript. its not checking the types, it can do stuff even if its broken in many ways. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.