GithubHelp home page GithubHelp logo

使用问题 about jparticles HOT 4 CLOSED

barrior avatar barrior commented on May 31, 2024
使用问题

from jparticles.

Comments (4)

GoGeChang avatar GoGeChang commented on May 31, 2024

换句话说,new JParticles.特效名 无效

from jparticles.

GoGeChang avatar GoGeChang commented on May 31, 2024

手动下载特效到本地,然后引入把问题解决了,但是问题来了,我加载了我的svg图片,图片被裁剪了,只显示了很小的一部分区域,显示出现了问题

from jparticles.

Barrior avatar Barrior commented on May 31, 2024

换句话说,new JParticles.特效名 无效

上面的代码写错了,不是 new Particle.WaveLoading,是 new JParticles.WaveLoading ,或者像下面这样:

import { WaveLoading } from "jparticles";

new WaveLoading('#mainLoad')

@GoGeChang

from jparticles.

Barrior avatar Barrior commented on May 31, 2024

手动下载特效到本地,然后引入把问题解决了,但是问题来了,我加载了我的svg图片,图片被裁剪了,只显示了很小的一部分区域,显示出现了问题

是有这个问题,如果 svg 图片没有设置宽高属性,源码里通过 new Image 对象拿不到正确的宽高,因为 svg 是矢量图,所以可以给 svg 图片设置一个很大的宽高,然后就可以解决这个问题了

from jparticles.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.