-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathTestPlayer.config.js
68 lines (51 loc) · 3.58 KB
/
TestPlayer.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
const path = require('path');
module.exports = {
// all props prefixed with "rt_" will be added to config that is inserted in html
//------------------------------------------------------
// global config - same for all swf-files:
//------------------------------------------------------
debugConfig: false, // log config in build process
rt_showFPS: false, // show fps display - always false in prod
cacheBuster: true, // add cachebuster to urls - always false in prod
allowURLSearchParams: true, // allow changing config via url-params - always false in prod
split: false, // create own folder for each file - only available in prod
entryName: "TestPlayer", // name of webpack-entry - must be set for each config (use package.main ?)
entryPath: "./src/TestPlayer.ts", // path to webpack-entry - must be set for each config (use package.main ?)
buildinsPath: path.join(__dirname, "node_modules", "@awayfl", "awayfl-player", "builtins"), // path to buildins - must be set when amv2 will be used
indexTemplate: path.join(__dirname, "template", "index_template.html"), // path to game-html template - must be set
gameTemplate: path.join(__dirname, "template", "test_template.html"), // path to index-html template - must be set
loaderTemplate: path.join(__dirname, "template", "loader.js"), // path to loader.js - must be set
//-------------------------------------------------------------------------
// default config for this game - can be overwritten for every file-config:
//-------------------------------------------------------------------------
rt_debug: true, // disable JS blobind - always false in prod
rt_title: "TestPlayer", // title of game - should be overwritten for each file-config, but also available for index
rt_filename: "", // filename of game - no extension - must be set for each config
rt_splash: "todo.jpg", // path to splash-image - with extension
rt_start: null, // path to start-image - with extension - optional - if present, loader wait for user input to start the game
rt_width: 900, // width of preloader screen (todo: grab this from splashimage ?)
rt_height: 540, // height of preloader screen (todo: grab this from splashimage ?)
rt_x: 0, // x offset of stage (either absolute px value, or string with percentage of window.innerWidth (0-100))
rt_y: 0, // y offset of stage (either absolute px value, or string with percentage of window.innerHeight (0-100))
rt_w: "100%", // width of stage (either absolute px value, or string with percentage of window.innerWidth (0-100))
rt_h: "100%", // height of stage (either absolute px value, or string with percentage of window.innerHeight (0-100))
rt_stageScaleMode:null, // allowed values: EXACT_FIT noBorder noScale showAll
rt_stageAlign:null, // allowed values: B BL BR L R T TL TR
rt_progressParserWeigth: 1, // weight of parser in reporter - can be ommited or set to 0 aswell
// properties for progress bar
rt_progress: {
direction: "lr", // lr, td
back: "#35809e", // #000
line: "#070bff", // "#00ff00",
rect: [0.25, 0.65, 0.5, 0.03], // values are percentage of width / height
},
rt_box2dVersion: 'none', // box2d version: none, legacy, new, custom (external implementation)
// list of file-configs.
// each file-config is a object that must provide:
// - rt_title
// - rt_filename (no extension)
// it can overwrite other config props aswell
resources: ["template/fonts.swf"], // list of urls to preload (fonts) - relative to project folder
assets: [], // list of assets to copy but not preload
rt_skipFramesOfScene: null, // hack to number of frames on the main-timeline
};