Jump to content

Heretic86

Members
  • Posts

    45
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Heretic86's Achievements

Regular Member

Regular Member (3/5)

0

Reputation

1

Community Answers

  1. I believe you are correct, and I think it results from level99.value ** 1. I think...
  2. Took a break, but back at it... function calculateValues(){ if (level1.value == '' || !level1.checkValidity()) return; if (level99.value == '' || !level99.checkValidity()) return; let rate = parseFloat(paramRate.value); let min = actor.parameters[selectedParameterId][0], max = actor.parameters[selectedParameterId][98]; if (isNaN(min) || isNaN(max)) return; let n = (max - min) / 98; for (let i = 0; i < 99; i++){ // This is wrong, it only calculates linear increase, not Exponential actor.parameters[selectedParameterId][i] = min + Math.round(i * n); } } My biggest problem is that my final value needs to be what ever the user has in the "Level 99" box...
  3. Does this handle the exponential decay also? guessing thats the difference between the "fast" and "slow" where "slow" has a "decay"? Im I explaining that right?
  4. I saw the code, but just a bit stumped as what the formula was and basically how you made it work. Just a bit of an explanation, I dont remember this stuff from school any more
  5. It starts at 1. So 1.0979663 is that the exponent?
  6. Im messing around in HTML5 Canvas which uses Javascript to draw to the Canvas. The Canvas is being used to display an RPG Character attribute over the number of levels. Making a Linear Slope (straight line) is easy. Im curious what the formula is to calculate the value for each level that implements an Exponential Curve? The following image is from the Editor that I am trying to emulate. This is a Non Exponential Curve, which I already have working. These are the Exponential Curves that I want to emulate, and I dont know the value of the Slider when its set to either "Fast" or "Slow", and "Middle" is a Non Exponential Curve (so guessing a value of 0 there. What would I need to do to generate a curve that looks like this, where we input the Level 1 and Level 99 values? Experimented with something like this but its not coming out anywhere like I need it to... let exp_list = [null]; let pow = parseInt(slider.value); for (let i = 1; i < 99; i++){ exp_list[i] = 500 * (n ** pow) + 1; // ???? ab^x } Not quite sure what this formula is to plug in here. Halp?
  7. Im having some trouble getting an SVG Image to draw to Canvas. SVG has some filter effects cant be done on a Canvas. Namely feColorMatrix. So far, I am able to create a new Image() from data:image/svg+xml;base64, but once I have that image, I am not able to draw that image into my Canvas. https://www.webucate.me/svg4.html Can someone tell me what I am doing wrong?
  8. You got the simplified version of what I was trying to do. I just needed a foundation of getting a Pivot to work. Add in N number of columns, and make the column names dynamic as well as aggregated sums from stepped groups.
  9. /* Missing Fields? */ SELECT myDate, Hours FROM ( SELECT CONVERT(NVARCHAR(MAX), myDate) AS myDate, [Hours] FROM myTable ) AS PivotSource PIVOT ( SUM([Hours]) FOR [myDate] /* What Goes Here? */ IN ([1], [2], [3], [4], [5], [6], [7]) ) AS PivotTable Hi all! Not sure what I am doing wrong, Im trying to Pivot with my Sum Results going into a Date Column for the totals of Hours What am I doing wrong? The result that I want should look like this: 2021-09-21 2021-09-22 2021-09-23 (Next Date) (Next Date 2) 8.5 0 5.75 (Hours Sum) (Hours Sum 2) How can I do this?
  10. I put together a small gif, the visual may explain better what Chrome is doing... Notice the 2nd row, how it goes back and forth between "o foo" and just "foo" as I use the Inspector to change the size. I need for that SPACE in front of "foo" to NOT COLLAPSE... How do I make that space NOT COLLAPSE?
  11. Exactly what Chrome is doing to me also. Trying that code, still having no effect. How about a Javascript solution? At least it would be consistent across browsers?
  12. Try toggling it from the Elements Console in Firefox when you have content that word-wraps and you should see the difference. Toggling in Chrome didnt do anything for me either. Use this text: "foo foo foo foo foo foo foo foo foo foo foo foo" without the quotes...
  13. Also very close. Only thing I see in your suggestion is "white-space: break-spaces;" is missing. From my tests it appears to be necessary. Did you get anything by removing that line? I cant ignore the seemingly arbitrary 43 character limit. If it goes over the character limit, the end result is the words run off the area. Text the user enters in this example box is saved and displayed multiple times in other places. Its a hard limit from the way everything else has turned out so far. The CSS solution would be simple. Javascript solution is gonna be a nightmare.
  14. Mostly the rest of the CSS is experimental, trying to figure out the combination of things that would give me the effect that I was looking for, so everything except the monospace font family can go if it gives the functionality I am looking for. So change from px fixed width to em? --- Oops: forgot to post link to Demo Page... https://www.webucate.me/textarea.htm
  15. I have a Textarea that I want to behave like a Console / cmd.exe prompt. I have applied a cols and rows to control the size, and the following CSS rules: word-break: break-all; white-space: break-spaces; The use of width and height properties is also fine, but inconsistent across browsers on Textarea elements, much like <pre> elements work, but <pre> elements do not have additional characteristics that I need. Works exactly as I want in Firefox, but not in Chrome: Firefox (works like I want) Chrome (does NOT work like I want, notice that "foo" is word broken at 42 chars) In Chrome, the issue is that it breaks in the middle of the previous word at the same size, but adjusting that size a bit, the spaces are retained on the previous line and collapsed, which is NOT what I want. I want the space characters after the word is wrapped to the next line. I would like to do so without having to replace User Text with Javascript or additional elements. Each line must display all characters, especially spaces, uncollapsed Each line can not have any more than 43 characters so they should wrap to the next line uncollapsed Line Wraps should NOT occur in the middle of the previous word Line Wraps should NOT wrap spaces to the last line as it exceeds 43 characters Line Wraps should NOT collapse spaces In Chrome, the previous line is not wrapped in the correct location. The user should NOT have to hit ENTER, so it should automatically wrap the space to the next line, like a Console. How can I make my Textarea break at 43 characters and wrap \n Newlines and preserve Spaces to the next line in consistently?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.