We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

Stemkoski Smoke Particles, Implement in App?

Home Forums Programming Stemkoski Smoke Particles, Implement in App?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #43462
    jdhutchinson
    Customer

    I stumbled upon the below, and would like to implement this in my puzzles-enabled application. What code would I need to add to my app to enable this function to work?

    http://stemkoski.github.io/Three.js/Particle-Engine.html

    Below is the specific snippet I’d need to call:

    //Examples.smoke

    Examples =
    {
    smoke :
    {
    positionStyle : Type.CUBE,
    positionBase : new THREE.Vector3( 0, 0, 0 ),
    positionSpread : new THREE.Vector3( 10, 0, 10 ),

    velocityStyle : Type.CUBE,
    velocityBase : new THREE.Vector3( 0, 150, 0 ),
    velocitySpread : new THREE.Vector3( 80, 50, 80 ),
    accelerationBase : new THREE.Vector3( 0,-10,0 ),

    particleTexture : THREE.ImageUtils.loadTexture( ‘images/smokeparticle.png’),

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

    sizeTween : new Tween( [0, 1], [32, 128] ),
    opacityTween : new Tween( [0.8, 2], [0.5, 0] ),
    colorTween : new Tween( [0.4, 1], [ new THREE.Vector3(0,0,0.2), new THREE.Vector3(0, 0, 0.5) ] ),

    particlesPerSecond : 200,
    particleDeathAge : 2.0,
    emitterDeathAge : 60
    }

    }

    Attachments:
    You must be logged in to view attached files.
    #43465
    jdhutchinson
    Customer

    I wonder if there is a way to use the local host set up through verge 3d to enable the images to display, as currently I’ve hit a wall because of CORS denying access to the image textures of the smoke.

    I would really appreciate any help, I think this would be really cool to add into a verge3D app.

    Attachments:
    You must be logged in to view attached files.
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.