@cosmos.gl/graph 2.5.0 → 2.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config.d.ts +8 -2
- package/dist/helper.d.ts +2 -2
- package/dist/index.d.ts +21 -2
- package/dist/index.js +4950 -14357
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1678
- package/dist/index.min.js.map +1 -1
- package/dist/modules/Clusters/index.d.ts +2 -2
- package/dist/modules/Drag/index.d.ts +3 -3
- package/dist/modules/ForceCenter/index.d.ts +1 -1
- package/dist/modules/ForceGravity/index.d.ts +1 -1
- package/dist/modules/ForceLink/index.d.ts +1 -1
- package/dist/modules/ForceManyBody/index.d.ts +1 -1
- package/dist/modules/ForceManyBodyQuadtree/index.d.ts +1 -1
- package/dist/modules/ForceMouse/index.d.ts +1 -1
- package/dist/modules/GraphData/index.d.ts +2 -1
- package/dist/modules/Lines/index.d.ts +2 -2
- package/dist/modules/Points/index.d.ts +5 -2
- package/dist/modules/Shared/buffer.d.ts +1 -1
- package/dist/modules/Store/index.d.ts +1 -1
- package/dist/modules/Zoom/index.d.ts +3 -3
- package/dist/modules/core-module.d.ts +5 -5
- package/package.json +5 -1
- package/.eslintrc +0 -147
- package/.github/SECURITY.md +0 -13
- package/.github/dco.yml +0 -4
- package/.github/workflows/github_pages.yml +0 -54
- package/.storybook/main.ts +0 -26
- package/.storybook/manager-head.html +0 -1
- package/.storybook/manager.ts +0 -14
- package/.storybook/preview.ts +0 -29
- package/.storybook/style.css +0 -3
- package/CHARTER.md +0 -69
- package/CODE_OF_CONDUCT.md +0 -178
- package/CONTRIBUTING.md +0 -22
- package/GOVERNANCE.md +0 -21
- package/cosmos-2-0-migration-notes.md +0 -98
- package/cosmos_awesome.md +0 -96
- package/dist/stories/beginners/basic-set-up/data-gen.d.ts +0 -4
- package/dist/stories/beginners/basic-set-up/index.d.ts +0 -5
- package/dist/stories/beginners/link-hovering/data-generator.d.ts +0 -19
- package/dist/stories/beginners/link-hovering/index.d.ts +0 -5
- package/dist/stories/beginners/point-labels/data.d.ts +0 -13
- package/dist/stories/beginners/point-labels/index.d.ts +0 -9
- package/dist/stories/beginners/point-labels/labels.d.ts +0 -8
- package/dist/stories/beginners/quick-start.d.ts +0 -5
- package/dist/stories/beginners/remove-points/config.d.ts +0 -2
- package/dist/stories/beginners/remove-points/data-gen.d.ts +0 -4
- package/dist/stories/beginners/remove-points/index.d.ts +0 -5
- package/dist/stories/beginners.stories.d.ts +0 -10
- package/dist/stories/clusters/polygon-selection/index.d.ts +0 -6
- package/dist/stories/clusters/polygon-selection/polygon.d.ts +0 -20
- package/dist/stories/clusters/radial.d.ts +0 -5
- package/dist/stories/clusters/with-labels.d.ts +0 -6
- package/dist/stories/clusters/worm.d.ts +0 -5
- package/dist/stories/clusters.stories.d.ts +0 -9
- package/dist/stories/create-cluster-labels.d.ts +0 -4
- package/dist/stories/create-cosmos.d.ts +0 -16
- package/dist/stories/create-story.d.ts +0 -16
- package/dist/stories/experiments/full-mesh.d.ts +0 -5
- package/dist/stories/experiments/mesh-with-holes.d.ts +0 -5
- package/dist/stories/experiments.stories.d.ts +0 -7
- package/dist/stories/generate-mesh-data.d.ts +0 -12
- package/dist/stories/geospatial/moscow-metro-stations/index.d.ts +0 -15
- package/dist/stories/geospatial/moscow-metro-stations/moscow-metro-coords.d.ts +0 -1
- package/dist/stories/geospatial/moscow-metro-stations/point-colors.d.ts +0 -1
- package/dist/stories/geospatial.stories.d.ts +0 -6
- package/dist/stories/shapes/all-shapes/index.d.ts +0 -5
- package/dist/stories/shapes/image-example/index.d.ts +0 -5
- package/dist/stories/shapes.stories.d.ts +0 -7
- package/logo.svg +0 -3
- package/rollup.config.js +0 -70
- package/src/config.ts +0 -726
- package/src/declaration.d.ts +0 -12
- package/src/graph/utils/error-message.ts +0 -23
- package/src/helper.ts +0 -74
- package/src/index.ts +0 -1608
- package/src/modules/Clusters/calculate-centermass.frag +0 -9
- package/src/modules/Clusters/calculate-centermass.vert +0 -26
- package/src/modules/Clusters/force-cluster.frag +0 -39
- package/src/modules/Clusters/index.ts +0 -200
- package/src/modules/Drag/index.ts +0 -33
- package/src/modules/FPSMonitor/css.ts +0 -53
- package/src/modules/FPSMonitor/index.ts +0 -28
- package/src/modules/ForceCenter/calculate-centermass.frag +0 -9
- package/src/modules/ForceCenter/calculate-centermass.vert +0 -18
- package/src/modules/ForceCenter/force-center.frag +0 -27
- package/src/modules/ForceCenter/index.ts +0 -104
- package/src/modules/ForceGravity/force-gravity.frag +0 -27
- package/src/modules/ForceGravity/index.ts +0 -33
- package/src/modules/ForceLink/force-spring.ts +0 -73
- package/src/modules/ForceLink/index.ts +0 -149
- package/src/modules/ForceManyBody/calculate-level.frag +0 -9
- package/src/modules/ForceManyBody/calculate-level.vert +0 -25
- package/src/modules/ForceManyBody/force-centermass.frag +0 -52
- package/src/modules/ForceManyBody/force-level.frag +0 -121
- package/src/modules/ForceManyBody/index.ts +0 -223
- package/src/modules/ForceManyBody/quadtree-frag-shader.ts +0 -90
- package/src/modules/ForceManyBodyQuadtree/calculate-level.frag +0 -9
- package/src/modules/ForceManyBodyQuadtree/calculate-level.vert +0 -25
- package/src/modules/ForceManyBodyQuadtree/index.ts +0 -157
- package/src/modules/ForceManyBodyQuadtree/quadtree-frag-shader.ts +0 -93
- package/src/modules/ForceMouse/force-mouse.frag +0 -24
- package/src/modules/ForceMouse/index.ts +0 -32
- package/src/modules/GraphData/index.ts +0 -383
- package/src/modules/Lines/draw-curve-line.frag +0 -46
- package/src/modules/Lines/draw-curve-line.vert +0 -194
- package/src/modules/Lines/geometry.ts +0 -18
- package/src/modules/Lines/hovered-line-index.frag +0 -27
- package/src/modules/Lines/hovered-line-index.vert +0 -8
- package/src/modules/Lines/index.ts +0 -273
- package/src/modules/Points/atlas-utils.ts +0 -137
- package/src/modules/Points/drag-point.frag +0 -20
- package/src/modules/Points/draw-highlighted.frag +0 -16
- package/src/modules/Points/draw-highlighted.vert +0 -86
- package/src/modules/Points/draw-points.frag +0 -243
- package/src/modules/Points/draw-points.vert +0 -127
- package/src/modules/Points/fill-sampled-points.frag +0 -9
- package/src/modules/Points/fill-sampled-points.vert +0 -29
- package/src/modules/Points/find-hovered-point.frag +0 -9
- package/src/modules/Points/find-hovered-point.vert +0 -57
- package/src/modules/Points/find-points-on-area-selection.frag +0 -48
- package/src/modules/Points/find-points-on-polygon-selection.frag +0 -65
- package/src/modules/Points/index.ts +0 -934
- package/src/modules/Points/track-positions.frag +0 -18
- package/src/modules/Points/update-position.frag +0 -25
- package/src/modules/Shared/buffer.ts +0 -37
- package/src/modules/Shared/clear.frag +0 -7
- package/src/modules/Shared/quad.vert +0 -12
- package/src/modules/Store/index.ts +0 -173
- package/src/modules/Zoom/index.ts +0 -148
- package/src/modules/core-module.ts +0 -28
- package/src/stories/1. welcome.mdx +0 -75
- package/src/stories/2. configuration.mdx +0 -112
- package/src/stories/3. api-reference.mdx +0 -591
- package/src/stories/beginners/basic-set-up/data-gen.ts +0 -33
- package/src/stories/beginners/basic-set-up/index.ts +0 -163
- package/src/stories/beginners/basic-set-up/style.css +0 -35
- package/src/stories/beginners/link-hovering/data-generator.ts +0 -198
- package/src/stories/beginners/link-hovering/index.ts +0 -61
- package/src/stories/beginners/link-hovering/style.css +0 -73
- package/src/stories/beginners/point-labels/data.ts +0 -73
- package/src/stories/beginners/point-labels/index.ts +0 -65
- package/src/stories/beginners/point-labels/labels.ts +0 -46
- package/src/stories/beginners/point-labels/style.css +0 -16
- package/src/stories/beginners/quick-start.ts +0 -50
- package/src/stories/beginners/remove-points/config.ts +0 -25
- package/src/stories/beginners/remove-points/data-gen.ts +0 -30
- package/src/stories/beginners/remove-points/index.ts +0 -92
- package/src/stories/beginners/remove-points/style.css +0 -31
- package/src/stories/beginners.stories.ts +0 -117
- package/src/stories/clusters/polygon-selection/index.ts +0 -51
- package/src/stories/clusters/polygon-selection/polygon.ts +0 -143
- package/src/stories/clusters/polygon-selection/style.css +0 -8
- package/src/stories/clusters/radial.ts +0 -24
- package/src/stories/clusters/with-labels.ts +0 -53
- package/src/stories/clusters/worm.ts +0 -40
- package/src/stories/clusters.stories.ts +0 -77
- package/src/stories/create-cluster-labels.ts +0 -50
- package/src/stories/create-cosmos.ts +0 -68
- package/src/stories/create-story.ts +0 -51
- package/src/stories/experiments/full-mesh.ts +0 -13
- package/src/stories/experiments/mesh-with-holes.ts +0 -13
- package/src/stories/experiments.stories.ts +0 -43
- package/src/stories/generate-mesh-data.ts +0 -125
- package/src/stories/geospatial/moscow-metro-stations/index.ts +0 -62
- package/src/stories/geospatial/moscow-metro-stations/moscow-metro-coords.ts +0 -1
- package/src/stories/geospatial/moscow-metro-stations/point-colors.ts +0 -46
- package/src/stories/geospatial/moscow-metro-stations/style.css +0 -30
- package/src/stories/geospatial.stories.ts +0 -30
- package/src/stories/shapes/all-shapes/index.ts +0 -69
- package/src/stories/shapes/image-example/icons/box.png +0 -0
- package/src/stories/shapes/image-example/icons/lego.png +0 -0
- package/src/stories/shapes/image-example/icons/s.png +0 -0
- package/src/stories/shapes/image-example/icons/swift.png +0 -0
- package/src/stories/shapes/image-example/icons/toolbox.png +0 -0
- package/src/stories/shapes/image-example/index.ts +0 -238
- package/src/stories/shapes.stories.ts +0 -37
- package/src/variables.ts +0 -68
- package/tsconfig.json +0 -41
- package/vite.config.ts +0 -54
package/CODE_OF_CONDUCT.md
DELETED
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
# Code of Conduct
|
|
2
|
-
|
|
3
|
-
Cosmos, as member project of the OpenJS Foundation, use [Contributor Covenant
|
|
4
|
-
v2.0](https://contributor-covenant.org/version/2/0/code_of_conduct) as their
|
|
5
|
-
code of conduct. The full text is included
|
|
6
|
-
[below](#contributor-covenant-code-of-conduct) in English, and translations are
|
|
7
|
-
available from the Contributor Covenant organisation:
|
|
8
|
-
|
|
9
|
-
- [contributor-covenant.org/translations](https://www.contributor-covenant.org/translations)
|
|
10
|
-
- [github.com/ContributorCovenant](https://github.com/ContributorCovenant/contributor_covenant/tree/release/content/version/2/0)
|
|
11
|
-
|
|
12
|
-
Refer to the sections on reporting and escalation in this document for the
|
|
13
|
-
specific emails that can be used to report and escalate issues.
|
|
14
|
-
|
|
15
|
-
## Reporting
|
|
16
|
-
|
|
17
|
-
### Project Spaces
|
|
18
|
-
|
|
19
|
-
For reporting issues in spaces related to cosmos.gl please use the email
|
|
20
|
-
`cosmosgl@rokotyan.com`. Cosmos.gl handles CoC issues
|
|
21
|
-
related to the spaces that it maintains. Projects maintainers commit to:
|
|
22
|
-
|
|
23
|
-
- maintain the confidentiality with regard to the reporter of an incident
|
|
24
|
-
- to participate in the path for escalation as outlined in the section on
|
|
25
|
-
Escalation when required.
|
|
26
|
-
|
|
27
|
-
### Foundation Spaces
|
|
28
|
-
|
|
29
|
-
For reporting issues in spaces managed by the OpenJS Foundation, for example,
|
|
30
|
-
repositories within the OpenJS organization, use the email
|
|
31
|
-
`report@lists.openjsf.org`. The Cross Project Council (CPC) is responsible for
|
|
32
|
-
managing these reports and commits to:
|
|
33
|
-
|
|
34
|
-
- maintain the confidentiality with regard to the reporter of an incident
|
|
35
|
-
- to participate in the path for escalation as outlined in the section on
|
|
36
|
-
Escalation when required.
|
|
37
|
-
|
|
38
|
-
## Escalation
|
|
39
|
-
|
|
40
|
-
The OpenJS Foundation maintains a Code of Conduct Panel (CoCP). This is a
|
|
41
|
-
foundation-wide team established to manage escalation when a reporter believes
|
|
42
|
-
that a report to a member project or the CPC has not been properly handled. In
|
|
43
|
-
order to escalate to the CoCP send an email to
|
|
44
|
-
`coc-escalation@lists.openjsf.org`.
|
|
45
|
-
|
|
46
|
-
For more information, refer to the full [Code of Conduct governance
|
|
47
|
-
document](https://github.com/openjs-foundation/cross-project-council/blob/HEAD/CODE_OF_CONDUCT.md).
|
|
48
|
-
|
|
49
|
-
---
|
|
50
|
-
|
|
51
|
-
## Contributor Covenant Code of Conduct v2.0
|
|
52
|
-
|
|
53
|
-
### Our Pledge
|
|
54
|
-
|
|
55
|
-
We as members, contributors, and leaders pledge to make participation in our
|
|
56
|
-
community a harassment-free experience for everyone, regardless of age, body
|
|
57
|
-
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
|
58
|
-
identity and expression, level of experience, education, socio-economic status,
|
|
59
|
-
nationality, personal appearance, race, religion, or sexual identity and
|
|
60
|
-
orientation.
|
|
61
|
-
|
|
62
|
-
We pledge to act and interact in ways that contribute to an open, welcoming,
|
|
63
|
-
diverse, inclusive, and healthy community.
|
|
64
|
-
|
|
65
|
-
### Our Standards
|
|
66
|
-
|
|
67
|
-
Examples of behavior that contributes to a positive environment for our
|
|
68
|
-
community include:
|
|
69
|
-
|
|
70
|
-
* Demonstrating empathy and kindness toward other people
|
|
71
|
-
* Being respectful of differing opinions, viewpoints, and experiences
|
|
72
|
-
* Giving and gracefully accepting constructive feedback
|
|
73
|
-
* Accepting responsibility and apologizing to those affected by our mistakes,
|
|
74
|
-
and learning from the experience
|
|
75
|
-
* Focusing on what is best not just for us as individuals, but for the overall
|
|
76
|
-
community
|
|
77
|
-
|
|
78
|
-
Examples of unacceptable behavior include:
|
|
79
|
-
|
|
80
|
-
* The use of sexualized language or imagery, and sexual attention or advances of
|
|
81
|
-
any kind
|
|
82
|
-
* Trolling, insulting or derogatory comments, and personal or political attacks
|
|
83
|
-
* Public or private harassment
|
|
84
|
-
* Publishing others' private information, such as a physical or email address,
|
|
85
|
-
without their explicit permission
|
|
86
|
-
* Other conduct which could reasonably be considered inappropriate in a
|
|
87
|
-
professional setting
|
|
88
|
-
|
|
89
|
-
### Enforcement Responsibilities
|
|
90
|
-
|
|
91
|
-
Community leaders are responsible for clarifying and enforcing our standards of
|
|
92
|
-
acceptable behavior and will take appropriate and fair corrective action in
|
|
93
|
-
response to any behavior that they deem inappropriate, threatening, offensive,
|
|
94
|
-
or harmful.
|
|
95
|
-
|
|
96
|
-
Community leaders have the right and responsibility to remove, edit, or reject
|
|
97
|
-
comments, commits, code, wiki edits, issues, and other contributions that are
|
|
98
|
-
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
|
99
|
-
decisions when appropriate.
|
|
100
|
-
|
|
101
|
-
### Scope
|
|
102
|
-
|
|
103
|
-
This Code of Conduct applies within all community spaces, and also applies when
|
|
104
|
-
an individual is officially representing the community in public spaces.
|
|
105
|
-
Examples of representing our community include using an official e-mail address,
|
|
106
|
-
posting via an official social media account, or acting as an appointed
|
|
107
|
-
representative at an online or offline event.
|
|
108
|
-
|
|
109
|
-
### Enforcement
|
|
110
|
-
|
|
111
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
112
|
-
reported to the community leaders responsible for enforcement at the email
|
|
113
|
-
addresses listed above in the [Reporting](#reporting) and
|
|
114
|
-
[Escalation](#escalation) sections. All complaints will be reviewed and
|
|
115
|
-
investigated promptly and fairly.
|
|
116
|
-
|
|
117
|
-
All community leaders are obligated to respect the privacy and security of the
|
|
118
|
-
reporter of any incident.
|
|
119
|
-
|
|
120
|
-
### Enforcement Guidelines
|
|
121
|
-
|
|
122
|
-
Community leaders will follow these Community Impact Guidelines in determining
|
|
123
|
-
the consequences for any action they deem in violation of this Code of Conduct:
|
|
124
|
-
|
|
125
|
-
#### 1. Correction
|
|
126
|
-
|
|
127
|
-
**Community Impact**: Use of inappropriate language or other behavior deemed
|
|
128
|
-
unprofessional or unwelcome in the community.
|
|
129
|
-
|
|
130
|
-
**Consequence**: A private, written warning from community leaders, providing
|
|
131
|
-
clarity around the nature of the violation and an explanation of why the
|
|
132
|
-
behavior was inappropriate. A public apology may be requested.
|
|
133
|
-
|
|
134
|
-
#### 2. Warning
|
|
135
|
-
|
|
136
|
-
**Community Impact**: A violation through a single incident or series of
|
|
137
|
-
actions.
|
|
138
|
-
|
|
139
|
-
**Consequence**: A warning with consequences for continued behavior. No
|
|
140
|
-
interaction with the people involved, including unsolicited interaction with
|
|
141
|
-
those enforcing the Code of Conduct, for a specified period of time. This
|
|
142
|
-
includes avoiding interactions in community spaces as well as external channels
|
|
143
|
-
like social media. Violating these terms may lead to a temporary or permanent
|
|
144
|
-
ban.
|
|
145
|
-
|
|
146
|
-
#### 3. Temporary Ban
|
|
147
|
-
|
|
148
|
-
**Community Impact**: A serious violation of community standards, including
|
|
149
|
-
sustained inappropriate behavior.
|
|
150
|
-
|
|
151
|
-
**Consequence**: A temporary ban from any sort of interaction or public
|
|
152
|
-
communication with the community for a specified period of time. No public or
|
|
153
|
-
private interaction with the people involved, including unsolicited interaction
|
|
154
|
-
with those enforcing the Code of Conduct, is allowed during this period.
|
|
155
|
-
Violating these terms may lead to a permanent ban.
|
|
156
|
-
|
|
157
|
-
#### 4. Permanent Ban
|
|
158
|
-
|
|
159
|
-
**Community Impact**: Demonstrating a pattern of violation of community
|
|
160
|
-
standards, including sustained inappropriate behavior, harassment of an
|
|
161
|
-
individual, or aggression toward or disparagement of classes of individuals.
|
|
162
|
-
|
|
163
|
-
**Consequence**: A permanent ban from any sort of public interaction within the
|
|
164
|
-
project community.
|
|
165
|
-
|
|
166
|
-
### Attribution
|
|
167
|
-
|
|
168
|
-
This Code of Conduct is adapted from the [Contributor
|
|
169
|
-
Covenant](https://www.contributor-covenant.org), version 2.0, available at
|
|
170
|
-
[contributor-covenant.org/version/2/0/code_of_conduct](https://www.contributor-covenant.org/version/2/0/code_of_conduct).
|
|
171
|
-
|
|
172
|
-
Community Impact Guidelines were inspired by [Mozilla's code of conduct
|
|
173
|
-
enforcement ladder](https://github.com/mozilla/diversity).
|
|
174
|
-
|
|
175
|
-
For answers to common questions about this code of conduct, see the FAQ at
|
|
176
|
-
[contributor-covenant.org/faq](https://www.contributor-covenant.org/faq).
|
|
177
|
-
Translations are available at
|
|
178
|
-
[contributor-covenant.org/translations](https://www.contributor-covenant.org/translations).
|
package/CONTRIBUTING.md
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
# Contributing to _Cosmos_
|
|
2
|
-
We want to make contributing to this project as easy and transparent as possible.
|
|
3
|
-
|
|
4
|
-
## Code of Conduct
|
|
5
|
-
cosmos.gl has a Code of Conduct that we expect project participants to adhere
|
|
6
|
-
to. Please read [the full text](https://github.com/cosmos.gl/graph/CODE_OF_CONDUCT.md) so that you can understand
|
|
7
|
-
what actions will and will not be tolerated.
|
|
8
|
-
|
|
9
|
-
## Our Development Process
|
|
10
|
-
We use Storybook to simplify the development process. You can start it by running `npm run storybook` in the root directory.
|
|
11
|
-
If you've added a new feature, changed the configuration or public methods, please add a new example with its source code to Storybook if applicable and suggest changes to the docs.
|
|
12
|
-
|
|
13
|
-
## Pull Requests
|
|
14
|
-
We actively welcome pull requests. If you want to submit one, please follow the following process:
|
|
15
|
-
|
|
16
|
-
1. Fork the repo and create your branch from `main`;
|
|
17
|
-
2. Code;
|
|
18
|
-
3. Make sure the project lints and builds after your changes;
|
|
19
|
-
4. Submit your PR!
|
|
20
|
-
|
|
21
|
-
## License
|
|
22
|
-
By contributing to _Cosmos_, you agree that your contributions will be licensed its MIT license.
|
package/GOVERNANCE.md
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
# cosmos.gl Governance Guidelines
|
|
2
|
-
|
|
3
|
-
The [TSC Charter](./CHARTER.md) governs the operations of the TSC. All changes to the Charter need approval by the OpenJS Foundation Cross-Project Council (CPC).
|
|
4
|
-
|
|
5
|
-
The TSC oversees all technical development in the cosmos.gl project, as long as it follows policies set by CPC, including:
|
|
6
|
-
- Setting release dates.
|
|
7
|
-
- Release quality standards.
|
|
8
|
-
- Technical direction.
|
|
9
|
-
- Project governance and process.
|
|
10
|
-
- GitHub repository hosting.
|
|
11
|
-
- Conduct guidelines.
|
|
12
|
-
- Maintaining the list of additional collaborators.
|
|
13
|
-
- Development process and any coding standards.
|
|
14
|
-
- Mediating technical conflicts between collaborators or foundation projects.
|
|
15
|
-
|
|
16
|
-
The TSC will define cosmos.gl project’s release vehicles.
|
|
17
|
-
|
|
18
|
-
### **Project Operations & Management**
|
|
19
|
-
The TSC will establish and maintain a development process for the cosmos.gl project. The development process will establish guidelines for how the developers and community will operate. It will, for example, establish appropriate timelines for TSC review (e.g. agenda items must be published at least a certain number of hours in advance of a TSC meeting).
|
|
20
|
-
|
|
21
|
-
The TSC and entire technical community will follow any processes as may be specified by the OpenJS Foundation Board relating to the intake and license compliance review of contributions, including the OpenJS Foundation IP Policy.
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
### Migration Guide cosmos.gl v2.0
|
|
2
|
-
|
|
3
|
-
#### Introduction
|
|
4
|
-
|
|
5
|
-
Welcome to the updated cosmos.gl library! Version 2.0 introduces significant improvements in data handling and performance, marking a major milestone for the library. This guide will help you transition to the new version smoothly.
|
|
6
|
-
|
|
7
|
-
#### Key Changes in Data Handling
|
|
8
|
-
|
|
9
|
-
This update is centered on enhancing data performance by utilizing formats directly compatible with WebGL. Since WebGL operates with buffers and framebuffers created from arrays of numbers, we have introduced new methods to handle data more efficiently.
|
|
10
|
-
|
|
11
|
-
#### Replacing `setData`
|
|
12
|
-
|
|
13
|
-
The `setData` method has been replaced with `setPointPositions` and `setLinks`. These new methods accept Float32Array, which are directly used to create WebGL textures.
|
|
14
|
-
|
|
15
|
-
**Before:**
|
|
16
|
-
```js
|
|
17
|
-
graph.setData(
|
|
18
|
-
[{ id: 'a' }, { id: 'b' }], // Nodes
|
|
19
|
-
[{ source: 'a', target: 'b' }] // Links
|
|
20
|
-
);
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
**After:**
|
|
24
|
-
```js
|
|
25
|
-
graph.setPointPositions(new Float32Array([
|
|
26
|
-
400, 400, // x and y of the first point
|
|
27
|
-
500, 500, // x and y of the second point
|
|
28
|
-
]));
|
|
29
|
-
graph.setLinks(new Float32Array([
|
|
30
|
-
0, 1 // Link between the first and second point
|
|
31
|
-
]));
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
#### Configuration Updates
|
|
35
|
-
|
|
36
|
-
Accessor functions for styling such as `nodeColor`, `nodeSize`, `linkColor`, `linkWidth`, and `linkArrows`, are eliminated. You can now set these attributes directly using Float32Array.
|
|
37
|
-
|
|
38
|
-
**Old Method for Setting Node Color:**
|
|
39
|
-
```js
|
|
40
|
-
config.nodeColor = node => node.color;
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
**New Method for Setting Point Colors:**
|
|
44
|
-
```js
|
|
45
|
-
graph.setPointColors(new Float32Array([
|
|
46
|
-
0.5, 0.5, 1, 1, // r, g, b, alpha for the first point
|
|
47
|
-
0.5, 1, 0.5, 1, // r, g, b, alpha for the second point
|
|
48
|
-
]));
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
**Flat Configuration Object:**
|
|
52
|
-
|
|
53
|
-
The configuration object is now flat instead of nested.
|
|
54
|
-
|
|
55
|
-
**Old Config:**
|
|
56
|
-
```js
|
|
57
|
-
const config = {
|
|
58
|
-
backgroundColor: 'black',
|
|
59
|
-
simulation: {
|
|
60
|
-
repulsion: 0.5,
|
|
61
|
-
},
|
|
62
|
-
events: {
|
|
63
|
-
onNodeMouseOver: (node, index, pos) => console.log(`Hovered over node ${node.id}`)
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
**New config:**
|
|
69
|
-
```js
|
|
70
|
-
const config = {
|
|
71
|
-
backgroundColor: 'black',
|
|
72
|
-
simulationRepulsion: 0.5,
|
|
73
|
-
onPointMouseOver: (index, pos) => console.log(`Hovered over point at index ${index}`);
|
|
74
|
-
}
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
**Initialization Change: From Canvas to Div**
|
|
78
|
-
|
|
79
|
-
In version 2.0, the initialization of the graph now requires a div element instead of a canvas element.
|
|
80
|
-
|
|
81
|
-
**Before**
|
|
82
|
-
```js
|
|
83
|
-
const canvas = document.getElementById('myCanvas')
|
|
84
|
-
const graph = new Graph(canvas, config)
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
**After**
|
|
88
|
-
```js
|
|
89
|
-
const div = document.getElementById('myDiv')
|
|
90
|
-
const graph = new Graph(div, config)
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
**Summary of Additional Changes**
|
|
94
|
-
|
|
95
|
-
- **Terminology Update:** "Node" is now "Point," but "Link" remains unchanged.
|
|
96
|
-
- **API Modifications:** All methods that focused on node objects have been updated or replaced to handle indices.
|
|
97
|
-
- **Manual Rendering:** After setting data or updating point/link properties, remember to run `graph.render()` to update WebGL textures and render the graph with the new data.
|
|
98
|
-
|
package/cosmos_awesome.md
DELETED
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
## About
|
|
2
|
-
The cosmos.gl awesome list is a list of awesome things curated by the community.
|
|
3
|
-
|
|
4
|
-
## cosmos.gl Examples:
|
|
5
|
-
**MathWorks/Kuu** The MathWorks, Inc: symmetric positive definite matrix
|
|
6
|
-
- Source: https://sparse.tamu.edu/MathWorks/Kuu
|
|
7
|
-
- Example: https://cosmograph.app/run/?data=https://cosmograph.app/data/Kuu.csv
|
|
8
|
-
|
|
9
|
-
**HB/blckhole** S CONNECTIVITY STRUCTURE OF A GEODESIC DOME ON A COARSE BASE
|
|
10
|
-
- Source: https://sparse.tamu.edu/HB/blckhole
|
|
11
|
-
- Example: https://cosmograph.app/run/?data=https://cosmograph.app/data/blckhole.csv
|
|
12
|
-
|
|
13
|
-
**HB/can_229** SYMMETRIC PATTERN FROM CANNES,LUCIEN MARRO,JUNE 1981.
|
|
14
|
-
- Source: https://sparse.tamu.edu/HB/can_229
|
|
15
|
-
- Example: https://cosmograph.app/run/?data=https://cosmograph.app/data/can_229.csv
|
|
16
|
-
|
|
17
|
-
**Gset/G34** 2D torus, 40-by-50, uniformly random +1/-1 entries
|
|
18
|
-
- Source: https://sparse.tamu.edu/Gset/G34
|
|
19
|
-
- Example: https://cosmograph.app/run/?data=https://cosmograph.app/data/G34.csv
|
|
20
|
-
|
|
21
|
-
**Pothen/sphere3** sphere3, with coordinates. From NASA, collected by Alex Pothen
|
|
22
|
-
- Source: https://sparse.tamu.edu/Pothen/sphere3
|
|
23
|
-
- Example: https://cosmograph.app/run/?data=https://cosmograph.app/data/sphere3.csv
|
|
24
|
-
|
|
25
|
-
**Bydder/mri1** MRI reconstruction (1), from Mark Bydder, UCSD
|
|
26
|
-
- Source: https://sparse.tamu.edu/Bydder/mri1
|
|
27
|
-
- Example: https://cosmograph.app/run/?data=https://cosmograph.app/data/mri1.csv
|
|
28
|
-
|
|
29
|
-
**Mittelmann/pds-90** Patient distribution (evacuation) system
|
|
30
|
-
- Source: https://sparse.tamu.edu/Mittelmann/pds-90
|
|
31
|
-
- Example: https://cosmograph.app/run/?data=https://cosmograph.app/data/pds-90.csv
|
|
32
|
-
|
|
33
|
-
**Chen/pkustk10** PKU SYMMETRIC STIFFNESS, 4 TOWER SILO
|
|
34
|
-
- Source: https://sparse.tamu.edu/Chen/pkustk10
|
|
35
|
-
- Example: https://cosmograph.app/run/?data=https://cosmograph.app/data/pkustk10.csv
|
|
36
|
-
|
|
37
|
-
**GHS_indef/aug3d** Gould, Hu, & Scott: expanded system-3D PDE (CUTEr)
|
|
38
|
-
- Source: https://sparse.tamu.edu/GHS_indef/aug3d
|
|
39
|
-
- Example: https://cosmograph.app/run/?data=https://cosmograph.app/data/aug3d.csv
|
|
40
|
-
|
|
41
|
-
**Nasa/barth5** BARTH5: Nasa matrix, but with a diagonal added to the original matrix
|
|
42
|
-
- Source: https://sparse.tamu.edu/Nasa/barth5
|
|
43
|
-
- Example: https://cosmograph.app/run/?data=https://cosmograph.app/data/barth5.csv
|
|
44
|
-
|
|
45
|
-
**DIMACS10/delaunay_n10**
|
|
46
|
-
DIMACS10 set: delaunay/delaunay_n10
|
|
47
|
-
- Source: https://sparse.tamu.edu/DIMACS10/delaunay_n10
|
|
48
|
-
- Example:https://cosmograph.app/run/?data=https://cosmograph.app/data/delaunay_n10.csv
|
|
49
|
-
|
|
50
|
-
**HB/dwt_1005** SYMMETRIC CONNECTION TABLE FROM DTNSRDC, WASHINGTON
|
|
51
|
-
- Source: https://sparse.tamu.edu/HB/dwt_1005
|
|
52
|
-
- Example: https://cosmograph.app/run/?data=https://cosmograph.app/data/dwt_1005.csv
|
|
53
|
-
|
|
54
|
-
**HB/gre_1107** UNSYMMETRIC MATRIX FROM GRENOBLE,FRANCOIS CACHARD,MARCH 1981.
|
|
55
|
-
- Source: https://sparse.tamu.edu/HB/gre_1107
|
|
56
|
-
- Example: https://cosmograph.app/run/?data=https://cosmograph.app/data/gre_1107.csv
|
|
57
|
-
|
|
58
|
-
**Hollinger/jan99jac040sc** Jacobian from Bank of Canada ‘jan99’ model, oldstack 040, with scaling
|
|
59
|
-
- Source: https://sparse.tamu.edu/Hollinger/jan99jac040sc
|
|
60
|
-
- Example: https://cosmograph.app/run/?data=https://cosmograph.app/data/jan99jac040sc.csv
|
|
61
|
-
|
|
62
|
-
**HB/man_5976** MANTEUFFEL’S FINITE ELEMENT PROBLEM (CONDENSED)
|
|
63
|
-
- Source: https://sparse.tamu.edu/HB/man_5976
|
|
64
|
-
- Example: https://cosmograph.app/run/?data=https://cosmograph.app/data/man_5976.csv
|
|
65
|
-
|
|
66
|
-
**Boeing/msc01440** SYMMETRIC TEST MATRIX FROM MSC/NASTRAN CYLF8.OUT2
|
|
67
|
-
- Source: https://sparse.tamu.edu/Boeing/msc01440
|
|
68
|
-
- Example: https://cosmograph.app/run/?data=https://cosmograph.app/data/msc01440.csv
|
|
69
|
-
|
|
70
|
-
**Nasa/nasa4704** STRUCTURE FROM NASA LANGLEY, 4704 DEGREES OF FREEDOM
|
|
71
|
-
- Source: https://sparse.tamu.edu/Nasa/nasa4704
|
|
72
|
-
- Example: https://cosmograph.app/run/?data=https://cosmograph.app/data/nasa4704.csv
|
|
73
|
-
|
|
74
|
-
**Bai/rw5151** MARKOV CHAIN MODELING, RANDOM WALK (M = 100) G. W. STEWART
|
|
75
|
-
- Source: https://sparse.tamu.edu/Bai/rw5151
|
|
76
|
-
- Example: https://cosmograph.app/run/?data=https://cosmograph.app/data/rw5151.csv
|
|
77
|
-
|
|
78
|
-
**Shyy/shyy41** Wei Shyy, Univ. Florida. CFD/Navier-Stokes,viscous flow, fully coupled
|
|
79
|
-
- Source: https://sparse.tamu.edu/Shyy/shyy41
|
|
80
|
-
- Example: https://cosmograph.app/run/?data=https://cosmograph.app/data/shyy41.csv
|
|
81
|
-
|
|
82
|
-
**Shyy/shyy161** Wei Shyy, Univ. Florida. CFD/Navier-Stokes,viscous flow, fully coupled
|
|
83
|
-
- Source: https://sparse.tamu.edu/Shyy/shyy161
|
|
84
|
-
- Example: https://cosmograph.app/run/?data=https://cosmograph.app/data/shyy161.csv
|
|
85
|
-
|
|
86
|
-
**HB/young3c** real matrix from aero research, David Young, corrected RUA version
|
|
87
|
-
- Source: https://sparse.tamu.edu/HB/young3c
|
|
88
|
-
- Example: https://cosmograph.app/run/?data=https://cosmograph.app/data/young3c.csv
|
|
89
|
-
|
|
90
|
-
**TKK/cyl6** Cylindrical shell, non-linear analysis, 3 RHS vectors at step 6. R Kouhia
|
|
91
|
-
- Source: https://sparse.tamu.edu/TKK/cyl6
|
|
92
|
-
- Example: https://cosmograph.app/run/?data=https://cosmograph.app/data/cyl6.csv
|
|
93
|
-
|
|
94
|
-
**GHS_psdef/cvxbqp1** Gould, Hu, & Scott: barrier Hessian from convex QP (CUTEr)
|
|
95
|
-
- Source: https://sparse.tamu.edu/GHS_psdef/cvxbqp1
|
|
96
|
-
- Example: https://cosmograph.app/run/?data=https://cosmograph.app/data/cvxbqp1.csv
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
interface Point {
|
|
2
|
-
id: number;
|
|
3
|
-
}
|
|
4
|
-
interface Link {
|
|
5
|
-
source: number;
|
|
6
|
-
target: number;
|
|
7
|
-
}
|
|
8
|
-
interface NetworkData {
|
|
9
|
-
pointPositions: Float32Array;
|
|
10
|
-
pointColors: Float32Array;
|
|
11
|
-
pointSizes: Float32Array;
|
|
12
|
-
links: Float32Array;
|
|
13
|
-
linkColors: Float32Array;
|
|
14
|
-
linkWidths: Float32Array;
|
|
15
|
-
points: Point[];
|
|
16
|
-
connections: Link[];
|
|
17
|
-
}
|
|
18
|
-
export declare function generateData(pointCount?: number): NetworkData;
|
|
19
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export declare const pointsToShowLabelsFor: string[];
|
|
2
|
-
export declare const processPerformances: (performances: {
|
|
3
|
-
theaterCode: string;
|
|
4
|
-
performanceTitle: string;
|
|
5
|
-
theaterName: string;
|
|
6
|
-
}[]) => {
|
|
7
|
-
pointPositions: Float32Array;
|
|
8
|
-
pointColors: Float32Array;
|
|
9
|
-
pointSizes: Float32Array;
|
|
10
|
-
pointLabelToIndex: Map<string, number>;
|
|
11
|
-
pointIndexToLabel: Map<number, string>;
|
|
12
|
-
links: Float32Array;
|
|
13
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Meta } from '@storybook/html';
|
|
2
|
-
import { Story } from './create-story';
|
|
3
|
-
import { CosmosStoryProps } from './create-cosmos';
|
|
4
|
-
declare const meta: Meta<CosmosStoryProps>;
|
|
5
|
-
export declare const QuickStart: Story;
|
|
6
|
-
export declare const BasicSetUp: Story;
|
|
7
|
-
export declare const PointLabels: Story;
|
|
8
|
-
export declare const RemovePoints: Story;
|
|
9
|
-
export declare const LinkHovering: Story;
|
|
10
|
-
export default meta;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export declare class PolygonSelection {
|
|
2
|
-
private canvas;
|
|
3
|
-
private ctx;
|
|
4
|
-
private isDrawing;
|
|
5
|
-
private points;
|
|
6
|
-
private graphDiv;
|
|
7
|
-
private onPolygonComplete?;
|
|
8
|
-
private boundStartDrawing;
|
|
9
|
-
private boundDraw;
|
|
10
|
-
private boundStopDrawing;
|
|
11
|
-
private resizeObserver;
|
|
12
|
-
constructor(graphDiv: HTMLElement, onPolygonComplete?: (points: [number, number][]) => void);
|
|
13
|
-
enablePolygonMode(): void;
|
|
14
|
-
disablePolygonMode(): void;
|
|
15
|
-
destroy(): void;
|
|
16
|
-
private resizeCanvas;
|
|
17
|
-
private startDrawing;
|
|
18
|
-
private draw;
|
|
19
|
-
private stopDrawing;
|
|
20
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Meta } from '@storybook/html';
|
|
2
|
-
import { CosmosStoryProps } from './create-cosmos';
|
|
3
|
-
import { Story } from './create-story';
|
|
4
|
-
declare const meta: Meta<CosmosStoryProps>;
|
|
5
|
-
export declare const Worm: Story;
|
|
6
|
-
export declare const Radial: Story;
|
|
7
|
-
export declare const WithLabels: Story;
|
|
8
|
-
export declare const PolygonSelection: Story;
|
|
9
|
-
export default meta;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Graph, GraphConfigInterface } from '..';
|
|
2
|
-
export type CosmosStoryProps = GraphConfigInterface & {
|
|
3
|
-
pointPositions: Float32Array;
|
|
4
|
-
pointColors?: Float32Array;
|
|
5
|
-
pointSizes?: Float32Array;
|
|
6
|
-
links?: Float32Array;
|
|
7
|
-
linkColors?: Float32Array;
|
|
8
|
-
linkWidths?: Float32Array;
|
|
9
|
-
pointClusters?: number[];
|
|
10
|
-
clusterPositions?: number[];
|
|
11
|
-
clusterStrength?: Float32Array;
|
|
12
|
-
};
|
|
13
|
-
export declare const createCosmos: (props: CosmosStoryProps) => {
|
|
14
|
-
div: HTMLDivElement;
|
|
15
|
-
graph: Graph;
|
|
16
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Graph } from '..';
|
|
2
|
-
import { StoryObj } from '@storybook/html';
|
|
3
|
-
import { CosmosStoryProps } from './create-cosmos';
|
|
4
|
-
export type Story = StoryObj<CosmosStoryProps & {
|
|
5
|
-
graph: Graph;
|
|
6
|
-
destroy?: () => void;
|
|
7
|
-
}>;
|
|
8
|
-
export declare const createStory: (storyFunction: () => {
|
|
9
|
-
graph: Graph;
|
|
10
|
-
div: HTMLDivElement;
|
|
11
|
-
destroy?: () => void;
|
|
12
|
-
} | Promise<{
|
|
13
|
-
graph: Graph;
|
|
14
|
-
div: HTMLDivElement;
|
|
15
|
-
destroy?: () => void;
|
|
16
|
-
}>) => Story;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Meta } from '@storybook/html';
|
|
2
|
-
import { Story } from './create-story';
|
|
3
|
-
import { CosmosStoryProps } from './create-cosmos';
|
|
4
|
-
declare const meta: Meta<CosmosStoryProps>;
|
|
5
|
-
export declare const FullMesh: Story;
|
|
6
|
-
export declare const MeshWithHoles: Story;
|
|
7
|
-
export default meta;
|