after12am / eisenscript

A programming language designed for generating awesome structures.
https://after12am.github.io/eisenscript-docs/
MIT License
46 stars 4 forks source link

build an uncompressed eisenscript.js #78

Open kronpano opened 4 years ago

kronpano commented 4 years ago

For BrowserSynth I have used the uncompressed version of eisenscript.js and modified it to contain geometries/exporters.... Is it possible to add an uncompressed eisenscript.js to the build folder or how can I build and uncompressed eisenscript.js

I am not sure how I can otherwise bring the changes over to BrowserSynth since my understanding of javascript is limited.

This is the code I have worked with /*

var EISEN = (function() { var exports = {}; exports.version='1.1.9'

// src/compiler.js exports.Compiler = function() { this.interpreter = undefined; }

exports.Compiler.prototype.compile = function(source) { this.interpreter = new Interpreter(); return this.interpreter.generate(this.parse(source)); } : :

after12am commented 4 years ago

I don't know hot to uncompressed. Here it is how to build eisenscript.

cd /path/to/eisenscript
npm install
npm build

Here it is how to develop in v1.3.4.

$(npm bin)/gulp serve
kronpano commented 4 years ago

guess that's what I must have done the last time then - 4 years ago ;)

will give that a go

after12am commented 4 years ago

I done site renewal.

see https://after12am.github.io/eisenscript-editor/

screencapture-after12am-github-io-eisenscript-editor-1586664308401

Delete local storage if not reflected.

eisenscript_editor_と_Microsoft_Word
after12am commented 4 years ago

fix #85

Performance update was done. Play around when you have time.

If not using transparency, you will be able to get good performance. Here is 21000 objects.

image

Cheers,

kronpano commented 4 years ago

Looking GOOOOOD!!

And you know what you are doing - which probably helps

If you add a proper object exporter and a couple more geometries (like the ones "easily" available in three.js sphere/cylinder/polygon/...) you can easily make my project obsolete - which would be absolutely fine since I am basically just "hacking" around without a "proper" way forward.

Keep it going - it looks brilliant!!!

kronpano commented 4 years ago

Oh and don't forget mirroring (fx,fy,fz) AFAIK that is the only language feature missing.

Those two lines work in "the original" Structure synth - build in mirroring and the implementation of the matrix is different

2 {fx h 120} 1 {x 5 s 3}box

2 { matrix -1 0 0 0 1 0 0 0 1 h 120} 1 {x 5 s 3}box

after12am commented 4 years ago

@kronpano please see #86

You can use defined varname in various case like this except blending. It takes a little time to implement it in blending.

#define aa 36

{ hue aa } box