Comments (4)
Another radical approach is to use Narrative Javascript library, that enables blocking capabilities for asynchronous event callbacks by precompiling synchronous code to pure asynchronous js.
This method needs few changes to existing code (writing some "->"s) and the complexity will be automatically handled by narrativejs-comiler.
from jslogo.
One more option is to use task.js updated for ES6 generators and use a transpiler like Traceur for ES5 runtimes.
from jslogo.
Thanks to lots of hard work by @ianb we're almost there. Try this:
to fern :size :sign
wait 1
if :size < 1 [ stop ]
fd :size
rt 70 * :sign fern :size * 0.5 :sign * -1 lt 70 * :sign
fd :size
lt 70 * :sign fern :size * 0.5 :sign rt 70 * :sign
rt 7 * :sign fern :size - 1 :sign lt 7 * :sign
bk :size * 2
end
window clearscreen pu bk 150 pd
fern 25 1
from jslogo.
Loops (FOR
, FOREVER
, WHILE
, etc) have a promiseYield
call in them delay a few ms. We can drop this into any other procedure where it makes sense.
from jslogo.
Related Issues (20)
- Implement pixel tests HOT 1
- Codemirror not highlighting code in locales other than English HOT 4
- Ensure logo.js has full coverage by tests
- Proposal: multiple turtles HOT 2
- language.html translation?
- Localized TO & END replaced with English in Library HOT 1
- Editing on Android tablet is broken
- Export library to text or cookies? HOT 1
- Link to bfoit.org is broken HOT 2
- Add support for controlling a physical turtle HOT 2
- Tail recursion which doesn't terminate doesn't show output
- "Stop" button crashes the interpreter HOT 3
- forgeting space around variables silently crashes JSlogo interpreter HOT 2
- Spaces required inside the while statements HOT 1
- print issue HOT 1
- FR: make editor windows bigger/scalable
- Make https://people.eecs.berkeley.edu/~bh/logo-sample.html work
- Suggestion: query to find the screen size (or if position is onscreen/offscreen) HOT 14
- Proposal: canvas copy and paste functions
- Add support to step, trace, pause buttons and recall list box
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jslogo.