kopia lustrzana https://github.com/backface/turtlestitch
1 wiersz
11 KiB
XML
1 wiersz
11 KiB
XML
<blocks app="Snap! 5.1, http://snap.berkeley.edu" version="1"><block-definition s="$globe show current location" type="command" category="other"><header></header><code></code><translations>de:$globe zeige aktuellen Standort
pt:mostra a localização corrente do dispositivo no $globe
ca:$globe centra a la meva ubicació
</translations><inputs></inputs><script><custom-block s="set $globe to lon: %n lat: %n"><custom-block s="$globe current longitude"></custom-block><custom-block s="$globe current latitude"></custom-block></custom-block></script></block-definition><block-definition s="$globe zoom" type="reporter" category="other"><header></header><code></code><translations>de:$globe Zoom
pt:o zoom do $globe
ca:$globe zoom
</translations><inputs></inputs><script><block s="doReport"><block s="evaluate"><block s="reportJSFunction"><list><l>stage</l></list><l>return stage.worldMap.zoom;</l></block><list><block s="reportGet"><l><option>stage</option></l></block></list></block></block></script></block-definition><block-definition s="set $globe zoom to %'n'" type="command" category="other"><header></header><code></code><translations>de:setze $globe Zoom auf _
pt:altera o zoom do $globe para _
ca:$globe fixa el zoom a _
</translations><inputs><input type="%n">10</input></inputs><script><block s="doRun"><block s="reportJSFunction"><list><l>stage</l><l>n</l></list><l>stage.worldMap.setZoom(n)</l></block><list><block s="reportGet"><l><option>stage</option></l></block><block var="n"/></list></block><custom-block s="update $globe"></custom-block></script></block-definition><block-definition s="$globe longitude of x %'x'" type="reporter" category="other"><header></header><code></code><translations>de:$globe Längengrad von x _
pt:a longitude no $globe da coordenada x _
ca:$globe longitud per a x _
</translations><inputs><input type="%n">0</input></inputs><script><block s="doReport"><block s="evaluate"><block s="reportJSFunction"><list><l>stage</l><l>x</l></list><l>return stage.worldMap.lonFromSnapX(x)</l></block><list><block s="reportGet"><l><option>stage</option></l></block><block var="x"/></list></block></block></script></block-definition><block-definition s="$globe latitude of y %'y'" type="reporter" category="other"><header></header><code></code><translations>de:$globe Breitengrad von y _
pt:a latitude no $globe da coordenada y _
ca:$globe latitud per a y _
</translations><inputs><input type="%n">0</input></inputs><script><block s="doReport"><block s="evaluate"><block s="reportJSFunction"><list><l>stage</l><l>y</l></list><l>return stage.worldMap.latFromSnapY(y)</l></block><list><block s="reportGet"><l><option>stage</option></l></block><block var="y"/></list></block></block></script></block-definition><block-definition s="set $globe to lon: %'lon' lat: %'lat'" type="command" category="other"><header></header><code></code><translations>de:setze $globe auf Länge: _ Breite: _
pt:altera a posição no $globe para (longitude: _ , latitude: _ )
ca:$globe centra a longitud: _ latitud: _
</translations><inputs><input type="%n">-122.257852</input><input type="%n">37.872099</input></inputs><script><block s="doRun"><block s="reportJSFunction"><list><l>stage</l><l>lat</l><l>lon</l></list><l>stage.worldMap.setView(lon, lat);</l></block><list><block s="reportGet"><l><option>stage</option></l></block><block var="lat"/><block var="lon"/></list></block><custom-block s="update $globe"></custom-block></script></block-definition><block-definition s="y of $globe latitude %'lat'" type="reporter" category="other"><header></header><code></code><translations>de:y von $globe Breitengrad _
pt:a coordenada y da latitude _ no $globe
ca:$globe y per a latitud _
</translations><inputs><input type="%n"></input></inputs><script><block s="doReport"><block s="evaluate"><block s="reportJSFunction"><list><l>stage</l><l>lat</l></list><l>return stage.worldMap.snapYfromLat(lat)</l></block><list><block s="reportGet"><l><option>stage</option></l></block><block var="lat"/></list></block></block></script></block-definition><block-definition s="x of $globe longitude %'lng'" type="reporter" category="other"><header></header><code></code><translations>de:x von $globe Längengrad _
pt:a coordenada x da longidude _ no $globe
ca:$globe x per a longitud _
</translations><inputs><input type="%n"></input></inputs><script><block s="doReport"><block s="evaluate"><block s="reportJSFunction"><list><l>stage</l><l>lng</l></list><l>return stage.worldMap.snapXfromLon(lng)</l></block><list><block s="reportGet"><l><option>stage</option></l></block><block var="lng"/></list></block></block></script></block-definition><block-definition s="change $globe by x: %'x' y: %'y' pixels" type="command" category="other"><header></header><code></code><translations>de:ändere $globe um x: _ y: _ Pixel
pt:desloca a posição do mapa de (x: _ , y: _ )
ca:$globe canvia la ubicació en x: _ y: _ píxels
</translations><inputs><input type="%n">10</input><input type="%n">10</input></inputs><script><block s="doRun"><block s="reportJSFunction"><list><l>stage</l><l>x</l><l>y</l></list><l>stage.worldMap.panBy(x, y)</l></block><list><block s="reportGet"><l><option>stage</option></l></block><block var="x"/><block var="y"/></list></block><custom-block s="update $globe"></custom-block></script></block-definition><block-definition s="$globe distance in km to %'target'" type="reporter" category="other"><header></header><code></code><translations>de:$globe Entfernung in km zu _
pt:a tua distância em km a _ no $globo
ca:$globe distància en km fins a _
</translations><inputs><input type="%s" readonly="true"><options>§_objectsMenu</options></input></inputs><script><block s="doDeclareVariables"><list><l>trg</l></list></block><block s="doSetVar"><l>trg</l><block s="reportObject"><block var="target"/></block></block><block s="doIf"><block s="reportNot"><block s="reportAnd"><block s="reportIsA"><block s="reportGet"><l><option>self</option></l></block><l><option>sprite</option></l></block><block s="reportIsA"><block var="trg"/><l><option>sprite</option></l></block></block></block><script><block s="doReport"><l>-1</l></block></script></block><block s="doReport"><block s="evaluate"><block s="reportJSFunction"><list><l>stage</l><l>lat1</l><l>lng1</l><l>lat2</l><l>lng2</l></list><l>return stage.worldMap.distanceInKm(lat1, lng1, lat2, lng2)</l></block><list><block s="reportGet"><l><option>stage</option></l></block><custom-block s="$globe latitude of y %n"><block s="yPosition"></block></custom-block><custom-block s="$globe longitude of x %n"><block s="xPosition"></block></custom-block><custom-block s="$globe latitude of y %n"><block s="reportAttributeOf"><l><option>y position</option></l><block var="target"/></block></custom-block><custom-block s="$globe longitude of x %n"><block s="reportAttributeOf"><l><option>x position</option></l><block var="target"/></block></custom-block></list></block></block></script></block-definition><block-definition s="$globe current location" type="reporter" category="other"><header></header><code></code><translations>de:$globe aktuelle Position
pt:a localização corrente do dispositivo no $globe
ca:$globe ubicació actual
</translations><inputs></inputs><script><block s="doDeclareVariables"><list><l>test</l></list></block><block s="doSetVar"><l>test</l><block s="evaluate"><block s="reportJSFunction"><list></list><l>var crd = new List(),
 myself = this,
 options = {
 enableHighAccuracy: true,
 timeout: 5000,
 maximumAge: 0
 };

function success(pos) {
 crd = new List([
 pos.coords.latitude,
 pos.coords.longitude
 ]);
}

function error(err) {
 crd = new List([37.872099, -122.257852]);
 myself.inform('Warning:\nGeolocation failed.');
}

navigator.geolocation.getCurrentPosition(
 success,
 error,
 options
);

return function () {return crd; }</l></block><list></list></block></block><block s="doWaitUntil"><block s="reportEquals"><block s="reportListLength"><block s="evaluate"><block var="test"/><list></list></block></block><l>2</l></block></block><block s="doReport"><block s="evaluate"><block var="test"/><list></list></block></block></script></block-definition><block-definition s="$globe current latitude" type="reporter" category="other"><header></header><code></code><translations>de:$globe aktueller Breitengrad
pt:a latitude corrente do dispositivo no $globe
ca:$globe latitud actual
</translations><inputs></inputs><script><block s="doReport"><block s="reportListItem"><l>1</l><custom-block s="$globe current location"></custom-block></block></block></script></block-definition><block-definition s="$globe current longitude" type="reporter" category="other"><header></header><code></code><translations>de:$globe aktueller Längengrad
pt:a longitude corrente do dispositivo no $globe
ca:$globe longitud actual
</translations><inputs></inputs><script><block s="doReport"><block s="reportListItem"><l>2</l><custom-block s="$globe current location"></custom-block></block></block></script></block-definition><block-definition s="update $globe" type="command" category="other"><header></header><code></code><translations>de:aktualisiere $globe
pt:actualiza o $globe
ca:$globe força refresc
</translations><inputs></inputs><script><block s="doRun"><block s="reportJSFunction"><list><l>stage</l></list><l>stage.worldMap.extent = stage.dimensions;
stage.worldMap.render()</l></block><list><block s="reportGet"><l><option>stage</option></l></block></list></block><block s="doTellTo"><block s="reportGet"><l><option>stage</option></l></block><block s="reifyScript"><script><block s="doSwitchToCostume"><custom-block s="$globe as costume"></custom-block></block></script><list></list></block><list></list></block></script></block-definition><block-definition s="$globe as costume" type="reporter" category="other"><header></header><code></code><translations>de:$globe als Kostüm
pt:a parte visível do $globe na forma de traje
ca:$globe vestit del mapa actual
</translations><inputs></inputs><script><block s="doWaitUntil"><block s="evaluate"><block s="reportJSFunction"><list><l>stage</l></list><l>return !stage.worldMap.loading</l></block><list><block s="reportGet"><l><option>stage</option></l></block></list></block></block><block s="doReport"><block s="evaluate"><block s="reportJSFunction"><list><l>stage</l></list><l>return new Costume(stage.worldMap.canvas, 'map')</l></block><list><block s="reportGet"><l><option>stage</option></l></block></list></block></block></script></block-definition><block-definition s="set $globe style to %'name'" type="command" category="other"><header></header><code></code><translations>de:setze $globe Stil auf _
pt:altera o estilo do $globe para _
ca:$globe fixa l'estil de mapa a _
</translations><inputs><input type="%s" readonly="true">Wikimedia<options>OpenStreetMap
Wikimedia
Watercolor
Toner
Terrain
Topographic
Satellite
Streets
Shading
Mapbox (experimental)</options></input></inputs><script><block s="doRun"><block s="reportJSFunction"><list><l>stage</l><l>name</l></list><l>stage.worldMap.setHost(name)</l></block><list><block s="reportGet"><l><option>stage</option></l></block><block var="name"/></list></block><custom-block s="update $globe"></custom-block></script></block-definition></blocks> |