Just not working.
package.json
{
"name": "pixiscr",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"pixi-scrollbox": "^2.3.1",
"pixi-viewport": "^5.0.2",
"pixi.js": "^7.3.2",
"webpack": "^5.89.0",
"webpack-cli": "^5.1.4"
}
}
const PIXI = require('pixi.js')
const Scrollbox = require('pixi-scrollbox').Scrollbox
// create the scrollbox
const scrollbox = new Scrollbox({ boxWidth: 200, boxHeight: 200})
// add the viewport to the stage
const app = new PIXI.Application()
document.body.appendChild(app.view)
app.stage.addChild(scrollbox);
ERRORS in console
- Uncaught TypeError: Cannot read properties of undefined (reading 'domElement')---- this.viewport.options.events.domElement
- Uncaught TypeError: Cannot read properties of undefined (reading 'update') --- this.plugins.update(t)
Just not working.
package.json
{
"name": "pixiscr",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"pixi-scrollbox": "^2.3.1",
"pixi-viewport": "^5.0.2",
"pixi.js": "^7.3.2",
"webpack": "^5.89.0",
"webpack-cli": "^5.1.4"
}
}
const PIXI = require('pixi.js')
const Scrollbox = require('pixi-scrollbox').Scrollbox
// create the scrollbox
const scrollbox = new Scrollbox({ boxWidth: 200, boxHeight: 200})
// add the viewport to the stage
const app = new PIXI.Application()
document.body.appendChild(app.view)
app.stage.addChild(scrollbox);
ERRORS in console