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

Add support for textures #7

Open
jdan opened this issue Apr 27, 2014 · 18 comments
Open

Add support for textures #7

jdan opened this issue Apr 27, 2014 · 18 comments

Comments

@jdan
Copy link
Owner

jdan commented Apr 27, 2014

Instead of ordinary fill colors, it would be very useful to be able to place textures on faces.

@rcmaniac25
Copy link
Contributor

While it may not be the fastest, if you do a CanvasPattern and transform it via a skew matrix, you can probably simulate "projecting" a texture on a wall.

Though between #7, #8, and #9, I'm surprised you don't have per-pixel lighting as an option. Though if you get to that point, you may be better looking into WebGL then Canvas.

@jdan
Copy link
Owner Author

jdan commented Apr 27, 2014

I don't think ordinary canvas operations are performant enough for per-pixel lighting, are they?

@FranDias
Copy link

Then we should ask the question of caring about mobile support?

@rcmaniac25
Copy link
Contributor

Hence why I said it probably isn't best unless you want to switch to WebGL

@jdan
Copy link
Owner Author

jdan commented Apr 27, 2014

In the end it has to be simple. I'm not aiming to compete with Three.js or other graphics engines. This is really meant for simple artwork.

That being said, it's important to fix little bugs like #6, and add small features like textures. I guess performance doesn't need to be stellar.

@rcmaniac25
Copy link
Contributor

Perhaps change the color option when adding to "fill"

@owenversteeg
Copy link

I would absolutely love texture support. Is this something you've started work on, or should I take a look at doing this?

@jdan
Copy link
Owner Author

jdan commented May 22, 2014

@owenversteeg nope I haven't worked on this at all :) Feel free to take a stab at it.

@whoeverest
Copy link
Collaborator

@jdan what's the status of this issue? I mean, I see it's closed, but wondering why. Implemented?

@jdan
Copy link
Owner Author

jdan commented Mar 27, 2015

@whoeverest This one's still open, #55 was closed as a dupe.

Status is that we're looking for a suitable WebGL library upon which to build Isomer. The threejs branch contains a rewrite using - you guessed it - Three.js, but I was super unhappy with the size of the resulting bundle (close to a megabyte!)

@cryptoquick Pointed out that stack.gl might be a suitable candidate.

@whoeverest
Copy link
Collaborator

Ah, sorry, it looks like I don't know how to GitHub. :-))

Does this mean that textures won't be supported in the basic no-three.js-or-whatever branch?

@jdan
Copy link
Owner Author

jdan commented Mar 27, 2015

@whoeverest Ideally we'll be using the new webgl stuff in master - I thought about splitting the library into two but I don't think it's a great idea.

@whoeverest
Copy link
Collaborator

@jdan I see. Personally that doesn't make me too happy, since I plan on using Isomer to build a game that's expected to work on older hardware (http://sugarlabs.org/) but I understand why you want to go in that direction.

I guess I can always make a fork and add whatever features I need in the vanilla version.

@jdan
Copy link
Owner Author

jdan commented Mar 27, 2015

@whoeverest in an ideal world I'd spin this off into a github org and we'd have isomer-threejs as well - which falls back to canvas :) code-size is much larger, though.

@cryptoquick
Copy link
Contributor

IMO, it doesn't fit terribly well for my use-case either. I actually prefer a 2D canvas solution, and it also opens itself up to a whole new area of open source graphics novel code; 3D has been done to death. Another advantage to keeping it on 2D canvas is that having the option to easily render on the backend is a huge bonus.

@rcmaniac25
Copy link
Contributor

@jdan One possible solution would be to have a backend object. Then you say "this object has a texture" and the backend figures out what to do with it. Then you can have your threejs backend and your Canvas backend.

@clvrk
Copy link

clvrk commented May 3, 2019

Any news on this? I know this request is already a coupe lof years old, but it would still be amazing to apply textures!

@crimson-med
Copy link

This library looked awesome to build a small interactive game but I would have loved to be able to use my own sprite

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants