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

How to work with SVG? #86

Open
sr13579 opened this issue Mar 11, 2023 · 2 comments
Open

How to work with SVG? #86

sr13579 opened this issue Mar 11, 2023 · 2 comments
Labels

Comments

@sr13579
Copy link

sr13579 commented Mar 11, 2023

I think it is a very noob thing to ask, but how to make SVG work? In the features panel I can't select the div or canvas with the code. Here is a sample:

new Scene({
    "[data-linedrawing] svg path": {
        "0": "stroke-dasharray: 4450 4450",
        "0>": "stroke-dasharray: 0 4450",
        "0.3": "stroke-dasharray: 360 4450",
        "1.2": "stroke-dasharray: 1450 4450",
        "2": "stroke-dasharray: 2400 4450",
        "2.6": "stroke-dasharray: 3000 4450",
        "3.1": "stroke-dasharray: 4450 4450",
    },
  }, {
    iterationCount: "infinite",
    easing: "ease-in",
    selector: true,
  }).play();

Where is the selector parameter? I tried this code many time but nothing is showing up.

@daybrush
Copy link
Owner

@sr13579

[data-linedrawing] svg path is selector.

See this example:
https://codepen.io/daybrush/pen/QWVQWBj

@sr13579
Copy link
Author

sr13579 commented Mar 12, 2023

@sr13579

[data-linedrawing] svg path is selector.

See this example: https://codepen.io/daybrush/pen/QWVQWBj

Thanks for your reply. After searching a long time I found that this was a made up error. If you go to this page >> https://daybrush.com/scenejs/features.html#linedrawing and try to run it in the localhost it is not showing the strokes for some reason. While I am writing this I am also looking at the codepen example that you sent. I need some time to process this.
Thank you very much for your reply.
I have one request for you. If you don't mind could you please add a basic and frequently used code structure in the documentation? It would be very easy to find out if we are stuck.

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

No branches or pull requests

2 participants