Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #39340 > unrolled thread
| Started by | Kristjan Robam <jippii1291983@gmail.com> |
|---|---|
| First post | 2020-12-27 08:04 -0800 |
| Last post | 2020-12-27 12:57 -0800 |
| Articles | 12 — 4 participants |
Back to article view | Back to comp.lang.javascript
New problem. Random colors to picture points with same distance as original... Kristjan Robam <jippii1291983@gmail.com> - 2020-12-27 08:04 -0800
Re: New problem. Random colors to picture points with same distance as original... "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2020-12-27 09:03 -0800
Re: New problem. Random colors to picture points with same distance as original... Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2020-12-27 21:35 +0100
Re: New problem. Random colors to picture points with same distance as original... Kristjan Robam <jippii1291983@gmail.com> - 2020-12-27 12:46 -0800
Re: New problem. Random colors to picture points with same distance as original... Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2020-12-29 23:00 +0100
Re: New problem. Random colors to picture points with same distance as original... "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2020-12-29 15:10 -0800
Re: New problem. Random colors to picture points with same distance as original... Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2020-12-30 01:28 +0100
Re: New problem. Random colors to picture points with same distance as original... Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2020-12-30 01:33 +0100
Re: New problem. Random colors to picture points with same distance as original... "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2020-12-29 19:16 -0800
Re: New problem. Random colors to picture points with same distance as original... H e <he12457@hotmail.com> - 2021-01-15 09:20 -0800
Re: New problem. Random colors to picture points with same distance as original... Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2021-01-16 00:48 +0100
Re: New problem. Random colors to picture points with same distance as original... Kristjan Robam <jippii1291983@gmail.com> - 2020-12-27 12:57 -0800
| From | Kristjan Robam <jippii1291983@gmail.com> |
|---|---|
| Date | 2020-12-27 08:04 -0800 |
| Subject | New problem. Random colors to picture points with same distance as original... |
| Message-ID | <9c826658-ec67-4f21-badf-7159371fb499n@googlegroups.com> |
...and all same color areas must match same random colors. We started to discuss this in: https://groups.google.com/g/comp.lang.javascript/c/VvCi7Sfq9os There is a start code. I programmed it myself. But it runs very slowly. If someone has time to check this, I would be very thankful, since I am very busy at the moment. If anyone knows a place with that code, then please paste it here. Kristjan Robam
[toc] | [next] | [standalone]
| From | "Michael Haufe (TNO)" <tno@thenewobjective.com> |
|---|---|
| Date | 2020-12-27 09:03 -0800 |
| Message-ID | <05dbc574-1b62-4eef-9ae8-76e877ae0172n@googlegroups.com> |
| In reply to | #39340 |
On Sunday, December 27, 2020 at 10:04:44 AM UTC-6, jippii...@gmail.com wrote: > ...and all same color areas must match same random colors. > > We started to discuss this in: > https://groups.google.com/g/comp.lang.javascript/c/VvCi7Sfq9os > > There is a start code. I programmed it myself. But it runs very slowly. > If someone has time to check this, I would be very thankful, > since I am very busy at the moment. > > If anyone knows a place with that code, then please paste it here. You first. What did you do so far?
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2020-12-27 21:35 +0100 |
| Message-ID | <12673259.uLZWGnKmhe@PointedEars.de> |
| In reply to | #39341 |
Michael Haufe (TNO) wrote:
> On Sunday, December 27, 2020 at 10:04:44 AM UTC-6, jippii...@gmail.com
> wrote:
>> ...and all same color areas must match same random colors.
>>
>> We started to discuss this in:
>> https://groups.google.com/g/comp.lang.javascript/c/VvCi7Sfq9os
>>
>> There is a start code. I programmed it myself. But it runs very slowly.
>> If someone has time to check this, I would be very thankful,
>> since I am very busy at the moment.
>>
>> If anyone knows a place with that code, then please paste it here.
>
> You first. What did you do so far?
The following refers to the code referred as the “start code” in that
discussion. The OP did NOT program it themselves. (Apparently these
script-kiddies think that copy-and-pray would be the same as programming.)
<https://groups.google.com/g/comp.programming/c/ch6aYxj0_RI>
Somebody is running there
function aaaaa() {
// Canvas stuff
}
setInterval(aaaaa, 1);
(sic!)
Of course it runs slow with a 1 ms (or in Gecko normalized to 10 ms)
interval.
--
PointedEars
FAQ: <http://PointedEars.de/faq> | <http://PointedEars.de/es-matrix>
<https://github.com/PointedEars> | <http://PointedEars.de/wsvn/>
Twitter: @PointedEars2 | Please do not cc me./Bitte keine Kopien per E-Mail.
[toc] | [prev] | [next] | [standalone]
| From | Kristjan Robam <jippii1291983@gmail.com> |
|---|---|
| Date | 2020-12-27 12:46 -0800 |
| Message-ID | <d7626262-c2a1-4a33-a8fb-2f0097fcbeean@googlegroups.com> |
| In reply to | #39342 |
Thomas 'PointedEars' Lahn kirjutas pühapäev, 27. detsember 2020 kl 22:35:51 UTC+2:
> Michael Haufe (TNO) wrote:
>
> > On Sunday, December 27, 2020 at 10:04:44 AM UTC-6, jippii...@gmail.com
> > wrote:
> >> ...and all same color areas must match same random colors.
> >>
> >> We started to discuss this in:
> >> https://groups.google.com/g/comp.lang.javascript/c/VvCi7Sfq9os
> >>
> >> There is a start code. I programmed it myself. But it runs very slowly.
> >> If someone has time to check this, I would be very thankful,
> >> since I am very busy at the moment.
> >>
> >> If anyone knows a place with that code, then please paste it here.
> >
> > You first. What did you do so far?
> The following refers to the code referred as the “start code” in that
> discussion. The OP did NOT program it themselves. (Apparently these
> script-kiddies think that copy-and-pray would be the same as programming.)
>
> <https://groups.google.com/g/comp.programming/c/ch6aYxj0_RI>
>
> Somebody is running there
>
> function aaaaa() {
> // Canvas stuff
> }
>
> setInterval(aaaaa, 1);
>
> (sic!)
>
> Of course it runs slow with a 1 ms (or in Gecko normalized to 10 ms)
> interval.
>
> --
> PointedEars
> FAQ: <http://PointedEars.de/faq> | <http://PointedEars.de/es-matrix>
> <https://github.com/PointedEars> | <http://PointedEars.de/wsvn/>
> Twitter: @PointedEars2 | Please do not cc me./Bitte keine Kopien per E-Mail.
Yes.
This is it, but there is one problem.
The transitions are not good.
They should be smooth.
Kristjan
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2020-12-29 23:00 +0100 |
| Message-ID | <20902913.EfDdHjke4D@PointedEars.de> |
| In reply to | #39343 |
Kristjan Robam wrote:
> Thomas 'PointedEars' Lahn kirjutas pühapäev, 27. detsember 2020 kl
> 22:35:51 UTC+2:
[Attribution *line*, NOT attribution novel.]
>> <https://groups.google.com/g/comp.programming/c/ch6aYxj0_RI>
>>
>> Somebody is running there
>>
>> function aaaaa() {
>> // Canvas stuff
>> }
>>
>> setInterval(aaaaa, 1);
>>
>> (sic!)
>>
>> Of course it runs slow with a 1 ms (or in Gecko normalized to 10 ms)
>> interval.
>
> Yes.
>
> This is it, but there is one problem.
> The transitions are not good.
> They should be smooth.
[Please trim your quotes to *the relevant minimum*.]
Smooth animations should not be programmed using a tight loop or Interval,
but with one of
A) reasonable values for the Interval (≥ 10 ms);
B) a reasonable delay (≥ 10 ms) for the timeout for the next animation
frame (I have written a library that does this; I guess other
people, too);
C) <https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame>
D) CSS transitions/animations, perhaps with SVG, instead of Canvas.
Lack of smoothness in an animation can also be due to software-based
rendering instead of hardware acceleration being used. A possibility that
would likely lead to the use of hardware acceleration (if the suitable
graphics hardware and driver are present, and the feature is enabled in
the user agent) is
var ctx = canvas.getContext('webgl');
or
var ctx = canvas.getContext('webgl2');
<https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/getContext>
However, I am not well-versed in Canvas (I prefer SVG), and I do not know
how suitable those would be in this case.
--
PointedEars
FAQ: <http://PointedEars.de/faq> | <http://PointedEars.de/es-matrix>
<https://github.com/PointedEars> | <http://PointedEars.de/wsvn/>
Twitter: @PointedEars2 | Please do not cc me./Bitte keine Kopien per E-Mail.
[toc] | [prev] | [next] | [standalone]
| From | "Michael Haufe (TNO)" <tno@thenewobjective.com> |
|---|---|
| Date | 2020-12-29 15:10 -0800 |
| Message-ID | <9c900495-a9ac-400d-8faf-1951ee5de544n@googlegroups.com> |
| In reply to | #39348 |
On Tuesday, December 29, 2020 at 4:00:52 PM UTC-6, Thomas 'PointedEars' Lahn wrote: > However, I am not well-versed in Canvas (I prefer SVG), and I do not know > how suitable those would be in this case. And worth noting that SVG provides significant filter support: <https://www.smashingmagazine.com/2015/05/why-the-svg-filter-is-awesome/>
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2020-12-30 01:28 +0100 |
| Message-ID | <8702050.CDJkKcVGEf@PointedEars.de> |
| In reply to | #39349 |
Michael Haufe (TNO) wrote: > On Tuesday, December 29, 2020 at 4:00:52 PM UTC-6, Thomas 'PointedEars' > Lahn wrote: >> However, I am not well-versed in Canvas (I prefer SVG), and I do not know >> how suitable those would be in this case. > > And worth noting that SVG provides significant filter support: > > <https://www.smashingmagazine.com/2015/05/why-the-svg-filter-is-awesome/> Amazing. Thank you :) \\//, Live long and prosper -- PointedEars FAQ: <http://PointedEars.de/faq> | <http://PointedEars.de/es-matrix> <https://github.com/PointedEars> | <http://PointedEars.de/wsvn/> Twitter: @PointedEars2 | Please do not cc me./Bitte keine Kopien per E-Mail.
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2020-12-30 01:33 +0100 |
| Message-ID | <3022498.5fSG56mABF@PointedEars.de> |
| In reply to | #39349 |
Michael Haufe (TNO) wrote: > On Tuesday, December 29, 2020 at 4:00:52 PM UTC-6, Thomas 'PointedEars' > Lahn wrote: >> However, I am not well-versed in Canvas (I prefer SVG), and I do not know >> how suitable those would be in this case. > > And worth noting that SVG provides significant filter support: > > <https://www.smashingmagazine.com/2015/05/why-the-svg-filter-is-awesome/> This is a bit off-topic, but: I do not buy the accessibility argument, though. For example, it is not possible to copy the styled text in an SVG image easily (in Chromium, but probably elsewhere, too). -- PointedEars FAQ: <http://PointedEars.de/faq> | <http://PointedEars.de/es-matrix> <https://github.com/PointedEars> | <http://PointedEars.de/wsvn/> Twitter: @PointedEars2 | Please do not cc me./Bitte keine Kopien per E-Mail.
[toc] | [prev] | [next] | [standalone]
| From | "Michael Haufe (TNO)" <tno@thenewobjective.com> |
|---|---|
| Date | 2020-12-29 19:16 -0800 |
| Message-ID | <50a34160-dcfb-4498-abd7-4ddc3a9a8916n@googlegroups.com> |
| In reply to | #39351 |
On Tuesday, December 29, 2020 at 6:33:48 PM UTC-6, Thomas 'PointedEars' Lahn wrote: > This is a bit off-topic, but: > > I do not buy the accessibility argument, though. For example, it is not > possible to copy the styled text in an SVG image easily (in Chromium, but > probably elsewhere, too). Works for me in Brave, Firefox, and Edge. Do you have an example of one where it's not easy to copy? The website above was using screenshots of the SVGs. Clicking "Demo" in the caption displays the actual SVG
[toc] | [prev] | [next] | [standalone]
| From | H e <he12457@hotmail.com> |
|---|---|
| Date | 2021-01-15 09:20 -0800 |
| Message-ID | <25798acc-5807-49c4-b229-0ea641359eb6n@googlegroups.com> |
| In reply to | #39352 |
https://groups.google.com/g/alt.tv.game-shows/c/kpPHeI8RxSI/m/UdJyODeSAQAJ
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2021-01-16 00:48 +0100 |
| Message-ID | <2756777.e9J7NaK4W3@PointedEars.de> |
| In reply to | #39352 |
Michael Haufe (TNO) wrote: > […] Thomas 'PointedEars' Lahn wrote: >> This is a bit off-topic, but: >> >> I do not buy the accessibility argument, though. For example, it is not >> possible to copy the styled text in an SVG image easily (in Chromium, but >> probably elsewhere, too). > > Works for me in Brave, Firefox, and Edge. Do you have an example of one > where it's not easy to copy? Try it in Chromium. It works occasionally, but it is a PITA compared to normal text. I have not tested yet whether screenreaders read it. -- PointedEars FAQ: <http://PointedEars.de/faq> | <http://PointedEars.de/es-matrix> <https://github.com/PointedEars> | <http://PointedEars.de/wsvn/> Twitter: @PointedEars2 | Please do not cc me./Bitte keine Kopien per E-Mail.
[toc] | [prev] | [next] | [standalone]
| From | Kristjan Robam <jippii1291983@gmail.com> |
|---|---|
| Date | 2020-12-27 12:57 -0800 |
| Message-ID | <ac88de89-261c-4510-abf9-ec6adba53462n@googlegroups.com> |
| In reply to | #39342 |
Thomas 'PointedEars' Lahn kirjutas pühapäev, 27. detsember 2020 kl 22:35:51 UTC+2:
> Michael Haufe (TNO) wrote:
>
> > On Sunday, December 27, 2020 at 10:04:44 AM UTC-6, jippii...@gmail.com
> > wrote:
> >> ...and all same color areas must match same random colors.
> >>
> >> We started to discuss this in:
> >> https://groups.google.com/g/comp.lang.javascript/c/VvCi7Sfq9os
> >>
> >> There is a start code. I programmed it myself. But it runs very slowly.
> >> If someone has time to check this, I would be very thankful,
> >> since I am very busy at the moment.
> >>
> >> If anyone knows a place with that code, then please paste it here.
> >
> > You first. What did you do so far?
> The following refers to the code referred as the “start code” in that
> discussion. The OP did NOT program it themselves. (Apparently these
> script-kiddies think that copy-and-pray would be the same as programming.)
>
> <https://groups.google.com/g/comp.programming/c/ch6aYxj0_RI>
>
> Somebody is running there
>
> function aaaaa() {
> // Canvas stuff
> }
>
> setInterval(aaaaa, 1);
>
> (sic!)
>
> Of course it runs slow with a 1 ms (or in Gecko normalized to 10 ms)
> interval.
>
> --
> PointedEars
> FAQ: <http://PointedEars.de/faq> | <http://PointedEars.de/es-matrix>
> <https://github.com/PointedEars> | <http://PointedEars.de/wsvn/>
> Twitter: @PointedEars2 | Please do not cc me./Bitte keine Kopien per E-Mail.
Ok you seem to be right.
Let's forget this.
Kristjan
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.javascript
csiph-web