Shockwave tutorial seems broken

When I try to run the Shockwave tutorial project from the editor, the pop-up console shows the following (I’m running in Edge on Mac).

[posteffect-shockwave.js?id=5777291&branchId=a50fd831-4217-4404-a544-ed069a96d715:12]: is not a function

TypeError: is not a function
    at Func.ShockwavePostEffect (
    at new Func (
    at scriptType.Shockwave.initialize (
    at ScriptComponent._scriptMethod (
    at ScriptComponent._onInitialize (
    at ScriptComponentSystem._callComponentMethod (
    at ScriptComponentSystem._onInitialize (
    at Function._helper (
    at Function.initialize (
    at Application.start (
    at Application._preloadScripts (
    at done (
    at Asset.onAssetLoad (
    at (
    at _opened (
    at Array._loaded (
    at ResourceLoader._onSuccess (
    at ScriptHandler. (
    at HTMLScriptElement.element.onload.element.onreadystatechange (

Error loading scripts. Open the browser console for details.

Hi @blairmacintyre and welcome,

Indeed there seems to be using a deprecated and now not necessary function. Just comment out line 12 on the posteffect-shockwave.js script and it will work just fine:

    var ShockwavePostEffect = function (graphicsDevice, fs, vs) {
        // this is the shader definition for our effect
        this.shader = new pc.Shader(graphicsDevice, {
            attributes: {
                aPosition: pc.SEMANTIC_POSITION
            vshader: vs,
            fshader: fs

@yaustar you may have to update that example project.

1 Like

Thanks, fixed!

1 Like

Thanks @Leonidas @yaustar. I’m really new to Playcanvas (using it for an assignment in my class soon; hoping to use it for a Games class next semester) and was going through some of the tutorials, wasn’t sure what the right fix was, but figured you’d want to know (and assumed the fix would be easy).

1 Like