Create custom connection [duplicate] - javascript

This question already has an answer here:
How do I create image connecting two vertices in mxGraph?
(1 answer)
Closed 9 years ago.
I want to create a specific connection between two nodes. The connection would have an image. Is this possible?
I work with mxGraph, javascript.
http://upload.wikimedia.org/wikipedia/commons/0/08/Simple_stock_and_flow_diagram.gif
Sorry, for my english. Thanks.

You'll need to (and I'm looking at the v2 API here) create your own edge shape, most likely based on mxConnector (in the shape folder). paintEdgeShape defines the rendering of the edge, you use the canvas API to define that drawing (see API specifications for mxAbstractCanvas2D).

Related

Phaser webgl shadows [duplicate]

This question already has an answer here:
Shadows and directional light in phaser 3?
(1 answer)
Closed 10 days ago.
How can I implement Shadows With The phaser.js Webgl lighting system
this.lights.enable();
this.lights.setAmbientColor(0x808080);
Heres what I'm Looking for:
How Do I implement the shadows coming off those trees in phaser
As mentioned in this question/answer, as far as I know you cannot create shadows/shadow effects out of the box with in phaser. Except you want to programm it with raycasting or so(link to an article), but that would be alot of work judt for background feature, that mihht not be seen.
A easy solution could be use several background images, wirh different shadows an switch them out when needed (a possible example is in the aforementioned answer).

Generating .grd files programmatically [duplicate]

This question already has answers here:
program/library to read photoshop gradient .grd file
(4 answers)
Photoshop export gradient ( .grd files )
(4 answers)
Closed 2 years ago.
I'm trying to generate .grd files in Javascript or PHP.
I googled a lot but I found that there is no way to do it yet!
I have gradient entries and I made it as PNG, CSS Code and SVG, And I want to convert one of these (or the original entries) into a .grd file that can let the visitors of the website download the gradient they want and then use it directly in Adobe Photoshop.
I found this library but it seems to not be for web. It's a Photoshop plugin programmed in JS.
After finding this library and it's made my JS that's mean it's possible to do it, and also it is going to be client side. That's cool.
It's not problem for me if it's server-side or client-side.
Any Idea please?
Thank you all

how to make layers in js [duplicate]

This question already has answers here:
Three.js - Geometry on top of another
(4 answers)
Closed 6 years ago.
Is there a way in js to set something like layers?
I want some objects in my canvas to no matter what - be rendered on top of everything, and some to be rendered behind everything, regardless of their real position in the scene.
Is it possible?
what is the way to do that?
Thanks
One method is to use multiple scenes. Set renderer.autoClear=false, then to render, something along the lines of:
renderer.clear();
renderer.render(bottomLayer, camera);
renderer.clearDepth();
renderer.render(topLayer, camera);
That wouldn't be suitable in some cases. If not, then you might look into the object renderOrder and material polygonOffset properties.

Custom Google Map

I can see mention, but no example of being able to use an image to create a Google Map (Or at least use their API). From what I can work out you can use the ImageMapType class in the API to create a map, instead of earth (or and area), an image like JPEG. Is this correct or am I barking up the wrong tree?
You might want to check out Leaflet JS for this. I've used it for custom tiles and it works well.
I found the tutorial I followed years ago. This should at least be a starting point... http://www.dicabrio.com/javascript/custom-world-google-maps.php

Looking for an open source or relatively cheap one time fee, for a map of the world with plotting capabilities in javascript [duplicate]

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
Alternatives to google maps api
I can't use google maps because their terms limit me as my service will charge a fee. But, google maps is overkill anyway. Just looking for a nice map of the world that we can plot some points on to show visitors online. Some caveats:
The map should be able to cluster (it's possible there are 10,000 points on the map, cluster would make it easier to see and faster to render)
Allowed for commercial use
Doesn't need to zoom to street level, but a little zoom is nice.
NOT FLASHBASED as this would need to work across iOS as well as windows.
May Openlayers help you? You can use many providers and add whatever you want over the map. Even accessible controls.
Examples provided

Categories