GithubHelp home page GithubHelp logo

Comments (6)

OriIIusion avatar OriIIusion commented on June 2, 2024

先将想修改属性的组件保存到一个变量中,随后在回调事件中修改即可。看下面这两个小栗子,按下qwer上面的1234键看效果。
https://codepen.io/OriIIusion/pen/zYbEPpp
https://codepen.io/OriIIusion/pen/VwRMrxg

from orillusion.

YBbread avatar YBbread commented on June 2, 2024

先将想修改属性的组件保存到一个变量中,随后在回调事件中修改即可。看下面这两个小栗子,按下qwer上面的1234键看效果。 https://codepen.io/OriIIusion/pen/zYbEPpp https://codepen.io/OriIIusion/pen/VwRMrxg

蟹蟹~ 很感谢。
但我根据栗子用法尝试修改ParticleOverLifeScaleModule模块粒子的初始和结束时大小却修改不到。比如我是这样

this.OverLifeScaleModule = simulator.addModule(ParticleOverLifeScaleModule);
this.OverLifeScaleModule = [
new Vector4(0.1, 0.1,0.1),
new Vector4(0.1,0.1,0.1)
];

然后在事件中进行回调
this.OverLifeScaleModule = [
new Vector4(10, 10,10),
new Vector4(1,1, 1)
];

没有修改成功,是我的写法有问题吗?

from orillusion.

OriIIusion avatar OriIIusion commented on June 2, 2024

你可以先看看控制台有没有报错。
OverLifeScaleModule是一个模块,你想修改的那个大小,应该是下面这样写。
overLifeScaleModule.scaleSegments = [new Vector4(1, 1, 1), new Vector4(3, 3, 3)];
粗心了哦

from orillusion.

YBbread avatar YBbread commented on June 2, 2024

你可以先看看控制台有没有报错。 OverLifeScaleModule是一个模块,你想修改的那个大小,应该是下面这样写。 overLifeScaleModule.scaleSegments = [new Vector4(1, 1, 1), new Vector4(3, 3, 3)]; 粗心了哦

啊啊啊啊啊啊啊~~~好了~~ (^3^) (^3^) (^3^)

from orillusion.

YBbread avatar YBbread commented on June 2, 2024

想再追问下,修改发射器半径时。似乎会导致粒子重置发射,缺少了变大变小时的过渡效果,这个会尝试更新吗

from orillusion.

OriIIusion avatar OriIIusion commented on June 2, 2024

不清楚哎,我也是新手

from orillusion.

Related Issues (20)

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.