This is next part of my project.
I use a 3d glasses for convergence exercises. But i have two problems, i move it and the converge.
But i want the blue random point RDS was the same in the red square. The two squares i need the same. I did some changes but always work but are diferent.
This is to be create a Stereogram exercises like this:
This cross are the same patron.
This is my event;
{"is-c3-clipboard-data":true,"type":"events","items":[{"eventType":"variable","name":"y","type":"number","initialValue":"0","comment":"","isStatic":false,"isConstant":false},{"eventType":"variable","name":"x","type":"number","initialValue":"0","comment":"","isStatic":false,"isConstant":false},{"eventType":"variable","name":"value","type":"number","initialValue":"0","comment":"","isStatic":false,"isConstant":false},{"eventType":"block","conditions":[{"id":"on-start-of-layout","objectClass":"System"}],"actions":[{"id":"set-layer-background-color","objectClass":"System","parameters":{"layer":"0","color":"rgbEx(0, 0, 0)"}},{"callFunction":"guardar instantaneas"}]},{"eventType":"block","conditions":[{"id":"on-snapshot","objectClass":"LienzoDeDibujo"}],"actions":[],"children":[{"eventType":"block","conditions":[{"id":"repeat","objectClass":"System","parameters":{"count":"LienzoDeDibujo.SnapshotWidth"}}],"actions":[{"callFunction":"x"}],"children":[{"eventType":"block","conditions":[{"id":"repeat","objectClass":"System","parameters":{"count":"LienzoDeDibujo.SnapshotHeight"}}],"actions":[{"callFunction":"y"},{"callFunction":"value"},{"id":"snapshot-set-pixel","objectClass":"LienzoDeDibujo","parameters":{"x":"x","y":"y","color":"rgba(0, 0, value*100, 100)"}}]}]}]},{"eventType":"block","conditions":[],"actions":[{"id":"load-snapshot","objectClass":"LienzoDeDibujo"}]},{"eventType":"block","conditions":[{"id":"on-snapshot","objectClass":"LienzoDeDibujo2"}],"actions":[],"children":[{"eventType":"block","conditions":[{"id":"repeat","objectClass":"System","parameters":{"count":"LienzoDeDibujo2.SnapshotWidth"}}],"actions":[{"callFunction":"x"}],"children":[{"eventType":"block","conditions":[{"id":"repeat","objectClass":"System","parameters":{"count":"LienzoDeDibujo2.SnapshotHeight"}}],"actions":[{"callFunction":"y"},{"callFunction":"value"},{"id":"snapshot-set-pixel","objectClass":"LienzoDeDibujo2","parameters":{"x":"x","y":"y","color":"rgba(value*100, 0, 0, 100)"}}]}]}]},{"eventType":"block","conditions":[],"actions":[{"id":"load-snapshot","objectClass":"LienzoDeDibujo2"}]},{"eventType":"block","conditions":[{"id":"on-snapshot","objectClass":"LienzoDeDibujo3"}],"actions":[],"children":[{"eventType":"block","conditions":[{"id":"repeat","objectClass":"System","parameters":{"count":"LienzoDeDibujo3.SnapshotWidth"}}],"actions":[{"callFunction":"x"}],"children":[{"eventType":"block","conditions":[{"id":"repeat","objectClass":"System","parameters":{"count":"LienzoDeDibujo3.SnapshotHeight"}}],"actions":[{"callFunction":"y"},{"callFunction":"value"},{"id":"snapshot-set-pixel","objectClass":"LienzoDeDibujo","parameters":{"x":"x","y":"y","color":"rgba(0, 0, value*100, 100)"}}]}]}]},{"eventType":"block","conditions":[],"actions":[{"id":"load-snapshot","objectClass":"LienzoDeDibujo3"}]},{"eventType":"block","conditions":[{"id":"on-snapshot","objectClass":"LienzoDeDibujo4"}],"actions":[],"children":[{"eventType":"block","conditions":[{"id":"repeat","objectClass":"System","parameters":{"count":"LienzoDeDibujo4.SnapshotWidth"}}],"actions":[{"callFunction":"x"}],"children":[{"eventType":"block","conditions":[{"id":"repeat","objectClass":"System","parameters":{"count":"LienzoDeDibujo4.SnapshotHeight"}}],"actions":[{"callFunction":"y"},{"callFunction":"value"},{"id":"snapshot-set-pixel","objectClass":"LienzoDeDibujo2","parameters":{"x":"x","y":"y","color":"rgba(value*100, 0, 0, 100)"}}]}]}]},{"eventType":"block","conditions":[],"actions":[{"id":"load-snapshot","objectClass":"LienzoDeDibujo4"}]},{"eventType":"block","conditions":[{"id":"on-key-pressed","objectClass":"Teclado","parameters":{"key":37}},{"id":"key-is-down","objectClass":"Teclado","parameters":{"key":37}}],"actions":[{"id":"set-x","objectClass":"LienzoDeDibujo","parameters":{"x":"LienzoDeDibujo.X-5"}},{"id":"set-x","objectClass":"LienzoDeDibujo2","parameters":{"x":"LienzoDeDibujo2.X+5"}},{"id":"set-x","objectClass":"LienzoDeDibujo3","parameters":{"x":"LienzoDeDibujo3.X-5"}},{"id":"set-x","objectClass":"LienzoDeDibujo4","parameters":{"x":"LienzoDeDibujo4.X-5"}}],"isOrBlock":true},{"eventType":"block","conditions":[{"id":"on-key-pressed","objectClass":"Teclado","parameters":{"key":39}},{"id":"key-is-down","objectClass":"Teclado","parameters":{"key":39}}],"actions":[{"id":"set-x","objectClass":"LienzoDeDibujo","parameters":{"x":"LienzoDeDibujo.X+5"}},{"id":"set-x","objectClass":"LienzoDeDibujo2","parameters":{"x":"LienzoDeDibujo2.X-5"}},{"id":"set-x","objectClass":"LienzoDeDibujo3","parameters":{"x":"LienzoDeDibujo3.X+5"}},{"id":"set-x","objectClass":"LienzoDeDibujo4","parameters":{"x":"LienzoDeDibujo4.X-5"}}],"isOrBlock":true},{"functionName":"x","functionDescription":"","functionCategory":"","functionReturnType":"none","functionIsAsync":false,"functionParameters":[],"eventType":"function-block","conditions":[],"actions":[{"id":"set-eventvar-value","objectClass":"System","parameters":{"variable":"x","value":"loopindex"}}]},{"functionName":"y","functionDescription":"","functionCategory":"","functionReturnType":"none","functionIsAsync":false,"functionParameters":[],"eventType":"function-block","conditions":[],"actions":[{"id":"set-eventvar-value","objectClass":"System","parameters":{"variable":"y","value":"loopindex"}}]},{"functionName":"value","functionDescription":"","functionCategory":"","functionReturnType":"none","functionIsAsync":false,"functionParameters":[],"eventType":"function-block","conditions":[],"actions":[{"id":"set-eventvar-value","objectClass":"System","parameters":{"variable":"value","value":"random(1)"}},{"id":"set-function-return-value","objectClass":"Functions","parameters":{"value":"random(1)"}}]},{"functionName":"guardar instantaneas","functionDescription":"","functionCategory":"","functionReturnType":"none","functionIsAsync":false,"functionParameters":[],"eventType":"function-block","conditions":[],"actions":[{"id":"save-snapshot","objectClass":"LienzoDeDibujo"},{"id":"save-snapshot","objectClass":"LienzoDeDibujo2"},{"id":"save-snapshot","objectClass":"LienzoDeDibujo3"},{"id":"save-snapshot","objectClass":"LienzoDeDibujo4"}]}]}
| Global número y = 0
| Global número x = 0
| Global número value = 0
+ Sistema: Al iniciar escena
-> Sistema: Establecer color de fondo de la capa 0 a rgbEx(0, 0, 0)}.
-> Funciones: Llamar a guardar instantaneas
+ LienzoDeDibujo: Al hacer instantánea
----+ Sistema: Repetir LienzoDeDibujo.SnapshotWidth veces
-----> Funciones: Llamar a x
--------+ Sistema: Repetir LienzoDeDibujo.SnapshotHeight veces
---------> Funciones: Llamar a y
---------> Funciones: Llamar a value
---------> LienzoDeDibujo: Establecer el píxel en la instantánea de (x,y) a rgba(0, 0, value×100, 100))
+ (no condiciones)
-> LienzoDeDibujo: Cargar instantánea en el lienzo
+ LienzoDeDibujo2: Al hacer instantánea
----+ Sistema: Repetir LienzoDeDibujo2.SnapshotWidth veces
-----> Funciones: Llamar a x
--------+ Sistema: Repetir LienzoDeDibujo2.SnapshotHeight veces
---------> Funciones: Llamar a y
---------> Funciones: Llamar a value
---------> LienzoDeDibujo2: Establecer el píxel en la instantánea de (x,y) a rgba(value×100, 0, 0, 100))
+ (no condiciones)
-> LienzoDeDibujo2: Cargar instantánea en el lienzo
+ LienzoDeDibujo3: Al hacer instantánea
----+ Sistema: Repetir LienzoDeDibujo3.SnapshotWidth veces
-----> Funciones: Llamar a x
--------+ Sistema: Repetir LienzoDeDibujo3.SnapshotHeight veces
---------> Funciones: Llamar a y
---------> Funciones: Llamar a value
---------> LienzoDeDibujo: Establecer el píxel en la instantánea de (x,y) a rgba(0, 0, value×100, 100))
+ (no condiciones)
-> LienzoDeDibujo3: Cargar instantánea en el lienzo
+ LienzoDeDibujo4: Al hacer instantánea
----+ Sistema: Repetir LienzoDeDibujo4.SnapshotWidth veces
-----> Funciones: Llamar a x
--------+ Sistema: Repetir LienzoDeDibujo4.SnapshotHeight veces
---------> Funciones: Llamar a y
---------> Funciones: Llamar a value
---------> LienzoDeDibujo2: Establecer el píxel en la instantánea de (x,y) a rgba(value×100, 0, 0, 100))
+ (no condiciones)
-> LienzoDeDibujo4: Cargar instantánea en el lienzo
+ Teclado: Al presionar ←
+ O Teclado: ← Está presionada
-> LienzoDeDibujo: Establecer X a LienzoDeDibujo.X-5
-> LienzoDeDibujo2: Establecer X a LienzoDeDibujo2.X+5
-> LienzoDeDibujo3: Establecer X a LienzoDeDibujo3.X-5
-> LienzoDeDibujo4: Establecer X a LienzoDeDibujo4.X-5
+ Teclado: Al presionar →
+ O Teclado: → Está presionada
-> LienzoDeDibujo: Establecer X a LienzoDeDibujo.X+5
-> LienzoDeDibujo2: Establecer X a LienzoDeDibujo2.X-5
-> LienzoDeDibujo3: Establecer X a LienzoDeDibujo3.X+5
-> LienzoDeDibujo4: Establecer X a LienzoDeDibujo4.X-5
* Al ejecutarse la función 'x'
-> Sistema: Establecer x a loopindex
* Al ejecutarse la función 'y'
-> Sistema: Establecer y a loopindex
* Al ejecutarse la función 'value'
-> Sistema: Establecer value a random(1)
-> Funciones: Establecer el valor de retorno random(1)
* Al ejecutarse la función 'guardar instantaneas'
-> LienzoDeDibujo: Guardar instantánea
-> LienzoDeDibujo2: Guardar instantánea
-> LienzoDeDibujo3: Guardar instantánea
-> LienzoDeDibujo4: Guardar instantánea
How can i do?
Thanks a lot.