Jump to content

Help with Dynamic Textures


dbawel
 Share

Recommended Posts

Hi again,

 

in the example you have this line:

var texcoords = pickResult.getTextureCoordinates();

The variable texcoords now has an object that contains the x and y coordinates on the texture. So this is where the next point will be drawn in the example, but you can do with this whatever you want.

 

Is that waht you need?

Link to comment
Share on other sites

Hi iiceman,

 

I tried to put alert to see what are the coordinate 'texcoords' is printing. Seems like it is not holding some points on the drawn curve. For example if I manage to draw a line with mouse from ( 1,2) to (5,2), I want some way to get points - (1,2), (3,2) and (5,2). s there any way to get it ?

 

Thanks again.

Link to comment
Share on other sites

I think it should... take a look at this: http://www.babylonjs-playground.com/#9U086#61

 

It logs the coordinates in your browsers debug console when drawing. To get the x-value you could also write texcoords.x and for y-value texcoords.y. It's just that it's writing that object 60 times per second... but you said as many points as possible ;)

Link to comment
Share on other sites

  • 8 months later...

hey @iiceman I thought your playground example was cool so I made a multi-player version of it here  www.punkoffice.com/webiverse  :)

canvas.jpg

Its not perfect though.  There can be problems when 2 people work on it at the same time.  Some changes get lost.  I'm working on ways to improve it.  Everything is so much harder when its multiplayer :/ 

Link to comment
Share on other sites

33 minutes ago, ozRocker said:

Hmm....I'm not as happy as I was yesterday.  This anonymous user keeps drawing penises and some Polish guy drew a big red swastika.  This is what happens when you open it to the world.  You attract savages!

don't care for rude people and be happy :)

Link to comment
Share on other sites

3 minutes ago, NasimiAsl said:

don't care for rude people and be happy :)

The problem is everyone that logs in will see it and might leave straight away, or hold me responsible.  This guy uses a lot of different IP addresses so he's hard to track.  I'm checking online for penis drawing (not photo) detection algorithm but apparently its not so easy.  Nintendo spent weeks creating a filter for it

Link to comment
Share on other sites

Well, it's probably impossible since pretty much everything can look like a penis, maybe somebody just wanted to draw a puppy: http://www.collegehumor.com/post/6972887/literally-everything-is-shaped-like-a-penis

You could hide the content and show a notice that the content on the board is user generated and you don't take responsibility for it and only show it after the user confirmed that.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...