<ylluminarious>
and i've been trying to duplicate the example myself (with the cdn), but i keep getting an error in the console saying: https://gist.github.com/6022ccc12b1993c72856
<ylluminarious>
i understand why this error is happening, because what it's saying is that `window.PIXI` is undefined and the code in the x-string is trying to get a property from `window.PIXI` (`Stage`). what i'm wondering is why the article says that the example worked.
<ylluminarious>
i don't think that the example should have worked; `window.PIXI` is not defined and calling a property from it would just cause problems. am i missing something as to why the example is supposedly working?
ryanstout has joined #opal
e_dub has joined #opal
ryanstout has quit [Ping timeout: 265 seconds]
<ylluminarious>
meh` elia any ideas on the above?
<elia>
ylluminarious, maybe you need to require pixi before using it…
ryanstout has joined #opal
<elia>
ylluminarious, unfortunately have no time to try it myself today…
<ylluminarious>
elia, ok, thanks. i `include`'d pixi before using it.
<meh`>
ylluminarious, try to just include the pixi.js in the html
<ylluminarious>
meh`, ok, i'll try that and see if it works
<ylluminarious>
hmm, no. it seems like that's not gonna work.
j_mcnally has quit [Ping timeout: 244 seconds]
bcavileer_ has quit [Ping timeout: 265 seconds]
ceej has quit [Ping timeout: 265 seconds]
adambeynon has quit [Ping timeout: 265 seconds]
f-3r has quit [Ping timeout: 265 seconds]
<ylluminarious>
oh wait, never mind. the inclusion of pixi in the html did work. i was doing something wrong in my code. thanks, meh`
<meh`>
np
<elia>
meh`, are you goind to do any cleanup on hash.rb? b/c I'm (slowly) adding a separate map for string keys
elia has quit [Quit: Computer has gone to sleep.]
f-3r has joined #opal
e_dub has quit [Quit: ZZZzzz…]
adambeynon has joined #opal
ceej has joined #opal
bcavileer_ has joined #opal
j_mcnally has joined #opal
<ylluminarious>
meh`: i am getting .map files missing from the cdn inclusion: http://cl.ly/image/0j09143E1V1W -- any idea on how i can resolve this?
e_dub has joined #opal
<meh`>
ylluminarious, it's not a fatal error
<meh`>
you can ignore it
<ylluminarious>
meh`: right, but doesn't it help debugging by resolving down to the rb level better?
<meh`>
ylluminarious, yeah, but I never used nor worked on the cdn :D
<ylluminarious>
meh`, ok i'll just ask elia when he's on. thanks.
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
j_mcnally has joined #opal
wulab has quit [Ping timeout: 246 seconds]
f-3r has quit [Remote host closed the connection]
e_dub has quit [Quit: ZZZzzz…]
e_dub has joined #opal
<ceej>
is it not possible to make a class method like server? to do if server? instead of having to do unless RUBY_ENGINE == ‘opal’ ?
<meh`>
ceej, nothing stops you from doing it
<meh`>
ceej, that compile time check is mostly made in case you use xstrings in the non-opal code
<meh`>
because they would be compiled
<meh`>
if your code is complete ruby without xstrings
<meh`>
you can do everything at runtime
<ceej>
meh`: I tried doing ^ but it’s still generating the javascript
<meh`>
ceej, yes, it will generate it, but it won't use it at runtime
<meh`>
so it won't cause an issue
<meh`>
if you don't want to compile a certain part, that part cannot be dependent on runtime conditions
<ceej>
so it will have to be wrapped in unless RUBY_ENGINE == ‘opal’ to not generate the code
<ceej>
meh`: makes sense, I’ll just have to change the way I load the js and make it only load the files it needs for x page. Thank you for clarifying :)