Skip to content

Releases: hmans/composer-suite

[email protected]

19 Nov 12:51
f0b2055
Compare
Choose a tag to compare

Patch Changes

  • f8785d4: Fixed: Texture2D().color and Texture2D().alpha now reuse the sample texture2D call, instead of re-sampling the texture.

[email protected]

10 Nov 08:36
220cc33
Compare
Choose a tag to compare

Patch Changes

  • 08bb67b: New: Additional full name Divide, Multiply, and Subtract math helpers, aliased to Div, Mul and Sub, respectively.

[email protected]

25 Oct 11:46
336d447
Compare
Choose a tag to compare

Patch Changes

  • 1557936: New: $swizzle(value, swizzle) returns a GLSL expression that applies swizzling to the given value.

[email protected]

25 Oct 10:58
bd8c21d
Compare
Choose a tag to compare

Patch Changes

  • 0b98419: Implemented the React glue.

[email protected]

19 Oct 08:34
b65cc8e
Compare
Choose a tag to compare

Patch Changes

  • d3959f3: Changed: <TiltShiftEffect> now uses the tilt shift effect implementation provided by postprocessing 6.29.0.

[email protected]

16 Oct 07:34
2acb255
Compare
Choose a tag to compare

Patch Changes

  • 4ace8ca: New: A first, very basic, very static, very experimental implementation of a TiltShiftEffect. Handle with care.

[email protected]

12 Oct 12:08
e4f1e3a
Compare
Choose a tag to compare

Minor Changes

  • 1ae718d: Major Breaking Change: Everything around particles has received a significant refactor to reduce coupling between the different libraries and prepare for the addition of new particle and VFX types. There is only one user-facing change to the API resulting from this, but it is significant: the way that per-particle attributes (including lifetimes!) are set has changed significantly.

    Instanced particles may make use of instanced attribute buffers. When assembling particle materials with Material Composer and Shader Composer, these can be wrapped using a ParticleAttribute unit. In the past, InstancedParticles would search the material's shader graph for these units and take care of the buffer writing automatically.

    The new API makes the attribute writing more explicit, with the added benefit of decoupling InstancedParticles entirely from Material and Shader Composer.

    When working with ParticleAttribute, you now need to call a write function and pass in a reference to the mesh that you are creating the particle in. In order to make this easier, particle setup callbacks now receive the active mesh as an additional mesh prop in its first argument that you can use.

    Examples

    Setting particle lifetimes within a particle setup callback:

    const lifetime = createParticleLifetime()
    
    /* Before: */
    lifetime.setLifetime(duration, offset)
    
    /* Now: */
    lifetime.write(mesh, duration, offset)

    Writing a ParticleAttribute value:

    const speed = new ParticleAttribute(() => 0)
    const velocity = new ParticleAttribute(() => new THREE.Vector3())
    
    /* Before: */
    speed.value = 5
    velocity.value.set(x, y, z)
    
    /* Now: */
    speed.write(mesh, 5)
    velocity.write(mesh, (v) => v.set(x, y, z))

    The write method on ParticleAttribute accepts as its second argument either a value, or a function returning a value, and doesn't much care which one you use; the function form is mostly a convenience mechanism to help you save on the number of objects created every frame/emitted particle. The object passed into the function is the same one that is passed into the ParticleAttribute's constructor; in the example above, we're instantiating the velocity attribute with a new THREE.Vector3(); in the write invocation, that very Vector3 instance is passed into the function for you to mutate. This is significantly cheaper than creating a new Vector3 instance for every emitted particle.

    This new API is a little more verbose than the previous version, but it is also more explicit and less error-prone, and decouples the particles engine entirely from Material and Shader Composer, allowing for more flexibility in the future, such as writing to multiple meshes at once, or using non-Shader Composer mechanisms to write into the buffers.

    If you have feedback on this new API, please let me know.

[email protected]

12 Oct 12:08
e4f1e3a
Compare
Choose a tag to compare

Minor Changes

  • 1ae718d: Major Breaking Change: Everything around particles has received a significant refactor to reduce coupling between the different libraries and prepare for the addition of new particle and VFX types. There is only one user-facing change to the API resulting from this, but it is significant: the way that per-particle attributes (including lifetimes!) are set has changed significantly.

    Instanced particles may make use of instanced attribute buffers. When assembling particle materials with Material Composer and Shader Composer, these can be wrapped using a ParticleAttribute unit. In the past, InstancedParticles would search the material's shader graph for these units and take care of the buffer writing automatically.

    The new API makes the attribute writing more explicit, with the added benefit of decoupling InstancedParticles entirely from Material and Shader Composer.

    When working with ParticleAttribute, you now need to call a write function and pass in a reference to the mesh that you are creating the particle in. In order to make this easier, particle setup callbacks now receive the active mesh as an additional mesh prop in its first argument that you can use.

    Examples

    Setting particle lifetimes within a particle setup callback:

    const lifetime = createParticleLifetime()
    
    /* Before: */
    lifetime.setLifetime(duration, offset)
    
    /* Now: */
    lifetime.write(mesh, duration, offset)

    Writing a ParticleAttribute value:

    const speed = new ParticleAttribute(() => 0)
    const velocity = new ParticleAttribute(() => new THREE.Vector3())
    
    /* Before: */
    speed.value = 5
    velocity.value.set(x, y, z)
    
    /* Now: */
    speed.write(mesh, 5)
    velocity.write(mesh, (v) => v.set(x, y, z))

    The write method on ParticleAttribute accepts as its second argument either a value, or a function returning a value, and doesn't much care which one you use; the function form is mostly a convenience mechanism to help you save on the number of objects created every frame/emitted particle. The object passed into the function is the same one that is passed into the ParticleAttribute's constructor; in the example above, we're instantiating the velocity attribute with a new THREE.Vector3(); in the write invocation, that very Vector3 instance is passed into the function for you to mutate. This is significantly cheaper than creating a new Vector3 instance for every emitted particle.

    This new API is a little more verbose than the previous version, but it is also more explicit and less error-prone, and decouples the particles engine entirely from Material and Shader Composer, allowing for more flexibility in the future, such as writing to multiple meshes at once, or using non-Shader Composer mechanisms to write into the buffers.

    If you have feedback on this new API, please let me know.

Patch Changes

[email protected]

12 Oct 12:08
e4f1e3a
Compare
Choose a tag to compare

Patch Changes

  • 1d74dfc: New: <RC.RenderPass> now offers three new props, clearColor, clearDepth and clearStencil, that allow the user to configure which information the built-in clear pass should actually clear when enabled.

@hmans/[email protected]

08 Oct 06:42
cb48796
Compare
Choose a tag to compare

Patch Changes

  • cb0001d: Fixed: Improved typings.