jonobr1 / jonobr1/two.js

"Dom-less" start for just generating result svg [Enhancement]

Open
#693 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
JavaScript
Stars
8.7k
Forks
463
Avg merge
2d 1h
Merged PRs (30d)
8

Description

Is your feature request related to a problem? Please describe.
I'm trying to find a way to use Two.js in react-native because we want to reuse existing renders from our web app. I saw this issue #159, but want to try another way.

In RN there's a package https://github.com/software-mansion/react-native-svg and despite the fact that it does not implement all the features of svg, we can at least try. So the problem I have is that I probably need to attach to some DOM element to start using Two.js instance, but of course there's no web-DOM in RN. So I'm wondering if there's a way to get a resulting svg structure, but without trying to render it to DOM (I called it "dom-less" render)? I have static renders without animations, so I need to get only first state of the render. Then I can try to translate it to react-native-svg components.

Could you give me a hint?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the existing approach discussed in issue #159 and the requested integration with react-native-svg. Determine how a Two.js instance could produce its initial SVG structure without a web DOM, and define the supported static-rendering behavior before implementation.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react-native
Domain
frontend, mobile
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.