跳至主要內容

粒子物体

小于 1 分钟

粒子物体

FlyPoints 浮点

var smoke = new VT.FlyPoints({
    position: [0, 0.0, 0],
    number : 1000, 
    range : 100,
    bottom: 0,
    top: 100,
    speed: [0, 0.1, 0],
    material: {
        size: 2.0,
        opacity: 1.0,
        transparent: true,
    }
});

Particles 粒子系统

var smoke = new VT.Particles({
     particle: {
        sizeScale: 1.0,
        positionStyle: "cube",
        positionRadius: 0.5,
        // 用来设置扩散大小
        positionBase: [0, 0, 0],
        positionSpread: [0, 0, 0],

        speedBase: -0.1,
        speedSpread: .2,

        sizeBase: 0,
        sizeSpread: 0,

        // 速度
        velocityStyle: "cube",
        velocityBase: [0, 10, 0],
        velocitySpread: [10, 10, 10],

        accelerationBase: [0, -10, 0],

        // 大小,非常重要
        sizeTween: [[0, 0.1], [1, 1]],
        // 透明度,非常重要
        opacityTween: [[0.0, 0.4], [0.75, 0.0]],
        // 颜色值 [亮度变化,颜色变化]
        colorTween: [[0.0, 0.15], [[0.85, 0.85, 0.85], [0.01, 0.01, 0.01]]],
        colorBase: [1.0, 1.0, 1.0],

        angleBase: 0,
        angleSpread: 720,
        angleVelocityBase: 0,
        angleVelocitySpread: 720,
        angleAccelerationBase: 0,
        angleAccelerationSpread: 0,

        particlesPerSecond: 100,
        particleDeathAge: 2.0,
        particleTexture: "thing-point",

        emitterAge: 0.0,
        emitterDeathAge: 10000.0,
        emitterAlive: true,
    },
});

SmokeFire 烟雾火

var smoke = new VT.SmokeFire({
    position: [0, 0.5, 0],
    particle: {
        particleTexture: "./resources/textures/smoke.png",
    }
});
上次编辑于:
贡献者: dashun