add-main-blender-scene

This commit is contained in:
Derrick Gremillion 2025-03-24 16:37:44 -06:00
parent ce16186c6d
commit 375b3599ca
5 changed files with 121 additions and 0 deletions

3
.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
*.blend1
khafile.js
build_PuzzlePocalypse

BIN
PuzzlePocalypse.blend Normal file

Binary file not shown.

28
Sources/Main.hx Normal file
View File

@ -0,0 +1,28 @@
// Auto-generated
package;
class Main {
public static inline var projectName = 'PuzzlePocalypse';
public static inline var projectVersion = '1.0.4';
public static inline var projectPackage = 'arm';
public static function main() {
iron.object.BoneAnimation.skinMaxBones = 8;
iron.object.LightObject.cascadeCount = 4;
iron.object.LightObject.cascadeSplitFactor = 0.800000011920929;
armory.system.Starter.numAssets = 17;
armory.system.Starter.drawLoading = armory.trait.internal.LoadingScreen.render;
armory.system.Starter.main(
'Scene',
0,
true,
true,
true,
1920,
1080,
1,
true,
armory.renderpath.RenderPathCreator.get
);
}
}

16
Sources/arm/Game.hx Normal file
View File

@ -0,0 +1,16 @@
package arm;
class Game extends iron.Trait {
public function new() {
super();
// notifyOnInit(function() {
// });
// notifyOnUpdate(function() {
// });
// notifyOnRemove(function() {
// });
}
}

74
Sources/arm/Html.hx Normal file
View File

@ -0,0 +1,74 @@
package arm;
/**
* This adds the correct css styling for a nice automatic full screen html5
*/
class Html extends iron.Trait {
var css = "#khanvas {
display: block;
outline: none;
border: none !important;
bottom: 0 !important;
height: 100vh !important;
left: 0 !important;
min-height: 100% !important;
min-width: 100% !important;
position: fixed !important;
right: 0 !important;
top: 0 !important;
width: 100% !important;
}";
public function new() {
super();
notifyOnInit(function() {
#if kha_krom
#else
js.Syntax.code('var style = document.createElement("style"); style.type = "text/css"; style.appendChild(document.createTextNode({0})); document.getElementsByTagName("head")[0].appendChild(style);',
css);
#end
});
// notifyOnUpdate(function() {
// });
// notifyOnRemove(function() {
// });
}
}
/*
<style>
html,
body,
canvas,
div {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
}
p {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
}
#khanvas {
display: block;
outline: none;
border: none !important;
bottom: 0 !important;
height: 100vh !important;
left: 0 !important;
min-height: 100% !important;
min-width: 100% !important;
position: fixed !important;
right: 0 !important;
top: 0 !important;
width: 100% !important;
}
</style>
*/