diff --git a/src/browser.js b/src/browser.js new file mode 100644 index 0000000000000000000000000000000000000000..5b88a731753b20a72dfed68b7b574bfbab72f7ba --- /dev/null +++ b/src/browser.js @@ -0,0 +1,21 @@ +/* Copyright 2021 Dominik George <nik@naturalnet.de> + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import Game from './frontend/game'; + +const width = 800; +const height = 600; + +let game = new Game(width, height, backend); diff --git a/webpack.config.js b/webpack.config.js index 3faf73244264b40a5d9b773a48ccb6fa9f70d679..a66d1d63b7343fad81f16c8ec1465fa913aa7ac3 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -3,7 +3,8 @@ const HtmlWebpackPlugin = require('html-webpack-plugin'); module.exports = { entry: { - widget: './src/widget.js' + widget: './src/widget.js', + browser: './src/browser.js' }, plugins: [ new HtmlWebpackPlugin({