Squeak
  links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
JavaScript version of Morphic
Last updated at 7:14 pm UTC on 24 February 2017
Jens Moenig did a JavaScript version of Morphic. It is based on ideas from the Squeak implementation but a complete rewrite of a minimal morphic system. It is used in Snap!

It offers the basics to do classic Morphic programming in JavaScript.

Example:
Squeak code
   m1 := Morph new.
   m1 position: 0 @ 0.
   m1 extent: 480@ 60.
   m1 color: (Color r: 0.0 g: 0.0 b: 1.0).


Javascript code
   m1 = new BoxMorph();
   m1.setPosition(new Point(0, 0));
   m1.setExtent(new Point(480, 60));
   m1.setColor(new Color(0, 0, 255));


Morphic.js - overview
Morphic.js - programming guide
Full documentation (2017).

https://github.com/jmoenig/morphic.js/blob/master/morphic.txt#L1099
citation:
This Morphic implementation for JavaScript is not a direct port of
Squeak's Morphic, but still many individual functions have been
ported almost literally from Squeak, sometimes even including their
comments, e.g. the morph duplication mechanism fullCopy(). Squeak
has been a treasure trove, and if morphic.js looks, feels and
smells a lot like Squeak, I'll take it as a compliment.