Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a paid version? I want a source code #120

Open
aoqizhonghua opened this issue Feb 24, 2021 · 5 comments
Open

Is there a paid version? I want a source code #120

aoqizhonghua opened this issue Feb 24, 2021 · 5 comments

Comments

@aoqizhonghua
Copy link

Is there a paid version? I want a source code

@mschreib28
Copy link

You mean like on the repository you're commenting on?

https://github.com/cambecc/earth/tree/master/public/libs/earth/1.0.0

@aoqizhonghua
Copy link
Author

yes

@mschreib28
Copy link

That's the javascript source code. The other libraries in libs are utilized in order to do various functional things within earth.

@aoqizhonghua
Copy link
Author

I want to know how to realize the function of HTSGW ( Significant Wave Height ), but I don't know much about it

@karelvancamp
Copy link

karelvancamp commented Jan 5, 2022

Look at the actual site, browser code inspector. Grep for HTSGW. You'll find createHTSGWPalette in HTSGW.js based on generic buildScaleFromSegments.

import {buildScaleFromSegments} from "./palette.js";
export function createHTSGWPalette(resolution = 1000) {
    const bounds = [0, 15];  // units: m
    const segments = [
        [ 0, [  8,  29,  88]],
        [ 1, [ 37,  52, 148]],
        [ 2, [ 34,  94, 168]],
        [ 3, [ 29, 145, 192]],
        [ 4, [ 65, 182, 196]],
        [ 5, [127, 205, 187]],
        [ 6, [199, 233, 180]],
        [ 7, [237, 248, 177]],
        [ 8, [254, 204,  92]],
        [10, [253, 141,  60]],
        [12, [240,  59,  32]],
        [14, [189,   0,  38]],
    ];
    return buildScaleFromSegments(bounds, segments, resolution);

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants