-
-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hi, is it possible run on an environment which has no dom bom environment #39
Comments
you can see this page. maybe need translate. |
Hi @zfavourite99 - thanks for the question. We will look into it tomorrow (1AM here...). I think I recall CreateJS working on a version that runs without DOM. So if they can do it, probably ZIM can do it. Will keep you posted. You are welcome to join us on Slack at https://zimjs.com/slack to discuss more. And please send a reminder if you don't hear back from us. We are working hard right now to launch 10.9.0 |
Perhaps try some basic events first.
|
this tow event both not response. the environment's target user all is phone. so it only has touch event. have no mouse event. maybe need convert touch event to mouse event. i will try. |
Hello, I need more help.
i get the log is: the canvas which i provide to stage, and the document both has event. but circle has no event. i don't know who i need dispatch the event to? |
I see... well if you are not getting the mousedown event, etc. on the circle then it will certainly not drag nor will many interactive things in ZIM work. But the issue is not with ZIM... it will have to be solved in CreateJS where all these events are created. So I would suggest seeing if CreateJS has a version that works without the DOM. It may be that this version could be used and then ZIM will work on top of it as it will get the expected events. Does this help at all? https://github.com/CreateJS/EaselJS-NodeJS |
Hello, after my further adaptation, zim now works properly in my development environment. I commented out the two lines of code in zim.js. At the moment everything seems to be working, but I don't know if this will cause any problems in the future. my image always upload fail. in my environment Window and Blob is not defined. this tow lines i commented. the code is:
|
and i found another problem. in zim stage.on('drawend', function) called anytime. in createjs stage.on('drawend', function) called after stage.update(). i hope called after stage.update(). how can i do? |
Hi @zfavourite99 - very cool. Glad you got most of it to work. The Blob and Window issue probably will not affect anything as there is no Window... not sure about Blob. That can be handled in other ways too if need be - anyway, make sure that the ZIM Blob is working - if not, we can discuss further. For the stage.on("drawend", function) I don't think we are doing anything different than createjs - do you say that it is firing all the time? In the browser, the drawend is firing only when stage.update() is firing - which also happens on window resize... I wonder if something is constantly trying to draw because of a missing window size or something. |
@danzen the ZIM Blob is worked fine after i commented the I notice that if I add a window object to the stage, the drawend call anytime, else drawend call after stage.update(). This problem also exists in the chrome browser. This is my html code:
In my environment Frame always throw an exception
The |
okay - zog binds the console.log so maybe there is no console. Frame is what is setting up the canvas and scales it to the browser window and adds a stage - so maybe you do not need it. It would probably be easier with stage. But... a lot of parts expect a zimDefaultFrame. So you might want to get the latest ZIM 10.9.0 and use the fastFrame - https://zimjs.com/docs.html?item=fastFrame |
Oh... and the window is probably calling a continuous stage.update() for easing the scroll. |
@danzen Thank you very mach. Thank you for enduring my poor english. Thank you for your patience in answering my questions. By 10.9.0 the result is not what I want: My code is:
And if possible, please update zimjs source code to 10.9.0. In my environment all third-party libraries are prone to problems. Sometimes I need debug them. So I need a not minified js source code. |
I notice that no matter where I click, the button's click event always fires. According to my observations, where may zim get the incorrect size. |
My environment is indeed a headache. But there is no way, I can only use it in such an environment. The host of this environment has a large user base. |
Wechat in china like facebook in world. Too many users. |
Hi @zfavourite99 - the window has damping so it glides to a stop. In many cases, we track to see if it has stopped moving and then stop the update. I will check to see if we missed that and add a bug/request on our Slack channel - which is where we usually deal with issues. Could you please try adding fastFrame() to the start of your code. We updated many things in ZIM 10.9.0 that relate to having a stage or not so now require non-frame/non-ZIM Shim code to have fastFrame() run. Let me know if that works. If not, we can dig into it. Is the click issue in 10.8.0 or in 10.9.0 with the button placement issue? The non-minified code is always kept up to date at https://zimjs.org/cdn/10.9.0/zim_doc.js for instance. So add _doc - we will update GitHub, NPM, TypeScript, etc. once we settle the 10.9.0 code. We have made about 10 patches to it in the last day or two. That might go on for a week or so from launch and when ready, we update the updates page at https://zimjs.com/updates.html and let folks know on Slack - https://zimjs.com/slack (and thanks for the nice comments about ZIM!) |
Thanks for the digging @zfavourite99 - we have updated the CDN with the fastFrame fix! We do see the window calling the update constantly so will try and figure that within the week. We are racing on teaching projects at the moment. Keep in touch! |
Hi, when I use fastFrame like this:
I got an error:
this code in createjs:
I console the
I console |
Hmmm... @zfavourite99 - in the end, we just want a Bitmap(). We used all this preload stuff to turn an HTML image tag into a Bitmap. ZIM has a Bitmap class that receives data in various ways including just passing an image url into it. Maybe you do not need the preloading through CreateJS - perhaps try the Bitmap class directly. |
Yes, it works. I just noticed the examples, but ignored the documentation. Sorry. |
@danzen Hi, when i use the
change to:
the error gone. And assets worked fine. |
We have now updated our npm to be more robust https://www.npmjs.com/package/zimjs |
hi, is it possible run on an environment which has no dom and bom environment.
For example, THREE js that i just provide a context and height , width. it not dependency dom environment.
The text was updated successfully, but these errors were encountered: