Hi again!
I try some hours to get rhombus from procedure_square and cant do it!
there is a way to create procedure rhombus from procedural_square or another figure???
Hi again!
I try some hours to get rhombus from procedure_square and cant do it!
there is a way to create procedure rhombus from procedural_square or another figure???
Hi
You could use _wade_isoDefault instead of procedural_square. It is probably close to the shape that you need.
To clarify: _wade_isoDefault is only available when wade.iso has been initialised, so if you aren't using wade.iso, it may not be available.
In that case, you may want to do this:
var a = new Sprite('procedural_square');
a.setRotation(Math.PI/4);
a.drawToImage('rhombus', true, null, null, null, '2d');
var b = new Sprite('rhombus');
wade.addSceneObject(new SceneObject(b));
Thank, Gio!
I wanna do same rhombus as a iso tile - 2 unit of width and 1 unit of height.
Let deep in my app - in another post i write about a game concept - an rpg/rts with huge map and pseudo-iometric, whithout iso-plugin.
I create a grid like an isometric grid, with object in per one point
and as you see it look like isometric.
In my game i planing that it be a land with which the player can interact - buy it, build on it, destroy building on it ...etc.
So i want insert in all point a rhombus and i see 2 ways:
1 - paint a png rhombus, use it as template with pixel perfect
2 - draw rhombus
First way i see some expensive for CPU, second way - i dont know how:)
Please help, Gio!
and also i have more quiestion about UI - please make video tutorial about it and UI elements - such as inputs (text, pass etc)
If you used wade.iso you could do this with a few lines of code... it sounds like you're going to essentially rewrite what wade.iso would already do.
Anyway, if you want to do it this way, your solution number 1 is not too bad. If everything is using the same image, wade will cache the image data and use the same (small) image data for all your rhombus png sprites, so it won't be very expensive... it's just one or two array lookups for each click, in fact it's going to be pretty fast. Saying that, wade.iso would work out which tile was clicked based on the screen coordinates (no lookups), so it would be even faster.
Regarding text input, this depends on the platform that you're targeting. Usually the easiest solution is to just create a normal <input> element in the DOM and use that, so you can be sure that it works correctly on every platform (i.e. on a phone you'd get the virtual keyboard, on a pc you wouldn't, etc). If this is for PC only, then it's probably ok to just use a sprite and respond to onKeyDown or onKeyPress events.