Skip to content

Conversation

@lancejpollard
Copy link

@lancejpollard lancejpollard commented Feb 1, 2024

This will fix #287 I think, or something like this.

# the PSD object. However, if you already have the PSD data stored as a Uint8Array,
# you can instantiate the PSD object directly.
constructor: (data) ->
super()
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had to do this to resolve errors such as:

ERROR in ./lib/psd/blend_mode.coffee
Module build failed (from ./node_modules/coffee-loader/dist/cjs.js):
CoffeeScriptError: ./psd.js/lib/psd/blend_mode.coffee:43:5: error: Can't reference 'this' before calling super in derived class constructors
    @blendKey = null
    ^
    at Object.loader (./psd.js/node_modules/coffee-loader/dist/index.js:33:14)
 @ ./lib/psd/layer/blend_modes.coffee 3:12-43
 @ ./lib/psd/layer.coffee 71:17-54
 @ ./lib/psd/layer_mask.coffee 7:8-33
 @ ./lib/psd.coffee 34:12-46

@lancejpollard
Copy link
Author

lancejpollard commented Feb 1, 2024

I'm getting {} when logging Psd from import Psd from '@lancejpollard/psd' when I try this, so not sure, any recommendations after seeing what my PR tries to do?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can I use psd.js directly in my browser?

1 participant