wip faster texture loading
This commit is contained in:
16
index.html
16
index.html
@@ -45,7 +45,7 @@
|
||||
dis parturient montes, nascetur ridiculus mus.
|
||||
</p>
|
||||
|
||||
<!-- <div id="atlas-container"></div>-->
|
||||
<div id="atlas-container" style="position: fixed; left: 0; top: 0; border: 1px solid white;"></div>
|
||||
</main>
|
||||
|
||||
<script type="module">
|
||||
@@ -82,10 +82,6 @@
|
||||
});
|
||||
demo1.world.setBlock('minecraft:oak_trapdoor', 2, 0, 0, {facing: 'east', half: 'bottom', open: 'true'});
|
||||
|
||||
demo1.centerView()
|
||||
|
||||
engine.addDiorama(demo1);
|
||||
|
||||
// 3. Setup Figure 2 (Shared: Wire & Repeater | Unique: Piston & Redstone Block)
|
||||
const demo2 = new Diorama('demo-2', engine);
|
||||
// Adjust camera to fit the small viewport
|
||||
@@ -108,14 +104,20 @@
|
||||
demo2.world.setBlock('minecraft:sticky_piston', 2, 0, 0, {facing: 'east', extended: 'false'});
|
||||
demo2.world.setBlock('minecraft:sticky_piston', 2, 0, 1, {facing: 'east', extended: 'true'});
|
||||
demo2.world.setBlock('minecraft:sticky_piston', 2, 0, 2, {facing: 'east', extended: 'true'});
|
||||
demo2.world.setBlock('minecraft:piston_head', 2.5, 0, 1, {facing: 'east', short: 'true',type: 'sticky'});
|
||||
demo2.world.setBlock('minecraft:piston_head', 3, 0, 2, {facing: 'east', short: 'false',type: 'sticky'});
|
||||
demo2.world.setBlock('minecraft:piston_head', 2.5, 0, 1, {facing: 'east', short: 'true', type: 'sticky'});
|
||||
demo2.world.setBlock('minecraft:piston_head', 3, 0, 2, {facing: 'east', short: 'false', type: 'sticky'});
|
||||
|
||||
demo2.world.setBlock('minecraft:glass', 3, 0, 0);
|
||||
demo2.world.setBlock('minecraft:observer', 3.5, 0, 1, {facing: 'up', powered: 'true'});
|
||||
demo2.world.setBlock('minecraft:redstone_block', 4, 0, 2);
|
||||
|
||||
demo1.centerView()
|
||||
demo1.camera.saveState();
|
||||
|
||||
demo2.centerView()
|
||||
demo2.camera.saveState();
|
||||
|
||||
engine.addDiorama(demo1);
|
||||
engine.addDiorama(demo2);
|
||||
|
||||
// 4. Build geometries and draw
|
||||
|
||||
Reference in New Issue
Block a user