Comments (7)
Hi Citron,
Using viewof inside a ganja call is not possible (for now - the observableHQ guys have promised to keep this on their desired feature list). In the mean time I have provided a workaround that enables the next best thing. (its only published for SVG, for conformal space I'll try to upload it later tonight).
It boils down to that you can 'viewof' your entire graph, and you will be able to access all elements you have graphed from inside other cells.
e.g.
viewof myElements = PGA.inline(()=>this.graph([1e1^1e2, "test"]))
and then inside another cell you could access
myElements[0]
which would contain a PGA Element (the e12 bivector)
or
myElements[1]
which would contain the string "test"
And ofcourse these items would update inside observable if you drag them in the graph.
It's all the way at the bottom of this notebook.
from ganja.js.
So Great ! Waiting for it in CGA !
Thanks !
from ganja.js.
Working on it here - working but looks like its a frame behind .. tbc
from ganja.js.
basic interactivity and viewof response added .. the last demo in this notebook. Demonstrates the use of viewof to render great arcs in CGA, where the user can drag the two points around and get feedback both on the graph and in other observable cells.
I assume this issue can be closed ?
from ganja.js.
Awesome !
now that we can drag the points, it works better than what I requested.
By the way, now the "Segments and Triangles" section poses me two problems :
1/ The figures are not redrawn when you move a point
2/ we are allowed to drag "no" - which is defined as .5e5-.5e4 - but I would suggest to make it immutable ( because if you can alter "no" then why not alter "ni" ? it would lead us to an "Ekke Ekke Ekke Ekke Ptang Zoo Boing!" basis. ). Immutable.js could help.
And yes, this issue can be closed. Thank you very much.
from ganja.js.
Hehe - excellent !
you can easily make it immutable for the graphs by adding a "()=>" where its graphed .. that way you can pick between both behaviors :) - I'll update the other samples on that page so they respond as expected :)
👍
from ganja.js.
They should all work as expected now. (only very minor changes .. an extra functional here and there.) - next up are better camera controls for the GL visualizer. (better as in .. any ..)
from ganja.js.
Related Issues (20)
- Hex RegEx misses hex values
- Empty template strings freeze tokenizer
- suggested improvement to dual: option to graph() function HOT 2
- how can i use 'this.graph' in vue? HOT 5
- pga_dyn.html example is broken HOT 1
- interference with existing globally scoped `Element` and workaround HOT 2
- Straightforward way to get current camera view/projection matrix? HOT 1
- Add TypeScript support HOT 6
- Calling Inverse raises error in 0 dimensions
- The code is unclear HOT 1
- Support WebVR HOT 3
- Feature Request for {data:cubeF, transform:1+1e0}
- Feature request: larger viewport in (2,0,1)*
- Having troubles including classes within Algebra() scope HOT 4
- division by zero inconsistent with IEEE 754 standard
- Table at section "Ganja ingredients and syntax." should have a row for inner product operator "|" HOT 1
- Nested reactivity broken with OpenGL HOT 1
- Feature Request: General Inverse creation in the code generator HOT 1
- I found a reference that might be useful to include in the documentation
- Why doesn't ganja.js follow the right hand rule?
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 ganja.js.