Class: PrimitivesStack

PhotoEditorSDK.Filter. PrimitivesStack

A helper class that can collect Primitive instances and render the stack

new PhotoEditorSDK.Filter.PrimitivesStack()

sdk/operations/filters/primitives-stack.js, line 60

Methods

clear()

sdk/operations/filters/primitives-stack.js, line 85

Clears the stack

dispose()

sdk/operations/filters/primitives-stack.js, line 207

Cleans up this instance

disposeRenderTextures()

sdk/operations/filters/primitives-stack.js, line 197

Disposes the render textures, frees some memory

isDirtyForRenderer(renderer){Boolean}

sdk/operations/filters/primitives-stack.js, line 168

Checks if this operation is dirty for the given renderer

Name Type Description
renderer PhotoEditorSDK.Engine.BaseRenderer
Returns:
Type Description
Boolean

push(primitive)

sdk/operations/filters/primitives-stack.js, line 78

Adds the given primitive to the stack

Name Type Description
primitive PhotoEditorSDK.Filter.Primitive

render(sdk, inputTexture, outputTexture){Promise}

sdk/operations/filters/primitives-stack.js, line 101

This takes the output sprite's current texture and renders it to this stack's internal render texture. It then uses the internal texture as a uniform for a blend shader and renders the sprite with the original texture and the blend shader to the outputTexture

Name Type Description
sdk PhotoEditorSDK
inputTexture PhotoEditorSDK.Engine.Texture
outputTexture PhotoEditorSDK.Engine.RenderTexture
Returns:
Type Description
Promise

setDirty(dirty)

sdk/operations/filters/primitives-stack.js, line 188

Sets the dirtiness for all renderers

Name Type Description
dirty Boolean

setDirtyForRenderer(dirty, renderer)

sdk/operations/filters/primitives-stack.js, line 180

Sets the dirtiness for the given renderer

Name Type Description
dirty Boolean
renderer PhotoEditorSDK.Engine.BaseRenderer