Skip to content
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

created image class #342

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open

created image class #342

wants to merge 2 commits into from

Conversation

geogiam-net
Copy link

created image class to be able to add images by using the image tag, it does not need an enviroment with header.

created image class to be able to add images by using the image tag, it does not need an enviroment with header.
@jonobr1 jonobr1 self-requested a review December 19, 2018 15:52
@jonobr1 jonobr1 self-assigned this Dec 19, 2018
@jonobr1
Copy link
Owner

jonobr1 commented Jan 15, 2019

Wow, this preserveAspectRatio API is funky. I like it! I need to think about how to handle this on the canvas side of things... Keep you posted!

@hichem147
Copy link

I am very interested in images that are related to the scene, that can be panned and zoomed with the other scene elements. Is it that ? how is it used ?

@jonobr1
Copy link
Owner

jonobr1 commented Jan 25, 2019

You would be able to use the Two.Image in this way @hichem147, but you can also use the Two.Sprite and Two.ImageSequence objects as well. The main difference between Two.Image and the other's is that Two.Image will allow you to squash and stretch the image.

@hichem147
Copy link

Thanks for your reactivity !!! and bravo for that. This is what makes me use Two.js for a 2D "graph nodes" Editor. You helped me by the past to implement Pan & Zoom.
Sorry to ask one more question. My need is something like an image as a background of a map and with nodes and lines over the map. These nodes and lines and the image are panned and zoomed together. Which version of two.js can I use to get this way of use ? I suppose I should use Two.Image.

@jonobr1
Copy link
Owner

jonobr1 commented Jan 25, 2019

You should be able to build that with the current dev branch or the latest alpha version published to npm. But, please file a new issue for talking about this further, because this isn't the right the thread to discuss such topics. Thanks!

@jonobr1 jonobr1 added this to the v0.7.0 milestone May 26, 2019
@jonobr1
Copy link
Owner

jonobr1 commented Jun 6, 2019

This branch holds my current thinking on how to translate this logic over to canvas and webgl: https://github.com/jonobr1/two.js/tree/293-sprite-width-height

@jonobr1 jonobr1 modified the milestones: v0.7.0, v0.8.0 Jan 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants