setInterval(() => { if (!flashingCircle) { flashingCircle = new Circle(); flashingCircle.setColor(['green', 'red', 'blue', 'black'][Math.floor(Math.random() * 4)]); flashingCircle.setRadius(60); flashingCircle.setPos(200, 150); } else { flashingCircle.destroy(); flashingCircle = null; } }, 1000);
updateLeafletElement(fromProps: Props, toProps: Props) { if (toProps.center !== fromProps.center) { this.leafletElement.setLatLng(toProps.center) } if (toProps.radius !== fromProps.radius) { this.leafletElement.setRadius(toProps.radius) } }
setInterval(() => { circle.setRadius(Math.sin(new Date().getTime() / 500)*5 + 11); circle.setPos(Math.sin(new Date().getTime() / 500)*20 + 50, Math.cos(new Date().getTime() / 500)*20 + 50); line.setPos2(Math.sin(new Date().getTime() / 500)*20 + 50, Math.cos(new Date().getTime() / 500)*20 + 50); }, 10);
router.get('/setradius/:radius', async (ctx, next) => { let radius = parseFloat(ctx.params.radius) await page.evaluate((radius) => { setRadius(radius); }, radius) })
function setRadius(radius) { brushSet.setRadius(radius); }
function test() { console.log('test api'); setSize(1024, 1024); var array = []; for (var i = 0; i < 32; ++i) { array.push({ x: Math.random() * 2 - 1, y: Math.random() * 2 - 1, pressure: Math.random() }); } setRadius(0.1); setColor([0, 1, 1]); stroke(array); }
if(state.hdop>50 || state.pdop>50) return; if(2>state.hdop || 2>state.pdop) return; circle.setRadius( Math.sqrt(state.hdop*state.pdop) *10 );
subtitleSurface.setRadius(6); const r360 = new ReactInstance(bundle, parent, {
var radius = options && options.radius || this._radius; Path.prototype.setStyle.call(this, options); this.setRadius(radius); return this; },
marker.setRadius(4); marker.addTo(that.map); let {currentWpMarker, currentPosMarker} = this.state; currentWpMarker = L.circleMarker(position, {color: 'green', weight: 0, fillOpacity: 0.4}); currentWpMarker.setRadius(10); currentWpMarker.addTo(this.map); currentPosMarker.setRadius(10); currentPosMarker.addTo(this.map);
updateLeafletElement(fromProps: Props, toProps: Props) { if (toProps.center !== fromProps.center) { this.leafletElement.setLatLng(toProps.center) } if (toProps.radius !== fromProps.radius) { this.leafletElement.setRadius(toProps.radius) } }
var radius = options && options.radius || this._radius; Path.prototype.setStyle.call(this, options); this.setRadius(radius); return this; },